Commit 6efab4c237 for wordpress.org
commit 6efab4c237ebffa31576351742ab5fdcee05e7a5
Author: desrosj <desrosj@git.wordpress.org>
Date: Wed Nov 20 16:20:31 2024 +0000
Editor: update npm packages in trunk for 6.7.1.
Syncs Editor packages for WordPress 6.7.1 RC1. Includes the following PRs:
- https://github.com/WordPress/gutenberg/pull/66945
- https://github.com/WordPress/gutenberg/pull/66889
- https://github.com/WordPress/gutenberg/pull/67139
Reviewed by desrosj.
Merges [59437] to trunk.
Props mmaattiiaass, ramonopoly, mamaduka, get_dave, poena, ntsekouras, mcsf, jsnajdr, 0mirka00, desrosj, joemcgill, cbravobernal, azaozz, room34, mayanktripathi32, im3dabasia1, jonsurrell.
Fixes #62478, #62447.
Built from https://develop.svn.wordpress.org/trunk@59438
git-svn-id: http://core.svn.wordpress.org/trunk@58824 1a063a9b-81f0-0310-95a4-ce76da25c4cd
diff --git a/wp-includes/assets/script-loader-packages.min.php b/wp-includes/assets/script-loader-packages.min.php
index 5e48da81fd..6b302c3846 100644
--- a/wp-includes/assets/script-loader-packages.min.php
+++ b/wp-includes/assets/script-loader-packages.min.php
@@ -1 +1 @@
-<?php return array('a11y.min.js' => array('dependencies' => array('wp-dom-ready', 'wp-i18n'), 'version' => '3156534cc54473497e14'), 'annotations.min.js' => array('dependencies' => array('wp-data', 'wp-hooks', 'wp-i18n', 'wp-rich-text'), 'version' => '238360e96c76d37a2468'), 'api-fetch.min.js' => array('dependencies' => array('wp-i18n', 'wp-url'), 'version' => 'd387b816bc1ed2042e28'), 'autop.min.js' => array('dependencies' => array(), 'version' => '9fb50649848277dd318d'), 'blob.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '9113eed771d446f4a556'), 'block-directory.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-primitives', 'wp-url'), 'version' => '1e2dcb064ecd5905fe6b'), 'block-editor.min.js' => array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-serialization-default-parser', 'wp-blocks', 'wp-commands', '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-preferences', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-style-engine', 'wp-token-list', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => 'dc2875dbcee52519979b'), 'block-library.min.js' => array('dependencies' => array('react-jsx-runtime', '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-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-patterns', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-wordcount'), 'version' => 'ccc402e50b786e799ae9'), 'block-serialization-default-parser.min.js' => array('dependencies' => array(), 'version' => '14d44daebf663d05d330'), 'blocks.min.js' => array('dependencies' => array('react-jsx-runtime', '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-private-apis', 'wp-rich-text', 'wp-shortcode', 'wp-warning'), 'version' => '8474af4b6260126fa879'), 'commands.min.js' => array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-primitives', 'wp-private-apis'), 'version' => '33b90579e9a6d83ac03b'), 'components.min.js' => array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-a11y', 'wp-compose', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-warning'), 'version' => 'e2ec2370dd500f7ea7c0'), 'compose.min.js' => array('dependencies' => array('react', 'react-jsx-runtime', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-priority-queue'), 'version' => '85f0708cd2e6b26addeb'), 'core-commands.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-commands', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-private-apis', 'wp-router', 'wp-url'), 'version' => 'e398c3f43e502a9c4a8f'), 'core-data.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-private-apis', 'wp-rich-text', 'wp-url', 'wp-warning'), 'version' => '8224153d27ea1b378c5a'), 'customize-widgets.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-widgets'), 'version' => '6cc7ebe73bf2bd031694'), 'data.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-priority-queue', 'wp-private-apis', 'wp-redux-routine'), 'version' => '7c62e39de0308c73d50c'), 'data-controls.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-deprecated'), 'version' => '49f5587e8b90f9e7cc7e'), 'date.min.js' => array('dependencies' => array('moment', 'wp-deprecated'), 'version' => 'aaca6387d1cf924acc51'), 'deprecated.min.js' => array('dependencies' => array('wp-hooks'), 'version' => 'e1f84915c5e8ae38964c'), 'dom.min.js' => array('dependencies' => array('wp-deprecated'), 'version' => '93117dfee2692b04b770'), 'dom-ready.min.js' => array('dependencies' => array(), 'version' => 'f77871ff7694fffea381'), 'edit-post.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-core-commands', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-plugins', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-url', 'wp-widgets'), 'version' => 'f56f4976c416ccebe712'), 'edit-site.min.js' => array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-core-commands', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-patterns', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-priority-queue', 'wp-private-apis', 'wp-router', 'wp-url', 'wp-warning', 'wp-widgets'), 'version' => '79e90f0c7638bb507b37'), 'edit-widgets.min.js' => array('dependencies' => array('react-jsx-runtime', '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-patterns', 'wp-plugins', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => '1efdc3b9daf491cf8991'), 'editor.min.js' => array('dependencies' => array('react', 'react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-commands', '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-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-patterns', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport', 'wp-warning', 'wp-wordcount'), 'version' => 'c75d9bcd56416c25429e'), 'element.min.js' => array('dependencies' => array('react', 'react-dom', 'wp-escape-html'), 'version' => 'cb762d190aebbec25b27'), 'escape-html.min.js' => array('dependencies' => array(), 'version' => '6561a406d2d232a6fbd2'), 'fields.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-blob', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-patterns', 'wp-primitives', 'wp-private-apis', 'wp-url'), 'version' => 'f946d21e4cfda7fd0943'), 'format-library.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-a11y', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-url'), 'version' => '81b8a9364113f57b6a37'), 'hooks.min.js' => array('dependencies' => array(), 'version' => '4d63a3d491d11ffd8ac6'), 'html-entities.min.js' => array('dependencies' => array(), 'version' => '2cd3358363e0675638fb'), 'i18n.min.js' => array('dependencies' => array('wp-hooks'), 'version' => '5e580eb46a90c2b997e6'), 'is-shallow-equal.min.js' => array('dependencies' => array(), 'version' => 'e0f9f1d78d83f5196979'), 'keyboard-shortcuts.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-data', 'wp-element', 'wp-keycodes'), 'version' => '32686e58e84193ce808b'), 'keycodes.min.js' => array('dependencies' => array('wp-i18n'), 'version' => '034ff647a54b018581d3'), 'list-reusable-blocks.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-blob', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n'), 'version' => 'aa3dd59fcb0ede2ee0da'), 'media-utils.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-blob', 'wp-element', 'wp-i18n'), 'version' => 'e10cc6bfcff4fe474479'), 'notices.min.js' => array('dependencies' => array('wp-data'), 'version' => '673a68a7ac2f556ed50b'), 'nux.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '9a0dc535fe222ae46a48'), 'patterns.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-a11y', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-private-apis', 'wp-url'), 'version' => '43f6fdf7b2a8313f6de5'), 'plugins.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-compose', 'wp-element', 'wp-hooks', 'wp-is-shallow-equal', 'wp-primitives'), 'version' => 'ef6da4a9b2747b62c09c'), 'preferences.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-a11y', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-primitives', 'wp-private-apis'), 'version' => '945c6cbfe821b3070047'), 'preferences-persistence.min.js' => array('dependencies' => array('wp-api-fetch'), 'version' => '9307a8c9e3254140a223'), 'primitives.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-element'), 'version' => 'aef2543ab60c8c9bb609'), 'priority-queue.min.js' => array('dependencies' => array(), 'version' => '9c21c957c7e50ffdbf48'), 'private-apis.min.js' => array('dependencies' => array(), 'version' => '4b858962c15c2c7a135f'), 'redux-routine.min.js' => array('dependencies' => array(), 'version' => 'a0a172871afaeb261566'), 'reusable-blocks.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-url'), 'version' => '73735a77e4e5095733da'), 'rich-text.min.js' => array('dependencies' => array('wp-a11y', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-keycodes'), 'version' => '4021b9e4e9ef4d3cd868'), 'router.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-element', 'wp-polyfill', 'wp-private-apis', 'wp-url'), 'version' => 'e4887fecc16ef03e908f'), 'server-side-render.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => '1e0f25c205ebeb30bcd2'), 'shortcode.min.js' => array('dependencies' => array(), 'version' => 'b7747eee0efafd2f0c3b'), 'style-engine.min.js' => array('dependencies' => array(), 'version' => '08cc10e9532531e22456'), 'token-list.min.js' => array('dependencies' => array(), 'version' => '3b5f5dcfde830ecef24f'), 'undo-manager.min.js' => array('dependencies' => array('wp-is-shallow-equal'), 'version' => 'f0698003cb0f0a7bd794'), 'url.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'e87eb76272a3a08402d2'), 'viewport.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-compose', 'wp-data'), 'version' => '829c9a30d366e1e5054c'), 'warning.min.js' => array('dependencies' => array(), 'version' => 'ed7c8b0940914f4fe44b'), 'widgets.min.js' => array('dependencies' => array('react-jsx-runtime', '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' => 'e4801fc4b16effe444d8'), 'wordcount.min.js' => array('dependencies' => array(), 'version' => '55d8c2bf3dc99e7ea5ec'));
+<?php return array('a11y.min.js' => array('dependencies' => array('wp-dom-ready', 'wp-i18n'), 'version' => '3156534cc54473497e14'), 'annotations.min.js' => array('dependencies' => array('wp-data', 'wp-hooks', 'wp-i18n', 'wp-rich-text'), 'version' => '238360e96c76d37a2468'), 'api-fetch.min.js' => array('dependencies' => array('wp-i18n', 'wp-url'), 'version' => 'd387b816bc1ed2042e28'), 'autop.min.js' => array('dependencies' => array(), 'version' => '9fb50649848277dd318d'), 'blob.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '9113eed771d446f4a556'), 'block-directory.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-primitives', 'wp-url'), 'version' => '1e2dcb064ecd5905fe6b'), 'block-editor.min.js' => array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-serialization-default-parser', 'wp-blocks', 'wp-commands', '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-preferences', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-style-engine', 'wp-token-list', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '28fb4f612c7c613fdd55'), 'block-library.min.js' => array('dependencies' => array('react-jsx-runtime', '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-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-patterns', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-wordcount'), 'version' => 'ccc402e50b786e799ae9'), 'block-serialization-default-parser.min.js' => array('dependencies' => array(), 'version' => '14d44daebf663d05d330'), 'blocks.min.js' => array('dependencies' => array('react-jsx-runtime', '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-private-apis', 'wp-rich-text', 'wp-shortcode', 'wp-warning'), 'version' => '8474af4b6260126fa879'), 'commands.min.js' => array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-primitives', 'wp-private-apis'), 'version' => '33b90579e9a6d83ac03b'), 'components.min.js' => array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-a11y', 'wp-compose', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-warning'), 'version' => '130172abbae720694b1f'), 'compose.min.js' => array('dependencies' => array('react', 'react-jsx-runtime', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-priority-queue'), 'version' => '85f0708cd2e6b26addeb'), 'core-commands.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-commands', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-private-apis', 'wp-router', 'wp-url'), 'version' => 'e398c3f43e502a9c4a8f'), 'core-data.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-private-apis', 'wp-rich-text', 'wp-url', 'wp-warning'), 'version' => '8224153d27ea1b378c5a'), 'customize-widgets.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-widgets'), 'version' => '6cc7ebe73bf2bd031694'), 'data.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-priority-queue', 'wp-private-apis', 'wp-redux-routine'), 'version' => '7c62e39de0308c73d50c'), 'data-controls.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-deprecated'), 'version' => '49f5587e8b90f9e7cc7e'), 'date.min.js' => array('dependencies' => array('moment', 'wp-deprecated'), 'version' => 'aaca6387d1cf924acc51'), 'deprecated.min.js' => array('dependencies' => array('wp-hooks'), 'version' => 'e1f84915c5e8ae38964c'), 'dom.min.js' => array('dependencies' => array('wp-deprecated'), 'version' => '93117dfee2692b04b770'), 'dom-ready.min.js' => array('dependencies' => array(), 'version' => 'f77871ff7694fffea381'), 'edit-post.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-core-commands', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-plugins', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-url', 'wp-widgets'), 'version' => 'f56f4976c416ccebe712'), 'edit-site.min.js' => array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-core-commands', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-patterns', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-priority-queue', 'wp-private-apis', 'wp-router', 'wp-url', 'wp-warning', 'wp-widgets'), 'version' => '79e90f0c7638bb507b37'), 'edit-widgets.min.js' => array('dependencies' => array('react-jsx-runtime', '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-patterns', 'wp-plugins', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => '1efdc3b9daf491cf8991'), 'editor.min.js' => array('dependencies' => array('react', 'react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-commands', '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-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-patterns', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport', 'wp-warning', 'wp-wordcount'), 'version' => 'd362bb0f0c3fd99674fe'), 'element.min.js' => array('dependencies' => array('react', 'react-dom', 'wp-escape-html'), 'version' => 'cb762d190aebbec25b27'), 'escape-html.min.js' => array('dependencies' => array(), 'version' => '6561a406d2d232a6fbd2'), 'fields.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-blob', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-patterns', 'wp-primitives', 'wp-private-apis', 'wp-url'), 'version' => 'c8dc1e4d8421380ff34a'), 'format-library.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-a11y', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-url'), 'version' => '81b8a9364113f57b6a37'), 'hooks.min.js' => array('dependencies' => array(), 'version' => '4d63a3d491d11ffd8ac6'), 'html-entities.min.js' => array('dependencies' => array(), 'version' => '2cd3358363e0675638fb'), 'i18n.min.js' => array('dependencies' => array('wp-hooks'), 'version' => '5e580eb46a90c2b997e6'), 'is-shallow-equal.min.js' => array('dependencies' => array(), 'version' => 'e0f9f1d78d83f5196979'), 'keyboard-shortcuts.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-data', 'wp-element', 'wp-keycodes'), 'version' => '32686e58e84193ce808b'), 'keycodes.min.js' => array('dependencies' => array('wp-i18n'), 'version' => '034ff647a54b018581d3'), 'list-reusable-blocks.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-blob', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n'), 'version' => 'aa3dd59fcb0ede2ee0da'), 'media-utils.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-blob', 'wp-element', 'wp-i18n'), 'version' => 'e10cc6bfcff4fe474479'), 'notices.min.js' => array('dependencies' => array('wp-data'), 'version' => '673a68a7ac2f556ed50b'), 'nux.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '9a0dc535fe222ae46a48'), 'patterns.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-a11y', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-private-apis', 'wp-url'), 'version' => 'b4c7e00c3ec65ecfeaed'), 'plugins.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-compose', 'wp-element', 'wp-hooks', 'wp-is-shallow-equal', 'wp-primitives'), 'version' => 'ef6da4a9b2747b62c09c'), 'preferences.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-a11y', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-primitives', 'wp-private-apis'), 'version' => '945c6cbfe821b3070047'), 'preferences-persistence.min.js' => array('dependencies' => array('wp-api-fetch'), 'version' => '9307a8c9e3254140a223'), 'primitives.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-element'), 'version' => 'aef2543ab60c8c9bb609'), 'priority-queue.min.js' => array('dependencies' => array(), 'version' => '9c21c957c7e50ffdbf48'), 'private-apis.min.js' => array('dependencies' => array(), 'version' => '4b858962c15c2c7a135f'), 'redux-routine.min.js' => array('dependencies' => array(), 'version' => 'a0a172871afaeb261566'), 'reusable-blocks.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-url'), 'version' => '73735a77e4e5095733da'), 'rich-text.min.js' => array('dependencies' => array('wp-a11y', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-keycodes'), 'version' => '4021b9e4e9ef4d3cd868'), 'router.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-element', 'wp-polyfill', 'wp-private-apis', 'wp-url'), 'version' => 'e4887fecc16ef03e908f'), 'server-side-render.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => '1e0f25c205ebeb30bcd2'), 'shortcode.min.js' => array('dependencies' => array(), 'version' => 'b7747eee0efafd2f0c3b'), 'style-engine.min.js' => array('dependencies' => array(), 'version' => '08cc10e9532531e22456'), 'token-list.min.js' => array('dependencies' => array(), 'version' => '3b5f5dcfde830ecef24f'), 'undo-manager.min.js' => array('dependencies' => array('wp-is-shallow-equal'), 'version' => 'f0698003cb0f0a7bd794'), 'url.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'e87eb76272a3a08402d2'), 'viewport.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-compose', 'wp-data'), 'version' => '829c9a30d366e1e5054c'), 'warning.min.js' => array('dependencies' => array(), 'version' => 'ed7c8b0940914f4fe44b'), 'widgets.min.js' => array('dependencies' => array('react-jsx-runtime', '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' => 'e4801fc4b16effe444d8'), 'wordcount.min.js' => array('dependencies' => array(), 'version' => '55d8c2bf3dc99e7ea5ec'));
diff --git a/wp-includes/assets/script-loader-packages.php b/wp-includes/assets/script-loader-packages.php
index 8b8950312f..7e9d7af01b 100644
--- a/wp-includes/assets/script-loader-packages.php
+++ b/wp-includes/assets/script-loader-packages.php
@@ -1 +1 @@
-<?php return array('a11y.js' => array('dependencies' => array('wp-dom-ready', 'wp-i18n'), 'version' => '55ca8e5ef2be0319312c'), 'annotations.js' => array('dependencies' => array('wp-data', 'wp-hooks', 'wp-i18n', 'wp-rich-text'), 'version' => '471e036ab9d70fb8aae4'), 'api-fetch.js' => array('dependencies' => array('wp-i18n', 'wp-url'), 'version' => 'c7fab2b80f62e49268dd'), 'autop.js' => array('dependencies' => array(), 'version' => 'a0567e518e6863383ace'), 'blob.js' => array('dependencies' => array('wp-polyfill'), 'version' => '65d38acd0a443932b695'), 'block-directory.js' => array('dependencies' => array('react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-primitives', 'wp-url'), 'version' => '443f0f6e0eed26fb1d2a'), 'block-editor.js' => array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-serialization-default-parser', 'wp-blocks', 'wp-commands', '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-preferences', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-style-engine', 'wp-token-list', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => 'a98630d48b4a85bb66f3'), 'block-library.js' => array('dependencies' => array('react-jsx-runtime', '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-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-patterns', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-wordcount'), 'version' => 'd3824158769988962f31'), 'block-serialization-default-parser.js' => array('dependencies' => array(), 'version' => '1d1bef54e84a98f3efb9'), 'blocks.js' => array('dependencies' => array('react-jsx-runtime', '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-private-apis', 'wp-rich-text', 'wp-shortcode', 'wp-warning'), 'version' => '91512d3d419a818813c6'), 'commands.js' => array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-primitives', 'wp-private-apis'), 'version' => 'dc23eea7476dd94662f9'), 'components.js' => array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-a11y', 'wp-compose', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-warning'), 'version' => 'e99a827b7c5b842738c2'), 'compose.js' => array('dependencies' => array('react', 'react-jsx-runtime', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-priority-queue'), 'version' => '618ce15a0544f745c6eb'), 'core-commands.js' => array('dependencies' => array('react-jsx-runtime', 'wp-commands', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-private-apis', 'wp-router', 'wp-url'), 'version' => '1b912ba4c68267d8cd07'), 'core-data.js' => array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-private-apis', 'wp-rich-text', 'wp-url', 'wp-warning'), 'version' => '3461264c74d08f890ac1'), 'customize-widgets.js' => array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-widgets'), 'version' => 'a00ee75692d54d1ea3c5'), 'data.js' => array('dependencies' => array('react-jsx-runtime', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-priority-queue', 'wp-private-apis', 'wp-redux-routine'), 'version' => '3b2ba2c4c2cb0f74c344'), 'data-controls.js' => array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-deprecated'), 'version' => '06af18ace9a4aeb126e9'), 'date.js' => array('dependencies' => array('moment', 'wp-deprecated'), 'version' => 'dd508f9121b7db4da62d'), 'deprecated.js' => array('dependencies' => array('wp-hooks'), 'version' => '1aa7a2722e5853bb3a37'), 'dom.js' => array('dependencies' => array('wp-deprecated'), 'version' => 'fe8367099d12064e2c18'), 'dom-ready.js' => array('dependencies' => array(), 'version' => '5b9fa8df0892dc9a7c41'), 'edit-post.js' => array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-core-commands', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-plugins', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-url', 'wp-widgets'), 'version' => 'dfe4443c649a0ed7a76a'), 'edit-site.js' => array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-core-commands', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-patterns', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-priority-queue', 'wp-private-apis', 'wp-router', 'wp-url', 'wp-warning', 'wp-widgets'), 'version' => '7c1f866206d53527566c'), 'edit-widgets.js' => array('dependencies' => array('react-jsx-runtime', '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-patterns', 'wp-plugins', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => '7807e48a6b8d48818b1d'), 'editor.js' => array('dependencies' => array('react', 'react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-commands', '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-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-patterns', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport', 'wp-warning', 'wp-wordcount'), 'version' => 'dd6ee986ce9889391448'), 'element.js' => array('dependencies' => array('react', 'react-dom', 'wp-escape-html'), 'version' => '7f6a2f4134ad57e3c04b'), 'escape-html.js' => array('dependencies' => array(), 'version' => '3fb34b7f013aaa921ca4'), 'fields.js' => array('dependencies' => array('react-jsx-runtime', 'wp-blob', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-patterns', 'wp-primitives', 'wp-private-apis', 'wp-url'), 'version' => 'b3a047f37b88cfa06585'), 'format-library.js' => array('dependencies' => array('react-jsx-runtime', 'wp-a11y', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-url'), 'version' => '42c910dbadcb45809f36'), 'hooks.js' => array('dependencies' => array(), 'version' => '5b4ec27a7b82f601224a'), 'html-entities.js' => array('dependencies' => array(), 'version' => '0d1913e5b8fb9137bad2'), 'i18n.js' => array('dependencies' => array('wp-hooks'), 'version' => '2aff907006e2aa00e26e'), 'is-shallow-equal.js' => array('dependencies' => array(), 'version' => 'e70dad7478a6d81b381b'), 'keyboard-shortcuts.js' => array('dependencies' => array('react-jsx-runtime', 'wp-data', 'wp-element', 'wp-keycodes'), 'version' => '3c4007037248f1a54578'), 'keycodes.js' => array('dependencies' => array('wp-i18n'), 'version' => 'bdac64cae9b64d2585cf'), 'list-reusable-blocks.js' => array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-blob', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n'), 'version' => '4082cbc5bfde8350ddf9'), 'media-utils.js' => array('dependencies' => array('wp-api-fetch', 'wp-blob', 'wp-element', 'wp-i18n'), 'version' => '6752337227479ce68d71'), 'notices.js' => array('dependencies' => array('wp-data'), 'version' => 'bb4dbe982e6a0739f30e'), 'nux.js' => array('dependencies' => array('react-jsx-runtime', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '0d352829dae6be46286c'), 'patterns.js' => array('dependencies' => array('react-jsx-runtime', 'wp-a11y', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-private-apis', 'wp-url'), 'version' => 'ce97378a891754cc0ef8'), 'plugins.js' => array('dependencies' => array('react-jsx-runtime', 'wp-compose', 'wp-element', 'wp-hooks', 'wp-is-shallow-equal', 'wp-primitives'), 'version' => 'cd5358b6369eff6f7b85'), 'preferences.js' => array('dependencies' => array('react-jsx-runtime', 'wp-a11y', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-primitives', 'wp-private-apis'), 'version' => 'da016598bccd137bef05'), 'preferences-persistence.js' => array('dependencies' => array('wp-api-fetch'), 'version' => '2a0eed407631381ede85'), 'primitives.js' => array('dependencies' => array('react-jsx-runtime', 'wp-element'), 'version' => 'b0b42d3e72e5c4ecd741'), 'priority-queue.js' => array('dependencies' => array(), 'version' => '0ac29e2c7d9453425a64'), 'private-apis.js' => array('dependencies' => array(), 'version' => '90a811220a86719cf87e'), 'redux-routine.js' => array('dependencies' => array(), 'version' => '5f3792bc38d48a9d5db7'), 'reusable-blocks.js' => array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-url'), 'version' => '0398e0f8154bcab2d593'), 'rich-text.js' => array('dependencies' => array('wp-a11y', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-keycodes'), 'version' => '0b454c23bc9f8042c0a6'), 'router.js' => array('dependencies' => array('react-jsx-runtime', 'wp-element', 'wp-polyfill', 'wp-private-apis', 'wp-url'), 'version' => 'e81d01009da0eb5de3a5'), 'server-side-render.js' => array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => '3dce81021856a751c1dd'), 'shortcode.js' => array('dependencies' => array(), 'version' => '577c74513f927a05a979'), 'style-engine.js' => array('dependencies' => array(), 'version' => '62df1b9d75e8710be41b'), 'token-list.js' => array('dependencies' => array(), 'version' => '09fdc83606f766278b8b'), 'undo-manager.js' => array('dependencies' => array('wp-is-shallow-equal'), 'version' => '131d70acce3788278416'), 'url.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'd62dba05ffc50c672f4a'), 'viewport.js' => array('dependencies' => array('react-jsx-runtime', 'wp-compose', 'wp-data'), 'version' => 'c65a5cb114e86d027c76'), 'warning.js' => array('dependencies' => array(), 'version' => '58eb333ec38c8d28ba1d'), 'widgets.js' => array('dependencies' => array('react-jsx-runtime', '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' => '234166900803cf543a8e'), 'wordcount.js' => array('dependencies' => array(), 'version' => 'c67f865e3ce4abde9fdb'));
+<?php return array('a11y.js' => array('dependencies' => array('wp-dom-ready', 'wp-i18n'), 'version' => '55ca8e5ef2be0319312c'), 'annotations.js' => array('dependencies' => array('wp-data', 'wp-hooks', 'wp-i18n', 'wp-rich-text'), 'version' => '471e036ab9d70fb8aae4'), 'api-fetch.js' => array('dependencies' => array('wp-i18n', 'wp-url'), 'version' => 'c7fab2b80f62e49268dd'), 'autop.js' => array('dependencies' => array(), 'version' => 'a0567e518e6863383ace'), 'blob.js' => array('dependencies' => array('wp-polyfill'), 'version' => '65d38acd0a443932b695'), 'block-directory.js' => array('dependencies' => array('react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-primitives', 'wp-url'), 'version' => '443f0f6e0eed26fb1d2a'), 'block-editor.js' => array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-serialization-default-parser', 'wp-blocks', 'wp-commands', '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-preferences', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-style-engine', 'wp-token-list', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '6d9093f09070e6e7425e'), 'block-library.js' => array('dependencies' => array('react-jsx-runtime', '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-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-patterns', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-wordcount'), 'version' => 'd3824158769988962f31'), 'block-serialization-default-parser.js' => array('dependencies' => array(), 'version' => '1d1bef54e84a98f3efb9'), 'blocks.js' => array('dependencies' => array('react-jsx-runtime', '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-private-apis', 'wp-rich-text', 'wp-shortcode', 'wp-warning'), 'version' => '91512d3d419a818813c6'), 'commands.js' => array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-primitives', 'wp-private-apis'), 'version' => 'dc23eea7476dd94662f9'), 'components.js' => array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-a11y', 'wp-compose', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-warning'), 'version' => '490baf094e76d91dd234'), 'compose.js' => array('dependencies' => array('react', 'react-jsx-runtime', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-priority-queue'), 'version' => '618ce15a0544f745c6eb'), 'core-commands.js' => array('dependencies' => array('react-jsx-runtime', 'wp-commands', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-private-apis', 'wp-router', 'wp-url'), 'version' => '1b912ba4c68267d8cd07'), 'core-data.js' => array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-private-apis', 'wp-rich-text', 'wp-url', 'wp-warning'), 'version' => '3461264c74d08f890ac1'), 'customize-widgets.js' => array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-widgets'), 'version' => 'a00ee75692d54d1ea3c5'), 'data.js' => array('dependencies' => array('react-jsx-runtime', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-priority-queue', 'wp-private-apis', 'wp-redux-routine'), 'version' => '3b2ba2c4c2cb0f74c344'), 'data-controls.js' => array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-deprecated'), 'version' => '06af18ace9a4aeb126e9'), 'date.js' => array('dependencies' => array('moment', 'wp-deprecated'), 'version' => 'dd508f9121b7db4da62d'), 'deprecated.js' => array('dependencies' => array('wp-hooks'), 'version' => '1aa7a2722e5853bb3a37'), 'dom.js' => array('dependencies' => array('wp-deprecated'), 'version' => 'fe8367099d12064e2c18'), 'dom-ready.js' => array('dependencies' => array(), 'version' => '5b9fa8df0892dc9a7c41'), 'edit-post.js' => array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-core-commands', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-plugins', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-url', 'wp-widgets'), 'version' => 'dfe4443c649a0ed7a76a'), 'edit-site.js' => array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-core-commands', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-patterns', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-priority-queue', 'wp-private-apis', 'wp-router', 'wp-url', 'wp-warning', 'wp-widgets'), 'version' => '7c1f866206d53527566c'), 'edit-widgets.js' => array('dependencies' => array('react-jsx-runtime', '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-patterns', 'wp-plugins', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => '7807e48a6b8d48818b1d'), 'editor.js' => array('dependencies' => array('react', 'react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-commands', '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-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-patterns', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport', 'wp-warning', 'wp-wordcount'), 'version' => 'ef18ccc096d0cd84bb34'), 'element.js' => array('dependencies' => array('react', 'react-dom', 'wp-escape-html'), 'version' => '7f6a2f4134ad57e3c04b'), 'escape-html.js' => array('dependencies' => array(), 'version' => '3fb34b7f013aaa921ca4'), 'fields.js' => array('dependencies' => array('react-jsx-runtime', 'wp-blob', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-patterns', 'wp-primitives', 'wp-private-apis', 'wp-url'), 'version' => '8f0a8df3a00c2dab8bdc'), 'format-library.js' => array('dependencies' => array('react-jsx-runtime', 'wp-a11y', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-url'), 'version' => '42c910dbadcb45809f36'), 'hooks.js' => array('dependencies' => array(), 'version' => '5b4ec27a7b82f601224a'), 'html-entities.js' => array('dependencies' => array(), 'version' => '0d1913e5b8fb9137bad2'), 'i18n.js' => array('dependencies' => array('wp-hooks'), 'version' => '2aff907006e2aa00e26e'), 'is-shallow-equal.js' => array('dependencies' => array(), 'version' => 'e70dad7478a6d81b381b'), 'keyboard-shortcuts.js' => array('dependencies' => array('react-jsx-runtime', 'wp-data', 'wp-element', 'wp-keycodes'), 'version' => '3c4007037248f1a54578'), 'keycodes.js' => array('dependencies' => array('wp-i18n'), 'version' => 'bdac64cae9b64d2585cf'), 'list-reusable-blocks.js' => array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-blob', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n'), 'version' => '4082cbc5bfde8350ddf9'), 'media-utils.js' => array('dependencies' => array('wp-api-fetch', 'wp-blob', 'wp-element', 'wp-i18n'), 'version' => '6752337227479ce68d71'), 'notices.js' => array('dependencies' => array('wp-data'), 'version' => 'bb4dbe982e6a0739f30e'), 'nux.js' => array('dependencies' => array('react-jsx-runtime', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '0d352829dae6be46286c'), 'patterns.js' => array('dependencies' => array('react-jsx-runtime', 'wp-a11y', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-private-apis', 'wp-url'), 'version' => '41798d5865e43ddf93df'), 'plugins.js' => array('dependencies' => array('react-jsx-runtime', 'wp-compose', 'wp-element', 'wp-hooks', 'wp-is-shallow-equal', 'wp-primitives'), 'version' => 'cd5358b6369eff6f7b85'), 'preferences.js' => array('dependencies' => array('react-jsx-runtime', 'wp-a11y', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-primitives', 'wp-private-apis'), 'version' => 'da016598bccd137bef05'), 'preferences-persistence.js' => array('dependencies' => array('wp-api-fetch'), 'version' => '2a0eed407631381ede85'), 'primitives.js' => array('dependencies' => array('react-jsx-runtime', 'wp-element'), 'version' => 'b0b42d3e72e5c4ecd741'), 'priority-queue.js' => array('dependencies' => array(), 'version' => '0ac29e2c7d9453425a64'), 'private-apis.js' => array('dependencies' => array(), 'version' => '90a811220a86719cf87e'), 'redux-routine.js' => array('dependencies' => array(), 'version' => '5f3792bc38d48a9d5db7'), 'reusable-blocks.js' => array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-url'), 'version' => '0398e0f8154bcab2d593'), 'rich-text.js' => array('dependencies' => array('wp-a11y', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-keycodes'), 'version' => '0b454c23bc9f8042c0a6'), 'router.js' => array('dependencies' => array('react-jsx-runtime', 'wp-element', 'wp-polyfill', 'wp-private-apis', 'wp-url'), 'version' => 'e81d01009da0eb5de3a5'), 'server-side-render.js' => array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => '3dce81021856a751c1dd'), 'shortcode.js' => array('dependencies' => array(), 'version' => '577c74513f927a05a979'), 'style-engine.js' => array('dependencies' => array(), 'version' => '62df1b9d75e8710be41b'), 'token-list.js' => array('dependencies' => array(), 'version' => '09fdc83606f766278b8b'), 'undo-manager.js' => array('dependencies' => array('wp-is-shallow-equal'), 'version' => '131d70acce3788278416'), 'url.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'd62dba05ffc50c672f4a'), 'viewport.js' => array('dependencies' => array('react-jsx-runtime', 'wp-compose', 'wp-data'), 'version' => 'c65a5cb114e86d027c76'), 'warning.js' => array('dependencies' => array(), 'version' => '58eb333ec38c8d28ba1d'), 'widgets.js' => array('dependencies' => array('react-jsx-runtime', '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' => '234166900803cf543a8e'), 'wordcount.js' => array('dependencies' => array(), 'version' => 'c67f865e3ce4abde9fdb'));
diff --git a/wp-includes/js/dist/block-editor.js b/wp-includes/js/dist/block-editor.js
index a317544c56..9dcab0ff51 100644
--- a/wp-includes/js/dist/block-editor.js
+++ b/wp-includes/js/dist/block-editor.js
@@ -47222,7 +47222,8 @@ function PatternList({
return true;
}
if (selectedCategory === 'uncategorized') {
- const hasKnownCategory = pattern.categories.some(category => registeredPatternCategories.includes(category));
+ var _pattern$categories$s;
+ const hasKnownCategory = (_pattern$categories$s = pattern.categories?.some(category => registeredPatternCategories.includes(category))) !== null && _pattern$categories$s !== void 0 ? _pattern$categories$s : false;
return !pattern.categories?.length || !hasKnownCategory;
}
return pattern.categories?.includes(selectedCategory);
diff --git a/wp-includes/js/dist/block-editor.min.js b/wp-includes/js/dist/block-editor.min.js
index 572c157c40..d4ad93982f 100644
--- a/wp-includes/js/dist/block-editor.min.js
+++ b/wp-includes/js/dist/block-editor.min.js
@@ -18,4 +18,4 @@
* @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,i=n in document;if(!i){var s=document.createElement("div");s.setAttribute(n,"return;"),i="function"==typeof s[n]}return!i&&o&&"wheel"===e&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}},7191:(e,t,n)=>{"use strict";var o=n(2213),r=n(1087);function i(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}}i.getEventType=function(){return o.firefox()?"DOMMouseScroll":r("wheel")?"wheel":"mousewheel"},e.exports=i},2775:e=>{var t=String,n=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t,blackBright:t,redBright:t,greenBright:t,yellowBright:t,blueBright:t,magentaBright:t,cyanBright:t,whiteBright:t,bgBlackBright:t,bgRedBright:t,bgGreenBright:t,bgYellowBright:t,bgBlueBright:t,bgMagentaBright:t,bgCyanBright:t,bgWhiteBright:t}};e.exports=n(),e.exports.createColors=n},1443:e=>{function t(e,t){return t.some((t=>t instanceof RegExp?t.test(e):e.includes(t)))}e.exports=function(e){const n=e.prefix,o=/\s+$/.test(n)?n:`${n} `,r=e.ignoreFiles?[].concat(e.ignoreFiles):[],i=e.includeFiles?[].concat(e.includeFiles):[];return function(s){r.length&&s.source.input.file&&t(s.source.input.file,r)||i.length&&s.source.input.file&&!t(s.source.input.file,i)||s.walkRules((t=>{t.parent&&["keyframes","-webkit-keyframes","-moz-keyframes","-o-keyframes","-ms-keyframes"].includes(t.parent.name)||(t.selectors=t.selectors.map((r=>e.exclude&&function(e,t){return t.some((t=>t instanceof RegExp?t.test(e):e===t))}(r,e.exclude)?r:e.transform?e.transform(n,r,o+r,s.source.input.file,t):o+r)))}))}}},5404:(e,t,n)=>{const o=n(1544);e.exports=e=>{const t=Object.assign({skipHostRelativeUrls:!0},e);return{postcssPlugin:"rebaseUrl",Declaration(n){const r=o(n.value);let i=!1;r.walk((n=>{if("function"!==n.type||"url"!==n.value)return;const o=n.nodes[0].value,r=new URL(o,e.rootUrl);return r.pathname===o&&t.skipHostRelativeUrls||(n.nodes[0].value=r.toString(),i=!0),!1})),i&&(n.value=o.stringify(r))}}},e.exports.postcss=!0},1544:(e,t,n)=>{var o=n(8491),r=n(3815),i=n(4725);function s(e){return this instanceof s?(this.nodes=o(e),this):new s(e)}s.prototype.toString=function(){return Array.isArray(this.nodes)?i(this.nodes):""},s.prototype.walk=function(e,t){return r(this.nodes,e,t),this},s.unit=n(1524),s.walk=r,s.stringify=i,e.exports=s},8491:e=>{var t="(".charCodeAt(0),n=")".charCodeAt(0),o="'".charCodeAt(0),r='"'.charCodeAt(0),i="\\".charCodeAt(0),s="/".charCodeAt(0),l=",".charCodeAt(0),a=":".charCodeAt(0),c="*".charCodeAt(0),u="u".charCodeAt(0),d="U".charCodeAt(0),p="+".charCodeAt(0),h=/^[a-f0-9?-]+$/i;e.exports=function(e){for(var g,m,f,b,k,v,_,x,y,S=[],w=e,C=0,B=w.charCodeAt(C),I=w.length,j=[{nodes:S}],E=0,T="",M="",P="";C<I;)if(B<=32){g=C;do{g+=1,B=w.charCodeAt(g)}while(B<=32);b=w.slice(C,g),f=S[S.length-1],B===n&&E?P=b:f&&"div"===f.type?(f.after=b,f.sourceEndIndex+=b.length):B===l||B===a||B===s&&w.charCodeAt(g+1)!==c&&(!y||y&&"function"===y.type&&"calc"!==y.value)?M=b:S.push({type:"space",sourceIndex:C,sourceEndIndex:g,value:b}),C=g}else if(B===o||B===r){g=C,b={type:"string",sourceIndex:C,quote:m=B===o?"'":'"'};do{if(k=!1,~(g=w.indexOf(m,g+1)))for(v=g;w.charCodeAt(v-1)===i;)v-=1,k=!k;else g=(w+=m).length-1,b.unclosed=!0}while(k);b.value=w.slice(C+1,g),b.sourceEndIndex=b.unclosed?g:g+1,S.push(b),C=g+1,B=w.charCodeAt(C)}else if(B===s&&w.charCodeAt(C+1)===c)b={type:"comment",sourceIndex:C,sourceEndIndex:(g=w.indexOf("*/",C))+2},-1===g&&(b.unclosed=!0,g=w.length,b.sourceEndIndex=g),b.value=w.slice(C+2,g),S.push(b),C=g+2,B=w.charCodeAt(C);else if(B!==s&&B!==c||!y||"function"!==y.type||"calc"!==y.value)if(B===s||B===l||B===a)b=w[C],S.push({type:"div",sourceIndex:C-M.length,sourceEndIndex:C+b.length,value:b,before:M,after:""}),M="",C+=1,B=w.charCodeAt(C);else if(t===B){g=C;do{g+=1,B=w.charCodeAt(g)}while(B<=32);if(x=C,b={type:"function",sourceIndex:C-T.length,value:T,before:w.slice(x+1,g)},C=g,"url"===T&&B!==o&&B!==r){g-=1;do{if(k=!1,~(g=w.indexOf(")",g+1)))for(v=g;w.charCodeAt(v-1)===i;)v-=1,k=!k;else g=(w+=")").length-1,b.unclosed=!0}while(k);_=g;do{_-=1,B=w.charCodeAt(_)}while(B<=32);x<_?(b.nodes=C!==_+1?[{type:"word",sourceIndex:C,sourceEndIndex:_+1,value:w.slice(C,_+1)}]:[],b.unclosed&&_+1!==g?(b.after="",b.nodes.push({type:"space",sourceIndex:_+1,sourceEndIndex:g,value:w.slice(_+1,g)})):(b.after=w.slice(_+1,g),b.sourceEndIndex=g)):(b.after="",b.nodes=[]),C=g+1,b.sourceEndIndex=b.unclosed?g:C,B=w.charCodeAt(C),S.push(b)}else E+=1,b.after="",b.sourceEndIndex=C+1,S.push(b),j.push(b),S=b.nodes=[],y=b;T=""}else if(n===B&&E)C+=1,B=w.charCodeAt(C),y.after=P,y.sourceEndIndex+=P.length,P="",E-=1,j[j.length-1].sourceEndIndex=C,j.pop(),S=(y=j[E]).nodes;else{g=C;do{B===i&&(g+=1),g+=1,B=w.charCodeAt(g)}while(g<I&&!(B<=32||B===o||B===r||B===l||B===a||B===s||B===t||B===c&&y&&"function"===y.type&&"calc"===y.value||B===s&&"function"===y.type&&"calc"===y.value||B===n&&E));b=w.slice(C,g),t===B?T=b:u!==b.charCodeAt(0)&&d!==b.charCodeAt(0)||p!==b.charCodeAt(1)||!h.test(b.slice(2))?S.push({type:"word",sourceIndex:C,sourceEndIndex:g,value:b}):S.push({type:"unicode-range",sourceIndex:C,sourceEndIndex:g,value:b}),C=g}else b=w[C],S.push({type:"word",sourceIndex:C-M.length,sourceEndIndex:C+b.length,value:b}),C+=1,B=w.charCodeAt(C);for(C=j.length-1;C;C-=1)j[C].unclosed=!0,j[C].sourceEndIndex=w.length;return j[0].nodes}},4725:e=>{function t(e,t){var o,r,i=e.type,s=e.value;return t&&void 0!==(r=t(e))?r:"word"===i||"space"===i?s:"string"===i?(o=e.quote||"")+s+(e.unclosed?"":o):"comment"===i?"/*"+s+(e.unclosed?"":"*/"):"div"===i?(e.before||"")+s+(e.after||""):Array.isArray(e.nodes)?(o=n(e.nodes,t),"function"!==i?o:s+"("+(e.before||"")+o+(e.after||"")+(e.unclosed?"":")")):s}function n(e,n){var o,r;if(Array.isArray(e)){for(o="",r=e.length-1;~r;r-=1)o=t(e[r],n)+o;return o}return t(e,n)}e.exports=n},1524:e=>{var t="-".charCodeAt(0),n="+".charCodeAt(0),o=".".charCodeAt(0),r="e".charCodeAt(0),i="E".charCodeAt(0);e.exports=function(e){var s,l,a,c=0,u=e.length;if(0===u||!function(e){var r,i=e.charCodeAt(0);if(i===n||i===t){if((r=e.charCodeAt(1))>=48&&r<=57)return!0;var s=e.charCodeAt(2);return r===o&&s>=48&&s<=57}return i===o?(r=e.charCodeAt(1))>=48&&r<=57:i>=48&&i<=57}(e))return!1;for((s=e.charCodeAt(c))!==n&&s!==t||c++;c<u&&!((s=e.charCodeAt(c))<48||s>57);)c+=1;if(s=e.charCodeAt(c),l=e.charCodeAt(c+1),s===o&&l>=48&&l<=57)for(c+=2;c<u&&!((s=e.charCodeAt(c))<48||s>57);)c+=1;if(s=e.charCodeAt(c),l=e.charCodeAt(c+1),a=e.charCodeAt(c+2),(s===r||s===i)&&(l>=48&&l<=57||(l===n||l===t)&&a>=48&&a<=57))for(c+=l===n||l===t?3:2;c<u&&!((s=e.charCodeAt(c))<48||s>57);)c+=1;return{number:e.slice(0,c),unit:e.slice(c)}}},3815:e=>{e.exports=function e(t,n,o){var r,i,s,l;for(r=0,i=t.length;r<i;r+=1)s=t[r],o||(l=n(s,r,t)),!1!==l&&"function"===s.type&&Array.isArray(s.nodes)&&e(s.nodes,n,o),o&&n(s,r,t)}},1326:(e,t,n)=>{"use strict";let o=n(683);class r extends o{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}}e.exports=r,r.default=r,o.registerAtRule(r)},6589:(e,t,n)=>{"use strict";let o=n(7490);class r extends o{constructor(e){super(e),this.type="comment"}}e.exports=r,r.default=r},683:(e,t,n)=>{"use strict";let o,r,i,s,l=n(6589),a=n(1516),c=n(7490),{isClean:u,my:d}=n(1381);function p(e){return e.map((e=>(e.nodes&&(e.nodes=p(e.nodes)),delete e.source,e)))}function h(e){if(e[u]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)h(t)}class g extends c{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,n,o=this.getIterator();for(;this.indexes[o]<this.proxyOf.nodes.length&&(t=this.indexes[o],n=e(this.proxyOf.nodes[t],t),!1!==n);)this.indexes[o]+=1;return delete this.indexes[o],n}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...n)=>e[t](...n.map((e=>"function"==typeof e?(t,n)=>e(t.toProxy(),n):e))):"every"===t||"some"===t?n=>e[t](((e,...t)=>n(e.toProxy(),...t))):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map((e=>e.toProxy())):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,n)=>(e[t]===n||(e[t]=n,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let n,o=this.index(e),r=this.normalize(t,this.proxyOf.nodes[o]).reverse();o=this.index(e);for(let e of r)this.proxyOf.nodes.splice(o+1,0,e);for(let e in this.indexes)n=this.indexes[e],o<n&&(this.indexes[e]=n+r.length);return this.markDirty(),this}insertBefore(e,t){let n,o=this.index(e),r=0===o&&"prepend",i=this.normalize(t,this.proxyOf.nodes[o],r).reverse();o=this.index(e);for(let e of i)this.proxyOf.nodes.splice(o,0,e);for(let e in this.indexes)n=this.indexes[e],o<=n&&(this.indexes[e]=n+i.length);return this.markDirty(),this}normalize(e,t){if("string"==typeof e)e=p(r(e).nodes);else if(void 0===e)e=[];else if(Array.isArray(e)){e=e.slice(0);for(let t of e)t.parent&&t.parent.removeChild(t,"ignore")}else if("root"===e.type&&"document"!==this.type){e=e.nodes.slice(0);for(let t of e)t.parent&&t.parent.removeChild(t,"ignore")}else if(e.type)e=[e];else if(e.prop){if(void 0===e.value)throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new a(e)]}else if(e.selector||e.selectors)e=[new s(e)];else if(e.name)e=[new o(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new l(e)]}return e.map((e=>(e[d]||g.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[u]&&h(e),e.raws||(e.raws={}),void 0===e.raws.before&&t&&void 0!==t.raws.before&&(e.raws.before=t.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e)))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let n in this.indexes)t=this.indexes[n],t>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}replaceValues(e,t,n){return n||(n=t,t={}),this.walkDecls((o=>{t.props&&!t.props.includes(o.prop)||t.fast&&!o.value.includes(t.fast)||(o.value=o.value.replace(e,n))})),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each(((t,n)=>{let o;try{o=e(t,n)}catch(e){throw t.addToError(e)}return!1!==o&&t.walk&&(o=t.walk(e)),o}))}walkAtRules(e,t){return t?e instanceof RegExp?this.walk(((n,o)=>{if("atrule"===n.type&&e.test(n.name))return t(n,o)})):this.walk(((n,o)=>{if("atrule"===n.type&&n.name===e)return t(n,o)})):(t=e,this.walk(((e,n)=>{if("atrule"===e.type)return t(e,n)})))}walkComments(e){return this.walk(((t,n)=>{if("comment"===t.type)return e(t,n)}))}walkDecls(e,t){return t?e instanceof RegExp?this.walk(((n,o)=>{if("decl"===n.type&&e.test(n.prop))return t(n,o)})):this.walk(((n,o)=>{if("decl"===n.type&&n.prop===e)return t(n,o)})):(t=e,this.walk(((e,n)=>{if("decl"===e.type)return t(e,n)})))}walkRules(e,t){return t?e instanceof RegExp?this.walk(((n,o)=>{if("rule"===n.type&&e.test(n.selector))return t(n,o)})):this.walk(((n,o)=>{if("rule"===n.type&&n.selector===e)return t(n,o)})):(t=e,this.walk(((e,n)=>{if("rule"===e.type)return t(e,n)})))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}g.registerParse=e=>{r=e},g.registerRule=e=>{s=e},g.registerAtRule=e=>{o=e},g.registerRoot=e=>{i=e},e.exports=g,g.default=g,g.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,o.prototype):"rule"===e.type?Object.setPrototypeOf(e,s.prototype):"decl"===e.type?Object.setPrototypeOf(e,a.prototype):"comment"===e.type?Object.setPrototypeOf(e,l.prototype):"root"===e.type&&Object.setPrototypeOf(e,i.prototype),e[d]=!0,e.nodes&&e.nodes.forEach((e=>{g.rebuild(e)}))}},356:(e,t,n)=>{"use strict";let o=n(2775),r=n(9746);class i extends Error{constructor(e,t,n,o,r,s){super(e),this.name="CssSyntaxError",this.reason=e,r&&(this.file=r),o&&(this.source=o),s&&(this.plugin=s),void 0!==t&&void 0!==n&&("number"==typeof t?(this.line=t,this.column=n):(this.line=t.line,this.column=t.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,i)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=o.isColorSupported);let n=e=>e,i=e=>e,s=e=>e;if(e){let{bold:e,gray:t,red:l}=o.createColors(!0);i=t=>e(l(t)),n=e=>t(e),r&&(s=e=>r(e))}let l=t.split(/\r?\n/),a=Math.max(this.line-3,0),c=Math.min(this.line+2,l.length),u=String(c).length;return l.slice(a,c).map(((e,t)=>{let o=a+1+t,r=" "+(" "+o).slice(-u)+" | ";if(o===this.line){if(e.length>160){let t=20,o=Math.max(0,this.column-t),l=Math.max(this.column+t,this.endColumn+t),a=e.slice(o,l),c=n(r.replace(/\d/g," "))+e.slice(0,Math.min(this.column-1,t-1)).replace(/[^\t]/g," ");return i(">")+n(r)+s(a)+"\n "+c+i("^")}let t=n(r.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+n(r)+s(e)+"\n "+t+i("^")}return" "+n(r)+s(e)})).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}}e.exports=i,i.default=i},1516:(e,t,n)=>{"use strict";let o=n(7490);class r extends o{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}}e.exports=r,r.default=r},271:(e,t,n)=>{"use strict";let o,r,i=n(683);class s extends i{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new o(new r,this,e).stringify()}}s.registerLazyResult=e=>{o=e},s.registerProcessor=e=>{r=e},e.exports=s,s.default=s},8940:(e,t,n)=>{"use strict";let o=n(1326),r=n(6589),i=n(1516),s=n(5380),l=n(5696),a=n(9434),c=n(4092);function u(e,t){if(Array.isArray(e))return e.map((e=>u(e)));let{inputs:n,...d}=e;if(n){t=[];for(let e of n){let n={...e,__proto__:s.prototype};n.map&&(n.map={...n.map,__proto__:l.prototype}),t.push(n)}}if(d.nodes&&(d.nodes=e.nodes.map((e=>u(e,t)))),d.source){let{inputId:e,...n}=d.source;d.source=n,null!=e&&(d.source.input=t[e])}if("root"===d.type)return new a(d);if("decl"===d.type)return new i(d);if("rule"===d.type)return new c(d);if("comment"===d.type)return new r(d);if("atrule"===d.type)return new o(d);throw new Error("Unknown node type: "+e.type)}e.exports=u,u.default=u},5380:(e,t,n)=>{"use strict";let{nanoid:o}=n(5042),{isAbsolute:r,resolve:i}=n(197),{SourceMapConsumer:s,SourceMapGenerator:l}=n(1866),{fileURLToPath:a,pathToFileURL:c}=n(2739),u=n(356),d=n(5696),p=n(9746),h=Symbol("fromOffsetCache"),g=Boolean(s&&l),m=Boolean(i&&r);class f{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!m||/^\w+:\/\//.test(t.from)||r(t.from)?this.file=t.from:this.file=i(t.from)),m&&g){let e=new d(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+o(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,n,o={}){let r,i,s;if(t&&"object"==typeof t){let e=t,o=n;if("number"==typeof e.offset){let o=this.fromOffset(e.offset);t=o.line,n=o.col}else t=e.line,n=e.column;if("number"==typeof o.offset){let e=this.fromOffset(o.offset);i=e.line,r=e.col}else i=o.line,r=o.column}else if(!n){let e=this.fromOffset(t);t=e.line,n=e.col}let l=this.origin(t,n,i,r);return s=l?new u(e,void 0===l.endLine?l.line:{column:l.column,line:l.line},void 0===l.endLine?l.column:{column:l.endColumn,line:l.endLine},l.source,l.file,o.plugin):new u(e,void 0===i?t:{column:n,line:t},void 0===i?n:{column:r,line:i},this.css,this.file,o.plugin),s.input={column:n,endColumn:r,endLine:i,line:t,source:this.css},this.file&&(c&&(s.input.url=c(this.file).toString()),s.input.file=this.file),s}fromOffset(e){let t,n;if(this[h])n=this[h];else{let e=this.css.split("\n");n=new Array(e.length);let t=0;for(let o=0,r=e.length;o<r;o++)n[o]=t,t+=e[o].length+1;this[h]=n}t=n[n.length-1];let o=0;if(e>=t)o=n.length-1;else{let t,r=n.length-2;for(;o<r;)if(t=o+(r-o>>1),e<n[t])r=t-1;else{if(!(e>=n[t+1])){o=t;break}o=t+1}}return{col:e-n[o]+1,line:o+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:i(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,n,o){if(!this.map)return!1;let i,s,l=this.map.consumer(),u=l.originalPositionFor({column:t,line:e});if(!u.source)return!1;"number"==typeof n&&(i=l.originalPositionFor({column:o,line:n})),s=r(u.source)?c(u.source):new URL(u.source,this.map.consumer().sourceRoot||c(this.map.mapFile));let d={column:u.column,endColumn:i&&i.column,endLine:i&&i.line,line:u.line,url:s.toString()};if("file:"===s.protocol){if(!a)throw new Error("file: protocol is not available in this PostCSS build");d.file=a(s)}let p=l.sourceContentFor(u.source);return p&&(d.source=p),d}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}}e.exports=f,f.default=f,p&&p.registerInput&&p.registerInput(f)},448:(e,t,n)=>{"use strict";let o=n(683),r=n(271),i=n(1670),s=n(4295),l=n(9055),a=n(9434),c=n(633),{isClean:u,my:d}=n(1381);n(3122);const p={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},h={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},g={Once:!0,postcssPlugin:!0,prepare:!0},m=0;function f(e){return"object"==typeof e&&"function"==typeof e.then}function b(e){let t=!1,n=p[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,m,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,m,n+"Exit"]:[n,n+"Exit"]}function k(e){let t;return t="document"===e.type?["Document",m,"DocumentExit"]:"root"===e.type?["Root",m,"RootExit"]:b(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function v(e){return e[u]=!1,e.nodes&&e.nodes.forEach((e=>v(e))),e}let _={};class x{constructor(e,t,n){let r;if(this.stringified=!1,this.processed=!1,"object"!=typeof t||null===t||"root"!==t.type&&"document"!==t.type)if(t instanceof x||t instanceof l)r=v(t.root),t.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=t.map);else{let e=s;n.syntax&&(e=n.syntax.parse),n.parser&&(e=n.parser),e.parse&&(e=e.parse);try{r=e(t,n)}catch(e){this.processed=!0,this.error=e}r&&!r[d]&&o.rebuild(r)}else r=v(t);this.result=new l(e,r,n),this.helpers={..._,postcss:_,result:this.result},this.plugins=this.processor.plugins.map((e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e))}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let n=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin?n.postcssVersion:(e.plugin=n.postcssPlugin,e.setMessage())}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,n)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,n])};for(let t of this.plugins)if("object"==typeof t)for(let n in t){if(!h[n]&&/^[A-Z]/.test(n))throw new Error(`Unknown event ${n} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!g[n])if("object"==typeof t[n])for(let o in t[n])e(t,"*"===o?n:n+"-"+o.toLowerCase(),t[n][o]);else"function"==typeof t[n]&&e(t,n,t[n])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],n=this.runOnRoot(t);if(f(n))try{await n}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[u];){e[u]=!0;let t=[k(e)];for(;t.length>0;){let e=this.visitTick(t);if(f(e))try{await e}catch(e){let n=t[t.length-1].node;throw this.handleError(e,n)}}}if(this.listeners.OnceExit)for(let[t,n]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map((e=>n(e,this.helpers)));await Promise.all(t)}else await n(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map((t=>e.Once(t,this.helpers)));return f(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=c;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let n=new i(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){if(f(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[u];)e[u]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[n,o]of e){let e;this.result.lastPlugin=n;try{e=o(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(f(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:n,visitors:o}=t;if("root"!==n.type&&"document"!==n.type&&!n.parent)return void e.pop();if(o.length>0&&t.visitorIndex<o.length){let[e,r]=o[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===o.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return r(n.toProxy(),this.helpers)}catch(e){throw this.handleError(e,n)}}if(0!==t.iterator){let o,r=t.iterator;for(;o=n.nodes[n.indexes[r]];)if(n.indexes[r]+=1,!o[u])return o[u]=!0,void e.push(k(o));t.iterator=0,delete n.indexes[r]}let r=t.events;for(;t.eventIndex<r.length;){let e=r[t.eventIndex];if(t.eventIndex+=1,e===m)return void(n.nodes&&n.nodes.length&&(n[u]=!0,t.iterator=n.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[u]=!0;let t=b(e);for(let n of t)if(n===m)e.nodes&&e.each((e=>{e[u]||this.walkSync(e)}));else{let t=this.listeners[n];if(t&&this.visitSync(t,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}x.registerPostcss=e=>{_=e},e.exports=x,x.default=x,a.registerLazyResult(x),r.registerLazyResult(x)},7374:e=>{"use strict";let t={comma:e=>t.split(e,[","],!0),space:e=>t.split(e,[" ","\n","\t"]),split(e,t,n){let o=[],r="",i=!1,s=0,l=!1,a="",c=!1;for(let n of e)c?c=!1:"\\"===n?c=!0:l?n===a&&(l=!1):'"'===n||"'"===n?(l=!0,a=n):"("===n?s+=1:")"===n?s>0&&(s-=1):0===s&&t.includes(n)&&(i=!0),i?(""!==r&&o.push(r.trim()),r="",i=!1):r+=n;return(n||""!==r)&&o.push(r.trim()),o}};e.exports=t,t.default=t},1670:(e,t,n)=>{"use strict";let{dirname:o,relative:r,resolve:i,sep:s}=n(197),{SourceMapConsumer:l,SourceMapGenerator:a}=n(1866),{pathToFileURL:c}=n(2739),u=n(5380),d=Boolean(l&&a),p=Boolean(o&&i&&r&&s);e.exports=class{constructor(e,t,n,o){this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=o,this.originalCSS=o,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,n=this.toUrl(this.path(e.file)),r=e.root||o(e.file);!1===this.mapOpts.sourcesContent?(t=new l(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,n,this.toUrl(this.path(r)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&e.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),p&&d&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,(t=>{e+=t})),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=a.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new a({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new a({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,n=1,o=1,r="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((s,l,a)=>{if(this.css+=s,l&&"end"!==a&&(i.generated.line=n,i.generated.column=o-1,l.source&&l.source.start?(i.source=this.sourcePath(l),i.original.line=l.source.start.line,i.original.column=l.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),t=s.match(/\n/g),t?(n+=t.length,e=s.lastIndexOf("\n"),o=s.length-e):o+=s.length,l&&"start"!==a){let e=l.parent||{raws:{}};("decl"===l.type||"atrule"===l.type&&!l.nodes)&&l===e.last&&!e.raws.semicolon||(l.source&&l.source.end?(i.source=this.sourcePath(l),i.original.line=l.source.end.line,i.original.column=l.source.end.column-1,i.generated.line=n,i.generated.column=o-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=n,i.generated.column=o-1,this.map.addMapping(i)))}}))}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((e=>e.annotation)))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some((e=>e.inline)))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some((e=>e.withContent()))}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let n=this.opts.to?o(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(n=o(i(n,this.mapOpts.annotation)));let s=r(n,e);return this.memoizedPaths.set(e,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}}));else{let e=new u(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk((t=>{if(t.source){let n=t.source.input.from;if(n&&!e[n]){e[n]=!0;let o=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(o,t.source.input.css)}}}));else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(c){let t=c(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===s&&(e=e.replace(/\\/g,"/"));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}}},7661:(e,t,n)=>{"use strict";let o=n(1670),r=n(4295);const i=n(9055);let s=n(633);n(3122);class l{constructor(e,t,n){let r;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=n,this._map=void 0;let l=s;this.result=new i(this._processor,r,this._opts),this.result.css=t;let a=this;Object.defineProperty(this.result,"root",{get:()=>a.root});let c=new o(l,r,this._opts,t);if(c.isMap()){let[e,t]=c.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else c.clearAnnotation(),this.result.css=c.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=r;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}}e.exports=l,l.default=l},7490:(e,t,n)=>{"use strict";let o=n(356),r=n(346),i=n(633),{isClean:s,my:l}=n(1381);function a(e,t){let n=new e.constructor;for(let o in e){if(!Object.prototype.hasOwnProperty.call(e,o))continue;if("proxyCache"===o)continue;let r=e[o],i=typeof r;"parent"===o&&"object"===i?t&&(n[o]=t):"source"===o?n[o]=r:Array.isArray(r)?n[o]=r.map((e=>a(e,n))):("object"===i&&null!==r&&(r=a(r)),n[o]=r)}return n}class c{constructor(e={}){this.raws={},this[s]=!1,this[l]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let n of e[t])"function"==typeof n.clone?this.append(n.clone()):this.append(n)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=a(this);for(let n in e)t[n]=e[n];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:n,start:o}=this.rangeBy(t);return this.source.input.error(e,{column:o.column,line:o.line},{column:n.column,line:n.line},t)}return new o(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,n)=>(e[t]===n||(e[t]=n,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markClean(){this[s]=!0}markDirty(){if(this[s]){this[s]=!1;let e=this;for(;e=e.parent;)e[s]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let n=this.source.start;if(e.index)n=this.positionInside(e.index,t);else if(e.word){let o=(t=this.toString()).indexOf(e.word);-1!==o&&(n=this.positionInside(o,t))}return n}positionInside(e,t){let n=t||this.toString(),o=this.source.start.column,r=this.source.start.line;for(let t=0;t<e;t++)"\n"===n[t]?(o=1,r+=1):o+=1;return{column:o,line:r}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let o=this.toString(),r=o.indexOf(e.word);-1!==r&&(t=this.positionInside(r,o),n=this.positionInside(r+e.word.length,o))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return(n.line<t.line||n.line===t.line&&n.column<=t.column)&&(n={column:t.column+1,line:t.line}),{end:n,start:t}}raw(e,t){return(new r).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,n=!1;for(let o of e)o===this?n=!0:n?(this.parent.insertAfter(t,o),t=o):this.parent.insertBefore(t,o);n||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let n={},o=null==t;t=t||new Map;let r=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let o=this[e];if(Array.isArray(o))n[e]=o.map((e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e));else if("object"==typeof o&&o.toJSON)n[e]=o.toJSON(null,t);else if("source"===e){let i=t.get(o.input);null==i&&(i=r,t.set(o.input,r),r++),n[e]={end:o.end,inputId:i,start:o.start}}else n[e]=o}return o&&(n.inputs=[...t.keys()].map((e=>e.toJSON()))),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=i){e.stringify&&(e=e.stringify);let t="";return e(this,(e=>{t+=e})),t}warn(e,t,n){let o={node:this};for(let e in n)o[e]=n[e];return e.warn(t,o)}get proxyOf(){return this}}e.exports=c,c.default=c},4295:(e,t,n)=>{"use strict";let o=n(683),r=n(5380),i=n(3937);function s(e,t){let n=new r(e,t),o=new i(n);try{o.parse()}catch(e){throw e}return o.root}e.exports=s,s.default=s,o.registerParse(s)},3937:(e,t,n)=>{"use strict";let o=n(1326),r=n(6589),i=n(1516),s=n(9434),l=n(4092),a=n(2327);const c={empty:!0,space:!0};e.exports=class{constructor(e){this.input=e,this.root=new s,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,n,r,i=new o;i.name=e[1].slice(1),""===i.name&&this.unnamedAtrule(i,e),this.init(i,e[2]);let s=!1,l=!1,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?c.push("("===t?")":"]"):"{"===t&&c.length>0?c.push("}"):t===c[c.length-1]&&c.pop(),0===c.length){if(";"===t){i.source.end=this.getPosition(e[2]),i.source.end.offset++,this.semicolon=!0;break}if("{"===t){l=!0;break}if("}"===t){if(a.length>0){for(r=a.length-1,n=a[r];n&&"space"===n[0];)n=a[--r];n&&(i.source.end=this.getPosition(n[3]||n[2]),i.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){s=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(i.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(i,"params",a),s&&(e=a[a.length-1],i.source.end=this.getPosition(e[3]||e[2]),i.source.end.offset++,this.spaces=i.raws.between,i.raws.between="")):(i.raws.afterName="",i.params=""),l&&(i.nodes=[],this.current=i)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let n,o=0;for(let r=t-1;r>=0&&(n=e[r],"space"===n[0]||(o+=1,2!==o));r--);throw this.input.error("Missed semicolon","word"===n[0]?n[3]+1:n[2])}colon(e){let t,n,o,r=0;for(let[i,s]of e.entries()){if(n=s,o=n[0],"("===o&&(r+=1),")"===o&&(r-=1),0===r&&":"===o){if(t){if("word"===t[0]&&"progid"===t[1])continue;return i}this.doubleColon(n)}t=n}return!1}comment(e){let t=new r;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let n=e[1].slice(2,-2);if(/^\s*$/.test(n))t.text="",t.raws.left=n,t.raws.right="";else{let e=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=a(this.input)}decl(e,t){let n=new i;this.init(n,e[0][2]);let o,r=e[e.length-1];for(";"===r[0]&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(r[3]||r[2]||function(e){for(let t=e.length-1;t>=0;t--){let n=e[t],o=n[3]||n[2];if(o)return o}}(e)),n.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;n.prop+=e.shift()[1]}for(n.raws.between="";e.length;){if(o=e.shift(),":"===o[0]){n.raws.between+=o[1];break}"word"===o[0]&&/\w/.test(o[1])&&this.unknownWord([o]),n.raws.between+=o[1]}"_"!==n.prop[0]&&"*"!==n.prop[0]||(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let s,l=[];for(;e.length&&(s=e[0][0],"space"===s||"comment"===s);)l.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(o=e[t],"!important"===o[1].toLowerCase()){n.important=!0;let o=this.stringFrom(e,t);o=this.spacesFromEnd(e)+o," !important"!==o&&(n.raws.important=o);break}if("important"===o[1].toLowerCase()){let o=e.slice(0),r="";for(let e=t;e>0;e--){let t=o[e][0];if(r.trim().startsWith("!")&&"space"!==t)break;r=o.pop()[1]+r}r.trim().startsWith("!")&&(n.important=!0,n.raws.important=r,e=o)}if("space"!==o[0]&&"comment"!==o[0])break}e.some((e=>"space"!==e[0]&&"comment"!==e[0]))&&(n.raws.between+=l.map((e=>e[1])).join(""),l=[]),this.raw(n,"value",l.concat(e),t),n.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new l;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,n=null,o=!1,r=null,i=[],s=e[1].startsWith("--"),l=[],a=e;for(;a;){if(n=a[0],l.push(a),"("===n||"["===n)r||(r=a),i.push("("===n?")":"]");else if(s&&o&&"{"===n)r||(r=a),i.push("}");else if(0===i.length){if(";"===n){if(o)return void this.decl(l,s);break}if("{"===n)return void this.rule(l);if("}"===n){this.tokenizer.back(l.pop()),t=!0;break}":"===n&&(o=!0)}else n===i[i.length-1]&&(i.pop(),0===i.length&&(r=null));a=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),i.length>0&&this.unclosedBracket(r),t&&o){if(!s)for(;l.length&&(a=l[l.length-1][0],"space"===a||"comment"===a);)this.tokenizer.back(l.pop());this.decl(l,s)}else this.unknownWord(l)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,n,o){let r,i,s,l,a=n.length,u="",d=!0;for(let e=0;e<a;e+=1)r=n[e],i=r[0],"space"!==i||e!==a-1||o?"comment"===i?(l=n[e-1]?n[e-1][0]:"empty",s=n[e+1]?n[e+1][0]:"empty",c[l]||c[s]||","===u.slice(-1)?d=!1:u+=r[1]):u+=r[1]:d=!1;if(!d){let o=n.reduce(((e,t)=>e+t[1]),"");e.raws[t]={raw:o,value:u}}e[t]=u}rule(e){e.pop();let t=new l;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let t,n="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)n+=e.shift()[1];return n}spacesFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)n=e.pop()[1]+n;return n}stringFrom(e,t){let n="";for(let o=t;o<e.length;o++)n+=e[o][1];return e.splice(t,e.length-t),n}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}}},4529:(e,t,n)=>{"use strict";let o=n(1326),r=n(6589),i=n(683),s=n(356),l=n(1516),a=n(271),c=n(8940),u=n(5380),d=n(448),p=n(7374),h=n(7490),g=n(4295),m=n(9656),f=n(9055),b=n(9434),k=n(4092),v=n(633),_=n(5776);function x(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new m(e)}x.plugin=function(e,t){let n,o=!1;function r(...n){console&&console.warn&&!o&&(o=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let r=t(...n);return r.postcssPlugin=e,r.postcssVersion=(new m).version,r}return Object.defineProperty(r,"postcss",{get:()=>(n||(n=r()),n)}),r.process=function(e,t,n){return x([r(n)]).process(e,t)},r},x.stringify=v,x.parse=g,x.fromJSON=c,x.list=p,x.comment=e=>new r(e),x.atRule=e=>new o(e),x.decl=e=>new l(e),x.rule=e=>new k(e),x.root=e=>new b(e),x.document=e=>new a(e),x.CssSyntaxError=s,x.Declaration=l,x.Container=i,x.Processor=m,x.Document=a,x.Comment=r,x.Warning=_,x.AtRule=o,x.Result=f,x.Input=u,x.Rule=k,x.Root=b,x.Node=h,d.registerPostcss(x),e.exports=x,x.default=x},5696:(e,t,n)=>{"use strict";let{existsSync:o,readFileSync:r}=n(9977),{dirname:i,join:s}=n(197),{SourceMapConsumer:l,SourceMapGenerator:a}=n(1866);class c{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let n=t.map?t.map.prev:void 0,o=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=i(this.mapFile)),o&&(this.text=o)}consumer(){return this.consumerCache||(this.consumerCache=new l(this.text)),this.consumerCache}decodeInline(e){let t=e.match(/^data:application\/json;charset=utf-?8,/)||e.match(/^data:application\/json,/);if(t)return decodeURIComponent(e.substr(t[0].length));let n=e.match(/^data:application\/json;charset=utf-?8;base64,/)||e.match(/^data:application\/json;base64,/);if(n)return o=e.substr(n[0].length),Buffer?Buffer.from(o,"base64").toString():window.atob(o);var o;let r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/g);if(!t)return;let n=e.lastIndexOf(t.pop()),o=e.indexOf("*/",n);n>-1&&o>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,o)))}loadFile(e){if(this.root=i(e),o(e))return this.mapFile=e,r(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof l)return a.fromSourceMap(t).toString();if(t instanceof a)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let n=t(e);if(n){let e=this.loadFile(n);if(!e)throw new Error("Unable to load previous source map: "+n.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=s(i(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}e.exports=c,c.default=c},9656:(e,t,n)=>{"use strict";let o=n(271),r=n(448),i=n(7661),s=n(9434);class l{constructor(e=[]){this.version="8.4.47",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let n of e)if(!0===n.postcss?n=n():n.postcss&&(n=n.postcss),"object"==typeof n&&Array.isArray(n.plugins))t=t.concat(n.plugins);else if("object"==typeof n&&n.postcssPlugin)t.push(n);else if("function"==typeof n)t.push(n);else{if("object"!=typeof n||!n.parse&&!n.stringify)throw new Error(n+" is not a PostCSS plugin")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new r(this,e,t):new i(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}e.exports=l,l.default=l,s.registerProcessor(l),o.registerProcessor(l)},9055:(e,t,n)=>{"use strict";let o=n(5776);class r{constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let n=new o(e,t);return this.messages.push(n),n}warnings(){return this.messages.filter((e=>"warning"===e.type))}get content(){return this.css}}e.exports=r,r.default=r},9434:(e,t,n)=>{"use strict";let o,r,i=n(683);class s extends i{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,n){let o=super.normalize(e);if(t)if("prepend"===n)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of o)e.raws.before=t.raws.before;return o}removeChild(e,t){let n=this.index(e);return!t&&0===n&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}toResult(e={}){return new o(new r,this,e).stringify()}}s.registerLazyResult=e=>{o=e},s.registerProcessor=e=>{r=e},e.exports=s,s.default=s,i.registerRoot(s)},4092:(e,t,n)=>{"use strict";let o=n(683),r=n(7374);class i extends o{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return r.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n)}}e.exports=i,i.default=i,o.registerRule(i)},346:e=>{"use strict";const t={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};class n{constructor(e){this.builder=e}atrule(e,t){let n="@"+e.name,o=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?n+=e.raws.afterName:o&&(n+=" "),e.nodes)this.block(e,n+o);else{let r=(e.raws.between||"")+(t?";":"");this.builder(n+o+r,e)}}beforeAfter(e,t){let n;n="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let o=e.parent,r=0;for(;o&&"root"!==o.type;)r+=1,o=o.parent;if(n.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<r;e++)n+=t}return n}block(e,t){let n,o=this.raw(e,"between","beforeOpen");this.builder(t+o+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),n=this.raw(e,"after")):n=this.raw(e,"after","emptyBody"),n&&this.builder(n),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let n=this.raw(e,"semicolon");for(let o=0;o<e.nodes.length;o++){let r=e.nodes[o],i=this.raw(r,"before");i&&this.builder(i),this.stringify(r,t!==o||n)}}comment(e){let t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e)}decl(e,t){let n=this.raw(e,"between","colon"),o=e.prop+n+this.rawValue(e,"value");e.important&&(o+=e.raws.important||" !important"),t&&(o+=";"),this.builder(o,e)}document(e){this.body(e)}raw(e,n,o){let r;if(o||(o=n),n&&(r=e.raws[n],void 0!==r))return r;let i=e.parent;if("before"===o){if(!i||"root"===i.type&&i.first===e)return"";if(i&&"document"===i.type)return""}if(!i)return t[o];let s=e.root();if(s.rawCache||(s.rawCache={}),void 0!==s.rawCache[o])return s.rawCache[o];if("before"===o||"after"===o)return this.beforeAfter(e,o);{let t="raw"+((l=o)[0].toUpperCase()+l.slice(1));this[t]?r=this[t](s,e):s.walk((e=>{if(r=e.raws[n],void 0!==r)return!1}))}var l;return void 0===r&&(r=t[o]),s.rawCache[o]=r,r}rawBeforeClose(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let n;return e.walkComments((e=>{if(void 0!==e.raws.before)return n=e.raws.before,n.includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1})),void 0===n?n=this.raw(t,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(e,t){let n;return e.walkDecls((e=>{if(void 0!==e.raws.before)return n=e.raws.before,n.includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1})),void 0===n?n=this.raw(t,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeOpen(e){let t;return e.walk((e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1})),t}rawBeforeRule(e){let t;return e.walk((n=>{if(n.nodes&&(n.parent!==e||e.first!==n)&&void 0!==n.raws.before)return t=n.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls((e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1})),t}rawEmptyBody(e){let t;return e.walk((e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1})),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk((n=>{let o=n.parent;if(o&&o!==e&&o.parent&&o.parent===e&&void 0!==n.raws.before){let e=n.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}})),t}rawSemicolon(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1})),t}rawValue(e,t){let n=e[t],o=e.raws[t];return o&&o.value===n?o.raw:n}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}}e.exports=n,n.default=n},633:(e,t,n)=>{"use strict";let o=n(346);function r(e,t){new o(t).stringify(e)}e.exports=r,r.default=r},1381:e=>{"use strict";e.exports.isClean=Symbol("isClean"),e.exports.my=Symbol("my")},2327:e=>{"use strict";const t="'".charCodeAt(0),n='"'.charCodeAt(0),o="\\".charCodeAt(0),r="/".charCodeAt(0),i="\n".charCodeAt(0),s=" ".charCodeAt(0),l="\f".charCodeAt(0),a="\t".charCodeAt(0),c="\r".charCodeAt(0),u="[".charCodeAt(0),d="]".charCodeAt(0),p="(".charCodeAt(0),h=")".charCodeAt(0),g="{".charCodeAt(0),m="}".charCodeAt(0),f=";".charCodeAt(0),b="*".charCodeAt(0),k=":".charCodeAt(0),v="@".charCodeAt(0),_=/[\t\n\f\r "#'()/;[\\\]{}]/g,x=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,y=/.[\r\n"'(/\\]/,S=/[\da-f]/i;e.exports=function(e,w={}){let C,B,I,j,E,T,M,P,R,N,L=e.css.valueOf(),A=w.ignoreErrors,D=L.length,O=0,z=[],V=[];function F(t){throw e.error("Unclosed "+t,O)}return{back:function(e){V.push(e)},endOfFile:function(){return 0===V.length&&O>=D},nextToken:function(e){if(V.length)return V.pop();if(O>=D)return;let w=!!e&&e.ignoreUnclosed;switch(C=L.charCodeAt(O),C){case i:case s:case a:case c:case l:j=O;do{j+=1,C=L.charCodeAt(j)}while(C===s||C===i||C===a||C===c||C===l);T=["space",L.slice(O,j)],O=j-1;break;case u:case d:case g:case m:case k:case f:case h:{let e=String.fromCharCode(C);T=[e,e,O];break}case p:if(N=z.length?z.pop()[1]:"",R=L.charCodeAt(O+1),"url"===N&&R!==t&&R!==n&&R!==s&&R!==i&&R!==a&&R!==l&&R!==c){j=O;do{if(M=!1,j=L.indexOf(")",j+1),-1===j){if(A||w){j=O;break}F("bracket")}for(P=j;L.charCodeAt(P-1)===o;)P-=1,M=!M}while(M);T=["brackets",L.slice(O,j+1),O,j],O=j}else j=L.indexOf(")",O+1),B=L.slice(O,j+1),-1===j||y.test(B)?T=["(","(",O]:(T=["brackets",B,O,j],O=j);break;case t:case n:E=C===t?"'":'"',j=O;do{if(M=!1,j=L.indexOf(E,j+1),-1===j){if(A||w){j=O+1;break}F("string")}for(P=j;L.charCodeAt(P-1)===o;)P-=1,M=!M}while(M);T=["string",L.slice(O,j+1),O,j],O=j;break;case v:_.lastIndex=O+1,_.test(L),j=0===_.lastIndex?L.length-1:_.lastIndex-2,T=["at-word",L.slice(O,j+1),O,j],O=j;break;case o:for(j=O,I=!0;L.charCodeAt(j+1)===o;)j+=1,I=!I;if(C=L.charCodeAt(j+1),I&&C!==r&&C!==s&&C!==i&&C!==a&&C!==c&&C!==l&&(j+=1,S.test(L.charAt(j)))){for(;S.test(L.charAt(j+1));)j+=1;L.charCodeAt(j+1)===s&&(j+=1)}T=["word",L.slice(O,j+1),O,j],O=j;break;default:C===r&&L.charCodeAt(O+1)===b?(j=L.indexOf("*/",O+2)+1,0===j&&(A||w?j=L.length:F("comment")),T=["comment",L.slice(O,j+1),O,j],O=j):(x.lastIndex=O+1,x.test(L),j=0===x.lastIndex?L.length-1:x.lastIndex-2,T=["word",L.slice(O,j+1),O,j],z.push(T),O=j)}return O++,T},position:function(){return O}}}},3122:e=>{"use strict";let t={};e.exports=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}},5776:e=>{"use strict";class t{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}e.exports=t,t.default=t},628:(e,t,n)=>{"use strict";var o=n(4067);function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,i,s){if(s!==o){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,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:r};return n.PropTypes=n,n}},5826:(e,t,n)=>{e.exports=n(628)()},4067:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},4462: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)}),i=this&&this.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},s=this&&this.__rest||function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&(n[o[r]]=e[o[r]])}return n};t.__esModule=!0;var l=n(1609),a=n(5826),c=n(4306),u=n(461),d="autosize:resized",p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={lineHeight:null},t.textarea=null,t.onResize=function(e){t.props.onResize&&t.props.onResize(e)},t.updateLineHeight=function(){t.textarea&&t.setState({lineHeight:u(t.textarea)})},t.onChange=function(e){var n=t.props.onChange;t.currentValue=e.currentTarget.value,n&&n(e)},t}return r(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.maxRows,o=t.async;"number"==typeof n&&this.updateLineHeight(),"number"==typeof n||o?setTimeout((function(){return e.textarea&&c(e.textarea)})):this.textarea&&c(this.textarea),this.textarea&&this.textarea.addEventListener(d,this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener(d,this.onResize),c.destroy(this.textarea))},t.prototype.render=function(){var e=this,t=this.props,n=(t.onResize,t.maxRows),o=(t.onChange,t.style),r=(t.innerRef,t.children),a=s(t,["onResize","maxRows","onChange","style","innerRef","children"]),c=this.state.lineHeight,u=n&&c?c*n:null;return l.createElement("textarea",i({},a,{onChange:this.onChange,style:u?i({},o,{maxHeight:u}):o,ref:function(t){e.textarea=t,"function"==typeof e.props.innerRef?e.props.innerRef(t):e.props.innerRef&&(e.props.innerRef.current=t)}}),r)},t.prototype.componentDidUpdate=function(){this.textarea&&c.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:a.number,maxRows:a.number,onResize:a.func,innerRef:a.any,async:a.bool},t}(l.Component);t.TextareaAutosize=l.forwardRef((function(e,t){return l.createElement(p,i({},e,{innerRef:t}))}))},4132:(e,t,n)=>{"use strict";var o=n(4462);t.A=o.TextareaAutosize},9681:e=>{var t={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ả:"A",Ạ:"A",Ẩ:"A",Ẫ:"A",Ậ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ẻ:"E",Ẽ:"E",Ẹ:"E",Ể:"E",Ễ:"E",Ệ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ỉ:"I",Ị:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ỏ:"O",Ọ:"O",Ổ:"O",Ỗ:"O",Ộ:"O",Ờ:"O",Ở:"O",Ỡ:"O",Ớ:"O",Ợ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ủ:"U",Ụ:"U",Ử:"U",Ữ:"U",Ự:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ả:"a",ạ:"a",ẩ:"a",ẫ:"a",ậ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ẻ:"e",ẽ:"e",ẹ:"e",ể:"e",ễ:"e",ệ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ỉ:"i",ị:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ỏ:"o",ọ:"o",ổ:"o",ỗ:"o",ộ:"o",ờ:"o",ở:"o",ỡ:"o",ớ:"o",ợ:"o",ù:"u",ú:"u",û:"u",ü:"u",ủ:"u",ụ:"u",ử:"u",ữ:"u",ự:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z",й:"и",Й:"И",ё:"е",Ё:"Е"},n=Object.keys(t).join("|"),o=new RegExp(n,"g"),r=new RegExp(n,"");function i(e){return t[e]}var s=function(e){return e.replace(o,i)};e.exports=s,e.exports.has=function(e){return!!e.match(r)},e.exports.remove=s},1609:e=>{"use strict";e.exports=window.React},9746:()=>{},9977:()=>{},197:()=>{},1866:()=>{},2739:()=>{},5042:e=>{e.exports={nanoid:(e=21)=>{let t="",n=e;for(;n--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(n=t)=>{let o="",r=n;for(;r--;)o+=e[Math.random()*e.length|0];return o}}}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o].call(i.exports,i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};(()=>{"use strict";n.r(o),n.d(o,{AlignmentControl:()=>Hh,AlignmentToolbar:()=>Gh,Autocomplete:()=>pB,BlockAlignmentControl:()=>Fl,BlockAlignmentToolbar:()=>Hl,BlockBreadcrumb:()=>_B,BlockCanvas:()=>Uj,BlockColorsStyleSelector:()=>qj,BlockContextProvider:()=>nb,BlockControls:()=>us,BlockEdit:()=>db,BlockEditorKeyboardShortcuts:()=>Qf,BlockEditorProvider:()=>eb,BlockFormatControls:()=>cs,BlockIcon:()=>Uf,BlockInspector:()=>zP,BlockList:()=>ry,BlockMover:()=>DB,BlockNavigationDropdown:()=>ME,BlockPopover:()=>Jg,BlockPreview:()=>sS,BlockSelectionClearer:()=>jx,BlockSettingsMenu:()=>sj,BlockSettingsMenuControls:()=>ej,BlockStyles:()=>NE,BlockTitle:()=>kB,BlockToolbar:()=>Ij,BlockTools:()=>Nj,BlockVerticalAlignmentControl:()=>Ys,BlockVerticalAlignmentToolbar:()=>Xs,ButtonBlockAppender:()=>rC,ButtonBlockerAppender:()=>oC,ColorPalette:()=>oT,ColorPaletteControl:()=>rT,ContrastChecker:()=>hp,CopyHandler:()=>FP,DefaultBlockAppender:()=>fx,FontSizePicker:()=>eB,HeadingLevelDropdown:()=>zE,HeightControl:()=>fg,InnerBlocks:()=>Zx,Inserter:()=>tC,InspectorAdvancedControls:()=>ga,InspectorControls:()=>ma,JustifyContentControl:()=>el,JustifyToolbar:()=>tl,LineHeightControl:()=>zp,MediaPlaceholder:()=>lM,MediaReplaceFlow:()=>Nc,MediaUpload:()=>Sa,MediaUploadCheck:()=>wa,MultiSelectScrollIntoView:()=>UP,NavigableToolbar:()=>vj,ObserveTyping:()=>Qx,PanelColorSettings:()=>aM,PlainText:()=>FM,RecursionProvider:()=>QP,RichText:()=>OM,RichTextShortcut:()=>$M,RichTextToolbarButton:()=>UM,SETTINGS_DEFAULTS:()=>I,SkipToSelectedBlock:()=>aP,ToolSelector:()=>ZM,Typewriter:()=>YP,URLInput:()=>La,URLInputButton:()=>QM,URLPopover:()=>oM,Warning:()=>ab,WritingFlow:()=>Iy,__experimentalBlockAlignmentMatrixControl:()=>fB,__experimentalBlockFullHeightAligmentControl:()=>gB,__experimentalBlockPatternSetup:()=>XE,__experimentalBlockPatternsList:()=>NS,__experimentalBlockVariationPicker:()=>FE,__experimentalBlockVariationTransforms:()=>tT,__experimentalBorderRadiusControl:()=>ad,__experimentalColorGradientControl:()=>Xd,__experimentalColorGradientSettingsDropdown:()=>pT,__experimentalDateFormatPicker:()=>lT,__experimentalDuotoneControl:()=>Cm,__experimentalFontAppearanceControl:()=>Dp,__experimentalFontFamilyControl:()=>Lp,__experimentalGetBorderClassesAndStyles:()=>DC,__experimentalGetColorClassesAndStyles:()=>VC,__experimentalGetElementClassName:()=>sR,__experimentalGetGapCSSValue:()=>Fs,__experimentalGetGradientClass:()=>Fd,__experimentalGetGradientObjectByGradientValue:()=>Gd,__experimentalGetShadowClassesAndStyles:()=>zC,__experimentalGetSpacingClassesAndStyles:()=>HC,__experimentalImageEditor:()=>YT,__experimentalImageSizeControl:()=>JT,__experimentalImageURLInputUI:()=>iP,__experimentalInspectorPopoverHeader:()=>nR,__experimentalLetterSpacingControl:()=>Vp,__experimentalLibrary:()=>$P,__experimentalLinkControl:()=>Mc,__experimentalLinkControlSearchInput:()=>pc,__experimentalLinkControlSearchItem:()=>Xa,__experimentalLinkControlSearchResults:()=>rc,__experimentalListView:()=>EE,__experimentalPanelColorGradientSettings:()=>fT,__experimentalPreviewOptions:()=>sP,__experimentalPublishDateTimePicker:()=>rR,__experimentalRecursionProvider:()=>eR,__experimentalResponsiveBlockControl:()=>GM,__experimentalSpacingSizesControl:()=>gg,__experimentalTextDecorationControl:()=>oh,__experimentalTextTransformControl:()=>Jp,__experimentalUnitControl:()=>qM,__experimentalUseBlockOverlayActive:()=>xB,__experimentalUseBlockPreview:()=>lS,__experimentalUseBorderProps:()=>OC,__experimentalUseColorProps:()=>FC,__experimentalUseCustomSides:()=>pm,__experimentalUseGradient:()=>Ud,__experimentalUseHasRecursion:()=>tR,__experimentalUseMultipleOriginColorsAndGradients:()=>Zu,__experimentalUseResizeCanvas:()=>lP,__experimentalWritingModeControl:()=>lh,__unstableBlockNameContext:()=>mj,__unstableBlockSettingsMenuFirstItem:()=>NI,__unstableBlockToolbarLastItem:()=>fI,__unstableEditorStyles:()=>Jy,__unstableIframe:()=>Py,__unstableInserterMenuExtension:()=>Fw,__unstableRichTextInputEvent:()=>WM,__unstableUseBlockSelectionClearer:()=>Ix,__unstableUseClipboardHandler:()=>VP,__unstableUseMouseMoveTypingReset:()=>Yx,__unstableUseTypewriter:()=>qP,__unstableUseTypingObserver:()=>Xx,createCustomColorsHOC:()=>QC,getColorClassName:()=>Ku,getColorObjectByAttributeValues:()=>Uu,getColorObjectByColorValue:()=>Wu,getComputedFluidTypographyValue:()=>ki,getCustomValueFromPreset:()=>As,getFontSize:()=>Ph,getFontSizeClass:()=>Nh,getFontSizeObjectByValue:()=>Rh,getGradientSlugByValue:()=>$d,getGradientValueBySlug:()=>Hd,getPxFromCssUnit:()=>lR,getSpacingPresetCssVar:()=>Os,getTypographyClassesAndStyles:()=>$C,isValueSpacingPreset:()=>Ls,privateApis:()=>oL,store:()=>li,storeConfig:()=>si,transformStyles:()=>Xy,useBlockBindingsUtils:()=>CC,useBlockCommands:()=>Hj,useBlockDisplayInformation:()=>Um,useBlockEditContext:()=>_,useBlockEditingMode:()=>Gl,useBlockProps:()=>ax,useCachedTruthy:()=>UC,useHasRecursion:()=>JP,useInnerBlocksProps:()=>Kx,useSetting:()=>ui,useSettings:()=>ci,useStyleOverride:()=>Ji,withColorContext:()=>nT,withColors:()=>JC,withFontSizes:()=>oB});var e={};n.r(e),n.d(e,{getAllPatterns:()=>Fe,getBlockRemovalRules:()=>Re,getBlockSettings:()=>Ce,getBlockStyles:()=>Xe,getBlockWithoutAttributes:()=>je,getContentLockingParent:()=>Ze,getEnabledBlockParents:()=>Me,getEnabledClientIdsTree:()=>Te,getExpandedBlock:()=>Ke,getInserterMediaCategories:()=>De,getLastFocus:()=>Ue,getLastInsertedBlocksClientIds:()=>Ie,getOpenedBlockSettingsMenu:()=>Ne,getParentSectionBlock:()=>nt,getPatternBySlug:()=>Ve,getRegisteredInserterMediaCategories:()=>Ae,getRemovalPromptData:()=>Pe,getReusableBlocks:()=>$e,getSectionRootClientId:()=>Je,getStyleOverrides:()=>Le,getTemporarilyEditingAsBlocks:()=>qe,getTemporarilyEditingFocusModeToRevert:()=>Ye,getZoomLevel:()=>et,hasAllowedPatterns:()=>Oe,isBlockInterfaceHidden:()=>Be,isBlockSubtreeDisabled:()=>Ee,isDragging:()=>We,isResolvingPatterns:()=>He,isSectionBlock:()=>ot,isZoomOut:()=>tt,isZoomOutMode:()=>Qe});var t={};n.r(t),n.d(t,{__experimentalGetActiveBlockIdByBlockNames:()=>uo,__experimentalGetAllowedBlocks:()=>Vn,__experimentalGetAllowedPatterns:()=>Kn,__experimentalGetBlockListSettingsForBlocks:()=>eo,__experimentalGetDirectInsertBlock:()=>Hn,__experimentalGetGlobalBlocksByName:()=>vt,__experimentalGetLastBlockAttributeChanges:()=>oo,__experimentalGetParsedPattern:()=>Gn,__experimentalGetPatternTransformItems:()=>Yn,__experimentalGetPatternsByBlockTypes:()=>qn,__experimentalGetReusableBlockTitle:()=>to,__unstableGetBlockWithoutInnerBlocks:()=>dt,__unstableGetClientIdWithClientIdsTree:()=>ht,__unstableGetClientIdsTree:()=>gt,__unstableGetContentLockingParent:()=>xo,__unstableGetEditorMode:()=>io,__unstableGetSelectedBlocksWithPartialSelection:()=>en,__unstableGetTemporarilyEditingAsBlocks:()=>yo,__unstableGetTemporarilyEditingFocusModeToRevert:()=>So,__unstableGetVisibleBlocks:()=>mo,__unstableHasActiveBlockOverlayActive:()=>fo,__unstableIsFullySelected:()=>Yt,__unstableIsLastBlockChangeIgnored:()=>no,__unstableIsSelectionCollapsed:()=>Xt,__unstableIsSelectionMergeable:()=>Jt,__unstableIsWithinBlockOverlay:()=>bo,__unstableSelectionHasUnmergeableBlock:()=>Qt,areInnerBlocksControlled:()=>co,canEditBlock:()=>Tn,canInsertBlockType:()=>wn,canInsertBlocks:()=>Cn,canLockBlockType:()=>Mn,canMoveBlock:()=>jn,canMoveBlocks:()=>En,canRemoveBlock:()=>Bn,canRemoveBlocks:()=>In,didAutomaticChange:()=>lo,getAdjacentBlockClientId:()=>At,getAllowedBlocks:()=>zn,getBlock:()=>ut,getBlockAttributes:()=>ct,getBlockCount:()=>yt,getBlockEditingMode:()=>ko,getBlockHierarchyRootClientId:()=>Nt,getBlockIndex:()=>nn,getBlockInsertionPoint:()=>kn,getBlockListSettings:()=>Xn,getBlockMode:()=>dn,getBlockName:()=>lt,getBlockNamesByClientId:()=>xt,getBlockOrder:()=>tn,getBlockParents:()=>Pt,getBlockParentsByBlockName:()=>Rt,getBlockRootClientId:()=>Mt,getBlockSelectionEnd:()=>Bt,getBlockSelectionStart:()=>Ct,getBlockTransformItems:()=>Dn,getBlocks:()=>pt,getBlocksByClientId:()=>_t,getBlocksByName:()=>kt,getClientIdsOfDescendants:()=>mt,getClientIdsWithDescendants:()=>ft,getDirectInsertBlock:()=>Fn,getDraggedBlockClientIds:()=>gn,getFirstMultiSelectedBlockClientId:()=>Gt,getGlobalBlockCount:()=>bt,getHoveredBlockClientId:()=>go,getInserterItems:()=>An,getLastMultiSelectedBlockClientId:()=>$t,getLowestCommonAncestorWithSelectedBlock:()=>Lt,getMultiSelectedBlockClientIds:()=>Ft,getMultiSelectedBlocks:()=>Ht,getMultiSelectedBlocksEndClientId:()=>qt,getMultiSelectedBlocksStartClientId:()=>Zt,getNextBlockClientId:()=>Ot,getPatternsByBlockTypes:()=>Zn,getPreviousBlockClientId:()=>Dt,getSelectedBlock:()=>Tt,getSelectedBlockClientId:()=>Et,getSelectedBlockClientIds:()=>Vt,getSelectedBlockCount:()=>It,getSelectedBlocksInitialCaretPosition:()=>zt,getSelectionEnd:()=>wt,getSelectionStart:()=>St,getSettings:()=>Qn,getTemplate:()=>xn,getTemplateLock:()=>yn,hasBlockMovingClientId:()=>so,hasDraggedInnerBlock:()=>sn,hasInserterItems:()=>On,hasMultiSelection:()=>an,hasSelectedBlock:()=>jt,hasSelectedInnerBlock:()=>rn,isAncestorBeingDragged:()=>fn,isAncestorMultiSelected:()=>Kt,isBlockBeingDragged:()=>mn,isBlockHighlighted:()=>ao,isBlockInsertionPointVisible:()=>vn,isBlockMultiSelected:()=>Wt,isBlockSelected:()=>on,isBlockValid:()=>at,isBlockVisible:()=>ho,isBlockWithinSelection:()=>ln,isCaretWithinFormattedText:()=>bn,isDraggingBlocks:()=>hn,isFirstMultiSelectedBlock:()=>Ut,isGroupable:()=>_o,isLastBlockChangePersistent:()=>Jn,isMultiSelecting:()=>cn,isNavigationMode:()=>ro,isSelectionEnabled:()=>un,isTyping:()=>pn,isUngroupable:()=>vo,isValidTemplate:()=>_n,wasBlockJustInserted:()=>po});var r={};n.r(r),n.d(r,{__experimentalUpdateSettings:()=>Co,clearBlockRemovalPrompt:()=>Mo,deleteStyleOverride:()=>Lo,ensureDefaultBlock:()=>Eo,expandBlock:()=>Vo,hideBlockInterface:()=>Bo,modifyContentLockBlock:()=>Fo,privateRemoveBlocks:()=>jo,resetZoomLevel:()=>Go,setBlockRemovalRules:()=>Po,setLastFocus:()=>Ao,setOpenedBlockSettingsMenu:()=>Ro,setStyleOverride:()=>No,setZoomLevel:()=>Ho,showBlockInterface:()=>Io,startDragging:()=>Oo,stopDragging:()=>zo,stopEditingAsBlocks:()=>Do});var i={};n.r(i),n.d(i,{__unstableDeleteSelection:()=>wr,__unstableExpandSelection:()=>Br,__unstableMarkAutomaticChange:()=>Ur,__unstableMarkLastChangeAsPersistent:()=>Gr,__unstableMarkNextChangeAsNotPersistent:()=>$r,__unstableSaveReusableBlock:()=>Hr,__unstableSetEditorMode:()=>Kr,__unstableSetTemporarilyEditingAsBlocks:()=>ni,__unstableSplitSelection:()=>Cr,clearSelectedBlock:()=>cr,duplicateBlocks:()=>qr,enterFormattedText:()=>Ar,exitFormattedText:()=>Dr,flashBlock:()=>Jr,hideInsertionPoint:()=>xr,hoverBlock:()=>or,insertAfterBlock:()=>Xr,insertBeforeBlock:()=>Yr,insertBlock:()=>kr,insertBlocks:()=>vr,insertDefaultBlock:()=>zr,mergeBlocks:()=>Ir,moveBlockToPosition:()=>br,moveBlocksDown:()=>gr,moveBlocksToPosition:()=>fr,moveBlocksUp:()=>mr,multiSelect:()=>ar,receiveBlocks:()=>Jo,registerInserterMediaCategory:()=>oi,removeBlock:()=>Er,removeBlocks:()=>jr,replaceBlock:()=>pr,replaceBlocks:()=>dr,replaceInnerBlocks:()=>Tr,resetBlocks:()=>Yo,resetSelection:()=>Qo,selectBlock:()=>nr,selectNextBlock:()=>ir,selectPreviousBlock:()=>rr,selectionChange:()=>Or,setBlockEditingMode:()=>ri,setBlockMovingClientId:()=>Zr,setBlockVisibility:()=>ti,setHasControlledInnerBlocks:()=>ei,setNavigationMode:()=>Wr,setTemplateValidity:()=>yr,showInsertionPoint:()=>_r,startDraggingBlocks:()=>Nr,startMultiSelect:()=>sr,startTyping:()=>Pr,stopDraggingBlocks:()=>Lr,stopMultiSelect:()=>lr,stopTyping:()=>Rr,synchronizeTemplate:()=>Sr,toggleBlockHighlight:()=>Qr,toggleBlockMode:()=>Mr,toggleSelection:()=>ur,unsetBlockEditingMode:()=>ii,updateBlock:()=>tr,updateBlockAttributes:()=>er,updateBlockListSettings:()=>Vr,updateSettings:()=>Fr,validateBlocksToTemplate:()=>Xo});var s={};n.r(s),n.d(s,{AdvancedPanel:()=>uR,BackgroundPanel:()=>Yc,BorderPanel:()=>Bd,ColorPanel:()=>pp,DimensionsPanel:()=>Og,FiltersPanel:()=>Om,GlobalStylesContext:()=>Oi,ImageSettingsPanel:()=>cR,TypographyPanel:()=>Sh,areGlobalStyleConfigsEqual:()=>Ai,getBlockCSSSelector:()=>Em,getBlockSelectors:()=>bf,getGlobalStylesChanges:()=>kR,getLayoutStyles:()=>cf,toStyles:()=>mf,useGlobalSetting:()=>Hi,useGlobalStyle:()=>Gi,useGlobalStylesOutput:()=>_f,useGlobalStylesOutputWithConfig:()=>vf,useGlobalStylesReset:()=>Fi,useHasBackgroundPanel:()=>Kc,useHasBorderPanel:()=>bd,useHasBorderPanelControls:()=>kd,useHasColorPanel:()=>Qd,useHasDimensionsPanel:()=>Cg,useHasFiltersPanel:()=>Pm,useHasImageSettingsPanel:()=>aR,useHasTypographyPanel:()=>uh,useSettingsForBlockElement:()=>$i});const l=window.wp.blocks,a=window.wp.element,c=window.wp.data,u=window.wp.compose,d=window.wp.hooks,p=Symbol("mayDisplayControls"),h=Symbol("mayDisplayParentControls"),g=Symbol("blockEditingMode"),m=Symbol("blockBindings"),f=Symbol("isPreviewMode"),b={name:"",isSelected:!1},k=(0,a.createContext)(b),{Provider:v}=k;function _(){return(0,a.useContext)(k)}const x=window.wp.deprecated;var y=n.n(x),S=n(7734),w=n.n(S);const C=window.wp.i18n,B={insertUsage:{}},I={alignWide:!1,supportsLayout:!0,colors:[{name:(0,C.__)("Black"),slug:"black",color:"#000000"},{name:(0,C.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:(0,C.__)("White"),slug:"white",color:"#ffffff"},{name:(0,C.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:(0,C.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:(0,C.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:(0,C.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:(0,C.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:(0,C.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:(0,C.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:(0,C.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:(0,C.__)("Vivid purple"),slug:"vivid-purple",color:"#9b51e0"}],fontSizes:[{name:(0,C._x)("Small","font size name"),size:13,slug:"small"},{name:(0,C._x)("Normal","font size name"),size:16,slug:"normal"},{name:(0,C._x)("Medium","font size name"),size:20,slug:"medium"},{name:(0,C._x)("Large","font size name"),size:36,slug:"large"},{name:(0,C._x)("Huge","font size name"),size:42,slug:"huge"}],imageDefaultSize:"large",imageSizes:[{slug:"thumbnail",name:(0,C.__)("Thumbnail")},{slug:"medium",name:(0,C.__)("Medium")},{slug:"large",name:(0,C.__)("Large")},{slug:"full",name:(0,C.__)("Full Size")}],imageEditing:!0,maxWidth:580,allowedBlockTypes:!0,maxUploadFileSize:0,allowedMimeTypes:null,canLockBlocks:!0,enableOpenverseMediaCategory:!0,clearBlockSelection:!0,__experimentalCanUserUseUnfilteredHTML:!1,__experimentalBlockDirectory:!1,__mobileEnablePageTemplates:!1,__experimentalBlockPatterns:[],__experimentalBlockPatternCategories:[],__unstableIsPreviewMode:!1,blockInspectorAnimation:{animationParent:"core/navigation","core/navigation":{enterDirection:"leftToRight"},"core/navigation-submenu":{enterDirection:"rightToLeft"},"core/navigation-link":{enterDirection:"rightToLeft"},"core/search":{enterDirection:"rightToLeft"},"core/social-links":{enterDirection:"rightToLeft"},"core/page-list":{enterDirection:"rightToLeft"},"core/spacer":{enterDirection:"rightToLeft"},"core/home-link":{enterDirection:"rightToLeft"},"core/site-title":{enterDirection:"rightToLeft"},"core/site-logo":{enterDirection:"rightToLeft"}},generateAnchors:!1,gradients:[{name:(0,C.__)("Vivid cyan blue to vivid purple"),gradient:"linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)",slug:"vivid-cyan-blue-to-vivid-purple"},{name:(0,C.__)("Light green cyan to vivid green cyan"),gradient:"linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%)",slug:"light-green-cyan-to-vivid-green-cyan"},{name:(0,C.__)("Luminous vivid amber to luminous vivid orange"),gradient:"linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%)",slug:"luminous-vivid-amber-to-luminous-vivid-orange"},{name:(0,C.__)("Luminous vivid orange to vivid red"),gradient:"linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%)",slug:"luminous-vivid-orange-to-vivid-red"},{name:(0,C.__)("Very light gray to cyan bluish gray"),gradient:"linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%)",slug:"very-light-gray-to-cyan-bluish-gray"},{name:(0,C.__)("Cool to warm spectrum"),gradient:"linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%)",slug:"cool-to-warm-spectrum"},{name:(0,C.__)("Blush light purple"),gradient:"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",slug:"blush-light-purple"},{name:(0,C.__)("Blush bordeaux"),gradient:"linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%)",slug:"blush-bordeaux"},{name:(0,C.__)("Luminous dusk"),gradient:"linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%)",slug:"luminous-dusk"},{name:(0,C.__)("Pale ocean"),gradient:"linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%)",slug:"pale-ocean"},{name:(0,C.__)("Electric grass"),gradient:"linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",slug:"electric-grass"},{name:(0,C.__)("Midnight"),gradient:"linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",slug:"midnight"}],__unstableResolvedAssets:{styles:[],scripts:[]}};function j(e,t,n){return[...e.slice(0,n),...Array.isArray(t)?t:[t],...e.slice(n)]}function E(e,t,n,o=1){const r=[...e];return r.splice(t,o),j(r,e.slice(t,t+o),n)}const T=e=>e;function M(e,t=""){const n=new Map,o=[];return n.set(t,o),e.forEach((e=>{const{clientId:t,innerBlocks:r}=e;o.push(t),M(r,t).forEach(((e,t)=>{n.set(t,e)}))})),n}function P(e,t=""){const n=[],o=[[t,e]];for(;o.length;){const[e,t]=o.shift();t.forEach((({innerBlocks:t,...r})=>{n.push([r.clientId,e]),t?.length&&o.push([r.clientId,t])}))}return n}function R(e,t=T){const n=[],o=[...e];for(;o.length;){const{innerBlocks:e,...r}=o.shift();o.push(...e),n.push([r.clientId,t(r)])}return n}function N(e){return R(e,(e=>{const{attributes:t,...n}=e;return n}))}function L(e){return R(e,(e=>e.attributes))}function A(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&void 0!==t&&"UPDATE_BLOCK_ATTRIBUTES"===t.type&&w()(e.clientIds,t.clientIds)&&function(e,t){return w()(Object.keys(e),Object.keys(t))}(e.attributes,t.attributes)}function D(e,t){const n=e.tree,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.set(e.clientId,{});for(const t of r)n.set(t.clientId,Object.assign(n.get(t.clientId),{...e.byClientId.get(t.clientId),attributes:e.attributes.get(t.clientId),innerBlocks:t.innerBlocks.map((e=>n.get(e.clientId)))}))}function O(e,t,n=!1){const o=e.tree,r=new Set([]),i=new Set;for(const o of t){let t=n?o:e.parents.get(o);do{if(e.controlledInnerBlocks[t]){i.add(t);break}r.add(t),t=e.parents.get(t)}while(void 0!==t)}for(const e of r)o.set(e,{...o.get(e)});for(const t of r)o.get(t).innerBlocks=(e.order.get(t)||[]).map((e=>o.get(e)));for(const t of i)o.set("controlled||"+t,{innerBlocks:(e.order.get(t)||[]).map((e=>o.get(e)))})}const z=(0,u.pipe)(c.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=new Map(t.attributes),t.attributes.forEach(((n,r)=>{const{name:i}=t.byClientId.get(r);"core/block"===i&&n.ref===e&&t.attributes.set(r,{...n,ref:o})}))}return e(t,n)}),(e=>(t={},n)=>{const o=e(t,n);if(o===t)return t;switch(o.tree=t.tree?t.tree:new Map,n.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":o.tree=new Map(o.tree),D(o,n.blocks),O(o,n.rootClientId?[n.rootClientId]:[""],!0);break;case"UPDATE_BLOCK":o.tree=new Map(o.tree),o.tree.set(n.clientId,{...o.tree.get(n.clientId),...o.byClientId.get(n.clientId),attributes:o.attributes.get(n.clientId)}),O(o,[n.clientId],!1);break;case"SYNC_DERIVED_BLOCK_ATTRIBUTES":case"UPDATE_BLOCK_ATTRIBUTES":o.tree=new Map(o.tree),n.clientIds.forEach((e=>{o.tree.set(e,{...o.tree.get(e),attributes:o.attributes.get(e)})})),O(o,n.clientIds,!1);break;case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const e=function(e){const t={},n=[...e];for(;n.length;){const{innerBlocks:e,...o}=n.shift();n.push(...e),t[o.clientId]=!0}return t}(n.blocks);o.tree=new Map(o.tree),n.replacedClientIds.forEach((t=>{o.tree.delete(t),e[t]||o.tree.delete("controlled||"+t)})),D(o,n.blocks),O(o,n.blocks.map((e=>e.clientId)),!1);const r=[];for(const e of n.clientIds){const n=t.parents.get(e);void 0===n||""!==n&&!o.byClientId.get(n)||r.push(n)}O(o,r,!0);break}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":const e=[];for(const r of n.clientIds){const n=t.parents.get(r);void 0===n||""!==n&&!o.byClientId.get(n)||e.push(n)}o.tree=new Map(o.tree),n.removedClientIds.forEach((e=>{o.tree.delete(e),o.tree.delete("controlled||"+e)})),O(o,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=new Map(o.tree),O(o,e,!0);break}case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":{const e=[n.rootClientId?n.rootClientId:""];o.tree=new Map(o.tree),O(o,e,!0);break}case"SAVE_REUSABLE_BLOCK_SUCCESS":{const e=[];o.attributes.forEach(((t,r)=>{"core/block"===o.byClientId.get(r).name&&t.ref===n.updatedId&&e.push(r)})),o.tree=new Map(o.tree),e.forEach((e=>{o.tree.set(e,{...o.byClientId.get(e),attributes:o.attributes.get(e),innerBlocks:o.tree.get(e).innerBlocks})})),O(o,e,!1)}}return o}),(e=>(t,n)=>{const o=e=>{let o=e;for(let r=0;r<o.length;r++)!t.order.get(o[r])||n.keepControlledInnerBlocks&&n.keepControlledInnerBlocks[o[r]]||(o===e&&(o=[...o]),o.push(...t.order.get(o[r])));return o};if(t)switch(n.type){case"REMOVE_BLOCKS":n={...n,type:"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN",removedClientIds:o(n.clientIds)};break;case"REPLACE_BLOCKS":n={...n,type:"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN",replacedClientIds:o(n.clientIds)}}return e(t,n)}),(e=>(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.get(n.rootClientId)&&(r=e(r,{type:"REMOVE_BLOCKS",keepControlledInnerBlocks:o,clientIds:t.order.get(n.rootClientId)}));let i=r;if(n.blocks.length){i=e(i,{...n,type:"INSERT_BLOCKS",index:0});const r=new Map(i.order);Object.keys(o).forEach((e=>{t.order.get(e)&&r.set(e,t.order.get(e))})),i.order=r,i.tree=new Map(i.tree),Object.keys(o).forEach((e=>{const n=`controlled||${e}`;t.tree.has(n)&&i.tree.set(n,t.tree.get(n))}))}return i}),(e=>(t,n)=>{if("RESET_BLOCKS"===n.type){const e={...t,byClientId:new Map(N(n.blocks)),attributes:new Map(L(n.blocks)),order:M(n.blocks),parents:new Map(P(n.blocks)),controlledInnerBlocks:{}};return e.tree=new Map(t?.tree),D(e,n.blocks),e.tree.set("",{innerBlocks:n.blocks.map((t=>e.tree.get(t.clientId)))}),e}return e(t,n)}),(function(e){let t,n,o=!1;return(r,i)=>{let s,l=e(r,i);var a;"SET_EXPLICIT_PERSISTENT"===i.type&&(n=i.isPersistentChange,s=null===(a=r.isPersistentChange)||void 0===a||a);if(void 0!==n)return s=n,s===l.isPersistentChange?l:{...l,isPersistentChange:s};const c="MARK_LAST_CHANGE_AS_PERSISTENT"===i.type||o;var u;return r!==l||c?(l={...l,isPersistentChange:c?!o:!A(i,t)},t=i,o="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===i.type,l):(o="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===i.type,s=null===(u=r?.isPersistentChange)||void 0===u||u,r.isPersistentChange===s?r:{...l,isPersistentChange:s})}}),(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(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{const n=new Map(e);return N(t.blocks).forEach((([e,t])=>{n.set(e,t)})),n}case"UPDATE_BLOCK":{if(!e.has(t.clientId))return e;const{attributes:n,...o}=t.updates;if(0===Object.values(o).length)return e;const r=new Map(e);return r.set(t.clientId,{...e.get(t.clientId),...o}),r}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{if(!t.blocks)return e;const n=new Map(e);return t.replacedClientIds.forEach((e=>{n.delete(e)})),N(t.blocks).forEach((([e,t])=>{n.set(e,t)})),n}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n}}return e},attributes(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{const n=new Map(e);return L(t.blocks).forEach((([e,t])=>{n.set(e,t)})),n}case"UPDATE_BLOCK":{if(!e.get(t.clientId)||!t.updates.attributes)return e;const n=new Map(e);return n.set(t.clientId,{...e.get(t.clientId),...t.updates.attributes}),n}case"SYNC_DERIVED_BLOCK_ATTRIBUTES":case"UPDATE_BLOCK_ATTRIBUTES":{if(t.clientIds.every((t=>!e.get(t))))return e;let o=!1;const r=new Map(e);for(const i of t.clientIds){var n;const s=Object.entries(t.uniqueByBlock?t.attributes[i]:null!==(n=t.attributes)&&void 0!==n?n:{});if(0===s.length)continue;let l=!1;const a=e.get(i),c={};s.forEach((([e,t])=>{a[e]!==t&&(l=!0,c[e]=t)})),o=o||l,l&&r.set(i,{...a,...c})}return o?r:e}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{if(!t.blocks)return e;const n=new Map(e);return t.replacedClientIds.forEach((e=>{n.delete(e)})),L(t.blocks).forEach((([e,t])=>{n.set(e,t)})),n}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n}}return e},order(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":{var n;const o=M(t.blocks),r=new Map(e);return o.forEach(((e,t)=>{""!==t&&r.set(t,e)})),r.set("",(null!==(n=e.get(""))&&void 0!==n?n:[]).concat(o[""])),r}case"INSERT_BLOCKS":{const{rootClientId:n=""}=t,o=e.get(n)||[],r=M(t.blocks,n),{index:i=o.length}=t,s=new Map(e);return r.forEach(((e,t)=>{s.set(t,e)})),s.set(n,j(o,r.get(n),i)),s}case"MOVE_BLOCKS_TO_POSITION":{var o;const{fromRootClientId:n="",toRootClientId:r="",clientIds:i}=t,{index:s=e.get(r).length}=t;if(n===r){const t=e.get(r).indexOf(i[0]),n=new Map(e);return n.set(r,E(e.get(r),t,s,i.length)),n}const l=new Map(e);return l.set(n,null!==(o=e.get(n)?.filter((e=>!i.includes(e))))&&void 0!==o?o:[]),l.set(r,j(e.get(r),i,s)),l}case"MOVE_BLOCKS_UP":{const{clientIds:n,rootClientId:o=""}=t,r=n[0],i=e.get(o);if(!i.length||r===i[0])return e;const s=i.indexOf(r),l=new Map(e);return l.set(o,E(i,s,s-1,n.length)),l}case"MOVE_BLOCKS_DOWN":{const{clientIds:n,rootClientId:o=""}=t,r=n[0],i=n[n.length-1],s=e.get(o);if(!s.length||i===s[s.length-1])return e;const l=s.indexOf(r),a=new Map(e);return a.set(o,E(s,l,l+1,n.length)),a}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const{clientIds:n}=t;if(!t.blocks)return e;const o=M(t.blocks),r=new Map(e);return t.replacedClientIds.forEach((e=>{r.delete(e)})),o.forEach(((e,t)=>{""!==t&&r.set(t,e)})),r.forEach(((e,t)=>{const i=Object.values(e).reduce(((e,t)=>t===n[0]?[...e,...o.get("")]:(-1===n.indexOf(t)&&e.push(t),e)),[]);r.set(t,i)})),r}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n.forEach(((e,o)=>{var r;const i=null!==(r=e?.filter((e=>!t.removedClientIds.includes(e))))&&void 0!==r?r:[];i.length!==e.length&&n.set(o,i)})),n}}return e},parents(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":{const n=new Map(e);return P(t.blocks).forEach((([e,t])=>{n.set(e,t)})),n}case"INSERT_BLOCKS":{const n=new Map(e);return P(t.blocks,t.rootClientId||"").forEach((([e,t])=>{n.set(e,t)})),n}case"MOVE_BLOCKS_TO_POSITION":{const n=new Map(e);return t.clientIds.forEach((e=>{n.set(e,t.toRootClientId||"")})),n}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.replacedClientIds.forEach((e=>{n.delete(e)})),P(t.blocks,e.get(t.clientIds[0])).forEach((([e,t])=>{n.set(e,t)})),n}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n}}return e},controlledInnerBlocks:(e={},{type:t,clientId:n,hasControlledInnerBlocks:o})=>"SET_HAS_CONTROLLED_INNER_BLOCKS"===t?{...e,[n]:o}:e});function V(e={},t){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}const F=(0,c.combineReducers)({blocks:z,isDragging:function(e=!1,t){switch(t.type){case"START_DRAGGING":return!0;case"STOP_DRAGGING":return!1}return e},isTyping:function(e=!1,t){switch(t.type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e},isBlockInterfaceHidden:function(e=!1,t){switch(t.type){case"HIDE_BLOCK_INTERFACE":return!0;case"SHOW_BLOCK_INTERFACE":return!1}return e},draggedBlocks:function(e=[],t){switch(t.type){case"START_DRAGGING_BLOCKS":return t.clientIds;case"STOP_DRAGGING_BLOCKS":return[]}return e},selection:function(e={},t){switch(t.type){case"SELECTION_CHANGE":return t.clientId?{selectionStart:{clientId:t.clientId,attributeKey:t.attributeKey,offset:t.startOffset},selectionEnd:{clientId:t.clientId,attributeKey:t.attributeKey,offset:t.endOffset}}:{selectionStart:t.start||e.selectionStart,selectionEnd:t.end||e.selectionEnd};case"RESET_SELECTION":const{selectionStart:n,selectionEnd:o}=t;return{selectionStart:n,selectionEnd:o};case"MULTI_SELECT":const{start:r,end:i}=t;return r===e.selectionStart?.clientId&&i===e.selectionEnd?.clientId?e:{selectionStart:{clientId:r},selectionEnd:{clientId:i}};case"RESET_BLOCKS":const s=e?.selectionStart?.clientId,l=e?.selectionEnd?.clientId;if(!s&&!l)return e;if(!t.blocks.some((e=>e.clientId===s)))return{selectionStart:{},selectionEnd:{}};if(!t.blocks.some((e=>e.clientId===l)))return{...e,selectionEnd:e.selectionStart}}const n=V(e.selectionStart,t),o=V(e.selectionEnd,t);return n===e.selectionStart&&o===e.selectionEnd?e:{selectionStart:n,selectionEnd:o}},isMultiSelecting:function(e=!1,t){switch(t.type){case"START_MULTI_SELECT":return!0;case"STOP_MULTI_SELECT":return!1}return e},isSelectionEnabled:function(e=!0,t){return"TOGGLE_SELECTION"===t.type?t.isSelectionEnabled:e},initialPosition:function(e=null,t){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(e={},t){if("TOGGLE_BLOCK_MODE"===t.type){const{clientId:n}=t;return{...e,[n]:e[n]&&"html"===e[n]?"visual":"html"}}return e},blockListSettings:(e={},t)=>{switch(t.type){case"REPLACE_BLOCKS":case"REMOVE_BLOCKS":return Object.fromEntries(Object.entries(e).filter((([e])=>!t.clientIds.includes(e))));case"UPDATE_BLOCK_LIST_SETTINGS":{const n="string"==typeof t.clientId?{[t.clientId]:t.settings}:t.clientId;for(const t in n)n[t]?w()(e[t],n[t])&&delete n[t]:e[t]||delete n[t];if(0===Object.keys(n).length)return e;const o={...e,...n};for(const e in n)n[e]||delete o[e];return o}}return e},insertionPoint:function(e=null,t){switch(t.type){case"SHOW_INSERTION_POINT":{const{rootClientId:n,index:o,__unstableWithInserter:r,operation:i,nearestSide:s}=t,l={rootClientId:n,index:o,__unstableWithInserter:r,operation:i,nearestSide:s};return w()(e,l)?e:l}case"HIDE_INSERTION_POINT":return null}return e},template:function(e={isValid:!0},t){return"SET_TEMPLATE_VALIDITY"===t.type?{...e,isValid:t.isValid}:e},settings:function(e=I,t){return"UPDATE_SETTINGS"===t.type?t.reset?{...I,...t.settings}:{...e,...t.settings}:e},preferences:function(e=B,t){switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":{const n=t.blocks.reduce(((e,n)=>{const{attributes:o,name:r}=n;let i=r;const s=(0,c.select)(l.store).getActiveBlockVariation(r,o);return s?.name&&(i+="/"+s.name),"core/block"===r&&(i+="/"+o.ref),{...e,[i]:{time:t.time,count:e[i]?e[i].count+1:1}}}),e.insertUsage);return{...e,insertUsage:n}}}return e},lastBlockAttributesChange:function(e=null,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 e},lastFocus:function(e=!1,t){return"LAST_FOCUS"===t.type?t.lastFocus:e},editorMode:function(e="edit",t){return"INSERT_BLOCKS"===t.type&&"navigation"===e?"edit":"SET_EDITOR_MODE"===t.type?t.mode:e},hasBlockMovingClientId:function(e=null,t){return"SET_BLOCK_MOVING_MODE"===t.type?t.hasBlockMovingClientId:"SET_EDITOR_MODE"===t.type?null:e},expandedBlock:function(e=null,t){switch(t.type){case"SET_BLOCK_EXPANDED_IN_LIST_VIEW":return t.clientId;case"SELECT_BLOCK":if(t.clientId!==e)return null}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(e={},t){switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":if(!t.blocks.length)return e;const n=t.blocks.map((e=>e.clientId)),o=t.meta?.source;return{clientIds:n,source:o};case"RESET_BLOCKS":return{}}return e},temporarilyEditingAsBlocks:function(e="",t){return"SET_TEMPORARILY_EDITING_AS_BLOCKS"===t.type?t.temporarilyEditingAsBlocks:e},temporarilyEditingFocusModeRevert:function(e="",t){return"SET_TEMPORARILY_EDITING_AS_BLOCKS"===t.type?t.focusModeToRevert:e},blockVisibility:function(e={},t){return"SET_BLOCK_VISIBILITY"===t.type?{...e,...t.updates}:e},blockEditingModes:function(e=new Map,t){switch(t.type){case"SET_BLOCK_EDITING_MODE":return new Map(e).set(t.clientId,t.mode);case"UNSET_BLOCK_EDITING_MODE":{const n=new Map(e);return n.delete(t.clientId),n}case"RESET_BLOCKS":return e.has("")?(new Map).set("",e.get("")):e}return e},styleOverrides:function(e=new Map,t){switch(t.type){case"SET_STYLE_OVERRIDE":return new Map(e).set(t.id,t.style);case"DELETE_STYLE_OVERRIDE":{const n=new Map(e);return n.delete(t.id),n}}return e},removalPromptData:function(e=!1,t){switch(t.type){case"DISPLAY_BLOCK_REMOVAL_PROMPT":const{clientIds:e,selectPrevious:n,message:o}=t;return{clientIds:e,selectPrevious:n,message:o};case"CLEAR_BLOCK_REMOVAL_PROMPT":return!1}return e},blockRemovalRules:function(e=!1,t){return"SET_BLOCK_REMOVAL_RULES"===t.type?t.rules:e},openedBlockSettingsMenu:function(e=null,t){var n;return"SET_OPENED_BLOCK_SETTINGS_MENU"===t.type?null!==(n=t?.clientId)&&void 0!==n?n:null:e},registeredInserterMediaCategories:function(e=[],t){return"REGISTER_INSERTER_MEDIA_CATEGORY"===t.type?[...e,t.category]:e},hoveredBlockClientId:function(e=!1,t){return"HOVER_BLOCK"===t.type?t.clientId:e},zoomLevel:function(e=100,t){switch(t.type){case"SET_ZOOM_LEVEL":return t.zoom;case"RESET_ZOOM_LEVEL":return 100}return e}});const H=function(e){return(t,n)=>{const o=e(t,n);return t?(o.automaticChangeStatus=t.automaticChangeStatus,"MARK_AUTOMATIC_CHANGE"===n.type?{...o,automaticChangeStatus:"pending"}:"MARK_AUTOMATIC_CHANGE_FINAL"===n.type&&"pending"===t.automaticChangeStatus?{...o,automaticChangeStatus:"final"}:o.blocks===t.blocks&&o.selection===t.selection||"final"!==o.automaticChangeStatus&&o.selection!==t.selection?o:{...o,automaticChangeStatus:void 0}):o}}(F),G=window.wp.primitives,$=window.ReactJSXRuntime,U=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})}),W=window.wp.richText,K=window.wp.blockSerializationDefaultParser,Z=Symbol("globalStylesDataKey"),q=Symbol("globalStylesLinks"),Y=Symbol("selectBlockPatternsKey"),X=Symbol("reusableBlocksSelect"),Q=Symbol("sectionRootClientIdKey"),J=window.wp.privateApis,{lock:ee,unlock:te}=(0,J.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/block-editor"),ne="core/block-editor",oe=Symbol("withRootClientId"),re=new WeakMap,ie=new WeakMap;function se(e){let t=re.get(e);return t||(t=function(e){const t=(0,l.parse)(e.content,{__unstableSkipMigrationLogs:!0});return 1===t.length&&(t[0].attributes={...t[0].attributes,metadata:{...t[0].attributes.metadata||{},categories:e.categories,patternName:e.name,name:t[0].attributes.metadata?.name||e.title}}),{...e,blocks:t}}(e),re.set(e,t)),t}function le(e){let t=ie.get(e);return t||(t=(0,K.parse)(e.content),t=t.filter((e=>null!==e.blockName)),ie.set(e,t)),t}const ae=(e,t,n=null)=>"boolean"==typeof e?e:Array.isArray(e)?!(!e.includes("core/post-content")||null!==t)||e.includes(t):n,ce=(e,t)=>{if("boolean"==typeof t)return t;const n=[...e];for(;n.length>0;){const e=n.shift();if(!ae(t,e.name||e.blockName,!0))return!1;e.innerBlocks?.forEach((e=>{n.push(e)}))}return!0},ue=e=>t=>[t.settings.__experimentalBlockPatterns,t.settings.__experimentalUserPatternCategories,t.settings.__experimentalReusableBlocks,t.settings[Y]?.(e),t.blockPatterns,te(e(ne)).getReusableBlocks()];function de(e,t){return[e.blockListSettings[t],e.blocks.byClientId.get(t),e.settings.allowedBlockTypes,e.settings.templateLock,e.blockEditingModes]}const pe=(e,t,n)=>(o,r)=>{let i,s;if("function"==typeof e?(i=e(o),s=e(r)):(i=o[e],s=r[e]),i>s)return"asc"===n?1:-1;if(s>i)return"asc"===n?-1:1;const l=t.findIndex((e=>e===o)),a=t.findIndex((e=>e===r));return l>a?1:a>l?-1:0};function he(e,t,n="asc"){return e.concat().sort(pe(t,e,n))}const ge={user:"user",theme:"theme",directory:"directory"},me={full:"fully",unsynced:"unsynced"},fe={name:"allPatterns",label:(0,C._x)("All","patterns")},be={name:"myPatterns",label:(0,C.__)("My patterns")};function ke(e,t,n){const o=e.name.startsWith("core/block"),r="core"===e.source||e.source?.startsWith("pattern-directory");return!(t!==ge.theme||!o&&!r)||(!(t!==ge.directory||!o&&r)||(t===ge.user&&e.type!==ge.user||(n===me.full&&""!==e.syncStatus||!(n!==me.unsynced||"unsynced"===e.syncStatus||!o))))}function ve(e,t,n){t=Array.isArray(t)?[...t]:[t],e=Array.isArray(e)?[...e]:{...e};const o=t.pop();let r=e;for(const e of t){const t=r[e];r=r[e]=Array.isArray(t)?[...t]:{...t}}return r[o]=n,e}const _e=(e,t,n)=>{var o;const r=Array.isArray(t)?t:t.split(".");let i=e;return r.forEach((e=>{i=i?.[e]})),null!==(o=i)&&void 0!==o?o:n};const xe=["color","border","dimensions","typography","spacing"],ye={"color.palette":e=>e.colors,"color.gradients":e=>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=>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},Se={"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"},we=e=>Se[e]||e;function Ce(e,t,...n){const o=lt(e,t),r=[];if(t){let n=t;do{const t=lt(e,n);(0,l.hasBlockSupport)(t,"__experimentalSettings",!1)&&r.push(n)}while(n=e.blocks.parents.get(n))}return n.map((n=>{if(xe.includes(n))return void console.warn("Top level useSetting paths are disabled. Please use a subpath to query the information needed.");let i=(0,d.applyFilters)("blockEditor.useSetting.before",void 0,n,t,o);if(void 0!==i)return i;const s=we(n);for(const t of r){var a;const n=ct(e,t);if(i=null!==(a=_e(n.settings?.blocks?.[o],s))&&void 0!==a?a:_e(n.settings,s),void 0!==i)break}const c=Qn(e);var u,p;if(void 0===i&&o&&(i=_e(c.__experimentalFeatures?.blocks?.[o],s)),void 0===i&&(i=_e(c.__experimentalFeatures,s)),void 0!==i)return l.__EXPERIMENTAL_PATHS_WITH_OVERRIDE[s]?null!==(u=null!==(p=i.custom)&&void 0!==p?p:i.theme)&&void 0!==u?u:i.default:i;const h=ye[s]?.(c);return void 0!==h?h:"typography.dropCap"===s||void 0}))}function Be(e){return e.isBlockInterfaceHidden}function Ie(e){return e?.lastBlockInserted?.clientIds}function je(e,t){return e.blocks.byClientId.get(t)}const Ee=(e,t)=>{const n=t=>"disabled"===ko(e,t)&&tn(e,t).every(n);return tn(e,t).every(n)};const Te=(0,c.createSelector)((function e(t,n){const o=tn(t,n),r=[];for(const n of o){const o=e(t,n);"disabled"!==ko(t,n)?r.push({clientId:n,innerBlocks:o}):r.push(...o)}return r}),(e=>[e.blocks.order,e.blockEditingModes,e.settings.templateLock,e.blockListSettings,e.editorMode])),Me=(0,c.createSelector)(((e,t,n=!1)=>Pt(e,t,n).filter((t=>"disabled"!==ko(e,t)))),(e=>[e.blocks.parents,e.blockEditingModes,e.settings.templateLock,e.blockListSettings]));function Pe(e){return e.removalPromptData}function Re(e){return e.blockRemovalRules}function Ne(e){return e.openedBlockSettingsMenu}const Le=(0,c.createSelector)((e=>{const t=ft(e).reduce(((e,t,n)=>(e[t]=n,e)),{});return[...e.styleOverrides].sort(((e,n)=>{var o,r;const[,{clientId:i}]=e,[,{clientId:s}]=n;return(null!==(o=t[i])&&void 0!==o?o:-1)-(null!==(r=t[s])&&void 0!==r?r:-1)}))}),(e=>[e.blocks.order,e.styleOverrides]));function Ae(e){return e.registeredInserterMediaCategories}const De=(0,c.createSelector)((e=>{const{settings:{inserterMediaCategories:t,allowedMimeTypes:n,enableOpenverseMediaCategory:o},registeredInserterMediaCategories:r}=e;if(!t&&!r.length||!n)return;const i=t?.map((({name:e})=>e))||[];return[...t||[],...(r||[]).filter((({name:e})=>!i.includes(e)))].filter((e=>!(!o&&"openverse"===e.name)&&Object.values(n).some((t=>t.startsWith(`${e.mediaType}/`)))))}),(e=>[e.settings.inserterMediaCategories,e.settings.allowedMimeTypes,e.settings.enableOpenverseMediaCategory,e.registeredInserterMediaCategories])),Oe=(0,c.createRegistrySelector)((e=>(0,c.createSelector)(((t,n=null)=>{const{getAllPatterns:o}=te(e(ne)),r=o(),{allowedBlockTypes:i}=Qn(t);return r.some((e=>{const{inserter:o=!0}=e;if(!o)return!1;const r=le(e);return ce(r,i)&&r.every((({name:e})=>wn(t,e,n)))}))}),((t,n)=>[...ue(e)(t),...de(t,n)]))));function ze(e,t=[]){return{name:`core/block/${e.id}`,id:e.id,type:ge.user,title:e.title.raw,categories:e.wp_pattern_category.map((e=>{const n=t.find((({id:t})=>t===e));return n?n.slug:e})),content:e.content.raw,syncStatus:e.wp_pattern_sync_status}}const Ve=(0,c.createRegistrySelector)((e=>(0,c.createSelector)(((t,n)=>{var o,r;if(n?.startsWith("core/block/")){const o=parseInt(n.slice(11),10),r=te(e(ne)).getReusableBlocks().find((({id:e})=>e===o));return r?ze(r,t.settings.__experimentalUserPatternCategories):null}return[...null!==(o=t.settings.__experimentalBlockPatterns)&&void 0!==o?o:[],...null!==(r=t.settings[Y]?.(e))&&void 0!==r?r:[]].find((({name:e})=>e===n))}),((t,n)=>n?.startsWith("core/block/")?[te(e(ne)).getReusableBlocks(),t.settings.__experimentalReusableBlocks]:[t.settings.__experimentalBlockPatterns,t.settings[Y]?.(e)])))),Fe=(0,c.createRegistrySelector)((e=>(0,c.createSelector)((t=>{var n,o;return[...te(e(ne)).getReusableBlocks().map((e=>ze(e,t.settings.__experimentalUserPatternCategories))),...null!==(n=t.settings.__experimentalBlockPatterns)&&void 0!==n?n:[],...null!==(o=t.settings[Y]?.(e))&&void 0!==o?o:[]].filter(((e,t,n)=>t===n.findIndex((t=>e.name===t.name))))}),ue(e)))),He=(0,c.createRegistrySelector)((e=>(0,c.createSelector)((t=>{const n=t.settings[Y],o=t.settings[X];return!!n&&void 0===n(e)||!!o&&void 0===o(e)}),ue(e)))),Ge=[],$e=(0,c.createRegistrySelector)((e=>t=>{var n;const o=t.settings[X];return null!==(n=o?o(e):t.settings.__experimentalReusableBlocks)&&void 0!==n?n:Ge}));function Ue(e){return e.lastFocus}function We(e){return e.isDragging}function Ke(e){return e.expandedBlock}const Ze=(0,c.createSelector)(((e,t)=>{let n,o=t;for(;o=e.blocks.parents.get(o);)"core/block"!==lt(e,o)&&"contentOnly"!==yn(e,o)||(n=o);return n}),(e=>[e.blocks.parents,e.blockListSettings]));function qe(e){return e.temporarilyEditingAsBlocks}function Ye(e){return e.temporarilyEditingFocusModeRevert}const Xe=(0,c.createSelector)(((e,t)=>t.reduce(((t,n)=>(t[n]=e.blocks.attributes.get(n)?.style,t)),{})),((e,t)=>[...t.map((t=>e.blocks.attributes.get(t)?.style))]));function Qe(e){return"zoom-out"===io(e)}function Je(e){return e.settings?.[Q]}function et(e){return e.zoomLevel}function tt(e){return et(e)<100}const nt=(e,t)=>{let n,o=t;for(;!n&&(o=e.blocks.parents.get(o));)ot(e,o)&&(n=o);return n};function ot(e,t){const n=tn(e,Je(e));return"core/block"===lt(e,t)||"contentOnly"===yn(e,t)||ro(e)&&n.includes(t)}const rt=[],it=new Set,st={};function lt(e,t){const n=e.blocks.byClientId.get(t),o="core/social-link";if("web"!==a.Platform.OS&&n?.name===o){const n=e.blocks.attributes.get(t),{service:r}=null!=n?n:{};return r?`${o}-${r}`:o}return n?n.name:null}function at(e,t){const n=e.blocks.byClientId.get(t);return!!n&&n.isValid}function ct(e,t){return e.blocks.byClientId.get(t)?e.blocks.attributes.get(t):null}function ut(e,t){return e.blocks.byClientId.has(t)?e.blocks.tree.get(t):null}const dt=(0,c.createSelector)(((e,t)=>{const n=e.blocks.byClientId.get(t);return n?{...n,attributes:ct(e,t)}:null}),((e,t)=>[e.blocks.byClientId.get(t),e.blocks.attributes.get(t)]));function pt(e,t){const n=t&&co(e,t)?"controlled||"+t:t||"";return e.blocks.tree.get(n)?.innerBlocks||rt}const ht=(0,c.createSelector)(((e,t)=>(y()("wp.data.select( 'core/block-editor' ).__unstableGetClientIdWithClientIdsTree",{since:"6.3",version:"6.5"}),{clientId:t,innerBlocks:gt(e,t)})),(e=>[e.blocks.order])),gt=(0,c.createSelector)(((e,t="")=>(y()("wp.data.select( 'core/block-editor' ).__unstableGetClientIdsTree",{since:"6.3",version:"6.5"}),tn(e,t).map((t=>ht(e,t))))),(e=>[e.blocks.order])),mt=(0,c.createSelector)(((e,t)=>{t=Array.isArray(t)?[...t]:[t];const n=[];for(const o of t){const t=e.blocks.order.get(o);t&&n.push(...t)}let o=0;for(;o<n.length;){const t=n[o],r=e.blocks.order.get(t);r&&n.splice(o+1,0,...r),o++}return n}),(e=>[e.blocks.order])),ft=e=>mt(e,""),bt=(0,c.createSelector)(((e,t)=>{const n=ft(e);if(!t)return n.length;let o=0;for(const r of n){e.blocks.byClientId.get(r).name===t&&o++}return o}),(e=>[e.blocks.order,e.blocks.byClientId])),kt=(0,c.createSelector)(((e,t)=>{if(!t)return rt;const n=Array.isArray(t)?t:[t],o=ft(e).filter((t=>{const o=e.blocks.byClientId.get(t);return n.includes(o.name)}));return o.length>0?o:rt}),(e=>[e.blocks.order,e.blocks.byClientId]));function vt(e,t){return y()("wp.data.select( 'core/block-editor' ).__experimentalGetGlobalBlocksByName",{since:"6.5",alternative:"wp.data.select( 'core/block-editor' ).getBlocksByName"}),kt(e,t)}const _t=(0,c.createSelector)(((e,t)=>(Array.isArray(t)?t:[t]).map((t=>ut(e,t)))),((e,t)=>(Array.isArray(t)?t:[t]).map((t=>e.blocks.tree.get(t))))),xt=(0,c.createSelector)(((e,t)=>_t(e,t).filter(Boolean).map((e=>e.name))),((e,t)=>_t(e,t)));function yt(e,t){return tn(e,t).length}function St(e){return e.selection.selectionStart}function wt(e){return e.selection.selectionEnd}function Ct(e){return e.selection.selectionStart.clientId}function Bt(e){return e.selection.selectionEnd.clientId}function It(e){const t=Ft(e).length;return t||(e.selection.selectionStart.clientId?1:0)}function jt(e){const{selectionStart:t,selectionEnd:n}=e.selection;return!!t.clientId&&t.clientId===n.clientId}function Et(e){const{selectionStart:t,selectionEnd:n}=e.selection,{clientId:o}=t;return o&&o===n.clientId?o:null}function Tt(e){const t=Et(e);return t?ut(e,t):null}function Mt(e,t){var n;return null!==(n=e.blocks.parents.get(t))&&void 0!==n?n:null}const Pt=(0,c.createSelector)(((e,t,n=!1)=>{const o=[];let r=t;for(;r=e.blocks.parents.get(r);)o.push(r);return o.length?n?o:o.reverse():rt}),(e=>[e.blocks.parents])),Rt=(0,c.createSelector)(((e,t,n,o=!1)=>{const r=Pt(e,t,o),i=Array.isArray(n)?e=>n.includes(e):e=>n===e;return r.filter((t=>i(lt(e,t))))}),(e=>[e.blocks.parents]));function Nt(e,t){let n,o=t;do{n=o,o=e.blocks.parents.get(o)}while(o);return n}function Lt(e,t){const n=Et(e),o=[...Pt(e,t),t],r=[...Pt(e,n),n];let i;const s=Math.min(o.length,r.length);for(let e=0;e<s&&o[e]===r[e];e++)i=o[e];return i}function At(e,t,n=1){if(void 0===t&&(t=Et(e)),void 0===t&&(t=n<0?Gt(e):$t(e)),!t)return null;const o=Mt(e,t);if(null===o)return null;const{order:r}=e.blocks,i=r.get(o),s=i.indexOf(t)+1*n;return s<0||s===i.length?null:i[s]}function Dt(e,t){return At(e,t,-1)}function Ot(e,t){return At(e,t,1)}function zt(e){return e.initialPosition}const Vt=(0,c.createSelector)((e=>{const{selectionStart:t,selectionEnd:n}=e.selection;if(!t.clientId||!n.clientId)return rt;if(t.clientId===n.clientId)return[t.clientId];const o=Mt(e,t.clientId);if(null===o)return rt;const r=tn(e,o),i=r.indexOf(t.clientId),s=r.indexOf(n.clientId);return i>s?r.slice(s,i+1):r.slice(i,s+1)}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function Ft(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?rt:Vt(e)}const Ht=(0,c.createSelector)((e=>{const t=Ft(e);return t.length?t.map((t=>ut(e,t))):rt}),(e=>[...Vt.getDependants(e),e.blocks.byClientId,e.blocks.order,e.blocks.attributes]));function Gt(e){return Ft(e)[0]||null}function $t(e){const t=Ft(e);return t[t.length-1]||null}function Ut(e,t){return Gt(e)===t}function Wt(e,t){return-1!==Ft(e).indexOf(t)}const Kt=(0,c.createSelector)(((e,t)=>{let n=t,o=!1;for(;n&&!o;)n=Mt(e,n),o=Wt(e,n);return o}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function Zt(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:t.clientId||null}function qt(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:n.clientId||null}function Yt(e){const t=St(e),n=wt(e);return!t.attributeKey&&!n.attributeKey&&void 0===t.offset&&void 0===n.offset}function Xt(e){const t=St(e),n=wt(e);return!!t&&!!n&&t.clientId===n.clientId&&t.attributeKey===n.attributeKey&&t.offset===n.offset}function Qt(e){return Vt(e).some((t=>{const n=lt(e,t);return!(0,l.getBlockType)(n).merge}))}function Jt(e,t){const n=St(e),o=wt(e);if(n.clientId===o.clientId)return!1;if(!n.attributeKey||!o.attributeKey||void 0===n.offset||void 0===o.offset)return!1;const r=Mt(e,n.clientId);if(r!==Mt(e,o.clientId))return!1;const i=tn(e,r);let s,a;i.indexOf(n.clientId)>i.indexOf(o.clientId)?(s=o,a=n):(s=n,a=o);const c=t?a.clientId:s.clientId,u=t?s.clientId:a.clientId,d=lt(e,c);if(!(0,l.getBlockType)(d).merge)return!1;const p=ut(e,u);if(p.name===d)return!0;const h=(0,l.switchToBlockType)(p,d);return h&&h.length}const en=e=>{const t=St(e),n=wt(e);if(t.clientId===n.clientId)return rt;if(!t.attributeKey||!n.attributeKey||void 0===t.offset||void 0===n.offset)return rt;const o=Mt(e,t.clientId);if(o!==Mt(e,n.clientId))return rt;const r=tn(e,o),i=r.indexOf(t.clientId),s=r.indexOf(n.clientId),[l,a]=i>s?[n,t]:[t,n],c=ut(e,l.clientId),u=ut(e,a.clientId),d=c.attributes[l.attributeKey],p=u.attributes[a.attributeKey];let h=(0,W.create)({html:d}),g=(0,W.create)({html:p});return h=(0,W.remove)(h,0,l.offset),g=(0,W.remove)(g,a.offset,g.text.length),[{...c,attributes:{...c.attributes,[l.attributeKey]:(0,W.toHTMLString)({value:h})}},{...u,attributes:{...u.attributes,[a.attributeKey]:(0,W.toHTMLString)({value:g})}}]};function tn(e,t){return e.blocks.order.get(t||"")||rt}function nn(e,t){return tn(e,Mt(e,t)).indexOf(t)}function on(e,t){const{selectionStart:n,selectionEnd:o}=e.selection;return n.clientId===o.clientId&&n.clientId===t}function rn(e,t,n=!1){const o=Vt(e);return!!o.length&&(n?o.some((n=>Pt(e,n,!0).includes(t))):o.some((n=>Mt(e,n)===t)))}function sn(e,t,n=!1){return tn(e,t).some((t=>mn(e,t)||n&&sn(e,t,n)))}function ln(e,t){if(!t)return!1;const n=Ft(e),o=n.indexOf(t);return o>-1&&o<n.length-1}function an(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId!==n.clientId}function cn(e){return e.isMultiSelecting}function un(e){return e.isSelectionEnabled}function dn(e,t){return e.blocksMode[t]||"visual"}function pn(e){return e.isTyping}function hn(e){return!!e.draggedBlocks.length}function gn(e){return e.draggedBlocks}function mn(e,t){return e.draggedBlocks.includes(t)}function fn(e,t){if(!hn(e))return!1;return Pt(e,t).some((t=>mn(e,t)))}function bn(){return y()('wp.data.select( "core/block-editor" ).isCaretWithinFormattedText',{since:"6.1",version:"6.3"}),!1}const kn=(0,c.createSelector)((e=>{let t,n;const{insertionPoint:o,selection:{selectionEnd:r}}=e;if(null!==o)return o;const{clientId:i}=r;return i?(t=Mt(e,i)||void 0,n=nn(e,r.clientId)+1):n=tn(e).length,{rootClientId:t,index:n}}),(e=>[e.insertionPoint,e.selection.selectionEnd.clientId,e.blocks.parents,e.blocks.order]));function vn(e){return null!==e.insertionPoint}function _n(e){return e.template.isValid}function xn(e){return e.settings.template}function yn(e,t){var n,o;return t?null!==(n=Xn(e,t)?.templateLock)&&void 0!==n&&n:null!==(o=e.settings.templateLock)&&void 0!==o&&o}const Sn=(e,t,n=null)=>{let o;if(t&&"object"==typeof t?(o=t,t=o.name):o=(0,l.getBlockType)(t),!o)return!1;const{allowedBlockTypes:r}=Qn(e);if(!ae(r,t,!0))return!1;if(!!yn(e,n))return!1;if("disabled"===ko(e,null!=n?n:""))return!1;const i=Xn(e,n);if(n&&void 0===i)return!1;const s=lt(e,n),a=(0,l.getBlockType)(s),c=a?.allowedBlocks;let u=ae(c,t);if(!1!==u){const e=i?.allowedBlocks,n=ae(e,t);null!==n&&(u=n)}const p=o.parent,h=ae(p,s);let g=!0;const m=o.ancestor;if(m){g=[n,...Pt(e,n)].some((t=>ae(m,lt(e,t))))}const f=g&&(null===u&&null===h||!0===u||!0===h);return f?(0,d.applyFilters)("blockEditor.__unstableCanInsertBlockType",f,o,n,{getBlock:ut.bind(null,e),getBlockParentsByBlockName:Rt.bind(null,e)}):f},wn=(0,c.createSelector)(Sn,((e,t,n)=>de(e,n)));function Cn(e,t,n=null){return t.every((t=>wn(e,lt(e,t),n)))}function Bn(e,t){const n=ct(e,t);if(null===n)return!0;if(void 0!==n.lock?.remove)return!n.lock.remove;const o=Mt(e,t);return!yn(e,o)&&"disabled"!==ko(e,o)}function In(e,t){return t.every((t=>Bn(e,t)))}function jn(e,t){const n=ct(e,t);if(null===n)return!0;if(void 0!==n.lock?.move)return!n.lock.move;const o=Mt(e,t);return"all"!==yn(e,o)&&"disabled"!==ko(e,o)}function En(e,t){return t.every((t=>jn(e,t)))}function Tn(e,t){const n=ct(e,t);if(null===n)return!0;const{lock:o}=n;return!o?.edit}function Mn(e,t){return!!(0,l.hasBlockSupport)(t,"lock",!0)&&!!e.settings?.canLockBlocks}function Pn(e,t){var n;return null!==(n=e.preferences.insertUsage?.[t])&&void 0!==n?n:null}const Rn=(e,t,n)=>!!(0,l.hasBlockSupport)(t,"inserter",!0)&&Sn(e,t.name,n),Nn=(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}},Ln=(e,{buildScope:t="inserter"})=>n=>{const o=n.name;let r=!1;(0,l.hasBlockSupport)(n.name,"multiple",!0)||(r=_t(e,ft(e)).some((({name:e})=>e===n.name)));const{time:i,count:s=0}=Pn(e,o)||{},a={id:o,name:n.name,title:n.title,icon:n.icon,isDisabled:r,frecency:Nn(i,s)};if("transform"===t)return a;const c=(0,l.getBlockVariations)(n.name,"inserter");return{...a,initialAttributes:{},description:n.description,category:n.category,keywords:n.keywords,variations:c,example:n.example,utility:1}},An=(0,c.createRegistrySelector)((e=>(0,c.createSelector)(((t,n=null,o=st)=>{const r=Sn(t,"core/block",n)?te(e(ne)).getReusableBlocks().map((e=>{const n=e.wp_pattern_sync_status?U:{src:U,foreground:"var(--wp-block-synced-color)"},o=`core/block/${e.id}`,{time:r,count:i=0}=Pn(t,o)||{},s=Nn(r,i);return{id:o,name:"core/block",initialAttributes:{ref:e.id},title:e.title?.raw,icon:n,category:"reusable",keywords:["reusable"],isDisabled:!1,utility:1,frecency:s,content:e.content?.raw,syncStatus:e.wp_pattern_sync_status}})):[],i=Ln(t,{buildScope:"inserter"});let s=(0,l.getBlockTypes)().filter((e=>(0,l.hasBlockSupport)(e,"inserter",!0))).map(i);s=o[oe]?s.reduce(((e,o)=>{for(o.rootClientId=null!=n?n:"";!Sn(t,o.name,o.rootClientId);){if(!o.rootClientId){let e;try{e=Je(t)}catch(e){}e&&Sn(t,o.name,e)?o.rootClientId=e:delete o.rootClientId;break}{const e=Mt(t,o.rootClientId);o.rootClientId=e}}return o.hasOwnProperty("rootClientId")&&e.push(o),e}),[]):s.filter((e=>Rn(t,e,n)));const a=s.reduce(((e,n)=>{const{variations:o=[]}=n;if(o.some((({isDefault:e})=>e))||e.push(n),o.length){const r=((e,t)=>n=>{const o=`${t.id}/${n.name}`,{time:r,count:i=0}=Pn(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:Nn(r,i)}})(t,n);e.push(...o.map(r))}return e}),[]),{core:c,noncore:u}=a.reduce(((e,t)=>{const{core:n,noncore:o}=e;return(t.name.startsWith("core/")?n:o).push(t),e}),{core:[],noncore:[]});return[...[...c,...u],...r]}),((t,n)=>[(0,l.getBlockTypes)(),te(e(ne)).getReusableBlocks(),t.blocks.order,t.preferences.insertUsage,...de(t,n)])))),Dn=(0,c.createSelector)(((e,t,n=null)=>{const o=Array.isArray(t)?t:[t],r=Ln(e,{buildScope:"transform"}),i=(0,l.getBlockTypes)().filter((t=>Rn(e,t,n))).map(r),s=Object.fromEntries(Object.entries(i).map((([,e])=>[e.name,e]))),a=(0,l.getPossibleBlockTransformations)(o).reduce(((e,t)=>(s[t?.name]&&e.push(s[t.name]),e)),[]);return he(a,(e=>s[e.name].frecency),"desc")}),((e,t,n)=>[(0,l.getBlockTypes)(),e.preferences.insertUsage,...de(e,n)])),On=(0,c.createRegistrySelector)((e=>(t,n=null)=>{if((0,l.getBlockTypes)().some((e=>Rn(t,e,n))))return!0;return Sn(t,"core/block",n)&&te(e(ne)).getReusableBlocks().length>0})),zn=(0,c.createRegistrySelector)((e=>(0,c.createSelector)(((t,n=null)=>{if(!n)return;const o=(0,l.getBlockTypes)().filter((e=>Rn(t,e,n)));return Sn(t,"core/block",n)&&te(e(ne)).getReusableBlocks().length>0&&o.push("core/block"),o}),((t,n)=>[(0,l.getBlockTypes)(),te(e(ne)).getReusableBlocks(),...de(t,n)])))),Vn=(0,c.createSelector)(((e,t=null)=>(y()('wp.data.select( "core/block-editor" ).__experimentalGetAllowedBlocks',{alternative:'wp.data.select( "core/block-editor" ).getAllowedBlocks',since:"6.2",version:"6.4"}),zn(e,t))),((e,t)=>zn.getDependants(e,t)));function Fn(e,t=null){var n;if(!t)return;const{defaultBlock:o,directInsert:r}=null!==(n=e.blockListSettings[t])&&void 0!==n?n:{};return o&&r?o:void 0}function Hn(e,t=null){return y()('wp.data.select( "core/block-editor" ).__experimentalGetDirectInsertBlock',{alternative:'wp.data.select( "core/block-editor" ).getDirectInsertBlock',since:"6.3",version:"6.4"}),Fn(e,t)}const Gn=(0,c.createRegistrySelector)((e=>(t,n)=>{const o=te(e(ne)).getPatternBySlug(n);return o?se(o):null})),$n=e=>(t,n)=>[...ue(e)(t),...de(t,n)],Un=new WeakMap;function Wn(e){let t=Un.get(e);return t||(t={...e,get blocks(){return se(e).blocks}},Un.set(e,t)),t}const Kn=(0,c.createRegistrySelector)((e=>(0,c.createSelector)(((t,n=null)=>{const{getAllPatterns:o}=te(e(ne)),r=o(),{allowedBlockTypes:i}=Qn(t),s=r.filter((({inserter:e=!0})=>!!e)).map(Wn);return s.filter((e=>ce(le(e),i))).filter((e=>le(e).every((({blockName:e})=>wn(t,e,n)))))}),$n(e)))),Zn=(0,c.createRegistrySelector)((e=>(0,c.createSelector)(((t,n,o=null)=>{if(!n)return rt;const r=e(ne).__experimentalGetAllowedPatterns(o),i=Array.isArray(n)?n:[n],s=r.filter((e=>e?.blockTypes?.some?.((e=>i.includes(e)))));return 0===s.length?rt:s}),((t,n,o)=>$n(e)(t,o))))),qn=(0,c.createRegistrySelector)((e=>(y()('wp.data.select( "core/block-editor" ).__experimentalGetPatternsByBlockTypes',{alternative:'wp.data.select( "core/block-editor" ).getPatternsByBlockTypes',since:"6.2",version:"6.4"}),e(ne).getPatternsByBlockTypes))),Yn=(0,c.createRegistrySelector)((e=>(0,c.createSelector)(((t,n,o=null)=>{if(!n)return rt;if(n.some((({clientId:e,innerBlocks:n})=>n.length||co(t,e))))return rt;const r=Array.from(new Set(n.map((({name:e})=>e))));return e(ne).getPatternsByBlockTypes(r,o)}),((t,n,o)=>$n(e)(t,o)))));function Xn(e,t){return e.blockListSettings[t]}function Qn(e){return e.settings}function Jn(e){return e.blocks.isPersistentChange}const eo=(0,c.createSelector)(((e,t=[])=>t.reduce(((t,n)=>e.blockListSettings[n]?{...t,[n]:e.blockListSettings[n]}:t),{})),(e=>[e.blockListSettings])),to=(0,c.createRegistrySelector)((e=>(0,c.createSelector)(((t,n)=>{y()("wp.data.select( 'core/block-editor' ).__experimentalGetReusableBlockTitle",{since:"6.6",version:"6.8"});const o=te(e(ne)).getReusableBlocks().find((e=>e.id===n));return o?o.title?.raw:null}),(()=>[te(e(ne)).getReusableBlocks()]))));function no(e){return e.blocks.isIgnoredChange}function oo(e){return e.lastBlockAttributesChange}function ro(e){return"navigation"===e.editorMode}function io(e){return e.editorMode}function so(e){return e.hasBlockMovingClientId}function lo(e){return!!e.automaticChangeStatus}function ao(e,t){return e.highlightedBlock===t}function co(e,t){return!!e.blocks.controlledInnerBlocks[t]}const uo=(0,c.createSelector)(((e,t)=>{if(!t.length)return null;const n=Et(e);if(t.includes(lt(e,n)))return n;const o=Ft(e),r=Rt(e,n||o[0],t);return r?r[r.length-1]:null}),((e,t)=>[e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId,t]));function po(e,t,n){const{lastBlockInserted:o}=e;return o.clientIds?.includes(t)&&o.source===n}function ho(e,t){var n;return null===(n=e.blockVisibility?.[t])||void 0===n||n}function go(e){return e.hoveredBlockClientId}const mo=(0,c.createSelector)((e=>{const t=new Set(Object.keys(e.blockVisibility).filter((t=>e.blockVisibility[t])));return 0===t.size?it:t}),(e=>[e.blockVisibility]));function fo(e,t){if("default"!==ko(e,t))return!1;if(!Tn(e,t))return!0;const n=io(e);if("zoom-out"===n){const n=Je(e);if(n){const o=tn(e,n);if(o?.includes(t))return!0}else if(t&&!Mt(e,t))return!0}const o=(0,l.hasBlockSupport)(lt(e,t),"__experimentalDisableBlockOverlay",!1);return("navigation"===n||!o&&co(e,t))&&!on(e,t)&&!rn(e,t,!0)}function bo(e,t){let n=e.blocks.parents.get(t);for(;n;){if(fo(e,n))return!0;n=e.blocks.parents.get(n)}return!1}const ko=(0,c.createRegistrySelector)((e=>(t,n="")=>{null===n&&(n="");if("zoom-out"===io(t)){const e=Je(t);if(""===n)return e?"disabled":"contentOnly";if(n===e)return"contentOnly";const o=tn(t,e);return o?.includes(n)?"contentOnly":"disabled"}const o=t.blockEditingModes.get(n);if(o)return o;if(!n)return"default";const r=Mt(t,n);if("contentOnly"===yn(t,r)){const o=lt(t,n),{hasContentRoleAttribute:r}=te(e(l.store));return r(o)?"contentOnly":"disabled"}const i=ko(t,r);return"contentOnly"===i?"default":i})),vo=(0,c.createRegistrySelector)((e=>(t,n="")=>{const o=n||Et(t);if(!o)return!1;const{getGroupingBlockName:r}=e(l.store),i=ut(t,o),s=r();return i&&(i.name===s||(0,l.getBlockType)(i.name)?.transforms?.ungroup)&&!!i.innerBlocks.length&&Bn(t,o)})),_o=(0,c.createRegistrySelector)((e=>(t,n=rt)=>{const{getGroupingBlockName:o}=e(l.store),r=o(),i=n?.length?n:Vt(t),s=i?.length?Mt(t,i[0]):void 0;return wn(t,r,s)&&i.length&&In(t,i)})),xo=(e,t)=>(y()("wp.data.select( 'core/block-editor' ).__unstableGetContentLockingParent",{since:"6.1",version:"6.7"}),Ze(e,t));function yo(e){return y()("wp.data.select( 'core/block-editor' ).__unstableGetTemporarilyEditingAsBlocks",{since:"6.1",version:"6.7"}),qe(e)}function So(e){return y()("wp.data.select( 'core/block-editor' ).__unstableGetTemporarilyEditingFocusModeToRevert",{since:"6.5",version:"6.7"}),Ye(e)}const wo=["inserterMediaCategories","blockInspectorAnimation"];function Co(e,{stripExperimentalSettings:t=!1,reset:n=!1}={}){let o=e;if(t&&"web"===a.Platform.OS){o={};for(const t in e)wo.includes(t)||(o[t]=e[t])}return{type:"UPDATE_SETTINGS",settings:o,reset:n}}function Bo(){return{type:"HIDE_BLOCK_INTERFACE"}}function Io(){return{type:"SHOW_BLOCK_INTERFACE"}}const jo=(e,t=!0,n=!1)=>({select:o,dispatch:r,registry:i})=>{if(!e||!e.length)return;var s;s=e,e=Array.isArray(s)?s:[s];if(!o.canRemoveBlocks(e))return;const l=!n&&o.getBlockRemovalRules();if(l){function a(e){const t=[],n=[...e];for(;n.length;){const{innerBlocks:e,...o}=n.shift();n.push(...e),t.push(o)}return t}const c=a(e.map(o.getBlock));let u;for(const d of l)if(u=d.callback(c),u)return void r(To(e,t,u))}t&&r.selectPreviousBlock(e[0],t),i.batch((()=>{r({type:"REMOVE_BLOCKS",clientIds:e}),r(Eo())}))},Eo=()=>({select:e,dispatch:t})=>{if(e.getBlockCount()>0)return;const{__unstableHasCustomAppender:n}=e.getSettings();n||t.insertDefaultBlock()};function To(e,t,n){return{type:"DISPLAY_BLOCK_REMOVAL_PROMPT",clientIds:e,selectPrevious:t,message:n}}function Mo(){return{type:"CLEAR_BLOCK_REMOVAL_PROMPT"}}function Po(e=!1){return{type:"SET_BLOCK_REMOVAL_RULES",rules:e}}function Ro(e){return{type:"SET_OPENED_BLOCK_SETTINGS_MENU",clientId:e}}function No(e,t){return{type:"SET_STYLE_OVERRIDE",id:e,style:t}}function Lo(e){return{type:"DELETE_STYLE_OVERRIDE",id:e}}function Ao(e=null){return{type:"LAST_FOCUS",lastFocus:e}}function Do(e){return({select:t,dispatch:n,registry:o})=>{const r=te(o.select(li)).getTemporarilyEditingFocusModeToRevert();n.__unstableMarkNextChangeAsNotPersistent(),n.updateBlockAttributes(e,{templateLock:"contentOnly"}),n.updateBlockListSettings(e,{...t.getBlockListSettings(e),templateLock:"contentOnly"}),n.updateSettings({focusMode:r}),n.__unstableSetTemporarilyEditingAsBlocks()}}function Oo(){return{type:"START_DRAGGING"}}function zo(){return{type:"STOP_DRAGGING"}}function Vo(e){return{type:"SET_BLOCK_EXPANDED_IN_LIST_VIEW",clientId:e}}const Fo=e=>({select:t,dispatch:n})=>{n.selectBlock(e),n.__unstableMarkNextChangeAsNotPersistent(),n.updateBlockAttributes(e,{templateLock:void 0}),n.updateBlockListSettings(e,{...t.getBlockListSettings(e),templateLock:!1});const o=t.getSettings().focusMode;n.updateSettings({focusMode:!0}),n.__unstableSetTemporarilyEditingAsBlocks(e,o)};function Ho(e=100){return{type:"SET_ZOOM_LEVEL",zoom:e}}function Go(){return{type:"RESET_ZOOM_LEVEL"}}const $o=window.wp.a11y,Uo=window.wp.notices,Wo="";function Ko(e){if(e)return Object.keys(e).find((t=>{const n=e[t];return("string"==typeof n||n instanceof W.RichTextData)&&-1!==n.toString().indexOf(Wo)}))}function Zo(e){for(const[t,n]of Object.entries(e.attributes))if("rich-text"===n.source||"html"===n.source)return t}const qo=e=>Array.isArray(e)?e:[e],Yo=e=>({dispatch:t})=>{t({type:"RESET_BLOCKS",blocks:e}),t(Xo(e))},Xo=e=>({select:t,dispatch:n})=>{const o=t.getTemplate(),r=t.getTemplateLock(),i=!o||"all"!==r||(0,l.doBlocksMatchTemplate)(e,o);if(i!==t.isValidTemplate())return n.setTemplateValidity(i),i};function Qo(e,t,n){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t,initialPosition:n}}function Jo(e){return y()('wp.data.dispatch( "core/block-editor" ).receiveBlocks',{since:"5.9",alternative:"resetBlocks or insertBlocks"}),{type:"RECEIVE_BLOCKS",blocks:e}}function er(e,t,n=!1){return{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:qo(e),attributes:t,uniqueByBlock:n}}function tr(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function nr(e,t=0){return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}function or(e){return{type:"HOVER_BLOCK",clientId:e}}const rr=(e,t=!1)=>({select:n,dispatch:o})=>{const r=n.getPreviousBlockClientId(e);if(r)o.selectBlock(r,-1);else if(t){const t=n.getBlockRootClientId(e);t&&o.selectBlock(t,-1)}},ir=e=>({select:t,dispatch:n})=>{const o=t.getNextBlockClientId(e);o&&n.selectBlock(o)};function sr(){return{type:"START_MULTI_SELECT"}}function lr(){return{type:"STOP_MULTI_SELECT"}}const ar=(e,t,n=0)=>({select:o,dispatch:r})=>{if(o.getBlockRootClientId(e)!==o.getBlockRootClientId(t))return;r({type:"MULTI_SELECT",start:e,end:t,initialPosition:n});const i=o.getSelectedBlockCount();(0,$o.speak)((0,C.sprintf)((0,C._n)("%s block selected.","%s blocks selected.",i),i),"assertive")};function cr(){return{type:"CLEAR_SELECTED_BLOCK"}}function ur(e=!0){return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}const dr=(e,t,n,o=0,r)=>({select:i,dispatch:s,registry:l})=>{e=qo(e),t=qo(t);const a=i.getBlockRootClientId(e[0]);for(let e=0;e<t.length;e++){const n=t[e];if(!i.canInsertBlockType(n.name,a))return}l.batch((()=>{s({type:"REPLACE_BLOCKS",clientIds:e,blocks:t,time:Date.now(),indexToSelect:n,initialPosition:o,meta:r}),s.ensureDefaultBlock()}))};function pr(e,t){return dr(e,t)}const hr=e=>(t,n)=>({select:o,dispatch:r})=>{o.canMoveBlocks(t)&&r({type:e,clientIds:qo(t),rootClientId:n})},gr=hr("MOVE_BLOCKS_DOWN"),mr=hr("MOVE_BLOCKS_UP"),fr=(e,t="",n="",o)=>({select:r,dispatch:i})=>{if(r.canMoveBlocks(e)){if(t!==n){if(!r.canRemoveBlocks(e))return;if(!r.canInsertBlocks(e,n))return}i({type:"MOVE_BLOCKS_TO_POSITION",fromRootClientId:t,toRootClientId:n,clientIds:e,index:o})}};function br(e,t="",n="",o){return fr([e],t,n,o)}function kr(e,t,n,o,r){return vr([e],t,n,o,0,r)}const vr=(e,t,n,o=!0,r=0,i)=>({select:s,dispatch:l})=>{null!==r&&"object"==typeof r&&(i=r,r=0,y()("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=qo(e);const a=[];for(const t of e){s.canInsertBlockType(t.name,n)&&a.push(t)}a.length&&l({type:"INSERT_BLOCKS",blocks:a,index:t,rootClientId:n,time:Date.now(),updateSelection:o,initialPosition:o?r:null,meta:i})};function _r(e,t,n={}){const{__unstableWithInserter:o,operation:r,nearestSide:i}=n;return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t,__unstableWithInserter:o,operation:r,nearestSide:i}}const xr=()=>({select:e,dispatch:t})=>{e.isBlockInsertionPointVisible()&&t({type:"HIDE_INSERTION_POINT"})};function yr(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}const Sr=()=>({select:e,dispatch:t})=>{t({type:"SYNCHRONIZE_TEMPLATE"});const n=e.getBlocks(),o=e.getTemplate(),r=(0,l.synchronizeBlocksWithTemplate)(n,o);t.resetBlocks(r)},wr=e=>({registry:t,select:n,dispatch:o})=>{const r=n.getSelectionStart(),i=n.getSelectionEnd();if(r.clientId===i.clientId)return;if(!r.attributeKey||!i.attributeKey||void 0===r.offset||void 0===i.offset)return!1;const s=n.getBlockRootClientId(r.clientId);if(s!==n.getBlockRootClientId(i.clientId))return;const a=n.getBlockOrder(s);let c,u;a.indexOf(r.clientId)>a.indexOf(i.clientId)?(c=i,u=r):(c=r,u=i);const d=e?u:c,p=n.getBlock(d.clientId),h=(0,l.getBlockType)(p.name);if(!h.merge)return;const g=c,m=u,f=n.getBlock(g.clientId),b=n.getBlock(m.clientId),k=f.attributes[g.attributeKey],v=b.attributes[m.attributeKey];let _=(0,W.create)({html:k}),x=(0,W.create)({html:v});_=(0,W.remove)(_,g.offset,_.text.length),x=(0,W.insert)(x,Wo,0,m.offset);const y=(0,l.cloneBlock)(f,{[g.attributeKey]:(0,W.toHTMLString)({value:_})}),S=(0,l.cloneBlock)(b,{[m.attributeKey]:(0,W.toHTMLString)({value:x})}),w=e?y:S,C=f.name===b.name?[w]:(0,l.switchToBlockType)(w,h.name);if(!C||!C.length)return;let B;if(e){const e=C.pop();B=h.merge(e.attributes,S.attributes)}else{const e=C.shift();B=h.merge(y.attributes,e.attributes)}const I=Ko(B),j=B[I],E=(0,W.create)({html:j}),T=E.text.indexOf(Wo),M=(0,W.remove)(E,T,T+1),P=(0,W.toHTMLString)({value:M});B[I]=P;const R=n.getSelectedBlockClientIds(),N=[...e?C:[],{...p,attributes:{...p.attributes,...B}},...e?[]:C];t.batch((()=>{o.selectionChange(p.clientId,I,T,T),o.replaceBlocks(R,N,0,n.getSelectedBlocksInitialCaretPosition())}))},Cr=(e=[])=>({registry:t,select:n,dispatch:o})=>{const r=n.getSelectionStart(),i=n.getSelectionEnd(),s=n.getBlockRootClientId(r.clientId),a=n.getBlockRootClientId(i.clientId);if(s!==a)return;const c=n.getBlockOrder(s);let u,d;c.indexOf(r.clientId)>c.indexOf(i.clientId)?(u=i,d=r):(u=r,d=i);const p=u,h=d,g=n.getBlock(p.clientId),m=n.getBlock(h.clientId),f=(0,l.getBlockType)(g.name),b=(0,l.getBlockType)(m.name),k="string"==typeof p.attributeKey?p.attributeKey:Zo(f),v="string"==typeof h.attributeKey?h.attributeKey:Zo(b),_=n.getBlockAttributes(p.clientId),x=_?.metadata?.bindings;if(x?.[k]){if(e.length){const{createWarningNotice:O}=t.dispatch(Uo.store);return void O((0,C.__)("Blocks can't be inserted into other blocks with bindings"),{type:"snackbar"})}return void o.insertAfterBlock(p.clientId)}if(!k||!v||void 0===r.offset||void 0===i.offset)return;if(p.clientId===h.clientId&&k===v&&p.offset===h.offset)if(e.length){if((0,l.isUnmodifiedDefaultBlock)(g))return void o.replaceBlocks([p.clientId],e,e.length-1,-1)}else if(!n.getBlockOrder(p.clientId).length){function z(){const e=(0,l.getDefaultBlockName)();return n.canInsertBlockType(e,s)?(0,l.createBlock)(e):(0,l.createBlock)(n.getBlockName(p.clientId))}const V=_[k].length;if(0===p.offset&&V)return void o.insertBlocks([z()],n.getBlockIndex(p.clientId),s,!1);if(p.offset===V)return void o.insertBlocks([z()],n.getBlockIndex(p.clientId)+1,s)}const y=g.attributes[k],S=m.attributes[v];let w=(0,W.create)({html:y}),B=(0,W.create)({html:S});w=(0,W.remove)(w,p.offset,w.text.length),B=(0,W.remove)(B,0,h.offset);let I={...g,innerBlocks:g.clientId===m.clientId?[]:g.innerBlocks,attributes:{...g.attributes,[k]:(0,W.toHTMLString)({value:w})}},j={...m,clientId:g.clientId===m.clientId?(0,l.createBlock)(m.name).clientId:m.clientId,attributes:{...m.attributes,[v]:(0,W.toHTMLString)({value:B})}};const E=(0,l.getDefaultBlockName)();if(g.clientId===m.clientId&&E&&j.name!==E&&n.canInsertBlockType(E,s)){const F=(0,l.switchToBlockType)(j,E);1===F?.length&&(j=F[0])}if(!e.length)return void o.replaceBlocks(n.getSelectedBlockClientIds(),[I,j]);let T;const M=[],P=[...e],R=P.shift(),N=(0,l.getBlockType)(I.name),L=N.merge&&R.name===N.name?[R]:(0,l.switchToBlockType)(R,N.name);if(L?.length){const H=L.shift();I={...I,attributes:{...I.attributes,...N.merge(I.attributes,H.attributes)}},M.push(I),T={clientId:I.clientId,attributeKey:k,offset:(0,W.create)({html:I.attributes[k]}).text.length},P.unshift(...L)}else(0,l.isUnmodifiedBlock)(I)||M.push(I),M.push(R);const A=P.pop(),D=(0,l.getBlockType)(j.name);if(P.length&&M.push(...P),A){const G=D.merge&&D.name===A.name?[A]:(0,l.switchToBlockType)(A,D.name);if(G?.length){const $=G.pop();M.push({...j,attributes:{...j.attributes,...D.merge($.attributes,j.attributes)}}),M.push(...G),T={clientId:j.clientId,attributeKey:v,offset:(0,W.create)({html:$.attributes[v]}).text.length}}else M.push(A),(0,l.isUnmodifiedBlock)(j)||M.push(j)}else(0,l.isUnmodifiedBlock)(j)||M.push(j);t.batch((()=>{o.replaceBlocks(n.getSelectedBlockClientIds(),M,M.length-1,0),T&&o.selectionChange(T.clientId,T.attributeKey,T.offset,T.offset)}))},Br=()=>({select:e,dispatch:t})=>{const n=e.getSelectionStart(),o=e.getSelectionEnd();t.selectionChange({start:{clientId:n.clientId},end:{clientId:o.clientId}})},Ir=(e,t)=>({registry:n,select:o,dispatch:r})=>{const i=e,s=t,a=o.getBlock(i),c=(0,l.getBlockType)(a.name);if(!c)return;const u=o.getBlock(s);if(!c.merge&&(0,l.getBlockSupport)(a.name,"__experimentalOnMerge")){const e=(0,l.switchToBlockType)(u,c.name);if(1!==e?.length)return void r.selectBlock(a.clientId);const[t]=e;return t.innerBlocks.length<1?void r.selectBlock(a.clientId):void n.batch((()=>{r.insertBlocks(t.innerBlocks,void 0,i),r.removeBlock(s),r.selectBlock(t.innerBlocks[0].clientId);const e=o.getNextBlockClientId(i);if(e&&o.getBlockName(i)===o.getBlockName(e)){const t=o.getBlockAttributes(i),n=o.getBlockAttributes(e);Object.keys(t).every((e=>t[e]===n[e]))&&(r.moveBlocksToPosition(o.getBlockOrder(e),e,i),r.removeBlock(e,!1))}}))}if((0,l.isUnmodifiedDefaultBlock)(a))return void r.removeBlock(i,o.isBlockSelected(i));if((0,l.isUnmodifiedDefaultBlock)(u))return void r.removeBlock(s,o.isBlockSelected(s));if(!c.merge)return void r.selectBlock(a.clientId);const d=(0,l.getBlockType)(u.name),{clientId:p,attributeKey:h,offset:g}=o.getSelectionStart(),m=(p===i?c:d).attributes[h],f=(p===i||p===s)&&void 0!==h&&void 0!==g&&!!m;m||("number"==typeof h?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 h):window.console.error("The RichText identifier prop does not match any attributes defined by the block."));const b=(0,l.cloneBlock)(a),k=(0,l.cloneBlock)(u);if(f){const e=p===i?b:k,t=e.attributes[h],n=(0,W.insert)((0,W.create)({html:t}),Wo,g,g);e.attributes[h]=(0,W.toHTMLString)({value:n})}const v=a.name===u.name?[k]:(0,l.switchToBlockType)(k,a.name);if(!v||!v.length)return;const _=c.merge(b.attributes,v[0].attributes);if(f){const e=Ko(_),t=_[e],n=(0,W.create)({html:t}),o=n.text.indexOf(Wo),i=(0,W.remove)(n,o,o+1),s=(0,W.toHTMLString)({value:i});_[e]=s,r.selectionChange(a.clientId,e,o,o)}r.replaceBlocks([a.clientId,u.clientId],[{...a,attributes:{...a.attributes,..._}},...v.slice(1)],0)},jr=(e,t=!0)=>jo(e,t);function Er(e,t){return jr([e],t)}function Tr(e,t,n=!1,o=0){return{type:"REPLACE_INNER_BLOCKS",rootClientId:e,blocks:t,updateSelection:n,initialPosition:n?o:null,time:Date.now()}}function Mr(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function Pr(){return{type:"START_TYPING"}}function Rr(){return{type:"STOP_TYPING"}}function Nr(e=[]){return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function Lr(){return{type:"STOP_DRAGGING_BLOCKS"}}function Ar(){return y()('wp.data.dispatch( "core/block-editor" ).enterFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function Dr(){return y()('wp.data.dispatch( "core/block-editor" ).exitFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function Or(e,t,n,o){return"string"==typeof e?{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:n,endOffset:o}:{type:"SELECTION_CHANGE",...e}}const zr=(e,t,n)=>({dispatch:o})=>{const r=(0,l.getDefaultBlockName)();if(!r)return;const i=(0,l.createBlock)(r,e);return o.insertBlock(i,n,t)};function Vr(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function Fr(e){return Co(e,{stripExperimentalSettings:!0})}function Hr(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function Gr(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function $r(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}const Ur=()=>({dispatch:e})=>{e({type:"MARK_AUTOMATIC_CHANGE"});const{requestIdleCallback:t=(e=>setTimeout(e,100))}=window;t((()=>{e({type:"MARK_AUTOMATIC_CHANGE_FINAL"})}))},Wr=(e=!0)=>({dispatch:t})=>{t.__unstableSetEditorMode(e?"navigation":"edit")},Kr=e=>({dispatch:t,select:n})=>{if("zoom-out"===e){const e=n.getBlockSelectionStart(),o=n.getSectionRootClientId();if(e){let r;if(o){const t=n.getBlockOrder(o);r=t?.includes(e)?e:n.getBlockParents(e).find((e=>t.includes(e)))}else r=n.getBlockHierarchyRootClientId(e);r?t.selectBlock(r):t.clearSelectedBlock()}}t({type:"SET_EDITOR_MODE",mode:e}),"navigation"===e?(0,$o.speak)((0,C.__)("You are currently in navigation mode. Navigate blocks using the Tab key and Arrow keys. Use Left and Right Arrow keys to move between nesting levels. To exit navigation mode and edit the selected block, press Enter.")):"edit"===e?(0,$o.speak)((0,C.__)("You are currently in edit mode. To return to the navigation mode, press Escape.")):"zoom-out"===e&&(0,$o.speak)((0,C.__)("You are currently in zoom-out mode."))},Zr=(e=null)=>({dispatch:t})=>{t({type:"SET_BLOCK_MOVING_MODE",hasBlockMovingClientId:e}),e&&(0,$o.speak)((0,C.__)("Use the Tab key and Arrow keys to choose new block location. Use Left and Right Arrow keys to move between nesting levels. Once location is selected press Enter or Space to move the block."))},qr=(e,t=!0)=>({select:n,dispatch:o})=>{if(!e||!e.length)return;const r=n.getBlocksByClientId(e);if(r.some((e=>!e)))return;const i=r.map((e=>e.name));if(i.some((e=>!(0,l.hasBlockSupport)(e,"multiple",!0))))return;const s=n.getBlockRootClientId(e[0]),a=qo(e),c=n.getBlockIndex(a[a.length-1]),u=r.map((e=>(0,l.__experimentalCloneSanitizedBlock)(e)));return o.insertBlocks(u,c+1,s,t),u.length>1&&t&&o.multiSelect(u[0].clientId,u[u.length-1].clientId),u.map((e=>e.clientId))},Yr=e=>({select:t,dispatch:n})=>{if(!e)return;const o=t.getBlockRootClientId(e);if(t.getTemplateLock(o))return;const r=t.getBlockIndex(e),i=o?t.getDirectInsertBlock(o):null;if(!i)return n.insertDefaultBlock({},o,r);const s={};if(i.attributesToCopy){const n=t.getBlockAttributes(e);i.attributesToCopy.forEach((e=>{n[e]&&(s[e]=n[e])}))}const a=(0,l.createBlock)(i.name,{...i.attributes,...s});return n.insertBlock(a,r,o)},Xr=e=>({select:t,dispatch:n})=>{if(!e)return;const o=t.getBlockRootClientId(e);if(t.getTemplateLock(o))return;const r=t.getBlockIndex(e),i=o?t.getDirectInsertBlock(o):null;if(!i)return n.insertDefaultBlock({},o,r+1);const s={};if(i.attributesToCopy){const n=t.getBlockAttributes(e);i.attributesToCopy.forEach((e=>{n[e]&&(s[e]=n[e])}))}const a=(0,l.createBlock)(i.name,{...i.attributes,...s});return n.insertBlock(a,r+1,o)};function Qr(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}const Jr=e=>async({dispatch:t})=>{t(Qr(e,!0)),await new Promise((e=>setTimeout(e,150))),t(Qr(e,!1))};function ei(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}function ti(e){return{type:"SET_BLOCK_VISIBILITY",updates:e}}function ni(e,t){return{type:"SET_TEMPORARILY_EDITING_AS_BLOCKS",temporarilyEditingAsBlocks:e,focusModeToRevert:t}}const oi=e=>({select:t,dispatch:n})=>{if(!e||"object"!=typeof e)return void console.error("Category should be an `InserterMediaCategory` object.");if(!e.name)return void console.error("Category should have a `name` that should be unique among all media categories.");if(!e.labels?.name)return void console.error("Category should have a `labels.name`.");if(!["image","audio","video"].includes(e.mediaType))return void console.error("Category should have `mediaType` property that is one of `image|audio|video`.");if(!e.fetch||"function"!=typeof e.fetch)return void console.error("Category should have a `fetch` function defined with the following signature `(InserterMediaRequest) => Promise<InserterMediaItem[]>`.");const o=t.getRegisteredInserterMediaCategories();o.some((({name:t})=>t===e.name))?console.error(`A category is already registered with the same name: "${e.name}".`):o.some((({labels:{name:t}={}})=>t===e.labels?.name))?console.error(`A category is already registered with the same labels.name: "${e.labels.name}".`):n({type:"REGISTER_INSERTER_MEDIA_CATEGORY",category:{...e,isExternalResource:!0}})};function ri(e="",t){return{type:"SET_BLOCK_EDITING_MODE",clientId:e,mode:t}}function ii(e=""){return{type:"UNSET_BLOCK_EDITING_MODE",clientId:e}}const si={reducer:H,selectors:t,actions:i},li=(0,c.createReduxStore)(ne,{...si,persist:["preferences"]}),ai=(0,c.registerStore)(ne,{...si,persist:["preferences"]});function ci(...e){const{clientId:t=null}=_();return(0,c.useSelect)((n=>te(n(li)).getBlockSettings(t,...e)),[t,...e])}function ui(e){y()("wp.blockEditor.useSetting",{since:"6.5",alternative:"wp.blockEditor.useSettings",note:"The new useSettings function can retrieve multiple settings at once, with better performance."});const[t]=ci(e);return t}te(ai).registerPrivateActions(r),te(ai).registerPrivateSelectors(e),te(li).registerPrivateActions(r),te(li).registerPrivateSelectors(e);const di=window.wp.styleEngine,pi="1600px",hi="320px",gi=1,mi=.25,fi=.75,bi="14px";function ki({minimumFontSize:e,maximumFontSize:t,fontSize:n,minimumViewportWidth:o=hi,maximumViewportWidth:r=pi,scaleFactor:i=gi,minimumFontSizeLimit:s}){if(s=vi(s)?s:bi,n){const o=vi(n);if(!o?.unit)return null;const r=vi(s,{coerceTo:o.unit});if(r?.value&&!e&&!t&&o?.value<=r?.value)return null;if(t||(t=`${o.value}${o.unit}`),!e){const t="px"===o.unit?o.value:16*o.value,n=Math.min(Math.max(1-.075*Math.log2(t),mi),fi),i=_i(o.value*n,3);e=r?.value&&i<r?.value?`${r.value}${r.unit}`:`${i}${o.unit}`}}const l=vi(e),a=l?.unit||"rem",c=vi(t,{coerceTo:a});if(!l||!c)return null;const u=vi(e,{coerceTo:"rem"}),d=vi(r,{coerceTo:a}),p=vi(o,{coerceTo:a});if(!d||!p||!u)return null;const h=d.value-p.value;if(!h)return null;const g=_i(p.value/100,3),m=_i(g,3)+a,f=_i(((c.value-l.value)/h*100||1)*i,3);return`clamp(${e}, ${`${u.value}${u.unit} + ((1vw - ${m}) * ${f})`}, ${t})`}function vi(e,t={}){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},i=r?.join("|"),s=new RegExp(`^(\\d*\\.?\\d+)(${i}){1,1}$`),l=e.match(s);if(!l||l.length<3)return null;let[,a,c]=l,u=parseFloat(a);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:_i(u,3),unit:c}}function _i(e,t=3){const n=Math.pow(10,t);return Number.isFinite(e)?parseFloat(Math.round(e*n)/n):void 0}function xi(e){if(!e)return{};if("object"==typeof e)return e;let t;switch(e){case"normal":case"400":t=(0,C._x)("Regular","font weight");break;case"bold":case"700":t=(0,C._x)("Bold","font weight");break;case"100":t=(0,C._x)("Thin","font weight");break;case"200":t=(0,C._x)("Extra Light","font weight");break;case"300":t=(0,C._x)("Light","font weight");break;case"500":t=(0,C._x)("Medium","font weight");break;case"600":t=(0,C._x)("Semi Bold","font weight");break;case"800":t=(0,C._x)("Extra Bold","font weight");break;case"900":t=(0,C._x)("Black","font weight");break;case"1000":t=(0,C._x)("Extra Black","font weight");break;default:t=e}return{name:t,value:e}}const yi=[{name:(0,C._x)("Regular","font style"),value:"normal"},{name:(0,C._x)("Italic","font style"),value:"italic"}],Si=[{name:(0,C._x)("Thin","font weight"),value:"100"},{name:(0,C._x)("Extra Light","font weight"),value:"200"},{name:(0,C._x)("Light","font weight"),value:"300"},{name:(0,C._x)("Regular","font weight"),value:"400"},{name:(0,C._x)("Medium","font weight"),value:"500"},{name:(0,C._x)("Semi Bold","font weight"),value:"600"},{name:(0,C._x)("Bold","font weight"),value:"700"},{name:(0,C._x)("Extra Bold","font weight"),value:"800"},{name:(0,C._x)("Black","font weight"),value:"900"},{name:(0,C._x)("Extra Black","font weight"),value:"1000"}];function wi(e){let t=[],n=[];const o=[],r=!e||0===e?.length;let i=!1;return e?.forEach((e=>{if("string"==typeof e.fontWeight&&/\s/.test(e.fontWeight.trim())){i=!0;let[t,o]=e.fontWeight.split(" ");t=parseInt(t.slice(0,1)),o="1000"===o?10:parseInt(o.slice(0,1));for(let e=t;e<=o;e++){const t=`${e.toString()}00`;n.some((e=>e.value===t))||n.push(xi(t))}}const o=xi("number"==typeof e.fontWeight?e.fontWeight.toString():e.fontWeight),r=function(e){if(!e)return{};if("object"==typeof e)return e;let t;switch(e){case"normal":t=(0,C._x)("Regular","font style");break;case"italic":t=(0,C._x)("Italic","font style");break;case"oblique":t=(0,C._x)("Oblique","font style");break;default:t=e}return{name:t,value:e}}(e.fontStyle);r&&Object.keys(r).length&&(t.some((e=>e.value===r.value))||t.push(r)),o&&Object.keys(o).length&&(n.some((e=>e.value===o.value))||i||n.push(o))})),n.some((e=>e.value>="600"))||n.push({name:(0,C._x)("Bold","font weight"),value:"700"}),t.some((e=>"italic"===e.value))||t.push({name:(0,C._x)("Italic","font style"),value:"italic"}),r&&(t=yi,n=Si),t=0===t.length?yi:t,n=0===n.length?Si:n,t.forEach((({name:e,value:t})=>{n.forEach((({name:n,value:r})=>{const i="normal"===t?n:(0,C.sprintf)((0,C._x)("%1$s %2$s","font"),n,e);o.push({key:`${t}-${r}`,name:i,style:{fontStyle:t,fontWeight:r}})}))})),{fontStyles:t,fontWeights:n,combinedStyleAndWeightOptions:o,isSystemFont:r,isVariableFont:i}}function Ci(e,t){const{size:n}=e;if(!n||"0"===n||!1===e?.fluid)return n;if(!Bi(t?.typography)&&!Bi(e))return n;let o=function(e){const t=e?.typography,n=e?.layout,o=vi(n?.wideSize)?n?.wideSize:null;return Bi(t)&&o?{fluid:{maxViewportWidth:o,...t.fluid}}:{fluid:t?.fluid}}(t);o="object"==typeof o?.fluid?o?.fluid:{};const r=ki({minimumFontSize:e?.fluid?.min,maximumFontSize:e?.fluid?.max,fontSize:n,minimumFontSizeLimit:o?.minFontSize,maximumViewportWidth:o?.maxViewportWidth,minimumViewportWidth:o?.minViewportWidth});return r||n}function Bi(e){const t=e?.fluid;return!0===t||t&&"object"==typeof t&&Object.keys(t).length>0}function Ii(e,t){if(!(t="number"==typeof t?t.toString():t)||"string"!=typeof t)return"";if(!e||0===e.length)return t;const n=e?.reduce(((e,{value:n})=>Math.abs(parseInt(n)-parseInt(t))<Math.abs(parseInt(e)-parseInt(t))?n:e),e[0]?.value);return n}const ji="body",Ei=":root",Ti=[{path:["color","palette"],valueKey:"color",cssVarInfix:"color",classes:[{classSuffix:"color",propertyName:"color"},{classSuffix:"background-color",propertyName:"background-color"},{classSuffix:"border-color",propertyName:"border-color"}]},{path:["color","gradients"],valueKey:"gradient",cssVarInfix:"gradient",classes:[{classSuffix:"gradient-background",propertyName:"background"}]},{path:["color","duotone"],valueKey:"colors",cssVarInfix:"duotone",valueFunc:({slug:e})=>`url( '#wp-duotone-${e}' )`,classes:[]},{path:["shadow","presets"],valueKey:"shadow",cssVarInfix:"shadow",classes:[]},{path:["typography","fontSizes"],valueFunc:(e,t)=>Ci(e,t),valueKey:"size",cssVarInfix:"font-size",classes:[{classSuffix:"font-size",propertyName:"font-size"}]},{path:["typography","fontFamilies"],valueKey:"fontFamily",cssVarInfix:"font-family",classes:[{classSuffix:"font-family",propertyName:"font-family"}]},{path:["spacing","spacingSizes"],valueKey:"size",cssVarInfix:"spacing",valueFunc:({size:e})=>e,classes:[]}],Mi={"color.background":"color","color.text":"color","filter.duotone":"duotone","elements.link.color.text":"color","elements.link.:hover.color.text":"color","elements.link.typography.fontFamily":"font-family","elements.link.typography.fontSize":"font-size","elements.button.color.text":"color","elements.button.color.background":"color","elements.caption.color.text":"color","elements.button.typography.fontFamily":"font-family","elements.button.typography.fontSize":"font-size","elements.heading.color":"color","elements.heading.color.background":"color","elements.heading.typography.fontFamily":"font-family","elements.heading.gradient":"gradient","elements.heading.color.gradient":"gradient","elements.h1.color":"color","elements.h1.color.background":"color","elements.h1.typography.fontFamily":"font-family","elements.h1.color.gradient":"gradient","elements.h2.color":"color","elements.h2.color.background":"color","elements.h2.typography.fontFamily":"font-family","elements.h2.color.gradient":"gradient","elements.h3.color":"color","elements.h3.color.background":"color","elements.h3.typography.fontFamily":"font-family","elements.h3.color.gradient":"gradient","elements.h4.color":"color","elements.h4.color.background":"color","elements.h4.typography.fontFamily":"font-family","elements.h4.color.gradient":"gradient","elements.h5.color":"color","elements.h5.color.background":"color","elements.h5.typography.fontFamily":"font-family","elements.h5.color.gradient":"gradient","elements.h6.color":"color","elements.h6.color.background":"color","elements.h6.typography.fontFamily":"font-family","elements.h6.color.gradient":"gradient","color.gradient":"gradient",shadow:"shadow","typography.fontSize":"font-size","typography.fontFamily":"font-family"};function Pi(){return(0,u.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}}}function Ri(e,t,n,o,r){const i=[_e(e,["blocks",t,...n]),_e(e,n)];for(const s of i)if(s){const i=["custom","theme","default"];for(const l of i){const i=s[l];if(i){const s=i.find((e=>e[o]===r));if(s){if("slug"===o)return s;return Ri(e,t,n,"slug",s.slug)[o]===s[o]?s:void 0}}}}}function Ni(e,t,n){if(!n||"string"!=typeof n){if("string"!=typeof n?.ref)return n;if(!(n=_e(e,n.ref))||n?.ref)return n}const o="var:",r="var(--wp--";let i;if(n.startsWith(o))i=n.slice(4).split("|");else{if(!n.startsWith(r)||!n.endsWith(")"))return n;i=n.slice(10,-1).split("--")}const[s,...l]=i;return"preset"===s?function(e,t,n,[o,r]){const i=Ti.find((e=>e.cssVarInfix===o));if(!i)return n;const s=Ri(e.settings,t,i.path,"slug",r);if(s){const{valueKey:n}=i;return Ni(e,t,s[n])}return n}(e,t,n,l):"custom"===s?function(e,t,n,o){var r;const i=null!==(r=_e(e.settings,["blocks",t,"custom",...o]))&&void 0!==r?r:_e(e.settings,["custom",...o]);return i?Ni(e,t,i):n}(e,t,n,l):n}function Li(e,t){if(!e||!t)return t;const n=e.split(","),o=t.split(","),r=[];return n.forEach((e=>{o.forEach((t=>{r.push(`${e.trim()} ${t.trim()}`)}))})),r.join(", ")}function Ai(e,t){return"object"!=typeof e||"object"!=typeof t?e===t:w()(e?.styles,t?.styles)&&w()(e?.settings,t?.settings)}function Di(e,t){if(!e||!t)return e;const n=function(e,t){if(!e||!t)return e;if("string"!=typeof e&&e?.ref){const n=(0,di.getCSSValueFromRawStyle)(_e(t,e.ref));if(n?.ref)return;return void 0===n?e:n}return e}(e,t);return n?.url&&(n.url=function(e,t){if(!e||!t||!Array.isArray(t))return e;const n=t.find((t=>t?.name===e));return n?.href?n?.href:e}(n.url,t?._links?.["wp:theme-file"])),n}const Oi=(0,a.createContext)({user:{},base:{},merged:{},setUserConfig:()=>{}}),zi={settings:{},styles:{}},Vi=["appearanceTools","useRootPaddingAwareAlignments","background.backgroundImage","background.backgroundRepeat","background.backgroundSize","background.backgroundPosition","border.color","border.radius","border.style","border.width","shadow.presets","shadow.defaultPresets","color.background","color.button","color.caption","color.custom","color.customDuotone","color.customGradient","color.defaultDuotone","color.defaultGradients","color.defaultPalette","color.duotone","color.gradients","color.heading","color.link","color.palette","color.text","custom","dimensions.aspectRatio","dimensions.minHeight","layout.contentSize","layout.definitions","layout.wideSize","lightbox.enabled","lightbox.allowEditing","position.fixed","position.sticky","spacing.customSpacingSize","spacing.defaultSpacingSizes","spacing.spacingSizes","spacing.spacingScale","spacing.blockGap","spacing.margin","spacing.padding","spacing.units","typography.fluid","typography.customFontSize","typography.defaultFontSizes","typography.dropCap","typography.fontFamilies","typography.fontSizes","typography.fontStyle","typography.fontWeight","typography.letterSpacing","typography.lineHeight","typography.textAlign","typography.textColumns","typography.textDecoration","typography.textTransform","typography.writingMode"],Fi=()=>{const{user:e,setUserConfig:t}=(0,a.useContext)(Oi),n={settings:e.settings,styles:e.styles};return[!!n&&!w()(n,zi),(0,a.useCallback)((()=>t(zi)),[t])]};function Hi(e,t,n="all"){const{setUserConfig:o,...r}=(0,a.useContext)(Oi),i=t?".blocks."+t:"",s=e?"."+e:"",l=`settings${i}${s}`,c=`settings${s}`,u="all"===n?"merged":n;return[(0,a.useMemo)((()=>{const t=r[u];if(!t)throw"Unsupported source";var n;if(e)return null!==(n=_e(t,l))&&void 0!==n?n:_e(t,c);let o={};return Vi.forEach((e=>{var n;const r=null!==(n=_e(t,`settings${i}.${e}`))&&void 0!==n?n:_e(t,`settings.${e}`);void 0!==r&&(o=ve(o,e.split("."),r))})),o}),[r,u,e,l,c,i]),e=>{o((t=>ve(t,l.split("."),e)))}]}function Gi(e,t,n="all",{shouldDecodeEncode:o=!0}={}){const{merged:r,base:i,user:s,setUserConfig:l}=(0,a.useContext)(Oi),c=e?"."+e:"",u=t?`styles.blocks.${t}${c}`:`styles${c}`;let d,p;switch(n){case"all":d=_e(r,u),p=o?Ni(r,t,d):d;break;case"user":d=_e(s,u),p=o?Ni(r,t,d):d;break;case"base":d=_e(i,u),p=o?Ni(i,t,d):d;break;default:throw"Unsupported source"}return[p,n=>{l((i=>ve(i,u.split("."),o?function(e,t,n,o){if(!o)return o;const r=Mi[n],i=Ti.find((e=>e.cssVarInfix===r));if(!i)return o;const{valueKey:s,path:l}=i,a=Ri(e,t,l,s,o);return a?`var:preset|${r}|${a.slug}`:o}(r.settings,t,e,n):n)))}]}function $i(e,t,n){const{supportedStyles:o,supports:r}=(0,c.useSelect)((e=>({supportedStyles:te(e(l.store)).getSupportedStyles(t,n),supports:e(l.store).getBlockType(t)?.supports})),[t,n]);return(0,a.useMemo)((()=>{const t={...e};return o.includes("fontSize")||(t.typography={...t.typography,fontSizes:{},customFontSize:!1,defaultFontSizes:!1}),o.includes("fontFamily")||(t.typography={...t.typography,fontFamilies:{}}),t.color={...t.color,text:t.color?.text&&o.includes("color"),background:t.color?.background&&(o.includes("background")||o.includes("backgroundColor")),button:t.color?.button&&o.includes("buttonColor"),heading:t.color?.heading&&o.includes("headingColor"),link:t.color?.link&&o.includes("linkColor"),caption:t.color?.caption&&o.includes("captionColor")},o.includes("background")||(t.color.gradients=[],t.color.customGradient=!1),o.includes("filter")||(t.color.defaultDuotone=!1,t.color.customDuotone=!1),["lineHeight","fontStyle","fontWeight","letterSpacing","textAlign","textTransform","textDecoration","writingMode"].forEach((e=>{o.includes(e)||(t.typography={...t.typography,[e]:!1})})),o.includes("columnCount")||(t.typography={...t.typography,textColumns:!1}),["contentSize","wideSize"].forEach((e=>{o.includes(e)||(t.layout={...t.layout,[e]:!1})})),["padding","margin","blockGap"].forEach((e=>{o.includes(e)||(t.spacing={...t.spacing,[e]:!1});const n=Array.isArray(r?.spacing?.[e])?r?.spacing?.[e]:r?.spacing?.[e]?.sides;n?.length&&t.spacing?.[e]&&(t.spacing={...t.spacing,[e]:{...t.spacing?.[e],sides:n}})})),["aspectRatio","minHeight"].forEach((e=>{o.includes(e)||(t.dimensions={...t.dimensions,[e]:!1})})),["radius","color","style","width"].forEach((e=>{o.includes("border"+e.charAt(0).toUpperCase()+e.slice(1))||(t.border={...t.border,[e]:!1})})),["backgroundImage","backgroundSize"].forEach((e=>{o.includes(e)||(t.background={...t.background,[e]:!1})})),t.shadow=!!o.includes("shadow")&&t.shadow,n&&(t.typography.textAlign=!1),t}),[e,o,r,n])}function Ui(e){const t=e?.color?.palette?.custom,n=e?.color?.palette?.theme,o=e?.color?.palette?.default,r=e?.color?.defaultPalette;return(0,a.useMemo)((()=>{const e=[];return n&&n.length&&e.push({name:(0,C._x)("Theme","Indicates this palette comes from the theme."),colors:n}),r&&o&&o.length&&e.push({name:(0,C._x)("Default","Indicates this palette comes from WordPress."),colors:o}),t&&t.length&&e.push({name:(0,C._x)("Custom","Indicates this palette is created by the user."),colors:t}),e}),[t,n,o,r])}function Wi(e){const t=e?.color?.gradients?.custom,n=e?.color?.gradients?.theme,o=e?.color?.gradients?.default,r=e?.color?.defaultGradients;return(0,a.useMemo)((()=>{const e=[];return n&&n.length&&e.push({name:(0,C._x)("Theme","Indicates this palette comes from the theme."),gradients:n}),r&&o&&o.length&&e.push({name:(0,C._x)("Default","Indicates this palette comes from WordPress."),gradients:o}),t&&t.length&&e.push({name:(0,C._x)("Custom","Indicates this palette is created by the user."),gradients:t}),e}),[t,n,o,r])}function Ki(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=Ki(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}const Zi=function(){for(var e,t,n=0,o="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=Ki(e))&&(o&&(o+=" "),o+=t);return o},qi=e=>{if(null===e||"object"!=typeof e||Array.isArray(e))return e;const t=Object.entries(e).map((([e,t])=>[e,qi(t)])).filter((([,e])=>void 0!==e));return t.length?Object.fromEntries(t):void 0};function Yi(e,t,n,o,r,i){if(Object.values(null!=e?e:{}).every((e=>!e)))return n;if(1===i.length&&n.innerBlocks.length===o.length)return n;let s=o[0]?.attributes;if(i.length>1&&o.length>1){if(!o[r])return n;s=o[r]?.attributes}let l=n;return Object.entries(e).forEach((([e,n])=>{n&&t[e].forEach((e=>{const t=_e(s,e);t&&(l={...l,attributes:ve(l.attributes,e,t)})}))})),l}function Xi(e,t,n){const o=(0,l.getBlockSupport)(e,t),r=o?.__experimentalSkipSerialization;return Array.isArray(r)?r.includes(n):r}const Qi=new WeakMap;function Ji({id:e,css:t}){return es({id:e,css:t})}function es({id:e,css:t,assets:n,__unstableType:o,variation:r,clientId:i}={}){const{setStyleOverride:s,deleteStyleOverride:l}=te((0,c.useDispatch)(li)),u=(0,c.useRegistry)(),d=(0,a.useId)();(0,a.useEffect)((()=>{if(!t&&!n)return;const a=e||d,c={id:e,css:t,assets:n,__unstableType:o,variation:r,clientId:i};return Qi.get(u)||Qi.set(u,[]),Qi.get(u).push([a,c]),window.queueMicrotask((()=>{Qi.get(u)?.length&&u.batch((()=>{Qi.get(u).forEach((e=>{s(...e)})),Qi.set(u,[])}))})),()=>{const e=Qi.get(u)?.find((([e])=>e===a));e?Qi.set(u,Qi.get(u).filter((([e])=>e!==a))):l(a)}}),[e,t,i,n,o,d,s,l,u])}function ts(e,t){const[n,o,r,i,s,l,c,u,d,p,h,g,m,f,b,k,v,_,x,y,S,w,C,B,I,j,E,T,M,P,R,N,L,A,D,O,z,V,F,H,G,$,U,W,K,Z,q,Y,X,Q,J,ee,te,ne,oe,re]=ci("background.backgroundImage","background.backgroundSize","typography.fontFamilies.custom","typography.fontFamilies.default","typography.fontFamilies.theme","typography.defaultFontSizes","typography.fontSizes.custom","typography.fontSizes.default","typography.fontSizes.theme","typography.customFontSize","typography.fontStyle","typography.fontWeight","typography.lineHeight","typography.textAlign","typography.textColumns","typography.textDecoration","typography.writingMode","typography.textTransform","typography.letterSpacing","spacing.padding","spacing.margin","spacing.blockGap","spacing.defaultSpacingSizes","spacing.customSpacingSize","spacing.spacingSizes.custom","spacing.spacingSizes.default","spacing.spacingSizes.theme","spacing.units","dimensions.aspectRatio","dimensions.minHeight","layout","border.color","border.radius","border.style","border.width","color.custom","color.palette.custom","color.customDuotone","color.palette.theme","color.palette.default","color.defaultPalette","color.defaultDuotone","color.duotone.custom","color.duotone.theme","color.duotone.default","color.gradients.custom","color.gradients.theme","color.gradients.default","color.defaultGradients","color.customGradient","color.background","color.link","color.text","color.heading","color.button","shadow");return $i((0,a.useMemo)((()=>({background:{backgroundImage:n,backgroundSize:o},color:{palette:{custom:z,theme:F,default:H},gradients:{custom:Z,theme:q,default:Y},duotone:{custom:U,theme:W,default:K},defaultGradients:X,defaultPalette:G,defaultDuotone:$,custom:O,customGradient:Q,customDuotone:V,background:J,link:ee,heading:ne,button:oe,text:te},typography:{fontFamilies:{custom:r,default:i,theme:s},fontSizes:{custom:c,default:u,theme:d},customFontSize:p,defaultFontSizes:l,fontStyle:h,fontWeight:g,lineHeight:m,textAlign:f,textColumns:b,textDecoration:k,textTransform:_,letterSpacing:x,writingMode:v},spacing:{spacingSizes:{custom:I,default:j,theme:E},customSpacingSize:B,defaultSpacingSizes:C,padding:y,margin:S,blockGap:w,units:T},border:{color:N,radius:L,style:A,width:D},dimensions:{aspectRatio:M,minHeight:P},layout:R,parentLayout:t,shadow:re})),[n,o,r,i,s,l,c,u,d,p,h,g,m,f,b,k,_,x,v,y,S,w,C,B,I,j,E,T,M,P,R,t,N,L,A,D,O,z,V,F,H,G,$,U,W,K,Z,q,Y,X,Q,J,ee,te,ne,oe,re]),e)}const ns=(0,a.memo)((function({index:e,useBlockProps:t,setAllWrapperProps:n,...o}){const r=t(o),i=t=>n((n=>{const o=[...n];return o[e]=t,o}));return(0,a.useEffect)((()=>(i(r),()=>{i(void 0)}))),null}));(0,d.addFilter)("blocks.registerBlockType","core/compat/migrateLightBlockWrapper",(function(e){const{apiVersion:t=1}=e;return t<2&&(0,l.hasBlockSupport)(e,"lightBlockWrapper",!1)&&(e.apiVersion=2),e}));const os=window.wp.components,rs={default:(0,os.createSlotFill)("BlockControls"),block:(0,os.createSlotFill)("BlockControlsBlock"),inline:(0,os.createSlotFill)("BlockFormatControls"),other:(0,os.createSlotFill)("BlockControlsOther"),parent:(0,os.createSlotFill)("BlockControlsParent")};function is({group:e="default",controls:t,children:n,__experimentalShareWithChildBlocks:o=!1}){const r=function(e,t){const n=_();return n[p]?rs[e]?.Fill:n[h]&&t?rs.parent.Fill:null}(e,o);if(!r)return null;const i=(0,$.jsxs)($.Fragment,{children:["default"===e&&(0,$.jsx)(os.ToolbarGroup,{controls:t}),n]});return(0,$.jsx)(os.__experimentalStyleProvider,{document,children:(0,$.jsx)(r,{children:e=>{const{forwardedContext:t=[]}=e;return t.reduce(((e,[t,n])=>(0,$.jsx)(t,{...n,children:e})),i)}})})}window.wp.warning;const{ComponentsContext:ss}=te(os.privateApis);function ls({group:e="default",...t}){const n=(0,a.useContext)(os.__experimentalToolbarContext),o=(0,a.useContext)(ss),r=(0,a.useMemo)((()=>({forwardedContext:[[os.__experimentalToolbarContext.Provider,{value:n}],[ss.Provider,{value:o}]]})),[n,o]),i=rs[e]?.Slot,s=(0,os.__experimentalUseSlotFills)(i?.__unstableName);if(!i)return null;if(!s?.length)return null;const l=(0,$.jsx)(i,{...t,bubblesVirtually:!0,fillProps:r});return"default"===e?l:(0,$.jsx)(os.ToolbarGroup,{children:l})}const as=is;as.Slot=ls;const cs=e=>(0,$.jsx)(is,{group:"inline",...e});cs.Slot=e=>(0,$.jsx)(ls,{group:"inline",...e});const us=as,ds=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"})}),ps=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M12.5 15v5H11v-5H4V9h7V4h1.5v5h7v6h-7Z"})}),hs=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"})}),gs=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"})}),ms=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M4 4H5.5V20H4V4ZM7 10L17 10V14L7 14V10ZM20 4H18.5V20H20V4Z"})}),fs=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"m14.5 6.5-1 1 3.7 3.7H4v1.6h13.2l-3.7 3.7 1 1 5.6-5.5z"})}),bs=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"m16.5 13.5-3.7 3.7V4h-1.5v13.2l-3.8-3.7-1 1 5.5 5.6 5.5-5.6z"})}),ks={default:{name:"default",slug:"flow",className:"is-layout-flow",baseStyles:[{selector:" > .alignleft",rules:{float:"left","margin-inline-start":"0","margin-inline-end":"2em"}},{selector:" > .alignright",rules:{float:"right","margin-inline-start":"2em","margin-inline-end":"0"}},{selector:" > .aligncenter",rules:{"margin-left":"auto !important","margin-right":"auto !important"}}],spacingStyles:[{selector:" > :first-child",rules:{"margin-block-start":"0"}},{selector:" > :last-child",rules:{"margin-block-end":"0"}},{selector:" > *",rules:{"margin-block-start":null,"margin-block-end":"0"}}]},constrained:{name:"constrained",slug:"constrained",className:"is-layout-constrained",baseStyles:[{selector:" > .alignleft",rules:{float:"left","margin-inline-start":"0","margin-inline-end":"2em"}},{selector:" > .alignright",rules:{float:"right","margin-inline-start":"2em","margin-inline-end":"0"}},{selector:" > .aligncenter",rules:{"margin-left":"auto !important","margin-right":"auto !important"}},{selector:" > :where(:not(.alignleft):not(.alignright):not(.alignfull))",rules:{"max-width":"var(--wp--style--global--content-size)","margin-left":"auto !important","margin-right":"auto !important"}},{selector:" > .alignwide",rules:{"max-width":"var(--wp--style--global--wide-size)"}}],spacingStyles:[{selector:" > :first-child",rules:{"margin-block-start":"0"}},{selector:" > :last-child",rules:{"margin-block-end":"0"}},{selector:" > *",rules:{"margin-block-start":null,"margin-block-end":"0"}}]},flex:{name:"flex",slug:"flex",className:"is-layout-flex",displayMode:"flex",baseStyles:[{selector:"",rules:{"flex-wrap":"wrap","align-items":"center"}},{selector:" > :is(*, div)",rules:{margin:"0"}}],spacingStyles:[{selector:"",rules:{gap:null}}]},grid:{name:"grid",slug:"grid",className:"is-layout-grid",displayMode:"grid",baseStyles:[{selector:" > :is(*, div)",rules:{margin:"0"}}],spacingStyles:[{selector:"",rules:{gap:null}}]}};function vs(e,t=""){return e.split(",").map((e=>`${e}${t?` ${t}`:""}`)).join(",")}function _s(e,t=ks,n,o){let r="";return t?.[n]?.spacingStyles?.length&&o&&t[n].spacingStyles.forEach((t=>{r+=`${vs(e,t.selector.trim())} { `,r+=Object.entries(t.rules).map((([e,t])=>`${e}: ${t||o}`)).join("; "),r+="; }"})),r}function xs(e){const{contentSize:t,wideSize:n,type:o="default"}=e,r={},i=/^(?!0)\d+(px|em|rem|vw|vh|%|svw|lvw|dvw|svh|lvh|dvh|vi|svi|lvi|dvi|vb|svb|lvb|dvb|vmin|svmin|lvmin|dvmin|vmax|svmax|lvmax|dvmax)?$/i;return i.test(t)&&"constrained"===o&&(r.none=(0,C.sprintf)((0,C.__)("Max %s wide"),t)),i.test(n)&&(r.wide=(0,C.sprintf)((0,C.__)("Max %s wide"),n)),r}const ys=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z"})}),Ss=(0,$.jsxs)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,$.jsx)(G.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,$.jsx)(G.Path,{d:"m4.5 7.5v9h1.5v-9z"}),(0,$.jsx)(G.Path,{d:"m18 7.5v9h1.5v-9z"})]}),ws=(0,$.jsxs)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,$.jsx)(G.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,$.jsx)(G.Path,{d:"m7.5 6h9v-1.5h-9z"}),(0,$.jsx)(G.Path,{d:"m7.5 19.5h9v-1.5h-9z"})]}),Cs=(0,$.jsxs)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,$.jsx)(G.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,$.jsx)(G.Path,{d:"m16.5 6h-9v-1.5h9z"})]}),Bs=(0,$.jsxs)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,$.jsx)(G.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,$.jsx)(G.Path,{d:"m18 16.5v-9h1.5v9z"})]}),Is=(0,$.jsxs)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,$.jsx)(G.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,$.jsx)(G.Path,{d:"m16.5 19.5h-9v-1.5h9z"})]}),js=(0,$.jsxs)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,$.jsx)(G.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,$.jsx)(G.Path,{d:"m4.5 16.5v-9h1.5v9z"})]}),Es=8,Ts=["top","right","bottom","left"],Ms={top:void 0,right:void 0,bottom:void 0,left:void 0},Ps={custom:ys,axial:ys,horizontal:Ss,vertical:ws,top:Cs,right:Bs,bottom:Is,left:js},Rs={default:(0,C.__)("Spacing control"),top:(0,C.__)("Top"),bottom:(0,C.__)("Bottom"),left:(0,C.__)("Left"),right:(0,C.__)("Right"),mixed:(0,C.__)("Mixed"),vertical:(0,C.__)("Vertical"),horizontal:(0,C.__)("Horizontal"),axial:(0,C.__)("Horizontal & vertical"),custom:(0,C.__)("Custom")},Ns={axial:"axial",top:"top",right:"right",bottom:"bottom",left:"left",custom:"custom"};function Ls(e){return!!e?.includes&&("0"===e||e.includes("var:preset|spacing|"))}function As(e,t){if(!Ls(e))return e;const n=zs(e),o=t.find((e=>String(e.slug)===n));return o?.size}function Ds(e,t){if(!e||Ls(e)||"0"===e)return e;const n=t.find((t=>String(t.size)===String(e)));return n?.slug?`var:preset|spacing|${n.slug}`:e}function Os(e){if(!e)return;const t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function zs(e){if(!e)return;if("0"===e||"default"===e)return e;const t=e.match(/var:preset\|spacing\|(.+)/);return t?t[1]:void 0}function Vs(e,t){if(!e||!e.length)return!1;const n=e.includes("horizontal")||e.includes("left")&&e.includes("right"),o=e.includes("vertical")||e.includes("top")&&e.includes("bottom");return"horizontal"===t?n:"vertical"===t?o:n||o}function Fs(e,t="0"){const n=function(e){if(!e)return null;const t="string"==typeof e;return{top:t?e:e?.top,left:t?e:e?.left}}(e);if(!n)return null;const o=Os(n?.top)||t,r=Os(n?.left)||t;return o===r?o:`${o} ${r}`}const Hs=(0,$.jsx)(os.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(os.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})}),Gs=(0,$.jsx)(os.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(os.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"})}),$s=(0,$.jsx)(os.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(os.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})}),Us=(0,$.jsx)(os.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(os.Path,{d:"M4 4L20 4L20 5.5L4 5.5L4 4ZM10 7L14 7L14 17L10 17L10 7ZM20 18.5L4 18.5L4 20L20 20L20 18.5Z"})}),Ws=(0,$.jsx)(os.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(os.Path,{d:"M7 4H17V8L7 8V4ZM7 16L17 16V20L7 20V16ZM20 11.25H4V12.75H20V11.25Z"})}),Ks={top:{icon:$s,title:(0,C._x)("Align top","Block vertical alignment setting")},center:{icon:Gs,title:(0,C._x)("Align middle","Block vertical alignment setting")},bottom:{icon:Hs,title:(0,C._x)("Align bottom","Block vertical alignment setting")},stretch:{icon:Us,title:(0,C._x)("Stretch to fill","Block vertical alignment setting")},"space-between":{icon:Ws,title:(0,C._x)("Space between","Block vertical alignment setting")}},Zs=["top","center","bottom"];const qs=function({value:e,onChange:t,controls:n=Zs,isCollapsed:o=!0,isToolbar:r}){function i(n){return()=>t(e===n?void 0:n)}const s=Ks[e],l=Ks.top,a=r?os.ToolbarGroup:os.ToolbarDropdownMenu,c=r?{isCollapsed:o}:{};return(0,$.jsx)(a,{icon:s?s.icon:l.icon,label:(0,C._x)("Change vertical alignment","Block vertical alignment setting label"),controls:n.map((t=>({...Ks[t],isActive:e===t,role:o?"menuitemradio":void 0,onClick:i(t)}))),...c})},Ys=e=>(0,$.jsx)(qs,{...e,isToolbar:!1}),Xs=e=>(0,$.jsx)(qs,{...e,isToolbar:!0}),Qs={left:ds,center:ps,right:hs,"space-between":gs,stretch:ms};const Js=function({allowedControls:e=["left","center","right","space-between"],isCollapsed:t=!0,onChange:n,value:o,popoverProps:r,isToolbar:i}){const s=e=>{n(e===o?void 0:e)},l=o?Qs[o]:Qs.left,a=[{name:"left",icon:ds,title:(0,C.__)("Justify items left"),isActive:"left"===o,onClick:()=>s("left")},{name:"center",icon:ps,title:(0,C.__)("Justify items center"),isActive:"center"===o,onClick:()=>s("center")},{name:"right",icon:hs,title:(0,C.__)("Justify items right"),isActive:"right"===o,onClick:()=>s("right")},{name:"space-between",icon:gs,title:(0,C.__)("Space between items"),isActive:"space-between"===o,onClick:()=>s("space-between")},{name:"stretch",icon:ms,title:(0,C.__)("Stretch items"),isActive:"stretch"===o,onClick:()=>s("stretch")}],c=i?os.ToolbarGroup:os.ToolbarDropdownMenu,u=i?{isCollapsed:t}:{};return(0,$.jsx)(c,{icon:l,popoverProps:r,label:(0,C.__)("Change items justification"),controls:a.filter((t=>e.includes(t.name))),...u})},el=e=>(0,$.jsx)(Js,{...e,isToolbar:!1}),tl=e=>(0,$.jsx)(Js,{...e,isToolbar:!0}),nl={left:"flex-start",right:"flex-end",center:"center","space-between":"space-between"},ol={left:"flex-start",right:"flex-end",center:"center",stretch:"stretch"},rl={top:"flex-start",center:"center",bottom:"flex-end",stretch:"stretch","space-between":"space-between"},il=["wrap","nowrap"],sl={name:"flex",label:(0,C.__)("Flex"),inspectorControls:function({layout:e={},onChange:t,layoutBlockSupport:n={}}){const{allowOrientation:o=!0}=n;return(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(os.Flex,{children:[(0,$.jsx)(os.FlexItem,{children:(0,$.jsx)(cl,{layout:e,onChange:t})}),(0,$.jsx)(os.FlexItem,{children:o&&(0,$.jsx)(dl,{layout:e,onChange:t})})]}),(0,$.jsx)(ul,{layout:e,onChange:t})]})},toolBarControls:function({layout:e={},onChange:t,layoutBlockSupport:n}){if(n?.allowSwitching)return null;const{allowVerticalAlignment:o=!0}=n;return(0,$.jsxs)(us,{group:"block",__experimentalShareWithChildBlocks:!0,children:[(0,$.jsx)(cl,{layout:e,onChange:t,isToolbar:!0}),o&&(0,$.jsx)(ll,{layout:e,onChange:t})]})},getLayoutStyle:function({selector:e,layout:t,style:n,blockName:o,hasBlockGapSupport:r,layoutDefinitions:i=ks}){const{orientation:s="horizontal"}=t,l=n?.spacing?.blockGap&&!Xi(o,"spacing","blockGap")?Fs(n?.spacing?.blockGap,"0.5em"):void 0,a=nl[t.justifyContent],c=il.includes(t.flexWrap)?t.flexWrap:"wrap",u=rl[t.verticalAlignment],d=ol[t.justifyContent]||ol.left;let p="";const h=[];return c&&"wrap"!==c&&h.push(`flex-wrap: ${c}`),"horizontal"===s?(u&&h.push(`align-items: ${u}`),a&&h.push(`justify-content: ${a}`)):(u&&h.push(`justify-content: ${u}`),h.push("flex-direction: column"),h.push(`align-items: ${d}`)),h.length&&(p=`${vs(e)} {\n\t\t\t\t${h.join("; ")};\n\t\t\t}`),r&&l&&(p+=_s(e,i,"flex",l)),p},getOrientation(e){const{orientation:t="horizontal"}=e;return t},getAlignments:()=>[]};function ll({layout:e,onChange:t}){const{orientation:n="horizontal"}=e,o="horizontal"===n?rl.center:rl.top,{verticalAlignment:r=o}=e;return(0,$.jsx)(Ys,{onChange:n=>{t({...e,verticalAlignment:n})},value:r,controls:"horizontal"===n?["top","center","bottom","stretch"]:["top","center","bottom","space-between"]})}const al={placement:"bottom-start"};function cl({layout:e,onChange:t,isToolbar:n=!1}){const{justifyContent:o="left",orientation:r="horizontal"}=e,i=n=>{t({...e,justifyContent:n})},s=["left","center","right"];if("horizontal"===r?s.push("space-between"):s.push("stretch"),n)return(0,$.jsx)(el,{allowedControls:s,value:o,onChange:i,popoverProps:al});const l=[{value:"left",icon:ds,label:(0,C.__)("Justify items left")},{value:"center",icon:ps,label:(0,C.__)("Justify items center")},{value:"right",icon:hs,label:(0,C.__)("Justify items right")}];return"horizontal"===r?l.push({value:"space-between",icon:gs,label:(0,C.__)("Space between items")}):l.push({value:"stretch",icon:ms,label:(0,C.__)("Stretch items")}),(0,$.jsx)(os.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,C.__)("Justification"),value:o,onChange:i,className:"block-editor-hooks__flex-layout-justification-controls",children:l.map((({value:e,icon:t,label:n})=>(0,$.jsx)(os.__experimentalToggleGroupControlOptionIcon,{value:e,icon:t,label:n},e)))})}function ul({layout:e,onChange:t}){const{flexWrap:n="wrap"}=e;return(0,$.jsx)(os.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,C.__)("Allow to wrap to multiple lines"),onChange:n=>{t({...e,flexWrap:n?"wrap":"nowrap"})},checked:"wrap"===n})}function dl({layout:e,onChange:t}){const{orientation:n="horizontal",verticalAlignment:o,justifyContent:r}=e;return(0,$.jsxs)(os.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,className:"block-editor-hooks__flex-layout-orientation-controls",label:(0,C.__)("Orientation"),value:n,onChange:n=>{let i=o,s=r;return"horizontal"===n?("space-between"===o&&(i="center"),"stretch"===r&&(s="left")):("stretch"===o&&(i="top"),"space-between"===r&&(s="left")),t({...e,orientation:n,verticalAlignment:i,justifyContent:s})},children:[(0,$.jsx)(os.__experimentalToggleGroupControlOptionIcon,{icon:fs,value:"horizontal",label:(0,C.__)("Horizontal")}),(0,$.jsx)(os.__experimentalToggleGroupControlOptionIcon,{icon:bs,value:"vertical",label:(0,C.__)("Vertical")})]})}const pl={name:"default",label:(0,C.__)("Flow"),inspectorControls:function(){return null},toolBarControls:function(){return null},getLayoutStyle:function({selector:e,style:t,blockName:n,hasBlockGapSupport:o,layoutDefinitions:r=ks}){const i=Fs(t?.spacing?.blockGap);let s="";Xi(n,"spacing","blockGap")||(i?.top?s=Fs(i?.top):"string"==typeof i&&(s=Fs(i)));let l="";return o&&s&&(l+=_s(e,r,"default",s)),l},getOrientation:()=>"vertical",getAlignments(e,t){const n=xs(e);if(void 0!==e.alignments)return e.alignments.includes("none")||e.alignments.unshift("none"),e.alignments.map((e=>({name:e,info:n[e]})));const o=[{name:"left"},{name:"center"},{name:"right"}];if(!t){const{contentSize:t,wideSize:r}=e;t&&o.unshift({name:"full"}),r&&o.unshift({name:"wide",info:n.wide})}return o.unshift({name:"none",info:n.none}),o}};const hl=(0,a.forwardRef)((function({icon:e,size:t=24,...n},o){return(0,a.cloneElement)(e,{width:t,height:t,...n,ref:o})})),gl=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM5 9h14v6H5V9Z"})}),ml=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M16 5.5H8V4h8v1.5ZM16 20H8v-1.5h8V20ZM5 9h14v6H5V9Z"})}),fl={name:"constrained",label:(0,C.__)("Constrained"),inspectorControls:function({layout:e,onChange:t,layoutBlockSupport:n={}}){const{wideSize:o,contentSize:r,justifyContent:i="center"}=e,{allowJustification:s=!0,allowCustomContentAndWideSize:l=!0}=n,a=[{value:"left",icon:ds,label:(0,C.__)("Justify items left")},{value:"center",icon:ps,label:(0,C.__)("Justify items center")},{value:"right",icon:hs,label:(0,C.__)("Justify items right")}],[c]=ci("spacing.units"),u=(0,os.__experimentalUseCustomUnits)({availableUnits:c||["%","px","em","rem","vw"]});return(0,$.jsxs)(os.__experimentalVStack,{spacing:4,className:"block-editor-hooks__layout-constrained",children:[l&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(os.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,C.__)("Content width"),labelPosition:"top",value:r||o||"",onChange:n=>{n=0>parseFloat(n)?"0":n,t({...e,contentSize:n})},units:u,prefix:(0,$.jsx)(os.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,$.jsx)(hl,{icon:gl})})}),(0,$.jsx)(os.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,C.__)("Wide width"),labelPosition:"top",value:o||r||"",onChange:n=>{n=0>parseFloat(n)?"0":n,t({...e,wideSize:n})},units:u,prefix:(0,$.jsx)(os.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,$.jsx)(hl,{icon:ml})})}),(0,$.jsx)("p",{className:"block-editor-hooks__layout-constrained-helptext",children:(0,C.__)("Customize the width for all elements that are assigned to the center or wide columns.")})]}),s&&(0,$.jsx)(os.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,C.__)("Justification"),value:i,onChange:n=>{t({...e,justifyContent:n})},children:a.map((({value:e,icon:t,label:n})=>(0,$.jsx)(os.__experimentalToggleGroupControlOptionIcon,{value:e,icon:t,label:n},e)))})]})},toolBarControls:function({layout:e={},onChange:t,layoutBlockSupport:n}){const{allowJustification:o=!0}=n;return o?(0,$.jsx)(us,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,$.jsx)(kl,{layout:e,onChange:t})}):null},getLayoutStyle:function({selector:e,layout:t={},style:n,blockName:o,hasBlockGapSupport:r,layoutDefinitions:i=ks}){const{contentSize:s,wideSize:l,justifyContent:a}=t,c=Fs(n?.spacing?.blockGap);let u="";Xi(o,"spacing","blockGap")||(c?.top?u=Fs(c?.top):"string"==typeof c&&(u=Fs(c)));const d="left"===a?"0 !important":"auto !important",p="right"===a?"0 !important":"auto !important";let h=s||l?`\n\t\t\t\t\t${vs(e,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")} {\n\t\t\t\t\t\tmax-width: ${null!=s?s:l};\n\t\t\t\t\t\tmargin-left: ${d};\n\t\t\t\t\t\tmargin-right: ${p};\n\t\t\t\t\t}\n\t\t\t\t\t${vs(e,"> .alignwide")} {\n\t\t\t\t\t\tmax-width: ${null!=l?l:s};\n\t\t\t\t\t}\n\t\t\t\t\t${vs(e,"> .alignfull")} {\n\t\t\t\t\t\tmax-width: none;\n\t\t\t\t\t}\n\t\t\t\t`:"";if("left"===a?h+=`${vs(e,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}\n\t\t\t{ margin-left: ${d}; }`:"right"===a&&(h+=`${vs(e,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}\n\t\t\t{ margin-right: ${p}; }`),n?.spacing?.padding){(0,di.getCSSRules)(n).forEach((t=>{if("paddingRight"===t.key){const n="0"===t.value?"0px":t.value;h+=`\n\t\t\t\t\t${vs(e,"> .alignfull")} {\n\t\t\t\t\t\tmargin-right: calc(${n} * -1);\n\t\t\t\t\t}\n\t\t\t\t\t`}else if("paddingLeft"===t.key){const n="0"===t.value?"0px":t.value;h+=`\n\t\t\t\t\t${vs(e,"> .alignfull")} {\n\t\t\t\t\t\tmargin-left: calc(${n} * -1);\n\t\t\t\t\t}\n\t\t\t\t\t`}}))}return r&&u&&(h+=_s(e,i,"constrained",u)),h},getOrientation:()=>"vertical",getAlignments(e){const t=xs(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}},bl={placement:"bottom-start"};function kl({layout:e,onChange:t}){const{justifyContent:n="center"}=e;return(0,$.jsx)(el,{allowedControls:["left","center","right"],value:n,onChange:n=>{t({...e,justifyContent:n})},popoverProps:bl})}const vl={px:600,"%":100,vw:100,vh:100,em:38,rem:38,svw:100,lvw:100,dvw:100,svh:100,lvh:100,dvh:100,vi:100,svi:100,lvi:100,dvi:100,vb:100,svb:100,lvb:100,dvb:100,vmin:100,svmin:100,lvmin:100,dvmin:100,vmax:100,svmax:100,lvmax:100,dvmax:100},_l=[{value:"px",label:"px",default:0},{value:"rem",label:"rem",default:0},{value:"em",label:"em",default:0}],xl={name:"grid",label:(0,C.__)("Grid"),inspectorControls:function({layout:e={},onChange:t,layoutBlockSupport:n={}}){const{allowSizingOnChildren:o=!1}=n,r=window.__experimentalEnableGridInteractivity||!!e?.columnCount,i=window.__experimentalEnableGridInteractivity||!e?.columnCount;return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(wl,{layout:e,onChange:t}),(0,$.jsxs)(os.__experimentalVStack,{spacing:4,children:[r&&(0,$.jsx)(Sl,{layout:e,onChange:t,allowSizingOnChildren:o}),i&&(0,$.jsx)(yl,{layout:e,onChange:t})]})]})},toolBarControls:function(){return null},getLayoutStyle:function({selector:e,layout:t,style:n,blockName:o,hasBlockGapSupport:r,layoutDefinitions:i=ks}){const{minimumColumnWidth:s=null,columnCount:l=null,rowCount:a=null}=t;const c=n?.spacing?.blockGap&&!Xi(o,"spacing","blockGap")?Fs(n?.spacing?.blockGap,"0.5em"):void 0;let u="";const d=[];if(s&&l>0){const e=`max(${s}, ( 100% - (${c||"1.2rem"}*${l-1}) ) / ${l})`;d.push(`grid-template-columns: repeat(auto-fill, minmax(${e}, 1fr))`,"container-type: inline-size"),a&&d.push(`grid-template-rows: repeat(${a}, minmax(1rem, auto))`)}else l?(d.push(`grid-template-columns: repeat(${l}, minmax(0, 1fr))`),a&&d.push(`grid-template-rows: repeat(${a}, minmax(1rem, auto))`)):d.push(`grid-template-columns: repeat(auto-fill, minmax(min(${s||"12rem"}, 100%), 1fr))`,"container-type: inline-size");return d.length&&(u=`${vs(e)} { ${d.join("; ")}; }`),r&&c&&(u+=_s(e,i,"grid",c)),u},getOrientation:()=>"horizontal",getAlignments:()=>[]};function yl({layout:e,onChange:t}){const{minimumColumnWidth:n,columnCount:o,isManualPlacement:r}=e,i=n||(r||o?null:"12rem"),[s,l="rem"]=(0,os.__experimentalParseQuantityAndUnitFromRawValue)(i);return(0,$.jsxs)("fieldset",{children:[(0,$.jsx)(os.BaseControl.VisualLabel,{as:"legend",children:(0,C.__)("Minimum column width")}),(0,$.jsxs)(os.Flex,{gap:4,children:[(0,$.jsx)(os.FlexItem,{isBlock:!0,children:(0,$.jsx)(os.__experimentalUnitControl,{size:"__unstable-large",onChange:n=>{t({...e,minimumColumnWidth:""===n?void 0:n})},onUnitChange:n=>{let o;["em","rem"].includes(n)&&"px"===l?o=(s/16).toFixed(2)+n:["em","rem"].includes(l)&&"px"===n&&(o=Math.round(16*s)+n),t({...e,minimumColumnWidth:o})},value:i,units:_l,min:0,label:(0,C.__)("Minimum column width"),hideLabelFromVision:!0})}),(0,$.jsx)(os.FlexItem,{isBlock:!0,children:(0,$.jsx)(os.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,onChange:n=>{t({...e,minimumColumnWidth:[n,l].join("")})},value:s||0,min:0,max:vl[l]||600,withInputField:!1,label:(0,C.__)("Minimum column width"),hideLabelFromVision:!0})})]})]})}function Sl({layout:e,onChange:t,allowSizingOnChildren:n}){const o=window.__experimentalEnableGridInteractivity?void 0:3,{columnCount:r=o,rowCount:i,isManualPlacement:s}=e;return(0,$.jsx)($.Fragment,{children:(0,$.jsxs)("fieldset",{children:[(!window.__experimentalEnableGridInteractivity||!s)&&(0,$.jsx)(os.BaseControl.VisualLabel,{as:"legend",children:(0,C.__)("Columns")}),(0,$.jsxs)(os.Flex,{gap:4,children:[(0,$.jsx)(os.FlexItem,{isBlock:!0,children:(0,$.jsx)(os.__experimentalNumberControl,{size:"__unstable-large",onChange:n=>{if(window.__experimentalEnableGridInteractivity){const o=""===n||"0"===n?s?1:void 0:parseInt(n,10);t({...e,columnCount:o})}else{const o=""===n||"0"===n?1:parseInt(n,10);t({...e,columnCount:o})}},value:r,min:1,label:(0,C.__)("Columns"),hideLabelFromVision:!window.__experimentalEnableGridInteractivity||!s})}),(0,$.jsx)(os.FlexItem,{isBlock:!0,children:window.__experimentalEnableGridInteractivity&&n&&s?(0,$.jsx)(os.__experimentalNumberControl,{size:"__unstable-large",onChange:n=>{const o=""===n||"0"===n?1:parseInt(n,10);t({...e,rowCount:o})},value:i,min:1,label:(0,C.__)("Rows")}):(0,$.jsx)(os.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:null!=r?r:1,onChange:n=>t({...e,columnCount:""===n||"0"===n?1:n}),min:1,max:16,withInputField:!1,label:(0,C.__)("Columns"),hideLabelFromVision:!0})})]})]})})}function wl({layout:e,onChange:t}){const{columnCount:n,rowCount:o,minimumColumnWidth:r,isManualPlacement:i}=e,[s,l]=(0,a.useState)(n||3),[c,u]=(0,a.useState)(o),[d,p]=(0,a.useState)(r||"12rem"),h=i||n&&!window.__experimentalEnableGridInteractivity?"manual":"auto",g="manual"===h?(0,C.__)("Grid items can be manually placed in any position on the grid."):(0,C.__)("Grid items are placed automatically depending on their order.");return(0,$.jsxs)(os.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,C.__)("Grid item position"),value:h,onChange:i=>{"manual"===i?p(r||"12rem"):(l(n||3),u(o)),t({...e,columnCount:"manual"===i?s:null,rowCount:"manual"===i&&window.__experimentalEnableGridInteractivity?c:void 0,isManualPlacement:!("manual"!==i||!window.__experimentalEnableGridInteractivity)||void 0,minimumColumnWidth:"auto"===i?d:null})},isBlock:!0,help:window.__experimentalEnableGridInteractivity?g:void 0,children:[(0,$.jsx)(os.__experimentalToggleGroupControlOption,{value:"auto",label:(0,C.__)("Auto")},"auto"),(0,$.jsx)(os.__experimentalToggleGroupControlOption,{value:"manual",label:(0,C.__)("Manual")},"manual")]})}const Cl=[pl,sl,fl,xl];function Bl(e="default"){return Cl.find((t=>t.name===e))}const Il={type:"default"},jl=(0,a.createContext)(Il),El=jl.Provider;function Tl(){return(0,a.useContext)(jl)}const Ml=[],Pl=["none","left","center","right","wide","full"],Rl=["wide","full"];function Nl(e=Pl){e.includes("none")||(e=["none",...e]);const t=1===e.length&&"none"===e[0],[n,o,r]=(0,c.useSelect)((e=>{var n;if(t)return[!1,!1,!1];const o=e(li).getSettings();return[null!==(n=o.alignWide)&&void 0!==n&&n,o.supportsLayout,o.__unstableIsBlockBasedTheme]}),[t]),i=Tl();if(t)return Ml;const s=Bl(i?.type);if(o){const t=s.getAlignments(i,r).filter((t=>e.includes(t.name)));return 1===t.length&&"none"===t[0].name?Ml:t}if("default"!==s.name&&"constrained"!==s.name)return Ml;const l=e.filter((e=>i.alignments?i.alignments.includes(e):!(!n&&Rl.includes(e))&&Pl.includes(e))).map((e=>({name:e})));return 1===l.length&&"none"===l[0].name?Ml:l}const Ll=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M5 5.5h8V4H5v1.5ZM5 20h8v-1.5H5V20ZM19 9H5v6h14V9Z"})}),Al=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM7 9h10v6H7V9Z"})}),Dl=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M19 5.5h-8V4h8v1.5ZM19 20h-8v-1.5h8V20ZM5 9h14v6H5V9Z"})}),Ol=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M5 4h14v11H5V4Zm11 16H8v-1.5h8V20Z"})}),zl={none:{icon:gl,title:(0,C._x)("None","Alignment option")},left:{icon:Ll,title:(0,C.__)("Align left")},center:{icon:Al,title:(0,C.__)("Align center")},right:{icon:Dl,title:(0,C.__)("Align right")},wide:{icon:ml,title:(0,C.__)("Wide width")},full:{icon:Ol,title:(0,C.__)("Full width")}};const Vl=function({value:e,onChange:t,controls:n,isToolbar:o,isCollapsed:r=!0}){const i=Nl(n);if(!!!i.length)return null;function s(n){t([e,"none"].includes(n)?void 0:n)}const l=zl[e],a=zl.none,c=o?os.ToolbarGroup:os.ToolbarDropdownMenu,u={icon:l?l.icon:a.icon,label:(0,C.__)("Align")},d=o?{isCollapsed:r,controls:i.map((({name:t})=>({...zl[t],isActive:e===t||!e&&"none"===t,role:r?"menuitemradio":void 0,onClick:()=>s(t)})))}:{toggleProps:{description:(0,C.__)("Change alignment")},children:({onClose:t})=>(0,$.jsx)($.Fragment,{children:(0,$.jsx)(os.MenuGroup,{className:"block-editor-block-alignment-control__menu-group",children:i.map((({name:n,info:o})=>{const{icon:r,title:i}=zl[n],l=n===e||!e&&"none"===n;return(0,$.jsx)(os.MenuItem,{icon:r,iconPosition:"left",className:Zi("components-dropdown-menu__menu-item",{"is-active":l}),isSelected:l,onClick:()=>{s(n),t()},role:"menuitemradio",info:o,children:i},n)}))})})};return(0,$.jsx)(c,{...u,...d})},Fl=e=>(0,$.jsx)(Vl,{...e,isToolbar:!1}),Hl=e=>(0,$.jsx)(Vl,{...e,isToolbar:!0});function Gl(e){const t=_(),{clientId:n=""}=t,{setBlockEditingMode:o,unsetBlockEditingMode:r}=(0,c.useDispatch)(li),i=(0,c.useSelect)((e=>n?null:e(li).getBlockEditingMode()),[n]);return(0,a.useEffect)((()=>(e&&o(n,e),()=>{e&&r(n)})),[n,e,o,r]),n?t[g]:i}const $l=["left","center","right","wide","full"],Ul=["wide","full"];function Wl(e,t=!0,n=!0){let o;return o=Array.isArray(e)?$l.filter((t=>e.includes(t))):!0===e?[...$l]:[],!n||!0===e&&!t?o.filter((e=>!Ul.includes(e))):o}const Kl={shareWithChildBlocks:!0,edit:function({name:e,align:t,setAttributes:n}){const o=Nl(Wl((0,l.getBlockSupport)(e,"align"),(0,l.hasBlockSupport)(e,"alignWide",!0))).map((({name:e})=>e)),r=Gl();return o.length&&"default"===r?(0,$.jsx)(us,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,$.jsx)(Fl,{value:t,onChange:t=>{if(!t){const n=(0,l.getBlockType)(e),o=n?.attributes?.align?.default;o&&(t="")}n({align:t})},controls:o})}):null},useBlockProps:function({name:e,align:t}){const n=Wl((0,l.getBlockSupport)(e,"align"),(0,l.hasBlockSupport)(e,"alignWide",!0));if(Nl(n).some((e=>e.name===t)))return{"data-align":t};return{}},addSaveProps:function(e,t,n){const{align:o}=n,r=(0,l.getBlockSupport)(t,"align"),i=(0,l.hasBlockSupport)(t,"alignWide",!0),s=Wl(r,i).includes(o);s&&(e.className=Zi(`align${o}`,e.className));return e},attributeKeys:["align"],hasSupport:e=>(0,l.hasBlockSupport)(e,"align",!1)};(0,d.addFilter)("blocks.registerBlockType","core/editor/align/addAttribute",(function(e){var t;return"type"in(null!==(t=e.attributes?.align)&&void 0!==t?t:{})||(0,l.hasBlockSupport)(e,"align")&&(e.attributes={...e.attributes,align:{type:"string",enum:[...$l,""]}}),e}));const Zl=(0,os.createSlotFill)("InspectorControls"),ql=(0,os.createSlotFill)("InspectorAdvancedControls"),Yl=(0,os.createSlotFill)("InspectorControlsBindings"),Xl=(0,os.createSlotFill)("InspectorControlsBackground"),Ql=(0,os.createSlotFill)("InspectorControlsBorder"),Jl=(0,os.createSlotFill)("InspectorControlsColor"),ea=(0,os.createSlotFill)("InspectorControlsFilter"),ta=(0,os.createSlotFill)("InspectorControlsDimensions"),na=(0,os.createSlotFill)("InspectorControlsPosition"),oa=(0,os.createSlotFill)("InspectorControlsTypography"),ra=(0,os.createSlotFill)("InspectorControlsListView"),ia=(0,os.createSlotFill)("InspectorControlsStyles"),sa={default:Zl,advanced:ql,background:Xl,bindings:Yl,border:Ql,color:Jl,dimensions:ta,effects:(0,os.createSlotFill)("InspectorControlsEffects"),filter:ea,list:ra,position:na,settings:Zl,styles:ia,typography:oa};function la({children:e,group:t="default",__experimentalGroup:n,resetAllFilter:o}){n&&(y()("`__experimentalGroup` property in `InspectorControlsFill`",{since:"6.2",version:"6.4",alternative:"`group`"}),t=n);const r=_(),i=sa[t]?.Fill;return i&&r[p]?(0,$.jsx)(os.__experimentalStyleProvider,{document,children:(0,$.jsx)(i,{children:t=>(0,$.jsx)(ca,{fillProps:t,children:e,resetAllFilter:o})})}):null}function aa({resetAllFilter:e,children:t}){const{registerResetAllFilter:n,deregisterResetAllFilter:o}=(0,a.useContext)(os.__experimentalToolsPanelContext);return(0,a.useEffect)((()=>{if(e&&n&&o)return n(e),()=>{o(e)}}),[e,n,o]),t}function ca({children:e,resetAllFilter:t,fillProps:n}){const{forwardedContext:o=[]}=n,r=(0,$.jsx)(aa,{resetAllFilter:t,children:e});return o.reduce(((e,[t,n])=>(0,$.jsx)(t,{...n,children:e})),r)}function ua({children:e,group:t,label:n}){const{updateBlockAttributes:o}=(0,c.useDispatch)(li),{getBlockAttributes:r,getMultiSelectedBlockClientIds:i,getSelectedBlockClientId:s,hasMultiSelection:l}=(0,c.useSelect)(li),u=Pi(),d=s(),p=(0,a.useCallback)(((e=[])=>{const t={},n=l()?i():[d];n.forEach((n=>{const{style:o}=r(n);let i={style:o};e.forEach((e=>{i={...i,...e(i)}})),i={...i,style:qi(i.style)},t[n]=i})),o(n,t,!0)}),[r,i,l,d,o]);return(0,$.jsx)(os.__experimentalToolsPanel,{className:`${t}-block-support-panel`,label:n,resetAll:p,panelId:d,hasInnerWrapper:!0,shouldRenderPlaceholderItems:!0,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",dropdownMenuProps:u,children:e},d)}function da({Slot:e,fillProps:t,...n}){const o=(0,a.useContext)(os.__experimentalToolsPanelContext),r=(0,a.useMemo)((()=>{var e;return{...null!=t?t:{},forwardedContext:[...null!==(e=t?.forwardedContext)&&void 0!==e?e:[],[os.__experimentalToolsPanelContext.Provider,{value:o}]]}}),[o,t]);return(0,$.jsx)(e,{...n,fillProps:r,bubblesVirtually:!0})}function pa({__experimentalGroup:e,group:t="default",label:n,fillProps:o,...r}){e&&(y()("`__experimentalGroup` property in `InspectorControlsSlot`",{since:"6.2",version:"6.4",alternative:"`group`"}),t=e);const i=sa[t]?.Slot,s=(0,os.__experimentalUseSlotFills)(i?.__unstableName),l=(0,a.useContext)(os.__unstableMotionContext),c=(0,a.useMemo)((()=>{var e;return{...null!=o?o:{},forwardedContext:[...null!==(e=o?.forwardedContext)&&void 0!==e?e:[],[os.__unstableMotionContext.Provider,{value:l}]]}}),[l,o]);return i&&s?.length?n?(0,$.jsx)(ua,{group:t,label:n,children:(0,$.jsx)(da,{...r,fillProps:c,Slot:i})}):(0,$.jsx)(i,{...r,fillProps:c,bubblesVirtually:!0}):null}const ha=la;ha.Slot=pa;const ga=e=>(0,$.jsx)(la,{...e,group:"advanced"});ga.Slot=e=>(0,$.jsx)(pa,{...e,group:"advanced"}),ga.slotName="InspectorAdvancedControls";const ma=ha,fa=window.wp.url,ba=window.wp.dom,ka=window.wp.blob,va=window.wp.keycodes,_a=(0,$.jsxs)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,$.jsx)(G.Path,{d:"m7 6.5 4 2.5-4 2.5z"}),(0,$.jsx)(G.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"m5 3c-1.10457 0-2 .89543-2 2v14c0 1.1046.89543 2 2 2h14c1.1046 0 2-.8954 2-2v-14c0-1.10457-.8954-2-2-2zm14 1.5h-14c-.27614 0-.5.22386-.5.5v10.7072l3.62953-2.6465c.25108-.1831.58905-.1924.84981-.0234l2.92666 1.8969 3.5712-3.4719c.2911-.2831.7545-.2831 1.0456 0l2.9772 2.8945v-9.3568c0-.27614-.2239-.5-.5-.5zm-14.5 14.5v-1.4364l4.09643-2.987 2.99567 1.9417c.2936.1903.6798.1523.9307-.0917l3.4772-3.3806 3.4772 3.3806.0228-.0234v2.5968c0 .2761-.2239.5-.5.5h-14c-.27614 0-.5-.2239-.5-.5z"})]}),xa=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.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"})}),ya=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.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"})}),Sa=(0,os.withFilters)("editor.MediaUpload")((()=>null));const wa=function({fallback:e=null,children:t}){const n=(0,c.useSelect)((e=>{const{getSettings:t}=e(li);return!!t().mediaUpload}),[]);return n?t:e},Ca=window.wp.isShallowEqual;var Ba=n.n(Ca);const Ia=window.wp.preferences,ja=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",children:(0,$.jsx)(G.Path,{d:"m6.734 16.106 2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.158 1.093-1.028-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"})}),Ea=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})}),Ta=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"})});const Ma=function e({children:t,settingsOpen:n,setSettingsOpen:o}){const r=(0,u.useReducedMotion)(),i=r?a.Fragment:os.__unstableAnimatePresence,s=r?"div":os.__unstableMotion.div,l=`link-control-settings-drawer-${(0,u.useInstanceId)(e)}`;return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,className:"block-editor-link-control__drawer-toggle","aria-expanded":n,onClick:()=>o(!n),icon:(0,C.isRTL)()?Ea:Ta,"aria-controls":l,children:(0,C._x)("Advanced","Additional link settings")}),(0,$.jsx)(i,{children:n&&(0,$.jsx)(s,{className:"block-editor-link-control__drawer",hidden:!n,id:l,initial:"collapsed",animate:"open",exit:"collapsed",variants:{open:{opacity:1,height:"auto"},collapsed:{opacity:0,height:0}},transition:{duration:.1},children:(0,$.jsx)("div",{className:"block-editor-link-control__drawer-inner",children:t})})})]})};var Pa=n(1609);function Ra(e){return"function"==typeof e}class Na 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.suggestionsRequest=null,this.state={suggestions:[],showSuggestions:!1,suggestionsValue:null,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.suggestionNodes[n].scrollIntoView({behavior:"instant",block:"nearest",inline:"nearest"}),e.value===o||this.props.disableSuggestions||(o?.length?this.updateSuggestions(o):r&&this.updateSuggestions())}componentDidMount(){this.shouldShowInitialSuggestions()&&this.updateSuggestions()}componentWillUnmount(){this.suggestionsRequest?.cancel?.(),this.suggestionsRequest=null}bindSuggestionNode(e){return t=>{this.suggestionNodes[e]=t}}shouldShowInitialSuggestions(){const{__experimentalShowInitialSuggestions:e=!1,value:t}=this.props;return e&&!(t&&t.length)}updateSuggestions(e=""){const{__experimentalFetchLinkSuggestions:t,__experimentalHandleURLSuggestions:n}=this.props;if(!t)return;const o=!e?.length;if(e=e.trim(),!o&&(e.length<2||!n&&(0,fa.isURL)(e)))return this.suggestionsRequest?.cancel?.(),this.suggestionsRequest=null,void this.setState({suggestions:[],showSuggestions:!1,suggestionsValue:e,selectedSuggestion:null,loading:!1});this.setState({selectedSuggestion:null,loading:!0});const r=t(e,{isInitialSuggestions:o});r.then((t=>{this.suggestionsRequest===r&&(this.setState({suggestions:t,suggestionsValue:e,loading:!1,showSuggestions:!!t.length}),t.length?this.props.debouncedSpeak((0,C.sprintf)((0,C._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",t.length),t.length),"assertive"):this.props.debouncedSpeak((0,C.__)("No results."),"assertive"))})).catch((()=>{this.suggestionsRequest===r&&this.setState({loading:!1})})).finally((()=>{this.suggestionsRequest===r&&(this.suggestionsRequest=null)})),this.suggestionsRequest=r}onChange(e){this.props.onChange(e)}onFocus(){const{suggestions:e}=this.state,{disableSuggestions:t,value:n}=this.props;!n||t||e&&e.length||null!==this.suggestionsRequest||this.updateSuggestions(n)}onKeyDown(e){this.props.onKeyDown?.(e);const{showSuggestions:t,selectedSuggestion:n,suggestions:o,loading:r}=this.state;if(!t||!o.length||r){switch(e.keyCode){case va.UP:0!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(0,0));break;case va.DOWN:this.props.value.length!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length));break;case va.ENTER:this.props.onSubmit&&(e.preventDefault(),this.props.onSubmit(null,e))}return}const i=this.state.suggestions[this.state.selectedSuggestion];switch(e.keyCode){case va.UP:{e.preventDefault();const t=n?n-1:o.length-1;this.setState({selectedSuggestion:t});break}case va.DOWN:{e.preventDefault();const t=null===n||n===o.length-1?0:n+1;this.setState({selectedSuggestion:t});break}case va.TAB:null!==this.state.selectedSuggestion&&(this.selectLink(i),this.props.speak((0,C.__)("Link selected.")));break;case va.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({value:e,instanceId:t,disableSuggestions:n,__experimentalShowInitialSuggestions:o=!1},{showSuggestions:r}){let i=r;const s=e&&e.length;return o||s||(i=!1),!0===n&&(i=!1),{showSuggestions:i,suggestionsListboxId:`block-editor-url-input-suggestions-${t}`,suggestionOptionIdPrefix:`block-editor-url-input-suggestion-${t}`}}render(){return(0,$.jsxs)($.Fragment,{children:[this.renderControl(),this.renderSuggestions()]})}renderControl(){const{label:e=null,className:t,isFullWidth:n,instanceId:o,placeholder:r=(0,C.__)("Paste URL or type to search"),__experimentalRenderControl:i,value:s="",hideLabelFromVision:l=!1}=this.props,{loading:a,showSuggestions:c,selectedSuggestion:u,suggestionsListboxId:d,suggestionOptionIdPrefix:p}=this.state,h=`url-input-control-${o}`,g={id:h,label:e,className:Zi("block-editor-url-input",t,{"is-full-width":n}),hideLabelFromVision:l},m={id:h,value:s,required:!0,type:"text",onChange:this.onChange,onFocus:this.onFocus,placeholder:r,onKeyDown:this.onKeyDown,role:"combobox","aria-label":e?void 0:(0,C.__)("URL"),"aria-expanded":c,"aria-autocomplete":"list","aria-owns":d,"aria-activedescendant":null!==u?`${p}-${u}`:void 0,ref:this.inputRef,suffix:this.props.suffix};return i?i(g,m,a):(0,$.jsxs)(os.BaseControl,{__nextHasNoMarginBottom:!0,...g,children:[(0,$.jsx)(os.__experimentalInputControl,{...m,__next40pxDefaultSize:!0}),a&&(0,$.jsx)(os.Spinner,{})]})}renderSuggestions(){const{className:e,__experimentalRenderSuggestions:t}=this.props,{showSuggestions:n,suggestions:o,suggestionsValue:r,selectedSuggestion:i,suggestionsListboxId:s,suggestionOptionIdPrefix:l,loading:a}=this.state;if(!n||0===o.length)return null;const c={id:s,ref:this.autocompleteRef,role:"listbox"},u=(e,t)=>({role:"option",tabIndex:"-1",id:`${l}-${t}`,ref:this.bindSuggestionNode(t),"aria-selected":t===i||void 0});return Ra(t)?t({suggestions:o,selectedSuggestion:i,suggestionsListProps:c,buildSuggestionItemProps:u,isLoading:a,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:!r?.length,currentInputValue:r}):(0,$.jsx)(os.Popover,{placement:"bottom",focusOnMount:!1,children:(0,$.jsx)("div",{...c,className:Zi("block-editor-url-input__suggestions",`${e}__suggestions`),children:o.map(((e,t)=>(0,Pa.createElement)(os.Button,{__next40pxDefaultSize:!0,...u(0,t),key:e.id,className:Zi("block-editor-url-input__suggestion",{"is-selected":t===i}),onClick:()=>this.handleOnClick(e)},e.title)))})})}}const La=(0,u.compose)(u.withSafeTimeout,os.withSpokenMessages,u.withInstanceId,(0,c.withSelect)(((e,t)=>{if(Ra(t.__experimentalFetchLinkSuggestions))return;const{getSettings:n}=e(li);return{__experimentalFetchLinkSuggestions:n().__experimentalFetchLinkSuggestions}})))(Na),Aa=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})}),Da=({searchTerm:e,onClick:t,itemProps:n,buttonText:o})=>{if(!e)return null;let r;return r=o?"function"==typeof o?o(e):o:(0,a.createInterpolateElement)((0,C.sprintf)((0,C.__)("Create: <mark>%s</mark>"),e),{mark:(0,$.jsx)("mark",{})}),(0,$.jsx)(os.MenuItem,{...n,iconPosition:"left",icon:Aa,className:"block-editor-link-control__search-item",onClick:t,children:r})},Oa=(0,$.jsx)(G.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,$.jsx)(G.Path,{d:"M18 5.5H6a.5.5 0 0 0-.5.5v12a.5.5 0 0 0 .5.5h12a.5.5 0 0 0 .5-.5V6a.5.5 0 0 0-.5-.5ZM6 4h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Zm1 5h1.5v1.5H7V9Zm1.5 4.5H7V15h1.5v-1.5ZM10 9h7v1.5h-7V9Zm7 4.5h-7V15h7v-1.5Z"})}),za=(0,$.jsxs)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,$.jsx)(G.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,$.jsx)(G.Path,{d:"M17 4H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2ZM7 5.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5Z"})]}),Va=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M4.75 4a.75.75 0 0 0-.75.75v7.826c0 .2.08.39.22.53l6.72 6.716a2.313 2.313 0 0 0 3.276-.001l5.61-5.611-.531-.53.532.528a2.315 2.315 0 0 0 0-3.264L13.104 4.22a.75.75 0 0 0-.53-.22H4.75ZM19 12.576a.815.815 0 0 1-.236.574l-5.61 5.611a.814.814 0 0 1-1.153 0L5.5 12.264V5.5h6.763l6.5 6.502a.816.816 0 0 1 .237.574ZM8.75 9.75a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"})}),Fa=(0,$.jsx)(G.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,$.jsx)(G.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"})}),Ha=(0,$.jsx)(G.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,$.jsx)(G.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12.848 8a1 1 0 0 1-.914-.594l-.723-1.63a.5.5 0 0 0-.447-.276H5a.5.5 0 0 0-.5.5v11.5a.5.5 0 0 0 .5.5h14a.5.5 0 0 0 .5-.5v-9A.5.5 0 0 0 19 8h-6.152Zm.612-1.5a.5.5 0 0 1-.462-.31l-.445-1.084A2 2 0 0 0 10.763 4H5a2 2 0 0 0-2 2v11.5a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-9a2 2 0 0 0-2-2h-5.54Z"})}),Ga=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.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"})}),$a=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"})}),Ua=(0,$.jsx)(G.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,$.jsx)(G.Path,{d:"M17.8 2l-.9.3c-.1 0-3.6 1-5.2 2.1C10 5.5 9.3 6.5 8.9 7.1c-.6.9-1.7 4.7-1.7 6.3l-.9 2.3c-.2.4 0 .8.4 1 .1 0 .2.1.3.1.3 0 .6-.2.7-.5l.6-1.5c.3 0 .7-.1 1.2-.2.7-.1 1.4-.3 2.2-.5.8-.2 1.6-.5 2.4-.8.7-.3 1.4-.7 1.9-1.2s.8-1.2 1-1.9c.2-.7.3-1.6.4-2.4.1-.8.1-1.7.2-2.5 0-.8.1-1.5.2-2.1V2zm-1.9 5.6c-.1.8-.2 1.5-.3 2.1-.2.6-.4 1-.6 1.3-.3.3-.8.6-1.4.9-.7.3-1.4.5-2.2.8-.6.2-1.3.3-1.8.4L15 7.5c.3-.3.6-.7 1-1.1 0 .4 0 .8-.1 1.2zM6 20h8v-1.5H6V20z"})}),Wa={post:Oa,page:za,post_tag:Va,category:Fa,attachment:Ha};function Ka({isURL:e,suggestion:t}){let n=null;return e?n=Ga:t.type in Wa&&(n=Wa[t.type],"page"===t.type&&(t.isFrontPage&&(n=$a),t.isBlogHome&&(n=Ua))),n?(0,$.jsx)(hl,{className:"block-editor-link-control__search-item-icon",icon:n}):null}function Za(e){const t=e?.trim();return t?.length?e?.replace(/^\/?/,"/"):e}function qa(e){const t=e?.trim();return t?.length?e?.replace(/\/$/,""):e}function Ya(e){return e.isFrontPage?"front page":e.isBlogHome?"blog home":"post_tag"===e.type?"tag":e.type}const Xa=({itemProps:e,suggestion:t,searchTerm:n,onClick:o,isURL:r=!1,shouldShowType:i=!1})=>{const s=r?(0,C.__)("Press ENTER to add this link"):(l=t.url)?(0,u.pipe)(fa.safeDecodeURI,fa.getPath,(e=>t=>null==t||t!=t?e:t)(""),((e,...t)=>(...n)=>e(...n,...t))(fa.filterURLForDisplay,24),qa,Za)(l):l;var l;return(0,$.jsx)(os.MenuItem,{...e,info:s,iconPosition:"left",icon:(0,$.jsx)(Ka,{suggestion:t,isURL:r}),onClick:o,shortcut:i&&Ya(t),className:"block-editor-link-control__search-item",children:(0,$.jsx)(os.TextHighlight,{text:(0,ba.__unstableStripHTML)(t.title),highlight:n})})},Qa="__CREATE__",Ja="link",ec="mailto",tc="internal",nc=[Ja,ec,"tel",tc],oc=[{id:"opensInNewTab",title:(0,C.__)("Open in new tab")}];function rc({instanceId:e,withCreateSuggestion:t,currentInputValue:n,handleSuggestionClick:o,suggestionsListProps:r,buildSuggestionItemProps:i,suggestions:s,selectedSuggestion:l,isLoading:a,isInitialSuggestions:c,createSuggestionButtonText:u,suggestionsQuery:d}){const p=Zi("block-editor-link-control__search-results",{"is-loading":a}),h=1===s.length&&nc.includes(s[0].type),g=t&&!h&&!c,m=!d?.type,f=`block-editor-link-control-search-results-label-${e}`,b=c?(0,C.__)("Suggestions"):(0,C.sprintf)((0,C.__)('Search results for "%s"'),n),k=(0,$.jsx)(os.VisuallyHidden,{id:f,children:b});return(0,$.jsxs)("div",{className:"block-editor-link-control__search-results-wrapper",children:[k,(0,$.jsx)("div",{...r,className:p,"aria-labelledby":f,children:(0,$.jsx)(os.MenuGroup,{children:s.map(((e,t)=>g&&Qa===e.type?(0,$.jsx)(Da,{searchTerm:n,buttonText:u,onClick:()=>o(e),itemProps:i(e,t),isSelected:t===l},e.type):Qa===e.type?null:(0,$.jsx)(Xa,{itemProps:i(e,t),suggestion:e,index:t,onClick:()=>{o(e)},isSelected:t===l,isURL:nc.includes(e.type),searchTerm:n,shouldShowType:m,isFrontPage:e?.isFrontPage,isBlogHome:e?.isBlogHome},`${e.id}-${e.type}`)))})})]})}function ic(e){if(e.includes(" "))return!1;const t=(0,fa.getProtocol)(e),n=(0,fa.isValidProtocol)(t),o=function(e,t=6){const n=e.split(/[?#]/)[0];return new RegExp(`(?<=\\S)\\.(?:[a-zA-Z_]{2,${t}})(?:\\/|$)`).test(n)}(e),r=e?.startsWith("www."),i=e?.startsWith("#")&&(0,fa.isValidFragment)(e);return n||r||i||o}const sc=()=>Promise.resolve([]),lc=e=>{let t=Ja;const n=(0,fa.getProtocol)(e)||"";return n.includes("mailto")&&(t=ec),n.includes("tel")&&(t="tel"),e?.startsWith("#")&&(t=tc),Promise.resolve([{id:e,title:e,url:"URL"===t?(0,fa.prependHTTP)(e):e,type:t}])};function ac(e,t,n){const{fetchSearchSuggestions:o,pageOnFront:r,pageForPosts:i}=(0,c.useSelect)((e=>{const{getSettings:t}=e(li);return{pageOnFront:t().pageOnFront,pageForPosts:t().pageForPosts,fetchSearchSuggestions:t().__experimentalFetchLinkSuggestions}}),[]),s=t?lc:sc;return(0,a.useCallback)(((t,{isInitialSuggestions:l})=>ic(t)?s(t,{isInitialSuggestions:l}):(async(e,t,n,o,r,i)=>{const{isInitialSuggestions:s}=t,l=await n(e,t);return l.map((e=>Number(e.id)===r?(e.isFrontPage=!0,e):Number(e.id)===i?(e.isBlogHome=!0,e):e)),s||ic(e)||!o?l:l.concat({title:e,url:e,type:Qa})})(t,{...e,isInitialSuggestions:l},o,n,r,i)),[s,o,r,i,e,n])}const cc=()=>Promise.resolve([]),uc=()=>{},dc=(0,a.forwardRef)((({value:e,children:t,currentLink:n={},className:o=null,placeholder:r=null,withCreateSuggestion:i=!1,onCreateSuggestion:s=uc,onChange:l=uc,onSelect:c=uc,showSuggestions:d=!0,renderSuggestions:p=(e=>(0,$.jsx)(rc,{...e})),fetchSuggestions:h=null,allowDirectEntry:g=!0,showInitialSuggestions:m=!1,suggestionsQuery:f={},withURLSuggestion:b=!0,createSuggestionButtonText:k,hideLabelFromVision:v=!1,suffix:_},x)=>{const y=ac(f,g,i),S=d?h||y:cc,w=(0,u.useInstanceId)(dc),[B,I]=(0,a.useState)(),j=async e=>{let t=e;if(Qa!==e.type){if(g||t&&Object.keys(t).length>=1){const{id:e,url:o,...r}=null!=n?n:{};c({...r,...t},t)}}else try{t=await s(e.title),t?.url&&c(t)}catch(e){}};return(0,$.jsxs)("div",{className:"block-editor-link-control__search-input-container",children:[(0,$.jsx)(La,{disableSuggestions:n?.url===e,label:(0,C.__)("Link"),hideLabelFromVision:v,className:o,value:e,onChange:(e,t)=>{l(e),I(t)},placeholder:null!=r?r:(0,C.__)("Search or type URL"),__experimentalRenderSuggestions:d?e=>p({...e,instanceId:w,withCreateSuggestion:i,createSuggestionButtonText:k,suggestionsQuery:f,handleSuggestionClick:t=>{e.handleSuggestionClick&&e.handleSuggestionClick(t),j(t)}}):null,__experimentalFetchLinkSuggestions:S,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:m,onSubmit:(t,n)=>{const o=t||B;o||e?.trim()?.length?j(o||{url:e}):n.preventDefault()},ref:x,suffix:_}),t]})})),pc=dc,hc=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.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"})}),gc=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})}),mc=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M17.031 4.703 15.576 4l-1.56 3H14v.03l-2.324 4.47H9.5V13h1.396l-1.502 2.889h-.95a3.694 3.694 0 0 1 0-7.389H10V7H8.444a5.194 5.194 0 1 0 0 10.389h.17L7.5 19.53l1.416.719L15.049 8.5h.507a3.694 3.694 0 0 1 0 7.39H14v1.5h1.556a5.194 5.194 0 0 0 .273-10.383l1.202-2.304Z"})}),fc=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.625 5.5h9.75c.069 0 .125.056.125.125v9.75a.125.125 0 0 1-.125.125h-9.75a.125.125 0 0 1-.125-.125v-9.75c0-.069.056-.125.125-.125ZM4 5.625C4 4.728 4.728 4 5.625 4h9.75C16.273 4 17 4.728 17 5.625v9.75c0 .898-.727 1.625-1.625 1.625h-9.75A1.625 1.625 0 0 1 4 15.375v-9.75Zm14.5 11.656v-9H20v9C20 18.8 18.77 20 17.251 20H6.25v-1.5h11.001c.69 0 1.249-.528 1.249-1.219Z"})}),{Slot:bc,Fill:kc}=(0,os.createSlotFill)("BlockEditorLinkControlViewer");function vc(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}`)}}const _c=function(e){const[t,n]=(0,a.useReducer)(vc,{richData:null,isFetching:!1}),{fetchRichUrlData:o}=(0,c.useSelect)((e=>{const{getSettings:t}=e(li);return{fetchRichUrlData:t().__experimentalFetchRichUrlData}}),[]);return(0,a.useEffect)((()=>{if(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 xc({value:e,onEditClick:t,hasRichPreviews:n=!1,hasUnlinkControl:o=!1,onRemove:r}){const i=(0,c.useSelect)((e=>e(Ia.store).get("core","showIconLabels")),[]),s=n?e?.url:null,{richData:l,isFetching:a}=_c(s),d=l&&Object.keys(l).length,p=e&&(0,fa.filterURLForDisplay)((0,fa.safeDecodeURI)(e.url),24)||"",h=!e?.url?.length,g=!h&&(0,ba.__unstableStripHTML)(l?.title||e?.title||p),m=!e?.url||g.replace(/^[a-z\-.\+]+[0-9]*:(\/\/)?/i,"").replace(/^www\./i,"")===p;let f;f=l?.icon?(0,$.jsx)("img",{src:l?.icon,alt:""}):h?(0,$.jsx)(hl,{icon:hc,size:32}):(0,$.jsx)(hl,{icon:Ga});const{createNotice:b}=(0,c.useDispatch)(Uo.store),k=(0,u.useCopyToClipboard)(e.url,(()=>{b("info",(0,C.__)("Link copied to clipboard."),{isDismissible:!0,type:"snackbar"})}));return(0,$.jsx)("div",{"aria-label":(0,C.__)("Currently selected"),className:Zi("block-editor-link-control__search-item",{"is-current":!0,"is-rich":d,"is-fetching":!!a,"is-preview":!0,"is-error":h,"is-url-title":g===p}),children:(0,$.jsxs)("div",{className:"block-editor-link-control__search-item-top",children:[(0,$.jsxs)("span",{className:"block-editor-link-control__search-item-header",children:[(0,$.jsx)("span",{className:Zi("block-editor-link-control__search-item-icon",{"is-image":l?.icon}),children:f}),(0,$.jsx)("span",{className:"block-editor-link-control__search-item-details",children:h?(0,$.jsx)("span",{className:"block-editor-link-control__search-item-error-notice",children:(0,C.__)("Link is empty")}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(os.ExternalLink,{className:"block-editor-link-control__search-item-title",href:e.url,children:(0,$.jsx)(os.__experimentalTruncate,{numberOfLines:1,children:g})}),!m&&(0,$.jsx)("span",{className:"block-editor-link-control__search-item-info",children:(0,$.jsx)(os.__experimentalTruncate,{numberOfLines:1,children:p})})]})})]}),(0,$.jsx)(os.Button,{icon:gc,label:(0,C.__)("Edit link"),onClick:t,size:"compact"}),o&&(0,$.jsx)(os.Button,{icon:mc,label:(0,C.__)("Remove link"),onClick:r,size:"compact"}),(0,$.jsx)(os.Button,{icon:fc,label:(0,C.sprintf)((0,C.__)("Copy link%s"),h||i?"":": "+e.url),ref:k,accessibleWhenDisabled:!0,disabled:h,size:"compact"}),(0,$.jsx)(bc,{fillProps:e})]})})}const yc=()=>{},Sc=({value:e,onChange:t=yc,settings:n})=>{if(!n||!n.length)return null;const o=n=>o=>{t({...e,[n.id]:o})},r=n.map((t=>(0,$.jsx)(os.CheckboxControl,{__nextHasNoMarginBottom:!0,className:"block-editor-link-control__setting",label:t.title,onChange:o(t),checked:!!e&&!!e[t.id],help:t?.help},t.id)));return(0,$.jsxs)("fieldset",{className:"block-editor-link-control__settings",children:[(0,$.jsx)(os.VisuallyHidden,{as:"legend",children:(0,C.__)("Currently selected link settings")}),r]})};const wc=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}}};var Cc=n(5215),Bc=n.n(Cc);const Ic=()=>{},jc="core/block-editor",Ec="linkControlSettingsDrawer";function Tc({searchInputPlaceholder:e,value:t,settings:n=oc,onChange:o=Ic,onRemove:r,onCancel:i,noDirectEntry:s=!1,showSuggestions:l=!0,showInitialSuggestions:u,forceIsEditingLink:d,createSuggestion:p,withCreateSuggestion:h,inputValue:g="",suggestionsQuery:m={},noURLSuggestion:f=!1,createSuggestionButtonText:b,hasRichPreviews:k=!1,hasTextControl:v=!1,renderControlBottom:_=null}){void 0===h&&p&&(h=!0);const[x,y]=(0,a.useState)(!1),{advancedSettingsPreference:S}=(0,c.useSelect)((e=>{var t;return{advancedSettingsPreference:null!==(t=e(Ia.store).get(jc,Ec))&&void 0!==t&&t}}),[]),{set:w}=(0,c.useDispatch)(Ia.store),B=S||x,I=(0,a.useRef)(!0),j=(0,a.useRef)(),E=(0,a.useRef)(),T=(0,a.useRef)(!1),M=n.map((({id:e})=>e)),[P,R,N,L,A]=function(e){const[t,n]=(0,a.useState)(e||{}),[o,r]=(0,a.useState)(e);return Bc()(e,o)||(r(e),n(e)),[t,n,e=>{n({...t,url:e})},e=>{n({...t,title:e})},e=>o=>{const r=Object.keys(o).reduce(((t,n)=>(e.includes(n)&&(t[n]=o[n]),t)),{});n({...t,...r})}]}(t),D=t&&!(0,Ca.isShallowEqualObjects)(P,t),[O,z]=(0,a.useState)(void 0!==d?d:!t||!t.url),{createPage:V,isCreatingPage:F,errorMessage:H}=function(e){const t=(0,a.useRef)(),[n,o]=(0,a.useState)(!1),[r,i]=(0,a.useState)(null);return(0,a.useEffect)((()=>()=>{t.current&&t.current.cancel()}),[]),{createPage:async function(n){o(!0),i(null);try{return t.current=wc(Promise.resolve(e(n))),await t.current.promise}catch(e){if(e&&e.isCanceled)return;throw i(e.message||(0,C.__)("An unknown error occurred during creation. Please try again.")),e}finally{o(!1)}},isCreatingPage:n,errorMessage:r}}(p);(0,a.useEffect)((()=>{void 0!==d&&z(d)}),[d]),(0,a.useEffect)((()=>{if(I.current)return;(ba.focus.focusable.find(j.current)[0]||j.current).focus(),T.current=!1}),[O,F]),(0,a.useEffect)((()=>(I.current=!1,()=>{I.current=!0})),[]);const G=t?.url?.trim()?.length>0,U=()=>{T.current=!!j.current?.contains(j.current.ownerDocument.activeElement),z(!1)},W=()=>{D&&o({...t,...P,url:K}),U()},K=g||P?.url||"",Z=!K?.trim()?.length,q=r&&t&&!O&&!F,Y=O&&G,X=G&&v,Q=(O||!t)&&!F,J=!D||Z,ee=!!n?.length&&O&&G;return(0,$.jsxs)("div",{tabIndex:-1,ref:j,className:"block-editor-link-control",children:[F&&(0,$.jsxs)("div",{className:"block-editor-link-control__loading",children:[(0,$.jsx)(os.Spinner,{})," ",(0,C.__)("Creating"),"…"]}),Q&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)("div",{className:Zi({"block-editor-link-control__search-input-wrapper":!0,"has-text-control":X,"has-actions":Y}),children:[X&&(0,$.jsx)(os.TextControl,{__nextHasNoMarginBottom:!0,ref:E,className:"block-editor-link-control__field block-editor-link-control__text-content",label:(0,C.__)("Text"),value:P?.title,onChange:L,onKeyDown:e=>{const{keyCode:t}=e;t!==va.ENTER||Z||(e.preventDefault(),W())},__next40pxDefaultSize:!0}),(0,$.jsx)(pc,{currentLink:t,className:"block-editor-link-control__field block-editor-link-control__search-input",placeholder:e,value:K,withCreateSuggestion:h,onCreateSuggestion:V,onChange:N,onSelect:e=>{const t=Object.keys(e).reduce(((t,n)=>(M.includes(n)||(t[n]=e[n]),t)),{});o({...P,...t,title:P?.title||e?.title}),U()},showInitialSuggestions:u,allowDirectEntry:!s,showSuggestions:l,suggestionsQuery:m,withURLSuggestion:!f,createSuggestionButtonText:b,hideLabelFromVision:!X,suffix:Y?void 0:(0,$.jsx)(os.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,$.jsx)(os.Button,{onClick:J?Ic:W,label:(0,C.__)("Submit"),icon:ja,className:"block-editor-link-control__search-submit","aria-disabled":J,size:"small"})}),props:!0})]}),H&&(0,$.jsx)(os.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1,children:H})]}),t&&!O&&!F&&(0,$.jsx)(xc,{value:t,onEditClick:()=>z(!0),hasRichPreviews:k,hasUnlinkControl:q,onRemove:()=>{r(),z(!0)}},t?.url),ee&&(0,$.jsx)("div",{className:"block-editor-link-control__tools",children:!Z&&(0,$.jsx)(Ma,{settingsOpen:B,setSettingsOpen:e=>{w&&w(jc,Ec,e),y(e)},children:(0,$.jsx)(Sc,{value:P,settings:n,onChange:A(M)})})}),Y&&(0,$.jsxs)(os.__experimentalHStack,{justify:"right",className:"block-editor-link-control__search-actions",children:[(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:e=>{e.preventDefault(),e.stopPropagation(),R(t),G?U():r?.(),i?.()},children:(0,C.__)("Cancel")}),(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:J?Ic:W,className:"block-editor-link-control__search-submit","aria-disabled":J,children:(0,C.__)("Save")})]}),!F&&_&&_()]})}Tc.ViewerFill=kc,Tc.DEFAULT_LINK_SETTINGS=oc;const Mc=Tc,Pc=()=>{};let Rc=0;const Nc=(0,u.compose)([(0,c.withDispatch)((e=>{const{createNotice:t,removeNotice:n}=e(Uo.store);return{createNotice:t,removeNotice:n}})),(0,os.withFilters)("editor.MediaReplaceFlow")])((({mediaURL:e,mediaId:t,mediaIds:n,allowedTypes:o,accept:r,onError:i,onSelect:s,onSelectURL:l,onReset:u,onToggleFeaturedImage:d,useFeaturedImage:p,onFilesUpload:h=Pc,name:g=(0,C.__)("Replace"),createNotice:m,removeNotice:f,children:b,multiple:k=!1,addToGallery:v,handleUpload:_=!0,popoverProps:x})=>{const y=(0,c.useSelect)((e=>e(li).getSettings().mediaUpload),[]),S=!!y,w=(0,a.useRef)(),B="block-editor/media-replace-flow/error-notice/"+ ++Rc,I=e=>{const t=(0,ba.__unstableStripHTML)(e);i?i(t):setTimeout((()=>{m("error",t,{speak:!0,id:B,isDismissible:!0})}),1e3)},j=(e,t)=>{p&&d&&d(),t(),s(e),(0,$o.speak)((0,C.__)("The media file has been replaced")),f(B)},E=e=>{e.keyCode===va.DOWN&&(e.preventDefault(),e.target.click())},T=k&&!(!o||0===o.length)&&o.every((e=>"image"===e||e.startsWith("image/")));return(0,$.jsx)(os.Dropdown,{popoverProps:x,contentClassName:"block-editor-media-replace-flow__options",renderToggle:({isOpen:e,onToggle:t})=>(0,$.jsx)(os.ToolbarButton,{ref:w,"aria-expanded":e,"aria-haspopup":"true",onClick:t,onKeyDown:E,children:g}),renderContent:({onClose:i})=>(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(os.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu",children:[(0,$.jsxs)(wa,{children:[(0,$.jsx)(Sa,{gallery:T,addToGallery:v,multiple:k,value:k?n:t,onSelect:e=>j(e,i),allowedTypes:o,render:({open:e})=>(0,$.jsx)(os.MenuItem,{icon:_a,onClick:e,children:(0,C.__)("Open Media Library")})}),(0,$.jsx)(os.FormFileUpload,{onChange:e=>{((e,t)=>{const n=e.target.files;if(!_)return t(),s(n);h(n),y({allowedTypes:o,filesList:n,onFileChange:([e])=>{j(e,t)},onError:I})})(e,i)},accept:r,multiple:!!k,render:({openFileDialog:e})=>(0,$.jsx)(os.MenuItem,{icon:xa,onClick:()=>{e()},children:(0,C.__)("Upload")})})]}),d&&(0,$.jsx)(os.MenuItem,{icon:ya,onClick:d,isPressed:p,children:(0,C.__)("Use featured image")}),e&&u&&(0,$.jsx)(os.MenuItem,{onClick:()=>{u(),i()},children:(0,C.__)("Reset")}),"function"==typeof b?b({onClose:i}):b]}),l&&(0,$.jsxs)("form",{className:Zi("block-editor-media-flow__url-input",{"has-siblings":S||d}),children:[(0,$.jsx)("span",{className:"block-editor-media-replace-flow__image-url-label",children:(0,C.__)("Current media URL:")}),(0,$.jsx)(Mc,{value:{url:e},settings:[],showSuggestions:!1,onChange:({url:e})=>{l(e),w.current.focus()}})]})]})})})),Lc="image",Ac={placement:"left-start",offset:36,shift:!0,className:"block-editor-global-styles-background-panel__popover"},Dc=()=>{};const Oc=e=>{if(!e||isNaN(e.x)&&isNaN(e.y))return;return`${100*(isNaN(e.x)?.5:e.x)}% ${100*(isNaN(e.y)?.5:e.y)}%`},zc=e=>{if(!e)return{x:void 0,y:void 0};let[t,n]=e.split(" ").map((e=>parseFloat(e)/100));return t=isNaN(t)?void 0:t,n=isNaN(n)?t:n,{x:t,y:n}};function Vc({as:e="span",imgUrl:t,toggleProps:n={},filename:o,label:r,className:i,onToggleCallback:s=Dc}){return(0,a.useEffect)((()=>{void 0!==n?.isOpen&&s(n?.isOpen)}),[n?.isOpen,s]),(0,$.jsx)(os.__experimentalItemGroup,{as:e,className:i,...n,children:(0,$.jsxs)(os.__experimentalHStack,{justify:"flex-start",as:"span",className:"block-editor-global-styles-background-panel__inspector-preview-inner",children:[t&&(0,$.jsx)("span",{className:"block-editor-global-styles-background-panel__inspector-image-indicator-wrapper","aria-hidden":!0,children:(0,$.jsx)("span",{className:"block-editor-global-styles-background-panel__inspector-image-indicator",style:{backgroundImage:`url(${t})`}})}),(0,$.jsxs)(os.FlexItem,{as:"span",style:t?{}:{flexGrow:1},children:[(0,$.jsx)(os.__experimentalTruncate,{numberOfLines:1,className:"block-editor-global-styles-background-panel__inspector-media-replace-title",children:r}),(0,$.jsx)(os.VisuallyHidden,{as:"span",children:t?(0,C.sprintf)((0,C.__)("Background image: %s"),o||r):(0,C.__)("No background image selected")})]})]})})}function Fc({label:e,filename:t,url:n,children:o,onToggle:r=Dc,hasImageValue:i}){if(!i)return;const s=e||(0,fa.getFilename)(n)||(0,C.__)("Add background image");return(0,$.jsx)(os.Dropdown,{popoverProps:Ac,renderToggle:({onToggle:e,isOpen:o})=>{const i={onClick:e,className:"block-editor-global-styles-background-panel__dropdown-toggle","aria-expanded":o,"aria-label":(0,C.__)("Background size, position and repeat options."),isOpen:o};return(0,$.jsx)(Vc,{imgUrl:n,filename:t,label:s,toggleProps:i,as:"button",onToggleCallback:r})},renderContent:()=>(0,$.jsx)(os.__experimentalDropdownContentWrapper,{className:"block-editor-global-styles-background-panel__dropdown-content-wrapper",paddingSize:"medium",children:o})})}function Hc(){return(0,$.jsx)(os.Placeholder,{className:"block-editor-global-styles-background-panel__loading",children:(0,$.jsx)(os.Spinner,{})})}function Gc({onChange:e,style:t,inheritedValue:n,onRemoveImage:o=Dc,onResetImage:r=Dc,displayInPanel:i,defaultValues:s}){const[l,u]=(0,a.useState)(!1),{getSettings:d}=(0,c.useSelect)(li),{id:p,title:h,url:g}=t?.background?.backgroundImage||{...n?.background?.backgroundImage},m=(0,a.useRef)(),{createErrorNotice:f}=(0,c.useDispatch)(Uo.store),b=e=>{f(e,{type:"snackbar"}),u(!1)},k=n=>{if(!n||!n.url)return e(ve(t,["background","backgroundImage"],void 0)),void u(!1);if((0,ka.isBlobURL)(n.url))return void u(!0);if(n.media_type&&n.media_type!==Lc||!n.media_type&&n.type&&n.type!==Lc)return void b((0,C.__)("Only images can be used as a background image."));const o=t?.background?.backgroundSize||s?.backgroundSize,r=t?.background?.backgroundPosition;e(ve(t,["background"],{...t?.background,backgroundImage:{url:n.url,id:n.id,source:"file",title:n.title||void 0},backgroundPosition:r||"auto"!==o&&o?r:"50% 0",backgroundSize:o})),u(!1)},v=Zc(t),_=()=>{const[e]=ba.focus.tabbable.find(m.current);e?.focus(),e?.click()},x=!v&&Zc(n),y=h||(0,fa.getFilename)(g)||(0,C.__)("Add background image");return(0,$.jsxs)("div",{ref:m,className:"block-editor-global-styles-background-panel__image-tools-panel-item",children:[l&&(0,$.jsx)(Hc,{}),(0,$.jsx)(Nc,{mediaId:p,mediaURL:g,allowedTypes:[Lc],accept:"image/*",onSelect:k,popoverProps:{className:Zi({"block-editor-global-styles-background-panel__media-replace-popover":i})},name:(0,$.jsx)(Vc,{className:"block-editor-global-styles-background-panel__image-preview",imgUrl:g,filename:h,label:y}),variant:"secondary",onError:b,onReset:()=>{_(),r()},children:x&&(0,$.jsx)(os.MenuItem,{onClick:()=>{_(),e(ve(t,["background"],{backgroundImage:"none"})),o()},children:(0,C.__)("Remove")})}),(0,$.jsx)(os.DropZone,{onFilesDrop:e=>{e?.length>1?b((0,C.__)("Only one image can be used as a background image.")):d().mediaUpload({allowedTypes:[Lc],filesList:e,onFileChange([e]){k(e)},onError:b})},label:(0,C.__)("Drop to upload")})]})}function $c({onChange:e,style:t,inheritedValue:n,defaultValues:o}){const r=t?.background?.backgroundSize||n?.background?.backgroundSize,i=t?.background?.backgroundRepeat||n?.background?.backgroundRepeat,s=t?.background?.backgroundImage?.url||n?.background?.backgroundImage?.url,l=t?.background?.backgroundImage?.id,a=t?.background?.backgroundPosition||n?.background?.backgroundPosition,c=t?.background?.backgroundAttachment||n?.background?.backgroundAttachment;let u=!r&&l?o?.backgroundSize:r||"auto";u=["cover","contain","auto"].includes(u)?u:"auto";const d=!("no-repeat"===i||"cover"===u&&void 0===i),p=n=>{let o=i,r=a;"contain"===n&&(o="no-repeat",r=void 0),"cover"===n&&(o=void 0,r=void 0),"cover"!==u&&"contain"!==u||"auto"!==n||(o=void 0,t?.background?.backgroundImage?.id&&(r="50% 0")),n||"auto"!==u||(n="auto"),e(ve(t,["background"],{...t?.background,backgroundPosition:r,backgroundRepeat:o,backgroundSize:n}))},h=!a&&l&&"contain"===r?o?.backgroundPosition:a;return(0,$.jsxs)(os.__experimentalVStack,{spacing:3,className:"single-column",children:[(0,$.jsx)(os.FocalPointPicker,{__nextHasNoMarginBottom:!0,label:(0,C.__)("Focal point"),url:s,value:zc(h),onChange:n=>{e(ve(t,["background","backgroundPosition"],Oc(n)))}}),(0,$.jsx)(os.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,C.__)("Fixed background"),checked:"fixed"===c,onChange:()=>e(ve(t,["background","backgroundAttachment"],"fixed"===c?"scroll":"fixed"))}),(0,$.jsxs)(os.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,size:"__unstable-large",label:(0,C.__)("Size"),value:u,onChange:p,isBlock:!0,help:(g=r||o?.backgroundSize,"cover"===g||void 0===g?(0,C.__)("Image covers the space evenly."):"contain"===g?(0,C.__)("Image is contained without distortion."):(0,C.__)("Image has a fixed width.")),children:[(0,$.jsx)(os.__experimentalToggleGroupControlOption,{value:"cover",label:(0,C._x)("Cover","Size option for background image control")},"cover"),(0,$.jsx)(os.__experimentalToggleGroupControlOption,{value:"contain",label:(0,C._x)("Contain","Size option for background image control")},"contain"),(0,$.jsx)(os.__experimentalToggleGroupControlOption,{value:"auto",label:(0,C._x)("Tile","Size option for background image control")},"tile")]}),(0,$.jsxs)(os.__experimentalHStack,{justify:"flex-start",spacing:2,as:"span",children:[(0,$.jsx)(os.__experimentalUnitControl,{"aria-label":(0,C.__)("Background image width"),onChange:p,value:r,size:"__unstable-large",__unstableInputWidth:"100px",min:0,placeholder:(0,C.__)("Auto"),disabled:"auto"!==u||void 0===u}),(0,$.jsx)(os.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,C.__)("Repeat"),checked:d,onChange:()=>e(ve(t,["background","backgroundRepeat"],!0===d?"no-repeat":"repeat")),disabled:"cover"===u})]})]});var g}function Uc({value:e,onChange:t,inheritedValue:n=e,settings:o,defaultValues:r={}}){const{globalStyles:i,_links:s}=(0,c.useSelect)((e=>{const{getSettings:t}=e(li),n=t();return{globalStyles:n[Z],_links:n[q]}}),[]),l=(0,a.useMemo)((()=>{const e={background:{}};return n?.background?(Object.entries(n?.background).forEach((([t,n])=>{e.background[t]=Di(n,{styles:i,_links:s})})),e):n}),[i,s,n]),u=()=>t(ve(e,["background"],{})),{title:d,url:p}=e?.background?.backgroundImage||{...l?.background?.backgroundImage},h=Zc(e)||Zc(l),g=h&&"none"!==(e?.background?.backgroundImage||n?.background?.backgroundImage)&&(o?.background?.backgroundSize||o?.background?.backgroundPosition||o?.background?.backgroundRepeat),[m,f]=(0,a.useState)(!1);return(0,$.jsx)("div",{className:Zi("block-editor-global-styles-background-panel__inspector-media-replace-container",{"is-open":m}),children:g?(0,$.jsx)(Fc,{label:d,filename:d,url:p,onToggle:f,hasImageValue:h,children:(0,$.jsxs)(os.__experimentalVStack,{spacing:3,className:"single-column",children:[(0,$.jsx)(Gc,{onChange:t,style:e,inheritedValue:l,displayInPanel:!0,onResetImage:()=>{f(!1),u()},onRemoveImage:()=>f(!1),defaultValues:r}),(0,$.jsx)($c,{onChange:t,style:e,defaultValues:r,inheritedValue:l})]})}):(0,$.jsx)(Gc,{onChange:t,style:e,inheritedValue:l,defaultValues:r,onResetImage:()=>{f(!1),u()},onRemoveImage:()=>f(!1)})})}const Wc={backgroundImage:!0};function Kc(e){return"web"===a.Platform.OS&&e?.background?.backgroundImage}function Zc(e){return!!e?.background?.backgroundImage?.id||"string"==typeof e?.background?.backgroundImage||!!e?.background?.backgroundImage?.url}function qc({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r,headerLabel:i}){const s=Pi();return(0,$.jsx)(os.__experimentalToolsPanel,{label:i,resetAll:()=>{const o=e(n);t(o)},panelId:o,dropdownMenuProps:s,children:r})}function Yc({as:e=qc,value:t,onChange:n,inheritedValue:o,settings:r,panelId:i,defaultControls:s=Wc,defaultValues:l={},headerLabel:c=(0,C.__)("Background image")}){const u=Kc(r),d=(0,a.useCallback)((e=>({...e,background:{}})),[]);return(0,$.jsx)(e,{resetAllFilter:d,value:t,onChange:n,panelId:i,headerLabel:c,children:u&&(0,$.jsx)(os.__experimentalToolsPanelItem,{hasValue:()=>!!t?.background,label:(0,C.__)("Image"),onDeselect:()=>n(ve(t,["background"],{})),isShownByDefault:s.backgroundImage,panelId:i,children:(0,$.jsx)(Uc,{value:t,onChange:n,settings:r,inheritedValue:o,defaultControls:s,defaultValues:l})})})}const Xc="background",Qc={backgroundSize:"cover",backgroundPosition:"50% 50%"};function Jc(e,t="any"){const n=(0,l.getBlockSupport)(e,Xc);return!0===n||("any"===t?!!n?.backgroundImage||!!n?.backgroundSize||!!n?.backgroundRepeat:!!n?.[t])}function eu(e){if(!e||!e?.backgroundImage?.url)return;let t;return e?.backgroundSize||(t={backgroundSize:Qc.backgroundSize}),"contain"!==e?.backgroundSize||e?.backgroundPosition||(t={backgroundPosition:Qc.backgroundPosition}),t}function tu(e){return Zc(e)?"has-background":""}function nu({children:e}){const t=(0,a.useCallback)((e=>({...e,style:{...e.style,background:void 0}})),[]);return(0,$.jsx)(ma,{group:"background",resetAllFilter:t,children:e})}function ou({clientId:e,name:t,setAttributes:n,settings:o}){const{style:r,inheritedValue:i}=(0,c.useSelect)((n=>{const{getBlockAttributes:o,getSettings:r}=n(li),i=r();return{style:o(e)?.style,inheritedValue:i[Z]?.blocks?.[t]}}),[e,t]);if(!Kc(o)||!Jc(t,"backgroundImage"))return null;const s={...o,background:{...o.background,backgroundSize:o?.background?.backgroundSize&&Jc(t,"backgroundSize")}};return(0,$.jsx)(Yc,{inheritedValue:i,as:nu,panelId:e,defaultValues:Qc,settings:s,onChange:e=>{n({style:qi(e)})},value:r})}const ru={useBlockProps:function({name:e,style:t}){if(!Jc(e)||!t?.background?.backgroundImage)return;const n=eu(t?.background);return n?{style:{...n}}:void 0},attributeKeys:["style"],hasSupport:Jc};(0,d.addFilter)("blocks.registerBlockType","core/lock/addAttribute",(function(e){var t;return"type"in(null!==(t=e.attributes?.lock)&&void 0!==t?t:{})||(e.attributes={...e.attributes,lock:{type:"object"}}),e}));const iu=/[\s#]/g,su={type:"string",source:"attribute",attribute:"id",selector:"*"};const lu={addSaveProps:function(e,t,n){(0,l.hasBlockSupport)(t,"anchor")&&(e.id=""===n.anchor?null:n.anchor);return e},edit:function({anchor:e,setAttributes:t}){if("default"!==Gl())return null;const n="web"===a.Platform.OS;return(0,$.jsx)(ma,{group:"advanced",children:(0,$.jsx)(os.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,className:"html-anchor-control",label:(0,C.__)("HTML anchor"),help:(0,$.jsxs)($.Fragment,{children:[(0,C.__)("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,$.jsxs)($.Fragment,{children:[" ",(0,$.jsx)(os.ExternalLink,{href:(0,C.__)("https://wordpress.org/documentation/article/page-jumps/"),children:(0,C.__)("Learn more about anchors")})]})]}),value:e||"",placeholder:n?null:(0,C.__)("Add an anchor"),onChange:e=>{e=e.replace(iu,"-"),t({anchor:e})},autoCapitalize:"none",autoComplete:"off"})})},attributeKeys:["anchor"],hasSupport:e=>(0,l.hasBlockSupport)(e,"anchor")};(0,d.addFilter)("blocks.registerBlockType","core/anchor/attribute",(function(e){var t;return"type"in(null!==(t=e.attributes?.anchor)&&void 0!==t?t:{})||(0,l.hasBlockSupport)(e,"anchor")&&(e.attributes={...e.attributes,anchor:su}),e}));const au={type:"string",source:"attribute",attribute:"aria-label",selector:"*"};const cu={addSaveProps:function(e,t,n){return(0,l.hasBlockSupport)(t,"ariaLabel")&&(e["aria-label"]=""===n.ariaLabel?null:n.ariaLabel),e},attributeKeys:["ariaLabel"],hasSupport:e=>(0,l.hasBlockSupport)(e,"ariaLabel")};(0,d.addFilter)("blocks.registerBlockType","core/ariaLabel/attribute",(function(e){return e?.attributes?.ariaLabel?.type||(0,l.hasBlockSupport)(e,"ariaLabel")&&(e.attributes={...e.attributes,ariaLabel:au}),e}));const uu={edit:function({className:e,setAttributes:t}){return"default"!==Gl()?null:(0,$.jsx)(ma,{group:"advanced",children:(0,$.jsx)(os.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,autoComplete:"off",label:(0,C.__)("Additional CSS class(es)"),value:e||"",onChange:e=>{t({className:""!==e?e:void 0})},help:(0,C.__)("Separate multiple classes with spaces.")})})},addSaveProps:function(e,t,n){(0,l.hasBlockSupport)(t,"customClassName",!0)&&n.className&&(e.className=Zi(e.className,n.className));return e},attributeKeys:["className"],hasSupport:e=>(0,l.hasBlockSupport)(e,"customClassName",!0)};(0,d.addFilter)("blocks.registerBlockType","core/editor/custom-class-name/attribute",(function(e){return(0,l.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes={...e.attributes,className:{type:"string"}}),e})),(0,d.addFilter)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",(function(e,t,n,o){if(!(0,l.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]){const o=t[n]?.attributes.className;if(o)return{...e,attributes:{...e.attributes,className:o}}}return e})),(0,d.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",(function(e,t){return(0,l.hasBlockSupport)(t,"className",!0)&&("string"==typeof e.className?e.className=[...new Set([(0,l.getBlockDefaultClassName)(t.name),...e.className.split(" ")])].join(" ").trim():e.className=(0,l.getBlockDefaultClassName)(t.name)),e}));var du={grad:.9,turn:360,rad:360/(2*Math.PI)},pu=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},hu=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},gu=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},mu=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},fu=function(e){return{r:gu(e.r,0,255),g:gu(e.g,0,255),b:gu(e.b,0,255),a:gu(e.a)}},bu=function(e){return{r:hu(e.r),g:hu(e.g),b:hu(e.b),a:hu(e.a,3)}},ku=/^#([0-9a-f]{3,8})$/i,vu=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},_u=function(e){var t=e.r,n=e.g,o=e.b,r=e.a,i=Math.max(t,n,o),s=i-Math.min(t,n,o),l=s?i===t?(n-o)/s:i===n?2+(o-t)/s:4+(t-n)/s:0;return{h:60*(l<0?l+6:l),s:i?s/i*100:0,v:i/255*100,a:r}},xu=function(e){var t=e.h,n=e.s,o=e.v,r=e.a;t=t/360*6,n/=100,o/=100;var i=Math.floor(t),s=o*(1-n),l=o*(1-(t-i)*n),a=o*(1-(1-t+i)*n),c=i%6;return{r:255*[o,l,s,s,a,o][c],g:255*[a,o,o,l,s,s][c],b:255*[s,s,a,o,o,l][c],a:r}},yu=function(e){return{h:mu(e.h),s:gu(e.s,0,100),l:gu(e.l,0,100),a:gu(e.a)}},Su=function(e){return{h:hu(e.h),s:hu(e.s),l:hu(e.l),a:hu(e.a,3)}},wu=function(e){return xu((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},Cu=function(e){return{h:(t=_u(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},Bu=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Iu=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ju=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Eu=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Tu={string:[[function(e){var t=ku.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?hu(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?hu(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=ju.exec(e)||Eu.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:fu({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=Bu.exec(e)||Iu.exec(e);if(!t)return null;var n,o,r=yu({h:(n=t[1],o=t[2],void 0===o&&(o="deg"),Number(n)*(du[o]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return wu(r)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,o=e.b,r=e.a,i=void 0===r?1:r;return pu(t)&&pu(n)&&pu(o)?fu({r:Number(t),g:Number(n),b:Number(o),a:Number(i)}):null},"rgb"],[function(e){var t=e.h,n=e.s,o=e.l,r=e.a,i=void 0===r?1:r;if(!pu(t)||!pu(n)||!pu(o))return null;var s=yu({h:Number(t),s:Number(n),l:Number(o),a:Number(i)});return wu(s)},"hsl"],[function(e){var t=e.h,n=e.s,o=e.v,r=e.a,i=void 0===r?1:r;if(!pu(t)||!pu(n)||!pu(o))return null;var s=function(e){return{h:mu(e.h),s:gu(e.s,0,100),v:gu(e.v,0,100),a:gu(e.a)}}({h:Number(t),s:Number(n),v:Number(o),a:Number(i)});return xu(s)},"hsv"]]},Mu=function(e,t){for(var n=0;n<t.length;n++){var o=t[n][0](e);if(o)return[o,t[n][1]]}return[null,void 0]},Pu=function(e){return"string"==typeof e?Mu(e.trim(),Tu.string):"object"==typeof e&&null!==e?Mu(e,Tu.object):[null,void 0]},Ru=function(e,t){var n=Cu(e);return{h:n.h,s:gu(n.s+100*t,0,100),l:n.l,a:n.a}},Nu=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},Lu=function(e,t){var n=Cu(e);return{h:n.h,s:n.s,l:gu(n.l+100*t,0,100),a:n.a}},Au=function(){function e(e){this.parsed=Pu(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return null!==this.parsed},e.prototype.brightness=function(){return hu(Nu(this.rgba),2)},e.prototype.isDark=function(){return Nu(this.rgba)<.5},e.prototype.isLight=function(){return Nu(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=bu(this.rgba)).r,n=e.g,o=e.b,i=(r=e.a)<1?vu(hu(255*r)):"","#"+vu(t)+vu(n)+vu(o)+i;var e,t,n,o,r,i},e.prototype.toRgb=function(){return bu(this.rgba)},e.prototype.toRgbString=function(){return t=(e=bu(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 Su(Cu(this.rgba))},e.prototype.toHslString=function(){return t=(e=Su(Cu(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=_u(this.rgba),{h:hu(e.h),s:hu(e.s),v:hu(e.v),a:hu(e.a,3)};var e},e.prototype.invert=function(){return Du({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),Du(Ru(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),Du(Ru(this.rgba,-e))},e.prototype.grayscale=function(){return Du(Ru(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),Du(Lu(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),Du(Lu(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?Du({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):hu(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=Cu(this.rgba);return"number"==typeof e?Du({h:e,s:t.s,l:t.l,a:t.a}):hu(t.h)},e.prototype.isEqual=function(e){return this.toHex()===Du(e).toHex()},e}(),Du=function(e){return e instanceof Au?e:new Au(e)},Ou=[],zu=function(e){e.forEach((function(e){Ou.indexOf(e)<0&&(e(Au,Tu),Ou.push(e))}))};function Vu(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 i={};e.prototype.toName=function(t){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var r,s,l=o[this.toHex()];if(l)return l;if(null==t?void 0:t.closest){var a=this.toRgb(),c=1/0,u="black";if(!i.length)for(var d in n)i[d]=new e(n[d]).toRgb();for(var p in n){var h=(r=a,s=i[p],Math.pow(r.r-s.r,2)+Math.pow(r.g-s.g,2)+Math.pow(r.b-s.b,2));h<c&&(c=h,u=p)}return u}},t.string.push([function(t){var o=t.toLowerCase(),r="transparent"===o?"#0000":n[o];return r?new e(r).toRgb():null},"name"])}var Fu=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},Hu=function(e){return.2126*Fu(e.r)+.7152*Fu(e.g)+.0722*Fu(e.b)};function Gu(e){e.prototype.luminance=function(){return e=Hu(this.rgba),void 0===(t=2)&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0;var e,t,n},e.prototype.contrast=function(t){void 0===t&&(t="#FFF");var n,o,r,i,s,l,a,c=t instanceof e?t:new e(t);return i=this.rgba,s=c.toRgb(),n=(l=Hu(i))>(a=Hu(s))?(l+.05)/(a+.05):(a+.05)/(l+.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)>=(s=void 0===(i=(n=t).size)?"normal":i,"AAA"===(r=void 0===(o=n.level)?"AA":o)&&"normal"===s?7:"AA"===r&&"large"===s?3:4.5);var n,o,r,i,s}}zu([Vu,Gu]);const{kebabCase:$u}=te(os.privateApis),Uu=(e,t,n)=>{if(t){const n=e?.find((e=>e.slug===t));if(n)return n}return{color:n}},Wu=(e,t)=>e?.find((e=>e.color===t));function Ku(e,t){if(e&&t)return`has-${$u(t)}-${e}`}function Zu(){const[e,t,n,o,r,i,s,l,c,u]=ci("color.custom","color.palette.custom","color.palette.theme","color.palette.default","color.defaultPalette","color.customGradient","color.gradients.custom","color.gradients.theme","color.gradients.default","color.defaultGradients"),d={disableCustomColors:!e,disableCustomGradients:!i};return d.colors=(0,a.useMemo)((()=>{const e=[];return n&&n.length&&e.push({name:(0,C._x)("Theme","Indicates this palette comes from the theme."),colors:n}),r&&o&&o.length&&e.push({name:(0,C._x)("Default","Indicates this palette comes from WordPress."),colors:o}),t&&t.length&&e.push({name:(0,C._x)("Custom","Indicates this palette comes from the theme."),colors:t}),e}),[t,n,o,r]),d.gradients=(0,a.useMemo)((()=>{const e=[];return l&&l.length&&e.push({name:(0,C._x)("Theme","Indicates this palette comes from the theme."),gradients:l}),u&&c&&c.length&&e.push({name:(0,C._x)("Default","Indicates this palette comes from WordPress."),gradients:c}),s&&s.length&&e.push({name:(0,C._x)("Custom","Indicates this palette is created by the user."),gradients:s}),e}),[s,l,c,u]),d.hasColorsOrGradients=!!d.colors.length||!!d.gradients.length,d}function qu(e){return[...e].sort(((t,n)=>e.filter((e=>e===n)).length-e.filter((e=>e===t)).length)).shift()}function Yu(e={}){const{flat:t,...n}=e;return t||qu(Object.values(n).filter(Boolean))||"px"}function Xu(e={}){if("string"==typeof e)return e;const t=Object.values(e).map((e=>(0,os.__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]:"",i=qu(o);return 0===r||r?`${r}${i}`:void 0}function Qu(e={}){const t=Xu(e);return"string"!=typeof e&&isNaN(parseFloat(t))}function Ju(e){if(!e)return!1;if("string"==typeof e)return!0;return!!Object.values(e).filter((e=>!!e||0===e)).length}function ed({onChange:e,selectedUnits:t,setSelectedUnits:n,values:o,...r}){let i=Xu(o);void 0===i&&(i=Yu(t));const s=Ju(o)&&Qu(o),l=s?(0,C.__)("Mixed"):null;return(0,$.jsx)(os.__experimentalUnitControl,{...r,"aria-label":(0,C.__)("Border radius"),disableUnits:s,isOnly:!0,value:i,onChange:t=>{const n=!isNaN(parseFloat(t));e(n?t:void 0)},onUnitChange:e=>{n({topLeft:e,topRight:e,bottomLeft:e,bottomRight:e})},placeholder:l,size:"__unstable-large"})}const td={topLeft:(0,C.__)("Top left"),topRight:(0,C.__)("Top right"),bottomLeft:(0,C.__)("Bottom left"),bottomRight:(0,C.__)("Bottom right")};function nd({onChange:e,selectedUnits:t,setSelectedUnits:n,values:o,...r}){const i=t=>n=>{if(!e)return;const o=!isNaN(parseFloat(n))?n:void 0;e({...s,[t]:o})},s="string"!=typeof o?o:{topLeft:o,topRight:o,bottomLeft:o,bottomRight:o};return(0,$.jsx)("div",{className:"components-border-radius-control__input-controls-wrapper",children:Object.entries(td).map((([e,o])=>{const[l,a]=(0,os.__experimentalParseQuantityAndUnitFromRawValue)(s[e]),c=s[e]?a:t[e]||t.flat;return(0,$.jsx)(os.Tooltip,{text:o,placement:"top",children:(0,$.jsx)("div",{className:"components-border-radius-control__tooltip-wrapper",children:(0,$.jsx)(os.__experimentalUnitControl,{...r,"aria-label":o,value:[l,c].join(""),onChange:i(e),onUnitChange:(u=e,e=>{const o={...t};o[u]=e,n(o)}),size:"__unstable-large"})})},e);var u}))})}const od=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})});function rd({isLinked:e,...t}){const n=e?(0,C.__)("Unlink radii"):(0,C.__)("Link radii");return(0,$.jsx)(os.Tooltip,{text:n,children:(0,$.jsx)(os.Button,{...t,className:"component-border-radius-control__linked-button",size:"small",icon:e?od:mc,iconSize:24,"aria-label":n})})}const id={topLeft:void 0,topRight:void 0,bottomLeft:void 0,bottomRight:void 0},sd=0,ld={px:100,em:20,rem:20};function ad({onChange:e,values:t}){const[n,o]=(0,a.useState)(!Ju(t)||!Qu(t)),[r,i]=(0,a.useState)({flat:"string"==typeof t?(0,os.__experimentalParseQuantityAndUnitFromRawValue)(t)[1]:void 0,topLeft:(0,os.__experimentalParseQuantityAndUnitFromRawValue)(t?.topLeft)[1],topRight:(0,os.__experimentalParseQuantityAndUnitFromRawValue)(t?.topRight)[1],bottomLeft:(0,os.__experimentalParseQuantityAndUnitFromRawValue)(t?.bottomLeft)[1],bottomRight:(0,os.__experimentalParseQuantityAndUnitFromRawValue)(t?.bottomRight)[1]}),[s]=ci("spacing.units"),l=(0,os.__experimentalUseCustomUnits)({availableUnits:s||["px","em","rem"]}),c=Yu(r),u=l&&l.find((e=>e.value===c)),d=u?.step||1,[p]=(0,os.__experimentalParseQuantityAndUnitFromRawValue)(Xu(t));return(0,$.jsxs)("fieldset",{className:"components-border-radius-control",children:[(0,$.jsx)(os.BaseControl.VisualLabel,{as:"legend",children:(0,C.__)("Radius")}),(0,$.jsxs)("div",{className:"components-border-radius-control__wrapper",children:[n?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(ed,{className:"components-border-radius-control__unit-control",values:t,min:sd,onChange:e,selectedUnits:r,setSelectedUnits:i,units:l}),(0,$.jsx)(os.RangeControl,{__next40pxDefaultSize:!0,label:(0,C.__)("Border radius"),hideLabelFromVision:!0,className:"components-border-radius-control__range-control",value:null!=p?p:"",min:sd,max:ld[c],initialPosition:0,withInputField:!1,onChange:t=>{e(void 0!==t?`${t}${c}`:void 0)},step:d,__nextHasNoMarginBottom:!0})]}):(0,$.jsx)(nd,{min:sd,onChange:e,selectedUnits:r,setSelectedUnits:i,values:t||id,units:l}),(0,$.jsx)(rd,{onClick:()=>o(!n),isLinked:n})]})]})}const cd=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})}),ud=(0,$.jsx)(G.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,$.jsx)(G.Path,{d:"M12 8c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4zm0 6.5c-1.4 0-2.5-1.1-2.5-2.5s1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5-1.1 2.5-2.5 2.5zM12.8 3h-1.5v3h1.5V3zm-1.6 18h1.5v-3h-1.5v3zm6.8-9.8v1.5h3v-1.5h-3zm-12 0H3v1.5h3v-1.5zm9.7 5.6 2.1 2.1 1.1-1.1-2.1-2.1-1.1 1.1zM8.3 7.2 6.2 5.1 5.1 6.2l2.1 2.1 1.1-1.1zM5.1 17.8l1.1 1.1 2.1-2.1-1.1-1.1-2.1 2.1zM18.9 6.2l-1.1-1.1-2.1 2.1 1.1 1.1 2.1-2.1z"})}),dd=[];function pd({shadow:e,onShadowChange:t,settings:n}){const o=fd(n);return(0,$.jsx)("div",{className:"block-editor-global-styles__shadow-popover-container",children:(0,$.jsxs)(os.__experimentalVStack,{spacing:4,children:[(0,$.jsx)(os.__experimentalHeading,{level:5,children:(0,C.__)("Drop shadow")}),(0,$.jsx)(hd,{presets:o,activeShadow:e,onSelect:t}),(0,$.jsx)("div",{className:"block-editor-global-styles__clear-shadow",children:(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>t(void 0),children:(0,C.__)("Clear")})})]})})}function hd({presets:e,activeShadow:t,onSelect:n}){return e?(0,$.jsx)(os.Composite,{role:"listbox",className:"block-editor-global-styles__shadow__list","aria-label":(0,C.__)("Drop shadows"),children:e.map((({name:e,slug:o,shadow:r})=>(0,$.jsx)(gd,{label:e,isActive:r===t,type:"unset"===o?"unset":"preset",onSelect:()=>n(r===t?void 0:r),shadow:r},o)))}):null}function gd({type:e,label:t,isActive:n,onSelect:o,shadow:r}){return(0,$.jsx)(os.Tooltip,{text:t,children:(0,$.jsx)(os.Composite.Item,{role:"option","aria-label":t,"aria-selected":n,className:Zi("block-editor-global-styles__shadow__item",{"is-active":n}),render:(0,$.jsx)("button",{className:Zi("block-editor-global-styles__shadow-indicator",{unset:"unset"===e}),onClick:o,style:{boxShadow:r},"aria-label":t,children:n&&(0,$.jsx)(hl,{icon:cd})})})})}function md({shadow:e,onShadowChange:t,settings:n}){return(0,$.jsx)(os.Dropdown,{popoverProps:{placement:"left-start",offset:36,shift:!0},className:"block-editor-global-styles__shadow-dropdown",renderToggle:({onToggle:e,isOpen:t})=>{const n={onClick:e,className:Zi({"is-open":t}),"aria-expanded":t};return(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,...n,children:(0,$.jsxs)(os.__experimentalHStack,{justify:"flex-start",children:[(0,$.jsx)(hl,{className:"block-editor-global-styles__toggle-icon",icon:ud,size:24}),(0,$.jsx)(os.FlexItem,{children:(0,C.__)("Drop shadow")})]})})},renderContent:()=>(0,$.jsx)(os.__experimentalDropdownContentWrapper,{paddingSize:"medium",children:(0,$.jsx)(pd,{shadow:e,onShadowChange:t,settings:n})})})}function fd(e){return(0,a.useMemo)((()=>{var t;if(!e?.shadow)return dd;const n=e?.shadow?.defaultPresets,{default:o,theme:r,custom:i}=null!==(t=e?.shadow?.presets)&&void 0!==t?t:{},s={name:(0,C.__)("Unset"),slug:"unset",shadow:"none"},l=[...n&&o||dd,...r||dd,...i||dd];return l.length&&l.unshift(s),l}),[e])}function bd(e){return Object.values(kd(e)).some(Boolean)}function kd(e){return{hasBorderColor:vd(e),hasBorderRadius:_d(e),hasBorderStyle:xd(e),hasBorderWidth:yd(e),hasShadow:Sd(e)}}function vd(e){return e?.border?.color}function _d(e){return e?.border?.radius}function xd(e){return e?.border?.style}function yd(e){return e?.border?.width}function Sd(e){const t=fd(e);return!!e?.shadow&&t.length>0}function wd({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r,label:i}){const s=Pi();return(0,$.jsx)(os.__experimentalToolsPanel,{label:i,resetAll:()=>{const o=e(n);t(o)},panelId:o,dropdownMenuProps:s,children:r})}const Cd={radius:!0,color:!0,width:!0,shadow:!0};function Bd({as:e=wd,value:t,onChange:n,inheritedValue:o=t,settings:r,panelId:i,name:s,defaultControls:l=Cd}){var c,u,d,p;const h=Ui(r),g=(0,a.useCallback)((e=>Ni({settings:r},"",e)),[r]),m=e=>{const t=h.flatMap((({colors:e})=>e)).find((({color:t})=>t===e));return t?"var:preset|color|"+t.slug:e},f=(0,a.useMemo)((()=>{if((0,os.__experimentalHasSplitBorders)(o?.border)){const e={...o?.border};return["top","right","bottom","left"].forEach((t=>{e[t]={...e[t],color:g(e[t]?.color)}})),e}return{...o?.border,color:o?.border?.color?g(o?.border?.color):void 0}}),[o?.border,g]),b=e=>n({...t,border:e}),k=vd(r),v=xd(r),_=yd(r),x=_d(r),y=g(f?.radius),S=e=>b({...f,radius:e}),w=()=>{const e=t?.border?.radius;return"object"==typeof e?Object.entries(e).some(Boolean):!!e},B=Sd(r),I=g(o?.shadow),j=null!==(c=r?.shadow?.presets)&&void 0!==c?c:{},E=null!==(u=null!==(d=null!==(p=j.custom)&&void 0!==p?p:j.theme)&&void 0!==d?d:j.default)&&void 0!==u?u:[],T=e=>{const o=E?.find((({shadow:t})=>t===e))?.slug;n(ve(t,["shadow"],o?`var:preset|shadow|${o}`:e||void 0))},M=(0,a.useCallback)((e=>({...e,border:void 0,shadow:void 0})),[]),P=l?.color||l?.width,R=k||v||_||x,N=Dd({blockName:s,hasShadowControl:B,hasBorderControl:R});return(0,$.jsxs)(e,{resetAllFilter:M,value:t,onChange:n,panelId:i,label:N,children:[(_||k)&&(0,$.jsx)(os.__experimentalToolsPanelItem,{hasValue:()=>(0,os.__experimentalIsDefinedBorder)(t?.border),label:(0,C.__)("Border"),onDeselect:()=>(()=>{if(w())return b({radius:t?.border?.radius});b(void 0)})(),isShownByDefault:P,panelId:i,children:(0,$.jsx)(os.__experimentalBorderBoxControl,{colors:h,enableAlpha:!0,enableStyle:v,onChange:e=>{const t={...e};(0,os.__experimentalHasSplitBorders)(t)?["top","right","bottom","left"].forEach((e=>{t[e]&&(t[e]={...t[e],color:m(t[e]?.color)})})):t&&(t.color=m(t.color)),b({radius:f?.radius,...t})},popoverOffset:40,popoverPlacement:"left-start",value:f,__experimentalIsRenderedInSidebar:!0,size:"__unstable-large",hideLabelFromVision:!B,label:(0,C.__)("Border")})}),x&&(0,$.jsx)(os.__experimentalToolsPanelItem,{hasValue:w,label:(0,C.__)("Radius"),onDeselect:()=>S(void 0),isShownByDefault:l.radius,panelId:i,children:(0,$.jsx)(ad,{values:y,onChange:e=>{S(e||void 0)}})}),B&&(0,$.jsxs)(os.__experimentalToolsPanelItem,{label:(0,C.__)("Shadow"),hasValue:()=>!!t?.shadow,onDeselect:()=>T(void 0),isShownByDefault:l.shadow,panelId:i,children:[R?(0,$.jsx)(os.BaseControl.VisualLabel,{as:"legend",children:(0,C.__)("Shadow")}):null,(0,$.jsx)(os.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:(0,$.jsx)(md,{shadow:I,onShadowChange:T,settings:r})})]})]})}const Id="__experimentalBorder",jd="shadow",Ed=(e,t,n)=>{let o;return e.some((e=>e.colors.some((e=>e[t]===n&&(o=e,!0))))),o},Td=({colors:e,namedColor:t,customColor:n})=>{if(t){const n=Ed(e,"slug",t);if(n)return n}if(!n)return{color:void 0};const o=Ed(e,"color",n);return o||{color:n}};function Md(e){const t=/var:preset\|color\|(.+)/.exec(e);return t&&t[1]?t[1]:null}function Pd(e){if((0,os.__experimentalHasSplitBorders)(e?.border))return{style:e,borderColor:void 0};const t=e?.border?.color,n=t?.startsWith("var:preset|color|")?t.substring(17):void 0,o={...e};return o.border={...o.border,color:n?void 0:t},{style:qi(o),borderColor:n}}function Rd(e){return(0,os.__experimentalHasSplitBorders)(e.style?.border)?e.style:{...e.style,border:{...e.style?.border,color:e.borderColor?"var:preset|color|"+e.borderColor:e.style?.border?.color}}}function Nd({label:e,children:t,resetAllFilter:n}){const o=(0,a.useCallback)((e=>{const t=Rd(e),o=n(t);return{...e,...Pd(o)}}),[n]);return(0,$.jsx)(ma,{group:"border",resetAllFilter:o,label:e,children:t})}function Ld({clientId:e,name:t,setAttributes:n,settings:o}){const r=bd(o);const{style:i,borderColor:s}=(0,c.useSelect)((function(t){const{style:n,borderColor:o}=t(li).getBlockAttributes(e)||{};return{style:n,borderColor:o}}),[e]),u=(0,a.useMemo)((()=>Rd({style:i,borderColor:s})),[i,s]);if(!r)return null;const d={...(0,l.getBlockSupport)(t,[Id,"__experimentalDefaultControls"]),...(0,l.getBlockSupport)(t,[jd,"__experimentalDefaultControls"])};return(0,$.jsx)(Bd,{as:Nd,panelId:e,settings:o,value:u,onChange:e=>{n(Pd(e))},defaultControls:d})}function Ad(e,t="any"){if("web"!==a.Platform.OS)return!1;const n=(0,l.getBlockSupport)(e,Id);return!0===n||("any"===t?!!(n?.color||n?.radius||n?.width||n?.style):!!n?.[t])}function Dd({blockName:e,hasBorderControl:t,hasShadowControl:n}={}){const o=kd(ts(e));return t||n||!e||(t=o?.hasBorderColor||o?.hasBorderStyle||o?.hasBorderWidth||o?.hasBorderRadius,n=o?.hasShadow),t&&n?(0,C.__)("Border & Shadow"):n?(0,C.__)("Shadow"):(0,C.__)("Border")}function Od(e,t,n){if(!Ad(t,"color")||Xi(t,Id,"color"))return e;const o=zd(n),r=Zi(e.className,o);return e.className=r||void 0,e}function zd(e){const{borderColor:t,style:n}=e,o=Ku("border-color",t);return Zi({"has-border-color":t||n?.border?.color,[o]:!!o})}const Vd={useBlockProps:function({name:e,borderColor:t,style:n}){const{colors:o}=Zu();if(!Ad(e,"color")||Xi(e,Id,"color"))return{};const{color:r}=Td({colors:o,namedColor:t}),{color:i}=Td({colors:o,namedColor:Md(n?.border?.top?.color)}),{color:s}=Td({colors:o,namedColor:Md(n?.border?.right?.color)}),{color:l}=Td({colors:o,namedColor:Md(n?.border?.bottom?.color)}),{color:a}=Td({colors:o,namedColor:Md(n?.border?.left?.color)});return Od({style:qi({borderTopColor:i||r,borderRightColor:s||r,borderBottomColor:l||r,borderLeftColor:a||r})||{}},e,{borderColor:t,style:n})},addSaveProps:Od,attributeKeys:["borderColor","style"],hasSupport:e=>Ad(e,"color")};function Fd(e){if(e)return`has-${e}-gradient-background`}function Hd(e,t){const n=e?.find((e=>e.slug===t));return n&&n.gradient}function Gd(e,t){const n=e?.find((e=>e.gradient===t));return n}function $d(e,t){const n=Gd(e,t);return n&&n.slug}function Ud({gradientAttribute:e="gradient",customGradientAttribute:t="customGradient"}={}){const{clientId:n}=_(),[o,r,i]=ci("color.gradients.custom","color.gradients.theme","color.gradients.default"),s=(0,a.useMemo)((()=>[...o||[],...r||[],...i||[]]),[o,r,i]),{gradient:l,customGradient:u}=(0,c.useSelect)((o=>{const{getBlockAttributes:r}=o(li),i=r(n)||{};return{customGradient:i[t],gradient:i[e]}}),[n,e,t]),{updateBlockAttributes:d}=(0,c.useDispatch)(li),p=(0,a.useCallback)((o=>{const r=$d(s,o);d(n,r?{[e]:r,[t]:void 0}:{[e]:void 0,[t]:o})}),[s,n,d]),h=Fd(l);let g;return g=l?Hd(s,l):u,{gradientClass:h,gradientValue:g,setGradient:p}}(0,d.addFilter)("blocks.registerBlockType","core/border/addAttributes",(function(e){return Ad(e,"color")?e.attributes.borderColor?e:{...e,attributes:{...e.attributes,borderColor:{type:"string"}}}:e}));const{Tabs:Wd}=te(os.privateApis),Kd=["colors","disableCustomColors","gradients","disableCustomGradients"],Zd={color:"color",gradient:"gradient"};function qd({colors:e,gradients:t,disableCustomColors:n,disableCustomGradients:o,__experimentalIsRenderedInSidebar:r,className:i,label:s,onColorChange:l,onGradientChange:a,colorValue:c,gradientValue:u,clearable:d,showTitle:p=!0,enableAlpha:h,headingLevel:g}){const m=l&&(e&&e.length>0||!n),f=a&&(t&&t.length>0||!o);if(!m&&!f)return null;const b={[Zd.color]:(0,$.jsx)(os.ColorPalette,{value:c,onChange:f?e=>{l(e),a()}:l,colors:e,disableCustomColors:n,__experimentalIsRenderedInSidebar:r,clearable:d,enableAlpha:h,headingLevel:g}),[Zd.gradient]:(0,$.jsx)(os.GradientPicker,{value:u,onChange:m?e=>{a(e),l()}:a,gradients:t,disableCustomGradients:o,__experimentalIsRenderedInSidebar:r,clearable:d,headingLevel:g})},k=e=>(0,$.jsx)("div",{className:"block-editor-color-gradient-control__panel",children:b[e]});return(0,$.jsx)(os.BaseControl,{__nextHasNoMarginBottom:!0,className:Zi("block-editor-color-gradient-control",i),children:(0,$.jsx)("fieldset",{className:"block-editor-color-gradient-control__fieldset",children:(0,$.jsxs)(os.__experimentalVStack,{spacing:1,children:[p&&(0,$.jsx)("legend",{children:(0,$.jsx)("div",{className:"block-editor-color-gradient-control__color-indicator",children:(0,$.jsx)(os.BaseControl.VisualLabel,{children:s})})}),m&&f&&(0,$.jsx)("div",{children:(0,$.jsxs)(Wd,{defaultTabId:u?Zd.gradient:!!m&&Zd.color,children:[(0,$.jsxs)(Wd.TabList,{children:[(0,$.jsx)(Wd.Tab,{tabId:Zd.color,children:(0,C.__)("Color")}),(0,$.jsx)(Wd.Tab,{tabId:Zd.gradient,children:(0,C.__)("Gradient")})]}),(0,$.jsx)(Wd.TabPanel,{tabId:Zd.color,className:"block-editor-color-gradient-control__panel",focusable:!1,children:b.color}),(0,$.jsx)(Wd.TabPanel,{tabId:Zd.gradient,className:"block-editor-color-gradient-control__panel",focusable:!1,children:b.gradient})]})}),!f&&k(Zd.color),!m&&k(Zd.gradient)]})})})}function Yd(e){const[t,n,o,r]=ci("color.palette","color.gradients","color.custom","color.customGradient");return(0,$.jsx)(qd,{colors:t,gradients:n,disableCustomColors:!o,disableCustomGradients:!r,...e})}const Xd=function(e){return Kd.every((t=>e.hasOwnProperty(t)))?(0,$.jsx)(qd,{...e}):(0,$.jsx)(Yd,{...e})};function Qd(e){const t=Jd(e),n=rp(e),o=ep(e),r=np(e),i=op(e),s=tp(e);return t||n||o||r||i||s}function Jd(e){const t=Ui(e);return e?.color?.text&&(t?.length>0||e?.color?.custom)}function ep(e){const t=Ui(e);return e?.color?.link&&(t?.length>0||e?.color?.custom)}function tp(e){const t=Ui(e);return e?.color?.caption&&(t?.length>0||e?.color?.custom)}function np(e){const t=Ui(e),n=Wi(e);return e?.color?.heading&&(t?.length>0||e?.color?.custom||n?.length>0||e?.color?.customGradient)}function op(e){const t=Ui(e),n=Wi(e);return e?.color?.button&&(t?.length>0||e?.color?.custom||n?.length>0||e?.color?.customGradient)}function rp(e){const t=Ui(e),n=Wi(e);return e?.color?.background&&(t?.length>0||e?.color?.custom||n?.length>0||e?.color?.customGradient)}function ip({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r}){const i=Pi();return(0,$.jsx)(os.__experimentalToolsPanel,{label:(0,C.__)("Elements"),resetAll:()=>{const o=e(n);t(o)},panelId:o,hasInnerWrapper:!0,headingLevel:3,className:"color-block-support-panel",__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",dropdownMenuProps:i,children:(0,$.jsx)("div",{className:"color-block-support-panel__inner-wrapper",children:r})})}const sp={text:!0,background:!0,link:!0,heading:!0,button:!0,caption:!0},lp={placement:"left-start",offset:36,shift:!0},{Tabs:ap}=te(os.privateApis),cp=({indicators:e,label:t})=>(0,$.jsxs)(os.__experimentalHStack,{justify:"flex-start",children:[(0,$.jsx)(os.__experimentalZStack,{isLayered:!1,offset:-8,children:e.map(((e,t)=>(0,$.jsx)(os.Flex,{expanded:!1,children:(0,$.jsx)(os.ColorIndicator,{colorValue:e})},t)))}),(0,$.jsx)(os.FlexItem,{className:"block-editor-panel-color-gradient-settings__color-name",title:t,children:t})]});function up({isGradient:e,inheritedValue:t,userValue:n,setValue:o,colorGradientControlSettings:r}){return(0,$.jsx)(Xd,{...r,showTitle:!1,enableAlpha:!0,__experimentalIsRenderedInSidebar:!0,colorValue:e?void 0:t,gradientValue:e?t:void 0,onColorChange:e?void 0:o,onGradientChange:e?o:void 0,clearable:t===n,headingLevel:3})}function dp({label:e,hasValue:t,resetValue:n,isShownByDefault:o,indicators:r,tabs:i,colorGradientControlSettings:s,panelId:l}){var a;const c=i.find((e=>void 0!==e.userValue)),{key:u,...d}=null!==(a=i[0])&&void 0!==a?a:{};return(0,$.jsx)(os.__experimentalToolsPanelItem,{className:"block-editor-tools-panel-color-gradient-settings__item",hasValue:t,label:e,onDeselect:n,isShownByDefault:o,panelId:l,children:(0,$.jsx)(os.Dropdown,{popoverProps:lp,className:"block-editor-tools-panel-color-gradient-settings__dropdown",renderToggle:({onToggle:t,isOpen:n})=>{const o={onClick:t,className:Zi("block-editor-panel-color-gradient-settings__dropdown",{"is-open":n}),"aria-expanded":n,"aria-label":(0,C.sprintf)((0,C.__)("Color %s styles"),e)};return(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,...o,children:(0,$.jsx)(cp,{indicators:r,label:e})})},renderContent:()=>(0,$.jsx)(os.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,$.jsxs)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content",children:[1===i.length&&(0,$.jsx)(up,{...d,colorGradientControlSettings:s},u),i.length>1&&(0,$.jsxs)(ap,{defaultTabId:c?.key,children:[(0,$.jsx)(ap.TabList,{children:i.map((e=>(0,$.jsx)(ap.Tab,{tabId:e.key,children:e.label},e.key)))}),i.map((e=>{const{key:t,...n}=e;return(0,$.jsx)(ap.TabPanel,{tabId:t,focusable:!1,children:(0,$.jsx)(up,{...n,colorGradientControlSettings:s},t)},t)}))]})]})})})})}function pp({as:e=ip,value:t,onChange:n,inheritedValue:o=t,settings:r,panelId:i,defaultControls:s=sp,children:l}){const c=Ui(r),u=Wi(r),d=r?.color?.custom,p=r?.color?.customGradient,h=c.length>0||d,g=u.length>0||p,m=e=>Ni({settings:r},"",e),f=e=>{const t=c.flatMap((({colors:e})=>e)).find((({color:t})=>t===e));return t?"var:preset|color|"+t.slug:e},b=e=>{const t=u.flatMap((({gradients:e})=>e)).find((({gradient:t})=>t===e));return t?"var:preset|gradient|"+t.slug:e},k=rp(r),v=m(o?.color?.background),_=m(t?.color?.background),x=m(o?.color?.gradient),y=m(t?.color?.gradient),S=ep(r),w=m(o?.elements?.link?.color?.text),B=m(t?.elements?.link?.color?.text),I=m(o?.elements?.link?.[":hover"]?.color?.text),j=m(t?.elements?.link?.[":hover"]?.color?.text),E=Jd(r),T=m(o?.color?.text),M=m(t?.color?.text),P=e=>{let o=ve(t,["color","text"],f(e));T===w&&(o=ve(o,["elements","link","color","text"],f(e))),n(o)},R=[{name:"caption",label:(0,C.__)("Captions"),showPanel:tp(r)},{name:"button",label:(0,C.__)("Button"),showPanel:op(r)},{name:"heading",label:(0,C.__)("Heading"),showPanel:np(r)},{name:"h1",label:(0,C.__)("H1"),showPanel:np(r)},{name:"h2",label:(0,C.__)("H2"),showPanel:np(r)},{name:"h3",label:(0,C.__)("H3"),showPanel:np(r)},{name:"h4",label:(0,C.__)("H4"),showPanel:np(r)},{name:"h5",label:(0,C.__)("H5"),showPanel:np(r)},{name:"h6",label:(0,C.__)("H6"),showPanel:np(r)}],N=(0,a.useCallback)((e=>({...e,color:void 0,elements:{...e?.elements,link:{...e?.elements?.link,color:void 0,":hover":{color:void 0}},...R.reduce(((t,n)=>({...t,[n.name]:{...e?.elements?.[n.name],color:void 0}})),{})}})),[]),L=[E&&{key:"text",label:(0,C.__)("Text"),hasValue:()=>!!M,resetValue:()=>P(void 0),isShownByDefault:s.text,indicators:[T],tabs:[{key:"text",label:(0,C.__)("Text"),inheritedValue:T,setValue:P,userValue:M}]},k&&{key:"background",label:(0,C.__)("Background"),hasValue:()=>!!_||!!y,resetValue:()=>{const e=ve(t,["color","background"],void 0);e.color.gradient=void 0,n(e)},isShownByDefault:s.background,indicators:[null!=x?x:v],tabs:[h&&{key:"background",label:(0,C.__)("Color"),inheritedValue:v,setValue:e=>{const o=ve(t,["color","background"],f(e));o.color.gradient=void 0,n(o)},userValue:_},g&&{key:"gradient",label:(0,C.__)("Gradient"),inheritedValue:x,setValue:e=>{const o=ve(t,["color","gradient"],b(e));o.color.background=void 0,n(o)},userValue:y,isGradient:!0}].filter(Boolean)},S&&{key:"link",label:(0,C.__)("Link"),hasValue:()=>!!B||!!j,resetValue:()=>{let e=ve(t,["elements","link",":hover","color","text"],void 0);e=ve(e,["elements","link","color","text"],void 0),n(e)},isShownByDefault:s.link,indicators:[w,I],tabs:[{key:"link",label:(0,C.__)("Default"),inheritedValue:w,setValue:e=>{n(ve(t,["elements","link","color","text"],f(e)))},userValue:B},{key:"hover",label:(0,C.__)("Hover"),inheritedValue:I,setValue:e=>{n(ve(t,["elements","link",":hover","color","text"],f(e)))},userValue:j}]}].filter(Boolean);return R.forEach((({name:e,label:r,showPanel:i})=>{if(!i)return;const l=m(o?.elements?.[e]?.color?.background),a=m(o?.elements?.[e]?.color?.gradient),c=m(o?.elements?.[e]?.color?.text),u=m(t?.elements?.[e]?.color?.background),d=m(t?.elements?.[e]?.color?.gradient),p=m(t?.elements?.[e]?.color?.text),k="caption"!==e;L.push({key:e,label:r,hasValue:()=>!!(p||u||d),resetValue:()=>{const o=ve(t,["elements",e,"color","background"],void 0);o.elements[e].color.gradient=void 0,o.elements[e].color.text=void 0,n(o)},isShownByDefault:s[e],indicators:k?[c,null!=a?a:l]:[c],tabs:[h&&{key:"text",label:(0,C.__)("Text"),inheritedValue:c,setValue:o=>{n(ve(t,["elements",e,"color","text"],f(o)))},userValue:p},h&&k&&{key:"background",label:(0,C.__)("Background"),inheritedValue:l,setValue:o=>{const r=ve(t,["elements",e,"color","background"],f(o));r.elements[e].color.gradient=void 0,n(r)},userValue:u},g&&k&&{key:"gradient",label:(0,C.__)("Gradient"),inheritedValue:a,setValue:o=>{const r=ve(t,["elements",e,"color","gradient"],b(o));r.elements[e].color.background=void 0,n(r)},userValue:d,isGradient:!0}].filter(Boolean)})})),(0,$.jsxs)(e,{resetAllFilter:N,value:t,onChange:n,panelId:i,children:[L.map((e=>{const{key:t,...n}=e;return(0,$.jsx)(dp,{...n,colorGradientControlSettings:{colors:c,disableCustomColors:!d,gradients:u,disableCustomGradients:!p},panelId:i},t)})),l]})}zu([Vu,Gu]);const hp=function({backgroundColor:e,fallbackBackgroundColor:t,fallbackTextColor:n,fallbackLinkColor:o,fontSize:r,isLargeText:i,textColor:s,linkColor:l,enableAlphaChecker:a=!1}){const c=e||t;if(!c)return null;const u=s||n,d=l||o;if(!u&&!d)return null;const p=[{color:u,description:(0,C.__)("text color")},{color:d,description:(0,C.__)("link color")}],h=Du(c),g=h.alpha()<1,m=h.brightness(),f={level:"AA",size:i||!1!==i&&r>=24?"large":"small"};let b="",k="";for(const e of p){if(!e.color)continue;const t=Du(e.color),n=t.isReadable(h,f),o=t.alpha()<1;if(!n){if(g||o)continue;b=m<t.brightness()?(0,C.sprintf)((0,C.__)("This color combination may be hard for people to read. Try using a darker background color and/or a brighter %s."),e.description):(0,C.sprintf)((0,C.__)("This color combination may be hard for people to read. Try using a brighter background color and/or a darker %s."),e.description),k=(0,C.__)("This color combination may be hard for people to read.");break}o&&a&&(b=(0,C.__)("Transparent text may be hard for people to read."),k=(0,C.__)("Transparent text may be hard for people to read."))}return b?((0,$o.speak)(k),(0,$.jsx)("div",{className:"block-editor-contrast-checker",children:(0,$.jsx)(os.Notice,{spokenMessage:null,status:"warning",isDismissible:!1,children:b})})):null},gp=(0,a.createContext)({refsMap:(0,u.observableMap)()});function mp({children:e}){const t=(0,a.useMemo)((()=>({refsMap:(0,u.observableMap)()})),[]);return(0,$.jsx)(gp.Provider,{value:t,children:e})}function fp(e){const{refsMap:t}=(0,a.useContext)(gp);return(0,u.useRefEffect)((n=>(t.set(e,n),()=>t.delete(e))),[e])}function bp(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function kp(e,t){const{refsMap:n}=(0,a.useContext)(gp);(0,a.useLayoutEffect)((()=>{bp(t,n.get(e));const o=n.subscribe(e,(()=>bp(t,n.get(e))));return()=>{o(),bp(t,null)}}),[n,e,t])}function vp(e){const[t,n]=(0,a.useState)(null);return kp(e,n),t}function _p(e){return e.ownerDocument.defaultView.getComputedStyle(e)}function xp({clientId:e}){const[t,n]=(0,a.useState)(),[o,r]=(0,a.useState)(),[i,s]=(0,a.useState)(),l=vp(e);return(0,a.useEffect)((()=>{if(!l)return;r(_p(l).color);const e=l.querySelector("a");e&&e.innerText&&s(_p(e).color);let t=l,o=_p(t).backgroundColor;for(;"rgba(0, 0, 0, 0)"===o&&t.parentNode&&t.parentNode.nodeType===t.parentNode.ELEMENT_NODE;)t=t.parentNode,o=_p(t).backgroundColor;n(o)}),[l]),(0,$.jsx)(hp,{backgroundColor:t,textColor:o,enableAlphaChecker:!0,linkColor:i})}const yp="color",Sp=e=>{const t=(0,l.getBlockSupport)(e,yp);return t&&(!0===t.link||!0===t.gradient||!1!==t.background||!1!==t.text)},wp=e=>{if("web"!==a.Platform.OS)return!1;const t=(0,l.getBlockSupport)(e,yp);return null!==t&&"object"==typeof t&&!!t.link},Cp=e=>{const t=(0,l.getBlockSupport)(e,yp);return null!==t&&"object"==typeof t&&!!t.gradients},Bp=e=>{const t=(0,l.getBlockSupport)(e,yp);return t&&!1!==t.background},Ip=e=>{const t=(0,l.getBlockSupport)(e,yp);return t&&!1!==t.text};function jp(e,t,n){if(!Sp(t)||Xi(t,yp))return e;const o=Cp(t),{backgroundColor:r,textColor:i,gradient:s,style:l}=n,a=e=>!Xi(t,yp,e),c=a("text")?Ku("color",i):void 0,u=a("gradients")?Fd(s):void 0,d=a("background")?Ku("background-color",r):void 0,p=a("background")||a("gradients"),h=r||l?.color?.background||o&&(s||l?.color?.gradient),g=Zi(e.className,c,u,{[d]:!(o&&l?.color?.gradient||!d),"has-text-color":a("text")&&(i||l?.color?.text),"has-background":p&&h,"has-link-color":a("link")&&l?.elements?.link?.color});return e.className=g||void 0,e}function Ep(e){const t=e?.color?.text,n=t?.startsWith("var:preset|color|")?t.substring(17):void 0,o=e?.color?.background,r=o?.startsWith("var:preset|color|")?o.substring(17):void 0,i=e?.color?.gradient,s=i?.startsWith("var:preset|gradient|")?i.substring(20):void 0,l={...e};return l.color={...l.color,text:n?void 0:t,background:r?void 0:o,gradient:s?void 0:i},{style:qi(l),textColor:n,backgroundColor:r,gradient:s}}function Tp(e){return{...e.style,color:{...e.style?.color,text:e.textColor?"var:preset|color|"+e.textColor:e.style?.color?.text,background:e.backgroundColor?"var:preset|color|"+e.backgroundColor:e.style?.color?.background,gradient:e.gradient?"var:preset|gradient|"+e.gradient:e.style?.color?.gradient}}}function Mp({children:e,resetAllFilter:t}){const n=(0,a.useCallback)((e=>{const n=Tp(e),o=t(n);return{...e,...Ep(o)}}),[t]);return(0,$.jsx)(ma,{group:"color",resetAllFilter:n,children:e})}function Pp({clientId:e,name:t,setAttributes:n,settings:o}){const r=Qd(o);const{style:i,textColor:s,backgroundColor:u,gradient:d}=(0,c.useSelect)((function(t){const{style:n,textColor:o,backgroundColor:r,gradient:i}=t(li).getBlockAttributes(e)||{};return{style:n,textColor:o,backgroundColor:r,gradient:i}}),[e]),p=(0,a.useMemo)((()=>Tp({style:i,textColor:s,backgroundColor:u,gradient:d})),[i,s,u,d]);if(!r)return null;const h=(0,l.getBlockSupport)(t,[yp,"__experimentalDefaultControls"]),g="web"===a.Platform.OS&&!p?.color?.gradient&&(o?.color?.text||o?.color?.link)&&!1!==(0,l.getBlockSupport)(t,[yp,"enableContrastChecker"]);return(0,$.jsx)(pp,{as:Mp,panelId:e,settings:o,value:p,onChange:e=>{n(Ep(e))},defaultControls:h,enableContrastChecker:!1!==(0,l.getBlockSupport)(t,[yp,"enableContrastChecker"]),children:g&&(0,$.jsx)(xp,{clientId:e})})}const Rp={useBlockProps:function({name:e,backgroundColor:t,textColor:n,gradient:o,style:r}){const[i,s,l]=ci("color.palette.custom","color.palette.theme","color.palette.default"),c=(0,a.useMemo)((()=>[...i||[],...s||[],...l||[]]),[i,s,l]);if(!Sp(e)||Xi(e,yp))return{};const u={};n&&!Xi(e,yp,"text")&&(u.color=Uu(c,n)?.color),t&&!Xi(e,yp,"background")&&(u.backgroundColor=Uu(c,t)?.color);const d=jp({style:u},e,{textColor:n,backgroundColor:t,gradient:o,style:r}),p=t||r?.color?.background||o||r?.color?.gradient;return{...d,className:Zi(d.className,!p&&tu(r))}},addSaveProps:jp,attributeKeys:["backgroundColor","textColor","gradient","style"],hasSupport:Sp},Np={linkColor:[["style","elements","link","color","text"]],textColor:[["textColor"],["style","color","text"]],backgroundColor:[["backgroundColor"],["style","color","background"]],gradient:[["gradient"],["style","color","gradient"]]};function Lp({__next40pxDefaultSize:e=!1,__nextHasNoMarginBottom:t=!1,value:n="",onChange:o,fontFamilies:r,...i}){const[s]=ci("typography.fontFamilies");if(r||(r=s),!r||0===r.length)return null;const l=[{value:"",label:(0,C.__)("Default")},...r.map((({fontFamily:e,name:t})=>({value:e,label:t||e})))];return t||y()("Bottom margin styles for wp.blockEditor.FontFamilyControl",{since:"6.7",version:"7.0",hint:"Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version"}),(0,$.jsx)(os.SelectControl,{__next40pxDefaultSize:e,__nextHasNoMarginBottom:t,label:(0,C.__)("Font"),options:l,value:n,onChange:o,labelPosition:"top",...i})}(0,d.addFilter)("blocks.registerBlockType","core/color/addAttribute",(function(e){return Sp(e)?(e.attributes.backgroundColor||Object.assign(e.attributes,{backgroundColor:{type:"string"}}),e.attributes.textColor||Object.assign(e.attributes,{textColor:{type:"string"}}),Cp(e)&&!e.attributes.gradient&&Object.assign(e.attributes,{gradient:{type:"string"}}),e):e})),(0,d.addFilter)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",(function(e,t,n,o){const r=e.name;return Yi({linkColor:wp(r),textColor:Ip(r),backgroundColor:Bp(r),gradient:Cp(r)},Np,e,t,n,o)}));const Ap=(e,t)=>e?t?(0,C.__)("Appearance"):(0,C.__)("Font style"):(0,C.__)("Font weight");function Dp(e){const{__next40pxDefaultSize:t=!1,onChange:n,hasFontStyles:o=!0,hasFontWeights:r=!0,fontFamilyFaces:i,value:{fontStyle:s,fontWeight:l},...c}=e,u=o||r,d=Ap(o,r),p={key:"default",name:(0,C.__)("Default"),style:{fontStyle:void 0,fontWeight:void 0}},{fontStyles:h,fontWeights:g,combinedStyleAndWeightOptions:m}=wi(i),f=(0,a.useMemo)((()=>o&&r?(()=>{const e=[p];return m&&e.push(...m),e})():o?(()=>{const e=[p];return h.forEach((({name:t,value:n})=>{e.push({key:n,name:t,style:{fontStyle:n,fontWeight:void 0}})})),e})():(()=>{const e=[p];return g.forEach((({name:t,value:n})=>{e.push({key:n,name:t,style:{fontStyle:void 0,fontWeight:n}})})),e})()),[e.options,h,g,m]),b=f.find((e=>e.style.fontStyle===s&&e.style.fontWeight===l))||f[0];return u&&(0,$.jsx)(os.CustomSelectControl,{...c,className:"components-font-appearance-control",__next40pxDefaultSize:t,label:d,describedBy:b?o?r?(0,C.sprintf)((0,C.__)("Currently selected font appearance: %s"),b.name):(0,C.sprintf)((0,C.__)("Currently selected font style: %s"),b.name):(0,C.sprintf)((0,C.__)("Currently selected font weight: %s"),b.name):(0,C.__)("No selected font appearance"),options:f,value:b,onChange:({selectedItem:e})=>n(e.style)})}const Op=1.5;const zp=({__next40pxDefaultSize:e=!1,value:t,onChange:n,__unstableInputWidth:o="60px",...r})=>{const i=function(e){return void 0!==e&&""!==e}(t),s=(e,t)=>{if(i)return e;switch(`${e}`){case"0.1":return 1.6;case"0":return t?e:1.4;case"":return Op;default:return e}},l=i?t:"";return(0,$.jsx)("div",{className:"block-editor-line-height-control",children:(0,$.jsx)(os.__experimentalNumberControl,{...r,__next40pxDefaultSize:e,__unstableInputWidth:o,__unstableStateReducer:(e,t)=>{const n=["insertText","insertFromPaste"].includes(t.payload.event.nativeEvent?.inputType),o=s(e.value,n);return{...e,value:o}},onChange:(e,{event:t})=>{""!==e?"click"!==t.type?n(`${e}`):n(s(`${e}`,!1)):n()},label:(0,C.__)("Line height"),placeholder:Op,step:.01,spinFactor:10,value:l,min:0,spinControls:"custom"})})};function Vp({__next40pxDefaultSize:e=!1,value:t,onChange:n,__unstableInputWidth:o="60px",...r}){const[i]=ci("spacing.units"),s=(0,os.__experimentalUseCustomUnits)({availableUnits:i||["px","em","rem"],defaultValues:{px:2,em:.2,rem:.2}});return(0,$.jsx)(os.__experimentalUnitControl,{__next40pxDefaultSize:e,...r,label:(0,C.__)("Letter spacing"),value:t,__unstableInputWidth:o,units:s,onChange:n})}const Fp=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M13 5.5H4V4h9v1.5Zm7 7H4V11h16v1.5Zm-7 7H4V18h9v1.5Z"})}),Hp=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M7.5 5.5h9V4h-9v1.5Zm-3.5 7h16V11H4v1.5Zm3.5 7h9V18h-9v1.5Z"})}),Gp=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M11.111 5.5H20V4h-8.889v1.5ZM4 12.5h16V11H4v1.5Zm7.111 7H20V18h-8.889v1.5Z"})}),$p=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M4 12.8h16v-1.5H4v1.5zm0 7h12.4v-1.5H4v1.5zM4 4.3v1.5h16V4.3H4z"})}),Up=[{label:(0,C.__)("Align text left"),value:"left",icon:Fp},{label:(0,C.__)("Align text center"),value:"center",icon:Hp},{label:(0,C.__)("Align text right"),value:"right",icon:Gp},{label:(0,C.__)("Justify text"),value:"justify",icon:$p}],Wp=["left","center","right"];function Kp({className:e,value:t,onChange:n,options:o=Wp}){const r=(0,a.useMemo)((()=>Up.filter((e=>o.includes(e.value)))),[o]);return r.length?(0,$.jsx)(os.__experimentalToggleGroupControl,{isDeselectable:!0,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,C.__)("Text alignment"),className:Zi("block-editor-text-alignment-control",e),value:t,onChange:e=>{n(e===t?void 0:e)},children:r.map((e=>(0,$.jsx)(os.__experimentalToggleGroupControlOptionIcon,{value:e.value,icon:e.icon,label:e.label},e.value)))}):null}const Zp=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M7 11.5h10V13H7z"})}),qp=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.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"})}),Yp=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.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"})}),Xp=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.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"})}),Qp=[{label:(0,C.__)("None"),value:"none",icon:Zp},{label:(0,C.__)("Uppercase"),value:"uppercase",icon:qp},{label:(0,C.__)("Lowercase"),value:"lowercase",icon:Yp},{label:(0,C.__)("Capitalize"),value:"capitalize",icon:Xp}];function Jp({className:e,value:t,onChange:n}){return(0,$.jsx)(os.__experimentalToggleGroupControl,{isDeselectable:!0,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,C.__)("Letter case"),className:Zi("block-editor-text-transform-control",e),value:t,onChange:e=>{n(e===t?void 0:e)},children:Qp.map((e=>(0,$.jsx)(os.__experimentalToggleGroupControlOptionIcon,{value:e.value,icon:e.icon,label:e.label},e.value)))})}const eh=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.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"})}),th=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.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"})}),nh=[{label:(0,C.__)("None"),value:"none",icon:Zp},{label:(0,C.__)("Underline"),value:"underline",icon:eh},{label:(0,C.__)("Strikethrough"),value:"line-through",icon:th}];function oh({value:e,onChange:t,className:n}){return(0,$.jsx)(os.__experimentalToggleGroupControl,{isDeselectable:!0,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,C.__)("Decoration"),className:Zi("block-editor-text-decoration-control",n),value:e,onChange:n=>{t(n===e?void 0:n)},children:nh.map((e=>(0,$.jsx)(os.__experimentalToggleGroupControlOptionIcon,{value:e.value,icon:e.icon,label:e.label},e.value)))})}const rh=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M8.2 14.4h3.9L13 17h1.7L11 6.5H9.3L5.6 17h1.7l.9-2.6zm2-5.5 1.4 4H8.8l1.4-4zm7.4 7.5-1.3.8.8 1.4H5.5V20h14.3l-2.2-3.6z"})}),ih=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M7 5.6v1.7l2.6.9v3.9L7 13v1.7L17.5 11V9.3L7 5.6zm4.2 6V8.8l4 1.4-4 1.4zm-5.7 5.6V5.5H4v14.3l3.6-2.2-.8-1.3-1.3.9z"})}),sh=[{label:(0,C.__)("Horizontal"),value:"horizontal-tb",icon:rh},{label:(0,C.__)("Vertical"),value:(0,C.isRTL)()?"vertical-lr":"vertical-rl",icon:ih}];function lh({className:e,value:t,onChange:n}){return(0,$.jsx)(os.__experimentalToggleGroupControl,{isDeselectable:!0,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,C.__)("Orientation"),className:Zi("block-editor-writing-mode-control",e),value:t,onChange:e=>{n(e===t?void 0:e)},children:sh.map((e=>(0,$.jsx)(os.__experimentalToggleGroupControlOptionIcon,{value:e.value,icon:e.icon,label:e.label},e.value)))})}const ah=1,ch=6;function uh(e){const t=ph(e),n=hh(e),o=gh(e),r=mh(e),i=bh(e),s=fh(e),l=kh(e),a=vh(e),c=_h(e),u=dh(e);return t||n||o||r||i||s||u||l||a||c}function dh(e){return!1!==e?.typography?.defaultFontSizes&&e?.typography?.fontSizes?.default?.length||e?.typography?.fontSizes?.theme?.length||e?.typography?.fontSizes?.custom?.length||e?.typography?.customFontSize}function ph(e){return["default","theme","custom"].some((t=>e?.typography?.fontFamilies?.[t]?.length))}function hh(e){return e?.typography?.lineHeight}function gh(e){return e?.typography?.fontStyle||e?.typography?.fontWeight}function mh(e){return e?.typography?.letterSpacing}function fh(e){return e?.typography?.textTransform}function bh(e){return e?.typography?.textAlign}function kh(e){return e?.typography?.textDecoration}function vh(e){return e?.typography?.writingMode}function _h(e){return e?.typography?.textColumns}function xh({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r}){const i=Pi();return(0,$.jsx)(os.__experimentalToolsPanel,{label:(0,C.__)("Typography"),resetAll:()=>{const o=e(n);t(o)},panelId:o,dropdownMenuProps:i,children:r})}const yh={fontFamily:!0,fontSize:!0,fontAppearance:!0,lineHeight:!0,letterSpacing:!0,textAlign:!0,textTransform:!0,textDecoration:!0,writingMode:!0,textColumns:!0};function Sh({as:e=xh,value:t,onChange:n,inheritedValue:o=t,settings:r,panelId:i,defaultControls:s=yh}){const l=e=>Ni({settings:r},"",e),c=ph(r),u=l(o?.typography?.fontFamily),{fontFamilies:d,fontFamilyFaces:p}=(0,a.useMemo)((()=>function(e,t){var n;const o=e?.typography?.fontFamilies,r=["default","theme","custom"].flatMap((e=>{var t;return null!==(t=o?.[e])&&void 0!==t?t:[]})),i=null!==(n=r.find((e=>e.fontFamily===t))?.fontFace)&&void 0!==n?n:[];return{fontFamilies:r,fontFamilyFaces:i}}(r,u)),[r,u]),h=e=>{const o=d?.find((({fontFamily:t})=>t===e))?.slug;n(ve(t,["typography","fontFamily"],o?`var:preset|font-family|${o}`:e||void 0))},g=dh(r),m=!r?.typography?.customFontSize,f=function(e){var t,n,o;const r=e?.typography?.fontSizes,i=!!e?.typography?.defaultFontSizes;return[...null!==(t=r?.custom)&&void 0!==t?t:[],...null!==(n=r?.theme)&&void 0!==n?n:[],...i&&null!==(o=r?.default)&&void 0!==o?o:[]]}(r),b=l(o?.typography?.fontSize),k=(e,o)=>{n(ve(t,["typography","fontSize"],(o?.slug?`var:preset|font-size|${o?.slug}`:e)||void 0))},v=gh(r),_=function(e){return e?.typography?.fontStyle?e?.typography?.fontWeight?(0,C.__)("Appearance"):(0,C.__)("Font style"):(0,C.__)("Font weight")}(r),x=r?.typography?.fontStyle,y=r?.typography?.fontWeight,S=l(o?.typography?.fontStyle),w=l(o?.typography?.fontWeight),{nearestFontStyle:B,nearestFontWeight:I}=function(e,t,n){let o=t,r=n;const{fontStyles:i,fontWeights:s,combinedStyleAndWeightOptions:l}=wi(e),a=i?.some((({value:e})=>e===t)),c=s?.some((({value:e})=>e?.toString()===n?.toString()));var u,d;return a||(o=t?(u=i,"string"==typeof(d=t)&&d&&["normal","italic","oblique"].includes(d)?!u||0===u.length||u.find((e=>e.value===d))?d:"oblique"!==d||u.find((e=>"oblique"===e.value))?"":"italic":""):l?.find((e=>e.style.fontWeight===Ii(s,n)))?.style?.fontStyle),c||(r=n?Ii(s,n):l?.find((e=>e.style.fontStyle===(o||t)))?.style?.fontWeight),{nearestFontStyle:o,nearestFontWeight:r}}(p,S,w),j=(0,a.useCallback)((({fontStyle:e,fontWeight:o})=>{e===S&&o===w||n({...t,typography:{...t?.typography,fontStyle:e||void 0,fontWeight:o||void 0}})}),[S,w,n,t]),E=(0,a.useCallback)((()=>{j({})}),[j]);(0,a.useEffect)((()=>{B&&I?j({fontStyle:B,fontWeight:I}):E()}),[B,I,E,j]);const T=hh(r),M=l(o?.typography?.lineHeight),P=e=>{n(ve(t,["typography","lineHeight"],e||void 0))},R=mh(r),N=l(o?.typography?.letterSpacing),L=e=>{n(ve(t,["typography","letterSpacing"],e||void 0))},A=_h(r),D=l(o?.typography?.textColumns),O=e=>{n(ve(t,["typography","textColumns"],e||void 0))},z=fh(r),V=l(o?.typography?.textTransform),F=e=>{n(ve(t,["typography","textTransform"],e||void 0))},H=kh(r),G=l(o?.typography?.textDecoration),U=e=>{n(ve(t,["typography","textDecoration"],e||void 0))},W=vh(r),K=l(o?.typography?.writingMode),Z=e=>{n(ve(t,["typography","writingMode"],e||void 0))},q=bh(r),Y=l(o?.typography?.textAlign),X=e=>{n(ve(t,["typography","textAlign"],e||void 0))},Q=(0,a.useCallback)((e=>({...e,typography:{}})),[]);return(0,$.jsxs)(e,{resetAllFilter:Q,value:t,onChange:n,panelId:i,children:[c&&(0,$.jsx)(os.__experimentalToolsPanelItem,{label:(0,C.__)("Font"),hasValue:()=>!!t?.typography?.fontFamily,onDeselect:()=>h(void 0),isShownByDefault:s.fontFamily,panelId:i,children:(0,$.jsx)(Lp,{fontFamilies:d,value:u,onChange:h,size:"__unstable-large",__nextHasNoMarginBottom:!0})}),g&&(0,$.jsx)(os.__experimentalToolsPanelItem,{label:(0,C.__)("Size"),hasValue:()=>!!t?.typography?.fontSize,onDeselect:()=>k(void 0),isShownByDefault:s.fontSize,panelId:i,children:(0,$.jsx)(os.FontSizePicker,{value:b,onChange:k,fontSizes:f,disableCustomFontSizes:m,withReset:!1,withSlider:!0,size:"__unstable-large"})}),v&&(0,$.jsx)(os.__experimentalToolsPanelItem,{className:"single-column",label:_,hasValue:()=>!!t?.typography?.fontStyle||!!t?.typography?.fontWeight,onDeselect:E,isShownByDefault:s.fontAppearance,panelId:i,children:(0,$.jsx)(Dp,{value:{fontStyle:S,fontWeight:w},onChange:j,hasFontStyles:x,hasFontWeights:y,fontFamilyFaces:p,size:"__unstable-large"})}),T&&(0,$.jsx)(os.__experimentalToolsPanelItem,{className:"single-column",label:(0,C.__)("Line height"),hasValue:()=>void 0!==t?.typography?.lineHeight,onDeselect:()=>P(void 0),isShownByDefault:s.lineHeight,panelId:i,children:(0,$.jsx)(zp,{__unstableInputWidth:"auto",value:M,onChange:P,size:"__unstable-large"})}),R&&(0,$.jsx)(os.__experimentalToolsPanelItem,{className:"single-column",label:(0,C.__)("Letter spacing"),hasValue:()=>!!t?.typography?.letterSpacing,onDeselect:()=>L(void 0),isShownByDefault:s.letterSpacing,panelId:i,children:(0,$.jsx)(Vp,{value:N,onChange:L,size:"__unstable-large",__unstableInputWidth:"auto"})}),A&&(0,$.jsx)(os.__experimentalToolsPanelItem,{className:"single-column",label:(0,C.__)("Columns"),hasValue:()=>!!t?.typography?.textColumns,onDeselect:()=>O(void 0),isShownByDefault:s.textColumns,panelId:i,children:(0,$.jsx)(os.__experimentalNumberControl,{label:(0,C.__)("Columns"),max:ch,min:ah,onChange:O,size:"__unstable-large",spinControls:"custom",value:D,initialPosition:1})}),H&&(0,$.jsx)(os.__experimentalToolsPanelItem,{className:"single-column",label:(0,C.__)("Decoration"),hasValue:()=>!!t?.typography?.textDecoration,onDeselect:()=>U(void 0),isShownByDefault:s.textDecoration,panelId:i,children:(0,$.jsx)(oh,{value:G,onChange:U,size:"__unstable-large",__unstableInputWidth:"auto"})}),W&&(0,$.jsx)(os.__experimentalToolsPanelItem,{className:"single-column",label:(0,C.__)("Orientation"),hasValue:()=>!!t?.typography?.writingMode,onDeselect:()=>Z(void 0),isShownByDefault:s.writingMode,panelId:i,children:(0,$.jsx)(lh,{value:K,onChange:Z,size:"__unstable-large",__nextHasNoMarginBottom:!0})}),z&&(0,$.jsx)(os.__experimentalToolsPanelItem,{label:(0,C.__)("Letter case"),hasValue:()=>!!t?.typography?.textTransform,onDeselect:()=>F(void 0),isShownByDefault:s.textTransform,panelId:i,children:(0,$.jsx)(Jp,{value:V,onChange:F,showNone:!0,isBlock:!0,size:"__unstable-large",__nextHasNoMarginBottom:!0})}),q&&(0,$.jsx)(os.__experimentalToolsPanelItem,{label:(0,C.__)("Text alignment"),hasValue:()=>!!t?.typography?.textAlign,onDeselect:()=>X(void 0),isShownByDefault:s.textAlign,panelId:i,children:(0,$.jsx)(Kp,{value:Y,onChange:X,size:"__unstable-large",__nextHasNoMarginBottom:!0})})]})}const wh="typography.lineHeight";const Ch=window.wp.tokenList;var Bh=n.n(Ch);const Ih="typography.__experimentalFontFamily",{kebabCase:jh}=te(os.privateApis);function Eh(e,t,n){if(!(0,l.hasBlockSupport)(t,Ih))return e;if(Xi(t,Xh,"fontFamily"))return e;if(!n?.fontFamily)return e;const o=new(Bh())(e.className);o.add(`has-${jh(n?.fontFamily)}-font-family`);const r=o.value;return e.className=r||void 0,e}const Th={useBlockProps:function({name:e,fontFamily:t}){return Eh({},e,{fontFamily:t})},addSaveProps:Eh,attributeKeys:["fontFamily"],hasSupport:e=>(0,l.hasBlockSupport)(e,Ih)};(0,d.addFilter)("blocks.registerBlockType","core/fontFamily/addAttribute",(function(e){return(0,l.hasBlockSupport)(e,Ih)?(e.attributes.fontFamily||Object.assign(e.attributes,{fontFamily:{type:"string"}}),e):e}));const{kebabCase:Mh}=te(os.privateApis),Ph=(e,t,n)=>{if(t){const n=e?.find((({slug:e})=>e===t));if(n)return n}return{size:n}};function Rh(e,t){const n=e?.find((({size:e})=>e===t));return n||{size:t}}function Nh(e){if(e)return`has-${Mh(e)}-font-size`}const Lh="typography.fontSize";function Ah(e,t,n){if(!(0,l.hasBlockSupport)(t,Lh))return e;if(Xi(t,Xh,"fontSize"))return e;const o=new(Bh())(e.className);o.add(Nh(n.fontSize));const r=o.value;return e.className=r||void 0,e}const Dh={useBlockProps:function({name:e,fontSize:t,style:n}){const[o,r,i]=ci("typography.fontSizes","typography.fluid","layout");if(!(0,l.hasBlockSupport)(e,Lh)||Xi(e,Xh,"fontSize")||!t&&!n?.typography?.fontSize)return;let s;return n?.typography?.fontSize&&(s={style:{fontSize:Ci({size:n.typography.fontSize},{typography:{fluid:r},layout:i})}}),t&&(s={style:{fontSize:Ph(o,t,n?.typography?.fontSize).size}}),s?Ah(s,e,{fontSize:t}):void 0},addSaveProps:Ah,attributeKeys:["fontSize","style"],hasSupport:e=>(0,l.hasBlockSupport)(e,Lh)},Oh={fontSize:[["fontSize"],["style","typography","fontSize"]]};(0,d.addFilter)("blocks.registerBlockType","core/font/addAttribute",(function(e){return(0,l.hasBlockSupport)(e,Lh)?(e.attributes.fontSize||Object.assign(e.attributes,{fontSize:{type:"string"}}),e):e})),(0,d.addFilter)("blocks.switchToBlockType.transformedBlock","core/font-size/addTransforms",(function(e,t,n,o){const r=e.name;return Yi({fontSize:(0,l.hasBlockSupport)(r,Lh)},Oh,e,t,n,o)}));const zh=[{icon:Fp,title:(0,C.__)("Align text left"),align:"left"},{icon:Hp,title:(0,C.__)("Align text center"),align:"center"},{icon:Gp,title:(0,C.__)("Align text right"),align:"right"}],Vh={placement:"bottom-start"};const Fh=function({value:e,onChange:t,alignmentControls:n=zh,label:o=(0,C.__)("Align text"),description:r=(0,C.__)("Change text alignment"),isCollapsed:i=!0,isToolbar:s}){function l(n){return()=>t(e===n?void 0:n)}const a=n.find((t=>t.align===e)),c=s?os.ToolbarGroup:os.ToolbarDropdownMenu,u=s?{isCollapsed:i}:{toggleProps:{description:r},popoverProps:Vh};return(0,$.jsx)(c,{icon:a?a.icon:(0,C.isRTL)()?Gp:Fp,label:o,controls:n.map((t=>{const{align:n}=t,o=e===n;return{...t,isActive:o,role:i?"menuitemradio":void 0,onClick:l(n)}})),...u})},Hh=e=>(0,$.jsx)(Fh,{...e,isToolbar:!1}),Gh=e=>(0,$.jsx)(Fh,{...e,isToolbar:!0}),$h="typography.textAlign",Uh=[{icon:Fp,title:(0,C.__)("Align text left"),align:"left"},{icon:Hp,title:(0,C.__)("Align text center"),align:"center"},{icon:Gp,title:(0,C.__)("Align text right"),align:"right"}],Wh=["left","center","right"],Kh=[];function Zh(e){return Array.isArray(e)?Wh.filter((t=>e.includes(t))):!0===e?Wh:Kh}const qh={edit:function({style:e,name:t,setAttributes:n}){const o=ts(t),r=o?.typography?.textAlign,i=Gl();if(!r||"default"!==i)return null;const s=Zh((0,l.getBlockSupport)(t,$h));if(!s.length)return null;const a=Uh.filter((e=>s.includes(e.align)));return(0,$.jsx)(us,{group:"block",children:(0,$.jsx)(Hh,{value:e?.typography?.textAlign,onChange:t=>{const o={...e,typography:{...e?.typography,textAlign:t}};n({style:qi(o)})},alignmentControls:a})})},useBlockProps:function({name:e,style:t}){if(!t?.typography?.textAlign)return null;if(!Zh((0,l.getBlockSupport)(e,$h)).length)return null;if(Xi(e,Xh,"textAlign"))return null;const n=t.typography.textAlign;return{className:Zi({[`has-text-align-${n}`]:n})}},addSaveProps:function(e,t,n){if(!n?.style?.typography?.textAlign)return e;const{textAlign:o}=n.style.typography,r=(0,l.getBlockSupport)(t,$h);Zh(r).includes(o)&&!Xi(t,Xh,"textAlign")&&(e.className=Zi(`has-text-align-${o}`,e.className));return e},attributeKeys:["style"],hasSupport:e=>(0,l.hasBlockSupport)(e,$h,!1)};function Yh(e,t){return Object.fromEntries(Object.entries(e).filter((([e])=>!t.includes(e))))}const Xh="typography",Qh=[wh,Lh,"typography.__experimentalFontStyle","typography.__experimentalFontWeight",Ih,$h,"typography.textColumns","typography.__experimentalTextDecoration","typography.__experimentalWritingMode","typography.__experimentalTextTransform","typography.__experimentalLetterSpacing"];function Jh(e){const t={...Yh(e,["fontFamily"])},n=e?.typography?.fontSize,o=e?.typography?.fontFamily,r=n?.startsWith("var:preset|font-size|")?n.substring(21):void 0,i=o?.startsWith("var:preset|font-family|")?o.substring(23):void 0;return t.typography={...Yh(t.typography,["fontFamily"]),fontSize:r?void 0:n},{style:qi(t),fontFamily:i,fontSize:r}}function eg(e){return{...e.style,typography:{...e.style?.typography,fontFamily:e.fontFamily?"var:preset|font-family|"+e.fontFamily:void 0,fontSize:e.fontSize?"var:preset|font-size|"+e.fontSize:e.style?.typography?.fontSize}}}function tg({children:e,resetAllFilter:t}){const n=(0,a.useCallback)((e=>{const n=eg(e),o=t(n);return{...e,...Jh(o)}}),[t]);return(0,$.jsx)(ma,{group:"typography",resetAllFilter:n,children:e})}function ng({clientId:e,name:t,setAttributes:n,settings:o}){const{style:r,fontFamily:i,fontSize:s}=(0,c.useSelect)((function(t){const{style:n,fontFamily:o,fontSize:r}=t(li).getBlockAttributes(e)||{};return{style:n,fontFamily:o,fontSize:r}}),[e]),u=uh(o),d=(0,a.useMemo)((()=>eg({style:r,fontFamily:i,fontSize:s})),[r,s,i]);if(!u)return null;const p=(0,l.getBlockSupport)(t,[Xh,"__experimentalDefaultControls"]);return(0,$.jsx)(Sh,{as:tg,panelId:e,settings:o,value:d,onChange:e=>{n(Jh(e))},defaultControls:p})}const og=(0,$.jsxs)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,$.jsx)(G.Path,{d:"m19 7.5h-7.628c-.3089-.87389-1.1423-1.5-2.122-1.5-.97966 0-1.81309.62611-2.12197 1.5h-2.12803v1.5h2.12803c.30888.87389 1.14231 1.5 2.12197 1.5.9797 0 1.8131-.62611 2.122-1.5h7.628z"}),(0,$.jsx)(G.Path,{d:"m19 15h-2.128c-.3089-.8739-1.1423-1.5-2.122-1.5s-1.8131.6261-2.122 1.5h-7.628v1.5h7.628c.3089.8739 1.1423 1.5 2.122 1.5s1.8131-.6261 2.122-1.5h2.128z"})]}),rg={px:{max:300,steps:1},"%":{max:100,steps:1},vw:{max:100,steps:1},vh:{max:100,steps:1},em:{max:10,steps:.1},rm:{max:10,steps:.1},svw:{max:100,steps:1},lvw:{max:100,steps:1},dvw:{max:100,steps:1},svh:{max:100,steps:1},lvh:{max:100,steps:1},dvh:{max:100,steps:1},vi:{max:100,steps:1},svi:{max:100,steps:1},lvi:{max:100,steps:1},dvi:{max:100,steps:1},vb:{max:100,steps:1},svb:{max:100,steps:1},lvb:{max:100,steps:1},dvb:{max:100,steps:1},vmin:{max:100,steps:1},svmin:{max:100,steps:1},lvmin:{max:100,steps:1},dvmin:{max:100,steps:1},vmax:{max:100,steps:1},svmax:{max:100,steps:1},lvmax:{max:100,steps:1},dvmax:{max:100,steps:1}};function ig({icon:e,isMixed:t=!1,minimumCustomValue:n,onChange:o,onMouseOut:r,onMouseOver:i,showSideInLabel:s=!0,side:l,spacingSizes:d,type:p,value:h}){var g,m;h=Ds(h,d);let f=d;const b=d.length<=Es,k=(0,c.useSelect)((e=>{const t=e(li).getSettings();return t?.disableCustomSpacingSizes})),[v,_]=(0,a.useState)(!k&&void 0!==h&&!Ls(h)),[x,y]=(0,a.useState)(n),S=(0,u.usePrevious)(h);h&&S!==h&&!Ls(h)&&!0!==v&&_(!0);const[w]=ci("spacing.units"),B=(0,os.__experimentalUseCustomUnits)({availableUnits:w||["px","em","rem"]});let I=null;!b&&!v&&void 0!==h&&(!Ls(h)||Ls(h)&&t)?(f=[...d,{name:t?(0,C.__)("Mixed"):(0,C.sprintf)((0,C.__)("Custom (%s)"),h),slug:"custom",size:h}],I=f.length-1):t||(I=v?As(h,d):function(e,t){if(void 0===e)return 0;const n=0===parseFloat(e,10)?"0":zs(e),o=t.findIndex((e=>String(e.slug)===n));return-1!==o?o:NaN}(h,d));const j=(0,a.useMemo)((()=>(0,os.__experimentalParseQuantityAndUnitFromRawValue)(I)),[I])[1]||B[0]?.value,E=parseFloat(I,10),T=(e,t)=>{const n=parseInt(e,10);if("selectList"===t){if(0===n)return;if(1===n)return"0"}else if(0===n)return"0";return`var:preset|spacing|${d[e]?.slug}`},M=t?(0,C.__)("Mixed"):null,P=f.map(((e,t)=>({key:t,name:e.name}))),R=d.slice(1,d.length-1).map(((e,t)=>({value:t+1,label:void 0}))),N=Ts.includes(l)&&s?Rs[l]:"",L=s?p?.toLowerCase():p,A=(0,C.sprintf)((0,C._x)("%1$s %2$s","spacing"),N,L).trim();return(0,$.jsxs)(os.__experimentalHStack,{className:"spacing-sizes-control__wrapper",children:[e&&(0,$.jsx)(os.Icon,{className:"spacing-sizes-control__icon",icon:e,size:24}),v&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(os.__experimentalUnitControl,{onMouseOver:i,onMouseOut:r,onFocus:i,onBlur:r,onChange:e=>o((e=>isNaN(parseFloat(e))?void 0:e)(e)),value:I,units:B,min:x,placeholder:M,disableUnits:t,label:A,hideLabelFromVision:!0,className:"spacing-sizes-control__custom-value-input",size:"__unstable-large",onDragStart:()=>{"-"===h?.charAt(0)&&y(0)},onDrag:()=>{"-"===h?.charAt(0)&&y(0)},onDragEnd:()=>{y(n)}}),(0,$.jsx)(os.RangeControl,{__next40pxDefaultSize:!0,onMouseOver:i,onMouseOut:r,onFocus:i,onBlur:r,value:E,min:0,max:null!==(g=rg[j]?.max)&&void 0!==g?g:10,step:null!==(m=rg[j]?.steps)&&void 0!==m?m:.1,withInputField:!1,onChange:e=>{o([e,j].join(""))},className:"spacing-sizes-control__custom-value-range",__nextHasNoMarginBottom:!0,label:A,hideLabelFromVision:!0})]}),b&&!v&&(0,$.jsx)(os.RangeControl,{__next40pxDefaultSize:!0,onMouseOver:i,onMouseOut:r,className:"spacing-sizes-control__range-control",value:I,onChange:e=>o(T(e)),onMouseDown:e=>{e?.nativeEvent?.offsetX<35&&void 0===h&&o("0")},withInputField:!1,"aria-valuenow":I,"aria-valuetext":d[I]?.name,renderTooltipContent:e=>void 0===h?void 0:d[e]?.name,min:0,max:d.length-1,marks:R,label:A,hideLabelFromVision:!0,__nextHasNoMarginBottom:!0,onFocus:i,onBlur:r}),!b&&!v&&(0,$.jsx)(os.CustomSelectControl,{className:"spacing-sizes-control__custom-select-control",value:P.find((e=>e.key===I))||"",onChange:e=>{o(T(e.selectedItem.key,"selectList"))},options:P,label:A,hideLabelFromVision:!0,size:"__unstable-large",onMouseOver:i,onMouseOut:r,onFocus:i,onBlur:r}),!k&&(0,$.jsx)(os.Button,{label:v?(0,C.__)("Use size preset"):(0,C.__)("Set custom size"),icon:og,onClick:()=>{_(!v)},isPressed:v,size:"small",className:"spacing-sizes-control__custom-toggle",iconSize:24})]})}const sg=["vertical","horizontal"];function lg({minimumCustomValue:e,onChange:t,onMouseOut:n,onMouseOver:o,sides:r,spacingSizes:i,type:s,values:l}){const a=e=>n=>{if(!t)return;const o={...Object.keys(l).reduce(((e,t)=>(e[t]=Ds(l[t],i),e)),{})};"vertical"===e&&(o.top=n,o.bottom=n),"horizontal"===e&&(o.left=n,o.right=n),t(o)},c=r?.length?sg.filter((e=>Vs(r,e))):sg;return(0,$.jsx)($.Fragment,{children:c.map((t=>{const r="vertical"===t?l.top:l.left;return(0,$.jsx)(ig,{icon:Ps[t],label:Rs[t],minimumCustomValue:e,onChange:a(t),onMouseOut:n,onMouseOver:o,side:t,spacingSizes:i,type:s,value:r,withInputField:!1},`spacing-sizes-control-${t}`)}))})}function ag({minimumCustomValue:e,onChange:t,onMouseOut:n,onMouseOver:o,sides:r,spacingSizes:i,type:s,values:l}){const a=r?.length?Ts.filter((e=>r.includes(e))):Ts,c=e=>n=>{const o={...Object.keys(l).reduce(((e,t)=>(e[t]=Ds(l[t],i),e)),{})};o[e]=n,t(o)};return(0,$.jsx)($.Fragment,{children:a.map((t=>(0,$.jsx)(ig,{icon:Ps[t],label:Rs[t],minimumCustomValue:e,onChange:c(t),onMouseOut:n,onMouseOver:o,side:t,spacingSizes:i,type:s,value:l[t],withInputField:!1},`spacing-sizes-control-${t}`)))})}function cg({minimumCustomValue:e,onChange:t,onMouseOut:n,onMouseOver:o,showSideInLabel:r,side:i,spacingSizes:s,type:l,values:a}){return(0,$.jsx)(ig,{label:Rs[i],minimumCustomValue:e,onChange:(c=i,e=>{const n={...Object.keys(a).reduce(((e,t)=>(e[t]=Ds(a[t],s),e)),{})};n[c]=e,t(n)}),onMouseOut:n,onMouseOver:o,showSideInLabel:r,side:i,spacingSizes:s,type:l,value:a[i],withInputField:!1});var c}function ug({isLinked:e,...t}){const n=e?(0,C.__)("Unlink sides"):(0,C.__)("Link sides");return(0,$.jsx)(os.Tooltip,{text:n,children:(0,$.jsx)(os.Button,{...t,size:"small",icon:e?od:mc,iconSize:24,"aria-label":n})})}const dg=[],pg=new Intl.Collator("und",{numeric:!0}).compare;function hg(){const[e,t,n,o]=ci("spacing.spacingSizes.custom","spacing.spacingSizes.theme","spacing.spacingSizes.default","spacing.defaultSpacingSizes"),r=null!=e?e:dg,i=null!=t?t:dg,s=n&&!1!==o?n:dg;return(0,a.useMemo)((()=>{const e=[{name:(0,C.__)("None"),slug:"0",size:0},...r,...i,...s];return e.every((({slug:e})=>/^[0-9]/.test(e)))&&e.sort(((e,t)=>pg(e.slug,t.slug))),e.length>Es?[{name:(0,C.__)("Default"),slug:"default",size:void 0},...e]:e}),[r,i,s])}function gg({inputProps:e,label:t,minimumCustomValue:n=0,onChange:o,onMouseOut:r,onMouseOver:i,showSideInLabel:s=!0,sides:l=Ts,useSelect:c,values:u}){const d=hg(),p=u||Ms,h=1===l?.length,g=l?.includes("horizontal")&&l?.includes("vertical")&&2===l?.length,[m,f]=(0,a.useState)(function(e={},t){const{top:n,right:o,bottom:r,left:i}=e,s=[n,o,r,i].filter(Boolean),l=!(n!==r||i!==o||!n&&!i),a=!s.length&&function(e=[]){const t={top:0,right:0,bottom:0,left:0};return e.forEach((e=>t[e]+=1)),(t.top+t.bottom)%2==0&&(t.left+t.right)%2==0}(t),c=t?.includes("horizontal")&&t?.includes("vertical")&&2===t?.length;if(Vs(t)&&(l||a))return Ns.axial;if(c&&1===s.length){let t;return Object.entries(e).some((([e,n])=>(t=e,void 0!==n))),t}return 1!==t?.length||s.length?Ns.custom:t[0]}(p,l)),b={...e,minimumCustomValue:n,onChange:e=>{const t={...u,...e};o(t)},onMouseOut:r,onMouseOver:i,sides:l,spacingSizes:d,type:t,useSelect:c,values:p},k=Ts.includes(m)&&s?Rs[m]:"",v=(0,C.sprintf)((0,C._x)("%1$s %2$s","spacing"),t,k).trim();return(0,$.jsxs)("fieldset",{className:"spacing-sizes-control",children:[(0,$.jsxs)(os.__experimentalHStack,{className:"spacing-sizes-control__header",children:[(0,$.jsx)(os.BaseControl.VisualLabel,{as:"legend",className:"spacing-sizes-control__label",children:v}),!h&&!g&&(0,$.jsx)(ug,{label:t,onClick:()=>{f(m===Ns.axial?Ns.custom:Ns.axial)},isLinked:m===Ns.axial})]}),(0,$.jsx)(os.__experimentalVStack,{spacing:.5,children:m===Ns.axial?(0,$.jsx)(lg,{...b}):m===Ns.custom?(0,$.jsx)(ag,{...b}):(0,$.jsx)(cg,{side:m,...b,showSideInLabel:s})})]})}const mg={px:{max:1e3,step:1},"%":{max:100,step:1},vw:{max:100,step:1},vh:{max:100,step:1},em:{max:50,step:.1},rem:{max:50,step:.1},svw:{max:100,step:1},lvw:{max:100,step:1},dvw:{max:100,step:1},svh:{max:100,step:1},lvh:{max:100,step:1},dvh:{max:100,step:1},vi:{max:100,step:1},svi:{max:100,step:1},lvi:{max:100,step:1},dvi:{max:100,step:1},vb:{max:100,step:1},svb:{max:100,step:1},lvb:{max:100,step:1},dvb:{max:100,step:1},vmin:{max:100,step:1},svmin:{max:100,step:1},lvmin:{max:100,step:1},dvmin:{max:100,step:1},vmax:{max:100,step:1},svmax:{max:100,step:1},lvmax:{max:100,step:1},dvmax:{max:100,step:1}};function fg({label:e=(0,C.__)("Height"),onChange:t,value:n}){var o,r;const i=parseFloat(n),[s]=ci("spacing.units"),l=(0,os.__experimentalUseCustomUnits)({availableUnits:s||["%","px","em","rem","vh","vw"]}),c=(0,a.useMemo)((()=>(0,os.__experimentalParseQuantityAndUnitFromRawValue)(n)),[n])[1]||l[0]?.value||"px";return(0,$.jsxs)("fieldset",{className:"block-editor-height-control",children:[(0,$.jsx)(os.BaseControl.VisualLabel,{as:"legend",children:e}),(0,$.jsxs)(os.Flex,{children:[(0,$.jsx)(os.FlexItem,{isBlock:!0,children:(0,$.jsx)(os.__experimentalUnitControl,{value:n,units:l,onChange:t,onUnitChange:e=>{const[o,r]=(0,os.__experimentalParseQuantityAndUnitFromRawValue)(n);["em","rem"].includes(e)&&"px"===r?t((o/16).toFixed(2)+e):["em","rem"].includes(r)&&"px"===e?t(Math.round(16*o)+e):["%","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax"].includes(e)&&o>100&&t(100+e)},min:0,size:"__unstable-large",label:e,hideLabelFromVision:!0})}),(0,$.jsx)(os.FlexItem,{isBlock:!0,children:(0,$.jsx)(os.__experimentalSpacer,{marginX:2,marginBottom:0,children:(0,$.jsx)(os.RangeControl,{__next40pxDefaultSize:!0,value:i,min:0,max:null!==(o=mg[c]?.max)&&void 0!==o?o:100,step:null!==(r=mg[c]?.step)&&void 0!==r?r:.1,withInputField:!1,onChange:e=>{t([e,c].join(""))},__nextHasNoMarginBottom:!0,label:e,hideLabelFromVision:!0})})})]})]})}function bg(e,t){const{getBlockOrder:n,getBlockAttributes:o}=(0,c.useSelect)(li);return(r,i)=>{const s=(i-1)*t+r-1;let l=0;for(const r of n(e)){var a;const{columnStart:e,rowStart:n}=null!==(a=o(r).style?.layout)&&void 0!==a?a:{};(n-1)*t+e-1<s&&l++}return l}}function kg(e,t){const{orientation:n="horizontal"}=t;return"fill"===e?(0,C.__)("Stretch to fill available space."):"fixed"===e&&"horizontal"===n?(0,C.__)("Specify a fixed width."):"fixed"===e?(0,C.__)("Specify a fixed height."):(0,C.__)("Fit contents.")}function vg({value:e={},onChange:t,parentLayout:n,isShownByDefault:o,panelId:r}){const{type:i,default:{type:s="default"}={}}=null!=n?n:{},l=i||s;return"flex"===l?(0,$.jsx)(_g,{childLayout:e,onChange:t,parentLayout:n,isShownByDefault:o,panelId:r}):"grid"===l?(0,$.jsx)(yg,{childLayout:e,onChange:t,parentLayout:n,isShownByDefault:o,panelId:r}):null}function _g({childLayout:e,onChange:t,parentLayout:n,isShownByDefault:o,panelId:r}){const{selfStretch:i,flexSize:s}=e,{orientation:l="horizontal"}=null!=n?n:{},c="horizontal"===l?(0,C.__)("Width"):(0,C.__)("Height");return(0,a.useEffect)((()=>{"fixed"!==i||s||t({...e,selfStretch:"fit"})}),[]),(0,$.jsxs)(os.__experimentalVStack,{as:os.__experimentalToolsPanelItem,spacing:2,hasValue:()=>!!i,label:c,onDeselect:()=>{t({selfStretch:void 0,flexSize:void 0})},isShownByDefault:o,panelId:r,children:[(0,$.jsxs)(os.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,size:"__unstable-large",label:xg(n),value:i||"fit",help:kg(i,n),onChange:e=>{t({selfStretch:e,flexSize:"fixed"!==e?null:s})},isBlock:!0,children:[(0,$.jsx)(os.__experimentalToggleGroupControlOption,{value:"fit",label:(0,C._x)("Fit","Intrinsic block width in flex layout")},"fit"),(0,$.jsx)(os.__experimentalToggleGroupControlOption,{value:"fill",label:(0,C._x)("Grow","Block with expanding width in flex layout")},"fill"),(0,$.jsx)(os.__experimentalToggleGroupControlOption,{value:"fixed",label:(0,C._x)("Fixed","Block with fixed width in flex layout")},"fixed")]}),"fixed"===i&&(0,$.jsx)(os.__experimentalUnitControl,{size:"__unstable-large",onChange:e=>{t({selfStretch:i,flexSize:e})},value:s,label:c,hideLabelFromVision:!0})]})}function xg(e){const{orientation:t="horizontal"}=e;return"horizontal"===t?(0,C.__)("Width"):(0,C.__)("Height")}function yg({childLayout:e,onChange:t,parentLayout:n,isShownByDefault:o,panelId:r}){const{columnStart:i,rowStart:s,columnSpan:l,rowSpan:a}=e,{columnCount:u=3,rowCount:d}=null!=n?n:{},p=(0,c.useSelect)((e=>e(li).getBlockRootClientId(r))),{moveBlocksToPosition:h,__unstableMarkNextChangeAsNotPersistent:g}=(0,c.useDispatch)(li),m=bg(p,u);return(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(os.__experimentalHStack,{as:os.__experimentalToolsPanelItem,hasValue:()=>!!l||!!a,label:(0,C.__)("Grid span"),onDeselect:()=>{t({columnSpan:void 0,rowSpan:void 0})},isShownByDefault:o,panelId:r,children:[(0,$.jsx)(os.__experimentalInputControl,{size:"__unstable-large",label:(0,C.__)("Column span"),type:"number",onChange:e=>{const n=""===e?1:parseInt(e,10);t({columnStart:i,rowStart:s,rowSpan:a,columnSpan:n})},value:null!=l?l:1,min:1}),(0,$.jsx)(os.__experimentalInputControl,{size:"__unstable-large",label:(0,C.__)("Row span"),type:"number",onChange:e=>{const n=""===e?1:parseInt(e,10);t({columnStart:i,rowStart:s,columnSpan:l,rowSpan:n})},value:null!=a?a:1,min:1})]}),window.__experimentalEnableGridInteractivity&&u&&(0,$.jsxs)(os.Flex,{as:os.__experimentalToolsPanelItem,hasValue:()=>!!i||!!s,label:(0,C.__)("Grid placement"),onDeselect:()=>{t({columnStart:void 0,rowStart:void 0})},isShownByDefault:!1,panelId:r,children:[(0,$.jsx)(os.FlexItem,{style:{width:"50%"},children:(0,$.jsx)(os.__experimentalInputControl,{size:"__unstable-large",label:(0,C.__)("Column"),type:"number",onChange:e=>{const n=""===e?1:parseInt(e,10);t({columnStart:n,rowStart:s,columnSpan:l,rowSpan:a}),g(),h([r],p,p,m(n,s))},value:null!=i?i:1,min:1,max:u?u-(null!=l?l:1)+1:void 0})}),(0,$.jsx)(os.FlexItem,{style:{width:"50%"},children:(0,$.jsx)(os.__experimentalInputControl,{size:"__unstable-large",label:(0,C.__)("Row"),type:"number",onChange:e=>{const n=""===e?1:parseInt(e,10);t({columnStart:i,rowStart:n,columnSpan:l,rowSpan:a}),g(),h([r],p,p,m(i,n))},value:null!=s?s:1,min:1,max:d?d-(null!=a?a:1)+1:void 0})})]})]})}function Sg({panelId:e,value:t,onChange:n=(()=>{}),options:o,defaultValue:r="auto",hasValue:i,isShownByDefault:s=!0}){const l=null!=t?t:"auto",[a,c,u]=ci("dimensions.aspectRatios.default","dimensions.aspectRatios.theme","dimensions.defaultAspectRatios"),d=c?.map((({name:e,ratio:t})=>({label:e,value:t}))),p=a?.map((({name:e,ratio:t})=>({label:e,value:t}))),h=[{label:(0,C._x)("Original","Aspect ratio option for dimensions control"),value:"auto"},...u?p:[],...d||[],{label:(0,C._x)("Custom","Aspect ratio option for dimensions control"),value:"custom",disabled:!0,hidden:!0}];return(0,$.jsx)(os.__experimentalToolsPanelItem,{hasValue:i||(()=>l!==r),label:(0,C.__)("Aspect ratio"),onDeselect:()=>n(void 0),isShownByDefault:s,panelId:e,children:(0,$.jsx)(os.SelectControl,{label:(0,C.__)("Aspect ratio"),value:l,options:null!=o?o:h,onChange:n,size:"__unstable-large",__nextHasNoMarginBottom:!0})})}const wg=["horizontal","vertical"];function Cg(e){const t=Bg(e),n=Ig(e),o=jg(e),r=Eg(e),i=Tg(e),s=Mg(e),l=Pg(e),c=Rg(e);return"web"===a.Platform.OS&&(t||n||o||r||i||s||l||c)}function Bg(e){return e?.layout?.contentSize}function Ig(e){return e?.layout?.wideSize}function jg(e){return e?.spacing?.padding}function Eg(e){return e?.spacing?.margin}function Tg(e){return e?.spacing?.blockGap}function Mg(e){return e?.dimensions?.minHeight}function Pg(e){return e?.dimensions?.aspectRatio}function Rg(e){var t;const{type:n="default",default:{type:o="default"}={},allowSizingOnChildren:r=!1}=null!==(t=e?.parentLayout)&&void 0!==t?t:{},i=("flex"===o||"flex"===n||"grid"===o||"grid"===n)&&r;return!!e?.layout&&i}function Ng(e,t){if(!t||!e)return e;const n={};return t.forEach((t=>{"vertical"===t&&(n.top=e.top,n.bottom=e.bottom),"horizontal"===t&&(n.left=e.left,n.right=e.right),n[t]=e?.[t]})),n}function Lg(e){return e&&"string"==typeof e?{top:e,right:e,bottom:e,left:e}:e}function Ag({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r}){const i=Pi();return(0,$.jsx)(os.__experimentalToolsPanel,{label:(0,C.__)("Dimensions"),resetAll:()=>{const o=e(n);t(o)},panelId:o,dropdownMenuProps:i,children:r})}const Dg={contentSize:!0,wideSize:!0,padding:!0,margin:!0,blockGap:!0,minHeight:!0,aspectRatio:!0,childLayout:!0};function Og({as:e=Ag,value:t,onChange:n,inheritedValue:o=t,settings:r,panelId:i,defaultControls:s=Dg,onVisualize:l=(()=>{}),includeLayoutControls:c=!1}){var u,d,p,h,g,m,f,b;const{dimensions:k,spacing:v}=r,_=e=>e&&"object"==typeof e?Object.keys(e).reduce(((t,n)=>(t[n]=Ni({settings:{dimensions:k,spacing:v}},"",e[n]),t)),{}):Ni({settings:{dimensions:k,spacing:v}},"",e),x=function(e){const{defaultSpacingSizes:t,spacingSizes:n}=e?.spacing||{};return!1!==t&&n?.default?.length>0||n?.theme?.length>0||n?.custom?.length>0}(r),y=(0,os.__experimentalUseCustomUnits)({availableUnits:r?.spacing?.units||["%","px","em","rem","vw"]}),S=-1/0,[w,B]=(0,a.useState)(S),I=Bg(r)&&c,j=_(o?.layout?.contentSize),E=e=>{n(ve(t,["layout","contentSize"],e||void 0))},T=Ig(r)&&c,M=_(o?.layout?.wideSize),P=e=>{n(ve(t,["layout","wideSize"],e||void 0))},R=jg(r),N=Lg(_(o?.spacing?.padding)),L=Array.isArray(r?.spacing?.padding)?r?.spacing?.padding:r?.spacing?.padding?.sides,A=L&&L.some((e=>wg.includes(e))),D=e=>{const o=Ng(e,L);n(ve(t,["spacing","padding"],o))},O=()=>l("padding"),z=Eg(r),V=Lg(_(o?.spacing?.margin)),F=Array.isArray(r?.spacing?.margin)?r?.spacing?.margin:r?.spacing?.margin?.sides,H=F&&F.some((e=>wg.includes(e))),G=e=>{const o=Ng(e,F);n(ve(t,["spacing","margin"],o))},U=()=>l("margin"),W=Tg(r),K=_(o?.spacing?.blockGap),Z=function(e){return e&&"string"==typeof e?{top:e}:e?{...e,right:e?.left,bottom:e?.top}:e}(K),q=Array.isArray(r?.spacing?.blockGap)?r?.spacing?.blockGap:r?.spacing?.blockGap?.sides,Y=q&&q.some((e=>wg.includes(e))),X=e=>{n(ve(t,["spacing","blockGap"],e))},Q=e=>{e||X(null),!Y&&e?.hasOwnProperty("top")?X(e.top):X({top:e?.top,left:e?.left})},J=Mg(r),ee=_(o?.dimensions?.minHeight),te=e=>{const o=ve(t,["dimensions","minHeight"],e);n(ve(o,["dimensions","aspectRatio"],void 0))},ne=Pg(r),oe=_(o?.dimensions?.aspectRatio),re=Rg(r),ie=o?.layout,se=(0,a.useCallback)((e=>({...e,layout:qi({...e?.layout,contentSize:void 0,wideSize:void 0,selfStretch:void 0,flexSize:void 0,columnStart:void 0,rowStart:void 0,columnSpan:void 0,rowSpan:void 0}),spacing:{...e?.spacing,padding:void 0,margin:void 0,blockGap:void 0},dimensions:{...e?.dimensions,minHeight:void 0,aspectRatio:void 0}})),[]),le=()=>l(!1),ae={min:w,onDragStart:()=>{B(0)},onDragEnd:()=>{B(S)}};return(0,$.jsxs)(e,{resetAllFilter:se,value:t,onChange:n,panelId:i,children:[(I||T)&&(0,$.jsx)("span",{className:"span-columns",children:(0,C.__)("Set the width of the main content area.")}),I&&(0,$.jsx)(os.__experimentalToolsPanelItem,{label:(0,C.__)("Content width"),hasValue:()=>!!t?.layout?.contentSize,onDeselect:()=>E(void 0),isShownByDefault:null!==(u=s.contentSize)&&void 0!==u?u:Dg.contentSize,panelId:i,children:(0,$.jsx)(os.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,C.__)("Content width"),labelPosition:"top",value:j||"",onChange:e=>{E(e)},units:y,prefix:(0,$.jsx)(os.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,$.jsx)(hl,{icon:gl})})})}),T&&(0,$.jsx)(os.__experimentalToolsPanelItem,{label:(0,C.__)("Wide width"),hasValue:()=>!!t?.layout?.wideSize,onDeselect:()=>P(void 0),isShownByDefault:null!==(d=s.wideSize)&&void 0!==d?d:Dg.wideSize,panelId:i,children:(0,$.jsx)(os.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,C.__)("Wide width"),labelPosition:"top",value:M||"",onChange:e=>{P(e)},units:y,prefix:(0,$.jsx)(os.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,$.jsx)(hl,{icon:ml})})})}),R&&(0,$.jsxs)(os.__experimentalToolsPanelItem,{hasValue:()=>!!t?.spacing?.padding&&Object.keys(t?.spacing?.padding).length,label:(0,C.__)("Padding"),onDeselect:()=>D(void 0),isShownByDefault:null!==(p=s.padding)&&void 0!==p?p:Dg.padding,className:Zi({"tools-panel-item-spacing":x}),panelId:i,children:[!x&&(0,$.jsx)(os.__experimentalBoxControl,{__next40pxDefaultSize:!0,values:N,onChange:D,label:(0,C.__)("Padding"),sides:L,units:y,allowReset:!1,splitOnAxis:A,onMouseOver:O,onMouseOut:le}),x&&(0,$.jsx)(gg,{values:N,onChange:D,label:(0,C.__)("Padding"),sides:L,units:y,allowReset:!1,onMouseOver:O,onMouseOut:le})]}),z&&(0,$.jsxs)(os.__experimentalToolsPanelItem,{hasValue:()=>!!t?.spacing?.margin&&Object.keys(t?.spacing?.margin).length,label:(0,C.__)("Margin"),onDeselect:()=>G(void 0),isShownByDefault:null!==(h=s.margin)&&void 0!==h?h:Dg.margin,className:Zi({"tools-panel-item-spacing":x}),panelId:i,children:[!x&&(0,$.jsx)(os.__experimentalBoxControl,{__next40pxDefaultSize:!0,values:V,onChange:G,inputProps:ae,label:(0,C.__)("Margin"),sides:F,units:y,allowReset:!1,splitOnAxis:H,onMouseOver:U,onMouseOut:le}),x&&(0,$.jsx)(gg,{values:V,onChange:G,minimumCustomValue:-1/0,label:(0,C.__)("Margin"),sides:F,units:y,allowReset:!1,onMouseOver:U,onMouseOut:le})]}),W&&(0,$.jsxs)(os.__experimentalToolsPanelItem,{hasValue:()=>!!t?.spacing?.blockGap,label:(0,C.__)("Block spacing"),onDeselect:()=>X(void 0),isShownByDefault:null!==(g=s.blockGap)&&void 0!==g?g:Dg.blockGap,className:Zi({"tools-panel-item-spacing":x,"single-column":!x&&!Y}),panelId:i,children:[!x&&(Y?(0,$.jsx)(os.__experimentalBoxControl,{__next40pxDefaultSize:!0,label:(0,C.__)("Block spacing"),min:0,onChange:Q,units:y,sides:q,values:Z,allowReset:!1,splitOnAxis:Y}):(0,$.jsx)(os.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,C.__)("Block spacing"),min:0,onChange:X,units:y,value:K})),x&&(0,$.jsx)(gg,{label:(0,C.__)("Block spacing"),min:0,onChange:Q,showSideInLabel:!1,sides:Y?q:["top"],values:Z,allowReset:!1})]}),re&&(0,$.jsx)(vg,{value:ie,onChange:e=>{n({...t,layout:{...e}})},parentLayout:r?.parentLayout,panelId:i,isShownByDefault:null!==(m=s.childLayout)&&void 0!==m?m:Dg.childLayout}),J&&(0,$.jsx)(os.__experimentalToolsPanelItem,{hasValue:()=>!!t?.dimensions?.minHeight,label:(0,C.__)("Minimum height"),onDeselect:()=>{te(void 0)},isShownByDefault:null!==(f=s.minHeight)&&void 0!==f?f:Dg.minHeight,panelId:i,children:(0,$.jsx)(fg,{label:(0,C.__)("Minimum height"),value:ee,onChange:te})}),ne&&(0,$.jsx)(Sg,{hasValue:()=>!!t?.dimensions?.aspectRatio,value:oe,onChange:e=>{const o=ve(t,["dimensions","aspectRatio"],e);n(ve(o,["dimensions","minHeight"],void 0))},panelId:i,isShownByDefault:null!==(b=s.aspectRatio)&&void 0!==b?b:Dg.aspectRatio})]})}const zg=function(e){return(0,u.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])},Vg=".block-editor-block-list__block",Fg=".block-list-appender",Hg=".block-editor-button-block-appender";function Gg(e,t){return e.closest(Vg)===t.closest(Vg)}function $g(e,t){return t.closest([Vg,Fg,Hg].join(","))===e}function Ug(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(!e)return;const t=e.closest(Vg);return t?t.id.slice(6):void 0}function Wg(e,t){const n=Math.min(e.left,t.left),o=Math.max(e.right,t.right),r=Math.max(e.bottom,t.bottom),i=Math.min(e.top,t.top);return new window.DOMRectReadOnly(n,i,o-n,r-i)}function Kg(e){const t=e.ownerDocument.defaultView;if(!t)return!1;if(e.classList.contains("components-visually-hidden"))return!1;const n=e.getBoundingClientRect();if(0===n.width||0===n.height)return!1;if(e.checkVisibility)return e.checkVisibility?.({opacityProperty:!0,contentVisibilityAuto:!0,visibilityProperty:!0});const o=t.getComputedStyle(e);return"none"!==o.display&&"hidden"!==o.visibility&&"0"!==o.opacity}function Zg(e){const t=window.getComputedStyle(e);return"auto"===t.overflowX||"scroll"===t.overflowX||"auto"===t.overflowY||"scroll"===t.overflowY}const qg=["core/navigation"];function Yg(e){const t=e.ownerDocument.defaultView;if(!t)return new window.DOMRectReadOnly;let n=e.getBoundingClientRect();const o=e.getAttribute("data-type");if(o&&qg.includes(o)){const t=[e];let o;for(;o=t.pop();)if(!Zg(o))for(const e of o.children)if(Kg(e)){n=Wg(n,e.getBoundingClientRect()),t.push(e)}}const r=Math.max(n.left,0),i=Math.min(n.right,t.innerWidth);return n=new window.DOMRectReadOnly(r,n.top,i-r,n.height),n}const Xg=Number.MAX_SAFE_INTEGER;const Qg=(0,a.forwardRef)((function({clientId:e,bottomClientId:t,children:n,__unstablePopoverSlot:o,__unstableContentRef:r,shift:i=!0,...s},l){const c=vp(e),d=vp(null!=t?t:e),p=(0,u.useMergeRefs)([l,zg(r)]),[h,g]=(0,a.useReducer)((e=>(e+1)%Xg),0);(0,a.useLayoutEffect)((()=>{if(!c)return;const e=new window.MutationObserver(g);return e.observe(c,{attributes:!0}),()=>{e.disconnect()}}),[c]);const m=(0,a.useMemo)((()=>{if(!(h<0||!c||t&&!d))return{getBoundingClientRect:()=>d?Wg(Yg(c),Yg(d)):Yg(c),contextElement:c}}),[h,c,t,d]);return!c||t&&!d?null:(0,$.jsx)(os.Popover,{ref:p,animate:!1,focusOnMount:!1,anchor:m,__unstableSlotName:o,inline:!o,placement:"top-start",resize:!1,flip:!1,shift:i,...s,className:Zi("block-editor-block-popover",s.className),variant:"unstyled",children:n})})),Jg=(0,a.forwardRef)((({clientId:e,bottomClientId:t,children:n,...o},r)=>(0,$.jsx)(Qg,{...o,bottomClientId:t,clientId:e,__unstableContentRef:void 0,__unstablePopoverSlot:void 0,ref:r,children:n})));function em({selectedElement:e,additionalStyles:t={},children:n}){const[o,r]=(0,a.useState)(e.offsetWidth),[i,s]=(0,a.useState)(e.offsetHeight);(0,a.useEffect)((()=>{const t=new window.ResizeObserver((()=>{r(e.offsetWidth),s(e.offsetHeight)}));return t.observe(e,{box:"border-box"}),()=>t.disconnect()}),[e]);const l=(0,a.useMemo)((()=>({position:"absolute",width:o,height:i,...t})),[o,i,t]);return(0,$.jsx)("div",{style:l,children:n})}const tm=(0,a.forwardRef)((function({clientId:e,bottomClientId:t,children:n,shift:o=!1,additionalStyles:r,...i},s){var l;null!==(l=t)&&void 0!==l||(t=e);const a=vp(e);return(0,$.jsx)(Qg,{ref:s,clientId:e,bottomClientId:t,shift:o,...i,children:a&&e===t?(0,$.jsx)(em,{selectedElement:a,additionalStyles:r,children:n}):n})}));function nm({clientId:e,value:t,computeStyle:n,forceShow:o}){const r=vp(e),[i,s]=(0,a.useReducer)((()=>n(r)));(0,a.useLayoutEffect)((()=>{r&&window.requestAnimationFrame((()=>window.requestAnimationFrame(s)))}),[r,t]);const l=(0,a.useRef)(t),[c,u]=(0,a.useState)(!1);return(0,a.useEffect)((()=>{if(Ba()(t,l.current)||o)return;u(!0),l.current=t;const e=setTimeout((()=>{u(!1)}),400);return()=>{u(!1),clearTimeout(e)}}),[t,o]),c||o?(0,$.jsx)(tm,{clientId:e,__unstablePopoverSlot:"block-toolbar",children:(0,$.jsx)("div",{className:"block-editor__spacing-visualizer",style:i})}):null}function om(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function rm({clientId:e,value:t,forceShow:n}){return(0,$.jsx)(nm,{clientId:e,value:t?.spacing?.margin,computeStyle:e=>{const t=om(e,"margin-top"),n=om(e,"margin-right"),o=om(e,"margin-bottom"),r=om(e,"margin-left");return{borderTopWidth:t,borderRightWidth:n,borderBottomWidth:o,borderLeftWidth:r,top:t?`-${t}`:0,right:n?`-${n}`:0,bottom:o?`-${o}`:0,left:r?`-${r}`:0}},forceShow:n})}function im({clientId:e,value:t,forceShow:n}){return(0,$.jsx)(nm,{clientId:e,value:t?.spacing?.padding,computeStyle:e=>({borderTopWidth:om(e,"padding-top"),borderRightWidth:om(e,"padding-right"),borderBottomWidth:om(e,"padding-bottom"),borderLeftWidth:om(e,"padding-left")}),forceShow:n})}const sm="dimensions",lm="spacing";function am({children:e,resetAllFilter:t}){const n=(0,a.useCallback)((e=>{const n=e.style,o=t(n);return{...e,style:o}}),[t]);return(0,$.jsx)(ma,{group:"dimensions",resetAllFilter:n,children:e})}function cm({clientId:e,name:t,setAttributes:n,settings:o}){const r=Cg(o),i=(0,c.useSelect)((t=>t(li).getBlockAttributes(e)?.style),[e]),[s,u]=function(){const[e,t]=(0,a.useState)(!1),{hideBlockInterface:n,showBlockInterface:o}=te((0,c.useDispatch)(li));return(0,a.useEffect)((()=>{e?n():o()}),[e,o,n]),[e,t]}();if(!r)return null;const d={...(0,l.getBlockSupport)(t,[sm,"__experimentalDefaultControls"]),...(0,l.getBlockSupport)(t,[lm,"__experimentalDefaultControls"])};return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Og,{as:am,panelId:e,settings:o,value:i,onChange:e=>{n({style:qi(e)})},defaultControls:d,onVisualize:u}),!!o?.spacing?.padding&&(0,$.jsx)(im,{forceShow:"padding"===s,clientId:e,value:i}),!!o?.spacing?.margin&&(0,$.jsx)(rm,{forceShow:"margin"===s,clientId:e,value:i})]})}function um(e,t="any"){if("web"!==a.Platform.OS)return!1;const n=(0,l.getBlockSupport)(e,sm);return!0===n||("any"===t?!(!n?.aspectRatio&&!n?.minHeight):!!n?.[t])}const dm={useBlockProps:function({name:e,minHeight:t,style:n}){if(!um(e,"aspectRatio")||Xi(e,sm,"aspectRatio"))return{};const o=Zi({"has-aspect-ratio":!!n?.dimensions?.aspectRatio}),r={};n?.dimensions?.aspectRatio?r.minHeight="unset":(t||n?.dimensions?.minHeight)&&(r.aspectRatio="unset");return{className:o,style:r}},attributeKeys:["minHeight","style"],hasSupport:e=>um(e,"aspectRatio")};function pm(){y()("wp.blockEditor.__experimentalUseCustomSides",{since:"6.3",version:"6.4"})}const hm=[...Qh,Id,yp,sm,Xc,lm,jd],gm=e=>hm.some((t=>(0,l.hasBlockSupport)(e,t)));function mm(e={}){const t={};return(0,di.getCSSRules)(e).forEach((e=>{t[e.key]=e.value})),t}const fm={[`${Id}.__experimentalSkipSerialization`]:["border"],[`${yp}.__experimentalSkipSerialization`]:[yp],[`${Xh}.__experimentalSkipSerialization`]:[Xh],[`${sm}.__experimentalSkipSerialization`]:[sm],[`${lm}.__experimentalSkipSerialization`]:[lm],[`${jd}.__experimentalSkipSerialization`]:[jd]},bm={...fm,[`${sm}.aspectRatio`]:[`${sm}.aspectRatio`],[`${Xc}`]:[Xc]},km={[`${sm}.aspectRatio`]:!0,[`${Xc}`]:!0},vm={gradients:"gradient"};function _m(e,t,n=!1){if(!e)return e;let o=e;return n||(o=JSON.parse(JSON.stringify(e))),Array.isArray(t)||(t=[t]),t.forEach((e=>{if(Array.isArray(e)||(e=e.split(".")),e.length>1){const[t,...n]=e;_m(o[t],[n],!0)}else 1===e.length&&delete o[e[0]]})),o}function xm(e,t,n,o=bm){if(!gm(t))return e;let{style:r}=n;return Object.entries(o).forEach((([e,n])=>{const o=km[e]||(0,l.getBlockSupport)(t,e);!0===o&&(r=_m(r,n)),Array.isArray(o)&&o.forEach((e=>{const t=vm[e]||e;r=_m(r,[[...n,t]])}))})),e.style={...mm(r),...e.style},e}const ym={edit:function({clientId:e,name:t,setAttributes:n,__unstableParentLayout:o}){const r=ts(t,o),i=Gl(),s={clientId:e,name:t,setAttributes:n,settings:{...r,typography:{...r.typography,textAlign:!1}}};return"default"!==i?null:(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Pp,{...s}),(0,$.jsx)(ou,{...s}),(0,$.jsx)(ng,{...s}),(0,$.jsx)(Ld,{...s}),(0,$.jsx)(cm,{...s})]})},hasSupport:gm,addSaveProps:xm,attributeKeys:["style"],useBlockProps:function e({name:t,style:n}){const o=`wp-elements-${(0,u.useInstanceId)(e)}`,r=`.${o}`,i=n?.elements,s=(0,a.useMemo)((()=>{if(!i)return;const e=[];return Sm.forEach((({elementType:n,pseudo:o,elements:s})=>{if(Xi(t,yp,n))return;const a=i?.[n];if(a){const t=Li(r,l.__EXPERIMENTAL_ELEMENTS[n]);e.push((0,di.compileCSS)(a,{selector:t})),o&&o.forEach((t=>{a[t]&&e.push((0,di.compileCSS)(a[t],{selector:Li(r,`${l.__EXPERIMENTAL_ELEMENTS[n]}${t}`)}))}))}s&&s.forEach((t=>{i[t]&&e.push((0,di.compileCSS)(i[t],{selector:Li(r,l.__EXPERIMENTAL_ELEMENTS[t])}))}))})),e.length>0?e.join(""):void 0}),[r,i,t]);return Ji({css:s}),xm({className:o},t,{style:n},fm)}},Sm=[{elementType:"button"},{elementType:"link",pseudo:[":hover"]},{elementType:"heading",elements:["h1","h2","h3","h4","h5","h6"]}];(0,d.addFilter)("blocks.registerBlockType","core/style/addAttribute",(function(e){return gm(e)?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e}));(0,d.addFilter)("blocks.registerBlockType","core/settings/addAttribute",(function(e){return t=e,(0,l.hasBlockSupport)(t,"__experimentalSettings",!1)?(e?.attributes?.settings||(e.attributes={...e.attributes,settings:{type:"object"}}),e):e;var t}));const wm=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M12 4 4 19h16L12 4zm0 3.2 5.5 10.3H12V7.2z"})});const Cm=function e({id:t,colorPalette:n,duotonePalette:o,disableCustomColors:r,disableCustomDuotone:i,value:s,onChange:l}){let a;a="unset"===s?(0,$.jsx)(os.ColorIndicator,{className:"block-editor-duotone-control__unset-indicator"}):s?(0,$.jsx)(os.DuotoneSwatch,{values:s}):(0,$.jsx)(hl,{icon:wm});const c=(0,C.__)("Apply duotone filter"),d=`${(0,u.useInstanceId)(e,"duotone-control",t)}__description`;return(0,$.jsx)(os.Dropdown,{popoverProps:{className:"block-editor-duotone-control__popover",headerTitle:(0,C.__)("Duotone")},renderToggle:({isOpen:e,onToggle:t})=>(0,$.jsx)(os.ToolbarButton,{showTooltip:!0,onClick:t,"aria-haspopup":"true","aria-expanded":e,onKeyDown:n=>{e||n.keyCode!==va.DOWN||(n.preventDefault(),t())},label:c,icon:a}),renderContent:()=>(0,$.jsxs)(os.MenuGroup,{label:(0,C.__)("Duotone"),children:[(0,$.jsx)("p",{children:(0,C.__)("Create a two-tone color effect without losing your original image.")}),(0,$.jsx)(os.DuotonePicker,{"aria-label":c,"aria-describedby":d,colorPalette:n,duotonePalette:o,disableCustomColors:r,disableCustomDuotone:i,value:s,onChange:l})]})})};function Bm(e){return`${e}{filter:none}`}function Im(e,t){return`${e}{filter:url(#${t})}`}function jm(e,t){const n=function(e=[]){const t={r:[],g:[],b:[],a:[]};return e.forEach((e=>{const n=Du(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}(t);return`\n<svg\n\txmlns:xlink="http://www.w3.org/1999/xlink"\n\tviewBox="0 0 0 0"\n\twidth="0"\n\theight="0"\n\tfocusable="false"\n\trole="none"\n\taria-hidden="true"\n\tstyle="visibility: hidden; position: absolute; left: -9999px; overflow: hidden;"\n>\n\t<defs>\n\t\t<filter id="${e}">\n\t\t\t\x3c!--\n\t\t\t\tUse sRGB instead of linearRGB so transparency looks correct.\n\t\t\t\tUse perceptual brightness to convert to grayscale.\n\t\t\t--\x3e\n\t\t\t<feColorMatrix color-interpolation-filters="sRGB" type="matrix" values=" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 "></feColorMatrix>\n\t\t\t\x3c!-- Use sRGB instead of linearRGB to be consistent with how CSS gradients work. --\x3e\n\t\t\t<feComponentTransfer color-interpolation-filters="sRGB">\n\t\t\t\t<feFuncR type="table" tableValues="${n.r.join(" ")}"></feFuncR>\n\t\t\t\t<feFuncG type="table" tableValues="${n.g.join(" ")}"></feFuncG>\n\t\t\t\t<feFuncB type="table" tableValues="${n.b.join(" ")}"></feFuncB>\n\t\t\t\t<feFuncA type="table" tableValues="${n.a.join(" ")}"></feFuncA>\n\t\t\t</feComponentTransfer>\n\t\t\t\x3c!-- Re-mask the image with the original transparency since the feColorMatrix above loses that information. --\x3e\n\t\t\t<feComposite in2="SourceGraphic" operator="in"></feComposite>\n\t\t</filter>\n\t</defs>\n</svg>`}function Em(e,t="root",n={}){if(!t)return null;const{fallback:o=!1}=n,{name:r,selectors:i,supports:s}=e,l=i&&Object.keys(i).length>0,a=Array.isArray(t)?t.join("."):t;let c=null;if(c=l&&i.root?i?.root:s?.__experimentalSelector?s.__experimentalSelector:".wp-block-"+r.replace("core/","").replace("/","-"),"root"===a)return c;const u=Array.isArray(t)?t:t.split(".");if(1===u.length){const e=o?c:null;if(l){return _e(i,`${a}.root`,null)||_e(i,a,null)||e}const t=_e(s,`${a}.__experimentalSelector`,null);return t?Li(c,t):e}let d;return l&&(d=_e(i,a,null)),d||(o?Em(e,u[0],n):null)}const Tm=[];function Mm(e,{presetSetting:t,defaultSetting:n}){const o=!e?.color?.[n],r=e?.color?.[t]?.custom||Tm,i=e?.color?.[t]?.theme||Tm,s=e?.color?.[t]?.default||Tm;return(0,a.useMemo)((()=>[...r,...i,...o?Tm:s]),[o,r,i,s])}function Pm(e){return Rm(e)}function Rm(e){return e.color.customDuotone||e.color.defaultDuotone||e.color.duotone.length>0}function Nm({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r}){const i=Pi();return(0,$.jsx)(os.__experimentalToolsPanel,{label:(0,C._x)("Filters","Name for applying graphical effects"),resetAll:()=>{const o=e(n);t(o)},panelId:o,dropdownMenuProps:i,children:r})}const Lm={duotone:!0},Am={placement:"left-start",offset:36,shift:!0,className:"block-editor-duotone-control__popover",headerTitle:(0,C.__)("Duotone")},Dm=({indicator:e,label:t})=>(0,$.jsxs)(os.__experimentalHStack,{justify:"flex-start",children:[(0,$.jsx)(os.__experimentalZStack,{isLayered:!1,offset:-8,children:(0,$.jsx)(os.Flex,{expanded:!1,children:"unset"!==e&&e?(0,$.jsx)(os.DuotoneSwatch,{values:e}):(0,$.jsx)(os.ColorIndicator,{className:"block-editor-duotone-control__unset-indicator"})})}),(0,$.jsx)(os.FlexItem,{title:t,children:t})]});function Om({as:e=Nm,value:t,onChange:n,inheritedValue:o=t,settings:r,panelId:i,defaultControls:s=Lm}){const l=Rm(r),c=Mm(r,{presetSetting:"duotone",defaultSetting:"defaultDuotone"}),u=Mm(r,{presetSetting:"palette",defaultSetting:"defaultPalette"}),d=(p=o?.filter?.duotone,Ni({settings:r},"",p));var p;const h=e=>{const o=c.find((({colors:t})=>t===e)),r=o?`var:preset|duotone|${o.slug}`:e;n(ve(t,["filter","duotone"],r))},g=(0,a.useCallback)((e=>({...e,filter:{...e.filter,duotone:void 0}})),[]);return(0,$.jsx)(e,{resetAllFilter:g,value:t,onChange:n,panelId:i,children:l&&(0,$.jsx)(os.__experimentalToolsPanelItem,{label:(0,C.__)("Duotone"),hasValue:()=>!!t?.filter?.duotone,onDeselect:()=>h(void 0),isShownByDefault:s.duotone,panelId:i,children:(0,$.jsx)(os.Dropdown,{popoverProps:Am,className:"block-editor-global-styles-filters-panel__dropdown",renderToggle:({onToggle:e,isOpen:t})=>{const n={onClick:e,className:Zi({"is-open":t}),"aria-expanded":t};return(0,$.jsx)(os.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,...n,children:(0,$.jsx)(Dm,{indicator:d,label:(0,C.__)("Duotone")})})})},renderContent:()=>(0,$.jsx)(os.__experimentalDropdownContentWrapper,{paddingSize:"small",children:(0,$.jsxs)(os.MenuGroup,{label:(0,C.__)("Duotone"),children:[(0,$.jsx)("p",{children:(0,C.__)("Create a two-tone color effect without losing your original image.")}),(0,$.jsx)(os.DuotonePicker,{colorPalette:u,duotonePalette:c,disableCustomColors:!0,disableCustomDuotone:!0,value:d,onChange:h})]})})})})})}const zm=[],Vm=window?.navigator.userAgent&&window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome")&&!window.navigator.userAgent.includes("Chromium");function Fm({presetSetting:e,defaultSetting:t}){const[n,o,r,i]=ci(t,`${e}.custom`,`${e}.theme`,`${e}.default`);return(0,a.useMemo)((()=>[...o||zm,...r||zm,...n&&i||zm]),[n,o,r,i])}function Hm(e,t){if(!e)return;const n=t?.find((({slug:t})=>e===`var:preset|duotone|${t}`));return n?n.colors:void 0}zu([Vu]);const Gm={shareWithChildBlocks:!0,edit:function({style:e,setAttributes:t,name:n}){const o=e?.color?.duotone,r=ts(n),i=Gl(),s=Fm({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),l=Fm({presetSetting:"color.palette",defaultSetting:"color.defaultPalette"}),[a,c]=ci("color.custom","color.customDuotone"),u=!a,d=!c||0===l?.length&&u;if(0===s?.length&&d)return null;if("default"!==i)return null;const p=Array.isArray(o)?o:Hm(o,s);return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(ma,{group:"filter",children:(0,$.jsx)(Om,{value:{filter:{duotone:p}},onChange:n=>{const o={...e,color:{...n?.filter}};t({style:o})},settings:r})}),(0,$.jsx)(us,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,$.jsx)(Cm,{duotonePalette:s,colorPalette:l,disableCustomDuotone:d,disableCustomColors:u,value:p,onChange:n=>{const o=function(e,t){if(!e||!Array.isArray(e))return;const n=t?.find((t=>t?.colors?.every(((t,n)=>t===e[n]))));return n?`var:preset|duotone|${n.slug}`:void 0}(n,s),r={...e,color:{...e?.color,duotone:null!=o?o:n}};t({style:r})},settings:r})})]})},useBlockProps:function e({clientId:t,name:n,style:o}){const r=(0,u.useInstanceId)(e),i=(0,a.useMemo)((()=>{const e=(0,l.getBlockType)(n);if(e){if(!(0,l.getBlockSupport)(e,"filter.duotone",!1))return null;const t=(0,l.getBlockSupport)(e,"color.__experimentalDuotone",!1);if(t){const n=Em(e);return"string"==typeof t?Li(n,t):n}return Em(e,"filter.duotone",{fallback:!0})}}),[n]),s=o?.color?.duotone,c=`wp-duotone-${r}`,d=i&&s;return $m({clientId:t,id:c,selector:i,attribute:s}),{className:d?c:""}},attributeKeys:["style"],hasSupport:e=>(0,l.hasBlockSupport)(e,"filter.duotone")};function $m({clientId:e,id:t,selector:n,attribute:o}){const r=Fm({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),i=Array.isArray(o),s=i?void 0:Hm(o,r),l="string"==typeof o&&s;let c=null;l?c=s:("string"==typeof o&&!l||i)&&(c=o);const u=n.split(",").map((e=>`.${t}${e.trim()}`)).join(", "),d=Array.isArray(c)||"unset"===c;es(d?{css:"unset"!==c?Im(u,t):Bm(u),__unstableType:"presets"}:void 0),es(d?{assets:"unset"!==c?jm(t,c):"",__unstableType:"svgs"}:void 0);const p=vp(e);(0,a.useEffect)((()=>{if(d&&p&&Vm){const e=p.style.display;p.style.display="inline-block",p.offsetHeight,p.style.display=e}}),[d,p,c])}function Um(e){return(0,c.useSelect)((t=>{if(!e)return null;const{getBlockName:n,getBlockAttributes:o}=t(li),{getBlockType:r,getActiveBlockVariation:i}=t(l.store),s=n(e),a=r(s);if(!a)return null;const c=o(e),u=i(s,c),d=(0,l.isReusableBlock)(a)||(0,l.isTemplatePart)(a),p=(d?(0,l.__experimentalGetBlockLabel)(a,c):void 0)||a.title,h=function(e){const t=e?.style?.position?.type;return"sticky"===t?(0,C.__)("Sticky"):"fixed"===t?(0,C.__)("Fixed"):null}(c),g={isSynced:d,title:p,icon:a.icon,description:a.description,anchor:c?.anchor,positionLabel:h,positionType:c?.style?.position?.type,name:c?.metadata?.name};return u?{isSynced:d,title:u.title||a.title,icon:u.icon||a.icon,description:u.description||a.description,anchor:c?.anchor,positionLabel:h,positionType:c?.style?.position?.type,name:c?.metadata?.name}:g}),[e])}(0,d.addFilter)("blocks.registerBlockType","core/editor/duotone/add-attributes",(function(e){return(0,l.hasBlockSupport)(e,"filter.duotone")?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e}));const Wm="position",Km={key:"default",value:"",name:(0,C.__)("Default")},Zm={key:"sticky",value:"sticky",name:(0,C._x)("Sticky","Name for the value of the CSS position property"),hint:(0,C.__)("The block will stick to the top of the window instead of scrolling.")},qm={key:"fixed",value:"fixed",name:(0,C._x)("Fixed","Name for the value of the CSS position property"),hint:(0,C.__)("The block will not move when the page is scrolled.")},Ym=["top","right","bottom","left"],Xm=["sticky","fixed"];function Qm(e){const t=e?.style?.position?.type;return"sticky"===t||"fixed"===t}function Jm({name:e}={}){const[t,n]=ci("position.fixed","position.sticky"),o=!t&&!n;return r=e,!(0,l.getBlockSupport)(r,Wm)||o;var r}function ef({style:e={},clientId:t,name:n,setAttributes:o}){const r=function(e){const t=(0,l.getBlockSupport)(e,Wm);return!(!0!==t&&!t?.fixed)}(n),i=function(e){const t=(0,l.getBlockSupport)(e,Wm);return!(!0!==t&&!t?.sticky)}(n),s=e?.position?.type,{firstParentClientId:u}=(0,c.useSelect)((e=>{const{getBlockParents:n}=e(li),o=n(t);return{firstParentClientId:o[o.length-1]}}),[t]),d=Um(u),p=i&&s===Zm.value&&d?(0,C.sprintf)((0,C.__)("The block will stick to the scrollable area of the parent %s block."),d.title):null,h=(0,a.useMemo)((()=>{const e=[Km];return(i||s===Zm.value)&&e.push(Zm),(r||s===qm.value)&&e.push(qm),e}),[r,i,s]),g=s&&h.find((e=>e.value===s))||Km;return a.Platform.select({web:h.length>1?(0,$.jsx)(ma,{group:"position",children:(0,$.jsx)(os.BaseControl,{__nextHasNoMarginBottom:!0,help:p,children:(0,$.jsx)(os.CustomSelectControl,{__next40pxDefaultSize:!0,label:(0,C.__)("Position"),hideLabelFromVision:!0,describedBy:(0,C.sprintf)((0,C.__)("Currently selected position: %s"),g.name),options:h,value:g,onChange:({selectedItem:t})=>{(t=>{const n={...e,position:{...e?.position,type:t,top:"sticky"===t||"fixed"===t?"0px":void 0}};o({style:qi(n)})})(t.value)},size:"__unstable-large"})})}):null,native:null})}const tf={edit:function(e){return Jm(e)?null:(0,$.jsx)(ef,{...e})},useBlockProps:function e({name:t,style:n}){const o=(0,l.hasBlockSupport)(t,Wm),r=Jm({name:t}),i=o&&!r,s=(0,u.useInstanceId)(e),a=`.wp-container-${s}.wp-container-${s}`;let c;i&&(c=function({selector:e,style:t}){let n="";const{type:o}=t?.position||{};return Xm.includes(o)?(n+=`${e} {`,n+=`position: ${o};`,Ym.forEach((e=>{void 0!==t?.position?.[e]&&(n+=`${e}: ${t.position[e]};`)})),"sticky"!==o&&"fixed"!==o||(n+="z-index: 10"),n+="}",n):n}({selector:a,style:n})||"");const d=Zi({[`wp-container-${s}`]:i&&!!c,[`is-position-${n?.position?.type}`]:i&&!!c&&!!n?.position?.type});return Ji({css:c}),{className:d}},attributeKeys:["style"],hasSupport:e=>(0,l.hasBlockSupport)(e,Wm)};const nf={button:"wp-element-button",caption:"wp-element-caption"},of={__experimentalBorder:"border",color:"color",spacing:"spacing",typography:"typography"},{kebabCase:rf}=te(os.privateApis);function sf(e={},t,n){let o=[];return Object.keys(e).forEach((r=>{const i=t+rf(r.replace("/","-")),s=e[r];if(s instanceof Object){const e=i+n;o=[...o,...sf(s,e,n)]}else o.push(`${i}: ${s}`)})),o}const lf=(e,t)=>{const n={};return Object.entries(e).forEach((([e,o])=>{if("root"===e||!t?.[e])return;const r="string"==typeof o;if(r||Object.entries(o).forEach((([o,r])=>{if("root"===o||!t?.[e][o])return;const i=af({[e]:{[o]:t[e][o]}});n[r]=[...n[r]||[],...i],delete t[e][o]})),r||o.root){const i=r?o:o.root,s=af({[e]:t[e]});n[i]=[...n[i]||[],...s],delete t[e]}})),n};function af(e={},t="",n,o={},r=!1){const i=ji===t,s=Object.entries(l.__EXPERIMENTAL_STYLE_PROPERTY).reduce(((t,[o,{value:r,properties:s,useEngine:l,rootOnly:a}])=>{if(a&&!i)return t;const c=r;if("elements"===c[0]||l)return t;const u=_e(e,c);if("--wp--style--root--padding"===o&&("string"==typeof u||!n))return t;if(s&&"string"!=typeof u)Object.entries(s).forEach((e=>{const[n,o]=e;if(!_e(u,[o],!1))return;const r=n.startsWith("--")?n:rf(n);t.push(`${r}: ${(0,di.getCSSValueFromRawStyle)(_e(u,[o]))}`)}));else if(_e(e,c,!1)){const n=o.startsWith("--")?o:rf(o);t.push(`${n}: ${(0,di.getCSSValueFromRawStyle)(_e(e,c))}`)}return t}),[]);e.background&&(e.background?.backgroundImage&&(e.background.backgroundImage=Di(e.background.backgroundImage,o)),!i&&e.background?.backgroundImage?.id&&(e={...e,background:{...e.background,...eu(e.background)}}));return(0,di.getCSSRules)(e).forEach((e=>{if(i&&(n||r)&&e.key.startsWith("padding"))return;const t=e.key.startsWith("--")?e.key:rf(e.key);let l=Di(e.value,o);"font-size"===t&&(l=Ci({size:l},o?.settings)),"aspect-ratio"===t&&s.push("min-height: unset"),s.push(`${t}: ${l}`)})),s}function cf({layoutDefinitions:e=ks,style:t,selector:n,hasBlockGapSupport:o,hasFallbackGapSupport:r,fallbackGapValue:i}){let s="",l=o?Fs(t?.spacing?.blockGap):"";if(r&&(n===ji?l=l||"0.5em":!o&&i&&(l=i)),l&&e&&(Object.values(e).forEach((({className:e,name:t,spacingStyles:r})=>{(o||"flex"===t||"grid"===t)&&r?.length&&r.forEach((t=>{const r=[];if(t.rules&&Object.entries(t.rules).forEach((([e,t])=>{r.push(`${e}: ${t||l}`)})),r.length){let i="";i=o?n===ji?`:root :where(.${e})${t?.selector||""}`:`:root :where(${n}-${e})${t?.selector||""}`:n===ji?`:where(.${e}${t?.selector||""})`:`:where(${n}.${e}${t?.selector||""})`,s+=`${i} { ${r.join("; ")}; }`}}))})),n===ji&&o&&(s+=`${Ei} { --wp--style--block-gap: ${l}; }`)),n===ji&&e){const t=["block","flex","grid"];Object.values(e).forEach((({className:e,displayMode:o,baseStyles:r})=>{o&&t.includes(o)&&(s+=`${n} .${e} { display:${o}; }`),r?.length&&r.forEach((t=>{const n=[];if(t.rules&&Object.entries(t.rules).forEach((([e,t])=>{n.push(`${e}: ${t}`)})),n.length){s+=`${`.${e}${t?.selector||""}`} { ${n.join("; ")}; }`}}))}))}return s}const uf=["border","color","dimensions","spacing","typography","filter","outline","shadow","background"];function df(e){if(!e)return{};const t=Object.entries(e).filter((([e])=>uf.includes(e))).map((([e,t])=>[e,JSON.parse(JSON.stringify(t))]));return Object.fromEntries(t)}const pf=(e,t)=>{var n;const o=[];if(!e?.styles)return o;const r=df(e.styles);return r&&o.push({styles:r,selector:ji,skipSelectorWrapper:!0}),Object.entries(l.__EXPERIMENTAL_ELEMENTS).forEach((([t,n])=>{e.styles?.elements?.[t]&&o.push({styles:e.styles?.elements?.[t],selector:n,skipSelectorWrapper:!nf[t]})})),Object.entries(null!==(n=e.styles?.blocks)&&void 0!==n?n:{}).forEach((([e,n])=>{var r;const i=df(n);if(n?.variations){const r={};Object.entries(n.variations).forEach((([n,i])=>{var s,a;r[n]=df(i),i?.css&&(r[n].css=i.css);const c=t[e]?.styleVariationSelectors?.[n];Object.entries(null!==(s=i?.elements)&&void 0!==s?s:{}).forEach((([e,t])=>{t&&l.__EXPERIMENTAL_ELEMENTS[e]&&o.push({styles:t,selector:Li(c,l.__EXPERIMENTAL_ELEMENTS[e])})})),Object.entries(null!==(a=i?.blocks)&&void 0!==a?a:{}).forEach((([e,n])=>{var r;const i=Li(c,t[e]?.selector),s=Li(c,t[e]?.duotoneSelector),a=function(e,t){if(!e||!t)return;const n={};return Object.entries(t).forEach((([t,o])=>{"string"==typeof o&&(n[t]=Li(e,o)),"object"==typeof o&&(n[t]={},Object.entries(o).forEach((([o,r])=>{n[t][o]=Li(e,r)})))})),n}(c,t[e]?.featureSelectors),u=df(n);n?.css&&(u.css=n.css),o.push({selector:i,duotoneSelector:s,featureSelectors:a,fallbackGapValue:t[e]?.fallbackGapValue,hasLayoutSupport:t[e]?.hasLayoutSupport,styles:u}),Object.entries(null!==(r=n.elements)&&void 0!==r?r:{}).forEach((([e,t])=>{t&&l.__EXPERIMENTAL_ELEMENTS[e]&&o.push({styles:t,selector:Li(i,l.__EXPERIMENTAL_ELEMENTS[e])})}))}))})),i.variations=r}t?.[e]?.selector&&o.push({duotoneSelector:t[e].duotoneSelector,fallbackGapValue:t[e].fallbackGapValue,hasLayoutSupport:t[e].hasLayoutSupport,selector:t[e].selector,styles:i,featureSelectors:t[e].featureSelectors,styleVariationSelectors:t[e].styleVariationSelectors}),Object.entries(null!==(r=n?.elements)&&void 0!==r?r:{}).forEach((([n,r])=>{r&&t?.[e]&&l.__EXPERIMENTAL_ELEMENTS[n]&&o.push({styles:r,selector:t[e]?.selector.split(",").map((e=>l.__EXPERIMENTAL_ELEMENTS[n].split(",").map((t=>e+" "+t)))).join(",")})}))})),o},hf=(e,t)=>{var n;const o=[];if(!e?.settings)return o;const r=e=>{let t={};return Ti.forEach((({path:n})=>{const o=_e(e,n,!1);!1!==o&&(t=ve(t,n,o))})),t},i=r(e.settings),s=e.settings?.custom;return(Object.keys(i).length>0||s)&&o.push({presets:i,custom:s,selector:Ei}),Object.entries(null!==(n=e.settings?.blocks)&&void 0!==n?n:{}).forEach((([e,n])=>{const i=r(n),s=n.custom;(Object.keys(i).length>0||s)&&o.push({presets:i,custom:s,selector:t[e]?.selector})})),o},gf=(e,t)=>{const n=hf(e,t);let o="";return n.forEach((({presets:t,custom:n,selector:r})=>{const i=function(e={},t){return Ti.reduce(((n,{path:o,valueKey:r,valueFunc:i,cssVarInfix:s})=>{const l=_e(e,o,[]);return["default","theme","custom"].forEach((e=>{l[e]&&l[e].forEach((e=>{r&&!i?n.push(`--wp--preset--${s}--${rf(e.slug)}: ${e[r]}`):i&&"function"==typeof i&&n.push(`--wp--preset--${s}--${rf(e.slug)}: ${i(e,t)}`)}))})),n}),[])}(t,e?.settings),s=sf(n,"--wp--custom--","--");s.length>0&&i.push(...s),i.length>0&&(o+=`${r}{${i.join(";")};}`)})),o},mf=(e,t,n,o,r=!1,i=!1,s=void 0)=>{const l={blockGap:!0,blockStyles:!0,layoutStyles:!0,marginReset:!0,presets:!0,rootPadding:!0,variationStyles:!1,...s},a=pf(e,t),c=hf(e,t),u=e?.settings?.useRootPaddingAwareAlignments,{contentSize:d,wideSize:p}=e?.settings?.layout||{},h=l.marginReset||l.rootPadding||l.layoutStyles;let g="";if(l.presets&&(d||p)&&(g+=`${Ei} {`,g=d?g+` --wp--style--global--content-size: ${d};`:g,g=p?g+` --wp--style--global--wide-size: ${p};`:g,g+="}"),h&&(g+=":where(body) {margin: 0;",l.rootPadding&&u&&(g+="padding-right: 0; padding-left: 0; padding-top: var(--wp--style--root--padding-top); padding-bottom: var(--wp--style--root--padding-bottom) }\n\t\t\t\t.has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }\n\t\t\t\t.has-global-padding > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); }\n\t\t\t\t.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) { padding-right: 0; padding-left: 0; }\n\t\t\t\t.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) > .alignfull { margin-left: 0; margin-right: 0;\n\t\t\t\t"),g+="}"),l.blockStyles&&a.forEach((({selector:t,duotoneSelector:s,styles:a,fallbackGapValue:c,hasLayoutSupport:d,featureSelectors:p,styleVariationSelectors:h,skipSelectorWrapper:m})=>{if(p){const e=lf(p,a);Object.entries(e).forEach((([e,t])=>{if(t.length){const n=t.join(";");g+=`:root :where(${e}){${n};}`}}))}if(s){const e={};a?.filter&&(e.filter=a.filter,delete a.filter);const t=af(e);t.length&&(g+=`${s}{${t.join(";")};}`)}r||ji!==t&&!d||(g+=cf({style:a,selector:t,hasBlockGapSupport:n,hasFallbackGapSupport:o,fallbackGapValue:c}));const f=af(a,t,u,e,i);if(f?.length){g+=`${m?t:`:root :where(${t})`}{${f.join(";")};}`}a?.css&&(g+=kf(a.css,`:root :where(${t})`)),l.variationStyles&&h&&Object.entries(h).forEach((([t,n])=>{const o=a?.variations?.[t];if(o){if(p){const e=lf(p,o);Object.entries(e).forEach((([e,t])=>{if(t.length){const o=function(e,t){const n=e.split(","),o=[];return n.forEach((e=>{o.push(`${t.trim()}${e.trim()}`)})),o.join(", ")}(e,n),r=t.join(";");g+=`:root :where(${o}){${r};}`}}))}const t=af(o,n,u,e);t.length&&(g+=`:root :where(${n}){${t.join(";")};}`),o?.css&&(g+=kf(o.css,`:root :where(${n})`))}}));const b=Object.entries(a).filter((([e])=>e.startsWith(":")));b?.length&&b.forEach((([e,n])=>{const o=af(n);if(!o?.length)return;const r=`:root :where(${t.split(",").map((t=>t+e)).join(",")}){${o.join(";")};}`;g+=r}))})),l.layoutStyles&&(g+=".wp-site-blocks > .alignleft { float: left; margin-right: 2em; }",g+=".wp-site-blocks > .alignright { float: right; margin-left: 2em; }",g+=".wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }"),l.blockGap&&n){const t=Fs(e?.styles?.spacing?.blockGap)||"0.5em";g+=`:root :where(.wp-site-blocks) > * { margin-block-start: ${t}; margin-block-end: 0; }`,g+=":root :where(.wp-site-blocks) > :first-child { margin-block-start: 0; }",g+=":root :where(.wp-site-blocks) > :last-child { margin-block-end: 0; }"}return l.presets&&c.forEach((({selector:e,presets:t})=>{ji!==e&&Ei!==e||(e="");const n=function(e="*",t={}){return Ti.reduce(((n,{path:o,cssVarInfix:r,classes:i})=>{if(!i)return n;const s=_e(t,o,[]);return["default","theme","custom"].forEach((t=>{s[t]&&s[t].forEach((({slug:t})=>{i.forEach((({classSuffix:o,propertyName:i})=>{const s=`.has-${rf(t)}-${o}`,l=e.split(",").map((e=>`${e}${s}`)).join(","),a=`var(--wp--preset--${r}--${rf(t)})`;n+=`${l}{${i}: ${a} !important;}`}))}))})),n}),"")}(e,t);n.length>0&&(g+=n)})),g};function ff(e,t){return hf(e,t).flatMap((({presets:e})=>function(e={}){return Ti.filter((e=>"duotone"===e.path.at(-1))).flatMap((t=>{const n=_e(e,t.path,{});return["default","theme"].filter((e=>n[e])).flatMap((e=>n[e].map((e=>jm(`wp-duotone-${e.slug}`,e.colors))))).join("")}))}(e)))}const bf=(e,t,n)=>{const o={};return e.forEach((e=>{const r=e.name,i=Em(e);let s=Em(e,"filter.duotone");if(!s){const t=Em(e),n=(0,l.getBlockSupport)(e,"color.__experimentalDuotone",!1);s=n&&Li(t,n)}const a=!!e?.supports?.layout||!!e?.supports?.__experimentalLayout,c=e?.supports?.spacing?.blockGap?.__experimentalDefault,u=t(r),d={};u?.forEach((e=>{const t=n?`-${n}`:"",o=`${e.name}${t}`,r=function(e,t){const n=`.is-style-${e}`;if(!t)return n;const o=/((?::\([^)]+\))?\s*)([^\s:]+)/,r=(e,t,o)=>t+o+n;return t.split(",").map((e=>e.replace(o,r))).join(",")}(o,i);d[o]=r}));const p=((e,t)=>{if(e?.selectors&&Object.keys(e.selectors).length>0)return e.selectors;const n={root:t};return Object.entries(of).forEach((([t,o])=>{const r=Em(e,t);r&&(n[o]=r)})),n})(e,i);o[r]={duotoneSelector:s,fallbackGapValue:c,featureSelectors:Object.keys(p).length?p:void 0,hasLayoutSupport:a,name:r,selector:i,styleVariationSelectors:u?.length?d:void 0}})),o};function kf(e,t){let n="";if(!e||""===e.trim())return n;return e.split("&").forEach((e=>{if(!e||""===e.trim())return;if(!e.includes("{"))n+=`:root :where(${t}){${e.trim()}}`;else{const o=e.replace("}","").split("{");if(2!==o.length)return;const[r,i]=o,s=r.match(/([>+~\s]*::[a-zA-Z-]+)/),l=s?s[1]:"",a=s?r.replace(l,"").trim():r.trim();let c;c=""===a?t:r.startsWith(" ")?Li(t,a):function(e,t){return e.includes(",")?e.split(",").map((e=>e+t)).join(","):e+t}(t,a),n+=`:root :where(${c})${l}{${i.trim()}}`}})),n}function vf(e={},t){const[n]=Hi("spacing.blockGap"),o=null!==n,r=!o,i=(0,c.useSelect)((e=>{const{getSettings:t}=e(li);return!!t().disableLayoutStyles})),{getBlockStyles:s}=(0,c.useSelect)(l.store);return(0,a.useMemo)((()=>{var n;if(!e?.styles||!e?.settings)return[];const a=(c=e,c.styles?.blocks?.["core/separator"]&&c.styles?.blocks?.["core/separator"].color?.background&&!c.styles?.blocks?.["core/separator"].color?.text&&!c.styles?.blocks?.["core/separator"].border?.color?{...c,styles:{...c.styles,blocks:{...c.styles.blocks,"core/separator":{...c.styles.blocks["core/separator"],color:{...c.styles.blocks["core/separator"].color,text:c.styles?.blocks["core/separator"].color.background}}}}}:c);var c;const u=bf((0,l.getBlockTypes)(),s),d=gf(a,u),p=mf(a,u,o,r,i,t),h=ff(a,u),g=[{css:d,isGlobalStyles:!0},{css:p,isGlobalStyles:!0},{css:null!==(n=a.styles.css)&&void 0!==n?n:"",isGlobalStyles:!0},{assets:h,__unstableType:"svg",isGlobalStyles:!0}];return(0,l.getBlockTypes)().forEach((e=>{if(a.styles.blocks[e.name]?.css){const t=u[e.name].selector;g.push({css:kf(a.styles.blocks[e.name]?.css,t),isGlobalStyles:!0})}})),[g,a.settings]}),[o,r,e,i,t,s])}function _f(e=!1){const{merged:t}=(0,a.useContext)(Oi);return vf(t,e)}const xf="is-style-";function yf(e){return e?e.split(/\s+/).reduce(((e,t)=>{if(t.startsWith(xf)){const n=t.slice(xf.length);"default"!==n&&e.push(n)}return e}),[]):[]}function Sf({override:e}){es(e)}function wf(e,t,n){const{merged:o}=(0,a.useContext)(Oi),{globalSettings:r,globalStyles:i}=(0,c.useSelect)((e=>{const t=e(li).getSettings();return{globalSettings:t.__experimentalFeatures,globalStyles:t[Z]}}),[]);return(0,a.useMemo)((()=>{var s,l,a;const c=function(e,t,n){if(!e?.styles?.blocks?.[t]?.variations?.[n])return;const o=t=>{Object.keys(t).forEach((n=>{const r=t[n];if("object"==typeof r&&null!==r)if(void 0!==r.ref)if("string"!=typeof r.ref||""===r.ref.trim())delete t[n];else{const o=_e(e,r.ref);o?t[n]=o:delete t[n]}else o(r),0===Object.keys(r).length&&delete t[n]}))},r=JSON.parse(JSON.stringify(e.styles.blocks[t].variations[n]));return o(r),r}({settings:null!==(s=o?.settings)&&void 0!==s?s:r,styles:null!==(l=o?.styles)&&void 0!==l?l:i},e,t);return{settings:null!==(a=o?.settings)&&void 0!==a?a:r,styles:{blocks:{[e]:{variations:{[`${t}-${n}`]:c}}}}}}),[o,r,i,t,n,e])}const Cf={hasSupport:()=>!0,attributeKeys:["className"],isMatch:({className:e})=>yf(e).length>0,useBlockProps:function({name:e,className:t,clientId:n}){const{getBlockStyles:o}=(0,c.useSelect)(l.store),r=function(e,t=[]){const n=yf(e);if(!n)return null;for(const e of n)if(t.some((t=>t.name===e)))return e;return null}(t,o(e)),i=`${xf}${r}-${n}`,{settings:s,styles:u}=wf(e,r,n),d=(0,a.useMemo)((()=>{if(!r)return;const e={settings:s,styles:u},t=bf((0,l.getBlockTypes)(),o,n);return mf(e,t,!1,!0,!0,!0,{blockGap:!1,blockStyles:!0,layoutStyles:!1,marginReset:!1,presets:!1,rootPadding:!1,variationStyles:!0})}),[r,s,u,o,n]);return es({id:`variation-${n}`,css:d,__unstableType:"variation",variation:r,clientId:n}),r?{className:i}:{}}},Bf="layout",{kebabCase:If}=te(os.privateApis);function jf(e){return(0,l.hasBlockSupport)(e,"layout")||(0,l.hasBlockSupport)(e,"__experimentalLayout")}function Ef(e={},t=""){const{layout:n}=e,{default:o}=(0,l.getBlockSupport)(t,Bf)||{},r=n?.inherit||n?.contentSize||n?.wideSize?{...n,type:"constrained"}:n||o||{},i=[];if(ks[r?.type||"default"]?.className){const e=ks[r?.type||"default"]?.className,n=t.split("/"),o=`wp-block-${"core"===n[0]?n.pop():n.join("-")}-${e}`;i.push(e,o)}return(0,c.useSelect)((e=>(r?.inherit||r?.contentSize||"constrained"===r?.type)&&e(li).getSettings().__experimentalFeatures?.useRootPaddingAwareAlignments),[r?.contentSize,r?.inherit,r?.type])&&i.push("has-global-padding"),r?.orientation&&i.push(`is-${If(r.orientation)}`),r?.justifyContent&&i.push(`is-content-justification-${If(r.justifyContent)}`),r?.flexWrap&&"nowrap"===r.flexWrap&&i.push("is-nowrap"),i}const Tf={shareWithChildBlocks:!0,edit:function({layout:e,setAttributes:t,name:n,clientId:o}){const r=ts(n),{layout:i}=r,{themeSupportsLayout:s}=(0,c.useSelect)((e=>{const{getSettings:t}=e(li);return{themeSupportsLayout:t().supportsLayout}}),[]);if("default"!==Gl())return null;const a=(0,l.getBlockSupport)(n,Bf,{}),u={...i,...a},{allowSwitching:d,allowEditing:p=!0,allowInheriting:h=!0,default:g}=u;if(!p)return null;const m={...a,...e},{type:f,default:{type:b="default"}={}}=m,k=f||b,v=!(!h||k&&"default"!==k&&"constrained"!==k&&!m.inherit),_=e||g||{},{inherit:x=!1,contentSize:y=null}=_;if(("default"===k||"constrained"===k)&&!s)return null;const S=Bl(k),w=Bl("constrained"),B=!_.type&&(y||x),I=!!x||!!y,j=e=>t({layout:e});return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(ma,{children:(0,$.jsxs)(os.PanelBody,{title:(0,C.__)("Layout"),children:[v&&(0,$.jsx)($.Fragment,{children:(0,$.jsx)(os.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,C.__)("Inner blocks use content width"),checked:"constrained"===S?.name||I,onChange:()=>t({layout:{type:"constrained"===S?.name||I?"default":"constrained"}}),help:"constrained"===S?.name||I?(0,C.__)("Nested blocks use content width with options for full and wide widths."):(0,C.__)("Nested blocks will fill the width of this container. Toggle to constrain.")})}),!x&&d&&(0,$.jsx)(Mf,{type:k,onChange:e=>t({layout:{type:e}})}),S&&"default"!==S.name&&(0,$.jsx)(S.inspectorControls,{layout:_,onChange:j,layoutBlockSupport:u,name:n,clientId:o}),w&&B&&(0,$.jsx)(w.inspectorControls,{layout:_,onChange:j,layoutBlockSupport:u,name:n,clientId:o})]})}),!x&&S&&(0,$.jsx)(S.toolBarControls,{layout:_,onChange:j,layoutBlockSupport:a,name:n,clientId:o})]})},attributeKeys:["layout"],hasSupport:e=>jf(e)};function Mf({type:e,onChange:t}){return(0,$.jsx)(os.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,isBlock:!0,label:(0,C.__)("Layout type"),__nextHasNoMarginBottom:!0,hideLabelFromVision:!0,isAdaptiveWidth:!0,value:e,onChange:t,children:Cl.map((({name:e,label:t})=>(0,$.jsx)(os.__experimentalToggleGroupControlOption,{value:e,label:t},e)))})}function Pf({block:e,props:t,blockGapSupport:n,layoutClasses:o}){const{name:r,attributes:i}=t,s=(0,u.useInstanceId)(e),{layout:a}=i,{default:c}=(0,l.getBlockSupport)(r,Bf)||{},d=a?.inherit||a?.contentSize||a?.wideSize?{...a,type:"constrained"}:a||c||{},p=`wp-container-${If(r)}-is-layout-`,h=`.${p}${s}`,g=null!==n,m=Bl(d?.type||"default"),f=m?.getLayoutStyle?.({blockName:r,selector:h,layout:d,style:i?.style,hasBlockGapSupport:g}),b=Zi({[`${p}${s}`]:!!f},o);return Ji({css:f}),(0,$.jsx)(e,{...t,__unstableLayoutClassNames:b})}const Rf=(0,u.createHigherOrderComponent)((e=>t=>{const{clientId:n,name:o,attributes:r}=t,i=jf(o),s=Ef(r,o),l=(0,c.useSelect)((e=>{if(!i)return;const{getSettings:t,getBlockSettings:o}=te(e(li)),{disableLayoutStyles:r}=t();if(r)return;const[s]=o(n,"spacing.blockGap");return{blockGapSupport:s}}),[i,n]);return l?(0,$.jsx)(Pf,{block:e,props:t,layoutClasses:s,...l}):(0,$.jsx)(e,{...t,__unstableLayoutClassNames:i?s:void 0})}),"withLayoutStyles");function Nf(e,t){return Array.from({length:t},((t,n)=>e+n))}(0,d.addFilter)("blocks.registerBlockType","core/layout/addAttribute",(function(e){var t;return"type"in(null!==(t=e.attributes?.layout)&&void 0!==t?t:{})||jf(e)&&(e.attributes={...e.attributes,layout:{type:"object"}}),e})),(0,d.addFilter)("editor.BlockListBlock","core/editor/layout/with-layout-styles",Rf);class Lf{constructor({columnStart:e,rowStart:t,columnEnd:n,rowEnd:o,columnSpan:r,rowSpan:i}={}){this.columnStart=null!=e?e:1,this.rowStart=null!=t?t:1,this.columnEnd=void 0!==r?this.columnStart+r-1:null!=n?n:this.columnStart,this.rowEnd=void 0!==i?this.rowStart+i-1:null!=o?o:this.rowStart}get columnSpan(){return this.columnEnd-this.columnStart+1}get rowSpan(){return this.rowEnd-this.rowStart+1}contains(e,t){return e>=this.columnStart&&e<=this.columnEnd&&t>=this.rowStart&&t<=this.rowEnd}containsRect(e){return this.contains(e.columnStart,e.rowStart)&&this.contains(e.columnEnd,e.rowEnd)}intersectsRect(e){return this.columnStart<=e.columnEnd&&this.columnEnd>=e.columnStart&&this.rowStart<=e.rowEnd&&this.rowEnd>=e.rowStart}}function Af(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function Df(e,t){const n=[];for(const o of e.split(" ")){const e=n[n.length-1],r=e?e.end+t:0,i=r+parseFloat(o);n.push({start:r,end:i})}return n}function Of(e,t,n="start"){return e.reduce(((o,r,i)=>Math.abs(r[n]-t)<Math.abs(e[o][n]-t)?i:o),0)}function zf(e){const t=Af(e,"grid-template-columns"),n=Af(e,"grid-template-rows"),o=t.split(" ").length,r=n.split(" ").length;return{numColumns:o,numRows:r,numItems:o*r,currentColor:Af(e,"color"),style:{gridTemplateColumns:t,gridTemplateRows:n,gap:Af(e,"gap"),padding:Af(e,"padding")}}}const Vf=[(0,a.createInterpolateElement)((0,C.__)("While writing, you can press <kbd>/</kbd> to quickly insert new blocks."),{kbd:(0,$.jsx)("kbd",{})}),(0,a.createInterpolateElement)((0,C.__)("Indent a list by pressing <kbd>space</kbd> at the beginning of a line."),{kbd:(0,$.jsx)("kbd",{})}),(0,a.createInterpolateElement)((0,C.__)("Outdent a list by pressing <kbd>backspace</kbd> at the beginning of a line."),{kbd:(0,$.jsx)("kbd",{})}),(0,C.__)("Drag files into the editor to automatically insert media blocks."),(0,C.__)("Change a block's type by pressing the block icon on the toolbar.")];const Ff=function(){const[e]=(0,a.useState)(Math.floor(Math.random()*Vf.length));return(0,$.jsx)(os.Tip,{children:Vf[e]})},Hf=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})}),Gf=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})}),$f=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.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"})});const Uf=(0,a.memo)((function({icon:e,showColors:t=!1,className:n,context:o}){"block-default"===e?.src&&(e={src:$f});const r=(0,$.jsx)(os.Icon,{icon:e&&e.src?e.src:e,context:o}),i=t?{backgroundColor:e&&e.background,color:e&&e.foreground}:{};return(0,$.jsx)("span",{style:i,className:Zi("block-editor-block-icon",n,{"has-colors":t}),children:r})}));const Wf=function({title:e,icon:t,description:n,blockType:o,className:r,name:i}){o&&(y()("`blockType` property in `BlockCard component`",{since:"5.7",alternative:"`title, icon and description` properties"}),({title:e,icon:t,description:n}=o));const{parentNavBlockClientId:s}=(0,c.useSelect)((e=>{const{getSelectedBlockClientId:t,getBlockParentsByBlockName:n}=e(li);return{parentNavBlockClientId:n(t(),"core/navigation",!0)[0]}}),[]),{selectBlock:l}=(0,c.useDispatch)(li);return(0,$.jsxs)("div",{className:Zi("block-editor-block-card",r),children:[s&&(0,$.jsx)(os.Button,{onClick:()=>l(s),label:(0,C.__)("Go to parent Navigation block"),style:{minWidth:24,padding:0},icon:(0,C.isRTL)()?Hf:Gf,size:"small"}),(0,$.jsx)(Uf,{icon:t,showColors:!0}),(0,$.jsxs)(os.__experimentalVStack,{spacing:1,children:[(0,$.jsx)("h2",{className:"block-editor-block-card__title",children:i?.length?(0,C.sprintf)((0,C._x)("%1$s (%2$s)","block label"),i,e):e}),n&&(0,$.jsx)(os.__experimentalText,{className:"block-editor-block-card__description",children:n})]})]})};const Kf=(0,u.createHigherOrderComponent)((e=>({useSubRegistry:t=!0,...n})=>{const o=(0,c.useRegistry)(),[r]=(0,a.useState)((()=>new WeakMap)),i=function(e,t,n){if(!n)return t;let o=e.get(t);return o||(o=(0,c.createRegistry)({},t),o.registerStore(ne,si),e.set(t,o)),o}(r,o,t);return i===o?(0,$.jsx)(e,{registry:o,...n}):(0,$.jsx)(c.RegistryProvider,{value:i,children:(0,$.jsx)(e,{registry:i,...n})})}),"withRegistryProvider"),Zf=()=>{};function qf({clientId:e=null,value:t,selection:n,onChange:o=Zf,onInput:r=Zf}){const i=(0,c.useRegistry)(),{resetBlocks:s,resetSelection:u,replaceInnerBlocks:d,setHasControlledInnerBlocks:p,__unstableMarkNextChangeAsNotPersistent:h}=i.dispatch(li),{getBlockName:g,getBlocks:m,getSelectionStart:f,getSelectionEnd:b}=i.select(li),k=(0,c.useSelect)((t=>!e||t(li).areInnerBlocksControlled(e)),[e]),v=(0,a.useRef)({incoming:null,outgoing:[]}),_=(0,a.useRef)(!1),x=()=>{t&&(h(),e?i.batch((()=>{p(e,!0);const n=t.map((e=>(0,l.cloneBlock)(e)));_.current&&(v.current.incoming=n),h(),d(e,n)})):(_.current&&(v.current.incoming=t),s(t)))},y=(0,a.useRef)(r),S=(0,a.useRef)(o);(0,a.useEffect)((()=>{y.current=r,S.current=o}),[r,o]),(0,a.useEffect)((()=>{v.current.outgoing.includes(t)?v.current.outgoing[v.current.outgoing.length-1]===t&&(v.current.outgoing=[]):m(e)!==t&&(v.current.outgoing=[],x(),n&&u(n.selectionStart,n.selectionEnd,n.initialPosition))}),[t,e]);const w=(0,a.useRef)(!1);(0,a.useEffect)((()=>{w.current?k||(v.current.outgoing=[],x()):w.current=!0}),[k]),(0,a.useEffect)((()=>{const{getSelectedBlocksInitialCaretPosition:t,isLastBlockChangePersistent:n,__unstableIsLastBlockChangeIgnored:o,areInnerBlocksControlled:r}=i.select(li);let s=m(e),l=n(),a=!1;_.current=!0;const c=i.subscribe((()=>{if(null!==e&&null===g(e))return;if(!(!e||r(e)))return;const i=n(),c=m(e),u=c!==s;if(s=c,u&&(v.current.incoming||o()))return v.current.incoming=null,void(l=i);if(u||a&&!u&&i&&!l){l=i,v.current.outgoing.push(s);(l?S.current:y.current)(s,{selection:{selectionStart:f(),selectionEnd:b(),initialPosition:t()}})}a=u}),li);return()=>{_.current=!1,c()}}),[i,e]),(0,a.useEffect)((()=>()=>{h(),e?(p(e,!1),h(),d(e,[])):s([])}),[])}const Yf=window.wp.keyboardShortcuts;function Xf(){return null}Xf.Register=function(){const{registerShortcut:e}=(0,c.useDispatch)(Yf.store);return(0,a.useEffect)((()=>{e({name:"core/block-editor/duplicate",category:"block",description:(0,C.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:(0,C.__)("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/insert-before",category:"block",description:(0,C.__)("Insert a new block before the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"t"}}),e({name:"core/block-editor/insert-after",category:"block",description:(0,C.__)("Insert a new block after the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"y"}}),e({name:"core/block-editor/delete-multi-selection",category:"block",description:(0,C.__)("Delete selection."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/select-all",category:"selection",description:(0,C.__)("Select all text when typing. Press again to select all blocks."),keyCombination:{modifier:"primary",character:"a"}}),e({name:"core/block-editor/unselect",category:"selection",description:(0,C.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/multi-text-selection",category:"selection",description:(0,C.__)("Select text across multiple blocks."),keyCombination:{modifier:"shift",character:"arrow"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:(0,C.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:(0,C.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:(0,C.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}}),e({name:"core/block-editor/collapse-list-view",category:"list-view",description:(0,C.__)("Collapse all other items."),keyCombination:{modifier:"alt",character:"l"}}),e({name:"core/block-editor/group",category:"block",description:(0,C.__)("Create a group block from the selected multiple blocks."),keyCombination:{modifier:"primary",character:"g"}})}),[e]),null};const Qf=Xf,Jf=Kf((e=>{const{children:t,settings:n,stripExperimentalSettings:o=!1}=e,{__experimentalUpdateSettings:r}=te((0,c.useDispatch)(li));return(0,a.useEffect)((()=>{r({...n,__internalIsInitialized:!0},{stripExperimentalSettings:o,reset:!0})}),[n,o,r]),qf(e),(0,$.jsxs)(os.SlotFillProvider,{passthrough:!0,children:[!n?.__unstableIsPreviewMode&&(0,$.jsx)(Qf.Register,{}),(0,$.jsx)(mp,{children:t})]})})),eb=e=>(0,$.jsx)(Jf,{...e,stripExperimentalSettings:!0,children:e.children}),tb=(0,a.createContext)({});function nb({value:e,children:t}){const n=(0,a.useContext)(tb),o=(0,a.useMemo)((()=>({...n,...e})),[n,e]);return(0,$.jsx)(tb.Provider,{value:o,children:t})}const ob=tb,rb={},ib=(0,os.withFilters)("editor.BlockEdit")((e=>{const{name:t}=e,n=(0,l.getBlockType)(t);if(!n)return null;const o=n.edit||n.save;return(0,$.jsx)(o,{...e})})),sb=e=>{const{attributes:t={},name:n}=e,o=(0,l.getBlockType)(n),r=(0,a.useContext)(ob),i=(0,a.useMemo)((()=>o&&o.usesContext?Object.fromEntries(Object.entries(r).filter((([e])=>o.usesContext.includes(e)))):rb),[o,r]);if(!o)return null;if(o.apiVersion>1)return(0,$.jsx)(ib,{...e,context:i});const s=(0,l.hasBlockSupport)(o,"className",!0)?(0,l.getBlockDefaultClassName)(n):null,c=Zi(s,t.className,e.className);return(0,$.jsx)(ib,{...e,context:i,className:c})},lb=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})});const ab=function({className:e,actions:t,children:n,secondaryActions:o}){return(0,$.jsx)("div",{style:{display:"contents",all:"initial"},children:(0,$.jsx)("div",{className:Zi(e,"block-editor-warning"),children:(0,$.jsxs)("div",{className:"block-editor-warning__contents",children:[(0,$.jsx)("p",{className:"block-editor-warning__message",children:n}),(a.Children.count(t)>0||o)&&(0,$.jsxs)("div",{className:"block-editor-warning__actions",children:[a.Children.count(t)>0&&a.Children.map(t,((e,t)=>(0,$.jsx)("span",{className:"block-editor-warning__action",children:e},t))),o&&(0,$.jsx)(os.DropdownMenu,{className:"block-editor-warning__secondary",icon:lb,label:(0,C.__)("More options"),popoverProps:{position:"bottom left",className:"block-editor-warning__dropdown"},noIcons:!0,children:()=>(0,$.jsx)(os.MenuGroup,{children:o.map(((e,t)=>(0,$.jsx)(os.MenuItem,{onClick:e.onClick,children:e.title},t)))})})]})]})})})};function cb({originalBlockClientId:e,name:t,onReplace:n}){const{selectBlock:o}=(0,c.useDispatch)(li),r=(0,l.getBlockType)(t);return(0,$.jsxs)(ab,{actions:[(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>o(e),children:(0,C.__)("Find original")},"find-original"),(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>n([]),children:(0,C.__)("Remove")},"remove")],children:[(0,$.jsxs)("strong",{children:[r?.title,": "]}),(0,C.__)("This block can only be used once.")]})}const ub=(0,a.createContext)({});function db({mayDisplayControls:e,mayDisplayParentControls:t,blockEditingMode:n,isPreviewMode:o,...r}){const{name:i,isSelected:s,clientId:c,attributes:u={},__unstableLayoutClassNames:d}=r,{layout:b=null,metadata:k={}}=u,{bindings:_}=k,x=(0,l.hasBlockSupport)(i,"layout",!1)||(0,l.hasBlockSupport)(i,"__experimentalLayout",!1),{originalBlockClientId:y}=(0,a.useContext)(ub);return(0,$.jsxs)(v,{value:(0,a.useMemo)((()=>({name:i,isSelected:s,clientId:c,layout:x?b:null,__unstableLayoutClassNames:d,[p]:e,[h]:t,[g]:n,[m]:_,[f]:o})),[i,s,c,x,b,d,e,t,n,_,o]),children:[(0,$.jsx)(sb,{...r}),y&&(0,$.jsx)(cb,{originalBlockClientId:y,name:i,onReplace:r.onReplace})]})}var pb=n(8021);function hb({title:e,rawContent:t,renderedContent:n,action:o,actionText:r,className:i}){return(0,$.jsxs)("div",{className:i,children:[(0,$.jsxs)("div",{className:"block-editor-block-compare__content",children:[(0,$.jsx)("h2",{className:"block-editor-block-compare__heading",children:e}),(0,$.jsx)("div",{className:"block-editor-block-compare__html",children:t}),(0,$.jsx)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor",children:(0,$.jsx)(a.RawHTML,{children:(0,ba.safeHTML)(n)})})]}),(0,$.jsx)("div",{className:"block-editor-block-compare__action",children:(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,variant:"secondary",tabIndex:"0",onClick:o,children:r})})]})}const gb=function({block:e,onKeep:t,onConvert:n,convertor:o,convertButtonText:r}){const i=(s=o(e),(Array.isArray(s)?s:[s]).map((e=>(0,l.getSaveContent)(e.name,e.attributes,e.innerBlocks))).join(""));var s;const a=(c=e.originalContent,u=i,(0,pb.JJ)(c,u).map(((e,t)=>{const n=Zi({"block-editor-block-compare__added":e.added,"block-editor-block-compare__removed":e.removed});return(0,$.jsx)("span",{className:n,children:e.value},t)})));var c,u;return(0,$.jsxs)("div",{className:"block-editor-block-compare__wrapper",children:[(0,$.jsx)(hb,{title:(0,C.__)("Current"),className:"block-editor-block-compare__current",action:t,actionText:(0,C.__)("Convert to HTML"),rawContent:e.originalContent,renderedContent:e.originalContent}),(0,$.jsx)(hb,{title:(0,C.__)("After Conversion"),className:"block-editor-block-compare__converted",action:n,actionText:r,rawContent:a,renderedContent:i})]})},mb=e=>(0,l.rawHandler)({HTML:e.originalContent});function fb({clientId:e}){const{block:t,canInsertHTMLBlock:n,canInsertClassicBlock:o}=(0,c.useSelect)((t=>{const{canInsertBlockType:n,getBlock:o,getBlockRootClientId:r}=t(li),i=r(e);return{block:o(e),canInsertHTMLBlock:n("core/html",i),canInsertClassicBlock:n("core/freeform",i)}}),[e]),{replaceBlock:r}=(0,c.useDispatch)(li),[i,s]=(0,a.useState)(!1),u=(0,a.useCallback)((()=>s(!1)),[]),d=(0,a.useMemo)((()=>({toClassic(){const e=(0,l.createBlock)("core/freeform",{content:t.originalContent});return r(t.clientId,e)},toHTML(){const e=(0,l.createBlock)("core/html",{content:t.originalContent});return r(t.clientId,e)},toBlocks(){const e=mb(t);return r(t.clientId,e)},toRecoveredBlock(){const e=(0,l.createBlock)(t.name,t.attributes,t.innerBlocks);return r(t.clientId,e)}})),[t,r]),p=(0,a.useMemo)((()=>[{title:(0,C._x)("Resolve","imperative verb"),onClick:()=>s(!0)},n&&{title:(0,C.__)("Convert to HTML"),onClick:d.toHTML},o&&{title:(0,C.__)("Convert to Classic Block"),onClick:d.toClassic}].filter(Boolean)),[n,o,d]);return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(ab,{actions:[(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,onClick:d.toRecoveredBlock,variant:"primary",children:(0,C.__)("Attempt recovery")},"recover")],secondaryActions:p,children:(0,C.__)("Block contains unexpected or invalid content.")}),i&&(0,$.jsx)(os.Modal,{title:(0,C.__)("Resolve Block"),onRequestClose:u,className:"block-editor-block-compare",children:(0,$.jsx)(gb,{block:t,onKeep:d.toHTML,onConvert:d.toBlocks,convertor:mb,convertButtonText:(0,C.__)("Convert to Blocks")})})]})}const bb=(0,$.jsx)(ab,{className:"block-editor-block-list__block-crash-warning",children:(0,C.__)("This block has encountered an error and cannot be previewed.")}),kb=()=>bb;class vb 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}}const _b=vb;var xb=n(4132);const yb=function({clientId:e}){const[t,n]=(0,a.useState)(""),o=(0,c.useSelect)((t=>t(li).getBlock(e)),[e]),{updateBlock:r}=(0,c.useDispatch)(li);return(0,a.useEffect)((()=>{n((0,l.getBlockContent)(o))}),[o]),(0,$.jsx)(xb.A,{className:"block-editor-block-list__block-html-textarea",value:t,onBlur:()=>{const i=(0,l.getBlockType)(o.name);if(!i)return;const s=(0,l.getBlockAttributes)(i,t,o.attributes),a=t||(0,l.getSaveContent)(i,s),[c]=t?(0,l.validateBlock)({...o,attributes:s,originalContent:a}):[!0];r(e,{attributes:s,originalContent:a,isValid:c}),t||n(a)},onChange:e=>n(e.target.value)})};var Sb=zb(),wb=e=>Lb(e,Sb),Cb=zb();wb.write=e=>Lb(e,Cb);var Bb=zb();wb.onStart=e=>Lb(e,Bb);var Ib=zb();wb.onFrame=e=>Lb(e,Ib);var jb=zb();wb.onFinish=e=>Lb(e,jb);var Eb=[];wb.setTimeout=(e,t)=>{let n=wb.now()+t,o=()=>{let e=Eb.findIndex((e=>e.cancel==o));~e&&Eb.splice(e,1),Rb-=~e?1:0},r={time:n,handler:e,cancel:o};return Eb.splice(Tb(n),0,r),Rb+=1,Ab(),r};var Tb=e=>~(~Eb.findIndex((t=>t.time>e))||~Eb.length);wb.cancel=e=>{Bb.delete(e),Ib.delete(e),jb.delete(e),Sb.delete(e),Cb.delete(e)},wb.sync=e=>{Nb=!0,wb.batchedUpdates(e),Nb=!1},wb.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function o(...e){t=e,wb.onStart(n)}return o.handler=e,o.cancel=()=>{Bb.delete(n),t=null},o};var Mb=typeof window<"u"?window.requestAnimationFrame:()=>{};wb.use=e=>Mb=e,wb.now=typeof performance<"u"?()=>performance.now():Date.now,wb.batchedUpdates=e=>e(),wb.catch=console.error,wb.frameLoop="always",wb.advance=()=>{"demand"!==wb.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):Ob()};var Pb=-1,Rb=0,Nb=!1;function Lb(e,t){Nb?(t.delete(e),e(0)):(t.add(e),Ab())}function Ab(){Pb<0&&(Pb=0,"demand"!==wb.frameLoop&&Mb(Db))}function Db(){~Pb&&(Mb(Db),wb.batchedUpdates(Ob))}function Ob(){let e=Pb;Pb=wb.now();let t=Tb(Pb);t&&(Vb(Eb.splice(0,t),(e=>e.handler())),Rb-=t),Rb?(Bb.flush(),Sb.flush(e?Math.min(64,Pb-e):16.667),Ib.flush(),Cb.flush(),jb.flush()):Pb=-1}function zb(){let e=new Set,t=e;return{add(n){Rb+=t!=e||e.has(n)?0:1,e.add(n)},delete:n=>(Rb-=t==e&&e.has(n)?1:0,e.delete(n)),flush(n){t.size&&(e=new Set,Rb-=t.size,Vb(t,(t=>t(n)&&e.add(t))),Rb+=e.size,t=e)}}}function Vb(e,t){e.forEach((e=>{try{t(e)}catch(e){wb.catch(e)}}))}var Fb=Object.defineProperty,Hb={};function Gb(){}((e,t)=>{for(var n in t)Fb(e,n,{get:t[n],enumerable:!0})})(Hb,{assign:()=>ok,colors:()=>ek,createStringInterpolator:()=>Yb,skipAnimation:()=>tk,to:()=>Xb,willAdvance:()=>nk});var $b={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 Ub(e,t){if($b.arr(e)){if(!$b.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var Wb=(e,t)=>e.forEach(t);function Kb(e,t,n){if($b.arr(e))for(let o=0;o<e.length;o++)t.call(n,e[o],`${o}`);else for(let o in e)e.hasOwnProperty(o)&&t.call(n,e[o],o)}var Zb=e=>$b.und(e)?[]:$b.arr(e)?e:[e];function qb(e,t){if(e.size){let n=Array.from(e);e.clear(),Wb(n,t)}}var Yb,Xb,Qb=(e,...t)=>qb(e,(e=>e(...t))),Jb=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),ek=null,tk=!1,nk=Gb,ok=e=>{e.to&&(Xb=e.to),e.now&&(wb.now=e.now),void 0!==e.colors&&(ek=e.colors),null!=e.skipAnimation&&(tk=e.skipAnimation),e.createStringInterpolator&&(Yb=e.createStringInterpolator),e.requestAnimationFrame&&wb.use(e.requestAnimationFrame),e.batchedUpdates&&(wb.batchedUpdates=e.batchedUpdates),e.willAdvance&&(nk=e.willAdvance),e.frameLoop&&(wb.frameLoop=e.frameLoop)},rk=new Set,ik=[],sk=[],lk=0,ak={get idle(){return!rk.size&&!ik.length},start(e){lk>e.priority?(rk.add(e),wb.onStart(ck)):(uk(e),wb(pk))},advance:pk,sort(e){if(lk)wb.onFrame((()=>ak.sort(e)));else{let t=ik.indexOf(e);~t&&(ik.splice(t,1),dk(e))}},clear(){ik=[],rk.clear()}};function ck(){rk.forEach(uk),rk.clear(),wb(pk)}function uk(e){ik.includes(e)||dk(e)}function dk(e){ik.splice(function(e,t){let n=e.findIndex(t);return n<0?e.length:n}(ik,(t=>t.priority>e.priority)),0,e)}function pk(e){let t=sk;for(let n=0;n<ik.length;n++){let o=ik[n];lk=o.priority,o.idle||(nk(o),o.advance(e),o.idle||t.push(o))}return lk=0,(sk=ik).length=0,(ik=t).length>0}var hk="[-+]?\\d*\\.?\\d+",gk=hk+"%";function mk(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var fk=new RegExp("rgb"+mk(hk,hk,hk)),bk=new RegExp("rgba"+mk(hk,hk,hk,hk)),kk=new RegExp("hsl"+mk(hk,gk,gk)),vk=new RegExp("hsla"+mk(hk,gk,gk,hk)),_k=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,xk=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,yk=/^#([0-9a-fA-F]{6})$/,Sk=/^#([0-9a-fA-F]{8})$/;function wk(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 Ck(e,t,n){let o=n<.5?n*(1+t):n+t-n*t,r=2*n-o,i=wk(r,o,e+1/3),s=wk(r,o,e),l=wk(r,o,e-1/3);return Math.round(255*i)<<24|Math.round(255*s)<<16|Math.round(255*l)<<8}function Bk(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function Ik(e){return(parseFloat(e)%360+360)%360/360}function jk(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function Ek(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function Tk(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=yk.exec(e))?parseInt(t[1]+"ff",16)>>>0:ek&&void 0!==ek[e]?ek[e]:(t=fk.exec(e))?(Bk(t[1])<<24|Bk(t[2])<<16|Bk(t[3])<<8|255)>>>0:(t=bk.exec(e))?(Bk(t[1])<<24|Bk(t[2])<<16|Bk(t[3])<<8|jk(t[4]))>>>0:(t=_k.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Sk.exec(e))?parseInt(t[1],16)>>>0:(t=xk.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=kk.exec(e))?(255|Ck(Ik(t[1]),Ek(t[2]),Ek(t[3])))>>>0:(t=vk.exec(e))?(Ck(Ik(t[1]),Ek(t[2]),Ek(t[3]))|jk(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})`)}var Mk=(e,t,n)=>{if($b.fun(e))return e;if($b.arr(e))return Mk({range:e,output:t,extrapolate:n});if($b.str(e.output[0]))return Yb(e);let o=e,r=o.output,i=o.range||[0,1],s=o.extrapolateLeft||o.extrapolate||"extend",l=o.extrapolateRight||o.extrapolate||"extend",a=o.easing||(e=>e);return e=>{let t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,i);return function(e,t,n,o,r,i,s,l,a){let c=a?a(e):e;if(c<t){if("identity"===s)return c;"clamp"===s&&(c=t)}if(c>n){if("identity"===l)return c;"clamp"===l&&(c=n)}return o===r?o:t===n?e<=t?o:r:(t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t),c=i(c),o===-1/0?c=-c:r===1/0?c+=o:c=c*(r-o)+o,c)}(e,i[t],i[t+1],r[t],r[t+1],a,s,l,o.map)}};var Pk=1.70158,Rk=1.525*Pk,Nk=Pk+1,Lk=2*Math.PI/3,Ak=2*Math.PI/4.5,Dk=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,Ok={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=>Nk*e*e*e-Pk*e*e,easeOutBack:e=>1+Nk*Math.pow(e-1,3)+Pk*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*(2*(Rk+1)*e-Rk)/2:(Math.pow(2*e-2,2)*((Rk+1)*(2*e-2)+Rk)+2)/2,easeInElastic:e=>0===e?0:1===e?1:-Math.pow(2,10*e-10)*Math.sin((10*e-10.75)*Lk),easeOutElastic:e=>0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin((10*e-.75)*Lk)+1,easeInOutElastic:e=>0===e?0:1===e?1:e<.5?-Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*Ak)/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*Ak)/2+1,easeInBounce:e=>1-Dk(1-e),easeOutBounce:Dk,easeInOutBounce:e=>e<.5?(1-Dk(1-2*e))/2:(1+Dk(2*e-1))/2,steps:(e,t="end")=>n=>{let o=(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(o):Math.ceil(o))/e)}},zk=Symbol.for("FluidValue.get"),Vk=Symbol.for("FluidValue.observers"),Fk=e=>Boolean(e&&e[zk]),Hk=e=>e&&e[zk]?e[zk]():e,Gk=e=>e[Vk]||null;function $k(e,t){let n=e[Vk];n&&n.forEach((e=>{!function(e,t){e.eventObserved?e.eventObserved(t):e(t)}(e,t)}))}var Uk=class{[zk];[Vk];constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");Wk(this,e)}},Wk=(e,t)=>Yk(e,zk,t);function Kk(e,t){if(e[zk]){let n=e[Vk];n||Yk(e,Vk,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function Zk(e,t){let n=e[Vk];if(n&&n.has(t)){let o=n.size-1;o?n.delete(t):e[Vk]=null,e.observerRemoved&&e.observerRemoved(o,t)}}var qk,Yk=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),Xk=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Qk=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Jk=new RegExp(`(${Xk.source})(%|[a-z]+)`,"i"),ev=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,tv=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,nv=e=>{let[t,n]=ov(e);if(!t||Jb())return e;let o=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(o)return o.trim();if(n&&n.startsWith("--")){return window.getComputedStyle(document.documentElement).getPropertyValue(n)||e}return n&&tv.test(n)?nv(n):n||e},ov=e=>{let t=tv.exec(e);if(!t)return[,];let[,n,o]=t;return[n,o]},rv=(e,t,n,o,r)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(o)}, ${r})`,iv=e=>{qk||(qk=ek?new RegExp(`(${Object.keys(ek).join("|")})(?!\\w)`,"g"):/^\b$/);let t=e.output.map((e=>Hk(e).replace(tv,nv).replace(Qk,Tk).replace(qk,Tk))),n=t.map((e=>e.match(Xk).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]})))).map((t=>Mk({...e,output:t})));return e=>{let n=!Jk.test(t[0])&&t.find((e=>Jk.test(e)))?.replace(Xk,""),r=0;return t[0].replace(Xk,(()=>`${o[r++](e)}${n||""}`)).replace(ev,rv)}},sv="react-spring: ",lv=e=>{let t=e,n=!1;if("function"!=typeof t)throw new TypeError(`${sv}once requires a function parameter`);return(...e)=>{n||(t(...e),n=!0)}},av=lv(console.warn);lv(console.warn);function cv(e){return $b.str(e)&&("#"==e[0]||/\d/.test(e)||!Jb()&&tv.test(e)||e in(ek||{}))}new WeakMap;new Set,new WeakMap,new WeakMap,new WeakMap;var uv=Jb()?Pa.useEffect:Pa.useLayoutEffect;function dv(){let e=(0,Pa.useState)()[1],t=(()=>{let e=(0,Pa.useRef)(!1);return uv((()=>(e.current=!0,()=>{e.current=!1})),[]),e})();return()=>{t.current&&e(Math.random())}}var pv=[];var hv=Symbol.for("Animated:node"),gv=e=>e&&e[hv],mv=(e,t)=>((e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}))(e,hv,t),fv=e=>e&&e[hv]&&e[hv].getPayload(),bv=class{payload;constructor(){mv(this,this)}getPayload(){return this.payload||[]}},kv=class extends bv{constructor(e){super(),this._value=e,$b.num(this._value)&&(this.lastPosition=this._value)}done=!0;elapsedTime;lastPosition;lastVelocity;v0;durationProgress=0;static create(e){return new kv(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return $b.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(){let{done:e}=this;this.done=!1,$b.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},vv=class extends kv{_string=null;_toString;constructor(e){super(0),this._toString=Mk({output:[e,e]})}static create(e){return new vv(e)}getValue(){return this._string??(this._string=this._toString(this._value))}setValue(e){if($b.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=Mk({output:[this.getValue(),e]})),this._value=0,super.reset()}},_v={dependencies:null},xv=class extends bv{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){let t={};return Kb(this.source,((n,o)=>{(e=>!!e&&e[hv]===e)(n)?t[o]=n.getValue(e):Fk(n)?t[o]=Hk(n):e||(t[o]=n)})),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&Wb(this.payload,(e=>e.reset()))}_makePayload(e){if(e){let t=new Set;return Kb(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){_v.dependencies&&Fk(e)&&_v.dependencies.add(e);let t=fv(e);t&&Wb(t,(e=>this.add(e)))}},yv=class extends xv{constructor(e){super(e)}static create(e){return new yv(e)}getValue(){return this.source.map((e=>e.getValue()))}setValue(e){let t=this.getPayload();return e.length==t.length?t.map(((t,n)=>t.setValue(e[n]))).some(Boolean):(super.setValue(e.map(Sv)),!0)}};function Sv(e){return(cv(e)?vv:kv).create(e)}function wv(e){let t=gv(e);return t?t.constructor:$b.arr(e)?yv:cv(e)?vv:kv}var Cv=(e,t)=>{let n=!$b.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,Pa.forwardRef)(((o,r)=>{let i=(0,Pa.useRef)(null),s=n&&(0,Pa.useCallback)((e=>{i.current=function(e,t){return e&&($b.fun(e)?e(t):e.current=t),t}(r,e)}),[r]),[l,a]=function(e,t){let n=new Set;return _v.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new xv(e),_v.dependencies=null,[e,n]}(o,t),c=dv(),u=()=>{let e=i.current;n&&!e||!1===(!!e&&t.applyAnimatedValues(e,l.getValue(!0)))&&c()},d=new Bv(u,a),p=(0,Pa.useRef)();uv((()=>(p.current=d,Wb(a,(e=>Kk(e,d))),()=>{p.current&&(Wb(p.current.deps,(e=>Zk(e,p.current))),wb.cancel(p.current.update))}))),(0,Pa.useEffect)(u,[]),(e=>{(0,Pa.useEffect)(e,pv)})((()=>()=>{let e=p.current;Wb(e.deps,(t=>Zk(t,e)))}));let h=t.getComponentProps(l.getValue());return Pa.createElement(e,{...h,ref:s})}))},Bv=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){"change"==e.type&&wb.write(this.update)}};var Iv=Symbol.for("AnimatedComponent"),jv=e=>$b.str(e)?e:e&&$b.str(e.displayName)?e.displayName:$b.fun(e)&&e.name||null;function Ev(e,...t){return $b.fun(e)?e(...t):e}var Tv=(e,t)=>!0===e||!!(t&&e&&($b.fun(e)?e(t):Zb(e).includes(t))),Mv=(e,t)=>$b.obj(e)?t&&e[t]:e,Pv=(e,t)=>!0===e.default?e[t]:e.default?e.default[t]:void 0,Rv=e=>e,Nv=(e,t=Rv)=>{let n=Lv;e.default&&!0!==e.default&&(e=e.default,n=Object.keys(e));let o={};for(let r of n){let n=t(e[r],r);$b.und(n)||(o[r]=n)}return o},Lv=["config","onProps","onStart","onChange","onPause","onResume","onRest"],Av={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 Dv(e){let t=function(e){let t={},n=0;if(Kb(e,((e,o)=>{Av[o]||(t[o]=e,n++)})),n)return t}(e);if(t){let n={to:t};return Kb(e,((e,o)=>o in t||(n[o]=e))),n}return{...e}}function Ov(e){return e=Hk(e),$b.arr(e)?e.map(Ov):cv(e)?Hb.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function zv(e){return $b.fun(e)||$b.arr(e)&&$b.obj(e[0])}var Vv={tension:170,friction:26,mass:1,damping:1,easing:Ok.linear,clamp:!1},Fv=class{tension;friction;frequency;damping;mass;velocity=0;restVelocity;precision;progress;duration;easing;clamp;bounce;decay;round;constructor(){Object.assign(this,Vv)}};function Hv(e,t){if($b.und(t.decay)){let n=!$b.und(t.tension)||!$b.und(t.friction);(n||!$b.und(t.frequency)||!$b.und(t.damping)||!$b.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}else e.duration=void 0}var Gv=[],$v=class{changed=!1;values=Gv;toValues=null;fromValues=Gv;to;from;config=new Fv;immediate=!1};function Uv(e,{key:t,props:n,defaultProps:o,state:r,actions:i}){return new Promise(((s,l)=>{let a,c,u=Tv(n.cancel??o?.cancel,t);if(u)h();else{$b.und(n.pause)||(r.paused=Tv(n.pause,t));let e=o?.pause;!0!==e&&(e=r.paused||Tv(e,t)),a=Ev(n.delay||0,t),e?(r.resumeQueue.add(p),i.pause()):(i.resume(),p())}function d(){r.resumeQueue.add(p),r.timeouts.delete(c),c.cancel(),a=c.time-wb.now()}function p(){a>0&&!Hb.skipAnimation?(r.delayed=!0,c=wb.setTimeout(h,a),r.pauseQueue.add(d),r.timeouts.add(c)):h()}function h(){r.delayed&&(r.delayed=!1),r.pauseQueue.delete(d),r.timeouts.delete(c),e<=(r.cancelId||0)&&(u=!0);try{i.start({...n,callId:e,cancel:u},s)}catch(e){l(e)}}}))}var Wv=(e,t)=>1==t.length?t[0]:t.some((e=>e.cancelled))?qv(e.get()):t.every((e=>e.noop))?Kv(e.get()):Zv(e.get(),t.every((e=>e.finished))),Kv=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),Zv=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),qv=e=>({value:e,cancelled:!0,finished:!1});function Yv(e,t,n,o){let{callId:r,parentId:i,onRest:s}=t,{asyncTo:l,promise:a}=n;return i||e!==l||t.reset?n.promise=(async()=>{n.asyncId=r,n.asyncTo=e;let c,u,d,p=Nv(t,((e,t)=>"onRest"===t?void 0:e)),h=new Promise(((e,t)=>(c=e,u=t))),g=e=>{let t=r<=(n.cancelId||0)&&qv(o)||r!==n.asyncId&&Zv(o,!1);if(t)throw e.result=t,u(e),e},m=(e,t)=>{let i=new Qv,s=new Jv;return(async()=>{if(Hb.skipAnimation)throw Xv(n),s.result=Zv(o,!1),u(s),s;g(i);let l=$b.obj(e)?{...e}:{...t,to:e};l.parentId=r,Kb(p,((e,t)=>{$b.und(l[t])&&(l[t]=e)}));let a=await o.start(l);return g(i),n.paused&&await new Promise((e=>{n.resumeQueue.add(e)})),a})()};if(Hb.skipAnimation)return Xv(n),Zv(o,!1);try{let t;t=$b.arr(e)?(async e=>{for(let t of e)await m(t)})(e):Promise.resolve(e(m,o.stop.bind(o))),await Promise.all([t.then(c),h]),d=Zv(o.get(),!0,!1)}catch(e){if(e instanceof Qv)d=e.result;else{if(!(e instanceof Jv))throw e;d=e.result}}finally{r==n.asyncId&&(n.asyncId=i,n.asyncTo=i?l:void 0,n.promise=i?a:void 0)}return $b.fun(s)&&wb.batchedUpdates((()=>{s(d,o,o.item)})),d})():a}function Xv(e,t){qb(e.timeouts,(e=>e.cancel())),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var Qv=class extends Error{result;constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},Jv=class extends Error{result;constructor(){super("SkipAnimationSignal")}},e_=e=>e instanceof n_,t_=1,n_=class extends Uk{id=t_++;_priority=0;get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){let e=gv(this);return e&&e.getValue()}to(...e){return Hb.to(this,e)}interpolate(...e){return av(`${sv}The "interpolate" function is deprecated in v9 (use "to" instead)`),Hb.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){$k(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||ak.sort(this),$k(this,{type:"priority",parent:this,priority:e})}},o_=Symbol.for("SpringPhase"),r_=e=>(1&e[o_])>0,i_=e=>(2&e[o_])>0,s_=e=>(4&e[o_])>0,l_=(e,t)=>t?e[o_]|=3:e[o_]&=-3,a_=(e,t)=>t?e[o_]|=4:e[o_]&=-5,c_=class extends n_{key;animation=new $v;queue;defaultProps={};_state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set};_pendingCalls=new Set;_lastCallId=0;_lastToId=0;_memoizedDuration=0;constructor(e,t){if(super(),!$b.und(e)||!$b.und(t)){let n=$b.obj(e)?{...e}:{...t,from:e};$b.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(i_(this)||this._state.asyncTo)||s_(this)}get goal(){return Hk(this.animation.to)}get velocity(){let e=gv(this);return e instanceof kv?e.lastVelocity||0:e.getPayload().map((e=>e.lastVelocity||0))}get hasAnimated(){return r_(this)}get isAnimating(){return i_(this)}get isPaused(){return s_(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1,o=this.animation,{config:r,toValues:i}=o,s=fv(o.to);!s&&Fk(o.to)&&(i=Zb(Hk(o.to))),o.values.forEach(((l,a)=>{if(l.done)return;let c=l.constructor==vv?1:s?s[a].lastPosition:i[a],u=o.immediate,d=c;if(!u){if(d=l.lastPosition,r.tension<=0)return void(l.done=!0);let t,n=l.elapsedTime+=e,i=o.fromValues[a],s=null!=l.v0?l.v0:l.v0=$b.arr(r.velocity)?r.velocity[a]:r.velocity,p=r.precision||(i==c?.005:Math.min(1,.001*Math.abs(c-i)));if($b.und(r.duration))if(r.decay){let e=!0===r.decay?.998:r.decay,o=Math.exp(-(1-e)*n);d=i+s/(1-e)*(1-o),u=Math.abs(l.lastPosition-d)<=p,t=s*o}else{t=null==l.lastVelocity?s:l.lastVelocity;let n,o=r.restVelocity||p/10,a=r.clamp?0:r.bounce,h=!$b.und(a),g=i==c?l.v0>0:i<c,m=!1,f=1,b=Math.ceil(e/f);for(let e=0;e<b&&(n=Math.abs(t)>o,n||(u=Math.abs(c-d)<=p,!u));++e){h&&(m=d==c||d>c==g,m&&(t=-t*a,d=c)),t+=(1e-6*-r.tension*(d-c)+.001*-r.friction*t)/r.mass*f,d+=t*f}}else{let o=1;r.duration>0&&(this._memoizedDuration!==r.duration&&(this._memoizedDuration=r.duration,l.durationProgress>0&&(l.elapsedTime=r.duration*l.durationProgress,n=l.elapsedTime+=e)),o=(r.progress||0)+n/this._memoizedDuration,o=o>1?1:o<0?0:o,l.durationProgress=o),d=i+r.easing(o)*(c-i),t=(d-l.lastPosition)/e,u=1==o}l.lastVelocity=t,Number.isNaN(d)&&(console.warn("Got NaN while animating:",this),u=!0)}s&&!s[a].done&&(u=!1),u?l.done=!0:t=!1,l.setValue(d,r.round)&&(n=!0)}));let l=gv(this),a=l.getValue();if(t){let e=Hk(o.to);a===e&&!n||r.decay?n&&r.decay&&this._onChange(a):(l.setValue(e),this._onChange(e)),this._stop()}else n&&this._onChange(a)}set(e){return wb.batchedUpdates((()=>{this._stop(),this._focus(e),this._set(e)})),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(i_(this)){let{to:e,config:t}=this.animation;wb.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 $b.und(e)?(n=this.queue||[],this.queue=[]):n=[$b.obj(e)?e:{...t,to:e}],Promise.all(n.map((e=>this._update(e)))).then((e=>Wv(this,e)))}stop(e){let{to:t}=this.animation;return this._focus(this.get()),Xv(this._state,e&&this._lastCallId),wb.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){let t=this.key||"",{to:n,from:o}=e;n=$b.obj(n)?n[t]:n,(null==n||zv(n))&&(n=void 0),o=$b.obj(o)?o[t]:o,null==o&&(o=void 0);let r={to:n,from:o};return r_(this)||(e.reverse&&([n,o]=[o,n]),o=Hk(o),$b.und(o)?gv(this)||this._set(n):this._set(o)),r}_update({...e},t){let{key:n,defaultProps:o}=this;e.default&&Object.assign(o,Nv(e,((e,t)=>/^on/.test(t)?Mv(e,n):e))),m_(this,e,"onProps"),f_(this,"onProps",e,this);let r=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?");let i=this._state;return Uv(++this._lastCallId,{key:n,props:e,defaultProps:o,state:i,actions:{pause:()=>{s_(this)||(a_(this,!0),Qb(i.pauseQueue),f_(this,"onPause",Zv(this,u_(this,this.animation.to)),this))},resume:()=>{s_(this)&&(a_(this,!1),i_(this)&&this._resume(),Qb(i.resumeQueue),f_(this,"onResume",Zv(this,u_(this,this.animation.to)),this))},start:this._merge.bind(this,r)}}).then((n=>{if(e.loop&&n.finished&&(!t||!n.noop)){let t=d_(e);if(t)return this._update(t,!0)}return n}))}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(qv(this));let o=!$b.und(e.to),r=!$b.und(e.from);if(o||r){if(!(t.callId>this._lastToId))return n(qv(this));this._lastToId=t.callId}let{key:i,defaultProps:s,animation:l}=this,{to:a,from:c}=l,{to:u=a,from:d=c}=e;r&&!o&&(!t.default||$b.und(u))&&(u=d),t.reverse&&([u,d]=[d,u]);let p=!Ub(d,c);p&&(l.from=d),d=Hk(d);let h=!Ub(u,a);h&&this._focus(u);let g=zv(t.to),{config:m}=l,{decay:f,velocity:b}=m;(o||r)&&(m.velocity=0),t.config&&!g&&function(e,t,n){n&&(Hv(n={...n},t),t={...n,...t}),Hv(e,t),Object.assign(e,t);for(let t in Vv)null==e[t]&&(e[t]=Vv[t]);let{mass:o,frequency:r,damping:i}=e;$b.und(r)||(r<.01&&(r=.01),i<0&&(i=0),e.tension=Math.pow(2*Math.PI/r,2)*o,e.friction=4*Math.PI*i*o/r)}(m,Ev(t.config,i),t.config!==s.config?Ev(s.config,i):void 0);let k=gv(this);if(!k||$b.und(u))return n(Zv(this,!0));let v=$b.und(t.reset)?r&&!t.default:!$b.und(d)&&Tv(t.reset,i),_=v?d:this.get(),x=Ov(u),y=$b.num(x)||$b.arr(x)||cv(x),S=!g&&(!y||Tv(s.immediate||t.immediate,i));if(h){let e=wv(u);if(e!==k.constructor){if(!S)throw Error(`Cannot animate between ${k.constructor.name} and ${e.name}, as the "to" prop suggests`);k=this._set(x)}}let w=k.constructor,C=Fk(u),B=!1;if(!C){let e=v||!r_(this)&&p;(h||e)&&(B=Ub(Ov(_),x),C=!B),(!Ub(l.immediate,S)&&!S||!Ub(m.decay,f)||!Ub(m.velocity,b))&&(C=!0)}if(B&&i_(this)&&(l.changed&&!v?C=!0:C||this._stop(a)),!g&&((C||Fk(a))&&(l.values=k.getPayload(),l.toValues=Fk(u)?null:w==vv?[1]:Zb(x)),l.immediate!=S&&(l.immediate=S,!S&&!v&&this._set(a)),C)){let{onRest:e}=l;Wb(g_,(e=>m_(this,t,e)));let o=Zv(this,u_(this,a));Qb(this._pendingCalls,o),this._pendingCalls.add(n),l.changed&&wb.batchedUpdates((()=>{l.changed=!v,e?.(o,this),v?Ev(s.onRest,o):l.onStart?.(o,this)}))}v&&this._set(_),g?n(Yv(t.to,t,this._state,this)):C?this._start():i_(this)&&!h?this._pendingCalls.add(n):n(Kv(_))}_focus(e){let t=this.animation;e!==t.to&&(Gk(this)&&this._detach(),t.to=e,Gk(this)&&this._attach())}_attach(){let e=0,{to:t}=this.animation;Fk(t)&&(Kk(t,this),e_(t)&&(e=t.priority+1)),this.priority=e}_detach(){let{to:e}=this.animation;Fk(e)&&Zk(e,this)}_set(e,t=!0){let n=Hk(e);if(!$b.und(n)){let e=gv(this);if(!e||!Ub(n,e.getValue())){let o=wv(n);e&&e.constructor==o?e.setValue(n):mv(this,o.create(n)),e&&wb.batchedUpdates((()=>{this._onChange(n,t)}))}}return gv(this)}_onStart(){let e=this.animation;e.changed||(e.changed=!0,f_(this,"onStart",Zv(this,u_(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),Ev(this.animation.onChange,e,this)),Ev(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){let e=this.animation;gv(this).reset(Hk(e.to)),e.immediate||(e.fromValues=e.values.map((e=>e.lastPosition))),i_(this)||(l_(this,!0),s_(this)||this._resume())}_resume(){Hb.skipAnimation?this.finish():ak.start(this)}_stop(e,t){if(i_(this)){l_(this,!1);let n=this.animation;Wb(n.values,(e=>{e.done=!0})),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),$k(this,{type:"idle",parent:this});let o=t?qv(this.get()):Zv(this.get(),u_(this,e??n.to));Qb(this._pendingCalls,o),n.changed&&(n.changed=!1,f_(this,"onRest",o,this))}}};function u_(e,t){let n=Ov(t);return Ub(Ov(e.get()),n)}function d_(e,t=e.loop,n=e.to){let o=Ev(t);if(o){let r=!0!==o&&Dv(o),i=(r||e).reverse,s=!r||r.reset;return p_({...e,loop:t,default:!1,pause:void 0,to:!i||zv(n)?n:void 0,from:s?e.from:void 0,reset:s,...r})}}function p_(e){let{to:t,from:n}=e=Dv(e),o=new Set;return $b.obj(t)&&h_(t,o),$b.obj(n)&&h_(n,o),e.keys=o.size?Array.from(o):null,e}function h_(e,t){Kb(e,((e,n)=>null!=e&&t.add(n)))}var g_=["onStart","onRest","onChange","onPause","onResume"];function m_(e,t,n){e.animation[n]=t[n]!==Pv(t,n)?Mv(t[n],e.key):void 0}function f_(e,t,...n){e.animation[t]?.(...n),e.defaultProps[t]?.(...n)}var b_=["onStart","onChange","onRest"],k_=1,v_=class{id=k_++;springs={};queue=[];ref;_flush;_initialProps;_lastAsyncId=0;_active=new Set;_changed=new Set;_started=!1;_item;_state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set};_events={onStart:new Map,onChange:new Map,onRest:new Map};constructor(e,t){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(){let e={};return this.each(((t,n)=>e[n]=t.get())),e}set(e){for(let t in e){let n=e[t];$b.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(p_(e)),this}start(e){let{queue:t}=this;return e?t=Zb(e).map(p_):this.queue=[],this._flush?this._flush(this,t):(w_(this,t),__(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){let n=this.springs;Wb(Zb(t),(t=>n[t].stop(!!e)))}else Xv(this._state,this._lastAsyncId),this.each((t=>t.stop(!!e)));return this}pause(e){if($b.und(e))this.start({pause:!0});else{let t=this.springs;Wb(Zb(e),(e=>t[e].pause()))}return this}resume(e){if($b.und(e))this.start({pause:!1});else{let t=this.springs;Wb(Zb(e),(e=>t[e].resume()))}return this}each(e){Kb(this.springs,e)}_onFrame(){let{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,qb(e,(([e,t])=>{t.value=this.get(),e(t,this,this._item)})));let i=!o&&this._started,s=r||i&&n.size?this.get():null;r&&t.size&&qb(t,(([e,t])=>{t.value=s,e(t,this,this._item)})),i&&(this._started=!1,qb(n,(([e,t])=>{t.value=s,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)}wb.onFrame(this._onFrame)}};function __(e,t){return Promise.all(t.map((t=>x_(e,t)))).then((t=>Wv(e,t)))}async function x_(e,t,n){let{keys:o,to:r,from:i,loop:s,onRest:l,onResolve:a}=t,c=$b.obj(t.default)&&t.default;s&&(t.loop=!1),!1===r&&(t.to=null),!1===i&&(t.from=null);let u=$b.arr(r)||$b.fun(r)?r:void 0;u?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):Wb(b_,(n=>{let o=t[n];if($b.fun(o)){let r=e._events[n];t[n]=({finished:e,cancelled:t})=>{let 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])}}));let d=e._state;t.pause===!d.paused?(d.paused=t.pause,Qb(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);let p=(o||Object.keys(e.springs)).map((n=>e.springs[n].start(t))),h=!0===t.cancel||!0===Pv(t,"cancel");(u||h&&d.asyncId)&&p.push(Uv(++e._lastAsyncId,{props:t,state:d,actions:{pause:Gb,resume:Gb,start(t,n){h?(Xv(d,e._lastAsyncId),n(qv(e))):(t.onRest=l,n(Yv(u,t,d,e)))}}})),d.paused&&await new Promise((e=>{d.resumeQueue.add(e)}));let g=Wv(e,await Promise.all(p));if(s&&g.finished&&(!n||!g.noop)){let n=d_(t,s,r);if(n)return w_(e,[n]),x_(e,n,!0)}return a&&wb.batchedUpdates((()=>a(g,e,e.item))),g}function y_(e,t){let n=new c_;return n.key=e,t&&Kk(n,t),n}function S_(e,t,n){t.keys&&Wb(t.keys,(o=>{(e[o]||(e[o]=n(o)))._prepareNode(t)}))}function w_(e,t){Wb(t,(t=>{S_(e.springs,t,(t=>y_(t,e)))}))}var C_=({children:e,...t})=>{let n=(0,Pa.useContext)(B_),o=t.pause||!!n.pause,r=t.immediate||!!n.immediate;t=function(e,t){let[n]=(0,Pa.useState)((()=>({inputs:t,result:e()}))),o=(0,Pa.useRef)(),r=o.current,i=r;return i?Boolean(t&&i.inputs&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,i.inputs))||(i={inputs:t,result:e()}):i=n,(0,Pa.useEffect)((()=>{o.current=i,r==n&&(n.inputs=n.result=void 0)}),[i]),i.result}((()=>({pause:o,immediate:r})),[o,r]);let{Provider:i}=B_;return Pa.createElement(i,{value:t},e)},B_=function(e,t){return Object.assign(e,Pa.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}(C_,{});C_.Provider=B_.Provider,C_.Consumer=B_.Consumer;var I_=class extends n_{constructor(e,t){super(),this.source=e,this.calc=Mk(...t);let n=this._get(),o=wv(n);mv(this,o.create(n))}key;idle=!0;calc;_active=new Set;advance(e){let t=this._get();Ub(t,this.get())||(gv(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&E_(this._active)&&T_(this)}_get(){let e=$b.arr(this.source)?this.source.map(Hk):Zb(Hk(this.source));return this.calc(...e)}_start(){this.idle&&!E_(this._active)&&(this.idle=!1,Wb(fv(this),(e=>{e.done=!1})),Hb.skipAnimation?(wb.batchedUpdates((()=>this.advance())),T_(this)):ak.start(this))}_attach(){let e=1;Wb(Zb(this.source),(t=>{Fk(t)&&Kk(t,this),e_(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))})),this.priority=e,this._start()}_detach(){Wb(Zb(this.source),(e=>{Fk(e)&&Zk(e,this)})),this._active.clear(),T_(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=Zb(this.source).reduce(((e,t)=>Math.max(e,(e_(t)?t.priority:0)+1)),0))}};function j_(e){return!1!==e.idle}function E_(e){return!e.size||Array.from(e).every(j_)}function T_(e){e.idle||(e.idle=!0,Wb(fv(e),(e=>{e.done=!0})),$k(e,{type:"idle",parent:e}))}Hb.assign({createStringInterpolator:iv,to:(e,t)=>new I_(e,t)});ak.advance;const M_=window.ReactDOM;var P_=/^--/;function R_(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||P_.test(e)||L_.hasOwnProperty(e)&&L_[e]?(""+t).trim():t+"px"}var N_={};var L_={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},A_=["Webkit","Ms","Moz","O"];L_=Object.keys(L_).reduce(((e,t)=>(A_.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),L_);var D_=/^(matrix|translate|scale|rotate|skew)/,O_=/^(translate)/,z_=/^(rotate|skew)/,V_=(e,t)=>$b.num(e)&&0!==e?e+t:e,F_=(e,t)=>$b.arr(e)?e.every((e=>F_(e,t))):$b.num(e)?e===t:parseFloat(e)===t,H_=class extends xv{constructor({x:e,y:t,z:n,...o}){let r=[],i=[];(e||t||n)&&(r.push([e||0,t||0,n||0]),i.push((e=>[`translate3d(${e.map((e=>V_(e,"px"))).join(",")})`,F_(e,0)]))),Kb(o,((e,t)=>{if("transform"===t)r.push([e||""]),i.push((e=>[e,""===e]));else if(D_.test(t)){if(delete o[t],$b.und(e))return;let n=O_.test(t)?"px":z_.test(t)?"deg":"";r.push(Zb(e)),i.push("rotate3d"===t?([e,t,o,r])=>[`rotate3d(${e},${t},${o},${V_(r,n)})`,F_(r,0)]:e=>[`${t}(${e.map((e=>V_(e,n))).join(",")})`,F_(e,t.startsWith("scale")?1:0)])}})),r.length&&(o.transform=new G_(r,i)),super(o)}},G_=class extends Uk{constructor(e,t){super(),this.inputs=e,this.transforms=t}_value=null;get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return Wb(this.inputs,((n,o)=>{let r=Hk(n[0]),[i,s]=this.transforms[o]($b.arr(r)?r:n.map(Hk));e+=" "+i,t=t&&s})),t?"none":e}observerAdded(e){1==e&&Wb(this.inputs,(e=>Wb(e,(e=>Fk(e)&&Kk(e,this)))))}observerRemoved(e){0==e&&Wb(this.inputs,(e=>Wb(e,(e=>Fk(e)&&Zk(e,this)))))}eventObserved(e){"change"==e.type&&(this._value=null),$k(this,e)}};Hb.assign({batchedUpdates:M_.unstable_batchedUpdates,createStringInterpolator:iv,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 $_=((e,{applyAnimatedValues:t=(()=>!1),createAnimatedStyle:n=(e=>new xv(e)),getComponentProps:o=(e=>e)}={})=>{let r={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:o},i=e=>{let t=jv(e)||"Anonymous";return(e=$b.str(e)?i[e]||(i[e]=Cv(e,r)):e[Iv]||(e[Iv]=Cv(e,r))).displayName=`Animated(${t})`,e};return Kb(e,((t,n)=>{$b.arr(e)&&(n=jv(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;let n="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName,{style:o,children:r,scrollTop:i,scrollLeft:s,viewBox:l,...a}=t,c=Object.values(a),u=Object.keys(a).map((t=>n||e.hasAttribute(t)?t:N_[t]||(N_[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())))));void 0!==r&&(e.textContent=r);for(let t in o)if(o.hasOwnProperty(t)){let n=R_(t,o[t]);P_.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!==s&&(e.scrollLeft=s),void 0!==l&&e.setAttribute("viewBox",l)},createAnimatedStyle:e=>new H_(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),U_=$_.animated;function W_(e){return{top:e.offsetTop,left:e.offsetLeft}}const K_=function({triggerAnimationOnChange:e,clientId:t}){const n=(0,a.useRef)(),{isTyping:o,getGlobalBlockCount:r,isBlockSelected:i,isFirstMultiSelectedBlock:s,isBlockMultiSelected:l,isAncestorMultiSelected:u}=(0,c.useSelect)(li),{previous:d,prevRect:p}=(0,a.useMemo)((()=>({previous:n.current&&W_(n.current),prevRect:n.current&&n.current.getBoundingClientRect()})),[e]);return(0,a.useLayoutEffect)((()=>{if(!d||!n.current)return;const e=(0,ba.getScrollContainer)(n.current),a=i(t),c=a||s(t);function h(){if(c&&p){const t=n.current.getBoundingClientRect().top-p.top;t&&(e.scrollTop+=t)}}if(window.matchMedia("(prefers-reduced-motion: reduce)").matches||o()||r()>200)return void h();const g=a||l(t)||u(t)?"1":"",m=new v_({x:0,y:0,config:{mass:5,tension:2e3,friction:200},onChange({value:e}){if(!n.current)return;let{x:t,y:o}=e;t=Math.round(t),o=Math.round(o);const r=0===t&&0===o;n.current.style.transformOrigin="center center",n.current.style.transform=r?null:`translate3d(${t}px,${o}px,0)`,n.current.style.zIndex=g,h()}});n.current.style.transform=void 0;const f=W_(n.current),b=Math.round(d.left-f.left),k=Math.round(d.top-f.top);return m.start({x:0,y:0,from:{x:b,y:k}}),()=>{m.stop(),m.set({x:0,y:0})}}),[d,p,t,o,r,i,s,l,u]),n};function Z_({clientId:e,initialPosition:t}){const n=(0,a.useRef)(),{isBlockSelected:o,isMultiSelecting:r,__unstableGetEditorMode:i}=(0,c.useSelect)(li);return(0,a.useEffect)((()=>{if(!o(e)||r()||"zoom-out"===i())return;if(null==t)return;if(!n.current)return;const{ownerDocument:s}=n.current;if($g(n.current,s.activeElement))return;const l=ba.focus.tabbable.find(n.current).filter((e=>(0,ba.isTextField)(e))),a=-1===t,c=l[a?l.length-1:0]||n.current;if($g(n.current,c)){if(!n.current.getAttribute("contenteditable")){const e=ba.focus.tabbable.findNext(n.current);if(e&&$g(n.current,e)&&(0,ba.isFormElement)(e))return void e.focus()}(0,ba.placeCaretAtHorizontalEdge)(c,a)}else n.current.focus()}),[t,e]),n}function q_({clientId:e}){const{hoverBlock:t}=(0,c.useDispatch)(li);function n(n){if(n.defaultPrevented)return;const o="mouseover"===n.type?"add":"remove";n.preventDefault(),n.currentTarget.classList[o]("is-hovered"),t("add"===o?e:null)}return(0,u.useRefEffect)((e=>(e.addEventListener("mouseout",n),e.addEventListener("mouseover",n),()=>{e.removeEventListener("mouseout",n),e.removeEventListener("mouseover",n),e.classList.remove("is-hovered"),t(null)})),[])}function Y_(e){const{isBlockSelected:t}=(0,c.useSelect)(li),{selectBlock:n,selectionChange:o}=(0,c.useDispatch)(li);return(0,u.useRefEffect)((r=>{function i(i){r.parentElement.closest('[contenteditable="true"]')||(t(e)?i.target.isContentEditable||o(e):$g(r,i.target)&&n(e))}return r.addEventListener("focusin",i),()=>{r.removeEventListener("focusin",i)}}),[t,n])}function X_({clientId:e,isSelected:t}){const{getBlockRootClientId:n,getBlockIndex:o,isZoomOut:r,__unstableGetEditorMode:i}=te((0,c.useSelect)(li)),{insertAfterBlock:s,removeBlock:l,__unstableSetEditorMode:a,resetZoomLevel:d}=te((0,c.useDispatch)(li));return(0,u.useRefEffect)((n=>{if(t)return n.addEventListener("keydown",o),n.addEventListener("dragstart",c),()=>{n.removeEventListener("keydown",o),n.removeEventListener("dragstart",c)};function o(t){const{keyCode:o,target:c}=t;o!==va.ENTER&&o!==va.BACKSPACE&&o!==va.DELETE||c!==n||(0,ba.isTextField)(c)||(t.preventDefault(),o===va.ENTER&&"zoom-out"===i()&&r()?(a("edit"),d()):o===va.ENTER?s(e):l(e))}function c(e){e.preventDefault()}}),[e,t,n,o,s,l,i,a,r,d])}function Q_(e){const{isNavigationMode:t,isBlockSelected:n}=(0,c.useSelect)(li),{setNavigationMode:o,selectBlock:r}=(0,c.useDispatch)(li);return(0,u.useRefEffect)((i=>{function s(i){t()&&!i.defaultPrevented&&(i.preventDefault(),n(e)?o(!1):r(e))}return i.addEventListener("mousedown",s),()=>{i.removeEventListener("mousedown",s)}}),[e,t,n,o])}function J_(){const{getSettings:e,isZoomOut:t,__unstableGetEditorMode:n}=te((0,c.useSelect)(li)),{__unstableSetEditorMode:o,resetZoomLevel:r}=te((0,c.useDispatch)(li));return(0,u.useRefEffect)((i=>{function s(i){if("zoom-out"===n()&&t()&&!i.defaultPrevented){i.preventDefault();const{__experimentalSetIsInserterOpened:t}=e();"function"==typeof t&&t(!1),o("edit"),r()}}return i.addEventListener("dblclick",s),()=>{i.removeEventListener("dblclick",s)}}),[e,o,n,t,r])}function ex(){const e=(0,a.useContext)(ey);return(0,u.useRefEffect)((t=>{if(e)return e.observe(t),()=>{e.unobserve(t)}}),[e])}function tx({isSelected:e}){const t=(0,u.useReducedMotion)();return(0,u.useRefEffect)((n=>{if(e){const{ownerDocument:e}=n,{defaultView:o}=e;if(!o.IntersectionObserver)return;const r=new o.IntersectionObserver((e=>{e[0].isIntersecting||n.scrollIntoView({behavior:t?"instant":"smooth"}),r.disconnect()}));return r.observe(n),()=>{r.disconnect()}}}),[e])}function nx({clientId:e="",isEnabled:t=!0}={}){const{getEnabledClientIdsTree:n}=te((0,c.useSelect)(li));return(0,u.useRefEffect)((o=>{if(!t)return;const r=t=>{(t.target===o||t.target.classList.contains("is-root-container"))&&(t.defaultPrevented||(t.preventDefault(),n(e).forEach((({clientId:e})=>{const t=o.querySelector(`[data-block="${e}"]`);t&&(t.classList.remove("has-editable-outline"),t.offsetWidth,t.classList.add("has-editable-outline"))}))))};return o.addEventListener("click",r),()=>o.removeEventListener("click",r)}),[t])}const ox={"core/paragraph":["content"],"core/heading":["content"],"core/image":["id","url","title","alt"],"core/button":["url","text","linkTarget","rel"]},rx="__default";function ix(e){return e in ox}function sx(e,t){return ix(e)&&ox[e].includes(t)}const lx=(0,u.createHigherOrderComponent)((e=>t=>{const n=(0,c.useRegistry)(),o=(0,a.useContext)(ob),r=(0,c.useSelect)((e=>te(e(l.store)).getAllBlockBindingsSources())),{name:i,clientId:s,context:u,setAttributes:d}=t,p=(0,a.useMemo)((()=>function(e,t){if("core/pattern-overrides"===t?.[rx]?.source){const n=ox[e],o={};for(const e of n){const n=t[e]?t[e]:{source:"core/pattern-overrides"};o[e]=n}return o}return t}(i,t.attributes.metadata?.bindings)),[t.attributes.metadata?.bindings,i]),h={},g=(0,c.useSelect)((e=>{if(!p)return;const t={},n=new Map;for(const[e,t]of Object.entries(p)){const{source:s,args:l}=t,a=r[s];if(a&&sx(i,e)){for(const e of a.usesContext||[])h[e]=o[e];n.set(a,{...n.get(a),[e]:{args:l}})}}if(n.size)for(const[o,r]of n){let n={};o.getValues?n=o.getValues({select:e,context:h,clientId:s,bindings:r}):Object.keys(r).forEach((e=>{n[e]=o.label}));for(const[e,o]of Object.entries(n))"url"!==e||o&&ic(o)?t[e]=o:t[e]=null}return t}),[p,i,s,h,r]),m=!!h["pattern/overrides"],f="core/pattern-overrides"===t.attributes.metadata?.bindings?.[rx]?.source,b=(0,a.useCallback)((e=>{n.batch((()=>{if(!p)return void d(e);const t={...e},o=new Map;for(const[e,n]of Object.entries(t)){if(!p[e]||!sx(i,e))continue;const s=p[e],l=r[s?.source];l?.setValues&&(o.set(l,{...o.get(l),[e]:{args:s.args,newValue:n}}),delete t[e])}if(o.size)for(const[e,t]of o)e.setValues({select:n.select,dispatch:n.dispatch,context:h,clientId:s,bindings:t});f&&m||!Object.keys(t).length||(f&&(delete t?.caption,delete t?.href),d(t))}))}),[n,p,i,s,h,d,r,f,m]);return(0,$.jsx)($.Fragment,{children:(0,$.jsx)(e,{...t,attributes:{...t.attributes,...g},setAttributes:b,context:{...u,...h}})})}),"withBlockBindingSupport");function ax(e={},{__unstableIsHtml:t}={}){const{clientId:n,className:o,wrapperProps:r={},isAligned:i,index:s,mode:l,name:c,blockApiVersion:d,blockTitle:p,isSelected:h,isSubtreeDisabled:g,hasOverlay:f,initialPosition:b,blockEditingMode:k,isHighlighted:v,isMultiSelected:x,isPartiallySelected:y,isReusable:S,isDragging:w,hasChildSelected:B,isBlockMovingMode:I,canInsertMovingBlock:j,isEditingDisabled:E,hasEditableOutline:T,isTemporarilyEditingAsBlocks:M,defaultClassName:P,templateLock:R}=(0,a.useContext)(ub),N=(0,C.sprintf)((0,C.__)("Block: %s"),p),L="html"!==l||t?"":"-visual",A=(0,u.useMergeRefs)([e.ref,Z_({clientId:n,initialPosition:b}),fp(n),Y_(n),X_({clientId:n,isSelected:h}),Q_(n),J_(),q_({clientId:n}),ex(),K_({triggerAnimationOnChange:s,clientId:n}),(0,u.useDisabled)({isDisabled:!f}),nx({clientId:n,isEnabled:"core/block"===c||"contentOnly"===R}),tx({isSelected:h})]),D=_(),O=!!D[m]&&ix(c)?{"--wp-admin-theme-color":"var(--wp-block-synced-color)","--wp-admin-theme-color--rgb":"var(--wp-block-synced-color--rgb)"}:{};d<2&&D.clientId;let z=!1;return"-"!==r?.style?.marginTop?.charAt(0)&&"-"!==r?.style?.marginBottom?.charAt(0)&&"-"!==r?.style?.marginLeft?.charAt(0)&&"-"!==r?.style?.marginRight?.charAt(0)||(z=!0),{tabIndex:"disabled"===k?-1:0,...r,...e,ref:A,id:`block-${n}${L}`,role:"document","aria-label":N,"data-block":n,"data-type":c,"data-title":p,inert:g?"true":void 0,className:Zi("block-editor-block-list__block",{"wp-block":!i,"has-block-overlay":f,"is-selected":h,"is-highlighted":v,"is-multi-selected":x,"is-partially-selected":y,"is-reusable":S,"is-dragging":w,"has-child-selected":B,"is-block-moving-mode":I,"can-insert-moving-block":j,"is-editing-disabled":E,"has-editable-outline":T,"has-negative-margin":z,"is-content-locked-temporarily-editing-as-blocks":M},o,e.className,r.className,P),style:{...r.style,...e.style,...O}}}(0,d.addFilter)("blocks.registerBlockType","core/editor/custom-sources-backwards-compatibility/shim-attribute-source",(function(e,t){return ix(t)?{...e,edit:lx(e.edit)}:e})),ax.save=l.__unstableGetBlockProps;const{isUnmodifiedBlockContent:cx}=te(l.privateApis);function ux({children:e,isHtml:t,...n}){return(0,$.jsx)("div",{...ax(n,{__unstableIsHtml:t}),children:e})}function dx({block:{__unstableBlockSource:e},mode:t,isLocked:n,canRemove:o,clientId:r,isSelected:i,isSelectionEnabled:s,className:u,__unstableLayoutClassNames:d,name:p,isValid:h,attributes:g,wrapperProps:m,setAttributes:f,onReplace:b,onInsertBlocksAfter:k,onMerge:v,toggleSelection:_}){var x;const{mayDisplayControls:y,mayDisplayParentControls:S,themeSupportsLayout:w,...C}=(0,a.useContext)(ub),{removeBlock:B}=(0,c.useDispatch)(li),I=(0,a.useCallback)((()=>B(r)),[r,B]),j=Tl()||{};let E=(0,$.jsx)(db,{name:p,isSelected:i,attributes:g,setAttributes:f,insertBlocksAfter:n?void 0:k,onReplace:o?b:void 0,onRemove:o?I:void 0,mergeBlocks:o?v:void 0,clientId:r,isSelectionEnabled:s,toggleSelection:_,__unstableLayoutClassNames:d,__unstableParentLayout:Object.keys(j).length?j:void 0,mayDisplayControls:y,mayDisplayParentControls:S,blockEditingMode:C.blockEditingMode,isPreviewMode:C.isPreviewMode});const T=(0,l.getBlockType)(p);T?.getEditWrapperProps&&(m=function(e,t){const n={...e,...t};return e?.hasOwnProperty("className")&&t?.hasOwnProperty("className")&&(n.className=Zi(e.className,t.className)),e?.hasOwnProperty("style")&&t?.hasOwnProperty("style")&&(n.style={...e.style,...t.style}),n}(m,T.getEditWrapperProps(g)));const M=m&&!!m["data-align"]&&!w,P=u?.includes("is-position-sticky");let R;if(M&&(E=(0,$.jsx)("div",{className:Zi("wp-block",P&&u),"data-align":m["data-align"],children:E})),h)R="html"===t?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)("div",{style:{display:"none"},children:E}),(0,$.jsx)(ux,{isHtml:!0,children:(0,$.jsx)(yb,{clientId:r})})]}):T?.apiVersion>1?E:(0,$.jsx)(ux,{children:E});else{const t=e?(0,l.serializeRawBlock)(e):(0,l.getSaveContent)(T,g);R=(0,$.jsxs)(ux,{className:"has-warning",children:[(0,$.jsx)(fb,{clientId:r}),(0,$.jsx)(a.RawHTML,{children:(0,ba.safeHTML)(t)})]})}const{"data-align":N,...L}=null!==(x=m)&&void 0!==x?x:{},A={...L,className:Zi(L.className,N&&w&&`align${N}`,!(N&&P)&&u)};return(0,$.jsx)(ub.Provider,{value:{wrapperProps:A,isAligned:M,...C},children:(0,$.jsx)(_b,{fallback:(0,$.jsx)(ux,{className:"has-warning",children:(0,$.jsx)(kb,{})}),children:R})})}const px=(0,c.withDispatch)(((e,t,n)=>{const{updateBlockAttributes:o,insertBlocks:r,mergeBlocks:i,replaceBlocks:s,toggleSelection:a,__unstableMarkLastChangeAsPersistent:c,moveBlocksToPosition:u,removeBlock:d,selectBlock:p}=e(li);return{setAttributes(e){const{getMultiSelectedBlockClientIds:r}=n.select(li),i=r(),{clientId:s}=t,l=i.length?i:[s];o(l,e)},onInsertBlocks(e,n){const{rootClientId:o}=t;r(e,n,o)},onInsertBlocksAfter(e){const{clientId:o,rootClientId:i}=t,{getBlockIndex:s}=n.select(li),l=s(o);r(e,l+1,i)},onMerge(e){const{clientId:o,rootClientId:a}=t,{getPreviousBlockClientId:c,getNextBlockClientId:h,getBlock:g,getBlockAttributes:m,getBlockName:f,getBlockOrder:b,getBlockIndex:k,getBlockRootClientId:v,canInsertBlockType:_}=n.select(li);function x(){const e=g(o),t=(0,l.getDefaultBlockName)();if(f(o)!==t){const n=(0,l.switchToBlockType)(e,t);n&&n.length&&s(o,n)}else if((0,l.isUnmodifiedDefaultBlock)(e)){const e=h(o);e&&n.batch((()=>{d(o),p(e)}))}}function y(e,t=!0){const i=v(e),a=b(e),[c]=a;1===a.length&&(0,l.isUnmodifiedBlock)(g(c))?d(e):n.batch((()=>{const n=g(c),a=cx(n),m=(0,l.getDefaultBlockName)(),f=(0,l.switchToBlockType)(n,m),v=!!f?.length&&f.every((t=>_(t.name,e)));if(a&&v)s(c,f,t);else if(a&&n.name===m){d(c);const e=h(o);e&&p(e)}else if(_(n.name,i))u([c],e,i,k(e));else{const n=!!f?.length&&f.every((e=>_(e.name,i)));n?(r(f,k(e),i,t),d(c,!1)):x()}!b(e).length&&(0,l.isUnmodifiedBlock)(g(e))&&d(e,!1)}))}if(e){if(a){const e=h(a);if(e){if(f(a)!==f(e))return void i(a,e);{const t=m(a),o=m(e);if(Object.keys(t).every((e=>t[e]===o[e])))return void n.batch((()=>{u(b(e),e,a),d(e,!1)}))}}}const e=h(o);if(!e)return;b(e).length?y(e,!1):i(o,e)}else{const e=c(o);if(e)i(e,o);else if(a){const e=c(a);if(e&&f(a)===f(e)){const t=m(a),o=m(e);if(Object.keys(t).every((e=>t[e]===o[e])))return void n.batch((()=>{u(b(a),a,e),d(a,!1)}))}y(a)}else x()}},onReplace(e,n,o){e.length&&!(0,l.isUnmodifiedDefaultBlock)(e[e.length-1])&&c();const r=1===e?.length&&Array.isArray(e[0])?e[0]:e;s([t.clientId],r,n,o)},toggleSelection(e){a(e)}}}));dx=(0,u.compose)(px,(0,os.withFilters)("editor.BlockListBlock"))(dx);const hx=(0,a.memo)((function(e){const{clientId:t,rootClientId:n}=e,o=(0,c.useSelect)((e=>{const{isBlockSelected:o,getBlockMode:r,isSelectionEnabled:i,getTemplateLock:s,getBlockWithoutAttributes:a,getBlockAttributes:c,canRemoveBlock:u,canMoveBlock:d,getSettings:p,getTemporarilyEditingAsBlocks:h,getBlockEditingMode:g,getBlockName:m,isFirstMultiSelectedBlock:f,getMultiSelectedBlockClientIds:b,hasSelectedInnerBlock:k,getBlocksByName:v,getBlockIndex:_,isBlockMultiSelected:x,isBlockSubtreeDisabled:y,isBlockHighlighted:S,__unstableIsFullySelected:w,__unstableSelectionHasUnmergeableBlock:C,isBlockBeingDragged:B,isDragging:I,hasBlockMovingClientId:j,canInsertBlockType:E,__unstableHasActiveBlockOverlayActive:T,__unstableGetEditorMode:M,getSelectedBlocksInitialCaretPosition:P}=te(e(li)),R=a(t);if(!R)return;const{hasBlockSupport:N,getActiveBlockVariation:L}=e(l.store),A=c(t),{name:D,isValid:O}=R,z=(0,l.getBlockType)(D),{supportsLayout:V,__unstableIsPreviewMode:F}=p(),H=z?.apiVersion>1,G={isPreviewMode:F,blockWithoutAttributes:R,name:D,attributes:A,isValid:O,themeSupportsLayout:V,index:_(t),isReusable:(0,l.isReusableBlock)(z),className:H?A.className:void 0,defaultClassName:H?(0,l.getBlockDefaultClassName)(D):void 0,blockTitle:z?.title};if(F)return G;const $=o(t),U=u(t),W=d(t),K=L(D,A),Z=x(t),q=k(t,!0),Y=j(),X=g(t),Q=(0,l.hasBlockSupport)(D,"multiple",!0)?[]:v(D),J=Q.length&&Q[0]!==t,ee=M();return{...G,mode:r(t),isSelectionEnabled:i(),isLocked:!!s(n),templateLock:s(t),canRemove:U,canMove:W,isSelected:$,isTemporarilyEditingAsBlocks:h()===t,blockEditingMode:X,mayDisplayControls:$||f(t)&&b().every((e=>m(e)===D)),mayDisplayParentControls:N(m(t),"__experimentalExposeControlsToChildren",!1)&&k(t),blockApiVersion:z?.apiVersion||1,blockTitle:K?.title||z?.title,isSubtreeDisabled:"disabled"===X&&y(t),hasOverlay:T(t)&&!I(),initialPosition:!$||"edit"!==ee&&"zoom-out"!==ee?void 0:P(),isHighlighted:S(t),isMultiSelected:Z,isPartiallySelected:Z&&!w()&&!C(),isDragging:B(t),hasChildSelected:q,isBlockMovingMode:!!Y,canInsertMovingBlock:Y&&E(m(Y),n),isEditingDisabled:"disabled"===X,hasEditableOutline:"disabled"!==X&&"disabled"===g(n),originalBlockClientId:!!J&&Q[0]}}),[t,n]),{isPreviewMode:r,mode:i="visual",isSelectionEnabled:s=!1,isLocked:u=!1,canRemove:d=!1,canMove:p=!1,blockWithoutAttributes:h,name:g,attributes:m,isValid:f,isSelected:b=!1,themeSupportsLayout:k,isTemporarilyEditingAsBlocks:v,blockEditingMode:_,mayDisplayControls:x,mayDisplayParentControls:y,index:S,blockApiVersion:w,blockTitle:C,isSubtreeDisabled:B,hasOverlay:I,initialPosition:j,isHighlighted:E,isMultiSelected:T,isPartiallySelected:M,isReusable:P,isDragging:R,hasChildSelected:N,isBlockMovingMode:L,canInsertMovingBlock:A,templateLock:D,isEditingDisabled:O,hasEditableOutline:z,className:V,defaultClassName:F,originalBlockClientId:H}=o,G=(0,a.useMemo)((()=>({...h,attributes:m})),[h,m]);if(!o)return null;const U={isPreviewMode:r,clientId:t,className:V,index:S,mode:i,name:g,blockApiVersion:w,blockTitle:C,isSelected:b,isSubtreeDisabled:B,hasOverlay:I,initialPosition:j,blockEditingMode:_,isHighlighted:E,isMultiSelected:T,isPartiallySelected:M,isReusable:P,isDragging:R,hasChildSelected:N,isBlockMovingMode:L,canInsertMovingBlock:A,templateLock:D,isEditingDisabled:O,hasEditableOutline:z,isTemporarilyEditingAsBlocks:v,defaultClassName:F,mayDisplayControls:x,mayDisplayParentControls:y,originalBlockClientId:H,themeSupportsLayout:k};return(0,$.jsx)(ub.Provider,{value:U,children:(0,$.jsx)(dx,{...e,mode:i,isSelectionEnabled:s,isLocked:u,canRemove:d,canMove:p,block:G,name:g,attributes:m,isValid:f,isSelected:b})})})),gx=window.wp.htmlEntities,mx="\ufeff";function fx({rootClientId:e}){const{showPrompt:t,isLocked:n,placeholder:o,isManualGrid:r}=(0,c.useSelect)((t=>{const{getBlockCount:n,getSettings:o,getTemplateLock:r,getBlockAttributes:i}=t(li),s=!n(e),{bodyPlaceholder:l}=o();return{showPrompt:s,isLocked:!!r(e),placeholder:l,isManualGrid:i(e)?.layout?.isManualPlacement}}),[e]),{insertDefaultBlock:i,startTyping:s}=(0,c.useDispatch)(li);if(n||r)return null;const l=(0,gx.decodeEntities)(o)||(0,C.__)("Type / to choose a block"),a=()=>{i(void 0,e),s()};return(0,$.jsxs)("div",{"data-root-client-id":e||"",className:Zi("block-editor-default-block-appender",{"has-visible-prompt":t}),children:[(0,$.jsx)("p",{tabIndex:"0",role:"button","aria-label":(0,C.__)("Add default block"),className:"block-editor-default-block-appender__content",onKeyDown:e=>{va.ENTER!==e.keyCode&&va.SPACE!==e.keyCode||a()},onClick:()=>a(),onFocus:()=>{t&&a()},children:t?l:mx}),(0,$.jsx)(tC,{rootClientId:e,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0})]})}function bx({rootClientId:e}){return(0,c.useSelect)((t=>t(li).canInsertBlockType((0,l.getDefaultBlockName)(),e)))?(0,$.jsx)(fx,{rootClientId:e}):(0,$.jsx)(rC,{rootClientId:e,className:"block-list-appender__toggle"})}function kx({rootClientId:e,CustomAppender:t,className:n,tagName:o="div"}){const r=(0,c.useSelect)((t=>{const{getBlockInsertionPoint:n,isBlockInsertionPointVisible:o,getBlockCount:r}=t(li),i=n();return o()&&e===i?.rootClientId&&0===r(e)}),[e]);return(0,$.jsx)(o,{tabIndex:-1,className:Zi("block-list-appender wp-block",n,{"is-drag-over":r}),contentEditable:!1,"data-block":!0,children:t?(0,$.jsx)(t,{}):(0,$.jsx)(bx,{rootClientId:e})})}const vx=Number.MAX_SAFE_INTEGER;(0,a.createContext)();const _x=function({previousClientId:e,nextClientId:t,children:n,__unstablePopoverSlot:o,__unstableContentRef:r,operation:i="insert",nearestSide:s="right",...l}){const[u,d]=(0,a.useReducer)((e=>(e+1)%vx),0),{orientation:p,rootClientId:h,isVisible:g}=(0,c.useSelect)((n=>{const{getBlockListSettings:o,getBlockRootClientId:r,isBlockVisible:i}=n(li),s=r(null!=e?e:t);return{orientation:o(s)?.orientation||"vertical",rootClientId:s,isVisible:i(e)&&i(t)}}),[e,t]),m=vp(e),f=vp(t),b="vertical"===p,k=(0,a.useMemo)((()=>{if(u<0||!m&&!f||!g)return;return{contextElement:"group"===i?f||m:m||f,getBoundingClientRect(){const e=m?m.getBoundingClientRect():null,t=f?f.getBoundingClientRect():null;let n=0,o=0,r=0,l=0;if("group"===i){const i=t||e;o=i.top,r=0,l=i.bottom-i.top,n="left"===s?i.left-2:i.right-2}else b?(o=e?e.bottom:t.top,r=e?e.width:t.width,l=t&&e?t.top-e.bottom:0,n=e?e.left:t.left):(o=e?e.top:t.top,l=e?e.height:t.height,(0,C.isRTL)()?(n=t?t.right:e.left,r=e&&t?e.left-t.right:0):(n=e?e.right:t.left,r=e&&t?t.left-e.right:0));return new window.DOMRect(n,o,r,l)}}}),[m,f,u,b,g,i,s]),v=zg(r);return(0,a.useLayoutEffect)((()=>{if(!m)return;const e=new window.MutationObserver(d);return e.observe(m,{attributes:!0}),()=>{e.disconnect()}}),[m]),(0,a.useLayoutEffect)((()=>{if(!f)return;const e=new window.MutationObserver(d);return e.observe(f,{attributes:!0}),()=>{e.disconnect()}}),[f]),(0,a.useLayoutEffect)((()=>{if(m)return m.ownerDocument.defaultView.addEventListener("resize",d),()=>{m.ownerDocument.defaultView?.removeEventListener("resize",d)}}),[m]),(m||f)&&g?(0,$.jsx)(os.Popover,{ref:v,animate:!1,anchor:k,focusOnMount:!1,__unstableSlotName:o,inline:!o,...l,className:Zi("block-editor-block-popover","block-editor-block-popover__inbetween",l.className),resize:!1,flip:!1,placement:"overlay",variant:"unstyled",children:(0,$.jsx)("div",{className:"block-editor-block-popover__inbetween-container",children:n})},t+"--"+h):null},xx={hide:{opacity:0,scaleY:.75},show:{opacity:1,scaleY:1},exit:{opacity:0,scaleY:.9}};const yx=function({__unstablePopoverSlot:e,__unstableContentRef:t}){const{clientId:n}=(0,c.useSelect)((e=>{const{getBlockOrder:t,getBlockInsertionPoint:n}=e(li),o=n(),r=t(o.rootClientId);return r.length?{clientId:r[o.index]}:{}}),[]),o=(0,u.useReducedMotion)();return(0,$.jsx)(tm,{clientId:n,__unstablePopoverSlot:e,__unstableContentRef:t,className:"block-editor-block-popover__drop-zone",children:(0,$.jsx)(os.__unstableMotion.div,{"data-testid":"block-popover-drop-zone",initial:o?xx.show:xx.hide,animate:xx.show,exit:o?xx.show:xx.exit,className:"block-editor-block-popover__drop-zone-foreground"})})},Sx=(0,a.createContext)();function wx({__unstablePopoverSlot:e,__unstableContentRef:t,operation:n="insert",nearestSide:o="right"}){const{selectBlock:r,hideInsertionPoint:i}=(0,c.useDispatch)(li),s=(0,a.useContext)(Sx),l=(0,a.useRef)(),{orientation:d,previousClientId:p,nextClientId:h,rootClientId:g,isInserterShown:m,isDistractionFree:f,isNavigationMode:b,isZoomOutMode:k}=(0,c.useSelect)((e=>{const{getBlockOrder:t,getBlockListSettings:n,getBlockInsertionPoint:o,isBlockBeingDragged:r,getPreviousBlockClientId:i,getNextBlockClientId:s,getSettings:l,isNavigationMode:a,__unstableGetEditorMode:c}=e(li),u=o(),d=t(u.rootClientId);if(!d.length)return{};let p=d[u.index-1],h=d[u.index];for(;r(p);)p=i(p);for(;r(h);)h=s(h);const g=l();return{previousClientId:p,nextClientId:h,orientation:n(u.rootClientId)?.orientation||"vertical",rootClientId:u.rootClientId,isNavigationMode:a(),isDistractionFree:g.isDistractionFree,isInserterShown:u?.__unstableWithInserter,isZoomOutMode:"zoom-out"===c()}}),[]),{getBlockEditingMode:v}=(0,c.useSelect)(li),_=(0,u.useReducedMotion)();const x={start:{opacity:0,scale:0},rest:{opacity:1,scale:1,transition:{delay:m?.5:0,type:"tween"}},hover:{opacity:1,scale:1,transition:{delay:.5,type:"tween"}}},y={start:{scale:_?1:0},rest:{scale:1,transition:{delay:.4,type:"tween"}}};if(f&&!b)return null;if(k&&"insert"!==n)return null;const S=Zi("block-editor-block-list__insertion-point","horizontal"===d||"group"===n?"is-horizontal":"is-vertical");return(0,$.jsx)(_x,{previousClientId:p,nextClientId:h,__unstablePopoverSlot:e,__unstableContentRef:t,operation:n,nearestSide:o,children:(0,$.jsxs)(os.__unstableMotion.div,{layout:!_,initial:_?"rest":"start",animate:"rest",whileHover:"hover",whileTap:"pressed",exit:"start",ref:l,tabIndex:-1,onClick:function(e){e.target===l.current&&h&&"disabled"!==v(h)&&r(h,-1)},onFocus:function(e){e.target!==l.current&&(s.current=!0)},className:Zi(S,{"is-with-inserter":m}),onHoverEnd:function(e){e.target!==l.current||s.current||i()},children:[(0,$.jsx)(os.__unstableMotion.div,{variants:x,className:"block-editor-block-list__insertion-point-indicator","data-testid":"block-list-insertion-point-indicator"}),m&&(0,$.jsx)(os.__unstableMotion.div,{variants:y,className:Zi("block-editor-block-list__insertion-point-inserter"),children:(0,$.jsx)(tC,{position:"bottom center",clientId:h,rootClientId:g,__experimentalIsQuick:!0,onToggle:e=>{s.current=e},onSelectOrClose:()=>{s.current=!1}})})]})})}function Cx(e){const{insertionPoint:t,isVisible:n,isBlockListEmpty:o}=(0,c.useSelect)((e=>{const{getBlockInsertionPoint:t,isBlockInsertionPointVisible:n,getBlockCount:o}=e(li),r=t();return{insertionPoint:r,isVisible:n(),isBlockListEmpty:0===o(r?.rootClientId)}}),[]);return!n||o?null:"replace"===t.operation?(0,$.jsx)(yx,{...e},`${t.rootClientId}-${t.index}`):(0,$.jsx)(wx,{operation:t.operation,nearestSide:t.nearestSide,...e})}function Bx(){const e=(0,a.useContext)(Sx),t=(0,c.useSelect)((e=>e(li).getSettings().isDistractionFree||"zoom-out"===e(li).__unstableGetEditorMode()),[]),{getBlockListSettings:n,getBlockIndex:o,isMultiSelecting:r,getSelectedBlockClientIds:i,getSettings:s,getTemplateLock:l,__unstableIsWithinBlockOverlay:d,getBlockEditingMode:p,getBlockName:h,getBlockAttributes:g}=(0,c.useSelect)(li),{showInsertionPoint:m,hideInsertionPoint:f}=(0,c.useDispatch)(li);return(0,u.useRefEffect)((a=>{if(!t)return a.addEventListener("mousemove",c),()=>{a.removeEventListener("mousemove",c)};function c(t){if(void 0===e||e.current)return;if(t.target.nodeType===t.target.TEXT_NODE)return;if(r())return;if(!t.target.classList.contains("block-editor-block-list__layout"))return void 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(l(a)||"disabled"===p(a)||"core/block"===h(a)||a&&g(a).layout?.isManualPlacement)return;const c=n(a),u=c?.orientation||"vertical",b=!!c?.__experimentalCaptureToolbars,k=t.clientY,v=t.clientX;let _=Array.from(t.target.children).find((e=>{const t=e.getBoundingClientRect();return e.classList.contains("wp-block")&&"vertical"===u&&t.top>k||e.classList.contains("wp-block")&&"horizontal"===u&&((0,C.isRTL)()?t.right<v:t.left>v)}));if(!_)return void f();if(!_.id&&(_=_.firstElementChild,!_))return void f();const x=_.id.slice(6);if(!x||d(x))return;if(i().includes(x)&&"vertical"===u&&!b&&!s().hasFixedToolbar)return;const y=_.getBoundingClientRect();if("horizontal"===u&&(t.clientY>y.bottom||t.clientY<y.top)||"vertical"===u&&(t.clientX>y.right||t.clientX<y.left))return void f();const S=o(x);0!==S?m(a,S,{__unstableWithInserter:!0}):f()}}),[e,n,o,r,m,f,i,t])}function Ix(){const{getSettings:e,hasSelectedBlock:t,hasMultiSelection:n}=(0,c.useSelect)(li),{clearSelectedBlock:o}=(0,c.useDispatch)(li),{clearBlockSelection:r}=e();return(0,u.useRefEffect)((e=>{if(r)return e.addEventListener("mousedown",i),()=>{e.removeEventListener("mousedown",i)};function i(r){(t()||n())&&r.target===e&&o()}}),[t,n,o,r])}function jx(e){return(0,$.jsx)("div",{ref:Ix(),...e})}const Ex=new WeakMap;function Tx(e,t,n,o,r,i,s,l,u,d,p,h){const g=(0,c.useRegistry)(),m=function(e){const[t,n]=(0,a.useState)(e);return Ba()(t,e)||n(e),t}(n),f=(0,a.useMemo)((()=>o),o),b=void 0===u||"contentOnly"===t?t:u;(0,a.useLayoutEffect)((()=>{const t={allowedBlocks:m,prioritizedInserterBlocks:f,templateLock:b};if(void 0!==d&&(t.__experimentalCaptureToolbars=d),void 0!==p)t.orientation=p;else{const e=Bl(h?.type);t.orientation=e.getOrientation(h)}void 0!==s&&(y()("__experimentalDefaultBlock",{alternative:"defaultBlock",since:"6.3",version:"6.4"}),t.defaultBlock=s),void 0!==r&&(t.defaultBlock=r),void 0!==l&&(y()("__experimentalDirectInsert",{alternative:"directInsert",since:"6.3",version:"6.4"}),t.directInsert=l),void 0!==i&&(t.directInsert=i),void 0!==t.directInsert&&"boolean"!=typeof t.directInsert&&y()("Using `Function` as a `directInsert` argument",{alternative:"`boolean` values",since:"6.5"}),Ex.get(g)||Ex.set(g,{}),Ex.get(g)[e]=t,window.queueMicrotask((()=>{const e=Ex.get(g);if(Object.keys(e).length){const{updateBlockListSettings:t}=g.dispatch(li);t(e),Ex.set(g,{})}}))}),[e,m,f,b,r,i,s,l,d,p,h,g])}function Mx(e,t,n,o,r,i,s,a,c){return u=>{const{srcRootClientId:d,srcClientIds:p,type:h,blocks:g}=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}(u);if("inserter"===h){s();const e=g.map((e=>(0,l.cloneBlock)(e)));i(e,!0,null)}if("block"===h){const s=n(p[0]);if(d===e&&s===t)return;if(p.includes(e)||o(p).some((t=>t===e)))return;if("group"===a){const e=p.map((e=>c(e)));return void i(e,!0,null,p)}const l=d===e,u=p.length;r(p,d,l&&s<t?t-u:t)}}}function Px(e,t,n={}){const{operation:o="insert",nearestSide:r="right"}=n,{canInsertBlockType:i,getBlockIndex:s,getClientIdsOfDescendants:u,getBlockOrder:d,getBlocksByClientId:p,getSettings:h,getBlock:g}=(0,c.useSelect)(li),{getGroupingBlockName:m}=(0,c.useSelect)(l.store),{insertBlocks:f,moveBlocksToPosition:b,updateBlockAttributes:k,clearSelectedBlock:v,replaceBlocks:_,removeBlocks:x}=(0,c.useDispatch)(li),y=(0,c.useRegistry)(),S=(0,a.useCallback)(((n,s=!0,a=0,c=[])=>{Array.isArray(n)||(n=[n]);const u=d(e)[t];if("replace"===o)_(u,n,void 0,a);else if("group"===o){const t=g(u);"left"===r?n.push(t):n.unshift(t);const o=n.map((e=>(0,l.createBlock)(e.name,e.attributes,e.innerBlocks))),s=n.every((e=>"core/image"===e.name)),d=i("core/gallery",e),p=(0,l.createBlock)(s&&d?"core/gallery":m(),{layout:{type:"flex",flexWrap:s&&d?null:"nowrap"}},o);_([u,...c],p,void 0,a)}else f(n,t,e,s,a)}),[d,e,t,o,_,g,r,i,m,f]),w=(0,a.useCallback)(((n,r,i)=>{if("replace"===o){const o=p(n),r=d(e)[t];y.batch((()=>{x(n,!1),_(r,o,void 0,0)}))}else b(n,r,e,i)}),[o,d,p,b,y,x,_,t,e]),C=Mx(e,t,s,u,w,S,v,o,g),B=function(e,t,n,o,r){return i=>{if(!t().mediaUpload)return;const s=(0,l.findTransform)((0,l.getBlockTransforms)("from"),(t=>"files"===t.type&&o(t.blockName,e)&&t.isMatch(i)));if(s){const e=s.transform(i,n);r(e)}}}(e,h,k,i,S),I=function(e){return t=>{const n=(0,l.pasteHandler)({HTML:t,mode:"BLOCKS"});n.length&&e(n)}}(S);return e=>{const t=(0,ba.getFilesFromDataTransfer)(e.dataTransfer),n=e.dataTransfer.getData("text/html");n?I(n):t.length?B(t):C(e)}}function Rx(e,t,n=["top","bottom","left","right"]){let o,r;return n.forEach((n=>{const i=function(e,t,n){const o="top"===n||"bottom"===n,{x:r,y:i}=e,s=o?r:i,l=o?i:r,a=o?t.left:t.top,c=o?t.right:t.bottom,u=t[n];let d;return d=s>=a&&s<=c?s:s<c?a:c,Math.sqrt((s-d)**2+(l-u)**2)}(e,t,n);(void 0===o||i<o)&&(o=i,r=n)})),[o,r]}function Nx(e,t){return t.left<=e.x&&t.right>=e.x&&t.top<=e.y&&t.bottom>=e.y}const Lx=30,Ax=120,Dx=120;function Ox(e,t,n,o){let r=!0;if(t){const e=t?.map((({name:e})=>e));r=n.every((t=>e?.includes(t)))}const i=n.map((t=>e(t))).every((e=>{const[t]=e?.parent||[];return!t||t===o}));return r&&i}function zx(e,t){const{defaultView:n}=t;return!!(n&&e instanceof n.HTMLElement&&e.closest("[data-is-insertion-point]"))}function Vx({dropZoneElement:e,rootClientId:t="",parentClientId:n="",isDisabled:o=!1}={}){const r=(0,c.useRegistry)(),[i,s]=(0,a.useState)({index:null,operation:"insert"}),{getBlockType:d,getBlockVariations:p,getGroupingBlockName:h}=(0,c.useSelect)(l.store),{canInsertBlockType:g,getBlockListSettings:m,getBlocks:f,getBlockIndex:b,getDraggedBlockClientIds:k,getBlockNamesByClientId:v,getAllowedBlocks:_,isDragging:x,isGroupable:y,isZoomOutMode:S,getSectionRootClientId:w}=te((0,c.useSelect)(li)),{showInsertionPoint:B,hideInsertionPoint:I,startDragging:j,stopDragging:E}=te((0,c.useDispatch)(li)),T=Px("before"===i.operation||"after"===i.operation?n:t,i.index,{operation:i.operation,nearestSide:i.nearestSide}),M=(0,u.useThrottle)((0,a.useCallback)(((o,i)=>{x()||j();const a=_(t),c=v([t])[0],u=v(k());if(!Ox(d,a,u,c))return;const I=w();if(S()&&I!==t)return;const E=f(t);if(0===E.length)return void r.batch((()=>{s({index:0,operation:"insert"}),B(t,0,{operation:"insert"})}));const T=E.map((e=>{const t=e.clientId;return{isUnmodifiedDefaultBlock:(0,l.isUnmodifiedDefaultBlock)(e),getBoundingClientRect:()=>i.getElementById(`block-${t}`).getBoundingClientRect(),blockIndex:b(t),blockOrientation:m(t)?.orientation}})),M=function(e,t,n="vertical",o={}){const r="horizontal"===n?["left","right"]:["top","bottom"];let i=0,s="before",l=1/0,a=null,c="right";const{dropZoneElement:u,parentBlockOrientation:d,rootBlockIndex:p=0}=o;if(u&&"horizontal"!==d){const e=u.getBoundingClientRect(),[n,o]=Rx(t,e,["top","bottom"]);if(e.height>Ax&&n<Lx){if("top"===o)return[p,"before"];if("bottom"===o)return[p+1,"after"]}}const h=(0,C.isRTL)();if(u&&"horizontal"===d){const e=u.getBoundingClientRect(),[n,o]=Rx(t,e,["left","right"]);if(e.width>Dx&&n<Lx){if(h&&"right"===o||!h&&"left"===o)return[p,"before"];if(h&&"left"===o||!h&&"right"===o)return[p+1,"after"]}}e.forEach((({isUnmodifiedDefaultBlock:e,getBoundingClientRect:o,blockIndex:u,blockOrientation:d})=>{const p=o();let[g,m]=Rx(t,p,r);const[f,b]=Rx(t,p,["left","right"]),k=Nx(t,p);e&&k?g=0:"vertical"===n&&"horizontal"!==d&&(k&&f<Lx||!k&&function(e,t){return t.top<=e.y&&t.bottom>=e.y}(t,p))&&(a=u,c=b),g<l&&(s="bottom"===m||!h&&"right"===m||h&&"left"===m?"after":"before",l=g,i=u)}));const g=i+("after"===s?1:-1),m=!!e[i]?.isUnmodifiedDefaultBlock,f=!!e[g]?.isUnmodifiedDefaultBlock;if(null!==a)return[a,"group",c];if(!m&&!f)return["after"===s?i+1:i,"insert"];return[m?i:g,"replace"]}(T,{x:o.clientX,y:o.clientY},m(t)?.orientation,{dropZoneElement:e,parentBlockClientId:n,parentBlockOrientation:n?m(n)?.orientation:void 0,rootBlockIndex:b(t)}),[P,R,N]=M;if(!S()||"insert"===R){if("group"===R){const e=E[P],n=[e.name,...u].every((e=>"core/image"===e)),o=g("core/gallery",t),r=y([e.clientId,k()]),i=p(h(),"block"),s=i&&i.find((({name:e})=>"group-row"===e));if(n&&!o&&(!r||!s))return;if(!(n||r&&s))return}r.batch((()=>{s({index:P,operation:R,nearestSide:N});const e=["before","after"].includes(R)?n:t;B(e,P,{operation:R,nearestSide:N})}))}}),[x,_,t,v,k,d,w,S,f,m,e,n,b,r,j,B,g,y,p,h]),200);return(0,u.__experimentalUseDropZone)({dropZoneElement:e,isDisabled:o,onDrop:T,onDragOver(e){M(e,e.currentTarget.ownerDocument)},onDragLeave(e){const{ownerDocument:t}=e.currentTarget;zx(e.relatedTarget,t)||zx(e.target,t)||(M.cancel(),I())},onDragEnd(){M.cancel(),E(),I()}})}const Fx={};function Hx({children:e,clientId:t}){const n=function(e){return(0,c.useSelect)((t=>{const n=t(li).getBlock(e);if(!n)return;const o=t(l.store).getBlockType(n.name);return o&&0!==Object.keys(o.providesContext).length?Object.fromEntries(Object.entries(o.providesContext).map((([e,t])=>[e,n.attributes[t]]))):void 0}),[e])}(t);return(0,$.jsx)(nb,{value:n,children:e})}const Gx=(0,a.memo)(ay);function $x(e){const{clientId:t,allowedBlocks:n,prioritizedInserterBlocks:o,defaultBlock:r,directInsert:i,__experimentalDefaultBlock:s,__experimentalDirectInsert:u,template:d,templateLock:p,wrapperRef:h,templateInsertUpdatesSelection:g,__experimentalCaptureToolbars:m,__experimentalAppenderTagName:f,renderAppender:b,orientation:k,placeholder:v,layout:_,name:x,blockType:y,parentLock:S,defaultLayout:C}=e;Tx(t,S,n,o,r,i,s,u,p,m,k,_),function(e,t,n,o){const{getBlocks:r,getSelectedBlocksInitialCaretPosition:i,isBlockSelected:s}=(0,c.useSelect)(li),{replaceInnerBlocks:u,__unstableMarkNextChangeAsNotPersistent:d}=(0,c.useDispatch)(li),p=(0,a.useRef)(null);(0,a.useLayoutEffect)((()=>{let a=!1;return window.queueMicrotask((()=>{if(a)return;const c=r(e),h=0===c.length||"all"===n||"contentOnly"===n,g=!w()(t,p.current);if(!h||!g)return;p.current=t;const m=(0,l.synchronizeBlocksWithTemplate)(c,t);w()(m,c)||(d(),u(e,m,0===c.length&&o&&0!==m.length&&s(e),i()))})),()=>{a=!0}}),[t,n,e])}(t,d,p,g);const B=(0,l.getBlockSupport)(x,"layout")||(0,l.getBlockSupport)(x,"__experimentalLayout")||Fx,{allowSizingOnChildren:I=!1}=B,j=_||B,E=(0,a.useMemo)((()=>({...C,...j,...I&&{allowSizingOnChildren:!0}})),[C,j,I]),T=(0,$.jsx)(Gx,{rootClientId:t,renderAppender:b,__experimentalAppenderTagName:f,layout:E,wrapperRef:h,placeholder:v});return y?.providesContext&&0!==Object.keys(y.providesContext).length?(0,$.jsx)(Hx,{clientId:t,children:T}):T}function Ux(e){return qf(e),(0,$.jsx)($x,{...e})}const Wx=(0,a.forwardRef)(((e,t)=>{const n=Kx({ref:t},e);return(0,$.jsx)("div",{className:"block-editor-inner-blocks",children:(0,$.jsx)("div",{...n})})}));function Kx(e={},t={}){const{__unstableDisableLayoutClassNames:n,__unstableDisableDropZone:o,dropZoneElement:r}=t,{clientId:i,layout:s=null,__unstableLayoutClassNames:a=""}=_(),d=(0,c.useSelect)((e=>{const{getBlockName:t,isBlockSelected:n,hasSelectedInnerBlock:o,__unstableGetEditorMode:r,getTemplateLock:s,getBlockRootClientId:a,getBlockEditingMode:c,getBlockSettings:u,isDragging:d,getSectionRootClientId:p,isZoomOutMode:h}=te(e(li));if(!i){const e=p();return{isDropZoneDisabled:h()&&""!==e}}const{hasBlockSupport:g,getBlockType:m}=e(l.store),f=t(i),b="navigation"===r(),k=c(i),v=a(i),[_]=u(i,"layout");let x="disabled"===k;if("zoom-out"===r()){const e=p();x=i!==e}return{__experimentalCaptureToolbars:g(f,"__experimentalExposeControlsToChildren",!1),hasOverlay:"core/template"!==f&&!n(i)&&!o(i,!0)&&b&&!d(),name:f,blockType:m(f),parentLock:s(v),parentClientId:v,isDropZoneDisabled:x,defaultLayout:_}}),[i]),{__experimentalCaptureToolbars:p,hasOverlay:h,name:g,blockType:m,parentLock:f,parentClientId:b,isDropZoneDisabled:k,defaultLayout:v}=d,x=Vx({dropZoneElement:r,rootClientId:i,parentClientId:b}),y=(0,u.useMergeRefs)([e.ref,o||k||s?.isManualPlacement&&window.__experimentalEnableGridInteractivity?null:x]),S={__experimentalCaptureToolbars:p,layout:s,name:g,blockType:m,parentLock:f,defaultLayout:v,...t},w=S.value&&S.onChange?Ux:$x;return{...e,ref:y,className:Zi(e.className,"block-editor-block-list__layout",n?"":a,{"has-overlay":h}),children:i?(0,$.jsx)(w,{...S,clientId:i}):(0,$.jsx)(ay,{...t})}}Kx.save=l.__unstableGetInnerBlocksProps,Wx.DefaultBlockAppender=function(){const{clientId:e}=_();return(0,$.jsx)(fx,{rootClientId:e})},Wx.ButtonBlockAppender=function({showSeparator:e,isFloating:t,onAddBlock:n,isToggle:o}){const{clientId:r}=_();return(0,$.jsx)(rC,{className:Zi({"block-list-appender__toggle":o}),rootClientId:r,showSeparator:e,isFloating:t,onAddBlock:n})},Wx.Content=()=>Kx.save().children;const Zx=Wx,qx=new Set([va.UP,va.RIGHT,va.DOWN,va.LEFT,va.ENTER,va.BACKSPACE]);function Yx(){const e=(0,c.useSelect)((e=>e(li).isTyping()),[]),{stopTyping:t}=(0,c.useDispatch)(li);return(0,u.useRefEffect)((n=>{if(!e)return;const{ownerDocument:o}=n;let r,i;function s(e){const{clientX:n,clientY:o}=e;r&&i&&(r!==n||i!==o)&&t(),r=n,i=o}return o.addEventListener("mousemove",s),()=>{o.removeEventListener("mousemove",s)}}),[e,t])}function Xx(){const{isTyping:e}=(0,c.useSelect)((e=>{const{isTyping:t}=e(li);return{isTyping:t()}}),[]),{startTyping:t,stopTyping:n}=(0,c.useDispatch)(li),o=Yx(),r=(0,u.useRefEffect)((o=>{const{ownerDocument:r}=o,{defaultView:i}=r,s=i.getSelection();if(e){let a;function c(e){const{target:t}=e;a=i.setTimeout((()=>{(0,ba.isTextField)(t)||n()}))}function u(e){const{keyCode:t}=e;t!==va.ESCAPE&&t!==va.TAB||n()}function d(){s.isCollapsed||n()}return o.addEventListener("focus",c),o.addEventListener("keydown",u),r.addEventListener("selectionchange",d),()=>{i.clearTimeout(a),o.removeEventListener("focus",c),o.removeEventListener("keydown",u),r.removeEventListener("selectionchange",d)}}function l(e){const{type:n,target:r}=e;(0,ba.isTextField)(r)&&o.contains(r)&&("keydown"!==n||function(e){const{keyCode:t,shiftKey:n}=e;return!n&&qx.has(t)}(e))&&t()}return o.addEventListener("keypress",l),o.addEventListener("keydown",l),()=>{o.removeEventListener("keypress",l),o.removeEventListener("keydown",l)}}),[e,t,n]);return(0,u.useMergeRefs)([o,r])}const Qx=function({children:e}){return(0,$.jsx)("div",{ref:Xx(),children:e})};function Jx({clientId:e,rootClientId:t="",position:n="top"}){const[o,r]=(0,a.useState)(!1),{sectionRootClientId:i,sectionClientIds:s,blockInsertionPoint:l,blockInsertionPointVisible:d}=(0,c.useSelect)((e=>{const{getBlockInsertionPoint:t,getBlockOrder:n,isBlockInsertionPointVisible:o,getSectionRootClientId:r}=te(e(li)),i=r();return{sectionRootClientId:i,sectionClientIds:n(i),blockOrder:n(i),blockInsertionPoint:t(),blockInsertionPointVisible:o()}}),[]),p=(0,u.useReducedMotion)();if(!e)return;let h=!1;return t===i&&s&&s.includes(e)?("top"===n&&(h=d&&0===l.index&&e===s[l.index]),"bottom"===n&&(h=d&&e===s[l.index-1]),(0,$.jsx)(os.__unstableAnimatePresence,{children:h&&(0,$.jsx)(os.__unstableMotion.div,{initial:{height:0},animate:{height:"calc(1.5 * var(--wp-block-editor-iframe-zoom-out-frame-size) / var(--wp-block-editor-iframe-zoom-out-scale)"},exit:{height:0},transition:{type:"tween",duration:p?0:.2,ease:[.6,0,.4,1]},className:Zi("block-editor-block-list__zoom-out-separator",{"is-dragged-over":o}),"data-is-insertion-point":"true",onDragOver:()=>r(!0),onDragLeave:()=>r(!1),children:(0,$.jsx)(os.__unstableMotion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,transition:{delay:-.125}},transition:{ease:"linear",duration:.1,delay:.125},children:(0,C.__)("Drop pattern.")})})})):null}const ey=(0,a.createContext)(),ty=new WeakMap;function ny({className:e,...t}){const n=(0,u.useViewportMatch)("medium"),{isOutlineMode:o,isFocusMode:r,editorMode:i,temporarilyEditingAsBlocks:s}=(0,c.useSelect)((e=>{const{getSettings:t,__unstableGetEditorMode:n,getTemporarilyEditingAsBlocks:o,isTyping:r}=te(e(li)),{outlineMode:i,focusMode:s}=t();return{isOutlineMode:i&&!r(),isFocusMode:s,editorMode:n(),temporarilyEditingAsBlocks:o()}}),[]),l=(0,c.useRegistry)(),{setBlockVisibility:d}=(0,c.useDispatch)(li),p=(0,u.useDebounce)((0,a.useCallback)((()=>{const e={};ty.get(l).forEach((([t,n])=>{e[t]=n})),d(e)}),[l]),300,{trailing:!0}),h=(0,a.useMemo)((()=>{const{IntersectionObserver:e}=window;if(e)return new e((e=>{ty.get(l)||ty.set(l,[]);for(const t of e){const e=t.target.getAttribute("data-block");ty.get(l).push([e,t.isIntersecting])}p()}))}),[]),g=Kx({ref:(0,u.useMergeRefs)([Ix(),Bx(),Xx()]),className:Zi("is-root-container",e,{"is-outline-mode":o,"is-focus-mode":r&&n,"is-navigate-mode":"navigation"===i})},t);return(0,$.jsxs)(ey.Provider,{value:h,children:[(0,$.jsx)("div",{...g}),!!s&&(0,$.jsx)(oy,{clientId:s})]})}function oy({clientId:e}){const{stopEditingAsBlocks:t}=te((0,c.useDispatch)(li)),n=(0,c.useSelect)((t=>{const{isBlockSelected:n,hasSelectedInnerBlock:o}=t(li);return n(e)||o(e,!0)}),[e]);return(0,a.useEffect)((()=>{n||t(e)}),[n,e,t]),null}function ry(e){return(0,$.jsx)(v,{value:b,children:(0,$.jsx)(ny,{...e})})}const iy=[],sy=new Set;function ly({placeholder:e,rootClientId:t,renderAppender:n,__experimentalAppenderTagName:o,layout:r=Il}){const i=!1!==n,s=!!n,{order:l,isZoomOut:a,selectedBlocks:u,visibleBlocks:d,shouldRenderAppender:p}=(0,c.useSelect)((e=>{const{getSettings:n,getBlockOrder:o,getSelectedBlockClientId:r,getSelectedBlockClientIds:l,__unstableGetVisibleBlocks:a,getTemplateLock:c,getBlockEditingMode:u,__unstableGetEditorMode:d}=e(li),p=o(t);if(n().__unstableIsPreviewMode)return{order:p,selectedBlocks:iy,visibleBlocks:sy};const h=r();return{order:p,selectedBlocks:l(),visibleBlocks:a(),isZoomOut:"zoom-out"===d(),shouldRenderAppender:i&&"zoom-out"!==d()&&(s?!c(t)&&"disabled"!==u(t):t===h||!t&&!h&&!p.length)}}),[t,i,s]);return(0,$.jsxs)(El,{value:r,children:[l.map((e=>(0,$.jsxs)(c.AsyncModeProvider,{value:!d.has(e)&&!u.includes(e),children:[a&&(0,$.jsx)(Jx,{clientId:e,rootClientId:t,position:"top"}),(0,$.jsx)(hx,{rootClientId:t,clientId:e}),a&&(0,$.jsx)(Jx,{clientId:e,rootClientId:t,position:"bottom"})]},e))),l.length<1&&e,p&&(0,$.jsx)(kx,{tagName:o,rootClientId:t,CustomAppender:n})]})}function ay(e){return(0,$.jsx)(c.AsyncModeProvider,{value:!1,children:(0,$.jsx)(ly,{...e})})}function cy(e){const{isMultiSelecting:t,getMultiSelectedBlockClientIds:n,hasMultiSelection:o,getSelectedBlockClientId:r,getSelectedBlocksInitialCaretPosition:i,__unstableIsFullySelected:s}=e(li);return{isMultiSelecting:t(),multiSelectedBlockClientIds:n(),hasMultiSelection:o(),selectedBlockClientId:r(),initialPosition:i(),isFullSelection:s()}}function uy(){const{initialPosition:e,isMultiSelecting:t,multiSelectedBlockClientIds:n,hasMultiSelection:o,selectedBlockClientId:r,isFullSelection:i}=(0,c.useSelect)(cy,[]);return(0,u.useRefEffect)((r=>{const{ownerDocument:s}=r,{defaultView:l}=s;if(null==e)return;if(!o||t)return;const{length:a}=n;a<2||i&&(r.contentEditable=!0,r.focus(),l.getSelection().removeAllRanges())}),[o,t,n,r,e,i])}function dy(e,t,n,o){let r,i=ba.focus.focusable.find(n);return t&&i.reverse(),i=i.slice(i.indexOf(e)+1),o&&(r=e.getBoundingClientRect()),i.find((function(e){if(!(e.closest("[inert]")||1===e.children.length&&Gg(e,e.firstElementChild)&&"true"===e.firstElementChild.getAttribute("contenteditable"))){if(!ba.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 py(){const{getMultiSelectedBlocksStartClientId:e,getMultiSelectedBlocksEndClientId:t,getSettings:n,hasMultiSelection:o,__unstableIsFullySelected:r}=(0,c.useSelect)(li),{selectBlock:i}=(0,c.useDispatch)(li);return(0,u.useRefEffect)((s=>{let l;function a(){l=null}function c(a){if(a.defaultPrevented)return;const{keyCode:c,target:u,shiftKey:d,ctrlKey:p,altKey:h,metaKey:g}=a,m=c===va.UP,f=c===va.DOWN,b=c===va.LEFT,k=c===va.RIGHT,v=m||b,_=b||k,x=m||f,y=_||x,S=d||p||h||g,w=x?ba.isVerticalEdge:ba.isHorizontalEdge,{ownerDocument:C}=s,{defaultView:B}=C;if(!y)return;if(o()){if(d)return;if(!r())return;return a.preventDefault(),void(v?i(e()):i(t(),-1))}if(!function(e,t,n){const o=t===va.UP||t===va.DOWN,{tagName:r}=e,i=e.getAttribute("type");if(o&&!n)return"INPUT"!==r||!["date","datetime-local","month","number","range","time","week"].includes(i);if("INPUT"===r)return["button","checkbox","number","color","file","image","radio","reset","submit"].includes(i);return"TEXTAREA"!==r}(u,c,S))return;x?l||(l=(0,ba.computeCaretRect)(B)):l=null;const I=(0,ba.isRTL)(u)?!v:v,{keepCaretInsideBlock:j}=n();if(d)(function(e,t){const n=dy(e,t,s);return n&&Ug(n)})(u,v)&&w(u,v)&&(s.contentEditable=!0,s.focus());else if(!x||!(0,ba.isVerticalEdge)(u,v)||h&&!(0,ba.isHorizontalEdge)(u,I)||j){if(_&&B.getSelection().isCollapsed&&(0,ba.isHorizontalEdge)(u,I)&&!j){const e=dy(u,I,s);(0,ba.placeCaretAtHorizontalEdge)(e,v),a.preventDefault()}}else{const e=dy(u,v,s,!0);e&&((0,ba.placeCaretAtVerticalEdge)(e,h?!v:v,h?void 0:l),a.preventDefault())}}return s.addEventListener("mousedown",a),s.addEventListener("keydown",c),()=>{s.removeEventListener("mousedown",a),s.removeEventListener("keydown",c)}}),[])}function hy(){const{getBlockOrder:e,getSelectedBlockClientIds:t,getBlockRootClientId:n}=(0,c.useSelect)(li),{multiSelect:o,selectBlock:r}=(0,c.useDispatch)(li),i=(0,Yf.__unstableUseShortcutEventMatch)();return(0,u.useRefEffect)((s=>{function l(l){if(!i("core/block-editor/select-all",l))return;const a=t();if(a.length<2&&!(0,ba.isEntirelySelected)(l.target))return;l.preventDefault();const[c]=a,u=n(c),d=e(u);a.length!==d.length?o(d[0],d[d.length-1]):u&&(s.ownerDocument.defaultView.getSelection().removeAllRanges(),r(u))}return s.addEventListener("keydown",l),()=>{s.removeEventListener("keydown",l)}}),[])}function gy(e,t){e.contentEditable=t,t&&e.focus()}function my(){const{startMultiSelect:e,stopMultiSelect:t}=(0,c.useDispatch)(li),{isSelectionEnabled:n,hasSelectedBlock:o,isDraggingBlocks:r,isMultiSelecting:i}=(0,c.useSelect)(li);return(0,u.useRefEffect)((s=>{const{ownerDocument:l}=s,{defaultView:a}=l;let c,u;function d(){t(),a.removeEventListener("mouseup",d),u=a.requestAnimationFrame((()=>{if(!o())return;gy(s,!1);const e=a.getSelection();if(e.rangeCount){const t=e.getRangeAt(0),{commonAncestorContainer:n}=t,o=t.cloneRange();c.contains(n)&&(c.focus(),e.removeAllRanges(),e.addRange(o))}}))}function p({buttons:t,target:o,relatedTarget:l}){o.contains(l)||r()||1===t&&(i()||s!==o&&"true"===o.getAttribute("contenteditable")&&n()&&(c=o,e(),a.addEventListener("mouseup",d),gy(s,!0)))}return s.addEventListener("mouseout",p),()=>{s.removeEventListener("mouseout",p),a.removeEventListener("mouseup",d),a.cancelAnimationFrame(u)}}),[e,t,n,o])}function fy(e,t){e.contentEditable!==String(t)&&(e.contentEditable=t,t&&e.focus())}function by(e){const t=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;return t?.closest("[data-wp-block-attribute-key]")}function ky(){const{multiSelect:e,selectBlock:t,selectionChange:n}=(0,c.useDispatch)(li),{getBlockParents:o,getBlockSelectionStart:r,isMultiSelecting:i}=(0,c.useSelect)(li);return(0,u.useRefEffect)((s=>{const{ownerDocument:l}=s,{defaultView:a}=l;function c(l){const c=a.getSelection();if(!c.rangeCount)return;const u=function(e){const{anchorNode:t,anchorOffset:n}=e;return t.nodeType===t.TEXT_NODE||0===n?t:t.childNodes[n-1]}(c),d=function(e){const{focusNode:t,focusOffset:n}=e;return t.nodeType===t.TEXT_NODE||n===t.childNodes.length?t:0===n&&(0,ba.isSelectionForward)(e)?null!==(o=t.previousSibling)&&void 0!==o?o:t.parentElement:t.childNodes[n];var o}(c);if(!s.contains(u)||!s.contains(d))return;const p=l.shiftKey&&"mouseup"===l.type;if(c.isCollapsed&&!p){if("true"===s.contentEditable&&!i()){fy(s,!1);let e=u.nodeType===u.ELEMENT_NODE?u:u.parentElement;e=e?.closest("[contenteditable]"),e?.focus()}return}let h=Ug(u),g=Ug(d);if(p){const e=r(),t=Ug(l.target),n=t!==g;(h===g&&c.isCollapsed||!g||n)&&(g=t),h!==e&&(h=e)}if(void 0===h&&void 0===g)return void fy(s,!1);if(h===g)i()?e(h,h):t(h);else{const t=[...o(h),h],r=[...o(g),g],i=function(e,t){let n=0;for(;e[n]===t[n];)n++;return n}(t,r);if(t[i]!==h||r[i]!==g)return void e(t[i],r[i]);const s=by(u),l=by(d);if(s&&l){var m,f;const e=c.getRangeAt(0),t=(0,W.create)({element:s,range:e,__unstableIsEditableTree:!0}),o=(0,W.create)({element:l,range:e,__unstableIsEditableTree:!0}),r=null!==(m=t.start)&&void 0!==m?m:t.end,i=null!==(f=o.start)&&void 0!==f?f:o.end;n({start:{clientId:h,attributeKey:s.dataset.wpBlockAttributeKey,offset:r},end:{clientId:g,attributeKey:l.dataset.wpBlockAttributeKey,offset:i}})}else e(h,g)}}return l.addEventListener("selectionchange",c),a.addEventListener("mouseup",c),()=>{l.removeEventListener("selectionchange",c),a.removeEventListener("mouseup",c)}}),[e,t,n,o])}function vy(){const{selectBlock:e}=(0,c.useDispatch)(li),{isSelectionEnabled:t,getBlockSelectionStart:n,hasMultiSelection:o}=(0,c.useSelect)(li);return(0,u.useRefEffect)((r=>{function i(i){if(!t()||0!==i.button)return;const s=n(),l=Ug(i.target);i.shiftKey?s!==l&&(r.contentEditable=!0,r.focus()):o()&&e(l)}return r.addEventListener("mousedown",i),()=>{r.removeEventListener("mousedown",i)}}),[e,t,n,o])}function _y(){const{__unstableIsFullySelected:e,getSelectedBlockClientIds:t,getSelectedBlockClientId:n,__unstableIsSelectionMergeable:o,hasMultiSelection:r,getBlockName:i,canInsertBlockType:s,getBlockRootClientId:a,getSelectionStart:d,getSelectionEnd:p,getBlockAttributes:h}=(0,c.useSelect)(li),{replaceBlocks:g,__unstableSplitSelection:m,removeBlocks:f,__unstableDeleteSelection:b,__unstableExpandSelection:k,__unstableMarkAutomaticChange:v}=(0,c.useDispatch)(li);return(0,u.useRefEffect)((c=>{function u(e){"true"===c.contentEditable&&e.preventDefault()}function _(u){if(!u.defaultPrevented)if(r())u.keyCode===va.ENTER?(c.contentEditable=!1,u.preventDefault(),e()?g(t(),(0,l.createBlock)((0,l.getDefaultBlockName)())):m()):u.keyCode===va.BACKSPACE||u.keyCode===va.DELETE?(c.contentEditable=!1,u.preventDefault(),e()?f(t()):o()?b(u.keyCode===va.DELETE):k()):1!==u.key.length||u.metaKey||u.ctrlKey||(c.contentEditable=!1,o()?b(u.keyCode===va.DELETE):(u.preventDefault(),c.ownerDocument.defaultView.getSelection().removeAllRanges()));else if(u.keyCode===va.ENTER){if(u.shiftKey||e())return;const t=n(),o=i(t),r=d(),c=p();if(r.attributeKey===c.attributeKey){const e=h(t)[r.attributeKey],n=(0,l.getBlockTransforms)("from").filter((({type:e})=>"enter"===e)),o=(0,l.findTransform)(n,(t=>t.regExp.test(e)));if(o)return g(t,o.transform({content:e})),void v()}if(!(0,l.hasBlockSupport)(o,"splitting",!1)&&!u.__deprecatedOnSplit)return;s(o,a(t))&&(m(),u.preventDefault())}}function x(e){r()&&(c.contentEditable=!1,o()?b():(e.preventDefault(),c.ownerDocument.defaultView.getSelection().removeAllRanges()))}return c.addEventListener("beforeinput",u),c.addEventListener("keydown",_),c.addEventListener("compositionstart",x),()=>{c.removeEventListener("beforeinput",u),c.removeEventListener("keydown",_),c.removeEventListener("compositionstart",x)}}),[])}function xy(){const{getBlockName:e}=(0,c.useSelect)(li),{getBlockType:t}=(0,c.useSelect)(l.store),{createSuccessNotice:n}=(0,c.useDispatch)(Uo.store);return(0,a.useCallback)(((o,r)=>{let i="";if(1===r.length){const n=r[0],s=t(e(n))?.title;i="copy"===o?(0,C.sprintf)((0,C.__)('Copied "%s" to clipboard.'),s):(0,C.sprintf)((0,C.__)('Moved "%s" to clipboard.'),s)}else i="copy"===o?(0,C.sprintf)((0,C._n)("Copied %d block to clipboard.","Copied %d blocks to clipboard.",r.length),r.length):(0,C.sprintf)((0,C._n)("Moved %d block to clipboard.","Moved %d blocks to clipboard.",r.length),r.length);n(i,{type:"snackbar"})}),[])}function yy({clipboardData:e}){let t="",n="";try{t=e.getData("text/plain"),n=e.getData("text/html")}catch(e){return}n=function(e){const t="\x3c!--StartFragment--\x3e",n=e.indexOf(t);if(!(n>-1))return e;const o=(e=e.substring(n+20)).indexOf("\x3c!--EndFragment--\x3e");return o>-1&&(e=e.substring(0,o)),e}(n),n=function(e){const t="<meta charset='utf-8'>";return e.startsWith(t)?e.slice(22):e}(n);const o=(0,ba.getFilesFromDataTransfer)(e);return o.length&&!function(e,t){if(t&&1===e?.length&&0===e[0].type.indexOf("image/")){const e=/<\s*img\b/gi;if(1!==t.match(e)?.length)return!0;const n=/<\s*img\b[^>]*\bsrc="file:\/\//i;if(t.match(n))return!0}return!1}(o,n)?{files:o}:{html:n,plainText:t,files:[]}}const Sy=Symbol("requiresWrapperOnCopy");function wy(e,t,n){let o=t;const[r]=t;if(r){if(n.select(l.store).getBlockType(r.name)[Sy]){const{getBlockRootClientId:e,getBlockName:t,getBlockAttributes:i}=n.select(li),s=e(r.clientId),a=t(s);a&&(o=(0,l.createBlock)(a,i(s),o))}}const i=(0,l.serialize)(o);e.clipboardData.setData("text/plain",function(e){e=e.replace(/<br>/g,"\n");return(0,ba.__unstableStripHTML)(e).trim().replace(/\n\n+/g,"\n\n")}(i)),e.clipboardData.setData("text/html",i)}function Cy(){const e=(0,c.useRegistry)(),{getBlocksByClientId:t,getSelectedBlockClientIds:n,hasMultiSelection:o,getSettings:r,getBlockName:i,__unstableIsFullySelected:s,__unstableIsSelectionCollapsed:a,__unstableIsSelectionMergeable:d,__unstableGetSelectedBlocksWithPartialSelection:p,canInsertBlockType:h,getBlockRootClientId:g}=(0,c.useSelect)(li),{flashBlock:m,removeBlocks:f,replaceBlocks:b,__unstableDeleteSelection:k,__unstableExpandSelection:v,__unstableSplitSelection:_}=(0,c.useDispatch)(li),x=xy();return(0,u.useRefEffect)((c=>{function u(u){if(u.defaultPrevented)return;const y=n();if(0===y.length)return;if(!o()){const{target:e}=u,{ownerDocument:t}=e;if("copy"===u.type||"cut"===u.type?(0,ba.documentHasUncollapsedSelection)(t):(0,ba.documentHasSelection)(t)&&!t.activeElement.isContentEditable)return}const{activeElement:S}=u.target.ownerDocument;if(!c.contains(S))return;const w=d(),C=a()||s(),B=!C&&!w;if("copy"===u.type||"cut"===u.type)if(u.preventDefault(),1===y.length&&m(y[0]),B)v();else{let n;if(x(u.type,y),C)n=t(y);else{const[e,o]=p();n=[e,...t(y.slice(1,y.length-1)),o]}wy(u,n,e)}if("cut"===u.type)C&&!B?f(y):(u.target.ownerDocument.activeElement.contentEditable=!1,k());else if("paste"===u.type){const{__experimentalCanUserUseUnfilteredHTML:e}=r();if("true"===u.clipboardData.getData("rich-text"))return;const{plainText:t,html:n,files:a}=yy(u),c=s();let d=[];if(a.length){const e=(0,l.getBlockTransforms)("from");d=a.reduce(((t,n)=>{const o=(0,l.findTransform)(e,(e=>"files"===e.type&&e.isMatch([n])));return o&&t.push(o.transform([n])),t}),[]).flat()}else d=(0,l.pasteHandler)({HTML:n,plainText:t,mode:c?"BLOCKS":"AUTO",canUserUseUnfilteredHTML:e});if("string"==typeof d)return;if(c)return b(y,d,d.length-1,-1),void u.preventDefault();if(!o()&&!(0,l.hasBlockSupport)(i(y[0]),"splitting",!1)&&!u.__deprecatedOnSplit)return;const[p]=y,m=g(p),f=[];for(const e of d)if(h(e.name,m))f.push(e);else{const t=i(m),n=e.name!==t?(0,l.switchToBlockType)(e,t):[e];if(!n)return;for(const e of n)for(const t of e.innerBlocks)f.push(t)}_(f),u.preventDefault()}}return c.ownerDocument.addEventListener("copy",u),c.ownerDocument.addEventListener("cut",u),c.ownerDocument.addEventListener("paste",u),()=>{c.ownerDocument.removeEventListener("copy",u),c.ownerDocument.removeEventListener("cut",u),c.ownerDocument.removeEventListener("paste",u)}}),[])}function By(){const[e,t,n]=function(){const e=(0,a.useRef)(),t=(0,a.useRef)(),n=(0,a.useRef)(),{hasMultiSelection:o,getSelectedBlockClientId:r,getBlockCount:i}=(0,c.useSelect)(li),{setNavigationMode:s,setLastFocus:l}=te((0,c.useDispatch)(li)),d=(0,c.useSelect)((e=>e(li).isNavigationMode()),[]),{getLastFocus:p}=te((0,c.useSelect)(li)),h=d?void 0:"0",g=(0,a.useRef)();function m(t){if(g.current)g.current=null;else if(o())e.current.focus();else if(r())p()?.current?p().current.focus():e.current.querySelector(`[data-block="${r()}"]`).focus();else{s(!0);const n=e.current.ownerDocument===t.target.ownerDocument?e.current:e.current.ownerDocument.defaultView.frameElement,o=t.target.compareDocumentPosition(n)&t.target.DOCUMENT_POSITION_FOLLOWING,r=ba.focus.tabbable.find(e.current);r.length&&(o?r[0]:r[r.length-1]).focus()}}const f=(0,$.jsx)("div",{ref:t,tabIndex:h,onFocus:m}),b=(0,$.jsx)("div",{ref:n,tabIndex:h,onFocus:m}),k=(0,u.useRefEffect)((a=>{function c(e){if(e.defaultPrevented)return;if(e.keyCode===va.ESCAPE&&!o())return e.preventDefault(),void s(!0);if(e.keyCode!==va.TAB)return;const i=e.shiftKey,l=i?"findPrevious":"findNext";if(!o()&&!r())return void(e.target===a&&s(!0));const c=ba.focus.tabbable[l](e.target),u=e.target.closest("[data-block]"),d=u&&c&&(Gg(u,c)||$g(u,c));if((0,ba.isFormElement)(c)&&d)return;const p=i?t:n;g.current=!0,p.current.focus({preventScroll:!0})}function u(e){l({...p(),current:e.target});const{ownerDocument:t}=a;e.relatedTarget||t.activeElement!==t.body||0!==i()||a.focus()}function d(o){if(o.keyCode!==va.TAB)return;if("region"===o.target?.getAttribute("role"))return;if(e.current===o.target)return;const r=o.shiftKey?"findPrevious":"findNext",i=ba.focus.tabbable[r](o.target);i!==t.current&&i!==n.current||(o.preventDefault(),i.focus({preventScroll:!0}))}const{ownerDocument:h}=a,{defaultView:m}=h;return m.addEventListener("keydown",d),a.addEventListener("keydown",c),a.addEventListener("focusout",u),()=>{m.removeEventListener("keydown",d),a.removeEventListener("keydown",c),a.removeEventListener("focusout",u)}}),[]);return[f,(0,u.useMergeRefs)([e,k]),b]}(),o=(0,c.useSelect)((e=>e(li).hasMultiSelection()),[]);return[e,(0,u.useMergeRefs)([t,Cy(),_y(),my(),ky(),vy(),uy(),hy(),py(),(0,u.useRefEffect)((e=>{if(e.tabIndex=0,o)return e.classList.add("has-multi-selection"),e.setAttribute("aria-label",(0,C.__)("Multiple selected blocks")),()=>{e.classList.remove("has-multi-selection"),e.removeAttribute("aria-label")}}),[o])]),n]}const Iy=(0,a.forwardRef)((function({children:e,...t},n){const[o,r,i]=By();return(0,$.jsxs)($.Fragment,{children:[o,(0,$.jsx)("div",{...t,ref:(0,u.useMergeRefs)([r,n]),className:Zi(t.className,"block-editor-writing-flow"),children:e}),i]})}));let jy=null;function Ey(e,t,n){const o={};for(const t in e)o[t]=e[t];if(e instanceof n.contentDocument.defaultView.MouseEvent){const e=n.getBoundingClientRect();o.clientX+=e.left,o.clientY+=e.top}const r=new t(e.type,o);o.defaultPrevented&&r.preventDefault();!n.dispatchEvent(r)&&e.preventDefault()}function Ty(e){return(0,u.useRefEffect)((()=>{const{defaultView:t}=e;if(!t)return;const{frameElement:n}=t,o=e.documentElement,r=["dragover","mousemove"],i={};for(const e of r)i[e]=e=>{const t=Object.getPrototypeOf(e).constructor.name;Ey(e,window[t],n)},o.addEventListener(e,i[e]);return()=>{for(const e of r)o.removeEventListener(e,i[e])}}))}function My({contentRef:e,children:t,tabIndex:n=0,scale:o=1,frameSize:r=0,readonly:i,forwardedRef:s,title:l=(0,C.__)("Editor canvas"),...d}){const{resolvedAssets:p,isPreviewMode:h}=(0,c.useSelect)((e=>{const{getSettings:t}=e(li),n=t();return{resolvedAssets:n.__unstableResolvedAssets,isPreviewMode:n.__unstableIsPreviewMode}}),[]),{styles:g="",scripts:m=""}=p,[f,b]=(0,a.useState)(),k=(0,a.useRef)(0),[v,_]=(0,a.useState)([]),x=Ix(),[y,S,w]=By(),[B,{height:I}]=(0,u.useResizeObserver)(),[j,{width:E}]=(0,u.useResizeObserver)(),T=(0,u.useRefEffect)((e=>{let t;function n(e){e.preventDefault()}function o(){const{contentDocument:o,ownerDocument:r}=e,{documentElement:i}=o;t=o,i.classList.add("block-editor-iframe__html"),x(i),_(Array.from(r.body.classList).filter((e=>e.startsWith("admin-color-")||e.startsWith("post-type-")||"wp-embed-responsive"===e))),o.dir=r.dir;for(const e of jy||(jy=Array.from(document.styleSheets).reduce(((e,t)=>{try{t.cssRules}catch(t){return e}const{ownerNode:n,cssRules:o}=t;if(null===n)return e;if(!o)return e;if(["wp-reset-editor-styles-css","wp-reset-editor-styles-rtl-css"].includes(n.id))return e;if(!n.id)return e;if(function e(t){return Array.from(t).find((({selectorText:t,conditionText:n,cssRules:o})=>n?e(o):t&&(t.includes(".editor-styles-wrapper")||t.includes(".wp-block"))))}(o)){const t="STYLE"===n.tagName;if(t){const t=n.id.replace("-inline-css","-css"),o=document.getElementById(t);o&&e.push(o.cloneNode(!0))}if(e.push(n.cloneNode(!0)),!t){const t=n.id.replace("-css","-inline-css"),o=document.getElementById(t);o&&e.push(o.cloneNode(!0))}}return e}),[]),jy))o.getElementById(e.id)||(o.head.appendChild(e.cloneNode(!0)),h||console.warn(`${e.id} was added to the iframe incorrectly. Please use block.json or enqueue_block_assets to add styles to the iframe.`,e));t.addEventListener("dragover",n,!1),t.addEventListener("drop",n,!1)}return e._load=()=>{b(e.contentDocument)},e.addEventListener("load",o),()=>{delete e._load,e.removeEventListener("load",o),t?.removeEventListener("dragover",n),t?.removeEventListener("drop",n)}}),[]),[M,P]=(0,a.useState)(),R=(0,u.useRefEffect)((e=>{const t=e.ownerDocument.defaultView;P(t.innerHeight);const n=()=>{P(t.innerHeight)};return t.addEventListener("resize",n),()=>{t.removeEventListener("resize",n)}}),[]),[N,L]=(0,a.useState)(),A=(0,u.useRefEffect)((e=>{const t=e.ownerDocument.defaultView;L(t.innerWidth);const n=()=>{L(t.innerWidth)};return t.addEventListener("resize",n),()=>{t.removeEventListener("resize",n)}}),[]),D=1!==o;(0,a.useEffect)((()=>{D||(k.current=E)}),[E,D]);const O=Math.max(k.current,E),z=(0,u.useDisabled)({isDisabled:!i}),V=(0,u.useMergeRefs)([Ty(f),e,x,S,z,D?R:null]),F=`<!doctype html>\n<html>\n\t<head>\n\t\t<meta charset="utf-8">\n\t\t<script>window.frameElement._load()<\/script>\n\t\t<style>\n\t\t\thtml{\n\t\t\t\theight: auto !important;\n\t\t\t\tmin-height: 100%;\n\t\t\t}\n\t\t\t/* Lowest specificity to not override global styles */\n\t\t\t:where(body) {\n\t\t\t\tmargin: 0;\n\t\t\t\t/* Default background color in case zoom out mode background\n\t\t\t\tcolors the html element */\n\t\t\t\tbackground-color: white;\n\t\t\t}\n\t\t</style>\n\t\t${g}\n\t\t${m}\n\t</head>\n\t<body>\n\t\t<script>document.currentScript.parentElement.remove()<\/script>\n\t</body>\n</html>`,[H,G]=(0,a.useMemo)((()=>{const e=URL.createObjectURL(new window.Blob([F],{type:"text/html"}));return[e,()=>URL.revokeObjectURL(e)]}),[F]);(0,a.useEffect)((()=>G),[G]);const U=(0,a.useRef)(null);(0,a.useEffect)((()=>{if(!f||!D)return;const e=()=>{clearTimeout(U.current),f.documentElement.classList.add("zoom-out-animation"),U.current=setTimeout((()=>{f.documentElement.classList.remove("zoom-out-animation")}),400)};return e(),f.documentElement.classList.add("is-zoomed-out"),()=>{e(),f.documentElement.classList.remove("is-zoomed-out")}}),[f,D]),(0,a.useEffect)((()=>{if(!f||!D)return;return f.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scale","default"===o?(Math.min(E,750)-2*parseInt(r))/O:o),f.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-frame-size","number"==typeof r?`${r}px`:r),f.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-content-height",`${I}px`),f.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-inner-height",`${M}px`),f.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-container-width",`${E}px`),f.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scale-container-width",`${O}px`),()=>{f.documentElement.style.removeProperty("--wp-block-editor-iframe-zoom-out-scale"),f.documentElement.style.removeProperty("--wp-block-editor-iframe-zoom-out-frame-size"),f.documentElement.style.removeProperty("--wp-block-editor-iframe-zoom-out-content-height"),f.documentElement.style.removeProperty("--wp-block-editor-iframe-zoom-out-inner-height"),f.documentElement.style.removeProperty("--wp-block-editor-iframe-zoom-out-container-width"),f.documentElement.style.removeProperty("--wp-block-editor-iframe-zoom-out-scale-container-width")}}),[o,r,f,M,I,E,N,D,O]);const W=n>=0&&!h,K=(0,$.jsxs)($.Fragment,{children:[W&&y,(0,$.jsx)("iframe",{...d,style:{...d.style,height:d.style?.height,border:0},ref:(0,u.useMergeRefs)([s,T]),tabIndex:n,src:H,title:l,onKeyDown:e=>{if(d.onKeyDown&&d.onKeyDown(e),e.currentTarget.ownerDocument!==e.target.ownerDocument){const{stopPropagation:t}=e.nativeEvent;e.nativeEvent.stopPropagation=()=>{},e.stopPropagation(),e.nativeEvent.stopPropagation=t,Ey(e,window.KeyboardEvent,e.currentTarget)}},children:f&&(0,a.createPortal)((0,$.jsxs)("body",{ref:V,className:Zi("block-editor-iframe__body","editor-styles-wrapper",...v),children:[B,(0,$.jsx)(os.__experimentalStyleProvider,{document:f,children:t})]}),f.documentElement)}),W&&w]});return(0,$.jsxs)("div",{className:"block-editor-iframe__container",ref:A,children:[j,(0,$.jsx)("div",{className:Zi("block-editor-iframe__scale-container",D&&"is-zoomed-out"),style:{"--wp-block-editor-iframe-zoom-out-scale-container-width":D&&`${O}px`},children:K})]})}const Py=(0,a.forwardRef)((function(e,t){return(0,c.useSelect)((e=>e(li).getSettings().__internalIsInitialized),[])?(0,$.jsx)(My,{...e,forwardedRef:t}):null})),Ry={attribute:/\[\s*(?:(?<namespace>\*|[-\w\P{ASCII}]*)\|)?(?<name>[-\w\P{ASCII}]+)\s*(?:(?<operator>\W?=)\s*(?<value>.+?)\s*(\s(?<caseSensitive>[iIsS]))?\s*)?\]/gu,id:/#(?<name>[-\w\P{ASCII}]+)/gu,class:/\.(?<name>[-\w\P{ASCII}]+)/gu,comma:/\s*,\s*/g,combinator:/\s*[\s>+~]\s*/g,"pseudo-element":/::(?<name>[-\w\P{ASCII}]+)(?:\((?<argument>¶*)\))?/gu,"pseudo-class":/:(?<name>[-\w\P{ASCII}]+)(?:\((?<argument>¶*)\))?/gu,universal:/(?:(?<namespace>\*|[-\w\P{ASCII}]*)\|)?\*/gu,type:/(?:(?<namespace>\*|[-\w\P{ASCII}]*)\|)?(?<name>[-\w\P{ASCII}]+)/gu},Ny=new Set(["combinator","comma"]),Ly=(new Set(["not","is","where","has","matches","-moz-any","-webkit-any","nth-child","nth-last-child"]),e=>{switch(e){case"pseudo-element":case"pseudo-class":return new RegExp(Ry[e].source.replace("(?<argument>¶*)","(?<argument>.*)"),"gu");default:return Ry[e]}});function Ay(e,t){let n=0,o="";for(;t<e.length;t++){const r=e[t];switch(r){case"(":++n;break;case")":--n}if(o+=r,0===n)return o}return o}const Dy=/(['"])([^\\\n]+?)\1/g,Oy=/\\./g;function zy(e,t=Ry){if(""===(e=e.trim()))return[];const n=[];e=(e=e.replace(Oy,((e,t)=>(n.push({value:e,offset:t}),"".repeat(e.length))))).replace(Dy,((e,t,o,r)=>(n.push({value:e,offset:r}),`${t}${"".repeat(o.length)}${t}`)));{let t,o=0;for(;(t=e.indexOf("(",o))>-1;){const r=Ay(e,t);n.push({value:r,offset:t}),e=`${e.substring(0,t)}(${"¶".repeat(r.length-2)})${e.substring(t+r.length)}`,o=t+r.length}}const o=function(e,t=Ry){if(!e)return[];const n=[e];for(const[e,o]of Object.entries(t))for(let t=0;t<n.length;t++){const r=n[t];if("string"!=typeof r)continue;o.lastIndex=0;const i=o.exec(r);if(!i)continue;const s=i.index-1,l=[],a=i[0],c=r.slice(0,s+1);c&&l.push(c),l.push({...i.groups,type:e,content:a});const u=r.slice(s+a.length+1);u&&l.push(u),n.splice(t,1,...l)}let o=0;for(const e of n)switch(typeof e){case"string":throw new Error(`Unexpected sequence ${e} found at index ${o}`);case"object":o+=e.content.length,e.pos=[o-e.content.length,o],Ny.has(e.type)&&(e.content=e.content.trim()||" ")}return n}(e,t),r=new Set;for(const e of n.reverse())for(const t of o){const{offset:n,value:o}=e;if(!(t.pos[0]<=n&&n+o.length<=t.pos[1]))continue;const{content:i}=t,s=n-t.pos[0];t.content=i.slice(0,s)+o+i.slice(s+o.length),t.content!==i&&r.add(t)}for(const e of r){const t=Ly(e.type);if(!t)throw new Error(`Unknown token type: ${e.type}`);t.lastIndex=0;const n=t.exec(e.content);if(!n)throw new Error(`Unable to parse content for ${e.type}: ${e.content}`);Object.assign(e,n.groups)}return o}function*Vy(e,t){switch(e.type){case"list":for(let t of e.list)yield*Vy(t,e);break;case"complex":yield*Vy(e.left,e),yield*Vy(e.right,e);break;case"compound":yield*e.list.map((t=>[t,e]));break;default:yield[e,t]}}var Fy=n(4529);const Hy=Fy,Gy=(Fy.stringify,Fy.fromJSON,Fy.plugin,Fy.parse,Fy.list,Fy.document,Fy.comment,Fy.atRule,Fy.rule,Fy.decl,Fy.root,Fy.CssSyntaxError);Fy.Declaration,Fy.Container,Fy.Processor,Fy.Document,Fy.Comment,Fy.Warning,Fy.AtRule,Fy.Result,Fy.Input,Fy.Rule,Fy.Root,Fy.Node;var $y=n(1443),Uy=n.n($y),Wy=n(5404),Ky=n.n(Wy);const Zy=new Map,qy=[{type:"type",content:"body"},{type:"type",content:"html"},{type:"pseudo-class",content:":root"},{type:"pseudo-class",content:":where(body)"},{type:"pseudo-class",content:":where(:root)"},{type:"pseudo-class",content:":where(html)"}];function Yy(e,t){const n=zy(t);let o=-1;for(let e=n.findLastIndex((({content:e,type:t})=>qy.some((n=>e===n.content&&t===n.type))))+1;e<n.length;e++)if("combinator"===n[e].type){o=e;break}const r=zy(e);return n.splice(-1===o?n.length:o,0,{type:"combinator",content:" "},...r),function(e){let t;return t=Array.isArray(e)?e:[...Vy(e)].map((([e])=>e)),t.map((e=>e.content)).join("")}(n)}const Xy=(e,t="",n)=>{let o=Zy.get(t);return o||(o=new WeakMap,Zy.set(t,o)),e.map((e=>{let r=o.get(e);return r||(r=function({css:e,ignoredSelectors:t=[],baseURL:n},o="",r){if(!o&&!n)return e;try{var i;const s=[...t,...null!==(i=r?.ignoredSelectors)&&void 0!==i?i:[],o];return Hy([o&&Uy()({prefix:o,transform:(e,t,n)=>s.some((e=>e instanceof RegExp?t.match(e):t.includes(e)))?t:qy.some((e=>t.startsWith(e.content)))?Yy(e,t):n}),n&&Ky()({rootUrl:n})].filter(Boolean)).process(e,{}).css}catch(e){return e instanceof Gy?console.warn("wp.blockEditor.transformStyles Failed to transform CSS.",e.message+"\n"+e.showSourceCode(!1)):console.warn("wp.blockEditor.transformStyles Failed to transform CSS.",e),null}}(e,t,n),o.set(e,r)),r}))};function Qy(e,t){return(0,a.useCallback)((e=>{if(!e)return;const{ownerDocument:n}=e,{defaultView:o,body:r}=n,i=t?n.querySelector(t):r;let s;if(i)s=o?.getComputedStyle(i,null).getPropertyValue("background-color");else{const e=n.createElement("div");e.classList.add("editor-styles-wrapper"),r.appendChild(e),s=o?.getComputedStyle(e,null).getPropertyValue("background-color"),r.removeChild(e)}const l=Du(s);l.luminance()>.5||0===l.alpha()?r.classList.remove("is-dark-theme"):r.classList.add("is-dark-theme")}),[e,t])}zu([Vu,Gu]);const Jy=(0,a.memo)((function({styles:e,scope:t,transformOptions:n}){const o=(0,c.useSelect)((e=>te(e(li)).getStyleOverrides()),[]),[r,i]=(0,a.useMemo)((()=>{const r=Object.values(null!=e?e:[]);for(const[e,t]of o){const n=r.findIndex((({id:t})=>e===t)),o={...t,id:e};-1===n?r.push(o):r[n]=o}return[Xy(r.filter((e=>e?.css)),t,n),r.filter((e=>"svgs"===e.__unstableType)).map((e=>e.assets)).join("")]}),[e,o,t,n]);return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)("style",{ref:Qy(r,t)}),r.map(((e,t)=>(0,$.jsx)("style",{children:e},t))),(0,$.jsx)(os.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 0 0",width:"0",height:"0",role:"none",style:{visibility:"hidden",position:"absolute",left:"-9999px",overflow:"hidden"},dangerouslySetInnerHTML:{__html:i}})]})}));let eS;const tS=2e3,nS=[];function oS({viewportWidth:e,containerWidth:t,minHeight:n,additionalStyles:o=nS}){e||(e=t);const[r,{height:i}]=(0,u.useResizeObserver)(),{styles:s}=(0,c.useSelect)((e=>({styles:e(li).getSettings().styles})),[]),l=(0,a.useMemo)((()=>s?[...s,{css:"body{height:auto;overflow:hidden;border:none;padding:0;}",__unstableType:"presets"},...o]:s),[s,o]);eS=eS||(0,a.memo)(ry);const d=t/e,p=i?t/(i*d):0;return(0,$.jsx)(os.Disabled,{className:"block-editor-block-preview__content",style:{transform:`scale(${d})`,aspectRatio:p,maxHeight:i>tS?tS*d:void 0,minHeight:n},children:(0,$.jsxs)(Py,{contentRef:(0,u.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.boxSizing="border-box",e.style.position="absolute",e.style.width="100%"}),[]),"aria-hidden":!0,tabIndex:-1,style:{position:"absolute",width:e,height:i,pointerEvents:"none",maxHeight:tS,minHeight:0!==d&&d<1&&n?n/d:n},children:[(0,$.jsx)(Jy,{styles:l}),r,(0,$.jsx)(eS,{renderAppender:!1})]})})}function rS(e){const[t,{width:n}]=(0,u.useResizeObserver)();return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)("div",{style:{position:"relative",width:"100%",height:0},children:t}),(0,$.jsx)("div",{className:"block-editor-block-preview__container",children:!!n&&(0,$.jsx)(oS,{...e,containerWidth:n})})]})}const iS=[];const sS=(0,a.memo)((function({blocks:e,viewportWidth:t=1200,minHeight:n,additionalStyles:o=iS,__experimentalMinHeight:r,__experimentalPadding:i}){r&&(n=r,y()("The __experimentalMinHeight prop",{since:"6.2",version:"6.4",alternative:"minHeight"})),i&&(o=[...o,{css:`body { padding: ${i}px; }`}],y()("The __experimentalPadding prop of BlockPreview",{since:"6.2",version:"6.4",alternative:"additionalStyles"}));const s=(0,c.useSelect)((e=>e(li).getSettings()),[]),l=(0,a.useMemo)((()=>({...s,focusMode:!1,__unstableIsPreviewMode:!0})),[s]),u=(0,a.useMemo)((()=>Array.isArray(e)?e:[e]),[e]);return e&&0!==e.length?(0,$.jsx)(Jf,{value:u,settings:l,children:(0,$.jsx)(rS,{viewportWidth:t,minHeight:n,additionalStyles:o})}):null}));function lS({blocks:e,props:t={},layout:n}){const o=(0,c.useSelect)((e=>e(li).getSettings()),[]),r=(0,a.useMemo)((()=>({...o,styles:void 0,focusMode:!1,__unstableIsPreviewMode:!0})),[o]),i=(0,u.useDisabled)(),s=(0,u.useMergeRefs)([t.ref,i]),l=(0,a.useMemo)((()=>Array.isArray(e)?e:[e]),[e]),d=(0,$.jsxs)(Jf,{value:l,settings:r,children:[(0,$.jsx)(Jy,{}),(0,$.jsx)(ay,{renderAppender:!1,layout:n})]});return{...t,ref:s,className:Zi(t.className,"block-editor-block-preview__live-content","components-disabled"),children:e?.length?d:null}}const aS=function({item:e}){var t;const{name:n,title:o,icon:r,description:i,initialAttributes:s,example:c}=e,u=(0,l.isReusableBlock)(e),d=(0,a.useMemo)((()=>c?(0,l.getBlockFromExample)(n,{attributes:{...c.attributes,...s},innerBlocks:c.innerBlocks}):(0,l.createBlock)(n,s)),[n,c,s]),p=144,h=null!==(t=c?.viewportWidth)&&void 0!==t?t:500,g=280/h,m=0!==g&&g<1?p/g:p;return(0,$.jsxs)("div",{className:"block-editor-inserter__preview-container",children:[(0,$.jsx)("div",{className:"block-editor-inserter__preview",children:u||c?(0,$.jsx)("div",{className:"block-editor-inserter__preview-content",children:(0,$.jsx)(sS,{blocks:d,viewportWidth:h,minHeight:p,additionalStyles:[{css:`\n\t\t\t\t\t\t\t\t\t\tbody { \n\t\t\t\t\t\t\t\t\t\t\tpadding: 24px;\n\t\t\t\t\t\t\t\t\t\t\tmin-height:${Math.round(m)}px;\n\t\t\t\t\t\t\t\t\t\t\tdisplay:flex;\n\t\t\t\t\t\t\t\t\t\t\talign-items:center;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t.is-root-container { width: 100%; }\n\t\t\t\t\t\t\t\t\t`}]})}):(0,$.jsx)("div",{className:"block-editor-inserter__preview-content-missing",children:(0,C.__)("No preview available.")})}),!u&&(0,$.jsx)(Wf,{title:o,icon:r,description:i})]})};const cS=(0,a.forwardRef)((function({isFirst:e,as:t,children:n,...o},r){return(0,$.jsx)(os.Composite.Item,{ref:r,role:"option",accessibleWhenDisabled:!0,...o,render:o=>{const r={...o,tabIndex:e?0:o.tabIndex};return t?(0,$.jsx)(t,{...r,children:n}):"function"==typeof n?n(r):(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,...r,children:n})}})})),uS=(0,$.jsx)(G.SVG,{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M8 7h2V5H8v2zm0 6h2v-2H8v2zm0 6h2v-2H8v2zm6-14v2h2V5h-2zm0 8h2v-2h-2v2zm0 6h2v-2h-2v2z"})});function dS({count:e,icon:t,isPattern:n,fadeWhenDisabled:o}){const r=n&&(0,C.__)("Pattern");return(0,$.jsx)("div",{className:"block-editor-block-draggable-chip-wrapper",children:(0,$.jsx)("div",{className:"block-editor-block-draggable-chip","data-testid":"block-draggable-chip",children:(0,$.jsxs)(os.Flex,{justify:"center",className:"block-editor-block-draggable-chip__content",children:[(0,$.jsx)(os.FlexItem,{children:t?(0,$.jsx)(Uf,{icon:t}):r||(0,C.sprintf)((0,C._n)("%d block","%d blocks",e),e)}),(0,$.jsx)(os.FlexItem,{children:(0,$.jsx)(Uf,{icon:uS})}),o&&(0,$.jsx)(os.FlexItem,{className:"block-editor-block-draggable-chip__disabled",children:(0,$.jsx)("span",{className:"block-editor-block-draggable-chip__disabled-icon"})})]})})})}const pS=({isEnabled:e,blocks:t,icon:n,children:o,pattern:r})=>{const i={type:"inserter",blocks:t},s=(0,c.useSelect)((e=>{const{getBlockType:n}=e(l.store);return 1===t.length&&n(t[0].name)?.icon}),[t]),{startDragging:a,stopDragging:u}=te((0,c.useDispatch)(li));return e?(0,$.jsx)(os.Draggable,{__experimentalTransferDataType:"wp-blocks",transferData:i,onDragStart:e=>{a();const n=r?.type===ge.user&&"unsynced"!==r?.syncStatus?[(0,l.createBlock)("core/block",{ref:r.id})]:t;e.dataTransfer.setData("text/html",(0,l.serialize)(n))},onDragEnd:()=>{u()},__experimentalDragComponent:(0,$.jsx)(dS,{count:t.length,icon:n||!r&&s,isPattern:!!r}),children:({onDraggableStart:e,onDraggableEnd:t})=>o({draggable:!0,onDragStart:e,onDragEnd:t})}):o({draggable:!1,onDragStart:void 0,onDragEnd:void 0})};const hS=(0,a.memo)((function({className:e,isFirst:t,item:n,onSelect:o,onHover:r,isDraggable:i,...s}){const c=(0,a.useRef)(!1),u=n.icon?{backgroundColor:n.icon.background,color:n.icon.foreground}:{},d=(0,a.useMemo)((()=>[(0,l.createBlock)(n.name,n.initialAttributes,(0,l.createBlocksFromInnerBlocksTemplate)(n.innerBlocks))]),[n.name,n.initialAttributes,n.innerBlocks]),p=(0,l.isReusableBlock)(n)&&"unsynced"!==n.syncStatus||(0,l.isTemplatePart)(n);return(0,$.jsx)(pS,{isEnabled:i&&!n.isDisabled,blocks:d,icon:n.icon,children:({draggable:i,onDragStart:l,onDragEnd:a})=>(0,$.jsx)("div",{className:Zi("block-editor-block-types-list__list-item",{"is-synced":p}),draggable:i,onDragStart:e=>{c.current=!0,l&&(r(null),l(e))},onDragEnd:e=>{c.current=!1,a&&a(e)},children:(0,$.jsxs)(cS,{isFirst:t,className:Zi("block-editor-block-types-list__item",e),disabled:n.isDisabled,onClick:e=>{e.preventDefault(),o(n,(0,va.isAppleOS)()?e.metaKey:e.ctrlKey),r(null)},onKeyDown:e=>{const{keyCode:t}=e;t===va.ENTER&&(e.preventDefault(),o(n,(0,va.isAppleOS)()?e.metaKey:e.ctrlKey),r(null))},onMouseEnter:()=>{c.current||r(n)},onMouseLeave:()=>r(null),...s,children:[(0,$.jsx)("span",{className:"block-editor-block-types-list__item-icon",style:u,children:(0,$.jsx)(Uf,{icon:n.icon,showColors:!0})}),(0,$.jsx)("span",{className:"block-editor-block-types-list__item-title",children:(0,$.jsx)(os.__experimentalTruncate,{numberOfLines:3,children:n.title})})]})})})}));const gS=(0,a.forwardRef)((function(e,t){const[n,o]=(0,a.useState)(!1);return(0,a.useEffect)((()=>{n&&(0,$o.speak)((0,C.__)("Use left and right arrow keys to move through blocks"))}),[n]),(0,$.jsx)("div",{ref:t,role:"listbox","aria-orientation":"horizontal",onFocus:()=>{o(!0)},onBlur:e=>{!e.currentTarget.contains(e.relatedTarget)&&o(!1)},...e})}));const mS=(0,a.forwardRef)((function(e,t){return(0,$.jsx)(os.Composite.Group,{role:"presentation",ref:t,...e})}));function fS(e,t){const n=[];for(let o=0,r=e.length;o<r;o+=t)n.push(e.slice(o,o+t));return n}const bS=function e({items:t=[],onSelect:n,onHover:o=(()=>{}),children:r,label:i,isDraggable:s=!0}){const a="block-editor-block-types-list",c=(0,u.useInstanceId)(e,a);return(0,$.jsxs)(gS,{className:a,"aria-label":i,children:[fS(t,3).map(((e,t)=>(0,$.jsx)(mS,{children:e.map(((e,r)=>(0,$.jsx)(hS,{item:e,className:(0,l.getBlockMenuDefaultClassName)(e.id),onSelect:n,onHover:o,isDraggable:s&&!e.isDisabled,isFirst:0===t&&0===r,rowId:`${c}-${t}`},e.id)))},t))),r]})};const kS=function({title:e,icon:t,children:n}){return(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)("div",{className:"block-editor-inserter__panel-header",children:[(0,$.jsx)("h2",{className:"block-editor-inserter__panel-title",children:e}),(0,$.jsx)(os.Icon,{icon:t})]}),(0,$.jsx)("div",{className:"block-editor-inserter__panel-content",children:n})]})},vS=(e,t,n)=>{const o=(0,a.useMemo)((()=>({[oe]:!n})),[n]),[r]=(0,c.useSelect)((t=>[t(li).getInserterItems(e,o)]),[e,o]),[i,s]=(0,c.useSelect)((e=>{const{getCategories:t,getCollections:n}=e(l.store);return[t(),n()]}),[]);return[r,i,s,(0,a.useCallback)((({name:e,initialAttributes:n,innerBlocks:o,syncStatus:r,content:i,rootClientId:s},a)=>{const c="unsynced"===r?(0,l.parse)(i,{__unstableSkipMigrationLogs:!0}):(0,l.createBlock)(e,n,(0,l.createBlocksFromInnerBlocksTemplate)(o));t(c,void 0,a,s)}),[t])]};const _S=function({children:e}){return(0,$.jsx)(os.Composite,{focusShift:!0,focusWrap:"horizontal",render:(0,$.jsx)($.Fragment,{}),children:e})};const xS=function(){return(0,$.jsxs)("div",{className:"block-editor-inserter__no-results",children:[(0,$.jsx)(hl,{className:"block-editor-inserter__no-results-icon",icon:$f}),(0,$.jsx)("p",{children:(0,C.__)("No results found.")})]})},yS=e=>e.name.split("/")[0],SS=6,wS=[];function CS({items:e,collections:t,categories:n,onSelectItem:o,onHover:r,showMostUsedBlocks:i,className:s}){const l=(0,a.useMemo)((()=>he(e,"frecency","desc").slice(0,SS)),[e]),c=(0,a.useMemo)((()=>e.filter((e=>!e.category))),[e]),d=(0,a.useMemo)((()=>{const n={...t};return Object.keys(t).forEach((t=>{n[t]=e.filter((e=>yS(e)===t)),0===n[t].length&&delete n[t]})),n}),[e,t]);(0,a.useEffect)((()=>()=>r(null)),[]);const p=(0,u.useAsyncList)(n),h=n.length===p.length,g=(0,a.useMemo)((()=>Object.entries(t)),[t]),m=(0,u.useAsyncList)(h?g:wS);return(0,$.jsxs)("div",{className:s,children:[i&&e.length>3&&!!l.length&&(0,$.jsx)(kS,{title:(0,C._x)("Most used","blocks"),children:(0,$.jsx)(bS,{items:l,onSelect:o,onHover:r,label:(0,C._x)("Most used","blocks")})}),p.map((t=>{const n=e.filter((e=>e.category===t.slug));return n&&n.length?(0,$.jsx)(kS,{title:t.title,icon:t.icon,children:(0,$.jsx)(bS,{items:n,onSelect:o,onHover:r,label:t.title})},t.slug):null})),h&&c.length>0&&(0,$.jsx)(kS,{className:"block-editor-inserter__uncategorized-blocks-panel",title:(0,C.__)("Uncategorized"),children:(0,$.jsx)(bS,{items:c,onSelect:o,onHover:r,label:(0,C.__)("Uncategorized")})}),m.map((([e,t])=>{const n=d[e];return n&&n.length?(0,$.jsx)(kS,{title:t.title,icon:t.icon,children:(0,$.jsx)(bS,{items:n,onSelect:o,onHover:r,label:t.title})},e):null}))]})}const BS=(0,a.forwardRef)((function({rootClientId:e,onInsert:t,onHover:n,showMostUsedBlocks:o},r){const[i,s,l,a]=vS(e,t);if(!i.length)return(0,$.jsx)(xS,{});const c=[],u=[];for(const t of i)"reusable"!==t.category&&(e&&t.rootClientId===e?c.push(t):u.push(t));return(0,$.jsx)(_S,{children:(0,$.jsxs)("div",{ref:r,children:[!!c.length&&(0,$.jsx)($.Fragment,{children:(0,$.jsx)(CS,{items:c,categories:s,collections:l,onSelectItem:a,onHover:n,showMostUsedBlocks:o,className:"block-editor-inserter__insertable-blocks-at-selection"})}),(0,$.jsx)(CS,{items:u,categories:s,collections:l,onSelectItem:a,onHover:n,showMostUsedBlocks:o,className:"block-editor-inserter__all-blocks"})]})})}));function IS({selectedCategory:e,patternCategories:t,onClickCategory:n}){const o="block-editor-block-patterns-explorer__sidebar";return(0,$.jsx)("div",{className:`${o}__categories-list`,children:t.map((({name:t,label:r})=>(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,label:r,className:`${o}__categories-list__item`,isPressed:e===t,onClick:()=>{n(t)},children:r},t)))})}function jS({searchValue:e,setSearchValue:t}){return(0,$.jsx)("div",{className:"block-editor-block-patterns-explorer__search",children:(0,$.jsx)(os.SearchControl,{__nextHasNoMarginBottom:!0,onChange:t,value:e,label:(0,C.__)("Search for patterns"),placeholder:(0,C.__)("Search")})})}const ES=function({selectedCategory:e,patternCategories:t,onClickCategory:n,searchValue:o,setSearchValue:r}){return(0,$.jsxs)("div",{className:"block-editor-block-patterns-explorer__sidebar",children:[(0,$.jsx)(jS,{searchValue:o,setSearchValue:r}),!o&&(0,$.jsx)(IS,{selectedCategory:e,patternCategories:t,onClickCategory:n})]})};function TS({currentPage:e,numPages:t,changePage:n,totalItems:o}){return(0,$.jsxs)(os.__experimentalVStack,{className:"block-editor-patterns__grid-pagination-wrapper",children:[(0,$.jsx)(os.__experimentalText,{variant:"muted",children:(0,C.sprintf)((0,C._n)("%s item","%s items",o),o)}),t>1&&(0,$.jsxs)(os.__experimentalHStack,{expanded:!1,spacing:3,justify:"flex-start",className:"block-editor-patterns__grid-pagination",children:[(0,$.jsxs)(os.__experimentalHStack,{expanded:!1,spacing:1,className:"block-editor-patterns__grid-pagination-previous",children:[(0,$.jsx)(os.Button,{__next40pxDefaultSize:!1,variant:"tertiary",onClick:()=>n(1),disabled:1===e,"aria-label":(0,C.__)("First page"),accessibleWhenDisabled:!0,children:(0,$.jsx)("span",{children:"«"})}),(0,$.jsx)(os.Button,{__next40pxDefaultSize:!1,variant:"tertiary",onClick:()=>n(e-1),disabled:1===e,"aria-label":(0,C.__)("Previous page"),accessibleWhenDisabled:!0,children:(0,$.jsx)("span",{children:"‹"})})]}),(0,$.jsx)(os.__experimentalText,{variant:"muted",children:(0,C.sprintf)((0,C._x)("%1$s of %2$s","paging"),e,t)}),(0,$.jsxs)(os.__experimentalHStack,{expanded:!1,spacing:1,className:"block-editor-patterns__grid-pagination-next",children:[(0,$.jsx)(os.Button,{__next40pxDefaultSize:!1,variant:"tertiary",onClick:()=>n(e+1),disabled:e===t,"aria-label":(0,C.__)("Next page"),accessibleWhenDisabled:!0,children:(0,$.jsx)("span",{children:"›"})}),(0,$.jsx)(os.Button,{variant:"tertiary",onClick:()=>n(t),disabled:e===t,"aria-label":(0,C.__)("Last page"),size:"default",accessibleWhenDisabled:!0,children:(0,$.jsx)("span",{children:"»"})})]})]})]})}const MS=({showTooltip:e,title:t,children:n})=>e?(0,$.jsx)(os.Tooltip,{text:t,children:n}):(0,$.jsx)($.Fragment,{children:n});function PS({id:e,isDraggable:t,pattern:n,onClick:o,onHover:r,showTitle:i=!0,showTooltip:s,category:c}){const[d,p]=(0,a.useState)(!1),{blocks:h,viewportWidth:g}=n,m=`block-editor-block-patterns-list__item-description-${(0,u.useInstanceId)(PS)}`,f=(0,a.useMemo)((()=>c&&t?(null!=h?h:[]).map((e=>{const t=(0,l.cloneBlock)(e);return t.attributes.metadata?.categories?.includes(c)&&(t.attributes.metadata.categories=[c]),t})):h),[h,t,c]);return(0,$.jsx)(pS,{isEnabled:t,blocks:f,pattern:n,children:({draggable:t,onDragStart:l,onDragEnd:a})=>(0,$.jsx)("div",{className:"block-editor-block-patterns-list__list-item",draggable:t,onDragStart:e=>{p(!0),l&&(r?.(null),l(e))},onDragEnd:e=>{p(!1),a&&a(e)},children:(0,$.jsx)(MS,{showTooltip:s&&!n.type!==ge.user,title:n.title,children:(0,$.jsxs)(os.Composite.Item,{render:(0,$.jsx)("div",{role:"option","aria-label":n.title,"aria-describedby":n.description?m:void 0,className:Zi("block-editor-block-patterns-list__item",{"block-editor-block-patterns-list__list-item-synced":n.type===ge.user&&!n.syncStatus})}),id:e,onClick:()=>{o(n,h),r?.(null)},onMouseEnter:()=>{d||r?.(n)},onMouseLeave:()=>r?.(null),children:[(0,$.jsx)(sS,{blocks:h,viewportWidth:g}),i&&(0,$.jsxs)(os.__experimentalHStack,{className:"block-editor-patterns__pattern-details",spacing:2,children:[n.type===ge.user&&!n.syncStatus&&(0,$.jsx)("div",{className:"block-editor-patterns__pattern-icon-wrapper",children:(0,$.jsx)(hl,{className:"block-editor-patterns__pattern-icon",icon:U})}),(!s||n.type===ge.user)&&(0,$.jsx)("div",{className:"block-editor-block-patterns-list__item-title",children:n.title})]}),!!n.description&&(0,$.jsx)(os.VisuallyHidden,{id:m,children:n.description})]})})})})}function RS(){return(0,$.jsx)("div",{className:"block-editor-block-patterns-list__item is-placeholder"})}const NS=(0,a.forwardRef)((function({isDraggable:e,blockPatterns:t,shownPatterns:n,onHover:o,onClickPattern:r,orientation:i,label:s=(0,C.__)("Block patterns"),category:l,showTitle:c=!0,showTitlesAsTooltip:u,pagingProps:d},p){const[h,g]=(0,a.useState)(void 0);return(0,a.useEffect)((()=>{const e=t.find((e=>n.includes(e)))?.name;g(e)}),[n,t]),(0,$.jsxs)(os.Composite,{orientation:i,activeId:h,setActiveId:g,role:"listbox",className:"block-editor-block-patterns-list","aria-label":s,ref:p,children:[t.map((t=>n.includes(t)?(0,$.jsx)(PS,{id:t.name,pattern:t,onClick:r,onHover:o,isDraggable:e,showTitle:c,showTooltip:u,category:l},t.name):(0,$.jsx)(RS,{},t.name))),d&&(0,$.jsx)(TS,{...d})]})}));function LS({destinationRootClientId:e,destinationIndex:t,rootClientId:n,registry:o}){if(n===e)return t;const r=["",...o.select(li).getBlockParents(e),e],i=r.indexOf(n);return-1!==i?o.select(li).getBlockIndex(r[i+1])+1:o.select(li).getBlockOrder(n).length}const AS=function({rootClientId:e="",insertionIndex:t,clientId:n,isAppender:o,onSelect:r,shouldFocusBlock:i=!0,selectBlockOnInsert:s=!0}){const u=(0,c.useRegistry)(),{getSelectedBlock:d}=(0,c.useSelect)(li),{destinationRootClientId:p,destinationIndex:h}=(0,c.useSelect)((r=>{const{getSelectedBlockClientId:i,getBlockRootClientId:s,getBlockIndex:l,getBlockOrder:a,getSectionRootClientId:c,__unstableGetEditorMode:u}=te(r(li)),d=i();let p,h=e;if(void 0!==t)p=t;else if(n)p=l(n);else if(!o&&d){const e=c();"zoom-out"===u()&&e===d?(h=e,p=a(h).length):(h=s(d),p=l(d)+1)}else p=a(h).length;return{destinationRootClientId:h,destinationIndex:p}}),[e,t,n,o]),{replaceBlocks:g,insertBlocks:m,showInsertionPoint:f,hideInsertionPoint:b,setLastFocus:k}=te((0,c.useDispatch)(li)),v=(0,a.useCallback)(((e,t,n=!1,a)=>{(n||i||s)&&k(null);const c=d();!o&&c&&(0,l.isUnmodifiedDefaultBlock)(c)?g(c.clientId,e,null,i||n?0:null,t):m(e,o||void 0===a?h:LS({destinationRootClientId:p,destinationIndex:h,rootClientId:a,registry:u}),o||void 0===a?p:a,s,i||n?0:null,t);const f=Array.isArray(e)?e.length:1,b=(0,C.sprintf)((0,C._n)("%d block added.","%d blocks added.",f),f);(0,$o.speak)(b),r&&r(e)}),[o,d,g,m,p,h,r,i,s]),_=(0,a.useCallback)((e=>{e?.hasOwnProperty("rootClientId")?f(e.rootClientId,LS({destinationRootClientId:p,destinationIndex:h,rootClientId:e.rootClientId,registry:u})):b()}),[f,b,p,h]);return[p,v,_]},DS=(e,t,n)=>{const{patternCategories:o,patterns:r,userPatternCategories:i}=(0,c.useSelect)((e=>{const{__experimentalGetAllowedPatterns:n,getSettings:o}=e(li),{__experimentalUserPatternCategories:r,__experimentalBlockPatternCategories:i}=o();return{patterns:n(t),userPatternCategories:r,patternCategories:i}}),[t]),s=(0,a.useMemo)((()=>{const e=[...o];return i?.forEach((t=>{e.find((e=>e.name===t.name))||e.push(t)})),e}),[o,i]),{createSuccessNotice:u}=(0,c.useDispatch)(Uo.store),d=(0,a.useCallback)(((t,o)=>{const r=t.type===ge.user&&"unsynced"!==t.syncStatus?[(0,l.createBlock)("core/block",{ref:t.id})]:o;e((null!=r?r:[]).map((e=>{const t=(0,l.cloneBlock)(e);return t.attributes.metadata?.categories?.includes(n)&&(t.attributes.metadata.categories=[n]),t})),t.name),u((0,C.sprintf)((0,C.__)('Block pattern "%s" inserted.'),t.title),{type:"snackbar",id:"block-pattern-inserted-notice"})}),[u,e,n]);return[r,s,d]};var OS=n(9681),zS=n.n(OS);function VS(e){return e.toLowerCase()}var FS=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],HS=/[^A-Z0-9]+/gi;function GS(e,t,n){return t instanceof RegExp?e.replace(t,n):t.reduce((function(e,t){return e.replace(t,n)}),e)}const $S=e=>e.name||"",US=e=>e.title,WS=e=>e.description||"",KS=e=>e.keywords||[],ZS=e=>e.category,qS=()=>null,YS=[/([\p{Ll}\p{Lo}\p{N}])([\p{Lu}\p{Lt}])/gu,/([\p{Lu}\p{Lt}])([\p{Lu}\p{Lt}][\p{Ll}\p{Lo}])/gu],XS=/(\p{C}|\p{P}|\p{S})+/giu,QS=new Map,JS=new Map;function ew(e=""){if(QS.has(e))return QS.get(e);const t=function(e,t){void 0===t&&(t={});for(var n=t.splitRegexp,o=void 0===n?FS:n,r=t.stripRegexp,i=void 0===r?HS:r,s=t.transform,l=void 0===s?VS:s,a=t.delimiter,c=void 0===a?" ":a,u=GS(GS(e,o,"$1\0$2"),i,"\0"),d=0,p=u.length;"\0"===u.charAt(d);)d++;for(;"\0"===u.charAt(p-1);)p--;return u.slice(d,p).split("\0").map(l).join(c)}(e,{splitRegexp:YS,stripRegexp:XS}).split(" ").filter(Boolean);return QS.set(e,t),t}function tw(e=""){if(JS.has(e))return JS.get(e);let t=zS()(e);return t=t.replace(/^\//,""),t=t.toLowerCase(),JS.set(e,t),t}const nw=(e="")=>ew(tw(e)),ow=(e,t,n,o)=>{if(0===nw(o).length)return e;return rw(e,o,{getCategory:e=>t.find((({slug:t})=>t===e.category))?.title,getCollection:e=>n[e.name.split("/")[0]]?.title})},rw=(e=[],t="",n={})=>{if(0===nw(t).length)return e;const o=e.map((e=>[e,iw(e,t,n)])).filter((([,e])=>e>0));return o.sort((([,e],[,t])=>t-e)),o.map((([e])=>e))};function iw(e,t,n={}){const{getName:o=$S,getTitle:r=US,getDescription:i=WS,getKeywords:s=KS,getCategory:l=ZS,getCollection:a=qS}=n,c=o(e),u=r(e),d=i(e),p=s(e),h=l(e),g=a(e),m=tw(t),f=tw(u);let b=0;if(m===f)b+=30;else if(f.startsWith(m))b+=20;else{const e=[c,u,d,...p,h,g].join(" ");0===((e,t)=>e.filter((e=>!nw(t).some((t=>t.includes(e))))))(ew(m),e).length&&(b+=10)}if(0!==b&&c.startsWith("core/")){b+=c!==e.id?1:2}return b}const sw=20,lw=5;function aw(e,t,n,o=""){const[r,i]=(0,a.useState)(1),s=(0,u.usePrevious)(t),l=(0,u.usePrevious)(o);s===t&&l===o||1===r||i(1);const c=e.length,d=r-1,p=(0,a.useMemo)((()=>e.slice(d*sw,d*sw+sw)),[d,e]),h=(0,u.useAsyncList)(p,{step:lw}),g=Math.ceil(e.length/sw);return(0,a.useEffect)((function(){const e=(0,ba.getScrollContainer)(n?.current);e?.scrollTo(0,0)}),[t,n]),{totalItems:c,categoryPatterns:p,categoryPatternsAsyncList:h,numPages:g,changePage:e=>{const t=(0,ba.getScrollContainer)(n?.current);t?.scrollTo(0,0),i(e)},currentPage:r}}function cw({filterValue:e,filteredBlockPatternsLength:t}){return e?(0,$.jsx)(os.__experimentalHeading,{level:2,lineHeight:"48px",className:"block-editor-block-patterns-explorer__search-results-count",children:(0,C.sprintf)((0,C._n)("%d pattern found","%d patterns found",t),t)}):null}const uw=function({searchValue:e,selectedCategory:t,patternCategories:n,rootClientId:o}){const r=(0,a.useRef)(),i=(0,u.useDebounce)($o.speak,500),[s,l]=AS({rootClientId:o,shouldFocusBlock:!0}),[c,,d]=DS(l,s,t),p=(0,a.useMemo)((()=>n.map((e=>e.name))),[n]),h=(0,a.useMemo)((()=>{const n=c.filter((e=>{if(t===fe.name)return!0;if(t===be.name&&e.type===ge.user)return!0;if("uncategorized"===t){const t=e.categories.some((e=>p.includes(e)));return!e.categories?.length||!t}return e.categories?.includes(t)}));return e?rw(n,e):n}),[e,c,t,p]);(0,a.useEffect)((()=>{if(!e)return;const t=h.length,n=(0,C.sprintf)((0,C._n)("%d result found.","%d results found.",t),t);i(n)}),[e,i,h.length]);const g=aw(h,t,r),[m,f]=(0,a.useState)(e);e!==m&&(f(e),g.changePage(1));const b=!!h?.length;return(0,$.jsxs)("div",{className:"block-editor-block-patterns-explorer__list",ref:r,children:[(0,$.jsx)(cw,{filterValue:e,filteredBlockPatternsLength:h.length}),(0,$.jsx)(_S,{children:b&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(NS,{shownPatterns:g.categoryPatternsAsyncList,blockPatterns:g.categoryPatterns,onClickPattern:d,isDraggable:!1}),(0,$.jsx)(TS,{...g})]})})]})};function dw(e,t="all"){const[n,o]=DS(void 0,e),r=(0,a.useMemo)((()=>"all"===t?n:n.filter((e=>!ke(e,t)))),[t,n]),i=(0,a.useMemo)((()=>{const e=o.filter((e=>r.some((t=>t.categories?.includes(e.name))))).sort(((e,t)=>e.label.localeCompare(t.label)));return r.some((e=>!function(e,t){return!(!e.categories||!e.categories.length)&&e.categories.some((e=>t.some((t=>t.name===e))))}(e,o)))&&!e.find((e=>"uncategorized"===e.name))&&e.push({name:"uncategorized",label:(0,C._x)("Uncategorized")}),r.some((e=>e.type===ge.user))&&e.unshift(be),r.length>0&&e.unshift({name:fe.name,label:fe.label}),(0,$o.speak)((0,C.sprintf)((0,C._n)("%d category button displayed.","%d category buttons displayed.",e.length),e.length)),e}),[o,r]);return i}function pw({initialCategory:e,rootClientId:t}){const[n,o]=(0,a.useState)(""),[r,i]=(0,a.useState)(e?.name),s=dw(t);return(0,$.jsxs)("div",{className:"block-editor-block-patterns-explorer",children:[(0,$.jsx)(ES,{selectedCategory:r,patternCategories:s,onClickCategory:i,searchValue:n,setSearchValue:o}),(0,$.jsx)(uw,{searchValue:n,selectedCategory:r,patternCategories:s,rootClientId:t})]})}const hw=function({onModalClose:e,...t}){return(0,$.jsx)(os.Modal,{title:(0,C.__)("Patterns"),onRequestClose:e,isFullScreen:!0,children:(0,$.jsx)(pw,{...t})})};function gw({title:e}){return(0,$.jsx)(os.__experimentalVStack,{spacing:0,children:(0,$.jsx)(os.__experimentalView,{children:(0,$.jsx)(os.__experimentalSpacer,{marginBottom:0,paddingX:4,paddingY:3,children:(0,$.jsxs)(os.__experimentalHStack,{spacing:2,children:[(0,$.jsx)(os.__experimentalNavigatorBackButton,{style:{minWidth:24,padding:0},icon:(0,C.isRTL)()?Hf:Gf,size:"small",label:(0,C.__)("Back")}),(0,$.jsx)(os.__experimentalSpacer,{children:(0,$.jsx)(os.__experimentalHeading,{level:5,children:e})})]})})})})}function mw({categories:e,children:t}){return(0,$.jsxs)(os.__experimentalNavigatorProvider,{initialPath:"/",className:"block-editor-inserter__mobile-tab-navigation",children:[(0,$.jsx)(os.__experimentalNavigatorScreen,{path:"/",children:(0,$.jsx)(os.__experimentalItemGroup,{children:e.map((e=>(0,$.jsx)(os.__experimentalNavigatorButton,{path:`/category/${e.name}`,as:os.__experimentalItem,isAction:!0,children:(0,$.jsxs)(os.__experimentalHStack,{children:[(0,$.jsx)(os.FlexBlock,{children:e.label}),(0,$.jsx)(hl,{icon:(0,C.isRTL)()?Gf:Hf})]})},e.name)))})}),e.map((e=>(0,$.jsxs)(os.__experimentalNavigatorScreen,{path:`/category/${e.name}`,children:[(0,$.jsx)(gw,{title:(0,C.__)("Back")}),t(e)]},e.name)))]})}const fw=e=>"all"!==e&&"user"!==e,bw=e=>e.name===be.name,kw=[{value:"all",label:(0,C._x)("All","patterns")},{value:ge.directory,label:(0,C.__)("Pattern Directory")},{value:ge.theme,label:(0,C.__)("Theme & Plugins")},{value:ge.user,label:(0,C.__)("User")}];function vw({setPatternSyncFilter:e,setPatternSourceFilter:t,patternSyncFilter:n,patternSourceFilter:o,scrollContainerRef:r,category:i}){const s=i.name===be.name?ge.user:o,l=fw(s),c=bw(i),u=(0,a.useMemo)((()=>[{value:"all",label:(0,C._x)("All","patterns")},{value:me.full,label:(0,C._x)("Synced","patterns"),disabled:l},{value:me.unsynced,label:(0,C._x)("Not synced","patterns"),disabled:l}]),[l]);return(0,$.jsx)($.Fragment,{children:(0,$.jsx)(os.DropdownMenu,{popoverProps:{placement:"right-end"},label:(0,C.__)("Filter patterns"),toggleProps:{size:"compact"},icon:(0,$.jsx)(hl,{icon:(0,$.jsx)(os.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,$.jsx)(os.Path,{d:"M10 17.5H14V16H10V17.5ZM6 6V7.5H18V6H6ZM8 12.5H16V11H8V12.5Z",fill:"currentColor"})})}),children:()=>(0,$.jsxs)($.Fragment,{children:[!c&&(0,$.jsx)(os.MenuGroup,{label:(0,C.__)("Source"),children:(0,$.jsx)(os.MenuItemsChoice,{choices:kw,onSelect:n=>{var o;t(o=n),fw(o)&&e("all"),r.current?.scrollTo(0,0)},value:s})}),(0,$.jsx)(os.MenuGroup,{label:(0,C.__)("Type"),children:(0,$.jsx)(os.MenuItemsChoice,{choices:u,onSelect:t=>{e(t),r.current?.scrollTo(0,0)},value:n})}),(0,$.jsx)("div",{className:"block-editor-tool-selector__help",children:(0,a.createInterpolateElement)((0,C.__)("Patterns are available from the <Link>WordPress.org Pattern Directory</Link>, bundled in the active theme, or created by users on this site. Only patterns created on this site can be synced."),{Link:(0,$.jsx)(os.ExternalLink,{href:(0,C.__)("https://wordpress.org/patterns/")})})})]})})})}const _w=()=>{};function xw({rootClientId:e,onInsert:t,onHover:n=_w,category:o,showTitlesAsTooltip:r}){const i=(0,c.useSelect)((e=>"zoom-out"===e(li).__unstableGetEditorMode()),[]),[s,,l]=DS(t,e,o?.name),[u,d]=(0,a.useState)("all"),[p,h]=(0,a.useState)("all"),g=dw(e,p),m=(0,a.useRef)(),f=(0,a.useMemo)((()=>s.filter((e=>!ke(e,p,u)&&(o.name===fe.name||(o.name===be.name&&e.type===ge.user||("uncategorized"===o.name?!e.categories||!e.categories.some((e=>g.some((t=>t.name===e)))):e.categories?.includes(o.name))))))),[s,g,o.name,p,u]),b=aw(f,o,m),{changePage:k}=b;(0,a.useEffect)((()=>()=>n(null)),[]);const v=(0,a.useCallback)((e=>{d(e),k(1)}),[d,k]),_=(0,a.useCallback)((e=>{h(e),k(1)}),[h,k]);return(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(os.__experimentalVStack,{spacing:2,className:"block-editor-inserter__patterns-category-panel-header",children:[(0,$.jsxs)(os.__experimentalHStack,{children:[(0,$.jsx)(os.FlexBlock,{children:(0,$.jsx)(os.__experimentalHeading,{className:"block-editor-inserter__patterns-category-panel-title",size:13,level:4,as:"div",children:o.label})}),(0,$.jsx)(vw,{patternSyncFilter:u,patternSourceFilter:p,setPatternSyncFilter:v,setPatternSourceFilter:_,scrollContainerRef:m,category:o})]}),!f.length&&(0,$.jsx)(os.__experimentalText,{variant:"muted",className:"block-editor-inserter__patterns-category-no-results",children:(0,C.__)("No results found")})]}),f.length>0&&(0,$.jsxs)($.Fragment,{children:[i&&(0,$.jsx)(os.__experimentalText,{size:"12",as:"p",className:"block-editor-inserter__help-text",children:(0,C.__)("Drag and drop patterns into the canvas.")}),(0,$.jsx)(NS,{ref:m,shownPatterns:b.categoryPatternsAsyncList,blockPatterns:b.categoryPatterns,onClickPattern:l,onHover:n,label:o.label,orientation:"vertical",category:o.name,isDraggable:!0,showTitlesAsTooltip:r,patternFilter:p,pagingProps:b})]})]})}const{Tabs:yw}=te(os.privateApis);const Sw=function({categories:e,selectedCategory:t,onSelectCategory:n,children:o}){const r={type:"tween",duration:(0,u.useReducedMotion)()?0:.25,ease:[.6,0,.4,1]},i=(0,u.usePrevious)(t);return(0,$.jsxs)(yw,{className:"block-editor-inserter__category-tabs",selectOnMove:!1,selectedTabId:t?t.name:null,orientation:"vertical",onSelect:t=>{n(e.find((e=>e.name===t)))},children:[(0,$.jsx)(yw.TabList,{className:"block-editor-inserter__category-tablist",children:e.map((e=>(0,$.jsx)(yw.Tab,{tabId:e.name,className:"block-editor-inserter__category-tab","aria-label":e.label,"aria-current":e===t?"true":void 0,children:(0,$.jsxs)(os.__experimentalHStack,{children:[(0,$.jsx)(os.FlexBlock,{children:e.label}),(0,$.jsx)(hl,{icon:(0,C.isRTL)()?Gf:Hf})]})},e.name)))}),e.map((e=>(0,$.jsx)(yw.TabPanel,{tabId:e.name,focusable:!1,children:(0,$.jsx)(os.__unstableMotion.div,{className:"block-editor-inserter__category-panel",initial:i?"open":"closed",animate:"open",variants:{open:{transform:"translateX( 0 )",transitionEnd:{zIndex:"1"}},closed:{transform:"translateX( -100% )",zIndex:"-1"}},transition:r,children:o})},e.name)))]})};const ww=function({onSelectCategory:e,selectedCategory:t,onInsert:n,rootClientId:o,setHasCategories:r,children:i}){const[s,l]=(0,a.useState)(!1),d=dw(o),p=(0,u.useViewportMatch)("medium","<"),h=(0,c.useSelect)((e=>te(e(li)).isResolvingPatterns()),[]);return(0,a.useEffect)((()=>{r(!!d.length)}),[d,r]),h?(0,$.jsx)("div",{className:"block-editor-inserter__patterns-loading",children:(0,$.jsx)(os.Spinner,{})}):d.length?(0,$.jsxs)($.Fragment,{children:[!p&&(0,$.jsxs)("div",{className:"block-editor-inserter__block-patterns-tabs-container",children:[(0,$.jsx)(Sw,{categories:d,selectedCategory:t,onSelectCategory:e,children:i}),(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,className:"block-editor-inserter__patterns-explore-button",onClick:()=>l(!0),variant:"secondary",children:(0,C.__)("Explore all patterns")})]}),p&&(0,$.jsx)(mw,{categories:d,children:e=>(0,$.jsx)("div",{className:"block-editor-inserter__category-panel",children:(0,$.jsx)(xw,{onInsert:n,rootClientId:o,category:e,showTitlesAsTooltip:!1},e.name)})}),s&&(0,$.jsx)(hw,{initialCategory:t||d[0],patternCategories:d,onModalClose:()=>l(!1),rootClientId:o})]}):(0,$.jsx)(xS,{})},Cw=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"})}),Bw={image:"img",video:"video",audio:"audio"};function Iw(e,t){const n={id:e.id||void 0,caption:e.caption||void 0},o=e.url,r=e.alt||void 0;"image"===t?(n.url=o,n.alt=r):["video","audio"].includes(t)&&(n.src=o);const i=Bw[t],s=(0,$.jsx)(i,{src:e.previewUrl||o,alt:r,controls:"audio"===t||void 0,inert:"true",onError:({currentTarget:t})=>{t.src===e.previewUrl&&(t.src=o)}});return[(0,l.createBlock)(`core/${t}`,n),s]}const jw=["image"],Ew=25,Tw={position:"bottom left",className:"block-editor-inserter__media-list__item-preview-options__popover"};function Mw({category:e,media:t}){if(!e.getReportUrl)return null;const n=e.getReportUrl(t);return(0,$.jsx)(os.DropdownMenu,{className:"block-editor-inserter__media-list__item-preview-options",label:(0,C.__)("Options"),popoverProps:Tw,icon:lb,children:()=>(0,$.jsx)(os.MenuGroup,{children:(0,$.jsx)(os.MenuItem,{onClick:()=>window.open(n,"_blank").focus(),icon:Cw,children:(0,C.sprintf)((0,C.__)("Report %s"),e.mediaType)})})})}function Pw({onClose:e,onSubmit:t}){return(0,$.jsxs)(os.Modal,{title:(0,C.__)("Insert external image"),onRequestClose:e,className:"block-editor-inserter-media-tab-media-preview-inserter-external-image-modal",children:[(0,$.jsxs)(os.__experimentalVStack,{spacing:3,children:[(0,$.jsx)("p",{children:(0,C.__)("This image cannot be uploaded to your Media Library, but it can still be inserted as an external image.")}),(0,$.jsx)("p",{children:(0,C.__)("External images can be removed by the external provider without warning and could even have legal compliance issues related to privacy legislation.")})]}),(0,$.jsxs)(os.Flex,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1,children:[(0,$.jsx)(os.FlexItem,{children:(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:e,children:(0,C.__)("Cancel")})}),(0,$.jsx)(os.FlexItem,{children:(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:t,children:(0,C.__)("Insert")})})]})]})}function Rw({media:e,onClick:t,category:n}){const[o,r]=(0,a.useState)(!1),[i,s]=(0,a.useState)(!1),[u,d]=(0,a.useState)(!1),[p,h]=(0,a.useMemo)((()=>Iw(e,n.mediaType)),[e,n.mediaType]),{createErrorNotice:g,createSuccessNotice:m}=(0,c.useDispatch)(Uo.store),{getSettings:f}=(0,c.useSelect)(li),b=(0,a.useCallback)((e=>{if(u)return;const n=f(),o=(0,l.cloneBlock)(e),{id:i,url:s,caption:a}=o.attributes;i||n.mediaUpload?i?t(o):(d(!0),window.fetch(s).then((e=>e.blob())).then((e=>{n.mediaUpload({filesList:[e],additionalData:{caption:a},onFileChange([e]){(0,ka.isBlobURL)(e.url)||(t({...o,attributes:{...o.attributes,id:e.id,url:e.url}}),m((0,C.__)("Image uploaded and inserted."),{type:"snackbar"}),d(!1))},allowedTypes:jw,onError(e){g(e,{type:"snackbar"}),d(!1)}})})).catch((()=>{r(!0),d(!1)}))):r(!0)}),[u,f,t,m,g]),k="string"==typeof e.title?e.title:e.title?.rendered||(0,C.__)("no title");let v;if(k.length>Ew){const e="...";v=k.slice(0,Ew-e.length)+e}const _=(0,a.useCallback)((()=>s(!0)),[]),x=(0,a.useCallback)((()=>s(!1)),[]);return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(pS,{isEnabled:!0,blocks:[p],children:({draggable:t,onDragStart:o,onDragEnd:r})=>(0,$.jsx)("div",{className:Zi("block-editor-inserter__media-list__list-item",{"is-hovered":i}),draggable:t,onDragStart:o,onDragEnd:r,children:(0,$.jsxs)("div",{onMouseEnter:_,onMouseLeave:x,children:[(0,$.jsx)(os.Tooltip,{text:v||k,children:(0,$.jsx)(os.Composite.Item,{render:(0,$.jsx)("div",{"aria-label":k,role:"option",className:"block-editor-inserter__media-list__item"}),onClick:()=>b(p),children:(0,$.jsxs)("div",{className:"block-editor-inserter__media-list__item-preview",children:[h,u&&(0,$.jsx)("div",{className:"block-editor-inserter__media-list__item-preview-spinner",children:(0,$.jsx)(os.Spinner,{})})]})})}),!u&&(0,$.jsx)(Mw,{category:n,media:e})]})})}),o&&(0,$.jsx)(Pw,{onClose:()=>r(!1),onSubmit:()=>{t((0,l.cloneBlock)(p)),m((0,C.__)("Image inserted."),{type:"snackbar"}),r(!1)}})]})}const Nw=function({mediaList:e,category:t,onClick:n,label:o=(0,C.__)("Media List")}){return(0,$.jsx)(os.Composite,{role:"listbox",className:"block-editor-inserter__media-list","aria-label":o,children:e.map(((e,o)=>(0,$.jsx)(Rw,{media:e,category:t,onClick:n},e.id||e.sourceId||o)))})};const Lw=10;function Aw({rootClientId:e,onInsert:t,category:n}){const[o,r,i]=(0,u.useDebouncedInput)(),{mediaList:s,isLoading:l}=function(e,t={}){const[n,o]=(0,a.useState)(),[r,i]=(0,a.useState)(!1),s=(0,a.useRef)();return(0,a.useEffect)((()=>{(async()=>{const n=JSON.stringify({category:e.name,...t});s.current=n,i(!0),o([]);const r=await(e.fetch?.(t));n===s.current&&(o(r),i(!1))})()}),[e.name,...Object.values(t)]),{mediaList:n,isLoading:r}}(n,{per_page:i?20:Lw,search:i}),c="block-editor-inserter__media-panel",d=n.labels.search_items||(0,C.__)("Search");return(0,$.jsxs)("div",{className:c,children:[(0,$.jsx)(os.SearchControl,{__nextHasNoMarginBottom:!0,className:`${c}-search`,onChange:r,value:o,label:d,placeholder:d}),l&&(0,$.jsx)("div",{className:`${c}-spinner`,children:(0,$.jsx)(os.Spinner,{})}),!l&&!s?.length&&(0,$.jsx)(xS,{}),!l&&!!s?.length&&(0,$.jsx)(Nw,{rootClientId:e,onClick:t,mediaList:s,category:n})]})}const Dw=["image","video","audio"];const Ow=function({rootClientId:e,selectedCategory:t,onSelectCategory:n,setHasCategories:o,onInsert:r,children:i}){const s=function(e){const[t,n]=(0,a.useState)([]),o=(0,c.useSelect)((e=>te(e(li)).getInserterMediaCategories()),[]),{canInsertImage:r,canInsertVideo:i,canInsertAudio:s}=(0,c.useSelect)((t=>{const{canInsertBlockType:n}=t(li);return{canInsertImage:n("core/image",e),canInsertVideo:n("core/video",e),canInsertAudio:n("core/audio",e)}}),[e]);return(0,a.useEffect)((()=>{(async()=>{const e=[];if(!o)return;const t=new Map(await Promise.all(o.map((async e=>{if(e.isExternalResource)return[e.name,!0];let t=[];try{t=await e.fetch({per_page:1})}catch(e){}return[e.name,!!t.length]})))),l={image:r,video:i,audio:s};o.forEach((n=>{l[n.mediaType]&&t.get(n.name)&&e.push(n)})),e.length&&n(e)})()}),[r,i,s,o]),t}(e),l=(0,u.useViewportMatch)("medium","<"),d=(0,a.useCallback)((e=>{if(!e?.url)return;const[t]=Iw(e,e.type);r(t)}),[r]),p=(0,a.useMemo)((()=>s.map((e=>({...e,label:e.labels.name})))),[s]);return(0,a.useEffect)((()=>{o(!!p.length)}),[p,o]),p.length?(0,$.jsxs)($.Fragment,{children:[!l&&(0,$.jsxs)("div",{className:"block-editor-inserter__media-tabs-container",children:[(0,$.jsx)(Sw,{categories:p,selectedCategory:t,onSelectCategory:n,children:i}),(0,$.jsx)(wa,{children:(0,$.jsx)(Sa,{multiple:!1,onSelect:d,allowedTypes:Dw,render:({open:e})=>(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,onClick:t=>{t.target.focus(),e()},className:"block-editor-inserter__media-library-button",variant:"secondary","data-unstable-ignore-focus-outside-for-relatedtarget":".media-modal",children:(0,C.__)("Open Media Library")})})})]}),l&&(0,$.jsx)(mw,{categories:p,children:t=>(0,$.jsx)(Aw,{onInsert:r,rootClientId:e,category:t})})]}):(0,$.jsx)(xS,{})},{Fill:zw,Slot:Vw}=(0,os.createSlotFill)("__unstableInserterMenuExtension");zw.Slot=Vw;const Fw=zw,Hw=(e,t)=>t?(e.sort((({id:e},{id:n})=>{let o=t.indexOf(e),r=t.indexOf(n);return o<0&&(o=t.length),r<0&&(r=t.length),o-r})),e):e,Gw=[];const $w=function({filterValue:e,onSelect:t,onHover:n,onHoverPattern:o,rootClientId:r,clientId:i,isAppender:s,__experimentalInsertionIndex:l,maxBlockPatterns:d,maxBlockTypes:p,showBlockDirectory:h=!1,isDraggable:g=!0,shouldFocusBlock:m=!0,prioritizePatterns:f,selectBlockOnInsert:b,isQuick:k}){const v=(0,u.useDebounce)($o.speak,500),{prioritizedBlocks:_}=(0,c.useSelect)((e=>{const t=e(li).getBlockListSettings(r);return{prioritizedBlocks:t?.prioritizedInserterBlocks||Gw}}),[r]),[x,y]=AS({onSelect:t,rootClientId:r,clientId:i,isAppender:s,insertionIndex:l,shouldFocusBlock:m,selectBlockOnInsert:b}),[S,w,B,I]=vS(x,y,k),[j,,E]=DS(y,x),T=(0,a.useMemo)((()=>{if(0===d)return[];const t=rw(j,e);return void 0!==d?t.slice(0,d):t}),[e,j,d]);let M=p;f&&T.length>2&&(M=0);const P=(0,a.useMemo)((()=>{if(0===M)return[];let t=he(S.filter((e=>"core/block"!==e.name)),"frecency","desc");!e&&_.length&&(t=Hw(t,_));const n=ow(t,w,B,e);return void 0!==M?n.slice(0,M):n}),[e,S,w,B,M,_]);(0,a.useEffect)((()=>{if(!e)return;const t=P.length+T.length,n=(0,C.sprintf)((0,C._n)("%d result found.","%d results found.",t),t);v(n)}),[e,v,P,T]);const R=(0,u.useAsyncList)(P,{step:9}),N=(0,u.useAsyncList)(R.length===P.length?T:Gw),L=P.length>0||T.length>0,A=!!P.length&&(0,$.jsx)(kS,{title:(0,$.jsx)(os.VisuallyHidden,{children:(0,C.__)("Blocks")}),children:(0,$.jsx)(bS,{items:R,onSelect:I,onHover:n,label:(0,C.__)("Blocks"),isDraggable:g})}),D=!!T.length&&(0,$.jsx)(kS,{title:(0,$.jsx)(os.VisuallyHidden,{children:(0,C.__)("Block patterns")}),children:(0,$.jsx)("div",{className:"block-editor-inserter__quick-inserter-patterns",children:(0,$.jsx)(NS,{shownPatterns:N,blockPatterns:T,onClickPattern:E,onHover:o,isDraggable:g})})});return(0,$.jsxs)(_S,{children:[!h&&!L&&(0,$.jsx)(xS,{}),f?D:A,!!P.length&&!!T.length&&(0,$.jsx)("div",{className:"block-editor-inserter__quick-inserter-separator"}),f?A:D,h&&(0,$.jsx)(Fw.Slot,{fillProps:{onSelect:I,onHover:n,filterValue:e,hasItems:L,rootClientId:x},children:e=>e.length?e:L?null:(0,$.jsx)(xS,{})})]})},Uw=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.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"})}),{Tabs:Ww}=te(os.privateApis);const Kw=(0,a.forwardRef)((function({defaultTabId:e,onClose:t,onSelect:n,selectedTab:o,tabs:r,closeButtonLabel:i},s){return(0,$.jsx)("div",{className:"block-editor-tabbed-sidebar",children:(0,$.jsxs)(Ww,{selectOnMove:!1,defaultTabId:e,onSelect:n,selectedTabId:o,children:[(0,$.jsxs)("div",{className:"block-editor-tabbed-sidebar__tablist-and-close-button",children:[(0,$.jsx)(os.Button,{className:"block-editor-tabbed-sidebar__close-button",icon:Uw,label:i,onClick:()=>t(),size:"small"}),(0,$.jsx)(Ww.TabList,{className:"block-editor-tabbed-sidebar__tablist",ref:s,children:r.map((e=>(0,$.jsx)(Ww.Tab,{tabId:e.name,className:"block-editor-tabbed-sidebar__tab",children:e.title},e.name)))})]}),r.map((e=>(0,$.jsx)(Ww.TabPanel,{tabId:e.name,focusable:!1,className:"block-editor-tabbed-sidebar__tabpanel",ref:e.panelRef,children:e.panel},e.name)))]})})}));function Zw(e=!0){const{__unstableSetEditorMode:t,setZoomLevel:n}=te((0,c.useDispatch)(li)),{__unstableGetEditorMode:o}=te((0,c.useSelect)(li)),r=(0,a.useRef)(null),i=o();(0,a.useEffect)((()=>(r.current||(r.current=i),()=>{"zoom-out"===o()&&o()!==r.current&&(t(r.current),n(100))})),[]),(0,a.useEffect)((()=>{e&&"zoom-out"!==i?(t("zoom-out"),n(50)):e||"zoom-out"!==o()||r.current===i||(t(r.current),n(100))}),[o,t,e,n])}const qw=()=>{};const Yw=(0,a.forwardRef)((function({rootClientId:e,clientId:t,isAppender:n,__experimentalInsertionIndex:o,onSelect:r,showInserterHelpPanel:i,showMostUsedBlocks:s,__experimentalFilterValue:l="",shouldFocusBlock:d=!0,onPatternCategorySelection:p,onClose:h,__experimentalInitialTab:g,__experimentalInitialCategory:m},f){const b=(0,c.useSelect)((e=>"zoom-out"===e(li).__unstableGetEditorMode()),[]),[k,v,_]=(0,u.useDebouncedInput)(l),[x,y]=(0,a.useState)(null),[S,w]=(0,a.useState)(m),[B,I]=(0,a.useState)("all"),[j,E]=(0,a.useState)(null),T=(0,u.useViewportMatch)("large"),[M,P]=(0,a.useState)(!0),[R,N]=(0,a.useState)(g||(b?"patterns":void 0));Zw(("patterns"===R||"media"===R)&&T);const[L,A,D]=AS({rootClientId:e,clientId:t,isAppender:n,insertionIndex:o,shouldFocusBlock:d}),O=(0,a.useRef)(),z=(0,a.useCallback)(((e,t,n,o)=>{A(e,t,n,o),r(e),window.requestAnimationFrame((()=>{d||O.current?.contains(f.current.ownerDocument.activeElement)||O.current?.querySelector("button").focus()}))}),[A,r,d]),V=(0,a.useCallback)(((e,t)=>{D(!1),A(e,{patternName:t}),r()}),[A,r]),F=(0,a.useCallback)((e=>{D(e),y(e)}),[D,y]),H=(0,a.useCallback)(((e,t)=>{w(e),I(t),p?.()}),[w,p]),G="patterns"===R&&M&&!_&&!!S,U="media"===R&&!!j&&M,W=(0,a.useMemo)((()=>"media"===R?null:(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(os.SearchControl,{__nextHasNoMarginBottom:!0,className:"block-editor-inserter__search",onChange:e=>{x&&y(null),v(e)},value:k,label:(0,C.__)("Search for blocks and patterns"),placeholder:(0,C.__)("Search")}),!!_&&(0,$.jsx)($w,{filterValue:_,onSelect:r,onHover:F,rootClientId:e,clientId:t,isAppender:n,__experimentalInsertionIndex:o,showBlockDirectory:!0,shouldFocusBlock:d,prioritizePatterns:"patterns"===R})]})),[R,x,y,v,k,_,r,F,d,t,e,o,n]),K=(0,a.useMemo)((()=>(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)("div",{className:"block-editor-inserter__block-list",children:(0,$.jsx)(BS,{ref:O,rootClientId:L,onInsert:z,onHover:F,showMostUsedBlocks:s})}),i&&(0,$.jsxs)("div",{className:"block-editor-inserter__tips",children:[(0,$.jsx)(os.VisuallyHidden,{as:"h2",children:(0,C.__)("A tip for using the block editor")}),(0,$.jsx)(Ff,{})]})]})),[L,z,F,s,i]),Z=(0,a.useMemo)((()=>(0,$.jsx)(ww,{rootClientId:L,onInsert:V,onSelectCategory:H,selectedCategory:S,setHasCategories:P,children:G&&(0,$.jsx)(xw,{rootClientId:L,onInsert:V,category:S,patternFilter:B,showTitlesAsTooltip:!0})})),[L,V,H,B,S,G]),q=(0,a.useMemo)((()=>(0,$.jsx)(Ow,{rootClientId:L,selectedCategory:j,onSelectCategory:E,onInsert:z,setHasCategories:P,children:U&&(0,$.jsx)(Aw,{rootClientId:L,onInsert:z,category:j})})),[L,z,j,E,U]),Y=(0,a.useRef)();return(0,a.useLayoutEffect)((()=>{Y.current&&window.requestAnimationFrame((()=>{Y.current.querySelector('[role="tab"][aria-selected="true"]')?.focus()}))}),[]),(0,$.jsxs)("div",{className:Zi("block-editor-inserter__menu",{"show-panel":G||U,"is-zoom-out":b}),ref:f,children:[(0,$.jsx)("div",{className:"block-editor-inserter__main-area",children:(0,$.jsx)(Kw,{ref:Y,onSelect:e=>{"patterns"!==e&&w(null),N(e)},onClose:h,selectedTab:R,closeButtonLabel:(0,C.__)("Close block inserter"),tabs:[{name:"blocks",title:(0,C.__)("Blocks"),panel:(0,$.jsxs)($.Fragment,{children:[W,"blocks"===R&&!_&&K]})},{name:"patterns",title:(0,C.__)("Patterns"),panel:(0,$.jsxs)($.Fragment,{children:[W,"patterns"===R&&!_&&Z]})},{name:"media",title:(0,C.__)("Media"),panel:(0,$.jsxs)($.Fragment,{children:[W,q]})}]})}),i&&x&&(0,$.jsx)(os.Popover,{className:"block-editor-inserter__preview-container__popover",placement:"right-start",offset:16,focusOnMount:!1,animate:!1,children:(0,$.jsx)(aS,{item:x})})]})}));const Xw=(0,a.forwardRef)((function(e,t){return(0,$.jsx)(Yw,{...e,onPatternCategorySelection:qw,ref:t})}));function Qw({onSelect:e,rootClientId:t,clientId:n,isAppender:o,prioritizePatterns:r,selectBlockOnInsert:i,hasSearch:s=!0}){const[l,u]=(0,a.useState)(""),[d,p]=AS({onSelect:e,rootClientId:t,clientId:n,isAppender:o,selectBlockOnInsert:i}),[h]=vS(d,p,!0),[g]=DS(p,d),{setInserterIsOpened:m,insertionIndex:f}=(0,c.useSelect)((e=>{const{getSettings:t,getBlockIndex:o,getBlockCount:r}=e(li),i=t(),s=o(n),l=r();return{setInserterIsOpened:i.__experimentalSetIsInserterOpened,insertionIndex:-1===s?l:s}}),[n]),b=g.length&&(!!l||r),k=s&&(b&&g.length>6||h.length>6);(0,a.useEffect)((()=>{m&&m(!1)}),[m]);let v=0;return b&&(v=r?4:2),(0,$.jsxs)("div",{className:Zi("block-editor-inserter__quick-inserter",{"has-search":k,"has-expand":m}),children:[k&&(0,$.jsx)(os.SearchControl,{__nextHasNoMarginBottom:!0,className:"block-editor-inserter__search",value:l,onChange:e=>{u(e)},label:(0,C.__)("Search for blocks and patterns"),placeholder:(0,C.__)("Search")}),(0,$.jsx)("div",{className:"block-editor-inserter__quick-inserter-results",children:(0,$.jsx)($w,{filterValue:l,onSelect:e,rootClientId:t,clientId:n,isAppender:o,maxBlockPatterns:v,maxBlockTypes:6,isDraggable:!1,prioritizePatterns:r,selectBlockOnInsert:i,isQuick:!0})}),m&&(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,className:"block-editor-inserter__quick-inserter-expand",onClick:()=>{m({rootClientId:t,insertionIndex:f,filterValue:l,onSelect:e})},"aria-label":(0,C.__)("Browse all. This will open the main inserter panel in the editor toolbar."),children:(0,C.__)("Browse all")})]})}const Jw=({onToggle:e,disabled:t,isOpen:n,blockTitle:o,hasSingleBlockType:r,toggleProps:i={},prioritizePatterns:s})=>{const{as:l=os.Button,label:a,onClick:c,...u}=i;let d=a;return!d&&r?d=(0,C.sprintf)((0,C._x)("Add %s","directly add the only allowed block"),o):!d&&s?d=(0,C.__)("Add pattern"):d||(d=(0,C._x)("Add block","Generic label for block inserter button")),(0,$.jsx)(l,{icon:Aa,label:d,tooltipPosition:"bottom",onClick:function(t){e&&e(t),c&&c(t)},className:"block-editor-inserter__toggle","aria-haspopup":!r&&"true","aria-expanded":!r&&n,disabled:t,...u})};class eC 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({onToggle:e,isOpen:t}){const{disabled:n,blockTitle:o,hasSingleBlockType:r,directInsertBlock:i,toggleProps:s,hasItems:l,renderToggle:a=Jw,prioritizePatterns:c}=this.props;return a({onToggle:e,isOpen:t,disabled:n||!l,blockTitle:o,hasSingleBlockType:r,directInsertBlock:i,toggleProps:s,prioritizePatterns:c})}renderContent({onClose:e}){const{rootClientId:t,clientId:n,isAppender:o,showInserterHelpPanel:r,__experimentalIsQuick:i,prioritizePatterns:s,onSelectOrClose:l,selectBlockOnInsert:a}=this.props;return i?(0,$.jsx)(Qw,{onSelect:t=>{const n=Array.isArray(t)&&t?.length?t[0]:t;l&&"function"==typeof l&&l(n),e()},rootClientId:t,clientId:n,isAppender:o,prioritizePatterns:s,selectBlockOnInsert:a}):(0,$.jsx)(Xw,{onSelect:()=>{e()},rootClientId:t,clientId:n,isAppender:o,showInserterHelpPanel:r})}render(){const{position:e,hasSingleBlockType:t,directInsertBlock:n,insertOnlyAllowedBlock:o,__experimentalIsQuick:r,onSelectOrClose:i}=this.props;return t||n?this.renderToggle({onToggle:o}):(0,$.jsx)(os.Dropdown,{className:"block-editor-inserter",contentClassName:Zi("block-editor-inserter__popover",{"is-quick":r}),popoverProps:{position:e,shift:!0},onToggle:this.onToggle,expandOnMobile:!0,headerTitle:(0,C.__)("Add a block"),renderToggle:this.renderToggle,renderContent:this.renderContent,onClose:i})}}const tC=(0,u.compose)([(0,c.withSelect)(((e,{clientId:t,rootClientId:n,shouldDirectInsert:o=!0})=>{const{getBlockRootClientId:r,hasInserterItems:i,getAllowedBlocks:s,getDirectInsertBlock:a,getSettings:c}=e(li),{getBlockVariations:u}=e(l.store),d=s(n=n||r(t)||void 0),p=o&&a(n),h=c(),g=1===d?.length&&0===u(d[0].name,"inserter")?.length;let m=!1;return g&&(m=d[0]),{hasItems:i(n),hasSingleBlockType:g,blockTitle:m?m.title:"",allowedBlockType:m,directInsertBlock:p,rootClientId:n,prioritizePatterns:h.__experimentalPreferPatternsOnRoot&&!n}})),(0,c.withDispatch)(((e,t,{select:n})=>({insertOnlyAllowedBlock(){const{rootClientId:o,clientId:r,isAppender:i,hasSingleBlockType:s,allowedBlockType:a,directInsertBlock:c,onSelectOrClose:u,selectBlockOnInsert:d}=t;if(!s&&!c)return;const{insertBlock:p}=e(li);let h;if(c){const e=function(e){const{getBlock:t,getPreviousBlockClientId:i}=n(li);if(!e||!r&&!o)return{};const s={};let l={};if(r){const e=t(r),n=t(i(r));e?.name===n?.name&&(l=n?.attributes||{})}else{const e=t(o);if(e?.innerBlocks?.length){const t=e.innerBlocks[e.innerBlocks.length-1];c&&c?.name===t.name&&(l=t.attributes)}}return e.forEach((e=>{l.hasOwnProperty(e)&&(s[e]=l[e])})),s}(c.attributesToCopy);h=(0,l.createBlock)(c.name,{...c.attributes||{},...e})}else h=(0,l.createBlock)(a.name);p(h,function(){const{getBlockIndex:e,getBlockSelectionEnd:t,getBlockOrder:s,getBlockRootClientId:l}=n(li);if(r)return e(r);const a=t();return!i&&a&&l(a)===o?e(a)+1:s(o).length}(),o,d),u&&u({clientId:h?.clientId});const g=(0,C.sprintf)((0,C.__)("%s block added"),a.title);(0,$o.speak)(g)}}))),(0,u.ifCondition)((({hasItems:e,isAppender:t,rootClientId:n,clientId:o})=>e||!t&&!n&&!o))])(eC);function nC({rootClientId:e,className:t,onFocus:n,tabIndex:o,onSelect:r},i){const s=(0,a.useRef)(),l=(0,u.useMergeRefs)([s,i]);return(0,$.jsx)(tC,{position:"bottom center",rootClientId:e,__experimentalIsQuick:!0,onSelectOrClose:(...e)=>{r&&"function"==typeof r&&r(...e),s.current?.focus()},renderToggle:({onToggle:e,disabled:r,isOpen:i,blockTitle:s,hasSingleBlockType:a})=>{const c=!a,u=a?(0,C.sprintf)((0,C._x)("Add %s","directly add the only allowed block"),s):(0,C._x)("Add block","Generic label for block inserter button");return(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,ref:l,onFocus:n,tabIndex:o,className:Zi(t,"block-editor-button-block-appender"),onClick:e,"aria-haspopup":c?"true":void 0,"aria-expanded":c?i:void 0,disabled:r,label:u,showTooltip:!0,children:(0,$.jsx)(hl,{icon:Aa})})},isAppender:!0})}const oC=(0,a.forwardRef)(((e,t)=>(y()("wp.blockEditor.ButtonBlockerAppender",{alternative:"wp.blockEditor.ButtonBlockAppender",since:"5.9"}),nC(e,t)))),rC=(0,a.forwardRef)(nC);function iC({clientId:e,contentRef:t,parentLayout:n}){const o=(0,c.useSelect)((e=>e(li).getSettings().isDistractionFree),[]),r=vp(e);if(o||!r)return null;const i=n?.isManualPlacement&&window.__experimentalEnableGridInteractivity;return(0,$.jsx)(sC,{gridClientId:e,gridElement:r,isManualGrid:i,ref:t})}const sC=(0,a.forwardRef)((({gridClientId:e,gridElement:t,isManualGrid:n},o)=>{const[r,i]=(0,a.useState)((()=>zf(t))),[s,l]=(0,a.useState)(!1);return(0,a.useEffect)((()=>{const e=[];for(const n of[t,...t.children]){const o=new window.ResizeObserver((()=>{i(zf(t))}));o.observe(n),e.push(o)}return()=>{for(const t of e)t.disconnect()}}),[t]),(0,a.useEffect)((()=>{function e(){l(!0)}function t(){l(!1)}return document.addEventListener("drag",e),document.addEventListener("dragend",t),()=>{document.removeEventListener("drag",e),document.removeEventListener("dragend",t)}}),[]),(0,$.jsx)(tm,{className:Zi("block-editor-grid-visualizer",{"is-dropping-allowed":s}),clientId:e,__unstablePopoverSlot:"__unstable-block-tools-after",children:(0,$.jsx)("div",{ref:o,className:"block-editor-grid-visualizer__grid",style:r.style,children:n?(0,$.jsx)(lC,{gridClientId:e,gridInfo:r}):Array.from({length:r.numItems},((e,t)=>(0,$.jsx)(aC,{color:r.currentColor},t)))})})}));function lC({gridClientId:e,gridInfo:t}){const[n,o]=(0,a.useState)(null),r=(0,c.useSelect)((t=>{const{getBlockOrder:n,getBlockStyles:o}=te(t(li));return o(n(e))}),[e]),i=(0,a.useMemo)((()=>{const e=[];for(const n of Object.values(r)){var t;const{columnStart:o,rowStart:r,columnSpan:i=1,rowSpan:s=1}=null!==(t=n?.layout)&&void 0!==t?t:{};o&&r&&e.push(new Lf({columnStart:o,rowStart:r,columnSpan:i,rowSpan:s}))}return e}),[r]);return Nf(1,t.numRows).map((r=>Nf(1,t.numColumns).map((s=>{var l;const a=i.some((e=>e.contains(s,r))),c=null!==(l=n?.contains(s,r))&&void 0!==l&&l;return(0,$.jsx)(aC,{color:t.currentColor,className:c&&"is-highlighted",children:a?(0,$.jsx)(uC,{column:s,row:r,gridClientId:e,gridInfo:t,setHighlightedRect:o}):(0,$.jsx)(dC,{column:s,row:r,gridClientId:e,gridInfo:t,setHighlightedRect:o})},`${r}-${s}`)}))))}function aC({color:e,children:t,className:n}){return(0,$.jsx)("div",{className:Zi("block-editor-grid-visualizer__cell",n),style:{boxShadow:`inset 0 0 0 1px color-mix(in srgb, ${e} 20%, #0000)`,color:e},children:t})}function cC(e,t,n,o,r){const{getBlockAttributes:i,getBlockRootClientId:s,canInsertBlockType:l,getBlockName:a}=(0,c.useSelect)(li),{updateBlockAttributes:d,moveBlocksToPosition:p,__unstableMarkNextChangeAsNotPersistent:h}=(0,c.useDispatch)(li),g=bg(n,o.numColumns);return function({validateDrag:e,onDragEnter:t,onDragLeave:n,onDrop:o}){const{getDraggedBlockClientIds:r}=(0,c.useSelect)(li);return(0,u.__experimentalUseDropZone)({onDragEnter(){const[n]=r();n&&e(n)&&t(n)},onDragLeave(){n()},onDrop(){const[t]=r();t&&e(t)&&o(t)}})}({validateDrag(r){const s=a(r);if(!l(s,n))return!1;const c=i(r),u=new Lf({columnStart:e,rowStart:t,columnSpan:c.style?.layout?.columnSpan,rowSpan:c.style?.layout?.rowSpan});return new Lf({columnSpan:o.numColumns,rowSpan:o.numRows}).containsRect(u)},onDragEnter(n){const o=i(n);r(new Lf({columnStart:e,rowStart:t,columnSpan:o.style?.layout?.columnSpan,rowSpan:o.style?.layout?.rowSpan}))},onDragLeave(){r((n=>n?.columnStart===e&&n?.rowStart===t?null:n))},onDrop(o){r(null);const l=i(o);d(o,{style:{...l.style,layout:{...l.style?.layout,columnStart:e,rowStart:t}}}),h(),p([o],s(o),n,g(e,t))}})}function uC({column:e,row:t,gridClientId:n,gridInfo:o,setHighlightedRect:r}){return(0,$.jsx)("div",{className:"block-editor-grid-visualizer__drop-zone",ref:cC(e,t,n,o,r)})}function dC({column:e,row:t,gridClientId:n,gridInfo:o,setHighlightedRect:r}){const{updateBlockAttributes:i,moveBlocksToPosition:s,__unstableMarkNextChangeAsNotPersistent:l}=(0,c.useDispatch)(li),a=bg(n,o.numColumns);return(0,$.jsx)(rC,{rootClientId:n,className:"block-editor-grid-visualizer__appender",ref:cC(e,t,n,o,r),style:{color:o.currentColor},onSelect:o=>{o&&(i(o.clientId,{style:{layout:{columnStart:e,rowStart:t}}}),l(),s([o.clientId],n,n,a(e,t)))}})}function pC({clientId:e,bounds:t,onChange:n,parentLayout:o}){const r=vp(e),i=r?.parentElement,{isManualPlacement:s}=o;return r&&i?(0,$.jsx)(hC,{clientId:e,bounds:t,blockElement:r,rootBlockElement:i,onChange:n,isManualGrid:s&&window.__experimentalEnableGridInteractivity}):null}function hC({clientId:e,bounds:t,blockElement:n,rootBlockElement:o,onChange:r,isManualGrid:i}){const[s,l]=(0,a.useState)(null),[c,u]=(0,a.useState)({top:!1,bottom:!1,left:!1,right:!1});(0,a.useEffect)((()=>{const e=new window.ResizeObserver((()=>{const e=n.getBoundingClientRect(),t=o.getBoundingClientRect();u({top:e.top>t.top,bottom:e.bottom<t.bottom,left:e.left>t.left,right:e.right<t.right})}));return e.observe(n),()=>e.disconnect()}),[n,o]);const d={right:"left",left:"right"},p={top:"flex-end",bottom:"flex-start"},h={display:"flex",justifyContent:"center",alignItems:"center",...d[s]&&{justifyContent:d[s]},...p[s]&&{alignItems:p[s]}};return(0,$.jsx)(tm,{className:"block-editor-grid-item-resizer",clientId:e,__unstablePopoverSlot:"__unstable-block-tools-after",additionalStyles:h,children:(0,$.jsx)(os.ResizableBox,{className:"block-editor-grid-item-resizer__box",size:{width:"100%",height:"100%"},enable:{bottom:c.bottom,bottomLeft:!1,bottomRight:!1,left:c.left,right:c.right,top:c.top,topLeft:!1,topRight:!1},bounds:t,boundsByDirection:!0,onPointerDown:({target:e,pointerId:t})=>{e.setPointerCapture(t)},onResizeStart:(e,t)=>{l(t)},onResizeStop:(e,t,s)=>{const l=parseFloat(Af(o,"column-gap")),a=parseFloat(Af(o,"row-gap")),c=Df(Af(o,"grid-template-columns"),l),u=Df(Af(o,"grid-template-rows"),a),d=new window.DOMRect(n.offsetLeft+s.offsetLeft,n.offsetTop+s.offsetTop,s.offsetWidth,s.offsetHeight),p=Of(c,d.left)+1,h=Of(u,d.top)+1,g=Of(c,d.right,"end")+1,m=Of(u,d.bottom,"end")+1;r({columnSpan:g-p+1,rowSpan:m-h+1,columnStart:i?p:void 0,rowStart:i?h:void 0})}})})}const gC=(0,$.jsx)(G.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,$.jsx)(G.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})}),mC=(0,$.jsx)(G.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,$.jsx)(G.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})});function fC({layout:e,parentLayout:t,onChange:n,gridClientId:o,blockClientId:r}){var i,s,l,a;const{moveBlocksToPosition:u,__unstableMarkNextChangeAsNotPersistent:d}=(0,c.useDispatch)(li),p=null!==(i=e?.columnStart)&&void 0!==i?i:1,h=null!==(s=e?.rowStart)&&void 0!==s?s:1,g=null!==(l=e?.columnSpan)&&void 0!==l?l:1,m=null!==(a=e?.rowSpan)&&void 0!==a?a:1,f=p+g-1,b=h+m-1,k=t?.columnCount,v=t?.rowCount,_=bg(o,k);return(0,$.jsx)(us,{group:"parent",children:(0,$.jsxs)(os.ToolbarGroup,{className:"block-editor-grid-item-mover__move-button-container",children:[(0,$.jsx)("div",{className:"block-editor-grid-item-mover__move-horizontal-button-container is-left",children:(0,$.jsx)(bC,{icon:(0,C.isRTL)()?Hf:Gf,label:(0,C.__)("Move left"),description:(0,C.__)("Move left"),isDisabled:p<=1,onClick:()=>{n({columnStart:p-1}),d(),u([r],o,o,_(p-1,h))}})}),(0,$.jsxs)("div",{className:"block-editor-grid-item-mover__move-vertical-button-container",children:[(0,$.jsx)(bC,{className:"is-up-button",icon:gC,label:(0,C.__)("Move up"),description:(0,C.__)("Move up"),isDisabled:h<=1,onClick:()=>{n({rowStart:h-1}),d(),u([r],o,o,_(p,h-1))}}),(0,$.jsx)(bC,{className:"is-down-button",icon:mC,label:(0,C.__)("Move down"),description:(0,C.__)("Move down"),isDisabled:v&&b>=v,onClick:()=>{n({rowStart:h+1}),d(),u([r],o,o,_(p,h+1))}})]}),(0,$.jsx)("div",{className:"block-editor-grid-item-mover__move-horizontal-button-container is-right",children:(0,$.jsx)(bC,{icon:(0,C.isRTL)()?Gf:Hf,label:(0,C.__)("Move right"),description:(0,C.__)("Move right"),isDisabled:k&&f>=k,onClick:()=>{n({columnStart:p+1}),d(),u([r],o,o,_(p+1,h))}})})]})})}function bC({className:e,icon:t,label:n,isDisabled:o,onClick:r,description:i}){const s=`block-editor-grid-item-mover-button__description-${(0,u.useInstanceId)(bC)}`;return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(os.ToolbarButton,{className:Zi("block-editor-grid-item-mover-button",e),icon:t,label:n,"aria-describedby":s,onClick:o?null:r,disabled:o,accessibleWhenDisabled:!0}),(0,$.jsx)(os.VisuallyHidden,{id:s,children:i})]})}function kC({clientId:e,style:t,setAttributes:n,allowSizingOnChildren:o,isManualPlacement:r,parentLayout:i}){const{rootClientId:s,isVisible:l}=(0,c.useSelect)((t=>{const{getBlockRootClientId:n,getBlockEditingMode:o,getTemplateLock:r}=t(li),i=n(e);return r(i)||"default"!==o(i)?{rootClientId:i,isVisible:!1}:{rootClientId:i,isVisible:!0}}),[e]),[u,d]=(0,a.useState)();if(!l)return null;function p(e){n({style:{...t,layout:{...t?.layout,...e}}})}return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(iC,{clientId:s,contentRef:d,parentLayout:i}),o&&(0,$.jsx)(pC,{clientId:e,bounds:u,onChange:p,parentLayout:i}),r&&window.__experimentalEnableGridInteractivity&&(0,$.jsx)(fC,{layout:t?.layout,parentLayout:i,onChange:p,gridClientId:s,blockClientId:e})]})}const vC={useBlockProps:function e({style:t}){var n;const o=(0,c.useSelect)((e=>!e(li).getSettings().disableLayoutStyles)),r=null!==(n=t?.layout)&&void 0!==n?n:{},{selfStretch:i,flexSize:s,columnStart:l,rowStart:a,columnSpan:d,rowSpan:p}=r,h=Tl()||{},{columnCount:g,minimumColumnWidth:m}=h,f=(0,u.useInstanceId)(e),b=`.wp-container-content-${f}`;let k="";if(o&&("fixed"===i&&s?k=`${b} {\n\t\t\t\tflex-basis: ${s};\n\t\t\t\tbox-sizing: border-box;\n\t\t\t}`:"fill"===i?k=`${b} {\n\t\t\t\tflex-grow: 1;\n\t\t\t}`:l&&d?k=`${b} {\n\t\t\t\tgrid-column: ${l} / span ${d};\n\t\t\t}`:l?k=`${b} {\n\t\t\t\tgrid-column: ${l};\n\t\t\t}`:d&&(k=`${b} {\n\t\t\t\tgrid-column: span ${d};\n\t\t\t}`),a&&p?k+=`${b} {\n\t\t\t\tgrid-row: ${a} / span ${p};\n\t\t\t}`:a?k+=`${b} {\n\t\t\t\tgrid-row: ${a};\n\t\t\t}`:p&&(k+=`${b} {\n\t\t\t\tgrid-row: span ${p};\n\t\t\t}`),(d||l)&&(m||!g))){let e=parseFloat(m);isNaN(e)&&(e=12);let t=m?.replace(e,"");["px","rem","em"].includes(t)||(t="rem");let n=2;n=d&&l?d+l-1:d||l;const o="px"===t?24:1.5,r=n*e+(n-1)*o,i=2*e+o-1,s=d&&d>1?"1/-1":"auto";k+=`@container (max-width: ${Math.max(r,i)}${t}) {\n\t\t\t\t${b} {\n\t\t\t\t\tgrid-column: ${s};\n\t\t\t\t\tgrid-row: auto;\n\t\t\t\t}\n\t\t\t}`}if(Ji({css:k}),k)return{className:`wp-container-content-${f}`}},edit:function({clientId:e,style:t,setAttributes:n}){const o=Tl()||{},{type:r="default",allowSizingOnChildren:i=!1,isManualPlacement:s}=o;return"grid"!==r?null:(0,$.jsx)(kC,{clientId:e,style:t,setAttributes:n,allowSizingOnChildren:i,isManualPlacement:s,parentLayout:o})},attributeKeys:["style"],hasSupport:()=>!0};const _C={edit:function({clientId:e}){const{templateLock:t,isLockedByParent:n,isEditingAsBlocks:o}=(0,c.useSelect)((t=>{const{getContentLockingParent:n,getTemplateLock:o,getTemporarilyEditingAsBlocks:r}=te(t(li));return{templateLock:o(e),isLockedByParent:!!n(e),isEditingAsBlocks:r()===e}}),[e]),{stopEditingAsBlocks:r}=te((0,c.useDispatch)(li)),i=!n&&"contentOnly"===t,s=(0,a.useCallback)((()=>{r(e)}),[e,r]);return i||o?o&&!i&&(0,$.jsx)(us,{group:"other",children:(0,$.jsx)(os.ToolbarButton,{onClick:s,children:(0,C.__)("Done")})}):null},hasSupport:()=>!0},xC="metadata";(0,d.addFilter)("blocks.registerBlockType","core/metadata/addMetaAttribute",(function(e){return e?.attributes?.[xC]?.type||(e.attributes={...e.attributes,[xC]:{type:"object"}}),e}));const yC={};const SC={edit:function({name:e,clientId:t,metadata:{ignoredHookedBlocks:n=[]}={}}){const o=(0,c.useSelect)((e=>e(l.store).getBlockTypes()),[]),r=(0,a.useMemo)((()=>o?.filter((({name:t,blockHooks:o})=>o&&e in o||n.includes(t)))),[o,e,n]),i=(0,c.useSelect)((n=>{const{getBlocks:o,getBlockRootClientId:i,getGlobalBlockCount:s}=n(li),l=i(t),a=r.reduce(((n,r)=>{if(0===s(r.name))return n;const i=r?.blockHooks?.[e];let a;switch(i){case"before":case"after":a=o(l);break;case"first_child":case"last_child":a=o(t);break;case void 0:a=[...o(l),...o(t)]}const c=a?.find((e=>e.name===r.name));return c?{...n,[r.name]:c.clientId}:n}),{});return Object.values(a).length>0?a:yC}),[r,e,t]),{getBlockIndex:s,getBlockCount:u,getBlockRootClientId:d}=(0,c.useSelect)(li),{insertBlock:p,removeBlock:h}=(0,c.useDispatch)(li);if(!r.length)return null;const g=r.reduce(((e,t)=>{const[n]=t.name.split("/");return e[n]||(e[n]=[]),e[n].push(t),e}),{});return(0,$.jsx)(ma,{children:(0,$.jsxs)(os.PanelBody,{className:"block-editor-hooks__block-hooks",title:(0,C.__)("Plugins"),initialOpen:!0,children:[(0,$.jsx)("p",{className:"block-editor-hooks__block-hooks-helptext",children:(0,C.__)("Manage the inclusion of blocks added automatically by plugins.")}),Object.keys(g).map((n=>(0,$.jsxs)(a.Fragment,{children:[(0,$.jsx)("h3",{children:n}),g[n].map((n=>{const o=n.name in i;return(0,$.jsx)(os.ToggleControl,{__nextHasNoMarginBottom:!0,checked:o,label:n.title,onChange:()=>{if(o)h(i[n.name],!1);else{const o=n.blockHooks[e];((e,n)=>{const o=s(t),r=u(t),i=d(t);switch(n){case"before":case"after":p(e,"after"===n?o+1:o,i,!1);break;case"first_child":case"last_child":p(e,"first_child"===n?0:r,t,!1);break;case void 0:p(e,o+1,i,!1)}})((0,l.createBlock)(n.name),o)}}},n.title)}))]},n)))]})})},attributeKeys:["metadata"],hasSupport:()=>!0};function wC(e){return!e||0===Object.keys(e).length}function CC(e){const{clientId:t}=_(),n=e||t,{updateBlockAttributes:o}=(0,c.useDispatch)(li),{getBlockAttributes:r}=(0,c.useRegistry)().select(li);return{updateBlockBindings:e=>{const{metadata:{bindings:t,...i}={}}=r(n),s={...t};Object.entries(e).forEach((([e,t])=>{t||!s[e]?s[e]=t:delete s[e]}));const l={...i,bindings:s};wC(l.bindings)&&delete l.bindings,o(n,{metadata:wC(l)?void 0:l})},removeAllBlockBindings:()=>{const{metadata:{bindings:e,...t}={}}=r(n);o(n,{metadata:wC(t)?void 0:t})}}}const{DropdownMenuV2:BC}=te(os.privateApis),IC={};function jC({fieldsList:e,attribute:t,binding:n}){const{clientId:o}=_(),r=(0,l.getBlockBindingsSources)(),{updateBlockBindings:i}=CC(),s=n?.args?.key,u=(0,c.useSelect)((e=>{const{name:n}=e(li).getBlock(o),r=(0,l.getBlockType)(n).attributes?.[t]?.type;return"rich-text"===r?"string":r}),[o,t]);return(0,$.jsx)($.Fragment,{children:Object.entries(e).map((([n,o],l)=>(0,$.jsxs)(a.Fragment,{children:[(0,$.jsxs)(BC.Group,{children:[Object.keys(e).length>1&&(0,$.jsx)(BC.GroupLabel,{children:r[n].label}),Object.entries(o).filter((([,e])=>e?.type===u)).map((([e,o])=>(0,$.jsxs)(BC.RadioItem,{onChange:()=>i({[t]:{source:n,args:{key:e}}}),name:t+"-binding",value:e,checked:e===s,children:[(0,$.jsx)(BC.ItemLabel,{children:o?.label}),(0,$.jsx)(BC.ItemHelpText,{children:o?.value})]},e)))]}),l!==Object.keys(e).length-1&&(0,$.jsx)(BC.Separator,{})]},n)))})}function EC({attribute:e,binding:t,fieldsList:n}){const{source:o,args:r}=t||{},i=(0,l.getBlockBindingsSource)(o),s=!i;return(0,$.jsxs)(os.__experimentalVStack,{className:"block-editor-bindings__item",spacing:0,children:[(0,$.jsx)(os.__experimentalText,{truncate:!0,children:e}),!!t&&(0,$.jsx)(os.__experimentalText,{truncate:!0,variant:!s&&"muted",isDestructive:s,children:s?(0,C.__)("Invalid source"):n?.[o]?.[r?.key]?.label||i?.label||o})]})}function TC({bindings:e,fieldsList:t}){return(0,$.jsx)($.Fragment,{children:Object.entries(e).map((([e,n])=>(0,$.jsx)(os.__experimentalItem,{children:(0,$.jsx)(EC,{attribute:e,binding:n,fieldsList:t})},e)))})}function MC({attributes:e,bindings:t,fieldsList:n}){const{updateBlockBindings:o}=CC(),r=(0,u.useViewportMatch)("medium","<");return(0,$.jsx)($.Fragment,{children:e.map((e=>{const i=t[e];return(0,$.jsx)(os.__experimentalToolsPanelItem,{hasValue:()=>!!i,label:e,onDeselect:()=>{o({[e]:void 0})},children:(0,$.jsx)(BC,{placement:r?"bottom-start":"left-start",gutter:r?8:36,trigger:(0,$.jsx)(os.__experimentalItem,{children:(0,$.jsx)(EC,{attribute:e,binding:i,fieldsList:n})}),children:(0,$.jsx)(jC,{fieldsList:n,attribute:e,binding:i})})},e)}))})}const PC={edit:({name:e,metadata:t})=>{const n=(0,a.useContext)(ob),{removeAllBlockBindings:o}=CC(),r=function(e){return ox[e]}(e),i=(0,u.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}},s={},{fieldsList:d,canUpdateBlockBindings:p}=(0,c.useSelect)((e=>{if(!r||0===r.length)return IC;const t=(0,l.getBlockBindingsSources)();return Object.entries(t).forEach((([t,{getFieldsList:o,usesContext:r}])=>{if(o){const i={};if(r?.length)for(const e of r)i[e]=n[e];const l=o({select:e,context:i});Object.keys(l||{}).length&&(s[t]={...l})}})),{fieldsList:Object.values(s).length>0?s:IC,canUpdateBlockBindings:e(li).getSettings().canUpdateBlockBindings}}),[n,r]);if(!r||0===r.length)return null;const{bindings:h}=t||{},g={...h};Object.keys(g).forEach((t=>{sx(e,t)&&"core/pattern-overrides"!==g[t].source||delete g[t]}));const m=!p||!Object.keys(d).length;return m&&0===Object.keys(g).length?null:(0,$.jsx)(ma,{group:"bindings",children:(0,$.jsxs)(os.__experimentalToolsPanel,{label:(0,C.__)("Attributes"),resetAll:()=>{o()},dropdownMenuProps:i,className:"block-editor-bindings__panel",children:[(0,$.jsx)(os.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:m?(0,$.jsx)(TC,{bindings:g,fieldsList:d}):(0,$.jsx)(MC,{attributes:r,bindings:g,fieldsList:d})}),(0,$.jsx)(os.__experimentalItemGroup,{children:(0,$.jsx)(os.__experimentalText,{variant:"muted",children:(0,C.__)("Attributes connected to custom fields or other dynamic data.")})})]})})},attributeKeys:["metadata"],hasSupport:()=>!0};function RC(e,t,n,o,r=1,i=1){for(let s=i;;s++)for(let l=s===i?r:1;l<=t;l++){const t=new Lf({columnStart:l,rowStart:s,columnSpan:n,rowSpan:o});if(!e.some((e=>e.intersectsRect(t))))return[l,s]}}function NC(e){!function({clientId:e}){const{gridLayout:t,blockOrder:n,selectedBlockLayout:o}=(0,c.useSelect)((t=>{var n;const{getBlockAttributes:o,getBlockOrder:r}=t(li),i=t(li).getSelectedBlock();return{gridLayout:null!==(n=o(e).layout)&&void 0!==n?n:{},blockOrder:r(e),selectedBlockLayout:i?.attributes.style?.layout}}),[e]),{getBlockAttributes:r,getBlockRootClientId:i}=(0,c.useSelect)(li),{updateBlockAttributes:s,__unstableMarkNextChangeAsNotPersistent:l}=(0,c.useDispatch)(li),d=(0,a.useMemo)((()=>o?new Lf(o):null),[o]),p=(0,u.usePrevious)(d),h=(0,u.usePrevious)(t.isManualPlacement),g=(0,u.usePrevious)(n);(0,a.useEffect)((()=>{const o={};if(t.isManualPlacement){const s=[];for(const e of n){var a;const{columnStart:t,rowStart:n,columnSpan:o=1,rowSpan:i=1}=null!==(a=r(e).style?.layout)&&void 0!==a?a:{};t&&n&&s.push(new Lf({columnStart:t,rowStart:n,columnSpan:o,rowSpan:i}))}for(const e of n){var c;const n=r(e),{columnStart:i,rowStart:l,columnSpan:a=1,rowSpan:u=1}=null!==(c=n.style?.layout)&&void 0!==c?c:{};if(i&&l)continue;const[d,h]=RC(s,t.columnCount,a,u,p?.columnEnd,p?.rowEnd);s.push(new Lf({columnStart:d,rowStart:h,columnSpan:a,rowSpan:u})),o[e]={style:{...n.style,layout:{...n.style?.layout,columnStart:d,rowStart:h}}}}const l=Math.max(...s.map((e=>e.rowEnd)));(!t.rowCount||t.rowCount<l)&&(o[e]={layout:{...t,rowCount:l}});for(const e of null!=g?g:[])if(!n.includes(e)){var u;const t=i(e);if(null===t)continue;const n=r(t);if("grid"===n?.layout?.type)continue;const s=r(e),{columnStart:l,rowStart:a,columnSpan:c,rowSpan:d,...p}=null!==(u=s.style?.layout)&&void 0!==u?u:{};if(l||a||c||d){const t=0===Object.keys(p).length;o[e]=ve(s,["style","layout"],t?void 0:p)}}}else{if(!0===h)for(const e of n){var d;const t=r(e),{columnStart:n,rowStart:i,...s}=null!==(d=t.style?.layout)&&void 0!==d?d:{};if(n||i){const n=0===Object.keys(s).length;o[e]=ve(t,["style","layout"],n?void 0:s)}}t.rowCount&&(o[e]={layout:{...t,rowCount:void 0}})}Object.keys(o).length&&(l(),s(Object.keys(o),o,!0))}),[e,t,g,n,p,h,l,r,i,s])}(e)}function LC({clientId:e,layout:t}){const n=(0,c.useSelect)((t=>{const{isBlockSelected:n,isDraggingBlocks:o,getTemplateLock:r,getBlockEditingMode:i}=t(li);return!(!o()&&!n(e)||r(e)||"default"!==i(e))}),[e]);return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(NC,{clientId:e}),n&&(0,$.jsx)(iC,{clientId:e,parentLayout:t})]})}(0,d.addFilter)("blocks.registerBlockType","core/metadata/addLabelCallback",(function(e){return e.__experimentalLabel||(0,l.hasBlockSupport)(e,"renaming",!0)&&(e.__experimentalLabel=(e,{context:t})=>{const{metadata:n}=e;if("list-view"===t&&n?.name)return n.name}),e}));const AC=(0,u.createHigherOrderComponent)((e=>t=>"grid"!==t.attributes.layout?.type?(0,$.jsx)(e,{...t},"edit"):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(LC,{clientId:t.clientId,layout:t.attributes.layout}),(0,$.jsx)(e,{...t},"edit")]})),"addGridVisualizerToBlockEdit");function DC(e){const t=e.style?.border||{};return{className:zd(e)||void 0,style:mm({border:t})}}function OC(e){const{colors:t}=Zu(),n=DC(e),{borderColor:o}=e;if(o){const e=Td({colors:t,namedColor:o});n.style.borderColor=e.color}return n}function zC(e){return{style:mm({shadow:e.style?.shadow||""})}}function VC(e){const{backgroundColor:t,textColor:n,gradient:o,style:r}=e,i=Ku("background-color",t),s=Ku("color",n),l=Fd(o);return{className:Zi(s,l,{[i]:!(l||r?.color?.gradient)&&!!i,"has-text-color":n||r?.color?.text,"has-background":t||r?.color?.background||o||r?.color?.gradient,"has-link-color":r?.elements?.link?.color})||void 0,style:mm({color:r?.color||{}})}}function FC(e){const{backgroundColor:t,textColor:n,gradient:o}=e,[r,i,s,l,c,u]=ci("color.palette.custom","color.palette.theme","color.palette.default","color.gradients.custom","color.gradients.theme","color.gradients.default"),d=(0,a.useMemo)((()=>[...r||[],...i||[],...s||[]]),[r,i,s]),p=(0,a.useMemo)((()=>[...l||[],...c||[],...u||[]]),[l,c,u]),h=VC(e);if(t){const e=Uu(d,t);h.style.backgroundColor=e.color}if(o&&(h.style.background=Hd(p,o)),n){const e=Uu(d,n);h.style.color=e.color}return h}function HC(e){const{style:t}=e;return{style:mm({spacing:t?.spacing||{}})}}(0,d.addFilter)("editor.BlockEdit","core/editor/grid-visualizer",AC);const{kebabCase:GC}=te(os.privateApis);function $C(e,t){let n=e?.style?.typography||{};n={...n,fontSize:Ci({size:e?.style?.typography?.fontSize},t)};const o=mm({typography:n}),r=e?.fontFamily?`has-${GC(e.fontFamily)}-font-family`:"";return{className:Zi(r,e?.style?.typography?.textAlign?`has-text-align-${e?.style?.typography?.textAlign}`:"",Nh(e?.fontSize)),style:o}}function UC(e){const[t,n]=(0,a.useState)(e);return(0,a.useEffect)((()=>{e&&n(e)}),[e]),t}var WC;!function(e){e=e.map((e=>({...e,Edit:(0,a.memo)(e.edit)})));const t=(0,u.createHigherOrderComponent)((t=>n=>{const o=_();return[...e.map(((e,t)=>{const{Edit:r,hasSupport:i,attributeKeys:s=[],shareWithChildBlocks:l}=e;if(!(o[p]||o[h]&&l)||!i(n.name))return null;const a={};for(const e of s)n.attributes[e]&&(a[e]=n.attributes[e]);return(0,$.jsx)(r,{name:n.name,isSelected:n.isSelected,clientId:n.clientId,setAttributes:n.setAttributes,__unstableParentLayout:n.__unstableParentLayout,...a},t)})),(0,$.jsx)(t,{...n},"edit")]}),"withBlockEditHooks");(0,d.addFilter)("editor.BlockEdit","core/editor/hooks",t)}([Kl,qh,lu,uu,ym,Gm,tf,Tf,_C,SC,PC,vC].filter(Boolean)),function(e){const t=(0,u.createHigherOrderComponent)((t=>n=>{const[o,r]=(0,a.useState)(Array(e.length).fill(void 0));return[...e.map(((e,t)=>{const{hasSupport:o,attributeKeys:i=[],useBlockProps:s,isMatch:l}=e,a={};for(const e of i)n.attributes[e]&&(a[e]=n.attributes[e]);return!Object.keys(a).length||!o(n.name)||l&&!l(a)?null:(0,$.jsx)(ns,{index:t,useBlockProps:s,setAllWrapperProps:r,name:n.name,clientId:n.clientId,...a},t)})),(0,$.jsx)(t,{...n,wrapperProps:o.filter(Boolean).reduce(((e,t)=>({...e,...t,className:Zi(e.className,t.className),style:{...e.style,...t.style}})),n.wrapperProps||{})},"edit")]}),"withBlockListBlockHooks");(0,d.addFilter)("editor.BlockListBlock","core/editor/hooks",t)}([Kl,qh,ru,ym,Rp,dm,Gm,Th,Dh,Vd,tf,Cf,vC]),WC=[Kl,qh,lu,cu,uu,Vd,Rp,ym,Th,Dh],(0,d.addFilter)("blocks.getSaveContent.extraProps","core/editor/hooks",(function(e,t,n){return WC.reduce(((e,o)=>{const{hasSupport:r,attributeKeys:i=[],addSaveProps:s}=o,l={};for(const e of i)n[e]&&(l[e]=n[e]);return Object.keys(l).length&&r(t)?s(e,t,l):e}),e)}),0),(0,d.addFilter)("blocks.getSaveContent.extraProps","core/editor/hooks",(e=>(e.hasOwnProperty("className")&&!e.className&&delete e.className,e)));const{kebabCase:KC}=te(os.privateApis),ZC=([e,...t])=>e.toUpperCase()+t.join(""),qC=e=>(0,u.createHigherOrderComponent)((t=>n=>(0,$.jsx)(t,{...n,colors:e})),"withCustomColorPalette"),YC=()=>(0,u.createHigherOrderComponent)((e=>t=>{const[n,o,r]=ci("color.palette.custom","color.palette.theme","color.palette.default"),i=(0,a.useMemo)((()=>[...n||[],...o||[],...r||[]]),[n,o,r]);return(0,$.jsx)(e,{...t,colors:i})}),"withEditorColorPalette");function XC(e,t){const n=e.reduce(((e,t)=>({...e,..."string"==typeof t?{[t]:KC(t)}:t})),{});return(0,u.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=Du(t),o=({color:e})=>n.contrast(e),r=Math.max(...e.map(o));return e.find((e=>o(e)===r)).color}(t,e)}createSetters(){return Object.keys(n).reduce(((e,t)=>{const n=ZC(t),o=`custom${n}`;return e[`set${n}`]=this.createSetColor(t,o),e}),{})}createSetColor(e,t){return n=>{const o=Wu(this.props.colors,n);this.props.setAttributes({[e]:o&&o.slug?o.slug:void 0,[t]:o&&o.slug?void 0:n})}}static getDerivedStateFromProps({attributes:e,colors:t},o){return Object.entries(n).reduce(((n,[r,i])=>{const s=Uu(t,e[r],e[`custom${ZC(r)}`]),l=o[r],a=l?.color;return a===s.color&&l?n[r]=l:n[r]={...s,class:Ku(i,s.slug)},n}),{})}render(){return(0,$.jsx)(e,{...this.props,colors:void 0,...this.state,...this.setters,colorUtils:this.colorUtils})}}])}function QC(e){return(...t)=>{const n=qC(e);return(0,u.createHigherOrderComponent)(XC(t,n),"withCustomColors")}}function JC(...e){const t=YC();return(0,u.createHigherOrderComponent)(XC(e,t),"withColors")}const eB=function(e){const[t,n]=ci("typography.fontSizes","typography.customFontSize");return(0,$.jsx)(os.FontSizePicker,{...e,fontSizes:t,disableCustomFontSizes:!n})},tB=[],nB=([e,...t])=>e.toUpperCase()+t.join(""),oB=(...e)=>{const t=e.reduce(((e,t)=>(e[t]=`custom${nB(t)}`,e)),{});return(0,u.createHigherOrderComponent)((0,u.compose)([(0,u.createHigherOrderComponent)((e=>t=>{const[n]=ci("typography.fontSizes");return(0,$.jsx)(e,{...t,fontSizes:n||tB})}),"withFontSizes"),e=>class extends a.Component{constructor(e){super(e),this.setters=this.createSetters(),this.state={}}createSetters(){return Object.entries(t).reduce(((e,[t,n])=>(e[`set${nB(t)}`]=this.createSetFontSize(t,n),e)),{})}createSetFontSize(e,t){return n=>{const o=this.props.fontSizes?.find((({size:e})=>e===Number(n)));this.props.setAttributes({[e]:o&&o.slug?o.slug:void 0,[t]:o&&o.slug?void 0:n})}}static getDerivedStateFromProps({attributes:e,fontSizes:n},o){const r=(t,n)=>!o[n]||(e[n]?e[n]!==o[n].slug:o[n].size!==e[t]);if(!Object.values(t).some(r))return null;const i=Object.entries(t).filter((([e,t])=>r(t,e))).reduce(((t,[o,r])=>{const i=e[o],s=Ph(n,i,e[r]);return t[o]={...s,class:Nh(i)},t}),{});return{...o,...i}}render(){return(0,$.jsx)(e,{...this.props,fontSizes:void 0,...this.state,...this.setters})}}]),"withFontSizes")},rB=()=>{};const iB={name:"blocks",className:"block-editor-autocompleters__block",triggerPrefix:"/",useItems(e){const{rootClientId:t,selectedBlockName:n,prioritizedBlocks:o}=(0,c.useSelect)((e=>{const{getSelectedBlockClientId:t,getBlockName:n,getBlockListSettings:o,getBlockRootClientId:r}=e(li),i=t(),s=r(i);return{selectedBlockName:i?n(i):null,rootClientId:s,prioritizedBlocks:o(s)?.prioritizedInserterBlocks}}),[]),[r,i,s]=vS(t,rB,!0),l=(0,a.useMemo)((()=>(e.trim()?ow(r,i,s,e):Hw(he(r,"frecency","desc"),o)).filter((e=>e.name!==n)).slice(0,9)),[e,n,r,i,s,o]);return[(0,a.useMemo)((()=>l.map((e=>{const{title:t,icon:n,isDisabled:o}=e;return{key:`block-${e.id}`,value:e,label:(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Uf,{icon:n,showColors:!0},"icon"),t]}),isDisabled:o}}))),[l])]},allowContext:(e,t)=>!(/\S/.test(e)||/\S/.test(t)),getOptionCompletion(e){const{name:t,initialAttributes:n,innerBlocks:o,syncStatus:r,content:i}=e;return{action:"replace",value:"unsynced"===r?(0,l.parse)(i,{__unstableSkipMigrationLogs:!0}):(0,l.createBlock)(t,n,(0,l.createBlocksFromInnerBlocksTemplate)(o))}}},sB=window.wp.apiFetch;var lB=n.n(sB);const aB=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.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"})});const cB={name:"links",className:"block-editor-autocompleters__link",triggerPrefix:"[[",options:async e=>{let t=await lB()({path:(0,fa.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=>[...e.title.split(/\s+/)],getOptionLabel:e=>(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(hl,{icon:"page"===e.subtype?za:aB},"icon"),e.title]}),getOptionCompletion:e=>(0,$.jsx)("a",{href:e.url,children:e.title})},uB=[];function dB({completers:e=uB}){const{name:t}=_();return(0,a.useMemo)((()=>{let n=[...e,cB];return(t===(0,l.getDefaultBlockName)()||(0,l.getBlockSupport)(t,"__experimentalSlashInserter",!1))&&(n=[...n,iB]),(0,d.hasFilter)("editor.Autocomplete.completers")&&(n===e&&(n=n.map((e=>({...e})))),n=(0,d.applyFilters)("editor.Autocomplete.completers",n,t)),n}),[e,t])}const pB=function(e){return(0,$.jsx)(os.Autocomplete,{...e,completers:dB(e)})},hB=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M6 4a2 2 0 0 0-2 2v3h1.5V6a.5.5 0 0 1 .5-.5h3V4H6Zm3 14.5H6a.5.5 0 0 1-.5-.5v-3H4v3a2 2 0 0 0 2 2h3v-1.5Zm6 1.5v-1.5h3a.5.5 0 0 0 .5-.5v-3H20v3a2 2 0 0 1-2 2h-3Zm3-16a2 2 0 0 1 2 2v3h-1.5V6a.5.5 0 0 0-.5-.5h-3V4h3Z"})});const gB=function({isActive:e,label:t=(0,C.__)("Toggle full height"),onToggle:n,isDisabled:o}){return(0,$.jsx)(os.ToolbarButton,{isActive:e,icon:hB,label:t,onClick:()=>n(!e),disabled:o})},mB=()=>{};const fB=function(e){const{label:t=(0,C.__)("Change matrix alignment"),onChange:n=mB,value:o="center",isDisabled:r}=e,i=(0,$.jsx)(os.AlignmentMatrixControl.Icon,{value:o});return(0,$.jsx)(os.Dropdown,{popoverProps:{placement:"bottom-start"},renderToggle:({onToggle:e,isOpen:n})=>(0,$.jsx)(os.ToolbarButton,{onClick:e,"aria-haspopup":"true","aria-expanded":n,onKeyDown:t=>{n||t.keyCode!==va.DOWN||(t.preventDefault(),e())},label:t,icon:i,showTooltip:!0,disabled:r}),renderContent:()=>(0,$.jsx)(os.AlignmentMatrixControl,{hasFocusBorder:!1,onChange:n,value:o})})};function bB({clientId:e,maximumLength:t,context:n}){const o=(0,c.useSelect)((t=>{if(!e)return null;const{getBlockName:o,getBlockAttributes:r}=t(li),{getBlockType:i,getActiveBlockVariation:s}=t(l.store),a=o(e),c=i(a);if(!c)return null;const u=r(e),d=(0,l.__experimentalGetBlockLabel)(c,u,n);if(d!==c.title)return d;const p=s(a,u);return p?.title||c.title}),[e,n]);if(!o)return null;if(t&&t>0&&o.length>t){const e="...";return o.slice(0,t-e.length)+e}return o}function kB({clientId:e,maximumLength:t,context:n}){return bB({clientId:e,maximumLength:t,context:n})}function vB(e){var t,n;if(!e)return null;const o=null!==(t=Array.from(document.querySelectorAll('iframe[name="editor-canvas"]').values()).find((t=>(t.contentDocument||t.contentWindow.document)===e.ownerDocument)))&&void 0!==t?t:e;return null!==(n=o?.closest('[role="region"]'))&&void 0!==n?n:o}const _B=function({rootLabelText:e}){const{selectBlock:t,clearSelectedBlock:n}=(0,c.useDispatch)(li),{clientId:o,parents:r,hasSelection:i}=(0,c.useSelect)((e=>{const{getSelectionStart:t,getSelectedBlockClientId:n,getEnabledBlockParents:o}=te(e(li)),r=n();return{parents:o(r),clientId:r,hasSelection:!!t().clientId}}),[]),s=e||(0,C.__)("Document"),l=(0,a.useRef)();return kp(o,l),(0,$.jsxs)("ul",{className:"block-editor-block-breadcrumb",role:"list","aria-label":(0,C.__)("Block breadcrumb"),children:[(0,$.jsxs)("li",{className:i?void 0:"block-editor-block-breadcrumb__current","aria-current":i?void 0:"true",children:[i&&(0,$.jsx)(os.Button,{size:"small",className:"block-editor-block-breadcrumb__button",onClick:()=>{const e=l.current?.closest(".editor-styles-wrapper");n(),vB(e)?.focus()},children:s}),!i&&s,!!o&&(0,$.jsx)(hl,{icon:Ta,className:"block-editor-block-breadcrumb__separator"})]}),r.map((e=>(0,$.jsxs)("li",{children:[(0,$.jsx)(os.Button,{size:"small",className:"block-editor-block-breadcrumb__button",onClick:()=>t(e),children:(0,$.jsx)(kB,{clientId:e,maximumLength:35})}),(0,$.jsx)(hl,{icon:Ta,className:"block-editor-block-breadcrumb__separator"})]},e))),!!o&&(0,$.jsx)("li",{className:"block-editor-block-breadcrumb__current","aria-current":"true",children:(0,$.jsx)(kB,{clientId:o,maximumLength:35})})]})};function xB(e){return(0,c.useSelect)((t=>{const{__unstableHasActiveBlockOverlayActive:n}=t(li);return n(e)}),[e])}const yB={placement:"top-start"},SB={...yB,flip:!1,shift:!0},wB={...yB,flip:!0,shift:!1};function CB(e,t,n,o,r){if(!e||!t)return SB;const i=n?.scrollTop||0,s=Yg(t),l=i+e.getBoundingClientRect().top,a=e.ownerDocument.documentElement.clientHeight,c=l+o,u=s.top>c,d=s.height>a-o;return r||!u&&!d?wB:SB}function BB({contentElement:e,clientId:t}){const n=vp(t),[o,r]=(0,a.useState)(0),{blockIndex:i,isSticky:s}=(0,c.useSelect)((e=>{const{getBlockIndex:n,getBlockAttributes:o}=e(li);return{blockIndex:n(t),isSticky:Qm(o(t))}}),[t]),l=(0,a.useMemo)((()=>{if(e)return(0,ba.getScrollContainer)(e)}),[e]),[d,p]=(0,a.useState)((()=>CB(e,n,l,o,s))),h=(0,u.useRefEffect)((e=>{r(e.offsetHeight)}),[]),g=(0,a.useCallback)((()=>p(CB(e,n,l,o,s))),[e,n,l,o]);return(0,a.useLayoutEffect)(g,[i,g]),(0,a.useLayoutEffect)((()=>{if(!e||!n)return;const t=e?.ownerDocument?.defaultView;let o;t?.addEventHandler?.("resize",g);const r=n?.ownerDocument?.defaultView;return r.ResizeObserver&&(o=new r.ResizeObserver(g),o.observe(n)),()=>{t?.removeEventHandler?.("resize",g),o&&o.disconnect()}}),[g,e,n]),{...d,ref:h}}function IB(e){const t=(0,c.useSelect)((t=>{const{getBlockRootClientId:n,getBlockParents:o,__experimentalGetBlockListSettingsForBlocks:r,isBlockInsertionPointVisible:i,getBlockInsertionPoint:s,getBlockOrder:l,hasMultiSelection:a,getLastMultiSelectedBlockClientId:c}=t(li),u=o(e),d=r(u),p=u.find((e=>d[e]?.__experimentalCaptureToolbars));let h=!1;if(i()){const t=s();h=l(t.rootClientId)[t.index]===e}return{capturingClientId:p,isInsertionPointVisible:h,lastClientId:a()?c():null,rootClientId:n(e)}}),[e]);return t}function jB({clientId:e,__unstableContentRef:t}){const{capturingClientId:n,isInsertionPointVisible:o,lastClientId:r,rootClientId:i}=IB(e),s=BB({contentElement:t?.current,clientId:e});return(0,$.jsx)(tm,{clientId:n||e,bottomClientId:r,className:Zi("block-editor-block-list__block-side-inserter-popover",{"is-insertion-point-visible":o}),__unstableContentRef:t,...s,children:(0,$.jsx)("div",{className:"block-editor-block-list__empty-block-inserter",children:(0,$.jsx)(tC,{position:"bottom right",rootClientId:i,clientId:e,__experimentalIsQuick:!0})})})}const EB=({appendToOwnerDocument:e,children:t,clientIds:n,cloneClassname:o,elementId:r,onDragStart:i,onDragEnd:s,fadeWhenDisabled:d=!1,dragComponent:p})=>{const{srcRootClientId:h,isDraggable:g,icon:m,visibleInserter:f,getBlockType:b}=(0,c.useSelect)((e=>{const{canMoveBlocks:t,getBlockRootClientId:o,getBlockName:r,getBlockAttributes:i,isBlockInsertionPointVisible:s}=e(li),{getBlockType:a,getActiveBlockVariation:c}=e(l.store),u=o(n[0]),d=r(n[0]),p=c(d,i(n[0]));return{srcRootClientId:u,isDraggable:t(n),icon:p?.icon||a(d)?.icon,visibleInserter:s(),getBlockType:a}}),[n]),k=(0,a.useRef)(!1),[v,_,x]=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,ba.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,i=e.current-n.current.offsetTop,s=o.clientY-n.current.offsetTop;if(o.clientY>i){const e=Math.max(r-i-50,0),n=Math.max(s-i-50,0),o=0===e||0===n?0:n/e;t.current=25*o}else if(o.clientY<i){const e=Math.max(i-50,0),n=Math.max(i-s-50,0),o=0===e||0===n?0:n/e;t.current=-25*o}else t.current=0}),[]),()=>{e.current=null,n.current=null,o.current&&(clearInterval(o.current),o.current=null)}]}(),{getAllowedBlocks:y,getBlockNamesByClientId:S,getBlockRootClientId:w}=(0,c.useSelect)(li),{startDraggingBlocks:C,stopDraggingBlocks:B}=(0,c.useDispatch)(li);(0,a.useEffect)((()=>()=>{k.current&&B()}),[]);const I=vp(n[0]),j=I?.closest("body");if((0,a.useEffect)((()=>{if(!j||!d)return;const e=(0,u.throttle)((e=>{if(!e.target.closest("[data-block]"))return;const t=S(n),o=e.target.closest("[data-block]").getAttribute("data-block"),r=y(o),i=S([o])[0];let s;if(0===r?.length){const e=w(o),n=S([e])[0],r=y(e);s=Ox(b,r,t,n)}else s=Ox(b,r,t,i);s||f?window?.document?.body?.classList?.remove("block-draggable-invalid-drag-token"):window?.document?.body?.classList?.add("block-draggable-invalid-drag-token")}),200);return j.addEventListener("dragover",e),()=>{j.removeEventListener("dragover",e)}}),[n,j,d,y,S,w,b,f]),!g)return t({draggable:!1});const E={type:"block",srcClientIds:n,srcRootClientId:h};return(0,$.jsx)(os.Draggable,{appendToOwnerDocument:e,cloneClassname:o,__experimentalTransferDataType:"wp-blocks",transferData:E,onDragStart:e=>{window.requestAnimationFrame((()=>{C(n),k.current=!0,v(e),i&&i()}))},onDragOver:_,onDragEnd:()=>{B(),k.current=!1,x(),s&&s()},__experimentalDragComponent:void 0!==p?p:(0,$.jsx)(dS,{count:n.length,icon:m,fadeWhenDisabled:!0}),elementId:r,children:({onDraggableStart:e,onDraggableEnd:n})=>t({draggable:!0,onDragStart:e,onDragEnd:n})})},TB=(e,t)=>"up"===e?"horizontal"===t?(0,C.isRTL)()?"right":"left":"up":"down"===e?"horizontal"===t?(0,C.isRTL)()?"left":"right":"down":null;function MB(e,t,n,o,r,i,s){const l=n+1;if(e>1)return function(e,t,n,o,r,i){const s=t+1;if(n&&o)return(0,C.__)("All blocks are selected, and cannot be moved");if(r>0&&!o){const t=TB("down",i);if("down"===t)return(0,C.sprintf)((0,C.__)("Move %1$d blocks from position %2$d down by one place"),e,s);if("left"===t)return(0,C.sprintf)((0,C.__)("Move %1$d blocks from position %2$d left by one place"),e,s);if("right"===t)return(0,C.sprintf)((0,C.__)("Move %1$d blocks from position %2$d right by one place"),e,s)}if(r>0&&o){const e=TB("down",i);if("down"===e)return(0,C.__)("Blocks cannot be moved down as they are already at the bottom");if("left"===e)return(0,C.__)("Blocks cannot be moved left as they are already are at the leftmost position");if("right"===e)return(0,C.__)("Blocks cannot be moved right as they are already are at the rightmost position")}if(r<0&&!n){const t=TB("up",i);if("up"===t)return(0,C.sprintf)((0,C.__)("Move %1$d blocks from position %2$d up by one place"),e,s);if("left"===t)return(0,C.sprintf)((0,C.__)("Move %1$d blocks from position %2$d left by one place"),e,s);if("right"===t)return(0,C.sprintf)((0,C.__)("Move %1$d blocks from position %2$d right by one place"),e,s)}if(r<0&&n){const e=TB("up",i);if("up"===e)return(0,C.__)("Blocks cannot be moved up as they are already at the top");if("left"===e)return(0,C.__)("Blocks cannot be moved left as they are already are at the leftmost position");if("right"===e)return(0,C.__)("Blocks cannot be moved right as they are already are at the rightmost position")}}(e,n,o,r,i,s);if(o&&r)return(0,C.sprintf)((0,C.__)("Block %s is the only block, and cannot be moved"),t);if(i>0&&!r){const e=TB("down",s);if("down"===e)return(0,C.sprintf)((0,C.__)("Move %1$s block from position %2$d down to position %3$d"),t,l,l+1);if("left"===e)return(0,C.sprintf)((0,C.__)("Move %1$s block from position %2$d left to position %3$d"),t,l,l+1);if("right"===e)return(0,C.sprintf)((0,C.__)("Move %1$s block from position %2$d right to position %3$d"),t,l,l+1)}if(i>0&&r){const e=TB("down",s);if("down"===e)return(0,C.sprintf)((0,C.__)("Block %1$s is at the end of the content and can’t be moved down"),t);if("left"===e)return(0,C.sprintf)((0,C.__)("Block %1$s is at the end of the content and can’t be moved left"),t);if("right"===e)return(0,C.sprintf)((0,C.__)("Block %1$s is at the end of the content and can’t be moved right"),t)}if(i<0&&!o){const e=TB("up",s);if("up"===e)return(0,C.sprintf)((0,C.__)("Move %1$s block from position %2$d up to position %3$d"),t,l,l-1);if("left"===e)return(0,C.sprintf)((0,C.__)("Move %1$s block from position %2$d left to position %3$d"),t,l,l-1);if("right"===e)return(0,C.sprintf)((0,C.__)("Move %1$s block from position %2$d right to position %3$d"),t,l,l-1)}if(i<0&&o){const e=TB("up",s);if("up"===e)return(0,C.sprintf)((0,C.__)("Block %1$s is at the beginning of the content and can’t be moved up"),t);if("left"===e)return(0,C.sprintf)((0,C.__)("Block %1$s is at the beginning of the content and can’t be moved left"),t);if("right"===e)return(0,C.sprintf)((0,C.__)("Block %1$s is at the beginning of the content and can’t be moved right"),t)}}const PB=(e,t)=>"up"===e?"horizontal"===t?(0,C.isRTL)()?Hf:Gf:gC:"down"===e?"horizontal"===t?(0,C.isRTL)()?Gf:Hf:mC:null,RB=(e,t)=>"up"===e?"horizontal"===t?(0,C.isRTL)()?(0,C.__)("Move right"):(0,C.__)("Move left"):(0,C.__)("Move up"):"down"===e?"horizontal"===t?(0,C.isRTL)()?(0,C.__)("Move left"):(0,C.__)("Move right"):(0,C.__)("Move down"):null,NB=(0,a.forwardRef)((({clientIds:e,direction:t,orientation:n,...o},r)=>{const i=(0,u.useInstanceId)(NB),s=Array.isArray(e)?e:[e],a=s.length,{disabled:d}=o,{blockType:p,isDisabled:h,rootClientId:g,isFirst:m,isLast:f,firstIndex:b,orientation:k="vertical"}=(0,c.useSelect)((e=>{const{getBlockIndex:o,getBlockRootClientId:r,getBlockOrder:i,getBlock:a,getBlockListSettings:c}=e(li),u=s[0],p=r(u),h=o(u),g=o(s[s.length-1]),m=i(p),f=a(u),b=0===h,k=g===m.length-1,{orientation:v}=c(p)||{};return{blockType:f?(0,l.getBlockType)(f.name):null,isDisabled:d||("up"===t?b:k),rootClientId:p,firstIndex:h,isFirst:b,isLast:k,orientation:n||v}}),[e,t]),{moveBlocksDown:v,moveBlocksUp:_}=(0,c.useDispatch)(li),x="up"===t?_:v,y=`block-editor-block-mover-button__description-${i}`;return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,ref:r,className:Zi("block-editor-block-mover-button",`is-${t}-button`),icon:PB(t,k),label:RB(t,k),"aria-describedby":y,...o,onClick:h?null:t=>{x(e,g),o.onClick&&o.onClick(t)},disabled:h,accessibleWhenDisabled:!0}),(0,$.jsx)(os.VisuallyHidden,{id:y,children:MB(a,p&&p.title,b,m,f,"up"===t?-1:1,k)})]})})),LB=(0,a.forwardRef)(((e,t)=>(0,$.jsx)(NB,{direction:"up",ref:t,...e}))),AB=(0,a.forwardRef)(((e,t)=>(0,$.jsx)(NB,{direction:"down",ref:t,...e})));const DB=function({clientIds:e,hideDragHandle:t,isBlockMoverUpButtonDisabled:n,isBlockMoverDownButtonDisabled:o}){const{canMove:r,rootClientId:i,isFirst:s,isLast:l,orientation:a,isManualGrid:u}=(0,c.useSelect)((t=>{var n;const{getBlockIndex:o,getBlockListSettings:r,canMoveBlocks:i,getBlockOrder:s,getBlockRootClientId:l,getBlockAttributes:a}=t(li),c=Array.isArray(e)?e:[e],u=c[0],d=l(u),p=o(u),h=o(c[c.length-1]),g=s(d),{layout:m={}}=null!==(n=a(d))&&void 0!==n?n:{};return{canMove:i(e),rootClientId:d,isFirst:0===p,isLast:h===g.length-1,orientation:r(d)?.orientation,isManualGrid:"grid"===m.type&&m.isManualPlacement&&window.__experimentalEnableGridInteractivity}}),[e]);return!r||s&&l&&!i||t&&u?null:(0,$.jsxs)(os.ToolbarGroup,{className:Zi("block-editor-block-mover",{"is-horizontal":"horizontal"===a}),children:[!t&&(0,$.jsx)(EB,{clientIds:e,fadeWhenDisabled:!0,children:e=>(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,icon:uS,className:"block-editor-block-mover__drag-handle",label:(0,C.__)("Drag"),tabIndex:"-1",...e})}),!u&&(0,$.jsxs)("div",{className:"block-editor-block-mover__move-button-container",children:[(0,$.jsx)(os.ToolbarItem,{children:t=>(0,$.jsx)(LB,{disabled:n,clientIds:e,...t})}),(0,$.jsx)(os.ToolbarItem,{children:t=>(0,$.jsx)(AB,{disabled:o,clientIds:e,...t})})]})]})},{clearTimeout:OB,setTimeout:zB}=window,VB=200;function FB({ref:e,isFocused:t,highlightParent:n,debounceTimeout:o=VB}){const{getSelectedBlockClientId:r,getBlockRootClientId:i}=(0,c.useSelect)(li),{toggleBlockHighlight:s}=(0,c.useDispatch)(li),l=(0,a.useRef)(),u=(0,c.useSelect)((e=>e(li).getSettings().isDistractionFree),[]),d=e=>{if(e&&u)return;const t=r(),o=n?i(t):t;s(o,e)},p=()=>{const n=e?.current&&e.current.matches(":hover");return!t&&!n},h=()=>{const e=l.current;e&&OB&&OB(e)};return(0,a.useEffect)((()=>()=>{d(!1),h()}),[]),{debouncedShowGestures:e=>{e&&e.stopPropagation(),h(),d(!0)},debouncedHideGestures:e=>{e&&e.stopPropagation(),h(),l.current=zB((()=>{p()&&d(!1)}),o)}}}function HB({ref:e,highlightParent:t=!1,debounceTimeout:n=VB}){const[o,r]=(0,a.useState)(!1),{debouncedShowGestures:i,debouncedHideGestures:s}=FB({ref:e,debounceTimeout:n,isFocused:o,highlightParent:t}),l=(0,a.useRef)(!1),c=()=>e?.current&&e.current.contains(e.current.ownerDocument.activeElement);return(0,a.useEffect)((()=>{const t=e.current,n=()=>{c()&&(r(!0),i())},o=()=>{c()||(r(!1),s())};return t&&!l.current&&(t.addEventListener("focus",n,!0),t.addEventListener("blur",o,!0),l.current=!0),()=>{t&&(t.removeEventListener("focus",n),t.removeEventListener("blur",o))}}),[e,l,r,i,s]),{onMouseMove:i,onMouseLeave:s}}function GB(){const{selectBlock:e}=(0,c.useDispatch)(li),{firstParentClientId:t,isVisible:n}=(0,c.useSelect)((e=>{const{getBlockName:t,getBlockParents:n,getSelectedBlockClientId:o,getBlockEditingMode:r}=e(li),{hasBlockSupport:i}=e(l.store),s=n(o()),a=s[s.length-1],c=t(a),u=(0,l.getBlockType)(c);return{firstParentClientId:a,isVisible:a&&"default"===r(a)&&i(u,"__experimentalParentSelector",!0)}}),[]),o=Um(t),r=(0,a.useRef)(),i=HB({ref:r,highlightParent:!0});return n?(0,$.jsx)("div",{className:"block-editor-block-parent-selector",ref:r,...i,children:(0,$.jsx)(os.ToolbarButton,{className:"block-editor-block-parent-selector__button",onClick:()=>e(t),label:(0,C.sprintf)((0,C.__)("Select parent block: %s"),o?.title),showTooltip:!0,icon:(0,$.jsx)(Uf,{icon:o?.icon})})},t):null}const $B=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5 4.5h11a.5.5 0 0 1 .5.5v11a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V5a.5.5 0 0 1 .5-.5ZM3 5a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5Zm17 3v10.75c0 .69-.56 1.25-1.25 1.25H6v1.5h12.75a2.75 2.75 0 0 0 2.75-2.75V8H20Z"})});function UB({blocks:e}){return(0,u.useViewportMatch)("medium","<")?null:(0,$.jsx)("div",{className:"block-editor-block-switcher__popover-preview-container",children:(0,$.jsx)(os.Popover,{className:"block-editor-block-switcher__popover-preview",placement:"right-start",focusOnMount:!1,offset:16,children:(0,$.jsxs)("div",{className:"block-editor-block-switcher__preview",children:[(0,$.jsx)("div",{className:"block-editor-block-switcher__preview-title",children:(0,C.__)("Preview")}),(0,$.jsx)(sS,{viewportWidth:500,blocks:e})]})})})}const WB={};function KB({item:e,onSelect:t,setHoveredTransformItemName:n}){const{name:o,icon:r,title:i}=e;return(0,$.jsxs)(os.MenuItem,{className:(0,l.getBlockMenuDefaultClassName)(o),onClick:e=>{e.preventDefault(),t(o)},onMouseLeave:()=>n(null),onMouseEnter:()=>n(o),children:[(0,$.jsx)(Uf,{icon:r,showColors:!0}),i]})}const ZB=({transformations:e,onSelect:t,blocks:n})=>{const[o,r]=(0,a.useState)();return(0,$.jsxs)($.Fragment,{children:[o&&(0,$.jsx)(UB,{blocks:(0,l.cloneBlock)(n[0],e.find((({name:e})=>e===o)).attributes)}),e?.map((e=>(0,$.jsx)(KB,{item:e,onSelect:t,setHoveredTransformItemName:r},e.name)))]})};function qB({restTransformations:e,onSelect:t,setHoveredTransformItemName:n}){return e.map((e=>(0,$.jsx)(YB,{item:e,onSelect:t,setHoveredTransformItemName:n},e.name)))}function YB({item:e,onSelect:t,setHoveredTransformItemName:n}){const{name:o,icon:r,title:i,isDisabled:s}=e;return(0,$.jsxs)(os.MenuItem,{className:(0,l.getBlockMenuDefaultClassName)(o),onClick:e=>{e.preventDefault(),t(o)},disabled:s,onMouseLeave:()=>n(null),onMouseEnter:()=>n(o),children:[(0,$.jsx)(Uf,{icon:r,showColors:!0}),i]})}const XB=({className:e,possibleBlockTransformations:t,possibleBlockVariationTransformations:n,onSelect:o,onSelectVariation:r,blocks:i})=>{const[s,c]=(0,a.useState)(),{priorityTextTransformations:u,restTransformations:d}=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),o=e.reduce(((e,t)=>{const{name:o}=t;return n.includes(o)?e.priorityTextTransformations.push(t):e.restTransformations.push(t),e}),{priorityTextTransformations:[],restTransformations:[]});if(1===o.priorityTextTransformations.length&&"core/quote"===o.priorityTextTransformations[0].name){const e=o.priorityTextTransformations.pop();o.restTransformations.push(e)}return o}),[e]);return n.priorityTextTransformations.sort((({name:e},{name:n})=>t[e]<t[n]?-1:1)),n}(t),p=u.length&&d.length,h=!!d.length&&(0,$.jsx)(qB,{restTransformations:d,onSelect:o,setHoveredTransformItemName:c});return(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(os.MenuGroup,{label:(0,C.__)("Transform to"),className:e,children:[s&&(0,$.jsx)(UB,{blocks:(0,l.switchToBlockType)(i,s)}),!!n?.length&&(0,$.jsx)(ZB,{transformations:n,blocks:i,onSelect:r}),u.map((e=>(0,$.jsx)(YB,{item:e,onSelect:o,setHoveredTransformItemName:c},e.name))),!p&&h]}),!!p&&(0,$.jsx)(os.MenuGroup,{className:e,children:h})]})};function QB(e,t,n){const o=new(Bh())(e);return t&&o.remove("is-style-"+t.name),o.add("is-style-"+n.name),o.value}function JB(e){return e?.find((e=>e.isDefault))}function eI({clientId:e,onSwitch:t}){const{styles:n,block:o,blockType:r,className:i}=(0,c.useSelect)((t=>{const{getBlock:n}=t(li),o=n(e);if(!o)return{};const r=(0,l.getBlockType)(o.name),{getBlockStyles:i}=t(l.store);return{block:o,blockType:r,styles:i(o.name),className:o.attributes.className||""}}),[e]),{updateBlockAttributes:s}=(0,c.useDispatch)(li),u=function(e){return e&&0!==e.length?JB(e)?e:[{name:"default",label:(0,C._x)("Default","block style"),isDefault:!0},...e]:[]}(n),d=function(e,t){for(const n of new(Bh())(t).values()){if(-1===n.indexOf("is-style-"))continue;const t=n.substring(9),o=e?.find((({name:e})=>e===t));if(o)return o}return JB(e)}(u,i),p=function(e,t){return(0,a.useMemo)((()=>{const n=t?.example,o=t?.name;return n&&o?(0,l.getBlockFromExample)(o,{attributes:n.attributes,innerBlocks:n.innerBlocks}):e?(0,l.cloneBlock)(e):void 0}),[t?.example?e?.name:e,t])}(o,r);return{onSelect:n=>{const o=QB(i,d,n);s(e,{className:o}),t()},stylesToRender:u,activeStyle:d,genericPreviewBlock:p,className:i}}const tI=()=>{};function nI({clientId:e,onSwitch:t=tI}){const{onSelect:n,stylesToRender:o,activeStyle:r}=eI({clientId:e,onSwitch:t});return o&&0!==o.length?(0,$.jsx)($.Fragment,{children:o.map((e=>{const t=e.label||e.name;return(0,$.jsx)(os.MenuItem,{icon:r.name===e.name?cd:null,onClick:()=>n(e),children:(0,$.jsx)(os.__experimentalText,{as:"span",limit:18,ellipsizeMode:"tail",truncate:!0,children:t})},e.name)}))}):null}function oI({hoveredBlock:e,onSwitch:t}){const{clientId:n}=e;return(0,$.jsx)(os.MenuGroup,{label:(0,C.__)("Styles"),className:"block-editor-block-switcher__styles__menugroup",children:(0,$.jsx)(nI,{clientId:n,onSwitch:t})})}const rI=(e,t,n=new Set)=>{const{clientId:o,name:r,innerBlocks:i=[]}=e;if(!n.has(o)){if(r===t)return e;for(const e of i){const o=rI(e,t,n);if(o)return o}}},iI=(e,t)=>{const n=((e,t)=>{const n=(0,l.getBlockAttributesNamesByRole)(e,"content");return n?.length?n.reduce(((e,n)=>(t[n]&&(e[n]=t[n]),e)),{}):t})(t.name,t.attributes);e.attributes={...e.attributes,...n}},sI=(e,t)=>(0,a.useMemo)((()=>e.reduce(((e,n)=>{const o=((e,t)=>{const n=t.map((e=>(0,l.cloneBlock)(e))),o=new Set;for(const t of e){let e=!1;for(const r of n){const n=rI(r,t.name,o);if(n){e=!0,o.add(n.clientId),iI(n,t);break}}if(!e)return}return n})(t,n.blocks);return o&&e.push({...n,transformedBlocks:o}),e}),[])),[e,t]);function lI({patterns:e,onSelect:t}){const n=(0,u.useViewportMatch)("medium","<");return(0,$.jsx)("div",{className:"block-editor-block-switcher__popover-preview-container",children:(0,$.jsx)(os.Popover,{className:"block-editor-block-switcher__popover-preview",placement:n?"bottom":"right-start",offset:16,children:(0,$.jsx)("div",{className:"block-editor-block-switcher__preview is-pattern-list-preview",children:(0,$.jsx)(aI,{patterns:e,onSelect:t})})})})}function aI({patterns:e,onSelect:t}){return(0,$.jsx)(os.Composite,{role:"listbox",className:"block-editor-block-switcher__preview-patterns-container","aria-label":(0,C.__)("Patterns list"),children:e.map((e=>(0,$.jsx)(cI,{pattern:e,onSelect:t},e.name)))})}function cI({pattern:e,onSelect:t}){const n="block-editor-block-switcher__preview-patterns-container",o=(0,u.useInstanceId)(cI,`${n}-list__item-description`);return(0,$.jsxs)("div",{className:`${n}-list__list-item`,children:[(0,$.jsxs)(os.Composite.Item,{render:(0,$.jsx)("div",{role:"option","aria-label":e.title,"aria-describedby":e.description?o:void 0,className:`${n}-list__item`}),onClick:()=>t(e.transformedBlocks),children:[(0,$.jsx)(sS,{blocks:e.transformedBlocks,viewportWidth:e.viewportWidth||500}),(0,$.jsx)("div",{className:`${n}-list__item-title`,children:e.title})]}),!!e.description&&(0,$.jsx)(os.VisuallyHidden,{id:o,children:e.description})]})}const uI=function({blocks:e,patterns:t,onSelect:n}){const[o,r]=(0,a.useState)(!1),i=sI(t,e);return i.length?(0,$.jsxs)(os.MenuGroup,{className:"block-editor-block-switcher__pattern__transforms__menugroup",children:[o&&(0,$.jsx)(lI,{patterns:i,onSelect:n}),(0,$.jsx)(os.MenuItem,{onClick:e=>{e.preventDefault(),r(!o)},icon:Hf,children:(0,C.__)("Patterns")})]}):null};function dI({onClose:e,clientIds:t,hasBlockStyles:n,canRemove:o,isUsingBindings:r}){const{replaceBlocks:i,multiSelect:s,updateBlockAttributes:u}=(0,c.useDispatch)(li),{possibleBlockTransformations:d,patterns:p,blocks:h}=(0,c.useSelect)((e=>{const{getBlocksByClientId:n,getBlockRootClientId:o,getBlockTransformItems:r,__experimentalGetPatternTransformItems:i}=e(li),s=o(Array.isArray(t)?t[0]:t),l=n(t);return{blocks:l,possibleBlockTransformations:r(l,s),patterns:i(l,s)}}),[t]),g=function({clientIds:e,blocks:t}){const{activeBlockVariation:n,blockVariationTransformations:o}=(0,c.useSelect)((n=>{const{getBlockAttributes:o,canRemoveBlocks:r}=n(li),{getActiveBlockVariation:i,getBlockVariations:s}=n(l.store),a=r(e);if(1!==t.length||!a)return WB;const[c]=t;return{blockVariationTransformations:s(c.name,"transform"),activeBlockVariation:i(c.name,o(c.clientId))}}),[e,t]);return(0,a.useMemo)((()=>o?.filter((({name:e})=>e!==n?.name))),[o,n])}({clientIds:t,blocks:h});function m(e){e.length>1&&s(e[0].clientId,e[e.length-1].clientId)}const f=1===h.length,b=f&&(0,l.isTemplatePart)(h[0]),k=!!d.length&&o&&!b,v=!!g?.length,_=!!p?.length&&o,x=k||v;if(!(n||x||_))return(0,$.jsx)("p",{className:"block-editor-block-switcher__no-transforms",children:(0,C.__)("No transforms.")});const y=f?(0,C._x)("This block is connected.","block toolbar button label and description"):(0,C._x)("These blocks are connected.","block toolbar button label and description");return(0,$.jsxs)("div",{className:"block-editor-block-switcher__container",children:[_&&(0,$.jsx)(uI,{blocks:h,patterns:p,onSelect:n=>{!function(e){i(t,e),m(e)}(n),e()}}),x&&(0,$.jsx)(XB,{className:"block-editor-block-switcher__transforms__menugroup",possibleBlockTransformations:d,possibleBlockVariationTransformations:g,blocks:h,onSelect:n=>{!function(e){const n=(0,l.switchToBlockType)(h,e);i(t,n),m(n)}(n),e()},onSelectVariation:t=>{!function(e){u(h[0].clientId,{...g.find((({name:t})=>t===e)).attributes})}(t),e()}}),n&&(0,$.jsx)(oI,{hoveredBlock:h[0],onSwitch:e}),r&&(0,$.jsx)(os.MenuGroup,{children:(0,$.jsx)(os.__experimentalText,{className:"block-editor-block-switcher__binding-indicator",children:y})})]})}const pI=({icon:e,showTitle:t,blockTitle:n})=>(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Uf,{className:"block-editor-block-switcher__toggle",icon:e,showColors:!0}),t&&n&&(0,$.jsx)("span",{className:"block-editor-block-switcher__toggle-text",children:n})]}),hI=({clientIds:e,disabled:t,isUsingBindings:n})=>{const{hasContentOnlyLocking:o,canRemove:r,hasBlockStyles:i,icon:s,invalidBlocks:a,isReusable:u,isTemplate:d}=(0,c.useSelect)((t=>{const{getTemplateLock:n,getBlocksByClientId:o,getBlockAttributes:r,canRemoveBlocks:i}=t(li),{getBlockStyles:s,getBlockType:a,getActiveBlockVariation:c}=t(l.store),u=o(e);if(!u.length||u.some((e=>!e)))return{invalidBlocks:!0};const[{name:d}]=u,p=1===u.length,h=a(d);let g,m;if(p){const t=c(d,r(e[0]));g=t?.icon||h.icon,m="contentOnly"===n(e[0])}else{const t=1===new Set(u.map((({name:e})=>e))).size;m=e.some((e=>"contentOnly"===n(e))),g=t?h.icon:$B}return{canRemove:i(e),hasBlockStyles:p&&!!s(d)?.length,icon:g,isReusable:p&&(0,l.isReusableBlock)(u[0]),isTemplate:p&&(0,l.isTemplatePart)(u[0]),hasContentOnlyLocking:m}}),[e]),p=bB({clientId:e?.[0],maximumLength:35});if(a)return null;const h=1===e.length,g=h?p:(0,C.__)("Multiple blocks selected");if(t||!i&&!r||o)return(0,$.jsx)(os.ToolbarGroup,{children:(0,$.jsx)(os.ToolbarButton,{disabled:!0,className:"block-editor-block-switcher__no-switcher-icon",title:g,icon:(0,$.jsx)(pI,{icon:s,showTitle:u||d,blockTitle:p})})});const m=h?(0,C.__)("Change block type or style"):(0,C.sprintf)((0,C._n)("Change type of %d block","Change type of %d blocks",e.length),e.length);return(0,$.jsx)(os.ToolbarGroup,{children:(0,$.jsx)(os.ToolbarItem,{children:t=>(0,$.jsx)(os.DropdownMenu,{className:"block-editor-block-switcher",label:g,popoverProps:{placement:"bottom-start",className:"block-editor-block-switcher__popover"},icon:(0,$.jsx)(pI,{icon:s,showTitle:u||d,blockTitle:p}),toggleProps:{description:m,...t},menuProps:{orientation:"both"},children:({onClose:t})=>(0,$.jsx)(dI,{onClose:t,clientIds:e,hasBlockStyles:i,canRemove:r,isUsingBindings:n})})})})},{Fill:gI,Slot:mI}=(0,os.createSlotFill)("__unstableBlockToolbarLastItem");gI.Slot=mI;const fI=gI,bI="align",kI="__experimentalBorder",vI="color",_I="customClassName",xI="typography.__experimentalFontFamily",yI="typography.fontSize",SI="typography.textAlign",wI="layout",CI=["shadow",...["typography.lineHeight",yI,"typography.__experimentalFontStyle","typography.__experimentalFontWeight",xI,SI,"typography.textColumns","typography.__experimentalTextDecoration","typography.__experimentalTextTransform","typography.__experimentalWritingMode","typography.__experimentalLetterSpacing"],kI,vI,"spacing"];const BI={align:e=>(0,l.hasBlockSupport)(e,bI),borderColor:e=>function(e,t="any"){if("web"!==a.Platform.OS)return!1;const n=(0,l.getBlockSupport)(e,kI);return!0===n||("any"===t?!!(n?.color||n?.radius||n?.width||n?.style):!!n?.[t])}(e,"color"),backgroundColor:e=>{const t=(0,l.getBlockSupport)(e,vI);return t&&!1!==t.background},textAlign:e=>(0,l.hasBlockSupport)(e,SI),textColor:e=>{const t=(0,l.getBlockSupport)(e,vI);return t&&!1!==t.text},gradient:e=>{const t=(0,l.getBlockSupport)(e,vI);return null!==t&&"object"==typeof t&&!!t.gradients},className:e=>(0,l.hasBlockSupport)(e,_I,!0),fontFamily:e=>(0,l.hasBlockSupport)(e,xI),fontSize:e=>(0,l.hasBlockSupport)(e,yI),layout:e=>(0,l.hasBlockSupport)(e,wI),style:e=>CI.some((t=>(0,l.hasBlockSupport)(e,t)))};function II(e,t){return Object.entries(BI).reduce(((n,[o,r])=>(r(e.name)&&r(t.name)&&(n[o]=e.attributes[o]),n)),{})}function jI(e,t,n){for(let o=0;o<Math.min(t.length,e.length);o+=1)n(e[o].clientId,II(t[o],e[o])),jI(e[o].innerBlocks,t[o].innerBlocks,n)}function EI(){const e=(0,c.useRegistry)(),{updateBlockAttributes:t}=(0,c.useDispatch)(li),{createSuccessNotice:n,createWarningNotice:o,createErrorNotice:r}=(0,c.useDispatch)(Uo.store);return(0,a.useCallback)((async i=>{let s="";try{if(!window.navigator.clipboard)return void r((0,C.__)("Unable to paste styles. This feature is only available on secure (https) sites in supporting browsers."),{type:"snackbar"});s=await window.navigator.clipboard.readText()}catch(e){return void r((0,C.__)("Unable to paste styles. Please allow browser clipboard permissions before continuing."),{type:"snackbar"})}if(!s||!function(e){try{const t=(0,l.parse)(e,{__unstableSkipMigrationLogs:!0,__unstableSkipAutop:!0});return 1!==t.length||"core/freeform"!==t[0].name}catch(e){return!1}}(s))return void o((0,C.__)("Unable to paste styles. Block styles couldn't be found within the copied content."),{type:"snackbar"});const a=(0,l.parse)(s);if(1===a.length?e.batch((()=>{jI(i,i.map((()=>a[0])),t)})):e.batch((()=>{jI(i,a,t)})),1===i.length){const e=(0,l.getBlockType)(i[0].name)?.title;n((0,C.sprintf)((0,C.__)("Pasted styles to %s."),e),{type:"snackbar"})}else n((0,C.sprintf)((0,C.__)("Pasted styles to %d blocks."),i.length),{type:"snackbar"})}),[e.batch,t,n,o,r])}function TI({clientIds:e,children:t,__experimentalUpdateSelection:n}){const{getDefaultBlockName:o,getGroupingBlockName:r}=(0,c.useSelect)(l.store),i=(0,c.useSelect)((t=>{const{canInsertBlockType:n,getBlockRootClientId:r,getBlocksByClientId:i,getDirectInsertBlock:s,canMoveBlocks:a,canRemoveBlocks:c}=t(li),u=i(e),d=r(e[0]),p=n(o(),d),h=d?s(d):null;return{canMove:a(e),canRemove:c(e),canInsertBlock:p||!!h,canCopyStyles:u.every((e=>!!e&&((0,l.hasBlockSupport)(e.name,"color")||(0,l.hasBlockSupport)(e.name,"typography")))),canDuplicate:u.every((e=>!!e&&(0,l.hasBlockSupport)(e.name,"multiple",!0)&&n(e.name,d)))}}),[e,o]),{getBlocksByClientId:s,getBlocks:a}=(0,c.useSelect)(li),{canMove:u,canRemove:d,canInsertBlock:p,canCopyStyles:h,canDuplicate:g}=i,{removeBlocks:m,replaceBlocks:f,duplicateBlocks:b,insertAfterBlock:k,insertBeforeBlock:v,flashBlock:_,setBlockMovingClientId:x,setNavigationMode:y,selectBlock:S}=(0,c.useDispatch)(li),w=xy(),C=EI();return t({canCopyStyles:h,canDuplicate:g,canInsertBlock:p,canMove:u,canRemove:d,onDuplicate:()=>b(e,n),onRemove:()=>m(e,n),onInsertBefore(){v(e[0])},onInsertAfter(){k(e[e.length-1])},onMoveTo(){y(!0),S(e[0]),x(e[0])},onGroup(){if(!e.length)return;const t=r(),n=(0,l.switchToBlockType)(s(e),t);n&&f(e,n)},onUngroup(){if(!e.length)return;const t=a(e[0]);t.length&&f(e,t)},onCopy(){1===e.length&&_(e[0]),w("copy",e)},async onPasteStyles(){await C(s(e))}})}const MI=function({clientId:e}){const t=(0,c.useSelect)((t=>t(li).getBlock(e)),[e]),{replaceBlocks:n}=(0,c.useDispatch)(li);return t&&"core/html"===t.name?(0,$.jsx)(os.MenuItem,{onClick:()=>n(e,(0,l.rawHandler)({HTML:(0,l.getBlockContent)(t)})),children:(0,C.__)("Convert to Blocks")}):null},{Fill:PI,Slot:RI}=(0,os.createSlotFill)("__unstableBlockSettingsMenuFirstItem");PI.Slot=RI;const NI=PI;function LI(e){return(0,c.useSelect)((t=>{const{getBlocksByClientId:n,getSelectedBlockClientIds:o,isUngroupable:r,isGroupable:i}=t(li),{getGroupingBlockName:s,getBlockType:a}=t(l.store),c=e?.length?e:o(),u=n(c),[d]=u,p=1===c.length&&r(c[0]);return{clientIds:c,isGroupable:i(c),isUngroupable:p,blocksSelection:u,groupingBlockName:s(),onUngroup:p&&a(d.name)?.transforms?.ungroup}}),[e])}function AI({clientIds:e,isGroupable:t,isUngroupable:n,onUngroup:o,blocksSelection:r,groupingBlockName:i,onClose:s=(()=>{})}){const{getSelectedBlockClientIds:a}=(0,c.useSelect)(li),{replaceBlocks:u}=(0,c.useDispatch)(li);if(!t&&!n)return null;const d=a();return(0,$.jsxs)($.Fragment,{children:[t&&(0,$.jsx)(os.MenuItem,{shortcut:d.length>1?va.displayShortcut.primary("g"):void 0,onClick:()=>{(()=>{const t=(0,l.switchToBlockType)(r,i);t&&u(e,t)})(),s()},children:(0,C._x)("Group","verb")}),n&&(0,$.jsx)(os.MenuItem,{onClick:()=>{(()=>{let t=r[0].innerBlocks;t.length&&(o&&(t=o(r[0].attributes,r[0].innerBlocks)),u(e,t))})(),s()},children:(0,C._x)("Ungroup","Ungrouping blocks from within a grouping block back into individual blocks within the Editor")})]})}function DI(e){return(0,c.useSelect)((t=>{const{canEditBlock:n,canMoveBlock:o,canRemoveBlock:r,canLockBlockType:i,getBlockName:s,getTemplateLock:l}=t(li),a=n(e),c=o(e),u=r(e);return{canEdit:a,canMove:c,canRemove:u,canLock:i(s(e)),isContentLocked:"contentOnly"===l(e),isLocked:!a||!c||!u}}),[e])}const OI=(0,$.jsx)(G.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,$.jsx)(G.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"})}),zI=(0,$.jsx)(G.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,$.jsx)(G.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-1zM9.8 7c0-1.2 1-2.2 2.2-2.2 1.2 0 2.2 1 2.2 2.2v3H9.8V7zm6.7 11.5h-9v-7h9v7z"})}),VI=(0,$.jsx)(G.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,$.jsx)(G.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"})}),FI=["core/block","core/navigation"];function HI(e){return e.remove&&e.move?"all":!(!e.remove||e.move)&&"insert"}function GI({clientId:e,onClose:t}){const[n,o]=(0,a.useState)({move:!1,remove:!1}),{canEdit:r,canMove:i,canRemove:s}=DI(e),{allowsEditLocking:u,templateLock:d,hasTemplateLock:p}=(0,c.useSelect)((t=>{const{getBlockName:n,getBlockAttributes:o}=t(li),r=n(e),i=(0,l.getBlockType)(r);return{allowsEditLocking:FI.includes(r),templateLock:o(e)?.templateLock,hasTemplateLock:!!i?.attributes?.templateLock}}),[e]),[h,g]=(0,a.useState)(!!d),{updateBlockAttributes:m}=(0,c.useDispatch)(li),f=Um(e);(0,a.useEffect)((()=>{o({move:!i,remove:!s,...u?{edit:!r}:{}})}),[r,i,s,u]);const b=Object.values(n).every(Boolean),k=Object.values(n).some(Boolean)&&!b;return(0,$.jsx)(os.Modal,{title:(0,C.sprintf)((0,C.__)("Lock %s"),f.title),overlayClassName:"block-editor-block-lock-modal",onRequestClose:t,children:(0,$.jsxs)("form",{onSubmit:o=>{o.preventDefault(),m([e],{lock:n,templateLock:h?HI(n):void 0}),t()},children:[(0,$.jsxs)("fieldset",{className:"block-editor-block-lock-modal__options",children:[(0,$.jsx)("legend",{children:(0,C.__)("Choose specific attributes to restrict or lock all available options.")}),(0,$.jsx)("ul",{role:"list",className:"block-editor-block-lock-modal__checklist",children:(0,$.jsxs)("li",{children:[(0,$.jsx)(os.CheckboxControl,{__nextHasNoMarginBottom:!0,className:"block-editor-block-lock-modal__options-all",label:(0,C.__)("Lock all"),checked:b,indeterminate:k,onChange:e=>o({move:e,remove:e,...u?{edit:e}:{}})}),(0,$.jsxs)("ul",{role:"list",className:"block-editor-block-lock-modal__checklist",children:[u&&(0,$.jsxs)("li",{className:"block-editor-block-lock-modal__checklist-item",children:[(0,$.jsx)(os.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,C.__)("Restrict editing"),checked:!!n.edit,onChange:e=>o((t=>({...t,edit:e})))}),(0,$.jsx)(os.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:n.edit?VI:OI})]}),(0,$.jsxs)("li",{className:"block-editor-block-lock-modal__checklist-item",children:[(0,$.jsx)(os.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,C.__)("Disable movement"),checked:n.move,onChange:e=>o((t=>({...t,move:e})))}),(0,$.jsx)(os.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:n.move?VI:OI})]}),(0,$.jsxs)("li",{className:"block-editor-block-lock-modal__checklist-item",children:[(0,$.jsx)(os.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,C.__)("Prevent removal"),checked:n.remove,onChange:e=>o((t=>({...t,remove:e})))}),(0,$.jsx)(os.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:n.remove?VI:OI})]})]})]})}),p&&(0,$.jsx)(os.ToggleControl,{__nextHasNoMarginBottom:!0,className:"block-editor-block-lock-modal__template-lock",label:(0,C.__)("Apply to all blocks inside"),checked:h,disabled:n.move&&!n.remove,onChange:()=>g(!h)})]}),(0,$.jsxs)(os.Flex,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1,children:[(0,$.jsx)(os.FlexItem,{children:(0,$.jsx)(os.Button,{variant:"tertiary",onClick:t,__next40pxDefaultSize:!0,children:(0,C.__)("Cancel")})}),(0,$.jsx)(os.FlexItem,{children:(0,$.jsx)(os.Button,{variant:"primary",type:"submit",__next40pxDefaultSize:!0,children:(0,C.__)("Apply")})})]})]})})}function $I({clientId:e}){const{canLock:t,isLocked:n}=DI(e),[o,r]=(0,a.useReducer)((e=>!e),!1);if(!t)return null;const i=n?(0,C.__)("Unlock"):(0,C.__)("Lock");return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(os.MenuItem,{icon:n?OI:zI,onClick:r,"aria-expanded":o,"aria-haspopup":"dialog",children:i}),o&&(0,$.jsx)(GI,{clientId:e,onClose:r})]})}const UI=()=>{};function WI({clientId:e,onToggle:t=UI}){const{blockType:n,mode:o,isCodeEditingEnabled:r}=(0,c.useSelect)((t=>{const{getBlock:n,getBlockMode:o,getSettings:r}=t(li),i=n(e);return{mode:o(e),blockType:i?(0,l.getBlockType)(i.name):null,isCodeEditingEnabled:r().codeEditingEnabled}}),[e]),{toggleBlockMode:i}=(0,c.useDispatch)(li);if(!n||!(0,l.hasBlockSupport)(n,"html",!0)||!r)return null;const s="visual"===o?(0,C.__)("Edit as HTML"):(0,C.__)("Edit visually");return(0,$.jsx)(os.MenuItem,{onClick:()=>{i(e),t()},children:s})}function KI({clientId:e,onClose:t}){const{templateLock:n,isLockedByParent:o,isEditingAsBlocks:r}=(0,c.useSelect)((t=>{const{getContentLockingParent:n,getTemplateLock:o,getTemporarilyEditingAsBlocks:r}=te(t(li));return{templateLock:o(e),isLockedByParent:!!n(e),isEditingAsBlocks:r()===e}}),[e]),i=(0,c.useDispatch)(li),s=!o&&"contentOnly"===n;if(!s&&!r)return null;const{modifyContentLockBlock:l}=te(i);return!r&&s&&(0,$.jsx)(os.MenuItem,{onClick:()=>{l(e),t()},children:(0,C._x)("Modify","Unlock content locked blocks")})}function ZI(e){return 0===e?.trim()?.length}function qI({blockName:e,originalBlockName:t,onClose:n,onSave:o,hasOverridesWarning:r}){const[i,s]=(0,a.useState)(e),l=i!==e,c=i===t,u=ZI(i),d=l||c;return(0,$.jsx)(os.Modal,{title:(0,C.__)("Rename"),onRequestClose:n,overlayClassName:"block-editor-block-rename-modal",focusOnMount:"firstContentElement",size:"small",children:(0,$.jsx)("form",{onSubmit:e=>{e.preventDefault(),d&&(()=>{const e=c||u?(0,C.sprintf)((0,C.__)('Block name reset to: "%s".'),i):(0,C.sprintf)((0,C.__)('Block name changed to: "%s".'),i);(0,$o.speak)(e,"assertive"),o(i),n()})()},children:(0,$.jsxs)(os.__experimentalVStack,{spacing:"3",children:[(0,$.jsx)(os.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:i,label:(0,C.__)("Name"),help:r?(0,C.__)("This block allows overrides. Changing the name can cause problems with content entered into instances of this pattern."):void 0,placeholder:t,onChange:s,onFocus:e=>e.target.select()}),(0,$.jsxs)(os.__experimentalHStack,{justify:"right",children:[(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:n,children:(0,C.__)("Cancel")}),(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,"aria-disabled":!d,variant:"primary",type:"submit",children:(0,C.__)("Save")})]})]})})})}function YI({clientId:e}){const[t,n]=(0,a.useState)(!1),{metadata:o}=(0,c.useSelect)((t=>{const{getBlockAttributes:n}=t(li),o=n(e)?.metadata;return{metadata:o}}),[e]),{updateBlockAttributes:r}=(0,c.useDispatch)(li),i=o?.name,s=!!i&&!!o?.bindings&&Object.values(o.bindings).some((e=>"core/pattern-overrides"===e.source));const l=Um(e);return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(os.MenuItem,{onClick:()=>{n(!0)},"aria-expanded":t,"aria-haspopup":"dialog",children:(0,C.__)("Rename")}),t&&(0,$.jsx)(qI,{blockName:i||"",originalBlockName:l?.title,hasOverridesWarning:s,onClose:()=>n(!1),onSave:t=>{(t===l?.title||ZI(t))&&(t=void 0),function(t){r([e],{metadata:{...o,name:t}})}(t)}})]})}const{Fill:XI,Slot:QI}=(0,os.createSlotFill)("BlockSettingsMenuControls");function JI({...e}){return(0,$.jsx)(os.__experimentalStyleProvider,{document,children:(0,$.jsx)(XI,{...e})})}JI.Slot=({fillProps:e,clientIds:t=null})=>{const{selectedBlocks:n,selectedClientIds:o,isContentOnly:r}=(0,c.useSelect)((e=>{const{getBlockNamesByClientId:n,getSelectedBlockClientIds:o,getBlockEditingMode:r}=e(li),i=null!==t?t:o();return{selectedBlocks:n(i),selectedClientIds:i,isContentOnly:"contentOnly"===r(i[0])}}),[t]),{canLock:i}=DI(o[0]),{canRename:s}=(a=n[0],{canRename:(0,l.getBlockSupport)(a,"renaming",!0)});var a;const d=1===o.length&&i&&!r,p=1===o.length&&s&&!r,h=LI(o),{isGroupable:g,isUngroupable:m}=h,f=(g||m)&&!r;return(0,$.jsx)(QI,{fillProps:{...e,selectedBlocks:n,selectedClientIds:o},children:t=>!t?.length>0&&!f&&!d?null:(0,$.jsxs)(os.MenuGroup,{children:[f&&(0,$.jsx)(AI,{...h,onClose:e?.onClose}),d&&(0,$.jsx)($I,{clientId:o[0]}),p&&(0,$.jsx)(YI,{clientId:o[0]}),t,e?.canMove&&!e?.onlyBlock&&!r&&(0,$.jsx)(os.MenuItem,{onClick:(0,u.pipe)(e?.onClose,e?.onMoveTo),children:(0,C.__)("Move to")}),1===o.length&&(0,$.jsx)(KI,{clientId:o[0],onClose:e?.onClose}),1===e?.count&&!r&&(0,$.jsx)(WI,{clientId:e?.firstBlockClientId,onToggle:e?.onClose})]})})};const ej=JI;function tj({parentClientId:e,parentBlockType:t}){const n=(0,u.useViewportMatch)("medium","<"),{selectBlock:o}=(0,c.useDispatch)(li),r=(0,a.useRef)(),i=HB({ref:r,highlightParent:!0});return n?(0,$.jsx)(os.MenuItem,{...i,ref:r,icon:(0,$.jsx)(Uf,{icon:t.icon}),onClick:()=>o(e),children:(0,C.sprintf)((0,C.__)("Select parent block (%s)"),t.title)}):null}const nj={className:"block-editor-block-settings-menu__popover",placement:"bottom-start"};function oj({clientIds:e,onCopy:t,label:n,shortcut:o}){const{getBlocksByClientId:r}=(0,c.useSelect)(li),i=(0,u.useCopyToClipboard)((()=>(0,l.serialize)(r(e))),t),s=n||(0,C.__)("Copy");return(0,$.jsx)(os.MenuItem,{ref:i,shortcut:o,children:s})}function rj({block:e,clientIds:t,children:n,__experimentalSelectBlock:o,...r}){const i=e?.clientId,s=t.length,d=t[0],p=(0,c.useSelect)((e=>{const{__unstableGetEditorMode:t}=te(e(li));return"zoom-out"===t()})),{firstParentClientId:h,onlyBlock:g,parentBlockType:m,previousBlockClientId:f,selectedBlockClientIds:b,openedBlockSettingsMenu:k,isContentOnly:v}=(0,c.useSelect)((e=>{const{getBlockCount:t,getBlockName:n,getBlockRootClientId:o,getPreviousBlockClientId:r,getSelectedBlockClientIds:i,getBlockAttributes:s,getOpenedBlockSettingsMenu:a,getBlockEditingMode:c}=te(e(li)),{getActiveBlockVariation:u}=e(l.store),p=o(d),h=p&&n(p);return{firstParentClientId:p,onlyBlock:1===t(p),parentBlockType:p&&(u(h,s(p))||(0,l.getBlockType)(h)),previousBlockClientId:r(d),selectedBlockClientIds:i(),openedBlockSettingsMenu:a(),isContentOnly:"contentOnly"===c(d)}}),[d]),{getBlockOrder:_,getSelectedBlockClientIds:x}=(0,c.useSelect)(li),{setOpenedBlockSettingsMenu:y}=te((0,c.useDispatch)(li)),S=(0,c.useSelect)((e=>{const{getShortcutRepresentation:t}=e(Yf.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")}}),[]),w=b.length>0;async function B(e){if(!o)return;const t=await e;t&&t[0]&&o(t[0],!1)}function I(){if(!o)return;let e=f||h;e||(e=_()[0]);const t=w&&0===x().length;o(e,t)}const j=b?.includes(h),E=i?k===i||!1:void 0;function T(e){e&&k!==i?y(i):!e&&k&&k===i&&y(void 0)}return(0,$.jsx)(TI,{clientIds:t,__experimentalUpdateSelection:!o,children:({canCopyStyles:e,canDuplicate:o,canInsertBlock:i,canMove:l,canRemove:c,onDuplicate:f,onInsertAfter:b,onInsertBefore:k,onRemove:_,onCopy:x,onPasteStyles:y,onMoveTo:w})=>(0,$.jsx)(os.DropdownMenu,{icon:lb,label:(0,C.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:nj,open:E,onToggle:T,noIcons:!0,...r,children:({onClose:r})=>(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(os.MenuGroup,{children:[(0,$.jsx)(NI.Slot,{fillProps:{onClose:r}}),!j&&!!h&&(0,$.jsx)(tj,{parentClientId:h,parentBlockType:m}),1===s&&(0,$.jsx)(MI,{clientId:d}),(!v||p)&&(0,$.jsx)(oj,{clientIds:t,onCopy:x,shortcut:va.displayShortcut.primary("c")}),o&&(0,$.jsx)(os.MenuItem,{onClick:(0,u.pipe)(r,f,B),shortcut:S.duplicate,children:(0,C.__)("Duplicate")}),i&&!v&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(os.MenuItem,{onClick:(0,u.pipe)(r,k),shortcut:S.insertBefore,children:(0,C.__)("Add before")}),(0,$.jsx)(os.MenuItem,{onClick:(0,u.pipe)(r,b),shortcut:S.insertAfter,children:(0,C.__)("Add after")})]})]}),e&&!v&&(0,$.jsxs)(os.MenuGroup,{children:[(0,$.jsx)(oj,{clientIds:t,onCopy:x,label:(0,C.__)("Copy styles")}),(0,$.jsx)(os.MenuItem,{onClick:y,children:(0,C.__)("Paste styles")})]}),(0,$.jsx)(ej.Slot,{fillProps:{onClose:r,canMove:l,onMoveTo:w,onlyBlock:g,count:s,firstBlockClientId:d},clientIds:t}),"function"==typeof n?n({onClose:r}):a.Children.map((e=>(0,a.cloneElement)(e,{onClose:r}))),c&&(0,$.jsx)(os.MenuGroup,{children:(0,$.jsx)(os.MenuItem,{onClick:(0,u.pipe)(r,_,I),shortcut:S.remove,children:(0,C.__)("Delete")})})]})})})}const ij=rj;const sj=function({clientIds:e,...t}){return(0,$.jsx)(os.ToolbarGroup,{children:(0,$.jsx)(os.ToolbarItem,{children:n=>(0,$.jsx)(ij,{clientIds:e,toggleProps:n,...t})})})};function lj({clientId:e}){const{canLock:t,isLocked:n}=DI(e),[o,r]=(0,a.useReducer)((e=>!e),!1),i=(0,a.useRef)(!1);if((0,a.useEffect)((()=>{n&&(i.current=!0)}),[n]),!n&&!i.current)return null;let s=n?(0,C.__)("Unlock"):(0,C.__)("Lock");return!t&&n&&(s=(0,C.__)("Locked")),(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(os.ToolbarGroup,{className:"block-editor-block-lock-toolbar",children:(0,$.jsx)(os.ToolbarButton,{disabled:!t,icon:n?VI:OI,label:s,onClick:r,"aria-expanded":o,"aria-haspopup":"dialog"})}),o&&(0,$.jsx)(GI,{clientId:e,onClose:r})]})}const aj=(0,$.jsx)(G.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,$.jsx)(G.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"})}),cj=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M4 6.5h5a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H4V16h5a.5.5 0 0 0 .5-.5v-7A.5.5 0 0 0 9 8H4V6.5Zm16 0h-5a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h5V16h-5a.5.5 0 0 1-.5-.5v-7A.5.5 0 0 1 15 8h5V6.5Z"})}),uj=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M17.5 4v5a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2V4H8v5a.5.5 0 0 0 .5.5h7A.5.5 0 0 0 16 9V4h1.5Zm0 16v-5a2 2 0 0 0-2-2h-7a2 2 0 0 0-2 2v5H8v-5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 .5.5v5h1.5Z"})}),dj=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"m3 5c0-1.10457.89543-2 2-2h13.5c1.1046 0 2 .89543 2 2v13.5c0 1.1046-.8954 2-2 2h-13.5c-1.10457 0-2-.8954-2-2zm2-.5h6v6.5h-6.5v-6c0-.27614.22386-.5.5-.5zm-.5 8v6c0 .2761.22386.5.5.5h6v-6.5zm8 0v6.5h6c.2761 0 .5-.2239.5-.5v-6zm0-8v6.5h6.5v-6c0-.27614-.2239-.5-.5-.5z",fillRule:"evenodd",clipRule:"evenodd"})}),pj={group:{type:"constrained"},row:{type:"flex",flexWrap:"nowrap"},stack:{type:"flex",orientation:"vertical"},grid:{type:"grid"}};const hj=function(){const{blocksSelection:e,clientIds:t,groupingBlockName:n,isGroupable:o}=LI(),{replaceBlocks:r}=(0,c.useDispatch)(li),{canRemove:i,variations:s}=(0,c.useSelect)((e=>{const{canRemoveBlocks:o}=e(li),{getBlockVariations:r}=e(l.store);return{canRemove:o(t),variations:r(n,"transform")}}),[t,n]),a=o=>{const i=(0,l.switchToBlockType)(e,n);"string"!=typeof o&&(o="group"),i&&i.length>0&&(i[0].attributes.layout=pj[o],r(t,i))};if(!o||!i)return null;const u=!!s.find((({name:e})=>"group-row"===e)),d=!!s.find((({name:e})=>"group-stack"===e)),p=!!s.find((({name:e})=>"group-grid"===e));return(0,$.jsxs)(os.ToolbarGroup,{children:[(0,$.jsx)(os.ToolbarButton,{icon:aj,label:(0,C._x)("Group","verb"),onClick:a}),u&&(0,$.jsx)(os.ToolbarButton,{icon:cj,label:(0,C._x)("Row","single horizontal line"),onClick:()=>a("row")}),d&&(0,$.jsx)(os.ToolbarButton,{icon:uj,label:(0,C._x)("Stack","verb"),onClick:()=>a("stack")}),p&&(0,$.jsx)(os.ToolbarButton,{icon:dj,label:(0,C._x)("Grid","verb"),onClick:()=>a("grid")})]})};function gj({clientIds:e}){const t=1===e.length?e[0]:void 0,n=(0,c.useSelect)((e=>!!t&&"html"===e(li).getBlockMode(t)),[t]),{toggleBlockMode:o}=(0,c.useDispatch)(li);return n?(0,$.jsx)(os.ToolbarGroup,{children:(0,$.jsx)(os.ToolbarButton,{onClick:()=>{o(t)},children:(0,C.__)("Edit visually")})}):null}const mj=(0,a.createContext)("");function fj(e){return Array.from(e.querySelectorAll("[data-toolbar-item]:not([disabled])"))}function bj(e){return e.contains(e.ownerDocument.activeElement)}function kj({toolbarRef:e,focusOnMount:t,isAccessibleToolbar:n,defaultIndex:o,onIndexChange:r,shouldUseKeyboardFocusShortcut:i,focusEditorOnEscape:s}){const[l]=(0,a.useState)(t),[u]=(0,a.useState)(o),d=(0,a.useCallback)((()=>{!function(e){const[t]=ba.focus.tabbable.find(e);t&&t.focus({preventScroll:!0})}(e.current)}),[e]);(0,Yf.useShortcut)("core/block-editor/focus-toolbar",(()=>{i&&d()})),(0,a.useEffect)((()=>{l&&d()}),[n,l,d]),(0,a.useEffect)((()=>{const t=e.current;let n=0;return l||bj(t)||(n=window.requestAnimationFrame((()=>{const e=fj(t),n=u||0;e[n]&&bj(t)&&e[n].focus({preventScroll:!0})}))),()=>{if(window.cancelAnimationFrame(n),!r||!t)return;const e=fj(t).findIndex((e=>0===e.tabIndex));r(e)}}),[u,l,r,e]);const{getLastFocus:p}=te((0,c.useSelect)(li));(0,a.useEffect)((()=>{const t=e.current;if(s){const e=e=>{const t=p();e.keyCode===va.ESCAPE&&t?.current&&(e.preventDefault(),t.current.focus())};return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}}}),[s,p,e])}function vj({children:e,focusOnMount:t,focusEditorOnEscape:n=!1,shouldUseKeyboardFocusShortcut:o=!0,__experimentalInitialIndex:r,__experimentalOnIndexChange:i,orientation:s="horizontal",...l}){const c=(0,a.useRef)(),u=function(e){const[t,n]=(0,a.useState)(!0),o=(0,a.useCallback)((()=>{const t=!ba.focus.tabbable.find(e.current).some((e=>!("toolbarItem"in e.dataset)));t||y()("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)}),[e]);return(0,a.useLayoutEffect)((()=>{const t=new window.MutationObserver(o);return t.observe(e.current,{childList:!0,subtree:!0}),()=>t.disconnect()}),[o,t,e]),t}(c);return kj({toolbarRef:c,focusOnMount:t,defaultIndex:r,onIndexChange:i,isAccessibleToolbar:u,shouldUseKeyboardFocusShortcut:o,focusEditorOnEscape:n}),u?(0,$.jsx)(os.Toolbar,{label:l["aria-label"],ref:c,orientation:s,...l,children:e}):(0,$.jsx)(os.NavigableMenu,{orientation:s,role:"toolbar",ref:c,...l,children:e})}function _j(e="default"){const t=rs[e]?.Slot,n=(0,os.__experimentalUseSlotFills)(t?.__unstableName);return t?!!n?.length:null}function xj(){const{isToolbarEnabled:e,isBlockDisabled:t}=(0,c.useSelect)((e=>{const{getBlockEditingMode:t,getBlockName:n,getBlockSelectionStart:o}=e(li),r=o(),i=r&&(0,l.getBlockType)(n(r));return{isToolbarEnabled:i&&(0,l.hasBlockSupport)(i,"__experimentalToolbar",!0),isBlockDisabled:"disabled"===t(r)}}),[]),n=function(){let e=!1;for(const t in rs)_j(t)&&(e=!0);return e}();return!(!e||t&&!n)}const yj=(0,$.jsx)(G.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/SVG",children:(0,$.jsx)(G.Path,{d:"M17.192 6.75L15.47 5.03l1.06-1.06 3.537 3.53-3.537 3.53-1.06-1.06 1.723-1.72h-3.19c-.602 0-.993.202-1.28.498-.309.319-.538.792-.695 1.383-.13.488-.222 1.023-.296 1.508-.034.664-.116 1.413-.303 2.117-.193.721-.513 1.467-1.068 2.04-.575.594-1.359.954-2.357.954H4v-1.5h4.003c.601 0 .993-.202 1.28-.498.308-.319.538-.792.695-1.383.149-.557.216-1.093.288-1.662l.039-.31a9.653 9.653 0 0 1 .272-1.653c.193-.722.513-1.467 1.067-2.04.576-.594 1.36-.954 2.358-.954h3.19zM8.004 6.75c.8 0 1.46.23 1.988.628a6.24 6.24 0 0 0-.684 1.396 1.725 1.725 0 0 0-.024-.026c-.287-.296-.679-.498-1.28-.498H4v-1.5h4.003zM12.699 14.726c-.161.459-.38.94-.684 1.396.527.397 1.188.628 1.988.628h3.19l-1.722 1.72 1.06 1.06L20.067 16l-3.537-3.53-1.06 1.06 1.723 1.72h-3.19c-.602 0-.993-.202-1.28-.498a1.96 1.96 0 0 1-.024-.026z"})}),Sj=[];function wj(e){return(0,$.jsx)(os.ToolbarGroup,{children:(0,$.jsx)(os.ToolbarButton,{...e})})}function Cj({clientId:e,as:t=wj}){const{categories:n,patterns:o,patternName:r}=(0,c.useSelect)((t=>{const{getBlockAttributes:n,getBlockRootClientId:o,__experimentalGetAllowedPatterns:r}=t(li),i=n(e),s=i?.metadata?.categories||Sj,l=i?.metadata?.patternName,a=o(e);return{categories:s,patterns:s.length>0?r(a):Sj,patternName:l}}),[e]),{replaceBlocks:i}=(0,c.useDispatch)(li),s=(0,a.useMemo)((()=>0!==n.length&&o&&0!==o.length?o.filter((e=>{const t="core"===e.source||e.source?.startsWith("pattern-directory")&&"pattern-directory/theme"!==e.source;return 1===e.blocks.length&&!t&&e.categories?.some((e=>n.includes(e)))&&("unsynced"===e.syncStatus||!e.id)})):Sj),[n,o]);if(s.length<2)return null;const l=t;return(0,$.jsx)(l,{label:(0,C.__)("Shuffle"),icon:yj,className:"block-editor-block-toolbar-shuffle",onClick:()=>{const t=function(){const e=s.length,t=s.findIndex((({name:e})=>e===r));return s[t+1<e?t+1:0]}();t.blocks[0].attributes={...t.blocks[0].attributes,metadata:{...t.blocks[0].attributes.metadata,categories:n}},i(e,t.blocks)}})}function Bj({hideDragHandle:e,focusOnMount:t,__experimentalInitialIndex:n,__experimentalOnIndexChange:o,variant:r="unstyled"}){const{blockClientId:i,blockClientIds:s,isDefaultEditingMode:d,blockType:p,toolbarKey:h,shouldShowVisualToolbar:g,showParentSelector:m,isUsingBindings:f,hasParentPattern:b,hasContentOnlyLocking:k,showShuffleButton:v,showSlots:_,showGroupButtons:x,showLockButtons:y}=(0,c.useSelect)((e=>{const{getBlockName:t,getBlockMode:n,getBlockParents:o,getSelectedBlockClientIds:r,isBlockValid:i,getBlockEditingMode:s,getBlockAttributes:a,getBlockParentsByBlockName:c,getTemplateLock:u,isZoomOutMode:d}=te(e(li)),p=r(),h=p[0],g=o(h),m=g[g.length-1],f=t(m),b=(0,l.getBlockType)(f),k="default"===s(h),v=t(h),_=p.every((e=>i(e))),x=p.every((e=>"visual"===n(e))),y=p.every((e=>!!a(e)?.metadata?.bindings)),S=p.every((e=>c(e,"core/block",!0).length>0)),w=p.some((e=>"contentOnly"===u(e)));return{blockClientId:h,blockClientIds:p,isDefaultEditingMode:k,blockType:h&&(0,l.getBlockType)(v),shouldShowVisualToolbar:_&&x,toolbarKey:`${h}${m}`,showParentSelector:!d()&&b&&"default"===s(m)&&(0,l.hasBlockSupport)(b,"__experimentalParentSelector",!0)&&1===p.length&&k,isUsingBindings:y,hasParentPattern:S,hasContentOnlyLocking:w,showShuffleButton:d(),showSlots:!d(),showGroupButtons:!d(),showLockButtons:!d()}}),[]),S=(0,a.useRef)(null),w=(0,a.useRef)(),B=HB({ref:w}),I=!(0,u.useViewportMatch)("medium","<");if(!xj())return null;const j=s.length>1,E=(0,l.isReusableBlock)(p)||(0,l.isTemplatePart)(p),T=Zi("block-editor-block-contextual-toolbar",{"has-parent":m}),M=Zi("block-editor-block-toolbar",{"is-synced":E,"is-connected":f});return(0,$.jsx)(vj,{focusEditorOnEscape:!0,className:T,"aria-label":(0,C.__)("Block tools"),variant:"toolbar"===r?void 0:r,focusOnMount:t,__experimentalInitialIndex:n,__experimentalOnIndexChange:o,children:(0,$.jsxs)("div",{ref:S,className:M,children:[m&&!j&&I&&(0,$.jsx)(GB,{}),(g||j)&&!b&&(0,$.jsx)("div",{ref:w,...B,children:(0,$.jsxs)(os.ToolbarGroup,{className:"block-editor-block-toolbar__block-controls",children:[(0,$.jsx)(hI,{clientIds:s,disabled:!d,isUsingBindings:f}),!j&&y&&(0,$.jsx)(lj,{clientId:i}),(0,$.jsx)(DB,{clientIds:s,hideDragHandle:e})]})}),!k&&g&&j&&x&&(0,$.jsx)(hj,{}),v&&(0,$.jsx)(os.ToolbarGroup,{children:(0,$.jsx)(Cj,{clientId:s[0],as:os.ToolbarButton})}),g&&_&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(us.Slot,{group:"parent",className:"block-editor-block-toolbar__slot"}),(0,$.jsx)(us.Slot,{group:"block",className:"block-editor-block-toolbar__slot"}),(0,$.jsx)(us.Slot,{className:"block-editor-block-toolbar__slot"}),(0,$.jsx)(us.Slot,{group:"inline",className:"block-editor-block-toolbar__slot"}),(0,$.jsx)(us.Slot,{group:"other",className:"block-editor-block-toolbar__slot"}),(0,$.jsx)(mj.Provider,{value:p?.name,children:(0,$.jsx)(fI.Slot,{})})]}),(0,$.jsx)(gj,{clientIds:s}),(0,$.jsx)(sj,{clientIds:s})]})},h)}function Ij({hideDragHandle:e,variant:t}){return(0,$.jsx)(Bj,{hideDragHandle:e,variant:t,focusOnMount:void 0,__experimentalInitialIndex:void 0,__experimentalOnIndexChange:void 0})}function jj({clientId:e,isTyping:t,__unstableContentRef:n}){const{capturingClientId:o,isInsertionPointVisible:r,lastClientId:i}=IB(e),s=(0,a.useRef)();(0,a.useEffect)((()=>{s.current=void 0}),[e]);const{stopTyping:l}=(0,c.useDispatch)(li),u=(0,a.useRef)(!1);(0,Yf.useShortcut)("core/block-editor/focus-toolbar",(()=>{u.current=!0,l(!0)})),(0,a.useEffect)((()=>{u.current=!1}));const d=o||e,p=BB({contentElement:n?.current,clientId:d});return!t&&(0,$.jsx)(Jg,{clientId:d,bottomClientId:i,className:Zi("block-editor-block-list__block-popover",{"is-insertion-point-visible":r}),resize:!1,...p,children:(0,$.jsx)(Bj,{focusOnMount:u.current,__experimentalInitialIndex:s.current,__experimentalOnIndexChange:e=>{s.current=e},variant:"toolbar"})})}const Ej=(0,a.forwardRef)((function({clientId:e,rootClientId:t},n){const o=(0,c.useSelect)((n=>{const{getBlock:o,getBlockIndex:r,hasBlockMovingClientId:i,getBlockListSettings:s,__unstableGetEditorMode:a,getNextBlockClientId:c,getPreviousBlockClientId:u,canMoveBlock:d}=n(li),{getActiveBlockVariation:p,getBlockType:h}=n(l.store),g=r(e),{name:m,attributes:f}=o(e),b=h(m),k=s(t)?.orientation,v=p(m,f);return{blockMovingMode:i(),editorMode:a(),icon:v?.icon||b.icon,label:(0,l.__experimentalGetAccessibleBlockLabel)(b,f,g+1,k),canMove:d(e,t),getNextBlockClientId:c,getPreviousBlockClientId:u}}),[e,t]),{label:r,icon:i,blockMovingMode:s,editorMode:u,canMove:d}=o,{setNavigationMode:p,removeBlock:h}=(0,c.useDispatch)(li);(0,a.useEffect)((()=>{"navigation"===u&&(n.current.focus(),(0,$o.speak)(r))}),[r,u]);const g=vp(e),{hasBlockMovingClientId:m,getBlockIndex:f,getBlockRootClientId:b,getClientIdsOfDescendants:k,getSelectedBlockClientId:v,getMultiSelectedBlocksEndClientId:_,getPreviousBlockClientId:x,getNextBlockClientId:y}=(0,c.useSelect)(li),{selectBlock:S,clearSelectedBlock:w,setBlockMovingClientId:B,moveBlockToPosition:I}=(0,c.useDispatch)(li),j=Zi("block-editor-block-list__block-selection-button",{"is-block-moving-mode":!!s}),E=(0,C.__)("Drag"),T=d&&"navigation"===u;return(0,$.jsx)("div",{className:j,children:(0,$.jsxs)(os.Flex,{justify:"center",className:"block-editor-block-list__block-selection-button__content",children:[(0,$.jsx)(os.FlexItem,{children:(0,$.jsx)(Uf,{icon:i,showColors:!0})}),T&&(0,$.jsx)(os.FlexItem,{children:(0,$.jsx)(EB,{clientIds:[e],children:e=>(0,$.jsx)(os.Button,{__next40pxDefaultSize:!1,icon:uS,className:"block-selection-button_drag-handle",label:E,tabIndex:"-1",...e})})}),"navigation"===u&&(0,$.jsx)(os.FlexItem,{children:(0,$.jsx)(os.Button,{__next40pxDefaultSize:!1,ref:n,onClick:"navigation"===u?()=>p(!1):void 0,onKeyDown:function(t){const{keyCode:n}=t,o=n===va.UP,r=n===va.DOWN,i=n===va.LEFT,s=n===va.RIGHT,l=n===va.TAB,a=n===va.ESCAPE,c=n===va.ENTER,u=n===va.SPACE,d=t.shiftKey;if(n===va.BACKSPACE||n===va.DELETE)return h(e),void t.preventDefault();const p=v(),C=_(),j=x(C||p),E=y(C||p),T=l&&d||o,M=l&&!d||r,P=i,R=s;let N;if(T)N=j;else if(M)N=E;else if(P){var L;N=null!==(L=b(p))&&void 0!==L?L:p}else if(R){var A;N=null!==(A=k(p)[0])&&void 0!==A?A:p}const D=m();if(a&&D&&!t.defaultPrevented&&(B(null),t.preventDefault()),(c||u)&&D){const e=b(D),t=b(p),n=f(D);let o=f(p);n<o&&e===t&&(o-=1),I(D,e,t,o),S(D),B(null)}if((!D||p!==D||!R)&&(M||T||P||R))if(N)t.preventDefault(),S(N);else if(l&&p){let e;if(M){e=g;do{e=ba.focus.tabbable.findNext(e)}while(e&&g.contains(e));e||(e=g.ownerDocument.defaultView.frameElement,e=ba.focus.tabbable.findNext(e))}else e=ba.focus.tabbable.findPrevious(g);e&&(t.preventDefault(),e.focus(),w())}},label:r,showTooltip:!1,className:"block-selection-button_select-button",children:(0,$.jsx)(kB,{clientId:e,maximumLength:35})})})]})})}));const Tj=(0,a.forwardRef)((function({clientId:e,__unstableContentRef:t},n){const{capturingClientId:o,isInsertionPointVisible:r,lastClientId:i,rootClientId:s}=IB(e),l=BB({contentElement:t?.current,clientId:e});return(0,$.jsx)(Qg,{clientId:o||e,bottomClientId:i,className:Zi("block-editor-block-list__block-popover",{"is-insertion-point-visible":r}),resize:!1,...l,children:(0,$.jsx)(Ej,{ref:n,clientId:e,rootClientId:s})})}));const Mj=function({isVisible:e,onClick:t}){const[n,o]=(0,a.useState)(!1);return(0,$.jsx)(os.Button,{variant:"primary",icon:Aa,size:"compact",className:Zi("block-editor-button-pattern-inserter__button","block-editor-block-tools__zoom-out-mode-inserter-button",{"is-visible":e||n}),onClick:t,onMouseOver:()=>{o(!0)},onMouseOut:()=>{o(!1)},label:(0,C._x)("Add pattern","Generic label for pattern inserter button")})};const Pj=function(){const[e,t]=(0,a.useState)(!1),{hasSelection:n,blockOrder:o,setInserterIsOpened:r,sectionRootClientId:i,selectedBlockClientId:s}=(0,c.useSelect)((e=>{const{getSettings:t,getBlockOrder:n,getSelectionStart:o,getSelectedBlockClientId:r,getSectionRootClientId:i}=te(e(li)),s=i();return{hasSelection:!!o().clientId,blockOrder:n(s),sectionRootClientId:s,setInserterIsOpened:t().__experimentalSetIsInserterOpened,selectedBlockClientId:r()}}),[]),{showInsertionPoint:l}=(0,c.useDispatch)(li);if((0,a.useEffect)((()=>{const e=setTimeout((()=>{t(!0)}),500);return()=>{clearTimeout(e)}}),[]),!e||!n)return null;const u=s,d=o.findIndex((e=>s===e)),p=o[d+1];return(0,$.jsx)(_x,{previousClientId:u,nextClientId:p,children:(0,$.jsx)(Mj,{onClick:()=>{const e=document.querySelector('[aria-label="Block Library"]');r({rootClientId:i,insertionIndex:d+1,tab:"patterns",category:"all"}),l(i,d+1,{operation:"insert"}),e&&e.focus()}})})};function Rj(e){const{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:n,getSettings:o,__unstableGetEditorMode:r,isTyping:i}=e(li),s=t()||n(),l=r();return{clientId:s,hasFixedToolbar:o().hasFixedToolbar,isTyping:i(),isZoomOutMode:"zoom-out"===l}}function Nj({children:e,__unstableContentRef:t,...n}){const{clientId:o,hasFixedToolbar:r,isTyping:i,isZoomOutMode:s}=(0,c.useSelect)(Rj,[]),u=(0,Yf.__unstableUseShortcutEventMatch)(),{getBlocksByClientId:d,getSelectedBlockClientIds:p,getBlockRootClientId:h,isGroupable:g}=(0,c.useSelect)(li),{getGroupingBlockName:m}=(0,c.useSelect)(l.store),{showEmptyBlockSideInserter:f,showBreadcrumb:b,showBlockToolbarPopover:k}=(0,c.useSelect)((e=>{const{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:n,getBlock:o,getBlockMode:r,getSettings:i,hasMultiSelection:s,__unstableGetEditorMode:a,isTyping:c}=te(e(li)),u=t()||n(),d=o(u),p=a(),h=!!u&&!!d,g=h&&(0,l.isUnmodifiedDefaultBlock)(d)&&"html"!==r(u),m=u&&!c()&&"edit"===p&&g,f=h&&!s()&&"navigation"===p;return{showEmptyBlockSideInserter:m,showBreadcrumb:!m&&f,showBlockToolbarPopover:!i().hasFixedToolbar&&!m&&h&&!g&&!f}}),[]),{clearSelectedBlock:v,duplicateBlocks:_,removeBlocks:x,replaceBlocks:y,insertAfterBlock:S,insertBeforeBlock:w,selectBlock:B,moveBlocksUp:I,moveBlocksDown:j,expandBlock:E}=te((0,c.useDispatch)(li)),T=(0,a.useRef)();const M=zg(t),P=zg(t);return(0,$.jsx)("div",{...n,onKeyDown:function(e){if(!e.defaultPrevented)if(u("core/block-editor/move-up",e)){const t=p();if(t.length){e.preventDefault();const n=h(t[0]);I(t,n)}}else if(u("core/block-editor/move-down",e)){const t=p();if(t.length){e.preventDefault();const n=h(t[0]);j(t,n)}}else if(u("core/block-editor/duplicate",e)){const t=p();t.length&&(e.preventDefault(),_(t))}else if(u("core/block-editor/remove",e)){const t=p();t.length&&(e.preventDefault(),x(t))}else if(u("core/block-editor/insert-after",e)){const t=p();t.length&&(e.preventDefault(),S(t[t.length-1]))}else if(u("core/block-editor/insert-before",e)){const t=p();t.length&&(e.preventDefault(),w(t[0]))}else if(u("core/block-editor/unselect",e)){if(e.target.closest("[role=toolbar]"))return;const n=p();n.length>1?(e.preventDefault(),B(n[0])):1===n.length&&e.target===T?.current&&(e.preventDefault(),v(),vB(t.current)?.focus())}else if(u("core/block-editor/collapse-list-view",e)){if((0,ba.isTextField)(e.target)||(0,ba.isTextField)(e.target?.contentWindow?.document?.activeElement))return;e.preventDefault(),E(o)}else if(u("core/block-editor/group",e)){const t=p();if(t.length>1&&g(t)){e.preventDefault();const n=d(t),o=m(),r=(0,l.switchToBlockType)(n,o);y(t,r),(0,$o.speak)((0,C.__)("Selected blocks are grouped."))}}},children:(0,$.jsxs)(Sx.Provider,{value:(0,a.useRef)(!1),children:[!i&&!s&&(0,$.jsx)(Cx,{__unstableContentRef:t}),f&&(0,$.jsx)(jB,{__unstableContentRef:t,clientId:o}),k&&(0,$.jsx)(jj,{__unstableContentRef:t,clientId:o,isTyping:i}),b&&(0,$.jsx)(Tj,{ref:T,__unstableContentRef:t,clientId:o}),!s&&!r&&(0,$.jsx)(os.Popover.Slot,{name:"block-toolbar",ref:M}),e,(0,$.jsx)(os.Popover.Slot,{name:"__unstable-block-tools-after",ref:P}),s&&(0,$.jsx)(Pj,{__unstableContentRef:t})]})})}const Lj=window.wp.commands,Aj=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M19.75 9c0-1.257-.565-2.197-1.39-2.858-.797-.64-1.827-1.017-2.815-1.247-1.802-.42-3.703-.403-4.383-.396L11 4.5V6l.177-.001c.696-.006 2.416-.02 4.028.356.887.207 1.67.518 2.216.957.52.416.829.945.829 1.688 0 .592-.167.966-.407 1.23-.255.281-.656.508-1.236.674-1.19.34-2.82.346-4.607.346h-.077c-1.692 0-3.527 0-4.942.404-.732.209-1.424.545-1.935 1.108-.526.579-.796 1.33-.796 2.238 0 1.257.565 2.197 1.39 2.858.797.64 1.827 1.017 2.815 1.247 1.802.42 3.703.403 4.383.396L13 19.5h.714V22L18 18.5 13.714 15v3H13l-.177.001c-.696.006-2.416.02-4.028-.356-.887-.207-1.67-.518-2.216-.957-.52-.416-.829-.945-.829-1.688 0-.592.167-.966.407-1.23.255-.281.656-.508 1.237-.674 1.189-.34 2.819-.346 4.606-.346h.077c1.692 0 3.527 0 4.941-.404.732-.209 1.425-.545 1.936-1.108.526-.579.796-1.33.796-2.238z"})}),Dj=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M18 4h-7c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5h-7c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v7zm-5 5c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h1V9H6c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-1h-1.5v1z"})}),Oj=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z"})}),zj=()=>{const{replaceBlocks:e,multiSelect:t}=(0,c.useDispatch)(li),{blocks:n,clientIds:o,canRemove:r,possibleBlockTransformations:i,invalidSelection:s}=(0,c.useSelect)((e=>{const{getBlockRootClientId:t,getBlockTransformItems:n,getSelectedBlockClientIds:o,getBlocksByClientId:r,canRemoveBlocks:i}=e(li),s=o(),l=r(s);if(l.filter((e=>!e)).length>0)return{invalidSelection:!0};return{blocks:l,clientIds:s,possibleBlockTransformations:n(l,t(s[0])),canRemove:i(s),invalidSelection:!1}}),[]);if(s)return{isLoading:!1,commands:[]};const a=1===n.length&&(0,l.isTemplatePart)(n[0]);function u(r){const i=(0,l.switchToBlockType)(n,r);var s;e(o,i),(s=i).length>1&&t(s[0].clientId,s[s.length-1].clientId)}const d=!!i.length&&r&&!a;if(!o||o.length<1||!d)return{isLoading:!1,commands:[]};return{isLoading:!1,commands:i.map((e=>{const{name:t,title:n,icon:o}=e;return{name:"core/block-editor/transform-to-"+t.replace("/","-"),label:(0,C.sprintf)((0,C.__)("Transform to %s"),n),icon:(0,$.jsx)(Uf,{icon:o}),callback:({close:e})=>{u(t),e()}}}))}},Vj=()=>{const{clientIds:e}=(0,c.useSelect)((e=>{const{getSelectedBlockClientIds:t}=e(li);return{clientIds:t()}}),[]),{getBlockRootClientId:t,canMoveBlocks:n,getBlockCount:o}=(0,c.useSelect)(li),{setBlockMovingClientId:r,setNavigationMode:i,selectBlock:s}=(0,c.useDispatch)(li);if(!e||e.length<1)return{isLoading:!1,commands:[]};const l=t(e[0]),a=[];return n(e)&&1!==o(l)&&a.push({name:"move-to",label:(0,C.__)("Move to"),callback:()=>{i(!0),s(e[0]),r(e[0])},icon:Aj}),{isLoading:!1,commands:a.map((e=>({...e,name:"core/block-editor/action-"+e.name,callback:({close:t})=>{e.callback(),t()}})))}},Fj=()=>{const{clientIds:e,isUngroupable:t,isGroupable:n}=(0,c.useSelect)((e=>{const{getSelectedBlockClientIds:t,isUngroupable:n,isGroupable:o}=e(li);return{clientIds:t(),isUngroupable:n(),isGroupable:o()}}),[]),{canInsertBlockType:o,getBlockRootClientId:r,getBlocksByClientId:i,canRemoveBlocks:s}=(0,c.useSelect)(li),{getDefaultBlockName:a,getGroupingBlockName:u}=(0,c.useSelect)(l.store),d=i(e),{removeBlocks:p,replaceBlocks:h,duplicateBlocks:g,insertAfterBlock:m,insertBeforeBlock:f}=(0,c.useDispatch)(li),b=()=>{if(!d.length)return;const t=u(),n=(0,l.switchToBlockType)(d,t);n&&h(e,n)},k=()=>{if(!d.length)return;const t=d[0].innerBlocks;t.length&&h(e,t)};if(!e||e.length<1)return{isLoading:!1,commands:[]};const v=r(e[0]),_=o(a(),v),x=d.every((e=>!!e&&(0,l.hasBlockSupport)(e.name,"multiple",!0)&&o(e.name,v))),y=s(e),S=[];return x&&S.push({name:"duplicate",label:(0,C.__)("Duplicate"),callback:()=>g(e,!0),icon:$B}),_&&S.push({name:"add-before",label:(0,C.__)("Add before"),callback:()=>{const t=Array.isArray(e)?e[0]:t;f(t)},icon:Aa},{name:"add-after",label:(0,C.__)("Add after"),callback:()=>{const t=Array.isArray(e)?e[e.length-1]:t;m(t)},icon:Aa}),n&&S.push({name:"Group",label:(0,C.__)("Group"),callback:b,icon:aj}),t&&S.push({name:"ungroup",label:(0,C.__)("Ungroup"),callback:k,icon:Dj}),y&&S.push({name:"remove",label:(0,C.__)("Delete"),callback:()=>p(e,!0),icon:Oj}),{isLoading:!1,commands:S.map((e=>({...e,name:"core/block-editor/action-"+e.name,callback:({close:t})=>{e.callback(),t()}})))}},Hj=()=>{(0,Lj.useCommandLoader)({name:"core/block-editor/blockTransforms",hook:zj}),(0,Lj.useCommandLoader)({name:"core/block-editor/blockActions",hook:Vj}),(0,Lj.useCommandLoader)({name:"core/block-editor/blockQuickActions",hook:Fj,context:"block-selection-edit"})},Gj={ignoredSelectors:[/\.editor-styles-wrapper/gi]};function $j({shouldIframe:e=!0,height:t="300px",children:n=(0,$.jsx)(ry,{}),styles:o,contentRef:r,iframeProps:i}){Hj();const s=Yx(),l=Ix(),c=(0,a.useRef)(),d=(0,u.useMergeRefs)([r,l,c]);return e?(0,$.jsx)(Nj,{__unstableContentRef:c,style:{height:t,display:"flex"},children:(0,$.jsxs)(Py,{...i,ref:s,contentRef:d,style:{...i?.style},name:"editor-canvas",children:[(0,$.jsx)(Jy,{styles:o}),n]})}):(0,$.jsxs)(Nj,{__unstableContentRef:c,style:{height:t,display:"flex"},children:[(0,$.jsx)(Jy,{styles:o,scope:":where(.editor-styles-wrapper)",transformOptions:Gj}),(0,$.jsx)(Iy,{ref:d,className:"editor-styles-wrapper",tabIndex:-1,style:{height:"100%",width:"100%"},children:n})]})}const Uj=function({children:e,height:t,styles:n}){return(0,$.jsx)($j,{height:t,styles:n,children:e})},Wj=()=>(0,$.jsx)(os.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:(0,$.jsx)(os.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"})}),Kj=({style:e,className:t})=>(0,$.jsx)("div",{className:"block-library-colors-selector__icon-container",children:(0,$.jsx)("div",{className:`${t} block-library-colors-selector__state-selection`,style:e,children:(0,$.jsx)(Wj,{})})}),Zj=({TextColor:e,BackgroundColor:t})=>({onToggle:n,isOpen:o})=>(0,$.jsx)(os.ToolbarGroup,{children:(0,$.jsx)(os.ToolbarButton,{className:"components-toolbar__control block-library-colors-selector__toggle",label:(0,C.__)("Open Colors Selector"),onClick:n,onKeyDown:e=>{o||e.keyCode!==va.DOWN||(e.preventDefault(),n())},icon:(0,$.jsx)(t,{children:(0,$.jsx)(e,{children:(0,$.jsx)(Kj,{})})})})}),qj=({children:e,...t})=>(y()("wp.blockEditor.BlockColorsStyleSelector",{alternative:"block supports API",since:"6.1",version:"6.3"}),(0,$.jsx)(os.Dropdown,{popoverProps:{placement:"bottom-start"},className:"block-library-colors-selector",contentClassName:"block-library-colors-selector__popover",renderToggle:Zj(t),renderContent:()=>e})),Yj=(0,$.jsx)(G.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,$.jsx)(G.Path,{d:"M3 6h11v1.5H3V6Zm3.5 5.5h11V13h-11v-1.5ZM21 17H10v1.5h11V17Z"})}),Xj=(0,a.createContext)({}),Qj=()=>(0,a.useContext)(Xj);function Jj({children:e,...t}){const n=(0,a.useRef)();return(0,a.useEffect)((()=>{n.current&&(n.current.textContent=n.current.textContent)}),[e]),(0,$.jsx)("div",{hidden:!0,...t,ref:n,children:e})}const eE=(0,a.forwardRef)((({nestingLevel:e,blockCount:t,clientId:n,...o},r)=>{const{insertedBlock:i,setInsertedBlock:s}=Qj(),l=(0,u.useInstanceId)(eE),d=(0,c.useSelect)((e=>{const{getTemplateLock:t,__unstableGetEditorMode:o}=e(li);return!!t(n)||"zoom-out"===o()}),[n]),p=bB({clientId:n,context:"list-view"}),h=bB({clientId:i?.clientId,context:"list-view"});if((0,a.useEffect)((()=>{h?.length&&(0,$o.speak)((0,C.sprintf)((0,C.__)("%s block inserted"),h),"assertive")}),[h]),d)return null;const g=`list-view-appender__${l}`,m=(0,C.sprintf)((0,C.__)("Append to %1$s block at position %2$d, Level %3$d"),p,t+1,e);return(0,$.jsxs)("div",{className:"list-view-appender",children:[(0,$.jsx)(tC,{ref:r,rootClientId:n,position:"bottom right",isAppender:!0,selectBlockOnInsert:!1,shouldDirectInsert:!1,__experimentalIsQuick:!0,...o,toggleProps:{"aria-describedby":g},onSelectOrClose:e=>{e?.clientId&&s(e)}}),(0,$.jsx)(Jj,{id:g,children:m})]})})),tE=U_(os.__experimentalTreeGridRow),nE=(0,a.forwardRef)((({isDragged:e,isSelected:t,position:n,level:o,rowCount:r,children:i,className:s,path:l,...a},c)=>{const d=K_({clientId:a["data-block"],enableAnimation:!0,triggerAnimationOnChange:l}),p=(0,u.useMergeRefs)([c,d]);return(0,$.jsx)(tE,{ref:p,className:Zi("block-editor-list-view-leaf",s),level:o,positionInSet:n,setSize:r,isExpanded:void 0,...a,children:i})})),oE=nE;const rE=(0,$.jsx)(G.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,$.jsx)(G.Path,{d:"M10.97 10.159a3.382 3.382 0 0 0-2.857.955l1.724 1.723-2.836 2.913L7 17h1.25l2.913-2.837 1.723 1.723a3.38 3.38 0 0 0 .606-.825c.33-.63.446-1.343.35-2.032L17 10.695 13.305 7l-2.334 3.159Z"})}),iE=(0,$.jsx)(G.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,$.jsx)(G.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M15 11h-.2V9c0-1.5-1.2-2.8-2.8-2.8S9.2 7.5 9.2 9v2H9c-.6 0-1 .4-1 1v4c0 .6.4 1 1 1h6c.6 0 1-.4 1-1v-4c0-.6-.4-1-1-1zm-1.8 0h-2.5V9c0-.7.6-1.2 1.2-1.2s1.2.6 1.2 1.2v2z"})});function sE({onClick:e}){return(0,$.jsx)("span",{className:"block-editor-list-view__expander",onClick:t=>e(t,{forceToggle:!0}),"aria-hidden":"true","data-testid":"list-view-expander",children:(0,$.jsx)(hl,{icon:(0,C.isRTL)()?Ea:Ta})})}const lE=3;function aE(e){if("core/image"===e.name)return e.attributes?.url?{url:e.attributes.url,alt:e.attributes.alt,clientId:e.clientId}:void 0}function cE(e,t){const n=aE(e);return n?[n]:t?[]:function(e){if("core/gallery"!==e.name||!e.innerBlocks)return[];const t=[];for(const n of e.innerBlocks){const e=aE(n);if(e&&t.push(e),t.length>=lE)return t}return t}(e)}const uE=(0,a.forwardRef)((function({className:e,block:{clientId:t},onClick:n,onContextMenu:o,onMouseDown:r,onToggleExpanded:i,tabIndex:s,onFocus:l,onDragStart:u,onDragEnd:d,draggable:p,isExpanded:h,ariaDescribedBy:g},m){const f=Um(t),b=bB({clientId:t,context:"list-view"}),{isLocked:k}=DI(t),{isContentOnly:v}=(0,c.useSelect)((e=>({isContentOnly:"contentOnly"===e(li).getBlockEditingMode(t)})),[t]),_=k&&!v,x="sticky"===f?.positionType,y=function({clientId:e,isExpanded:t}){const{block:n}=(0,c.useSelect)((t=>({block:t(li).getBlock(e)})),[e]);return(0,a.useMemo)((()=>cE(n,t)),[n,t])}({clientId:t,isExpanded:h});return(0,$.jsxs)("a",{className:Zi("block-editor-list-view-block-select-button",e),onClick:n,onContextMenu:o,onKeyDown:function(e){e.keyCode!==va.ENTER&&e.keyCode!==va.SPACE||n(e)},onMouseDown:r,ref:m,tabIndex:s,onFocus:l,onDragStart:e=>{e.dataTransfer.clearData(),u?.(e)},onDragEnd:d,draggable:p,href:`#block-${t}`,"aria-describedby":g,"aria-expanded":h,children:[(0,$.jsx)(sE,{onClick:i}),(0,$.jsx)(Uf,{icon:f?.icon,showColors:!0,context:"list-view"}),(0,$.jsxs)(os.__experimentalHStack,{alignment:"center",className:"block-editor-list-view-block-select-button__label-wrapper",justify:"flex-start",spacing:1,children:[(0,$.jsx)("span",{className:"block-editor-list-view-block-select-button__title",children:(0,$.jsx)(os.__experimentalTruncate,{ellipsizeMode:"auto",children:b})}),f?.anchor&&(0,$.jsx)("span",{className:"block-editor-list-view-block-select-button__anchor-wrapper",children:(0,$.jsx)(os.__experimentalTruncate,{className:"block-editor-list-view-block-select-button__anchor",ellipsizeMode:"auto",children:f.anchor})}),x&&(0,$.jsx)("span",{className:"block-editor-list-view-block-select-button__sticky",children:(0,$.jsx)(hl,{icon:rE})}),y.length?(0,$.jsx)("span",{className:"block-editor-list-view-block-select-button__images","aria-hidden":!0,children:y.map(((e,t)=>(0,$.jsx)("span",{className:"block-editor-list-view-block-select-button__image",style:{backgroundImage:`url(${e.url})`,zIndex:y.length-t}},e.clientId)))}):null,_&&(0,$.jsx)("span",{className:"block-editor-list-view-block-select-button__lock",children:(0,$.jsx)(hl,{icon:iE})})]})]})})),dE=(0,a.forwardRef)((({onClick:e,onToggleExpanded:t,block:n,isSelected:o,position:r,siblingBlockCount:i,level:s,isExpanded:l,selectedClientIds:a,...u},d)=>{const{clientId:p}=n,{blockMovingClientId:h,selectedBlockInBlockEditor:g}=(0,c.useSelect)((e=>{const{hasBlockMovingClientId:t,getSelectedBlockClientId:n}=e(li);return{blockMovingClientId:t(),selectedBlockInBlockEditor:n()}}),[]),{AdditionalBlockContent:m,insertedBlock:f,setInsertedBlock:b}=Qj(),k=Zi("block-editor-list-view-block-contents",{"is-dropping-before":h&&g===p}),v=a.includes(p)?a:[p];return(0,$.jsxs)($.Fragment,{children:[m&&(0,$.jsx)(m,{block:n,insertedBlock:f,setInsertedBlock:b}),(0,$.jsx)(EB,{appendToOwnerDocument:!0,clientIds:v,cloneClassname:"block-editor-list-view-draggable-chip",children:({draggable:a,onDragStart:c,onDragEnd:p})=>(0,$.jsx)(uE,{ref:d,className:k,block:n,onClick:e,onToggleExpanded:t,isSelected:o,position:r,siblingBlockCount:i,level:s,draggable:a,onDragStart:c,onDragEnd:p,isExpanded:l,...u})})]})})),pE=dE;function hE(e,t){const n=()=>{const n=t?.querySelector(`[role=row][data-block="${e}"]`);return n?ba.focus.focusable.find(n)[0]:null};let o=n();o?o.focus():window.requestAnimationFrame((()=>{o=n(),o&&o.focus()}))}const gE=(0,a.memo)((function e({block:{clientId:t},displacement:n,isAfterDraggedBlocks:o,isDragged:r,isNesting:i,isSelected:s,isBranchSelected:d,selectBlock:p,position:h,level:g,rowCount:m,siblingBlockCount:f,showBlockMovers:b,path:k,isExpanded:v,selectedClientIds:_,isSyncedBranch:x}){const y=(0,a.useRef)(null),S=(0,a.useRef)(null),w=(0,a.useRef)(null),[B,I]=(0,a.useState)(!1),[j,E]=(0,a.useState)(),{isLocked:T,canEdit:M,canMove:P}=DI(t),R=s&&_[0]===t,N=s&&_[_.length-1]===t,{toggleBlockHighlight:L,duplicateBlocks:A,multiSelect:D,replaceBlocks:O,removeBlocks:z,insertAfterBlock:V,insertBeforeBlock:F,setOpenedBlockSettingsMenu:H}=te((0,c.useDispatch)(li)),{canInsertBlockType:G,getSelectedBlockClientIds:U,getPreviousBlockClientId:W,getBlockRootClientId:K,getBlockOrder:Z,getBlockParents:q,getBlocksByClientId:Y,canRemoveBlocks:X,isGroupable:Q}=(0,c.useSelect)(li),{getGroupingBlockName:J}=(0,c.useSelect)(l.store),ee=Um(t),{block:ne,blockName:oe,allowRightClickOverrides:re}=(0,c.useSelect)((e=>{const{getBlock:n,getBlockName:o,getSettings:r}=e(li);return{block:n(t),blockName:o(t),allowRightClickOverrides:r().allowRightClickOverrides}}),[t]),ie=(0,l.hasBlockSupport)(oe,"__experimentalToolbar",!0),se=`list-view-block-select-button__description-${(0,u.useInstanceId)(e)}`,{expand:le,collapse:ae,collapseAll:ce,BlockSettingsMenu:ue,listViewInstanceId:de,expandedState:pe,setInsertedBlock:he,treeGridElementRef:ge,rootClientId:me}=Qj(),fe=(0,Yf.__unstableUseShortcutEventMatch)();function be(){const e=U(),n=e.includes(t),o=n?e[0]:t,r=K(o);return{blocksToUpdate:n?e:[t],firstBlockClientId:o,firstBlockRootClientId:r,selectedBlockClientIds:e}}const ke=(0,a.useCallback)((()=>{I(!0),L(t,!0)}),[t,I,L]),ve=(0,a.useCallback)((()=>{I(!1),L(t,!1)}),[t,I,L]),_e=(0,a.useCallback)((e=>{p(e,t),e.preventDefault()}),[t,p]),xe=(0,a.useCallback)(((e,t)=>{t&&p(void 0,e,null,null),hE(e,ge?.current)}),[p,ge]),ye=(0,a.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),!0===v?ae(t):!1===v&&le(t)}),[t,le,ae,v]),Se=(0,a.useCallback)((e=>{ie&&re&&(w.current?.click(),E(new window.DOMRect(e.clientX,e.clientY,0,0)),e.preventDefault())}),[re,w,ie]),we=(0,a.useCallback)((e=>{re&&2===e.button&&e.preventDefault()}),[re]),Ce=(0,a.useMemo)((()=>{const{ownerDocument:e}=S?.current||{};if(j&&e)return{ownerDocument:e,getBoundingClientRect:()=>j}}),[j]),Be=(0,a.useCallback)((()=>{E(void 0)}),[E]);if(function({isSelected:e,selectedClientIds:t,rowItemRef:n}){const o=1===t.length;(0,a.useLayoutEffect)((()=>{if(!e||!o||!n.current)return;const t=(0,ba.getScrollContainer)(n.current),{ownerDocument:r}=n.current;if(t===r.body||t===r.documentElement||!t)return;const i=n.current.getBoundingClientRect(),s=t.getBoundingClientRect();(i.top<s.top||i.bottom>s.bottom)&&n.current.scrollIntoView()}),[e,o,n])}({isSelected:s,rowItemRef:S,selectedClientIds:_}),!ne)return null;const Ie=((e,t,n)=>(0,C.sprintf)((0,C.__)("Block %1$d of %2$d, Level %3$d."),e,t,n))(h,f,g),je=((e,t)=>[e?.positionLabel?`${(0,C.sprintf)((0,C.__)("Position: %s"),e.positionLabel)}.`:void 0,t?(0,C.__)("This block is locked."):void 0].filter(Boolean).join(" "))(ee,T),Ee=b&&f>0,Te=Zi("block-editor-list-view-block__mover-cell",{"is-visible":B||s}),Me=Zi("block-editor-list-view-block__menu-cell",{"is-visible":B||R});let Pe;Ee?Pe=2:ie||(Pe=3);const Re=Zi({"is-selected":s,"is-first-selected":R,"is-last-selected":N,"is-branch-selected":d,"is-synced-branch":x,"is-dragging":r,"has-single-cell":!ie,"is-synced":ee?.isSynced,"is-draggable":P,"is-displacement-normal":"normal"===n,"is-displacement-up":"up"===n,"is-displacement-down":"down"===n,"is-after-dragged-blocks":o,"is-nesting":i}),Ne=_.includes(t)?_:[t],Le=s&&1===_.length;return(0,$.jsxs)(oE,{className:Re,isDragged:r,onKeyDown:async function(e){if(e.defaultPrevented)return;if(e.target.closest("[role=dialog]"))return;const t=[va.BACKSPACE,va.DELETE].includes(e.keyCode);if(fe("core/block-editor/unselect",e)&&_.length>0)e.stopPropagation(),e.preventDefault(),p(e,void 0);else if(t||fe("core/block-editor/remove",e)){var n;const{blocksToUpdate:e,firstBlockClientId:t,firstBlockRootClientId:o,selectedBlockClientIds:r}=be();if(!X(e))return;let i=null!==(n=W(t))&&void 0!==n?n:o;z(e,!1);const s=r.length>0&&0===U().length;i||(i=Z()[0]),xe(i,s)}else if(fe("core/block-editor/duplicate",e)){e.preventDefault();const{blocksToUpdate:t,firstBlockRootClientId:n}=be();if(Y(t).every((e=>!!e&&(0,l.hasBlockSupport)(e.name,"multiple",!0)&&G(e.name,n)))){const e=await A(t,!1);e?.length&&xe(e[0],!1)}}else if(fe("core/block-editor/insert-before",e)){e.preventDefault();const{blocksToUpdate:t}=be();await F(t[0]);const n=U();H(void 0),xe(n[0],!1)}else if(fe("core/block-editor/insert-after",e)){e.preventDefault();const{blocksToUpdate:t}=be();await V(t.at(-1));const n=U();H(void 0),xe(n[0],!1)}else if(fe("core/block-editor/select-all",e)){e.preventDefault();const{firstBlockRootClientId:t,selectedBlockClientIds:n}=be(),o=Z(t);if(!o.length)return;if(Ba()(n,o)&&t&&t!==me)return void xe(t,!0);D(o[0],o[o.length-1],null)}else if(fe("core/block-editor/collapse-list-view",e)){e.preventDefault();const{firstBlockClientId:t}=be(),n=q(t,!1);ce(),le(n)}else if(fe("core/block-editor/group",e)){const{blocksToUpdate:t}=be();if(t.length>1&&Q(t)){e.preventDefault();const n=Y(t),o=J(),r=(0,l.switchToBlockType)(n,o);O(t,r),(0,$o.speak)((0,C.__)("Selected blocks are grouped."));const i=U();H(void 0),xe(i[0],!1)}}},onMouseEnter:ke,onMouseLeave:ve,onFocus:ke,onBlur:ve,level:g,position:h,rowCount:m,path:k,id:`list-view-${de}-block-${t}`,"data-block":t,"data-expanded":M?v:void 0,ref:S,children:[(0,$.jsx)(os.__experimentalTreeGridCell,{className:"block-editor-list-view-block__contents-cell",colSpan:Pe,ref:y,"aria-selected":!!s,children:({ref:e,tabIndex:t,onFocus:n})=>(0,$.jsxs)("div",{className:"block-editor-list-view-block__contents-container",children:[(0,$.jsx)(pE,{block:ne,onClick:_e,onContextMenu:Se,onMouseDown:we,onToggleExpanded:ye,isSelected:s,position:h,siblingBlockCount:f,level:g,ref:e,tabIndex:Le?0:t,onFocus:n,isExpanded:M?v:void 0,selectedClientIds:_,ariaDescribedBy:se}),(0,$.jsx)(Jj,{id:se,children:[Ie,je].filter(Boolean).join(" ")})]})}),Ee&&(0,$.jsx)($.Fragment,{children:(0,$.jsxs)(os.__experimentalTreeGridCell,{className:Te,withoutGridItem:!0,children:[(0,$.jsx)(os.__experimentalTreeGridItem,{children:({ref:e,tabIndex:n,onFocus:o})=>(0,$.jsx)(LB,{orientation:"vertical",clientIds:[t],ref:e,tabIndex:n,onFocus:o})}),(0,$.jsx)(os.__experimentalTreeGridItem,{children:({ref:e,tabIndex:n,onFocus:o})=>(0,$.jsx)(AB,{orientation:"vertical",clientIds:[t],ref:e,tabIndex:n,onFocus:o})})]})}),ie&&ue&&(0,$.jsx)(os.__experimentalTreeGridCell,{className:Me,"aria-selected":!!s,ref:w,children:({ref:e,tabIndex:t,onFocus:n})=>(0,$.jsx)(ue,{clientIds:Ne,block:ne,icon:lb,label:(0,C.__)("Options"),popoverProps:{anchor:Ce},toggleProps:{ref:e,className:"block-editor-list-view-block__menu",tabIndex:t,onClick:Be,onFocus:n},disableOpenOnArrowDown:!0,expand:le,expandedState:pe,setInsertedBlock:he,__experimentalSelectBlock:xe})})]})}));function mE(e,t,n,o){var r;const i=n?.includes(e.clientId);if(i)return 0;return(null!==(r=t[e.clientId])&&void 0!==r?r:o)?1+e.innerBlocks.reduce(fE(t,n,o),0):1}const fE=(e,t,n)=>(o,r)=>{var i;const s=t?.includes(r.clientId);if(s)return o;return(null!==(i=e[r.clientId])&&void 0!==i?i:n)&&r.innerBlocks.length>0?o+mE(r,e,t,n):o+1},bE=()=>{};const kE=(0,a.memo)((function e(t){const{blocks:n,selectBlock:o=bE,showBlockMovers:r,selectedClientIds:i,level:s=1,path:l="",isBranchSelected:a=!1,listPosition:u=0,fixedListWindow:d,isExpanded:p,parentId:h,shouldShowInnerBlocks:g=!0,isSyncedBranch:m=!1,showAppender:f=!0}=t,b=Um(h),k=m||!!b?.isSynced,v=(0,c.useSelect)((e=>!h||e(li).canEditBlock(h)),[h]),{blockDropPosition:_,blockDropTargetIndex:x,firstDraggedBlockIndex:y,blockIndexes:S,expandedState:w,draggedClientIds:C}=Qj();if(!v)return null;const B=f&&1===s,I=n.filter(Boolean),j=I.length,E=B?j+1:j;let T=u;return(0,$.jsxs)($.Fragment,{children:[I.map(((t,n)=>{var u;const{clientId:h,innerBlocks:m}=t;n>0&&(T+=mE(I[n-1],w,C,p));const f=!!C?.includes(h),{displacement:b,isAfterDraggedBlocks:v,isNesting:B}=function({blockIndexes:e,blockDropTargetIndex:t,blockDropPosition:n,clientId:o,firstDraggedBlockIndex:r,isDragged:i}){let s,l,a;if(!i){l=!1;const i=e[o];a=i>r,null!=t&&void 0!==r?void 0!==i&&(s=i>=r&&i<t?"up":i<r&&i>=t?"down":"normal",l="number"==typeof t&&t-1===i&&"inside"===n):null===t&&void 0!==r?s=void 0!==i&&i>=r?"up":"normal":null!=t&&void 0===r?void 0!==i&&(s=i<t?"normal":"down"):null===t&&(s="normal")}return{displacement:s,isNesting:l,isAfterDraggedBlocks:a}}({blockIndexes:S,blockDropTargetIndex:x,blockDropPosition:_,clientId:h,firstDraggedBlockIndex:y,isDragged:f}),{itemInView:M}=d,P=M(T),R=n+1,N=l.length>0?`${l}_${R}`:`${R}`,L=!!m?.length,A=L&&g?null!==(u=w[h])&&void 0!==u?u:p:void 0,D=((e,t)=>Array.isArray(t)&&t.length?-1!==t.indexOf(e):t===e)(h,i),O=a||D&&L,z=f||P||D&&h===i[0]||0===n||n===j-1;return(0,$.jsxs)(c.AsyncModeProvider,{value:!D,children:[z&&(0,$.jsx)(gE,{block:t,selectBlock:o,isSelected:D,isBranchSelected:O,isDragged:f,level:s,position:R,rowCount:E,siblingBlockCount:j,showBlockMovers:r,path:N,isExpanded:!f&&A,listPosition:T,selectedClientIds:i,isSyncedBranch:k,displacement:b,isAfterDraggedBlocks:v,isNesting:B}),!z&&(0,$.jsx)("tr",{children:(0,$.jsx)("td",{className:"block-editor-list-view-placeholder"})}),L&&A&&!f&&(0,$.jsx)(e,{parentId:h,blocks:m,selectBlock:o,showBlockMovers:r,level:s+1,path:N,listPosition:T+1,fixedListWindow:d,isBranchSelected:O,selectedClientIds:i,isExpanded:p,isSyncedBranch:k})]},h)})),B&&(0,$.jsx)(os.__experimentalTreeGridRow,{level:s,setSize:E,positionInSet:E,isExpanded:!0,children:(0,$.jsx)(os.__experimentalTreeGridCell,{children:e=>(0,$.jsx)(eE,{clientId:h,nestingLevel:s,blockCount:j,...e})})})]})}));function vE({draggedBlockClientId:e,listViewRef:t,blockDropTarget:n}){const o=Um(e),r=bB({clientId:e,context:"list-view"}),{rootClientId:i,clientId:s,dropPosition:l}=n||{},[c,u]=(0,a.useMemo)((()=>{if(!t.current)return[];return[i?t.current.querySelector(`[data-block="${i}"]`):void 0,s?t.current.querySelector(`[data-block="${s}"]`):void 0]}),[t,i,s]),d=u||c,p=(0,C.isRTL)(),h=(0,a.useCallback)(((e,t)=>{if(!d)return 0;let n=d.offsetWidth;const o=(0,ba.getScrollContainer)(d,"horizontal"),r=d.ownerDocument,i=o===r.body||o===r.documentElement;if(o&&!i){const r=o.getBoundingClientRect(),i=(0,C.isRTL)()?r.right-e.right:e.left-r.left,s=o.clientWidth;if(s<n+i&&(n=s-i),!p&&e.left+t<r.left)return n-=r.left-e.left,n;if(p&&e.right-t>r.right)return n-=e.right-r.right,n}return n-t}),[p,d]),g=(0,a.useMemo)((()=>{if(!d)return{};const e=d.getBoundingClientRect();return{width:h(e,0)}}),[h,d]),m=(0,a.useMemo)((()=>{if(!d)return{};const e=(0,ba.getScrollContainer)(d),t=d.ownerDocument,n=e===t.body||e===t.documentElement;if(e&&!n){const t=e.getBoundingClientRect(),n=d.getBoundingClientRect(),o=p?t.right-n.right:n.left-t.left;if(!p&&t.left>n.left)return{transform:`translateX( ${o}px )`};if(p&&t.right<n.right)return{transform:`translateX( ${-1*o}px )`}}return{}}),[p,d]),f=(0,a.useMemo)((()=>{if(!c)return 1;const e=parseInt(c.getAttribute("aria-level"),10);return e?e+1:1}),[c]),b=(0,a.useMemo)((()=>!!d&&d.classList.contains("is-branch-selected")),[d]),k=(0,a.useMemo)((()=>{if(d&&("top"===l||"bottom"===l||"inside"===l))return{contextElement:d,getBoundingClientRect(){const e=d.getBoundingClientRect();let t=e.left,n=0;const o=(0,ba.getScrollContainer)(d,"horizontal"),r=d.ownerDocument,i=o===r.body||o===r.documentElement;if(o&&!i){const e=o.getBoundingClientRect(),n=p?o.offsetWidth-o.clientWidth:0;t<e.left+n&&(t=e.left+n)}n="top"===l?e.top-2*e.height:e.top;const s=h(e,0),a=e.height;return new window.DOMRect(t,n,s,a)}}}),[d,l,h,p]);return d?(0,$.jsx)(os.Popover,{animate:!1,anchor:k,focusOnMount:!1,className:"block-editor-list-view-drop-indicator--preview",variant:"unstyled",flip:!1,resize:!0,children:(0,$.jsx)("div",{style:g,className:Zi("block-editor-list-view-drop-indicator__line",{"block-editor-list-view-drop-indicator__line--darker":b}),children:(0,$.jsxs)("div",{className:"block-editor-list-view-leaf","aria-level":f,children:[(0,$.jsxs)("div",{className:Zi("block-editor-list-view-block-select-button","block-editor-list-view-block-contents"),style:m,children:[(0,$.jsx)(sE,{onClick:()=>{}}),(0,$.jsx)(Uf,{icon:o?.icon,showColors:!0,context:"list-view"}),(0,$.jsx)(os.__experimentalHStack,{alignment:"center",className:"block-editor-list-view-block-select-button__label-wrapper",justify:"flex-start",spacing:1,children:(0,$.jsx)("span",{className:"block-editor-list-view-block-select-button__title",children:(0,$.jsx)(os.__experimentalTruncate,{ellipsizeMode:"auto",children:r})})})]}),(0,$.jsx)("div",{className:"block-editor-list-view-block__menu-cell"})]})})}):null}function _E(){const{clearSelectedBlock:e,multiSelect:t,selectBlock:n}=(0,c.useDispatch)(li),{getBlockName:o,getBlockParents:r,getBlockSelectionStart:i,getSelectedBlockClientIds:s,hasMultiSelection:u,hasSelectedBlock:d}=(0,c.useSelect)(li),{getBlockType:p}=(0,c.useSelect)(l.store);return{updateBlockSelection:(0,a.useCallback)((async(l,a,c,h)=>{if(!l?.shiftKey&&l?.keyCode!==va.ESCAPE)return void n(a,h);l.preventDefault();const g="keydown"===l.type&&l.keyCode===va.ESCAPE,m="keydown"===l.type&&(l.keyCode===va.UP||l.keyCode===va.DOWN||l.keyCode===va.HOME||l.keyCode===va.END);if(!m&&!d()&&!u())return void n(a,null);const f=s(),b=[...r(a),a];if((g||m&&!f.some((e=>b.includes(e))))&&await e(),!g){let e=i(),n=a;m&&(d()||u()||(e=a),c&&(n=c));const o=r(e),s=r(n),{start:l,end:p}=function(e,t,n,o){const r=[...n,e],i=[...o,t],s=Math.min(r.length,i.length)-1;return{start:r[s],end:i[s]}}(e,n,o,s);await t(l,p,null)}const k=s();if((l.keyCode===va.HOME||l.keyCode===va.END)&&k.length>1)return;const v=f.filter((e=>!k.includes(e)));let _;if(1===v.length){const e=p(o(v[0]))?.title;e&&(_=(0,C.sprintf)((0,C.__)("%s deselected."),e))}else v.length>1&&(_=(0,C.sprintf)((0,C.__)("%s blocks deselected."),v.length));_&&(0,$o.speak)(_,"assertive")}),[e,o,p,r,i,s,u,d,t,n])}}const xE=24;function yE(e,t){const n=e[t+1];return n&&n.isDraggedBlock?yE(e,t+1):n}const SE=["top","bottom"];function wE(e,t,n=!1){let o,r,i,s,l;for(let n=0;n<e.length;n++){const a=e[n];if(a.isDraggedBlock)continue;const c=a.element.getBoundingClientRect(),[u,d]=Rx(t,c,SE),p=Nx(t,c);if(void 0===i||u<i||p){i=u;const t=e.indexOf(a),n=e[t-1];if("top"===d&&n&&n.rootClientId===a.rootClientId&&!n.isDraggedBlock?(r=n,o="bottom",s=n.element.getBoundingClientRect(),l=t-1):(r=a,o=d,s=c,l=t),p)break}}if(!r)return;const a=function(e,t){const n=[];let o=e;for(;o;)n.push({...o}),o=t.find((e=>e.clientId===o.rootClientId));return n}(r,e),c="bottom"===o;if(c&&r.canInsertDraggedBlocksAsChild&&(r.innerBlockCount>0&&r.isExpanded||function(e,t,n=1,o=!1){const r=o?t.right-n*xE:t.left+n*xE;return(o?e.x<r-xE:e.x>r+xE)&&e.y<t.bottom}(t,s,a.length,n))){const e=r.isExpanded?0:r.innerBlockCount||0;return{rootClientId:r.clientId,clientId:r.clientId,blockIndex:e,dropPosition:"inside"}}if(c&&r.rootClientId&&function(e,t,n=1,o=!1){const r=o?t.right-n*xE:t.left+n*xE;return o?e.x>r:e.x<r}(t,s,a.length,n)){const i=yE(e,l),c=r.nestingLevel,u=i?i.nestingLevel:1;if(c&&u){const d=function(e,t,n=1,o=!1){const r=o?t.right-n*xE:t.left+n*xE,i=o?r-e.x:e.x-r,s=Math.round(i/xE);return Math.abs(s)}(t,s,a.length,n),p=Math.max(Math.min(d,c-u),0);if(a[p]){let t=r.blockIndex;if(a[p].nestingLevel===i?.nestingLevel)t=i?.blockIndex;else for(let n=l;n>=0;n--){const o=e[n];if(o.rootClientId===a[p].rootClientId){t=o.blockIndex+1;break}}return{rootClientId:a[p].rootClientId,clientId:r.clientId,blockIndex:t,dropPosition:o}}}}if(!r.canInsertDraggedBlocksAsSibling)return;const u=c?1:0;return{rootClientId:r.rootClientId,clientId:r.clientId,blockIndex:r.blockIndex+u,dropPosition:o}}const CE={leading:!1,trailing:!0};function BE({selectBlock:e}){const t=(0,c.useRegistry)(),{getBlockOrder:n,getBlockRootClientId:o,getBlocksByClientId:r,getPreviousBlockClientId:i,getSelectedBlockClientIds:s,getSettings:a,canInsertBlockType:d,canRemoveBlocks:p}=(0,c.useSelect)(li),{flashBlock:h,removeBlocks:g,replaceBlocks:m,insertBlocks:f}=(0,c.useDispatch)(li),b=xy();return(0,u.useRefEffect)((c=>{function u(t,n){n&&e(void 0,t,null,null),hE(t,c)}function k(e){if(e.defaultPrevented)return;if(!c.contains(e.target.ownerDocument.activeElement))return;const k=e.target.ownerDocument.activeElement?.closest("[role=row]"),v=k?.dataset?.block;if(!v)return;const{blocksToUpdate:_,firstBlockClientId:x,firstBlockRootClientId:y,originallySelectedBlockClientIds:S}=function(e){const t=s(),n=t.includes(e),r=n?t[0]:e;return{blocksToUpdate:n?t:[e],firstBlockClientId:r,firstBlockRootClientId:o(r),originallySelectedBlockClientIds:t}}(v);if(0!==_.length){if(e.preventDefault(),"copy"===e.type||"cut"===e.type){1===_.length&&h(_[0]),b(e.type,_);wy(e,r(_),t)}if("cut"===e.type){var w;if(!p(_))return;let e=null!==(w=i(x))&&void 0!==w?w:y;g(_,!1);const t=S.length>0&&0===s().length;e||(e=n()[0]),u(e,t)}else if("paste"===e.type){const{__experimentalCanUserUseUnfilteredHTML:t}=a(),n=function(e,t){const{plainText:n,html:o,files:r}=yy(e);let i=[];if(r.length){const e=(0,l.getBlockTransforms)("from");i=r.reduce(((t,n)=>{const o=(0,l.findTransform)(e,(e=>"files"===e.type&&e.isMatch([n])));return o&&t.push(o.transform([n])),t}),[]).flat()}else i=(0,l.pasteHandler)({HTML:o,plainText:n,mode:"BLOCKS",canUserUseUnfilteredHTML:t});return i}(e,t);if(1===_.length){const[e]=_;if(n.every((t=>d(t.name,e))))return f(n,void 0,e),void u(n[0]?.clientId,!1)}m(_,n,n.length-1,-1),u(n[0]?.clientId,!1)}}}return c.ownerDocument.addEventListener("copy",k),c.ownerDocument.addEventListener("cut",k),c.ownerDocument.addEventListener("paste",k),()=>{c.ownerDocument.removeEventListener("copy",k),c.ownerDocument.removeEventListener("cut",k),c.ownerDocument.removeEventListener("paste",k)}}),[])}const IE=(e,t)=>"clear"===t.type?{}:Array.isArray(t.clientIds)?{...e,...t.clientIds.reduce(((e,n)=>({...e,[n]:"expand"===t.type})),{})}:e;const jE=(0,a.forwardRef)((function e({id:t,blocks:n,dropZoneElement:o,showBlockMovers:r=!1,isExpanded:i=!1,showAppender:s=!1,blockSettingsMenu:l=rj,rootClientId:d,description:p,onSelect:h,additionalBlockContent:g},m){n&&y()("`blocks` property in `wp.blockEditor.__experimentalListView`",{since:"6.3",alternative:"`rootClientId` property"});const f=(0,u.useInstanceId)(e),{clientIdsTree:b,draggedClientIds:k,selectedClientIds:v}=function({blocks:e,rootClientId:t}){return(0,c.useSelect)((n=>{const{getDraggedBlockClientIds:o,getSelectedBlockClientIds:r,getEnabledClientIdsTree:i}=te(n(li));return{selectedClientIds:r(),draggedClientIds:o(),clientIdsTree:null!=e?e:i(t)}}),[e,t])}({blocks:n,rootClientId:d}),_=function(e){const t=(0,a.useMemo)((()=>{const t={};let n=0;const o=e=>{e.forEach((e=>{t[e.clientId]=n,n++,e.innerBlocks.length>0&&o(e.innerBlocks)}))};return o(e),t}),[e]);return t}(b),{getBlock:x}=(0,c.useSelect)(li),{visibleBlockCount:S}=(0,c.useSelect)((e=>{const{getGlobalBlockCount:t,getClientIdsOfDescendants:n}=e(li),o=k?.length>0?n(k).length+1:0;return{visibleBlockCount:t()-o}}),[k]),{updateBlockSelection:w}=_E(),[B,I]=(0,a.useReducer)(IE,{}),[j,E]=(0,a.useState)(null),{setSelectedTreeId:T}=function({firstSelectedBlockClientId:e,setExpandedState:t}){const[n,o]=(0,a.useState)(null),{selectedBlockParentClientIds:r}=(0,c.useSelect)((t=>{const{getBlockParents:n}=t(li);return{selectedBlockParentClientIds:n(e,!1)}}),[e]);return(0,a.useEffect)((()=>{n!==e&&r?.length&&t({type:"expand",clientIds:r})}),[e,r,n,t]),{setSelectedTreeId:o}}({firstSelectedBlockClientId:v[0],setExpandedState:I}),M=(0,a.useCallback)(((e,t,n)=>{w(e,t,null,n),T(t),h&&h(x(t))}),[T,w,h,x]),{ref:P,target:R}=function({dropZoneElement:e,expandedState:t,setExpandedState:n}){const{getBlockRootClientId:o,getBlockIndex:r,getBlockCount:i,getDraggedBlockClientIds:s,canInsertBlocks:l}=(0,c.useSelect)(li),[d,p]=(0,a.useState)(),{rootClientId:h,blockIndex:g}=d||{},m=Px(h,g),f=(0,C.isRTL)(),b=(0,u.usePrevious)(h),k=(0,a.useCallback)(((e,t)=>{const{rootClientId:o}=t||{};o&&("inside"!==t?.dropPosition||e[o]||n({type:"expand",clientIds:[o]}))}),[n]),v=(0,u.useThrottle)(k,500,CE);(0,a.useEffect)((()=>{"inside"===d?.dropPosition&&b===d?.rootClientId?v(t,d):v.cancel()}),[t,b,d,v]);const _=s(),x=(0,u.useThrottle)((0,a.useCallback)(((e,t)=>{const n={x:e.clientX,y:e.clientY},s=!!_?.length,a=wE(Array.from(t.querySelectorAll("[data-block]")).map((e=>{const t=e.dataset.block,n="true"===e.dataset.expanded,a=e.classList.contains("is-dragging"),c=parseInt(e.getAttribute("aria-level"),10),u=o(t);return{clientId:t,isExpanded:n,rootClientId:u,blockIndex:r(t),element:e,nestingLevel:c||void 0,isDraggedBlock:!!s&&a,innerBlockCount:i(t),canInsertDraggedBlocksAsSibling:!s||l(_,u),canInsertDraggedBlocksAsChild:!s||l(_,t)}})),n,f);a&&p(a)}),[l,_,i,r,o,f]),50);return{ref:(0,u.__experimentalUseDropZone)({dropZoneElement:e,onDrop(e){x.cancel(),d&&m(e),p(void 0)},onDragLeave(){x.cancel(),p(null)},onDragOver(e){x(e,e.currentTarget)},onDragEnd(){x.cancel(),p(void 0)}}),target:d}}({dropZoneElement:o,expandedState:B,setExpandedState:I}),N=(0,a.useRef)(),L=BE({selectBlock:M}),A=(0,u.useMergeRefs)([L,N,P,m]);(0,a.useEffect)((()=>{v?.length&&hE(v[0],N?.current)}),[]);const D=(0,a.useCallback)((e=>{if(!e)return;const t=Array.isArray(e)?e:[e];I({type:"expand",clientIds:t})}),[I]),O=(0,a.useCallback)((e=>{e&&I({type:"collapse",clientIds:[e]})}),[I]),z=(0,a.useCallback)((()=>{I({type:"clear"})}),[I]),V=(0,a.useCallback)((e=>{D(e?.dataset?.block)}),[D]),F=(0,a.useCallback)((e=>{O(e?.dataset?.block)}),[O]),H=(0,a.useCallback)(((e,t,n)=>{e.shiftKey&&w(e,t?.dataset?.block,n?.dataset?.block)}),[w]);!function({collapseAll:e,expand:t}){const{expandedBlock:n,getBlockParents:o}=(0,c.useSelect)((e=>{const{getBlockParents:t,getExpandedBlock:n}=te(e(li));return{expandedBlock:n(),getBlockParents:t}}),[]);(0,a.useEffect)((()=>{if(n){const r=o(n,!1);e(),t(r)}}),[e,t,n,o])}({collapseAll:z,expand:D});const G=k?.[0],{blockDropTargetIndex:U,blockDropPosition:W,firstDraggedBlockIndex:K}=(0,a.useMemo)((()=>{let e,t;if(R?.clientId){const t=_[R.clientId];e=void 0===t||"top"===R?.dropPosition?t:t+1}else null===R&&(e=null);if(G){const e=_[G];t=void 0===e||"top"===R?.dropPosition?e:e+1}return{blockDropTargetIndex:e,blockDropPosition:R?.dropPosition,firstDraggedBlockIndex:t}}),[R,_,G]),Z=(0,a.useMemo)((()=>({blockDropPosition:W,blockDropTargetIndex:U,blockIndexes:_,draggedClientIds:k,expandedState:B,expand:D,firstDraggedBlockIndex:K,collapse:O,collapseAll:z,BlockSettingsMenu:l,listViewInstanceId:f,AdditionalBlockContent:g,insertedBlock:j,setInsertedBlock:E,treeGridElementRef:N,rootClientId:d})),[W,U,_,k,B,D,K,O,z,l,f,g,j,E,d]),[q]=(0,u.__experimentalUseFixedWindowList)(N,32,S,{expandedState:B,useWindowing:!0,windowOverscan:40});if(!b.length&&!s)return null;const Y=p&&`block-editor-list-view-description-${f}`;return(0,$.jsxs)(c.AsyncModeProvider,{value:!0,children:[(0,$.jsx)(vE,{draggedBlockClientId:G,listViewRef:N,blockDropTarget:R}),p&&(0,$.jsx)(os.VisuallyHidden,{id:Y,children:p}),(0,$.jsx)(os.__experimentalTreeGrid,{id:t,className:Zi("block-editor-list-view-tree",{"is-dragging":k?.length>0&&void 0!==U}),"aria-label":(0,C.__)("Block navigation structure"),ref:A,onCollapseRow:F,onExpandRow:V,onFocusRow:H,applicationAriaLabel:(0,C.__)("Block navigation structure"),"aria-describedby":Y,style:{"--wp-admin--list-view-dragged-items-height":k?.length?32*(k.length-1)+"px":null},children:(0,$.jsx)(Xj.Provider,{value:Z,children:(0,$.jsx)(kE,{blocks:b,parentId:d,selectBlock:M,showBlockMovers:r,fixedListWindow:q,selectedClientIds:v,isExpanded:i,showAppender:s})})})]})})),EE=(0,a.forwardRef)(((e,t)=>(0,$.jsx)(jE,{ref:t,...e,showAppender:!1,rootClientId:null,onSelect:null,additionalBlockContent:null,blockSettingsMenu:void 0})));function TE({isEnabled:e,onToggle:t,isOpen:n,innerRef:o,...r}){return(0,$.jsx)(os.Button,{__next40pxDefaultSize:!1,...r,ref:o,icon:Yj,"aria-expanded":n,"aria-haspopup":"true",onClick:e?t:void 0,label:(0,C.__)("List view"),className:"block-editor-block-navigation","aria-disabled":!e})}const ME=(0,a.forwardRef)((function({isDisabled:e,...t},n){y()("wp.blockEditor.BlockNavigationDropdown",{since:"6.1",alternative:"wp.components.Dropdown and wp.blockEditor.ListView"});const o=(0,c.useSelect)((e=>!!e(li).getBlockCount()),[])&&!e;return(0,$.jsx)(os.Dropdown,{contentClassName:"block-editor-block-navigation__popover",popoverProps:{placement:"bottom-start"},renderToggle:({isOpen:e,onToggle:r})=>(0,$.jsx)(TE,{...t,innerRef:n,isOpen:e,onToggle:r,isEnabled:o}),renderContent:()=>(0,$.jsxs)("div",{className:"block-editor-block-navigation__container",children:[(0,$.jsx)("p",{className:"block-editor-block-navigation__label",children:(0,C.__)("List view")}),(0,$.jsx)(EE,{})]})})}));function PE({genericPreviewBlock:e,style:t,className:n,activeStyle:o}){const r=(0,l.getBlockType)(e.name)?.example,i=QB(n,o,t),s=(0,a.useMemo)((()=>({...e,title:t.label||t.name,description:t.description,initialAttributes:{...e.attributes,className:i+" block-editor-block-styles__block-preview-container"},example:r})),[e,i]);return(0,$.jsx)(aS,{item:s})}const RE=()=>{};const NE=function({clientId:e,onSwitch:t=RE,onHoverClassName:n=RE}){const{onSelect:o,stylesToRender:r,activeStyle:i,genericPreviewBlock:s,className:l}=eI({clientId:e,onSwitch:t}),[c,d]=(0,a.useState)(null),p=(0,u.useViewportMatch)("medium","<");if(!r||0===r.length)return null;const h=(0,u.debounce)(d,250),g=e=>{var t;c!==e?(h(e),n(null!==(t=e?.name)&&void 0!==t?t:null)):h.cancel()};return(0,$.jsxs)("div",{className:"block-editor-block-styles",children:[(0,$.jsx)("div",{className:"block-editor-block-styles__variants",children:r.map((e=>{const t=e.label||e.name;return(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,className:Zi("block-editor-block-styles__item",{"is-active":i.name===e.name}),variant:"secondary",label:t,onMouseEnter:()=>g(e),onFocus:()=>g(e),onMouseLeave:()=>g(null),onBlur:()=>g(null),onClick:()=>(e=>{o(e),n(null),d(null),h.cancel()})(e),"aria-current":i.name===e.name,children:(0,$.jsx)(os.__experimentalTruncate,{numberOfLines:1,className:"block-editor-block-styles__item-text",children:t})},e.name)}))}),c&&!p&&(0,$.jsx)(os.Popover,{placement:"left-start",offset:34,focusOnMount:!1,children:(0,$.jsx)("div",{className:"block-editor-block-styles__preview-panel",onMouseLeave:()=>g(null),children:(0,$.jsx)(PE,{activeStyle:i,className:l,genericPreviewBlock:s,style:c})})})]})},LE={0:(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"m9.99609 14v-.2251l.00391.0001v6.225h1.5v-14.5h2.5v14.5h1.5v-14.5h3v-1.5h-8.50391c-2.76142 0-5 2.23858-5 5 0 2.7614 2.23858 5 5 5z"})}),1:(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M17.6 7c-.6.9-1.5 1.7-2.6 2v1h2v7h2V7h-1.4zM11 11H7V7H5v10h2v-4h4v4h2V7h-2v4z"})}),2:(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M9 11.1H5v-4H3v10h2v-4h4v4h2v-10H9v4zm8 4c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6v1.5h8v-2H17z"})}),3:(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M9 11H5V7H3v10h2v-4h4v4h2V7H9v4zm11.3 1.7c-.4-.4-1-.7-1.6-.8v-.1c.6-.2 1.1-.5 1.5-.9.3-.4.5-.8.5-1.3 0-.4-.1-.8-.3-1.1-.2-.3-.5-.6-.8-.8-.4-.2-.8-.4-1.2-.5-.6-.1-1.1-.2-1.6-.2-.6 0-1.3.1-1.8.3s-1.1.5-1.6.9l1.2 1.4c.4-.2.7-.4 1.1-.6.3-.2.7-.3 1.1-.3.4 0 .8.1 1.1.3.3.2.4.5.4.8 0 .4-.2.7-.6.9-.7.3-1.5.5-2.2.4v1.6c.5 0 1 0 1.5.1.3.1.7.2 1 .3.2.1.4.2.5.4s.1.4.1.6c0 .3-.2.7-.5.8-.4.2-.9.3-1.4.3s-1-.1-1.4-.3c-.4-.2-.8-.4-1.2-.7L13 15.6c.5.4 1 .8 1.6 1 .7.3 1.5.4 2.3.4.6 0 1.1-.1 1.6-.2.4-.1.9-.2 1.3-.5.4-.2.7-.5.9-.9.2-.4.3-.8.3-1.2 0-.6-.3-1.1-.7-1.5z"})}),4:(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M20 13V7h-3l-4 6v2h5v2h2v-2h1v-2h-1zm-2 0h-2.8L18 9v4zm-9-2H5V7H3v10h2v-4h4v4h2V7H9v4z"})}),5:(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M9 11H5V7H3v10h2v-4h4v4h2V7H9v4zm11.7 1.2c-.2-.3-.5-.7-.8-.9-.3-.3-.7-.5-1.1-.6-.5-.1-.9-.2-1.4-.2-.2 0-.5.1-.7.1-.2.1-.5.1-.7.2l.1-1.9h4.3V7H14l-.3 5 1 .6.5-.2.4-.1c.1-.1.3-.1.4-.1h.5c.5 0 1 .1 1.4.4.4.2.6.7.6 1.1 0 .4-.2.8-.6 1.1-.4.3-.9.4-1.4.4-.4 0-.9-.1-1.3-.3-.4-.2-.7-.4-1.1-.7 0 0-1.1 1.4-1 1.5.5.4 1 .8 1.6 1 .7.3 1.5.4 2.3.4.5 0 1-.1 1.5-.3s.9-.4 1.3-.7c.4-.3.7-.7.9-1.1s.3-.9.3-1.4-.1-1-.3-1.4z"})}),6:(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M20.7 12.4c-.2-.3-.4-.6-.7-.9s-.6-.5-1-.6c-.4-.2-.8-.2-1.2-.2-.5 0-.9.1-1.3.3s-.8.5-1.2.8c0-.5 0-.9.2-1.4l.6-.9c.2-.2.5-.4.8-.5.6-.2 1.3-.2 1.9 0 .3.1.6.3.8.5 0 0 1.3-1.3 1.3-1.4-.4-.3-.9-.6-1.4-.8-.6-.2-1.3-.3-2-.3-.6 0-1.1.1-1.7.4-.5.2-1 .5-1.4.9-.4.4-.8 1-1 1.6-.3.7-.4 1.5-.4 2.3s.1 1.5.3 2.1c.2.6.6 1.1 1 1.5.4.4.9.7 1.4.9 1 .3 2 .3 3 0 .4-.1.8-.3 1.2-.6.3-.3.6-.6.8-1 .2-.5.3-.9.3-1.4s-.1-.9-.3-1.3zm-2 2.1c-.1.2-.3.4-.4.5-.1.1-.3.2-.5.2-.2.1-.4.1-.6.1-.2.1-.5 0-.7-.1-.2 0-.3-.2-.5-.3-.1-.2-.3-.4-.4-.6-.2-.3-.3-.7-.3-1 .3-.3.6-.5 1-.7.3-.1.7-.2 1-.2.4 0 .8.1 1.1.3.3.3.4.7.4 1.1 0 .2 0 .5-.1.7zM9 11H5V7H3v10h2v-4h4v4h2V7H9v4z"})})};function AE({level:e}){return LE[e]?(0,$.jsx)(os.Icon,{icon:LE[e]}):null}const DE=[1,2,3,4,5,6],OE={className:"block-library-heading-level-dropdown"};function zE({options:e=DE,value:t,onChange:n}){const o=e.filter((e=>0===e||DE.includes(e))).sort(((e,t)=>e-t));return(0,$.jsx)(os.ToolbarDropdownMenu,{popoverProps:OE,icon:(0,$.jsx)(AE,{level:t}),label:(0,C.__)("Change level"),controls:o.map((e=>{const o=e===t;return{icon:(0,$.jsx)(AE,{level:e}),title:0===e?(0,C.__)("Paragraph"):(0,C.sprintf)((0,C.__)("Heading %d"),e),isActive:o,onClick(){n(e)},role:"menuitemradio"}}))})}const VE=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.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"})});const FE=function({icon:e=VE,label:t=(0,C.__)("Choose variation"),instructions:n=(0,C.__)("Select a variation to start with:"),variations:o,onSelect:r,allowSkip:i}){const s=Zi("block-editor-block-variation-picker",{"has-many-variations":o.length>4});return(0,$.jsxs)(os.Placeholder,{icon:e,label:t,instructions:n,className:s,children:[(0,$.jsx)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":(0,C.__)("Block variations"),children:o.map((e=>(0,$.jsxs)("li",{children:[(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,variant:"tertiary",icon:e.icon&&e.icon.src?e.icon.src:e.icon,iconSize:48,onClick:()=>r(e),className:"block-editor-block-variation-picker__variation",label:e.description||e.title}),(0,$.jsx)("span",{className:"block-editor-block-variation-picker__variation-label",children:e.title})]},e.name)))}),i&&(0,$.jsx)("div",{className:"block-editor-block-variation-picker__skip",children:(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>r(),children:(0,C.__)("Skip")})})]})},HE="carousel",GE="grid",$E=({onBlockPatternSelect:e})=>(0,$.jsx)("div",{className:"block-editor-block-pattern-setup__actions",children:(0,$.jsx)(os.Button,{__next40pxDefaultSize:!1,variant:"primary",onClick:e,children:(0,C.__)("Choose")})}),UE=({handlePrevious:e,handleNext:t,activeSlide:n,totalSlides:o})=>(0,$.jsxs)("div",{className:"block-editor-block-pattern-setup__navigation",children:[(0,$.jsx)(os.Button,{__next40pxDefaultSize:!1,icon:(0,C.isRTL)()?Hf:Gf,label:(0,C.__)("Previous pattern"),onClick:e,disabled:0===n,accessibleWhenDisabled:!0}),(0,$.jsx)(os.Button,{__next40pxDefaultSize:!1,icon:(0,C.isRTL)()?Gf:Hf,label:(0,C.__)("Next pattern"),onClick:t,disabled:n===o-1,accessibleWhenDisabled:!0})]}),WE=({viewMode:e,setViewMode:t,handlePrevious:n,handleNext:o,activeSlide:r,totalSlides:i,onBlockPatternSelect:s})=>{const l=e===HE,a=(0,$.jsxs)("div",{className:"block-editor-block-pattern-setup__display-controls",children:[(0,$.jsx)(os.Button,{__next40pxDefaultSize:!1,icon:Ol,label:(0,C.__)("Carousel view"),onClick:()=>t(HE),isPressed:l}),(0,$.jsx)(os.Button,{__next40pxDefaultSize:!1,icon:dj,label:(0,C.__)("Grid view"),onClick:()=>t(GE),isPressed:e===GE})]});return(0,$.jsxs)("div",{className:"block-editor-block-pattern-setup__toolbar",children:[l&&(0,$.jsx)(UE,{handlePrevious:n,handleNext:o,activeSlide:r,totalSlides:i}),a,l&&(0,$.jsx)($E,{onBlockPatternSelect:s})]})};const KE=function(e,t,n){return(0,c.useSelect)((o=>{const{getBlockRootClientId:r,getPatternsByBlockTypes:i,__experimentalGetAllowedPatterns:s}=o(li),l=r(e);return n?s(l).filter(n):i(t,l)}),[e,t,n])},ZE=({viewMode:e,activeSlide:t,patterns:n,onBlockPatternSelect:o,showTitles:r})=>{const i="block-editor-block-pattern-setup__container";if(e===HE){const e=new Map([[t,"active-slide"],[t-1,"previous-slide"],[t+1,"next-slide"]]);return(0,$.jsx)("div",{className:"block-editor-block-pattern-setup__carousel",children:(0,$.jsx)("div",{className:i,children:(0,$.jsx)("div",{className:"carousel-container",children:n.map(((n,o)=>(0,$.jsx)(YE,{active:o===t,className:e.get(o)||"",pattern:n},n.name)))})})})}return(0,$.jsx)("div",{className:"block-editor-block-pattern-setup__grid",children:(0,$.jsx)(os.Composite,{role:"listbox",className:i,"aria-label":(0,C.__)("Patterns list"),children:n.map((e=>(0,$.jsx)(qE,{pattern:e,onSelect:o,showTitles:r},e.name)))})})};function qE({pattern:e,onSelect:t,showTitles:n}){const o="block-editor-block-pattern-setup-list",{blocks:r,description:i,viewportWidth:s=700}=e,l=(0,u.useInstanceId)(qE,`${o}__item-description`);return(0,$.jsx)("div",{className:`${o}__list-item`,children:(0,$.jsxs)(os.Composite.Item,{render:(0,$.jsx)("div",{"aria-describedby":i?l:void 0,"aria-label":e.title,className:`${o}__item`}),id:`${o}__pattern__${e.name}`,role:"option",onClick:()=>t(r),children:[(0,$.jsx)(sS,{blocks:r,viewportWidth:s}),n&&(0,$.jsx)("div",{className:`${o}__item-title`,children:e.title}),!!i&&(0,$.jsx)(os.VisuallyHidden,{id:l,children:i})]})})}function YE({active:e,className:t,pattern:n,minHeight:o}){const{blocks:r,title:i,description:s}=n,l=(0,u.useInstanceId)(YE,"block-editor-block-pattern-setup-list__item-description");return(0,$.jsxs)("div",{"aria-hidden":!e,role:"img",className:`pattern-slide ${t}`,"aria-label":i,"aria-describedby":s?l:void 0,children:[(0,$.jsx)(sS,{blocks:r,minHeight:o}),!!s&&(0,$.jsx)(os.VisuallyHidden,{id:l,children:s})]})}const XE=({clientId:e,blockName:t,filterPatternsFn:n,onBlockPatternSelect:o,initialViewMode:r=HE,showTitles:i=!1})=>{const[s,u]=(0,a.useState)(r),[d,p]=(0,a.useState)(0),{replaceBlock:h}=(0,c.useDispatch)(li),g=KE(e,t,n);if(!g?.length)return null;const m=o||(t=>{const n=t.map((e=>(0,l.cloneBlock)(e)));h(e,n)});return(0,$.jsx)($.Fragment,{children:(0,$.jsxs)("div",{className:`block-editor-block-pattern-setup view-mode-${s}`,children:[(0,$.jsx)(ZE,{viewMode:s,activeSlide:d,patterns:g,onBlockPatternSelect:m,showTitles:i}),(0,$.jsx)(WE,{viewMode:s,setViewMode:u,activeSlide:d,totalSlides:g.length,handleNext:()=>{p((e=>Math.min(e+1,g.length-1)))},handlePrevious:()=>{p((e=>Math.max(e-1,0)))},onBlockPatternSelect:()=>{m(g[d].blocks)}})]})})};function QE({className:e,onSelectVariation:t,selectedValue:n,variations:o}){return(0,$.jsxs)("fieldset",{className:e,children:[(0,$.jsx)(os.VisuallyHidden,{as:"legend",children:(0,C.__)("Transform to variation")}),o.map((e=>(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,size:"compact",icon:(0,$.jsx)(Uf,{icon:e.icon,showColors:!0}),isPressed:n===e.name,label:n===e.name?e.title:(0,C.sprintf)((0,C.__)("Transform to %s"),e.title),onClick:()=>t(e.name),"aria-label":e.title,showTooltip:!0},e.name)))]})}function JE({className:e,onSelectVariation:t,selectedValue:n,variations:o}){const r=o.map((({name:e,title:t,description:n})=>({value:e,label:t,info:n})));return(0,$.jsx)(os.DropdownMenu,{className:e,label:(0,C.__)("Transform to variation"),text:(0,C.__)("Transform to variation"),popoverProps:{position:"bottom center",className:`${e}__popover`},icon:mC,toggleProps:{iconPosition:"right"},children:()=>(0,$.jsx)("div",{className:`${e}__container`,children:(0,$.jsx)(os.MenuGroup,{children:(0,$.jsx)(os.MenuItemsChoice,{choices:r,value:n,onSelect:t})})})})}function eT({className:e,onSelectVariation:t,selectedValue:n,variations:o}){return(0,$.jsx)("div",{className:e,children:(0,$.jsx)(os.__experimentalToggleGroupControl,{label:(0,C.__)("Transform to variation"),value:n,hideLabelFromVision:!0,onChange:t,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,children:o.map((e=>(0,$.jsx)(os.__experimentalToggleGroupControlOptionIcon,{icon:(0,$.jsx)(Uf,{icon:e.icon,showColors:!0}),value:e.name,label:n===e.name?e.title:(0,C.sprintf)((0,C.__)("Transform to %s"),e.title)},e.name)))})})}const tT=function({blockClientId:e}){const{updateBlockAttributes:t}=(0,c.useDispatch)(li),{activeBlockVariation:n,variations:o,isContentOnly:r}=(0,c.useSelect)((t=>{const{getActiveBlockVariation:n,getBlockVariations:o}=t(l.store),{getBlockName:r,getBlockAttributes:i,getBlockEditingMode:s}=t(li),a=e&&r(e),{hasContentRoleAttribute:c}=te(t(l.store)),u=c(a);return{activeBlockVariation:n(a,i(e)),variations:a&&o(a,"transform"),isContentOnly:"contentOnly"===s(e)&&!u}}),[e]),i=n?.name,s=(0,a.useMemo)((()=>{const e=new Set;return!!o&&(o.forEach((t=>{t.icon&&e.add(t.icon?.src||t.icon)})),e.size===o.length)}),[o]);if(!o?.length||r)return null;const u=o.length>5,d=s?u?QE:eT:JE;return(0,$.jsx)(d,{className:"block-editor-block-variation-transforms",onSelectVariation:n=>{t(e,{...o.find((({name:e})=>e===n)).attributes})},selectedValue:i,variations:o})},nT=(0,u.createHigherOrderComponent)((e=>t=>{const[n,o]=ci("color.palette","color.custom"),{colors:r=n,disableCustomColors:i=!o}=t,s=r&&r.length>0||!i;return(0,$.jsx)(e,{...t,colors:r,disableCustomColors:i,hasColorsToChoose:s})}),"withColorContext"),oT=nT(os.ColorPalette);function rT({onChange:e,value:t,...n}){return(0,$.jsx)(Xd,{...n,onColorChange:e,colorValue:t,gradients:[],disableCustomGradients:!0})}const iT=window.wp.date,sT=new Date;function lT({format:e,defaultFormat:t,onChange:n}){return(0,$.jsxs)("fieldset",{className:"block-editor-date-format-picker",children:[(0,$.jsx)(os.VisuallyHidden,{as:"legend",children:(0,C.__)("Date format")}),(0,$.jsx)(os.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,C.__)("Default format"),help:`${(0,C.__)("Example:")} ${(0,iT.dateI18n)(t,sT)}`,checked:!e,onChange:e=>n(e?null:t)}),e&&(0,$.jsx)(aT,{format:e,onChange:n})]})}function aT({format:e,onChange:t}){var n;const o=[...[...new Set(["Y-m-d",(0,C._x)("n/j/Y","short date format"),(0,C._x)("n/j/Y g:i A","short date format with time"),(0,C._x)("M j, Y","medium date format"),(0,C._x)("M j, Y g:i A","medium date format with time"),(0,C._x)("F j, Y","long date format"),(0,C._x)("M j","short date format without the year")])].map(((e,t)=>({key:`suggested-${t}`,name:(0,iT.dateI18n)(e,sT),format:e}))),{key:"human-diff",name:(0,iT.humanTimeDiff)(sT),format:"human-diff"}],r={key:"custom",name:(0,C.__)("Custom"),className:"block-editor-date-format-picker__custom-format-select-control__custom-option",hint:(0,C.__)("Enter your own date format")},[i,s]=(0,a.useState)((()=>!!e&&!o.some((t=>t.format===e))));return(0,$.jsxs)(os.__experimentalVStack,{children:[(0,$.jsx)(os.CustomSelectControl,{__next40pxDefaultSize:!0,label:(0,C.__)("Choose a format"),options:[...o,r],value:i?r:null!==(n=o.find((t=>t.format===e)))&&void 0!==n?n:r,onChange:({selectedItem:e})=>{e===r?s(!0):(s(!1),t(e.format))}}),i&&(0,$.jsx)(os.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,C.__)("Custom format"),hideLabelFromVision:!0,help:(0,a.createInterpolateElement)((0,C.__)("Enter a date or time <Link>format string</Link>."),{Link:(0,$.jsx)(os.ExternalLink,{href:(0,C.__)("https://wordpress.org/documentation/article/customize-date-and-time-format/")})}),value:e,onChange:e=>t(e)})]})}sT.setDate(20),sT.setMonth(sT.getMonth()-3),4===sT.getMonth()&&sT.setMonth(3);const cT=({setting:e,children:t,panelId:n,...o})=>(0,$.jsx)(os.__experimentalToolsPanelItem,{hasValue:()=>!!e.colorValue||!!e.gradientValue,label:e.label,onDeselect:()=>{e.colorValue?e.onColorChange():e.gradientValue&&e.onGradientChange()},isShownByDefault:void 0===e.isShownByDefault||e.isShownByDefault,...o,className:"block-editor-tools-panel-color-gradient-settings__item",panelId:n,resetAllFilter:e.resetAllFilter,children:t}),uT=({colorValue:e,label:t})=>(0,$.jsxs)(os.__experimentalHStack,{justify:"flex-start",children:[(0,$.jsx)(os.ColorIndicator,{className:"block-editor-panel-color-gradient-settings__color-indicator",colorValue:e}),(0,$.jsx)(os.FlexItem,{className:"block-editor-panel-color-gradient-settings__color-name",title:t,children:t})]}),dT=e=>({onToggle:t,isOpen:n})=>{const{colorValue:o,label:r}=e,i={onClick:t,className:Zi("block-editor-panel-color-gradient-settings__dropdown",{"is-open":n}),"aria-expanded":n};return(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,...i,children:(0,$.jsx)(uT,{colorValue:o,label:r})})};function pT({colors:e,disableCustomColors:t,disableCustomGradients:n,enableAlpha:o,gradients:r,settings:i,__experimentalIsRenderedInSidebar:s,...l}){let a;return s&&(a={placement:"left-start",offset:36,shift:!0}),(0,$.jsx)($.Fragment,{children:i.map(((i,c)=>{var u;const d={clearable:!1,colorValue:i.colorValue,colors:e,disableCustomColors:t,disableCustomGradients:n,enableAlpha:o,gradientValue:i.gradientValue,gradients:r,label:i.label,onColorChange:i.onColorChange,onGradientChange:i.onGradientChange,showTitle:!1,__experimentalIsRenderedInSidebar:s,...i},p={colorValue:null!==(u=i.gradientValue)&&void 0!==u?u:i.colorValue,label:i.label};return i&&(0,$.jsx)(cT,{setting:i,...l,children:(0,$.jsx)(os.Dropdown,{popoverProps:a,className:"block-editor-tools-panel-color-gradient-settings__dropdown",renderToggle:dT(p),renderContent:()=>(0,$.jsx)(os.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,$.jsx)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content",children:(0,$.jsx)(Xd,{...d})})})})},c)}))})}const hT=["colors","disableCustomColors","gradients","disableCustomGradients"],gT=({className:e,colors:t,gradients:n,disableCustomColors:o,disableCustomGradients:r,children:i,settings:s,title:l,showTitle:a=!0,__experimentalIsRenderedInSidebar:d,enableAlpha:p})=>{const h=(0,u.useInstanceId)(gT),{batch:g}=(0,c.useRegistry)();return t&&0!==t.length||n&&0!==n.length||!o||!r||!s?.every((e=>(!e.colors||0===e.colors.length)&&(!e.gradients||0===e.gradients.length)&&(void 0===e.disableCustomColors||e.disableCustomColors)&&(void 0===e.disableCustomGradients||e.disableCustomGradients)))?(0,$.jsxs)(os.__experimentalToolsPanel,{className:Zi("block-editor-panel-color-gradient-settings",e),label:a?l:void 0,resetAll:()=>{g((()=>{s.forEach((({colorValue:e,gradientValue:t,onColorChange:n,onGradientChange:o})=>{e?n():t&&o()}))}))},panelId:h,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",children:[(0,$.jsx)(pT,{settings:s,panelId:h,colors:t,gradients:n,disableCustomColors:o,disableCustomGradients:r,__experimentalIsRenderedInSidebar:d,enableAlpha:p}),!!i&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(os.__experimentalSpacer,{marginY:4})," ",i]})]}):null},mT=e=>{const t=Zu();return(0,$.jsx)(gT,{...t,...e})},fT=e=>hT.every((t=>e.hasOwnProperty(t)))?(0,$.jsx)(gT,{...e}):(0,$.jsx)(mT,{...e}),bT=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.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"})}),kT=100,vT=300,_T={placement:"bottom-start"};const xT=(0,a.createContext)({}),yT=()=>(0,a.useContext)(xT);function ST({id:e,url:t,naturalWidth:n,naturalHeight:o,onFinishEditing:r,onSaveImage:i,children:s}){const l=function({url:e,naturalWidth:t,naturalHeight:n}){const[o,r]=(0,a.useState)(),[i,s]=(0,a.useState)(),[l,c]=(0,a.useState)({x:0,y:0}),[u,p]=(0,a.useState)(100),[h,g]=(0,a.useState)(0),m=t/n,[f,b]=(0,a.useState)(m),k=(0,a.useCallback)((()=>{const t=(h+90)%360;let n=m;if(h%180==90&&(n=1/m),0===t)return r(),g(t),b(m),void c((e=>({x:-e.y*n,y:e.x*n})));const o=new window.Image;o.src=e,o.onload=function(e){const o=document.createElement("canvas");let i=0,s=0;t%180?(o.width=e.target.height,o.height=e.target.width):(o.width=e.target.width,o.height=e.target.height),90!==t&&180!==t||(i=o.width),270!==t&&180!==t||(s=o.height);const l=o.getContext("2d");l.translate(i,s),l.rotate(t*Math.PI/180),l.drawImage(e.target,0,0),o.toBlob((e=>{r(URL.createObjectURL(e)),g(t),b(o.width/o.height),c((e=>({x:-e.y*n,y:e.x*n})))}))};const i=(0,d.applyFilters)("media.crossOrigin",void 0,e);"string"==typeof i&&(o.crossOrigin=i)}),[h,m,e]);return(0,a.useMemo)((()=>({editedUrl:o,setEditedUrl:r,crop:i,setCrop:s,position:l,setPosition:c,zoom:u,setZoom:p,rotation:h,setRotation:g,rotateClockwise:k,aspect:f,setAspect:b,defaultAspect:m})),[o,i,l,u,h,k,f,m])}({url:t,naturalWidth:n,naturalHeight:o}),u=function({crop:e,rotation:t,url:n,id:o,onSaveImage:r,onFinishEditing:i}){const{createErrorNotice:s}=(0,c.useDispatch)(Uo.store),[l,u]=(0,a.useState)(!1),d=(0,a.useCallback)((()=>{u(!1),i()}),[i]),p=(0,a.useCallback)((()=>{u(!0);const l=[];if(t>0&&l.push({type:"rotate",args:{angle:t}}),(e.width<99.9||e.height<99.9)&&l.push({type:"crop",args:{left:e.x,top:e.y,width:e.width,height:e.height}}),0===l.length)return u(!1),void i();lB()({path:`/wp/v2/media/${o}/edit`,method:"POST",data:{src:n,modifiers:l}}).then((e=>{r({id:e.id,url:e.source_url})})).catch((e=>{s((0,C.sprintf)((0,C.__)("Could not edit image. %s"),(0,ba.__unstableStripHTML)(e.message)),{id:"image-editing-error",type:"snackbar"})})).finally((()=>{u(!1),i()}))}),[e,t,o,n,r,s,i]);return(0,a.useMemo)((()=>({isInProgress:l,apply:p,cancel:d})),[l,p,d])}({id:e,url:t,onSaveImage:i,onFinishEditing:r,...l}),p=(0,a.useMemo)((()=>({...l,...u})),[l,u]);return(0,$.jsx)(xT.Provider,{value:p,children:s})}function wT({aspectRatios:e,isDisabled:t,label:n,onClick:o,value:r}){return(0,$.jsx)(os.MenuGroup,{label:n,children:e.map((({name:e,slug:n,ratio:i})=>(0,$.jsx)(os.MenuItem,{disabled:t,onClick:()=>{o(i)},role:"menuitemradio",isSelected:i===r,icon:i===r?cd:void 0,children:e},n)))})}function CT(e){const[t,n,...o]=e.split("/").map(Number);return t<=0||n<=0||Number.isNaN(t)||Number.isNaN(n)||o.length?NaN:n?t/n:t}function BT({ratio:e,...t}){return{ratio:CT(e),...t}}function IT({toggleProps:e}){const{isInProgress:t,aspect:n,setAspect:o,defaultAspect:r}=yT(),[i,s,l]=ci("dimensions.aspectRatios.default","dimensions.aspectRatios.theme","dimensions.defaultAspectRatios");return(0,$.jsx)(os.DropdownMenu,{icon:bT,label:(0,C.__)("Aspect Ratio"),popoverProps:_T,toggleProps:e,children:({onClose:e})=>(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(wT,{isDisabled:t,onClick:t=>{o(t),e()},value:n,aspectRatios:[{slug:"original",name:(0,C.__)("Original"),aspect:r},...l?i.map(BT).filter((({ratio:e})=>1===e)):[]]}),s?.length>0&&(0,$.jsx)(wT,{label:(0,C.__)("Theme"),isDisabled:t,onClick:t=>{o(t),e()},value:n,aspectRatios:s}),l&&(0,$.jsx)(wT,{label:(0,C.__)("Landscape"),isDisabled:t,onClick:t=>{o(t),e()},value:n,aspectRatios:i.map(BT).filter((({ratio:e})=>e>1))}),l&&(0,$.jsx)(wT,{label:(0,C.__)("Portrait"),isDisabled:t,onClick:t=>{o(t),e()},value:n,aspectRatios:i.map(BT).filter((({ratio:e})=>e<1))})]})})}var jT=function(e,t){return jT=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])},jT(e,t)};function ET(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}jT(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var TT=function(){return TT=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},TT.apply(this,arguments)};Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError;var MT=n(7520),PT=n.n(MT);function RT(e,t,n,o,r){void 0===r&&(r=0);var i=VT(t.width,t.height,r),s=i.width,l=i.height;return{x:NT(e.x,s,n.width,o),y:NT(e.y,l,n.height,o)}}function NT(e,t,n,o){var r=t*o/2-n/2;return FT(e,-r,r)}function LT(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function AT(e,t){return 180*Math.atan2(t.y-e.y,t.x-e.x)/Math.PI}function DT(e,t){return Math.min(e,Math.max(0,t))}function OT(e,t){return t}function zT(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function VT(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 FT(e,t,n){return Math.min(Math.max(e,t),n)}function HT(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter((function(e){return"string"==typeof e&&e.length>0})).join(" ").trim()}var GT=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.imageRef=Pa.createRef(),n.videoRef=Pa.createRef(),n.containerPosition={x:0,y:0},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,mediaObjectFit:void 0},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.currentDoc.removeEventListener("scroll",n.onScroll))},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=function(e,t,n,o,r,i){var s=VT(t.width,t.height,n),l=FT(o.width/s.width*(100/e.width),r,i);return{crop:{x:l*s.width/2-o.width/2-s.width*l*(e.x/100),y:l*s.height/2-o.height/2-s.height*l*(e.y/100)},zoom:l}}(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 i=function(e,t,n,o,r,i){void 0===n&&(n=0);var s=VT(t.naturalWidth,t.naturalHeight,n),l=FT(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,i),a=o.height>o.width?o.height/e.height:o.width/e.width;return{crop:{x:((s.width-e.width)/2-e.x)*a,y:((s.height-e.height)/2-e.y)*a},zoom:l}}(n.props.initialCroppedAreaPixels,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom);o=i.crop,r=i.zoom;n.props.onCropChange(o),n.props.onZoomChange&&n.props.onZoomChange(r)}},n.computeSizes=function(){var e,t,o,r,i,s,l=n.imageRef.current||n.videoRef.current;if(l&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect(),n.saveContainerPosition();var a=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(l.offsetWidth<c||l.offsetHeight<u)switch(n.state.mediaObjectFit){default:case"contain":p=a>d?{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}}else p={width:l.offsetWidth,height:l.offsetHeight};n.mediaSize=TT(TT({},p),{naturalWidth:c,naturalHeight:u}),n.props.setMediaSize&&n.props.setMediaSize(n.mediaSize);var h=n.props.cropSize?n.props.cropSize:function(e,t,n,o,r,i){void 0===i&&(i=0);var s=VT(e,t,i),l=s.width,a=s.height,c=Math.min(l,n),u=Math.min(a,o);return c>u*r?{width:u*r,height:u}:{width:c,height:c/r}}(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)===h.height&&(null===(s=n.state.cropSize)||void 0===s?void 0:s.width)===h.width||n.props.onCropSizeChange&&n.props.onCropSizeChange(h),n.setState({cropSize:h},n.recomputeCropPosition),n.props.setCropSize&&n.props.setCropSize(h),h}},n.saveContainerPosition=function(){if(n.containerRef){var e=n.containerRef.getBoundingClientRect();n.containerPosition={x:e.left,y:e.top}}},n.onMouseDown=function(e){n.currentDoc&&(e.preventDefault(),n.currentDoc.addEventListener("mousemove",n.onMouseMove),n.currentDoc.addEventListener("mouseup",n.onDragStopped),n.saveContainerPosition(),n.onDragStart(t.getMousePoint(e)))},n.onMouseMove=function(e){return n.onDrag(t.getMousePoint(e))},n.onScroll=function(e){n.currentDoc&&(e.preventDefault(),n.saveContainerPosition())},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),n.saveContainerPosition(),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 o=t.getMousePoint(e),r=n.gestureZoomStart-1+e.scale;if(n.setNewZoom(r,o,{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,o,r=e.x,i=e.y;n.dragStartPosition={x:r,y:i},n.dragStartCrop=TT({},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.currentWindow&&(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,i={x:n.dragStartCrop.x+e,y:n.dragStartCrop.y+r},s=n.props.restrictPosition?RT(i,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):i;n.props.onCropChange(s)}})))},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 o=t.getMousePoint(e),r=PT()(e).pixelY,i=n.props.zoom-r*n.props.zoomSpeed/200;n.setNewZoom(i,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,t){var o=e.x,r=e.y;if(!n.containerRect)throw new Error("The Cropper is not mounted");return{x:n.containerRect.width/2-(o-t.x),y:n.containerRect.height/2-(r-t.y)}},n.getPointOnMedia=function(e){var t=e.x,o=e.y,r=n.props,i=r.crop,s=r.zoom;return{x:(t+i.x)/s,y:(o+i.y)/s}},n.setNewZoom=function(e,t,o){var r=(void 0===o?{}:o).shouldUpdatePosition,i=void 0===r||r;if(n.state.cropSize&&n.props.onZoomChange){var s=FT(e,n.props.minZoom,n.props.maxZoom);if(i){var l=n.getPointOnContainer(t,n.containerPosition),a=n.getPointOnMedia(l),c={x:a.x*s-l.x,y:a.y*s-l.y},u=n.props.restrictPosition?RT(c,n.mediaSize,n.state.cropSize,s,n.props.rotation):c;n.props.onCropChange(u)}n.props.onZoomChange(s)}},n.getCropData=function(){return n.state.cropSize?function(e,t,n,o,r,i,s){void 0===i&&(i=0),void 0===s&&(s=!0);var l=s?DT:OT,a=VT(t.width,t.height,i),c=VT(t.naturalWidth,t.naturalHeight,i),u={x:l(100,((a.width-n.width/r)/2-e.x/r)/a.width*100),y:l(100,((a.height-n.height/r)/2-e.y/r)/a.height*100),width:l(100,n.width/a.width*100/r),height:l(100,n.height/a.height*100/r)},d=Math.round(l(c.width,u.width*c.width/100)),p=Math.round(l(c.height,u.height*c.height/100)),h=c.width>=c.height*o?{width:Math.round(p*o),height:p}:{width:d,height:Math.round(d/o)};return{croppedAreaPercentages:u,croppedAreaPixels:TT(TT({},h),{x:Math.round(l(c.width-h.width,u.x*c.width/100)),y:Math.round(l(c.height-h.height,u.y*c.height/100))})}}(n.props.restrictPosition?RT(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?RT(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 ET(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.currentDoc.addEventListener("scroll",this.onScroll),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,o,r,i,s,l,a,c;e.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):e.aspect!==this.props.aspect||e.objectFit!==this.props.objectFit?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===(i=e.crop)||void 0===i?void 0:i.x)===(null===(s=this.props.crop)||void 0===s?void 0:s.x)&&(null===(l=e.crop)||void 0===l?void 0:l.y)===(null===(a=this.props.crop)||void 0===a?void 0:a.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());var u=this.getObjectFit();u!==this.state.mediaObjectFit&&this.setState({mediaObjectFit:u},this.computeSizes)},t.prototype.getAspect=function(){var e=this.props,t=e.cropSize,n=e.aspect;return t?t.width/t.height:n},t.prototype.getObjectFit=function(){var e,t,n,o;if("cover"===this.props.objectFit){if((this.imageRef.current||this.videoRef.current)&&this.containerRef){this.containerRect=this.containerRef.getBoundingClientRect();var r=this.containerRect.width/this.containerRect.height;return((null===(e=this.imageRef.current)||void 0===e?void 0:e.naturalWidth)||(null===(t=this.videoRef.current)||void 0===t?void 0:t.videoWidth)||0)/((null===(n=this.imageRef.current)||void 0===n?void 0:n.naturalHeight)||(null===(o=this.videoRef.current)||void 0===o?void 0:o.videoHeight)||0)<r?"horizontal-cover":"vertical-cover"}return"horizontal-cover"}return this.props.objectFit},t.prototype.onPinchStart=function(e){var n=t.getTouchPoint(e.touches[0]),o=t.getTouchPoint(e.touches[1]);this.lastPinchDistance=LT(n,o),this.lastPinchRotation=AT(n,o),this.onDragStart(zT(n,o))},t.prototype.onPinchMove=function(e){var n=this;if(this.currentDoc&&this.currentWindow){var o=t.getTouchPoint(e.touches[0]),r=t.getTouchPoint(e.touches[1]),i=zT(o,r);this.onDrag(i),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame((function(){var e=LT(o,r),t=n.props.zoom*(e/n.lastPinchDistance);n.setNewZoom(t,i,{shouldUpdatePosition:!1}),n.lastPinchDistance=e;var s=AT(o,r),l=n.props.rotation+(s-n.lastPinchRotation);n.props.onRotationChange&&n.props.onRotationChange(l),n.lastPinchRotation=s}))}},t.prototype.render=function(){var e=this,t=this.props,n=t.image,o=t.video,r=t.mediaProps,i=t.transform,s=t.crop,l=s.x,a=s.y,c=t.rotation,u=t.zoom,d=t.cropShape,p=t.showGrid,h=t.style,g=h.containerStyle,m=h.cropAreaStyle,f=h.mediaStyle,b=t.classes,k=b.containerClassName,v=b.cropAreaClassName,_=b.mediaClassName,x=this.state.mediaObjectFit;return Pa.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(t){return e.containerRef=t},"data-testid":"container",style:g,className:HT("reactEasyCrop_Container",k)},n?Pa.createElement("img",TT({alt:"",className:HT("reactEasyCrop_Image","contain"===x&&"reactEasyCrop_Contain","horizontal-cover"===x&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===x&&"reactEasyCrop_Cover_Vertical",_)},r,{src:n,ref:this.imageRef,style:TT(TT({},f),{transform:i||"translate(".concat(l,"px, ").concat(a,"px) rotate(").concat(c,"deg) scale(").concat(u,")")}),onLoad:this.onMediaLoad})):o&&Pa.createElement("video",TT({autoPlay:!0,loop:!0,muted:!0,className:HT("reactEasyCrop_Video","contain"===x&&"reactEasyCrop_Contain","horizontal-cover"===x&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===x&&"reactEasyCrop_Cover_Vertical",_)},r,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:TT(TT({},f),{transform:i||"translate(".concat(l,"px, ").concat(a,"px) rotate(").concat(c,"deg) scale(").concat(u,")")}),controls:!1}),(Array.isArray(o)?o:[{src:o}]).map((function(e){return Pa.createElement("source",TT({key:e.src},e))}))),this.state.cropSize&&Pa.createElement("div",{style:TT(TT({},m),{width:this.state.cropSize.width,height:this.state.cropSize.height}),"data-testid":"cropper",className:HT("reactEasyCrop_CropArea","round"===d&&"reactEasyCrop_CropAreaRound",p&&"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}(Pa.Component);function $T({url:e,width:t,height:n,naturalHeight:o,naturalWidth:r,borderProps:i}){const{isInProgress:s,editedUrl:l,position:a,zoom:c,aspect:d,setPosition:p,setCrop:h,setZoom:g,rotation:m}=yT(),[f,{width:b}]=(0,u.useResizeObserver)();let k=n||b*o/r;m%180==90&&(k=b*r/o);const v=(0,$.jsxs)("div",{className:Zi("wp-block-image__crop-area",i?.className,{"is-applying":s}),style:{...i?.style,width:t||b,height:k},children:[(0,$.jsx)(GT,{image:l||e,disabled:s,minZoom:kT/100,maxZoom:vT/100,crop:a,zoom:c/100,aspect:d,onCropChange:e=>{p(e)},onCropComplete:e=>{h(e)},onZoomChange:e=>{g(100*e)}}),s&&(0,$.jsx)(os.Spinner,{})]});return(0,$.jsxs)($.Fragment,{children:[f,v]})}const UT=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M13 5c-3.3 0-6 2.7-6 6 0 1.4.5 2.7 1.3 3.7l-3.8 3.8 1.1 1.1 3.8-3.8c1 .8 2.3 1.3 3.7 1.3 3.3 0 6-2.7 6-6S16.3 5 13 5zm0 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z"})});function WT(){const{isInProgress:e,zoom:t,setZoom:n}=yT();return(0,$.jsx)(os.Dropdown,{contentClassName:"wp-block-image__zoom",popoverProps:_T,renderToggle:({isOpen:t,onToggle:n})=>(0,$.jsx)(os.ToolbarButton,{icon:UT,label:(0,C.__)("Zoom"),onClick:n,"aria-expanded":t,disabled:e}),renderContent:()=>(0,$.jsx)(os.__experimentalDropdownContentWrapper,{paddingSize:"medium",children:(0,$.jsx)(os.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,C.__)("Zoom"),min:kT,max:vT,value:Math.round(t),onChange:n})})})}const KT=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.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 ZT(){const{isInProgress:e,rotateClockwise:t}=yT();return(0,$.jsx)(os.ToolbarButton,{icon:KT,label:(0,C.__)("Rotate"),onClick:t,disabled:e})}function qT(){const{isInProgress:e,apply:t,cancel:n}=yT();return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(os.ToolbarButton,{onClick:t,disabled:e,children:(0,C.__)("Apply")}),(0,$.jsx)(os.ToolbarButton,{onClick:n,children:(0,C.__)("Cancel")})]})}function YT({id:e,url:t,width:n,height:o,naturalHeight:r,naturalWidth:i,onSaveImage:s,onFinishEditing:l,borderProps:a}){return(0,$.jsxs)(ST,{id:e,url:t,naturalWidth:i,naturalHeight:r,onSaveImage:s,onFinishEditing:l,children:[(0,$.jsx)($T,{borderProps:a,url:t,width:n,height:o,naturalHeight:r,naturalWidth:i}),(0,$.jsxs)(us,{children:[(0,$.jsxs)(os.ToolbarGroup,{children:[(0,$.jsx)(WT,{}),(0,$.jsx)(os.ToolbarItem,{children:e=>(0,$.jsx)(IT,{toggleProps:e})}),(0,$.jsx)(ZT,{})]}),(0,$.jsx)(os.ToolbarGroup,{children:(0,$.jsx)(qT,{})})]})]})}const XT=[25,50,75,100],QT=()=>{};function JT({imageSizeHelp:e,imageWidth:t,imageHeight:n,imageSizeOptions:o=[],isResizable:r=!0,slug:i,width:s,height:l,onChange:c,onChangeImage:u=QT}){const{currentHeight:d,currentWidth:p,updateDimension:h,updateDimensions:g}=function(e,t,n,o,r){var i,s;const[l,c]=(0,a.useState)(null!==(i=null!=t?t:o)&&void 0!==i?i:""),[u,d]=(0,a.useState)(null!==(s=null!=e?e:n)&&void 0!==s?s:"");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(l)&&c(t),void 0!==e&&Number.parseInt(e)!==Number.parseInt(u)&&d(e)}),[t,e]),{currentHeight:u,currentWidth:l,updateDimension:(e,t)=>{const n=""===t?void 0:parseInt(t,10);"width"===e?c(n):d(n),r({[e]:n})},updateDimensions:(e,t)=>{d(null!=e?e:n),c(null!=t?t:o),r({height:e,width:t})}}}(l,s,n,t,c);return(0,$.jsxs)($.Fragment,{children:[o&&o.length>0&&(0,$.jsx)(os.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,C.__)("Resolution"),value:i,options:o,onChange:u,help:e,size:"__unstable-large"}),r&&(0,$.jsxs)("div",{className:"block-editor-image-size-control",children:[(0,$.jsxs)(os.__experimentalHStack,{align:"baseline",spacing:"3",children:[(0,$.jsx)(os.__experimentalNumberControl,{className:"block-editor-image-size-control__width",label:(0,C.__)("Width"),value:p,min:1,onChange:e=>h("width",e),size:"__unstable-large"}),(0,$.jsx)(os.__experimentalNumberControl,{className:"block-editor-image-size-control__height",label:(0,C.__)("Height"),value:d,min:1,onChange:e=>h("height",e),size:"__unstable-large"})]}),(0,$.jsxs)(os.__experimentalHStack,{children:[(0,$.jsx)(os.ButtonGroup,{"aria-label":(0,C.__)("Image size presets"),children:XT.map((e=>{const o=Math.round(t*(e/100)),r=Math.round(n*(e/100)),i=p===o&&d===r;return(0,$.jsxs)(os.Button,{size:"small",variant:i?"primary":void 0,isPressed:i,onClick:()=>g(r,o),children:[e,"%"]},e)}))}),(0,$.jsx)(os.Button,{size:"small",onClick:()=>g(),children:(0,C.__)("Reset")})]})]})]})}function eM({url:e,urlLabel:t,className:n}){const o=Zi(n,"block-editor-url-popover__link-viewer-url");return e?(0,$.jsx)(os.ExternalLink,{className:o,href:e,children:t||(0,fa.filterURLForDisplay)((0,fa.safeDecodeURI)(e))}):(0,$.jsx)("span",{className:o})}const{__experimentalPopoverLegacyPositionToPlacement:tM}=te(os.privateApis),nM=(0,a.forwardRef)((({additionalControls:e,children:t,renderSettings:n,placement:o,focusOnMount:r="firstElement",position:i,...s},l)=>{let c;void 0!==i&&y()("`position` prop in wp.blockEditor.URLPopover",{since:"6.2",alternative:"`placement` prop"}),void 0!==o?c=o:void 0!==i&&(c=tM(i)),c=c||"bottom";const[u,d]=(0,a.useState)(!1),p=!!n&&u;return(0,$.jsxs)(os.Popover,{ref:l,role:"dialog","aria-modal":"true","aria-label":(0,C.__)("Edit URL"),className:"block-editor-url-popover",focusOnMount:r,placement:c,shift:!0,variant:"toolbar",...s,children:[(0,$.jsx)("div",{className:"block-editor-url-popover__input-container",children:(0,$.jsxs)("div",{className:"block-editor-url-popover__row",children:[t,!!n&&(0,$.jsx)(os.Button,{className:"block-editor-url-popover__settings-toggle",icon:mC,label:(0,C.__)("Link settings"),onClick:()=>{d(!u)},"aria-expanded":u,size:"compact"})]})}),p&&(0,$.jsx)("div",{className:"block-editor-url-popover__settings",children:n()}),e&&!p&&(0,$.jsx)("div",{className:"block-editor-url-popover__additional-controls",children:e})]})}));nM.LinkEditor=function({autocompleteRef:e,className:t,onChangeInputValue:n,value:o,...r}){return(0,$.jsxs)("form",{className:Zi("block-editor-url-popover__link-editor",t),...r,children:[(0,$.jsx)(La,{value:o,onChange:n,autocompleteRef:e}),(0,$.jsx)(os.Button,{icon:ja,label:(0,C.__)("Apply"),type:"submit",size:"compact"})]})},nM.LinkViewer=function({className:e,linkClassName:t,onEditLinkClick:n,url:o,urlLabel:r,...i}){return(0,$.jsxs)("div",{className:Zi("block-editor-url-popover__link-viewer",e),...i,children:[(0,$.jsx)(eM,{url:o,urlLabel:r,className:t}),n&&(0,$.jsx)(os.Button,{icon:gc,label:(0,C.__)("Edit"),onClick:n,size:"compact"})]})};const oM=nM,rM=()=>{},iM=({src:e,onChange:t,onSubmit:n,onClose:o,popoverAnchor:r})=>(0,$.jsx)(oM,{anchor:r,onClose:o,children:(0,$.jsx)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:n,children:(0,$.jsx)(os.__experimentalInputControl,{__next40pxDefaultSize:!0,label:(0,C.__)("URL"),hideLabelFromVision:!0,placeholder:(0,C.__)("Paste or type URL"),onChange:t,value:e,suffix:(0,$.jsx)(os.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,$.jsx)(os.Button,{size:"small",icon:ja,label:(0,C.__)("Apply"),type:"submit"})})})})}),sM=({src:e,onChangeSrc:t,onSelectURL:n})=>{const[o,r]=(0,a.useState)(null),[i,s]=(0,a.useState)(!1),l=()=>{s(!1),o?.focus()};return(0,$.jsxs)("div",{className:"block-editor-media-placeholder__url-input-container",children:[(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,className:"block-editor-media-placeholder__button",onClick:()=>{s(!0)},isPressed:i,variant:"secondary","aria-haspopup":"dialog",ref:r,children:(0,C.__)("Insert from URL")}),i&&(0,$.jsx)(iM,{src:e,onChange:t,onSubmit:t=>{t.preventDefault(),e&&n&&(n(e),l())},onClose:l,popoverAnchor:o})]})};const lM=(0,os.withFilters)("editor.MediaPlaceholder")((function({value:e={},allowedTypes:t,className:n,icon:o,labels:r={},mediaPreview:i,notices:s,isAppender:u,accept:d,addToGallery:p,multiple:h=!1,handleUpload:g=!0,disableDropZone:m,disableMediaButtons:f,onError:b,onSelect:k,onCancel:v,onSelectURL:_,onToggleFeaturedImage:x,onDoubleClick:S,onFilesPreUpload:w=rM,onHTMLDrop:B,children:I,mediaLibraryButton:j,placeholder:E,style:T}){B&&y()("wp.blockEditor.MediaPlaceholder onHTMLDrop prop",{since:"6.2",version:"6.4"});const M=(0,c.useSelect)((e=>{const{getSettings:t}=e(li);return t().mediaUpload}),[]),[P,R]=(0,a.useState)("");(0,a.useEffect)((()=>{var t;R(null!==(t=e?.src)&&void 0!==t?t:"")}),[e?.src]);const N=n=>{if(!g||"function"==typeof g&&!g(n))return k(n);let o;if(w(n),h)if(p){let t=[];o=n=>{const o=(null!=e?e:[]).filter((e=>e.id?!t.some((({id:t})=>Number(t)===Number(e.id))):!t.some((({urlSlug:t})=>e.url.includes(t)))));k(o.concat(n)),t=n.map((e=>{const t=e.url.lastIndexOf("."),n=e.url.slice(0,t);return{id:e.id,urlSlug:n}}))}}else o=k;else o=([e])=>k(e);M({allowedTypes:t,filesList:n,onFileChange:o,onError:b})};async function L(e){const n=(0,l.pasteHandler)({HTML:e});return await async function(e){if(!e||!Array.isArray(e))return;const n=function e(t){return t.flatMap((t=>"core/image"!==t.name&&"core/audio"!==t.name&&"core/video"!==t.name||!t.attributes.url?e(t.innerBlocks):[t]))}(e);if(!n.length)return;const o=await Promise.all(n.map((e=>e.attributes.id?e.attributes:new Promise(((n,o)=>{window.fetch(e.attributes.url).then((e=>e.blob())).then((r=>M({filesList:[r],additionalData:{title:e.attributes.title,alt_text:e.attributes.alt,caption:e.attributes.caption},onFileChange:([e])=>{e.id&&n(e)},allowedTypes:t,onError:o}))).catch((()=>n(e.attributes.url)))}))))).catch((e=>b(e)));k(h?o:o[0])}(n)}const A=e=>{N(e.target.files)},D=null!=E?E:e=>{let{instructions:l,title:a}=r;if(M||_||(l=(0,C.__)("To edit this block, you need permission to upload media.")),void 0===l||void 0===a){const e=null!=t?t:[],[n]=e,o=1===e.length,r=o&&"audio"===n,i=o&&"image"===n,s=o&&"video"===n;void 0===l&&M&&(l=(0,C.__)("Upload a media file or pick one from your media library."),r?l=(0,C.__)("Upload or drag an audio file here, or pick one from your library."):i?l=(0,C.__)("Upload or drag an image file here, or pick one from your library."):s&&(l=(0,C.__)("Upload or drag a video file here, or pick one from your library."))),void 0===a&&(a=(0,C.__)("Media"),r?a=(0,C.__)("Audio"):i?a=(0,C.__)("Image"):s&&(a=(0,C.__)("Video")))}const c=Zi("block-editor-media-placeholder",n,{"is-appender":u});return(0,$.jsxs)(os.Placeholder,{icon:o,label:a,instructions:l,className:c,notices:s,onDoubleClick:S,preview:i,style:T,children:[e,I]})},O=()=>m?null:(0,$.jsx)(os.DropZone,{onFilesDrop:N,onHTMLDrop:L}),z=()=>v&&(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,className:"block-editor-media-placeholder__cancel-button",title:(0,C.__)("Cancel"),variant:"link",onClick:v,children:(0,C.__)("Cancel")}),V=()=>_&&(0,$.jsx)(sM,{src:P,onChangeSrc:R,onSelectURL:_}),F=()=>x&&(0,$.jsx)("div",{className:"block-editor-media-placeholder__url-input-container",children:(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,className:"block-editor-media-placeholder__button",onClick:x,variant:"secondary",children:(0,C.__)("Use featured image")})});return f?(0,$.jsx)(wa,{children:O()}):(0,$.jsx)(wa,{fallback:D(V()),children:(()=>{const n=null!=j?j:({open:e})=>(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{e()},children:(0,C.__)("Media Library")}),o=(0,$.jsx)(Sa,{addToGallery:p,gallery:h&&!(!t||0===t.length)&&t.every((e=>"image"===e||e.startsWith("image/"))),multiple:h,onSelect:k,allowedTypes:t,mode:"browse",value:Array.isArray(e)?e.map((({id:e})=>e)):e.id,render:n});if(M&&u)return(0,$.jsxs)($.Fragment,{children:[O(),(0,$.jsx)(os.FormFileUpload,{onChange:A,accept:d,multiple:!!h,render:({openFileDialog:e})=>{const t=(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,variant:"primary",className:Zi("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onClick:e,children:(0,C.__)("Upload")}),o,V(),F(),z()]});return D(t)}})]});if(M){const e=(0,$.jsxs)($.Fragment,{children:[O(),(0,$.jsx)(os.FormFileUpload,{render:({openFileDialog:e})=>(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,onClick:e,variant:"primary",className:Zi("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),children:(0,C.__)("Upload")}),onChange:A,accept:d,multiple:!!h}),o,V(),F(),z()]});return D(e)}return D(o)})()})})),aM=({colorSettings:e,...t})=>{const n=e.map((e=>{if(!e)return e;const{value:t,onChange:n,...o}=e;return{...o,colorValue:t,onColorChange:n}}));return(0,$.jsx)(fT,{settings:n,gradients:[],disableCustomGradients:!0,...t})},cM={placement:"bottom-start"},uM=()=>(0,$.jsxs)($.Fragment,{children:[["bold","italic","link","unknown"].map((e=>(0,$.jsx)(os.Slot,{name:`RichText.ToolbarControls.${e}`},e))),(0,$.jsx)(os.Slot,{name:"RichText.ToolbarControls",children:e=>{if(!e.length)return null;const t=e.map((([{props:e}])=>e)).some((({isActive:e})=>e));return(0,$.jsx)(os.ToolbarItem,{children:n=>(0,$.jsx)(os.DropdownMenu,{icon:mC,label:(0,C.__)("More"),toggleProps:{...n,className:Zi(n.className,{"is-pressed":t}),description:(0,C.__)("Displays more block tools")},controls:he(e.map((([{props:e}])=>e)),"title"),popoverProps:cM})})}})]});function dM({popoverAnchor:e}){return(0,$.jsx)(os.Popover,{placement:"top",focusOnMount:!1,anchor:e,className:"block-editor-rich-text__inline-format-toolbar",__unstableSlotName:"block-toolbar",children:(0,$.jsx)(vj,{className:"block-editor-rich-text__inline-format-toolbar-group","aria-label":(0,C.__)("Format tools"),children:(0,$.jsx)(os.ToolbarGroup,{children:(0,$.jsx)(uM,{})})})})}const pM=({inline:e,editableContentElement:t})=>e?(0,$.jsx)(dM,{popoverAnchor:t}):(0,$.jsx)(us,{group:"inline",children:(0,$.jsx)(uM,{})});function hM(e){return e(W.store).getFormatTypes()}const gM=new Set(["a","audio","button","details","embed","iframe","input","label","select","textarea","video"]);function mM(e,t){return"object"!=typeof e?{[t]:e}:Object.fromEntries(Object.entries(e).map((([e,n])=>[`${t}.${e}`,n])))}function fM(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)),{})}const bM=["`",'"',"'","“”","‘’"];function kM(e){let t=e.length;for(;t--;){const n=Ko(e[t].attributes);if(n)return e[t].attributes[n]=e[t].attributes[n].toString().replace(Wo,""),[e[t].clientId,n,0,0];const o=kM(e[t].innerBlocks);if(o)return o}return[]}function vM(e){if(!0===e||"p"===e||"li"===e)return!0===e?"p":e}function _M({allowedFormats:e,disableFormats:t}){return t?_M.EMPTY_ARRAY:e}_M.EMPTY_ARRAY=[];const xM=[e=>t=>{function n(n){const{inputType:o,data:r}=n,{value:i,onChange:s,registry:l}=e.current;if("insertText"!==o)return;if((0,W.isCollapsed)(i))return;const a=(0,d.applyFilters)("blockEditor.wrapSelectionSettings",bM).find((([e,t])=>e===r||t===r));if(!a)return;const[c,u=c]=a,p=i.start,h=i.end+c.length;let g=(0,W.insert)(i,c,p,p);g=(0,W.insert)(g,u,h,h);const{__unstableMarkLastChangeAsPersistent:m,__unstableMarkAutomaticChange:f}=l.dispatch(li);m(),s(g),f();const b={};for(const e in n)b[e]=n[e];b.data=u;const{ownerDocument:k}=t,{defaultView:v}=k,_=new v.InputEvent("input",b);window.queueMicrotask((()=>{n.target.dispatchEvent(_)})),n.preventDefault()}return t.addEventListener("beforeinput",n),()=>{t.removeEventListener("beforeinput",n)}},e=>t=>{function n(){const{getValue:t,onReplace:n,selectionChange:o,registry:r}=e.current;if(!n)return;const i=t(),{start:s,text:a}=i;if(" "!==a.slice(s-1,s))return;const c=a.slice(0,s).trim(),u=(0,l.getBlockTransforms)("from").filter((({type:e})=>"prefix"===e)),d=(0,l.findTransform)(u,(({prefix:e})=>c===e));if(!d)return;const p=(0,W.toHTMLString)({value:(0,W.insert)(i,Wo,0,s)}),h=d.transform(p);return o(...kM([h])),n([h]),r.dispatch(li).__unstableMarkAutomaticChange(),!0}function o(t){const{inputType:o,type:r}=t,{getValue:i,onChange:s,__unstableAllowPrefixTransformations:l,formatTypes:a,registry:c}=e.current;if("insertText"!==o&&"compositionend"!==r)return;if(l&&n())return;const u=i(),d=a.reduce(((e,{__unstableInputRule:t})=>(t&&(e=t(e)),e)),function(e){const t="tales of gutenberg",{start:n,text:o}=e;return n<18||o.slice(n-18,n).toLowerCase()!==t?e:(0,W.insert)(e," 🐡🐢🦀🐤🦋🐘🐧🐹🦁🦄🦍🐼🐿🎃🐴🐝🐆🦕🦔🌱🍇π🍌🐉💧🥨🌌🍂🍠🥦🥚🥝🎟🥥🥒🛵🥖🍒🍯🎾🎲🐺🐚🐮⌛️")}(u)),{__unstableMarkLastChangeAsPersistent:p,__unstableMarkAutomaticChange:h}=c.dispatch(li);d!==u&&(p(),s({...d,activeFormats:u.activeFormats}),h())}return t.addEventListener("input",o),t.addEventListener("compositionend",o),()=>{t.removeEventListener("input",o),t.removeEventListener("compositionend",o)}},e=>t=>{function n(t){if("insertReplacementText"!==t.inputType)return;const{registry:n}=e.current;n.dispatch(li).__unstableMarkLastChangeAsPersistent()}return t.addEventListener("beforeinput",n),()=>{t.removeEventListener("beforeinput",n)}},()=>e=>{function t(e){(va.isKeyboardEvent.primary(e,"z")||va.isKeyboardEvent.primary(e,"y")||va.isKeyboardEvent.primaryShift(e,"z"))&&e.preventDefault()}return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}},e=>t=>{const{keyboardShortcuts:n}=e.current;function o(e){for(const t of n.current)t(e)}return t.addEventListener("keydown",o),()=>{t.removeEventListener("keydown",o)}},e=>t=>{const{inputEvents:n}=e.current;function o(e){for(const t of n.current)t(e)}return t.addEventListener("input",o),()=>{t.removeEventListener("input",o)}},e=>t=>{function n(t){const{keyCode:n}=t;if(t.defaultPrevented)return;if(n!==va.BACKSPACE&&n!==va.ESCAPE)return;const{registry:o}=e.current,{didAutomaticChange:r,getSettings:i}=o.select(li),{__experimentalUndo:s}=i();s&&r()&&(t.preventDefault(),s())}return t.addEventListener("keydown",n),()=>{t.removeEventListener("keydown",n)}},e=>t=>{function n(n){const{disableFormats:o,onChange:r,value:i,formatTypes:s,tagName:a,onReplace:c,__unstableEmbedURLOnPaste:u,preserveWhiteSpace:d,pastePlainText:p}=e.current;if(!t.contains(n.target))return;if(n.defaultPrevented)return;const{plainText:h,html:g}=yy(n);if(n.preventDefault(),window.console.log("Received HTML:\n\n",g),window.console.log("Received plain text:\n\n",h),o)return void r((0,W.insert)(i,h));function m(e){const t=s.reduce(((e,{__unstablePasteRule:t})=>(t&&e===i&&(e=t(i,{html:g,plainText:h})),e)),i);if(t!==i)r(t);else{const t=(0,W.create)({html:e});!function(e,t){if(t?.length){let n=e.formats.length;for(;n--;)e.formats[n]=[...t,...e.formats[n]||[]]}}(t,i.activeFormats),r((0,W.insert)(i,t))}}if("true"===n.clipboardData.getData("rich-text"))return void m(g);if(p)return void r((0,W.insert)(i,(0,W.create)({text:h})));let f="INLINE";const b=h.trim();u&&(0,W.isEmpty)(i)&&(0,fa.isURL)(b)&&/^https?:/.test(b)&&(f="BLOCKS");const k=(0,l.pasteHandler)({HTML:g,plainText:h,mode:f,tagName:a,preserveWhiteSpace:d});"string"==typeof k?m(k):k.length>0&&c&&(0,W.isEmpty)(i)&&c(k,k.length-1,-1)}const{defaultView:o}=t.ownerDocument;return o.addEventListener("paste",n),()=>{o.removeEventListener("paste",n)}},e=>t=>{function n(t){const{keyCode:n}=t;if(t.defaultPrevented)return;const{value:o,onMerge:r,onRemove:i}=e.current;if(n===va.DELETE||n===va.BACKSPACE){const{start:e,end:s,text:l}=o,a=n===va.BACKSPACE,c=o.activeFormats&&!!o.activeFormats.length;if(!(0,W.isCollapsed)(o)||c||a&&0!==e||!a&&s!==l.length)return;r?r(!a):i&&(0,W.isEmpty)(o)&&a&&i(!a),t.preventDefault()}}return t.addEventListener("keydown",n),()=>{t.removeEventListener("keydown",n)}},e=>t=>{function n(t){if(t.keyCode!==va.ENTER)return;const{onReplace:n,onSplit:o}=e.current;n&&o&&(t.__deprecatedOnSplit=!0)}function o(n){if(n.defaultPrevented)return;if(n.target!==t)return;if(n.keyCode!==va.ENTER)return;const{value:o,onChange:r,disableLineBreaks:i,onSplitAtEnd:s,onSplitAtDoubleLineEnd:l,registry:a}=e.current;n.preventDefault();const{text:c,start:u,end:d}=o;n.shiftKey?i||r((0,W.insert)(o,"\n")):s&&u===d&&d===c.length?s():l&&u===d&&d===c.length&&"\n\n"===c.slice(-2)?a.batch((()=>{const e={...o};e.start=e.end-2,r((0,W.remove)(e)),l()})):i||r((0,W.insert)(o,"\n"))}const{defaultView:r}=t.ownerDocument;return r.addEventListener("keydown",o),t.addEventListener("keydown",n),()=>{r.removeEventListener("keydown",o),t.removeEventListener("keydown",n)}},e=>t=>{function n(){const{registry:n}=e.current;if(!n.select(li).isMultiSelecting())return;const o=t.parentElement.closest('[contenteditable="true"]');o&&o.focus()}return t.addEventListener("focus",n),()=>{t.removeEventListener("focus",n)}}];function yM(e){const t=(0,a.useRef)(e);t.current=e;const n=(0,a.useMemo)((()=>xM.map((e=>e(t)))),[t]);return(0,u.useRefEffect)((t=>{if(!e.isSelected)return;const o=n.map((e=>e(t)));return()=>{o.forEach((e=>e()))}}),[n,e.isSelected])}const SM={},wM=Symbol("usesContext");function CM({onChange:e,onFocus:t,value:n,forwardedRef:o,settings:r}){const{name:i,edit:s,[wM]:l}=r,c=(0,a.useContext)(ob),u=(0,a.useMemo)((()=>l?Object.fromEntries(Object.entries(c).filter((([e])=>l.includes(e)))):SM),[l,c]);if(!s)return null;const d=(0,W.getActiveFormat)(n,i),p=void 0!==d,h=(0,W.getActiveObject)(n),g=void 0!==h&&h.type===i;return(0,$.jsx)(s,{isActive:p,activeAttributes:p&&d.attributes||{},isObjectActive:g,activeObjectAttributes:g&&h.attributes||{},value:n,onChange:e,onFocus:t,contentRef:o,context:u},i)}function BM({formatTypes:e,...t}){return e.map((e=>(0,Pa.createElement)(CM,{settings:e,...t,key:e.name})))}function IM(e,t){if(OM.isEmpty(e)){const e=vM(t);return e?`<${e}></${e}>`:""}return Array.isArray(e)?(y()("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/"}),l.children.toHTML(e)):"string"==typeof e?e:e.toHTMLString()}function jM({value:e,tagName:t,multiline:n,format:o,...r}){return e=(0,$.jsx)(a.RawHTML,{children:IM(e,n)}),t?(0,$.jsx)(t,{...r,children:e}):e}const EM=(0,a.forwardRef)((function({children:e,identifier:t,tagName:n="div",value:o="",onChange:r,multiline:i,...s},l){y()("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{clientId:a}=_(),{getSelectionStart:u,getSelectionEnd:d}=(0,c.useSelect)(li),{selectionChange:p}=(0,c.useDispatch)(li),h=vM(i),g=`</${h}>${o=o||`<${h}></${h}>`}<${h}>`.split(`</${h}><${h}>`);function m(e){r(`<${h}>${e.join(`</${h}><${h}>`)}</${h}>`)}return g.shift(),g.pop(),(0,$.jsx)(n,{ref:l,children:g.map(((e,n)=>(0,$.jsx)(NM,{identifier:`${t}-${n}`,tagName:h,value:e,onChange:e=>{const t=g.slice();t[n]=e,m(t)},isSelected:void 0,onKeyDown:o=>{if(o.keyCode!==va.ENTER)return;o.preventDefault();const{offset:r}=u(),{offset:i}=d();if("number"!=typeof r||"number"!=typeof i)return;const s=(0,W.create)({html:e});s.start=r,s.end=i;const l=(0,W.split)(s).map((e=>(0,W.toHTMLString)({value:e}))),c=g.slice();c.splice(n,1,...l),m(c),p(a,`${t}-${n+1}`,0,0)},onMerge:e=>{const o=g.slice();let r=0;if(e){if(!o[n+1])return;o.splice(n,2,o[n]+o[n+1]),r=o[n].length-1}else{if(!o[n-1])return;o.splice(n-1,2,o[n-1]+o[n]),r=o[n-1].length-1}m(o),p(a,`${t}-${n-(e?0:1)}`,r,r)},...s},n)))})}));const TM=(0,a.createContext)(),MM=(0,a.createContext)(),PM=Symbol("instanceId");function RM(e){const{__unstableMobileNoFocusOnMount:t,deleteEnter:n,placeholderTextColor:o,textAlign:r,selectionColor:i,tagsToEliminate:s,disableEditingMenu:l,fontSize:a,fontFamily:c,fontWeight:u,fontStyle:d,minWidth:p,maxWidth:h,disableSuggestions:g,disableAutocorrection:m,...f}=e;return f}function NM({children:e,tagName:t="div",value:n="",onChange:o,isSelected:r,multiline:i,inlineToolbar:s,wrapperClassName:d,autocompleters:p,onReplace:h,placeholder:g,allowedFormats:f,withoutInteractiveFormatting:b,onRemove:k,onMerge:v,onSplit:x,__unstableOnSplitAtEnd:S,__unstableOnSplitAtDoubleLineEnd:w,identifier:B,preserveWhiteSpace:I,__unstablePastePlainText:j,__unstableEmbedURLOnPaste:E,__unstableDisableFormats:T,disableLineBreaks:M,__unstableAllowPrefixTransformations:P,readOnly:R,...N},L){N=RM(N),x&&y()("wp.blockEditor.RichText onSplit prop",{since:"6.4",alternative:'block.json support key: "splitting"'});const A=(0,u.useInstanceId)(NM),D=(0,a.useRef)(),O=_(),{clientId:z,isSelected:V,name:F}=O,H=O[m],G=(0,a.useContext)(ob),U=(0,c.useRegistry)(),{selectionStart:K,selectionEnd:Z,isSelected:q}=(0,c.useSelect)((e=>{if(!V)return{isSelected:!1};const{getSelectionStart:t,getSelectionEnd:n}=e(li),o=t(),i=n();let s;return void 0===r?s=o.clientId===z&&i.clientId===z&&(B?o.attributeKey===B:o[PM]===A):r&&(s=o.clientId===z),{selectionStart:s?o.offset:void 0,selectionEnd:s?i.offset:void 0,isSelected:s}}),[z,B,A,r,V]),{disableBoundBlock:Y,bindingsPlaceholder:X,bindingsLabel:Q}=(0,c.useSelect)((e=>{var t;if(!H?.[B]||!ix(F))return{};const o=H[B],r=(0,l.getBlockBindingsSource)(o.source),i={};if(r?.usesContext?.length)for(const e of r.usesContext)i[e]=G[e];const s=!r?.canUserEditValue?.({select:e,context:i,args:o.args});if(n.length>0)return{disableBoundBlock:s,bindingsPlaceholder:null,bindingsLabel:null};const{getBlockAttributes:a}=e(li),c=a(z),u=r?.getFieldsList?.({select:e,context:i}),d=null!==(t=u?.[o?.args?.key]?.label)&&void 0!==t?t:r?.label,p=s?d:(0,C.sprintf)((0,C.__)("Add %s"),d),h=s?o?.args?.key||r?.label:(0,C.sprintf)((0,C.__)("Empty %s; start writing to edit its value"),o?.args?.key||r?.label);return{disableBoundBlock:s,bindingsPlaceholder:c?.placeholder||p,bindingsLabel:h}}),[H,B,F,G,n]),J=R||Y,{getSelectionStart:ee,getSelectionEnd:te,getBlockRootClientId:ne}=(0,c.useSelect)(li),{selectionChange:oe}=(0,c.useDispatch)(li),re=_M({allowedFormats:f,disableFormats:T}),ie=!re||re.length>0,se=(0,a.useCallback)(((e,t)=>{const n={},o=void 0===e&&void 0===t,r={clientId:z,[B?"attributeKey":PM]:B||A};if("number"==typeof e||o){if(void 0===t&&ne(z)!==ne(te().clientId))return;n.start={...r,offset:e}}if("number"==typeof t||o){if(void 0===e&&ne(z)!==ne(ee().clientId))return;n.end={...r,offset:t}}oe(n)}),[z,ne,te,ee,B,A,oe]),{formatTypes:le,prepareHandlers:ae,valueHandlers:ce,changeHandlers:ue,dependencies:de}=function({clientId:e,identifier:t,withoutInteractiveFormatting:n,allowedFormats:o}){const r=(0,c.useSelect)(hM,[]),i=(0,a.useMemo)((()=>r.filter((({name:e,interactive:t,tagName:r})=>!(o&&!o.includes(e)||n&&(t||gM.has(r)))))),[r,o,n]),s=(0,c.useSelect)((n=>i.reduce(((o,r)=>r.__experimentalGetPropsForEditableTreePreparation?{...o,...mM(r.__experimentalGetPropsForEditableTreePreparation(n,{richTextIdentifier:t,blockClientId:e}),r.name)}:o),{})),[i,e,t]),l=(0,c.useDispatch)(),u=[],d=[],p=[],h=[];for(const e in s)h.push(s[e]);return i.forEach((n=>{if(n.__experimentalCreatePrepareEditableTree){const o=n.__experimentalCreatePrepareEditableTree(fM(s,n.name),{richTextIdentifier:t,blockClientId:e});n.__experimentalCreateOnChangeEditableValue?d.push(o):u.push(o)}if(n.__experimentalCreateOnChangeEditableValue){let o={};n.__experimentalGetPropsForEditableTreeChangeHandler&&(o=n.__experimentalGetPropsForEditableTreeChangeHandler(l,{richTextIdentifier:t,blockClientId:e}));const r=fM(s,n.name);p.push(n.__experimentalCreateOnChangeEditableValue({..."object"==typeof r?r:{},...o},{richTextIdentifier:t,blockClientId:e}))}})),{formatTypes:i,prepareHandlers:u,valueHandlers:d,changeHandlers:p,dependencies:h}}({clientId:z,identifier:B,withoutInteractiveFormatting:b,allowedFormats:re});function pe(e){return le.forEach((t=>{t.__experimentalCreatePrepareEditableTree&&(e=(0,W.removeFormat)(e,t.name,0,e.text.length))})),e.formats}const{value:he,getValue:ge,onChange:me,ref:fe}=(0,W.__unstableUseRichText)({value:n,onChange(e,{__unstableFormats:t,__unstableText:n}){o(e),Object.values(ue).forEach((e=>{e(t,n)}))},selectionStart:K,selectionEnd:Z,onSelectionChange:se,placeholder:X||g,__unstableIsSelected:q,__unstableDisableFormats:T,preserveWhiteSpace:I,__unstableDependencies:[...de,t],__unstableAfterParse:function(e){return ce.reduce(((t,n)=>n(t,e.text)),e.formats)},__unstableBeforeSerialize:pe,__unstableAddInvisibleFormats:function(e){return ae.reduce(((t,n)=>n(t,e.text)),e.formats)}}),be=function(e){return(0,os.__unstableUseAutocompleteProps)({...e,completers:dB(e)})}({onReplace:h,completers:p,record:he,onChange:me});!function({html:e,value:t}){const n=(0,a.useRef)(),o=!!t.activeFormats?.length,{__unstableMarkLastChangeAsPersistent:r}=(0,c.useDispatch)(li);(0,a.useLayoutEffect)((()=>{if(n.current){if(n.current!==t.text){const e=window.setTimeout((()=>{r()}),1e3);return n.current=t.text,()=>{window.clearTimeout(e)}}r()}else n.current=t.text}),[e,o])}({html:n,value:he});const ke=(0,a.useRef)(new Set),ve=(0,a.useRef)(new Set);function _e(){D.current?.focus()}const xe=t;return(0,$.jsxs)($.Fragment,{children:[q&&(0,$.jsx)(TM.Provider,{value:ke,children:(0,$.jsx)(MM.Provider,{value:ve,children:(0,$.jsxs)(os.Popover.__unstableSlotNameProvider,{value:"__unstable-block-tools-after",children:[e&&e({value:he,onChange:me,onFocus:_e}),(0,$.jsx)(BM,{value:he,onChange:me,onFocus:_e,formatTypes:le,forwardedRef:D})]})})}),q&&ie&&(0,$.jsx)(pM,{inline:s,editableContentElement:D.current}),(0,$.jsx)(xe,{role:"textbox","aria-multiline":!M,"aria-readonly":J,...N,"aria-label":Q||N["aria-label"]||g,...be,ref:(0,u.useMergeRefs)([fe,L,be.ref,N.ref,yM({registry:U,getValue:ge,onChange:me,__unstableAllowPrefixTransformations:P,formatTypes:le,onReplace:h,selectionChange:oe,isSelected:q,disableFormats:T,value:he,tagName:t,onSplit:x,__unstableEmbedURLOnPaste:E,pastePlainText:j,onMerge:v,onRemove:k,removeEditorOnlyFormats:pe,disableLineBreaks:M,onSplitAtEnd:S,onSplitAtDoubleLineEnd:w,keyboardShortcuts:ke,inputEvents:ve}),D]),contentEditable:!J,suppressContentEditableWarning:!0,className:Zi("block-editor-rich-text__editable",N.className,"rich-text"),tabIndex:0!==N.tabIndex||J?N.tabIndex:null,"data-wp-block-attribute-key":B})]})}const LM=(AM=(0,a.forwardRef)(NM),(0,a.forwardRef)(((e,t)=>{let n=e.value,o=e.onChange;Array.isArray(n)&&(y()("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/"}),n=l.children.toHTML(e.value),o=t=>e.onChange(l.children.fromDOM((0,W.__unstableCreateElement)(document,t).childNodes)));const r=e.multiline?EM:AM;return(0,$.jsx)(r,{...e,value:n,onChange:o,ref:t})})));var AM;LM.Content=jM,LM.isEmpty=e=>!e||0===e.length;const DM=(0,a.forwardRef)(((e,t)=>{if(_()[f]){const{children:t,tagName:n="div",value:o,onChange:r,isSelected:i,multiline:s,inlineToolbar:l,wrapperClassName:a,autocompleters:c,onReplace:u,placeholder:d,allowedFormats:p,withoutInteractiveFormatting:h,onRemove:g,onMerge:m,onSplit:f,__unstableOnSplitAtEnd:b,__unstableOnSplitAtDoubleLineEnd:k,identifier:v,preserveWhiteSpace:_,__unstablePastePlainText:x,__unstableEmbedURLOnPaste:y,__unstableDisableFormats:S,disableLineBreaks:w,__unstableAllowPrefixTransformations:C,readOnly:B,...I}=RM(e);return(0,$.jsx)(n,{...I,dangerouslySetInnerHTML:{__html:IM(o,s)}})}return(0,$.jsx)(LM,{ref:t,...e,readOnly:!1})}));DM.Content=jM,DM.isEmpty=e=>!e||0===e.length;const OM=DM,zM=(0,a.forwardRef)(((e,t)=>(0,$.jsx)(OM,{ref:t,...e,__unstableDisableFormats:!0})));zM.Content=({value:e="",tagName:t="div",...n})=>(0,$.jsx)(t,{...n,children:e});const VM=zM,FM=(0,a.forwardRef)((({__experimentalVersion:e,...t},n)=>{if(2===e)return(0,$.jsx)(VM,{ref:n,...t});const{className:o,onChange:r,...i}=t;return(0,$.jsx)(xb.A,{ref:n,className:Zi("block-editor-plain-text",o),onChange:e=>r(e.target.value),...i})}));function HM({property:e,viewport:t,desc:n}){const o=(0,u.useInstanceId)(HM),r=n||(0,C.sprintf)((0,C._x)("Controls the %1$s property for %2$s viewports.","Text labelling a interface as controlling a given layout property (eg: margin) for a given screen size."),e,t.label);return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)("span",{"aria-describedby":`rbc-desc-${o}`,children:t.label}),(0,$.jsx)(os.VisuallyHidden,{as:"span",id:`rbc-desc-${o}`,children:r})]})}const GM=function(e){const{title:t,property:n,toggleLabel:o,onIsResponsiveChange:r,renderDefaultControl:i,renderResponsiveControls:s,isResponsive:l=!1,defaultLabel:c={id:"all",label:(0,C._x)("All","screen sizes")},viewports:u=[{id:"small",label:(0,C.__)("Small screens")},{id:"medium",label:(0,C.__)("Medium screens")},{id:"large",label:(0,C.__)("Large screens")}]}=e;if(!t||!n||!i)return null;const d=o||(0,C.sprintf)((0,C.__)("Use the same %s on all screen sizes."),n),p=(0,C.__)("Toggle between using the same value for all screen sizes or using a unique value per screen size."),h=i((0,$.jsx)(HM,{property:n,viewport:c}),c);return(0,$.jsxs)("fieldset",{className:"block-editor-responsive-block-control",children:[(0,$.jsx)("legend",{className:"block-editor-responsive-block-control__title",children:t}),(0,$.jsxs)("div",{className:"block-editor-responsive-block-control__inner",children:[(0,$.jsx)(os.ToggleControl,{__nextHasNoMarginBottom:!0,className:"block-editor-responsive-block-control__toggle",label:d,checked:!l,onChange:r,help:p}),(0,$.jsxs)("div",{className:Zi("block-editor-responsive-block-control__group",{"is-responsive":l}),children:[!l&&h,l&&(s?s(u):u.map((e=>(0,$.jsx)(a.Fragment,{children:i((0,$.jsx)(HM,{property:n,viewport:e}),e)},e.id))))]})]})]})};function $M({character:e,type:t,onUse:n}){const o=(0,a.useContext)(TM),r=(0,a.useRef)();return r.current=n,(0,a.useEffect)((()=>{function n(n){va.isKeyboardEvent[t](n,e)&&(r.current(),n.preventDefault())}return o.current.add(n),()=>{o.current.delete(n)}}),[e,t]),null}function UM({name:e,shortcutType:t,shortcutCharacter:n,...o}){let r,i="RichText.ToolbarControls";return e&&(i+=`.${e}`),t&&n&&(r=va.displayShortcut[t](n)),(0,$.jsx)(os.Fill,{name:i,children:(0,$.jsx)(os.ToolbarButton,{...o,shortcut:r})})}function WM({inputType:e,onInput:t}){const n=(0,a.useContext)(MM),o=(0,a.useRef)();return o.current=t,(0,a.useEffect)((()=>{function t(t){t.inputType===e&&(o.current(),t.preventDefault())}return n.current.add(t),()=>{n.current.delete(t)}}),[e]),null}const KM=(0,$.jsx)(os.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:(0,$.jsx)(os.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"})});const ZM=(0,a.forwardRef)((function(e,t){const n=(0,c.useSelect)((e=>e(li).__unstableGetEditorMode()),[]),{resetZoomLevel:o,__unstableSetEditorMode:r}=te((0,c.useDispatch)(li));return(0,$.jsx)(os.Dropdown,{renderToggle:({isOpen:o,onToggle:r})=>(0,$.jsx)(os.Button,{size:"compact",...e,ref:t,icon:"navigation"===n?KM:gc,"aria-expanded":o,"aria-haspopup":"true",onClick:r,label:(0,C.__)("Tools")}),popoverProps:{placement:"bottom-start"},renderContent:()=>(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(os.NavigableMenu,{role:"menu","aria-label":(0,C.__)("Tools"),children:(0,$.jsx)(os.MenuItemsChoice,{value:"navigation"===n?"navigation":"edit",onSelect:e=>{o(),r(e)},choices:[{value:"edit",label:(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(hl,{icon:gc}),(0,C.__)("Edit")]})},{value:"navigation",label:(0,$.jsxs)($.Fragment,{children:[KM,(0,C.__)("Select")]})}]})}),(0,$.jsx)("div",{className:"block-editor-tool-selector__help",children:(0,C.__)("Tools provide different interactions for selecting, navigating, and editing blocks. Toggle between select and edit by pressing Escape and Enter.")})]})})}));function qM({units:e,...t}){const[n]=ci("spacing.units"),o=(0,os.__experimentalUseCustomUnits)({availableUnits:n||["%","px","em","rem","vw"],units:e});return(0,$.jsx)(os.__experimentalUnitControl,{units:o,...t})}const YM=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"})});class XM 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,C.__)("Edit link"):(0,C.__)("Insert link");return(0,$.jsxs)("div",{className:"block-editor-url-input__button",children:[(0,$.jsx)(os.Button,{size:"compact",icon:od,label:o,onClick:this.toggle,className:"components-toolbar__control",isPressed:!!e}),n&&(0,$.jsx)("form",{className:"block-editor-url-input__button-modal",onSubmit:this.submitLink,children:(0,$.jsxs)("div",{className:"block-editor-url-input__button-modal-line",children:[(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,className:"block-editor-url-input__back",icon:YM,label:(0,C.__)("Close"),onClick:this.toggle}),(0,$.jsx)(La,{value:e||"",onChange:t,suffix:(0,$.jsx)(os.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,$.jsx)(os.Button,{size:"small",icon:ja,label:(0,C.__)("Submit"),type:"submit"})})})]})})]})}}const QM=XM,JM=(0,$.jsx)(G.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,$.jsx)(G.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 4.5h14c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V5c-.1-.3.1-.5.4-.5zm14 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z"})}),eP="none",tP="custom",nP="media",oP="attachment",rP=["noreferrer","noopener"],iP=({linkDestination:e,onChangeUrl:t,url:n,mediaType:o="image",mediaUrl:r,mediaLink:i,linkTarget:s,linkClass:l,rel:c,showLightboxSetting:u,lightboxEnabled:d,onSetLightbox:p,resetLightbox:h})=>{const[g,m]=(0,a.useState)(!1),[f,b]=(0,a.useState)(null),[k,v]=(0,a.useState)(!1),[_,x]=(0,a.useState)(null),y=(0,a.useRef)(null),S=(0,a.useRef)();(0,a.useEffect)((()=>{if(!S.current)return;(ba.focus.focusable.find(S.current)[0]||S.current).focus()}),[k,n,d]);const w=()=>{e!==nP&&e!==oP||x(""),v(!0)},B=()=>{v(!1)},I=()=>{const e=[{linkDestination:nP,title:(0,C.__)("Link to image file"),url:"image"===o?r:void 0,icon:JM}];return"image"===o&&i&&e.push({linkDestination:oP,title:(0,C.__)("Link to attachment page"),url:"image"===o?i:void 0,icon:za}),e},j=(0,$.jsxs)(os.__experimentalVStack,{spacing:"3",children:[(0,$.jsx)(os.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,C.__)("Open in new tab"),onChange:e=>{const n=(e=>{const t=e?"_blank":void 0;let n;if(t){const e=(null!=c?c:"").split(" ");rP.forEach((t=>{e.includes(t)||e.push(t)})),n=e.join(" ")}else{const e=(null!=c?c:"").split(" ").filter((e=>!1===rP.includes(e)));n=e.length?e.join(" "):void 0}return{linkTarget:t,rel:n}})(e);t(n)},checked:"_blank"===s}),(0,$.jsx)(os.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,C.__)("Link rel"),value:null!=c?c:"",onChange:e=>{t({rel:e})}}),(0,$.jsx)(os.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,C.__)("Link CSS class"),value:l||"",onChange:e=>{t({linkClass:e})}})]}),E=null!==_?_:n,T=!d||d&&!u,M=!E&&T,P=(I().find((t=>t.linkDestination===e))||{}).title;return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(os.ToolbarButton,{icon:od,className:"components-toolbar__control",label:(0,C.__)("Link"),"aria-expanded":g,onClick:()=>{m(!0)},ref:b,isActive:!!n||d&&u}),g&&(0,$.jsx)(oM,{ref:S,anchor:f,onFocusOutside:e=>{const t=y.current;t&&t.contains(e.target)||(m(!1),x(null),B())},onClose:()=>{x(null),B(),m(!1)},renderSettings:T?()=>j:null,additionalControls:M&&(0,$.jsxs)(os.NavigableMenu,{children:[I().map((e=>(0,$.jsx)(os.MenuItem,{icon:e.icon,iconPosition:"left",onClick:()=>{x(null),(e=>{const n=I();let o;o=e?(n.find((t=>t.url===e))||{linkDestination:tP}).linkDestination:eP,t({linkDestination:o,href:e})})(e.url),B()},children:e.title},e.linkDestination))),u&&(0,$.jsx)(os.MenuItem,{className:"block-editor-url-popover__expand-on-click",icon:hB,info:(0,C.__)("Scale the image with a lightbox effect."),iconPosition:"left",onClick:()=>{x(null),t({linkDestination:eP,href:""}),p?.(!0),B()},children:(0,C.__)("Expand on click")},"expand-on-click")]}),offset:13,children:d&&u&&!n&&!k?(0,$.jsxs)("div",{className:"block-editor-url-popover__expand-on-click",children:[(0,$.jsx)(hl,{icon:hB}),(0,$.jsxs)("div",{className:"text",children:[(0,$.jsx)("p",{children:(0,C.__)("Expand on click")}),(0,$.jsx)("p",{className:"description",children:(0,C.__)("Scales the image with a lightbox effect")})]}),(0,$.jsx)(os.Button,{icon:mc,label:(0,C.__)("Disable expand on click"),onClick:()=>{p?.(!1)},size:"compact"})]}):!n||k?(0,$.jsx)(oM.LinkEditor,{className:"block-editor-format-toolbar__link-container-content",value:E,onChangeInputValue:x,onSubmit:e=>{if(_){const e=I().find((e=>e.url===_))?.linkDestination||tP;t({href:_,linkDestination:e,lightbox:{enabled:!1}})}B(),x(null),e.preventDefault()},autocompleteRef:y}):n&&!k?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(oM.LinkViewer,{className:"block-editor-format-toolbar__link-container-content",url:n,onEditLinkClick:w,urlLabel:P}),(0,$.jsx)(os.Button,{icon:mc,label:(0,C.__)("Remove link"),onClick:()=>{t({linkDestination:eP,href:""}),h?.()},size:"compact"})]}):void 0})]})};function sP(){return y()("wp.blockEditor.PreviewOptions",{version:"6.5"}),null}function lP(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<t?n:t};return(e=>{const t="Mobile"===e?"768px":"1024px",n="40px",r="auto";switch(e){case"Tablet":case"Mobile":return{width:o(e),marginTop:n,marginBottom:n,marginLeft:r,marginRight:r,height:t,overflowY:"auto"};default:return{marginLeft:r,marginRight:r}}})(e)}function aP(){const e=(0,c.useSelect)((e=>e(li).getBlockSelectionStart()),[]),t=(0,a.useRef)();kp(e,t);return e?(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,variant:"secondary",className:"block-editor-skip-to-selected-block",onClick:()=>{t.current?.focus()},children:(0,C.__)("Skip to the selected block")}):null}const cP=window.wp.wordcount;function uP(){const{blocks:e}=(0,c.useSelect)((e=>{const{getMultiSelectedBlocks:t}=e(li);return{blocks:t()}}),[]),t=(0,cP.count)((0,l.serialize)(e),"words");return(0,$.jsxs)("div",{className:"block-editor-multi-selection-inspector__card",children:[(0,$.jsx)(Uf,{icon:$B,showColors:!0}),(0,$.jsxs)("div",{className:"block-editor-multi-selection-inspector__card-content",children:[(0,$.jsx)("div",{className:"block-editor-multi-selection-inspector__card-title",children:(0,C.sprintf)((0,C._n)("%d Block","%d Blocks",e.length),e.length)}),(0,$.jsx)("div",{className:"block-editor-multi-selection-inspector__card-description",children:(0,C.sprintf)((0,C._n)("%d word selected.","%d words selected.",t),t)})]})]})}const dP=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{fillRule:"evenodd",d:"M10.289 4.836A1 1 0 0111.275 4h1.306a1 1 0 01.987.836l.244 1.466c.787.26 1.503.679 2.108 1.218l1.393-.522a1 1 0 011.216.437l.653 1.13a1 1 0 01-.23 1.273l-1.148.944a6.025 6.025 0 010 2.435l1.149.946a1 1 0 01.23 1.272l-.653 1.13a1 1 0 01-1.216.437l-1.394-.522c-.605.54-1.32.958-2.108 1.218l-.244 1.466a1 1 0 01-.987.836h-1.306a1 1 0 01-.986-.836l-.244-1.466a5.995 5.995 0 01-2.108-1.218l-1.394.522a1 1 0 01-1.217-.436l-.653-1.131a1 1 0 01.23-1.272l1.149-.946a6.026 6.026 0 010-2.435l-1.148-.944a1 1 0 01-.23-1.272l.653-1.131a1 1 0 011.217-.437l1.393.522a5.994 5.994 0 012.108-1.218l.244-1.466zM14.929 12a3 3 0 11-6 0 3 3 0 016 0z",clipRule:"evenodd"})}),pP=(0,$.jsx)(G.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,$.jsx)(G.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M20 12a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-1.5 0a6.5 6.5 0 0 1-6.5 6.5v-13a6.5 6.5 0 0 1 6.5 6.5Z"})}),hP={name:"settings",title:(0,C.__)("Settings"),value:"settings",icon:dP,className:"block-editor-block-inspector__tab-item"},gP={name:"styles",title:(0,C.__)("Styles"),value:"styles",icon:pP,className:"block-editor-block-inspector__tab-item"},mP={name:"list",title:(0,C.__)("List View"),value:"list-view",icon:Yj,className:"block-editor-block-inspector__tab-item"},fP=()=>{const e=(0,os.__experimentalUseSlotFills)(ga.slotName);return Boolean(e&&e.length)?(0,$.jsx)(os.PanelBody,{className:"block-editor-block-inspector__advanced",title:(0,C.__)("Advanced"),initialOpen:!1,children:(0,$.jsx)(ma.Slot,{group:"advanced"})}):null},bP=()=>{const[e,t]=(0,a.useState)(),{multiSelectedBlocks:n}=(0,c.useSelect)((e=>{const{getBlocksByClientId:t,getSelectedBlockClientIds:n}=e(li);return{multiSelectedBlocks:t(n())}}),[]);return(0,a.useLayoutEffect)((()=>{void 0===e&&t(n.some((({attributes:e})=>!!e?.style?.position?.type)))}),[e,n,t]),(0,$.jsx)(os.PanelBody,{className:"block-editor-block-inspector__position",title:(0,C.__)("Position"),initialOpen:null!=e&&e,children:(0,$.jsx)(ma.Slot,{group:"position"})})},kP=()=>{const e=(0,os.__experimentalUseSlotFills)(sa.position.Slot.__unstableName);return Boolean(e&&e.length)?(0,$.jsx)(bP,{}):null},vP=({showAdvancedControls:e=!1})=>(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(ma.Slot,{}),(0,$.jsx)(kP,{}),(0,$.jsx)(ma.Slot,{group:"bindings"}),e&&(0,$.jsx)("div",{children:(0,$.jsx)(fP,{})})]}),_P=({blockName:e,clientId:t,hasBlockStyles:n})=>{const o=Dd({blockName:e});return(0,$.jsxs)($.Fragment,{children:[n&&(0,$.jsx)("div",{children:(0,$.jsx)(os.PanelBody,{title:(0,C.__)("Styles"),children:(0,$.jsx)(NE,{clientId:t})})}),(0,$.jsx)(ma.Slot,{group:"color",label:(0,C.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,$.jsx)(ma.Slot,{group:"background",label:(0,C.__)("Background image")}),(0,$.jsx)(ma.Slot,{group:"filter"}),(0,$.jsx)(ma.Slot,{group:"typography",label:(0,C.__)("Typography")}),(0,$.jsx)(ma.Slot,{group:"dimensions",label:(0,C.__)("Dimensions")}),(0,$.jsx)(ma.Slot,{group:"border",label:o}),(0,$.jsx)(ma.Slot,{group:"styles"})]})},xP=["core/navigation"],yP=e=>!xP.includes(e),{Tabs:SP}=te(os.privateApis);function wP({blockName:e,clientId:t,hasBlockStyles:n,tabs:o}){const r=(0,c.useSelect)((e=>e(Ia.store).get("core","showIconLabels")),[]),i=yP(e)?void 0:mP.name;return(0,$.jsx)("div",{className:"block-editor-block-inspector__tabs",children:(0,$.jsxs)(SP,{defaultTabId:i,children:[(0,$.jsx)(SP.TabList,{children:o.map((e=>r?(0,$.jsx)(SP.Tab,{tabId:e.name,className:e.className,children:e.title},e.name):(0,$.jsx)(os.Tooltip,{text:e.title,children:(0,$.jsx)(SP.Tab,{tabId:e.name,className:e.className,"aria-label":e.title,children:(0,$.jsx)(os.Icon,{icon:e.icon})})},e.name)))}),(0,$.jsx)(SP.TabPanel,{tabId:hP.name,focusable:!1,children:(0,$.jsx)(vP,{showAdvancedControls:!!e})}),(0,$.jsx)(SP.TabPanel,{tabId:gP.name,focusable:!1,children:(0,$.jsx)(_P,{blockName:e,clientId:t,hasBlockStyles:n})}),(0,$.jsx)(SP.TabPanel,{tabId:mP.name,focusable:!1,children:(0,$.jsx)(ma.Slot,{group:"list"})})]},t)})}const CP=[];function BP(e){const t=[],{bindings:n,border:o,color:r,default:i,dimensions:s,list:l,position:a,styles:u,typography:d,effects:p}=sa,h=yP(e),g=(0,os.__experimentalUseSlotFills)(l.Slot.__unstableName),m=!h&&!!g&&g.length,f=[...(0,os.__experimentalUseSlotFills)(o.Slot.__unstableName)||[],...(0,os.__experimentalUseSlotFills)(r.Slot.__unstableName)||[],...(0,os.__experimentalUseSlotFills)(s.Slot.__unstableName)||[],...(0,os.__experimentalUseSlotFills)(u.Slot.__unstableName)||[],...(0,os.__experimentalUseSlotFills)(d.Slot.__unstableName)||[],...(0,os.__experimentalUseSlotFills)(p.Slot.__unstableName)||[]].length,b=[...(0,os.__experimentalUseSlotFills)(ga.slotName)||[],...(0,os.__experimentalUseSlotFills)(n.Slot.__unstableName)||[]],k=[...(0,os.__experimentalUseSlotFills)(i.Slot.__unstableName)||[],...(0,os.__experimentalUseSlotFills)(a.Slot.__unstableName)||[],...m&&f>1?b:[]];m&&t.push(mP),k.length&&t.push(hP),f&&t.push(gP);const v=function(e,t={}){return void 0!==t[e]?t[e]:void 0===t.default||t.default}(e,(0,c.useSelect)((e=>e(li).getSettings().blockInspectorTabs),[]));return v?t:CP}const{createPrivateSlotFill:IP}=te(os.privateApis),{Fill:jP,Slot:EP}=IP("BlockInformation"),TP=e=>_()[p]?(0,$.jsx)(jP,{...e}):null;TP.Slot=e=>(0,$.jsx)(EP,{...e});const MP=TP;function PP({clientIds:e,onSelect:t}){return e.length?(0,$.jsx)(os.__experimentalVStack,{spacing:1,children:e.map((e=>(0,$.jsx)(RP,{onSelect:t,clientId:e},e)))}):null}function RP({clientId:e,onSelect:t}){const n=Um(e),o=bB({clientId:e,context:"list-view"}),{isSelected:r}=(0,c.useSelect)((t=>{const{isBlockSelected:n,hasSelectedInnerBlock:o}=t(li);return{isSelected:n(e)||o(e,!0)}}),[e]),{selectBlock:i}=(0,c.useDispatch)(li);return(0,$.jsx)(os.Button,{__next40pxDefaultSize:!1,isPressed:r,onClick:async()=>{await i(e),t&&t(e)},children:(0,$.jsxs)(os.Flex,{children:[(0,$.jsx)(os.FlexItem,{children:(0,$.jsx)(Uf,{icon:n?.icon})}),(0,$.jsx)(os.FlexBlock,{style:{textAlign:"left"},children:(0,$.jsx)(os.__experimentalTruncate,{children:o})})]})})}function NP({clientId:e}){return(0,$.jsx)(os.PanelBody,{title:(0,C.__)("Styles"),children:(0,$.jsx)(NE,{clientId:e})})}function LP({topLevelLockedBlock:e}){const t=(0,c.useSelect)((t=>{const{getClientIdsOfDescendants:n,getBlockName:o,getBlockEditingMode:r}=t(li);return n(e).filter((e=>"core/list-item"!==o(e)&&"contentOnly"===r(e)))}),[e]),n=(0,c.useSelect)((t=>{const{getBlockName:n}=t(li),{getBlockStyles:o}=t(l.store);return!!o(n(e))?.length}),[e]),o=Um(e);return(0,$.jsxs)("div",{className:"block-editor-block-inspector",children:[(0,$.jsx)(Wf,{...o,className:o.isSynced&&"is-synced"}),(0,$.jsx)(MP.Slot,{}),n&&(0,$.jsx)(NP,{clientId:e}),t.length>0&&(0,$.jsx)(os.PanelBody,{title:(0,C.__)("Content"),children:(0,$.jsx)(PP,{clientIds:t})})]})}const AP=({animate:e,wrapper:t,children:n})=>e?t(n):n,DP=({blockInspectorAnimationSettings:e,selectedBlockClientId:t,children:n})=>{const o=e&&"leftToRight"===e.enterDirection?-50:50;return(0,$.jsx)(os.__unstableMotion.div,{animate:{x:0,opacity:1,transition:{ease:"easeInOut",duration:.14}},initial:{x:o,opacity:0},children:n},t)},OP=({clientId:e,blockName:t})=>{const n=BP(t),o=n?.length>1,r=(0,c.useSelect)((e=>{const{getBlockStyles:n}=e(l.store),o=n(t);return o&&o.length>0}),[t]),i=Um(e),s=Dd({blockName:t});return(0,$.jsxs)("div",{className:"block-editor-block-inspector",children:[(0,$.jsx)(Wf,{...i,className:i.isSynced&&"is-synced"}),(0,$.jsx)(tT,{blockClientId:e}),(0,$.jsx)(MP.Slot,{}),o&&(0,$.jsx)(wP,{hasBlockStyles:r,clientId:e,blockName:t,tabs:n}),!o&&(0,$.jsxs)($.Fragment,{children:[r&&(0,$.jsx)(NP,{clientId:e}),(0,$.jsx)(ma.Slot,{}),(0,$.jsx)(ma.Slot,{group:"list"}),(0,$.jsx)(ma.Slot,{group:"color",label:(0,C.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,$.jsx)(ma.Slot,{group:"background",label:(0,C.__)("Background image")}),(0,$.jsx)(ma.Slot,{group:"typography",label:(0,C.__)("Typography")}),(0,$.jsx)(ma.Slot,{group:"dimensions",label:(0,C.__)("Dimensions")}),(0,$.jsx)(ma.Slot,{group:"border",label:s}),(0,$.jsx)(ma.Slot,{group:"styles"}),(0,$.jsx)(kP,{}),(0,$.jsx)(ma.Slot,{group:"bindings"}),(0,$.jsx)("div",{children:(0,$.jsx)(fP,{})})]}),(0,$.jsx)(aP,{},"back")]})},zP=({showNoBlockSelectedMessage:e=!0})=>{const{count:t,selectedBlockName:n,selectedBlockClientId:o,blockType:r,topLevelLockedBlock:i}=(0,c.useSelect)((e=>{const{getSelectedBlockClientId:t,getSelectedBlockCount:n,getBlockName:o,getContentLockingParent:r,getTemplateLock:i}=te(e(li)),s=t(),a=s&&o(s),c=a&&(0,l.getBlockType)(a);return{count:n(),selectedBlockClientId:s,selectedBlockName:a,blockType:c,topLevelLockedBlock:r(s)||("contentOnly"===i(s)||"core/block"===a?s:void 0)}}),[]),s=BP(r?.name),a=s?.length>1,u=function(e){return(0,c.useSelect)((t=>{if(e){const n=t(li).getSettings().blockInspectorAnimation,o=n?.animationParent,{getSelectedBlockClientId:r,getBlockParentsByBlockName:i}=t(li);return i(r(),o,!0)[0]||e.name===o?n?.[e.name]:null}return null}),[e])}(r),d=Dd({blockName:n});if(t>1)return(0,$.jsxs)("div",{className:"block-editor-block-inspector",children:[(0,$.jsx)(uP,{}),a?(0,$.jsx)(wP,{tabs:s}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(ma.Slot,{}),(0,$.jsx)(ma.Slot,{group:"color",label:(0,C.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,$.jsx)(ma.Slot,{group:"background",label:(0,C.__)("Background image")}),(0,$.jsx)(ma.Slot,{group:"typography",label:(0,C.__)("Typography")}),(0,$.jsx)(ma.Slot,{group:"dimensions",label:(0,C.__)("Dimensions")}),(0,$.jsx)(ma.Slot,{group:"border",label:d}),(0,$.jsx)(ma.Slot,{group:"styles"})]})]});const p=n===(0,l.getUnregisteredTypeHandlerName)();return r&&o&&!p?i?(0,$.jsx)(LP,{topLevelLockedBlock:i}):(0,$.jsx)(AP,{animate:u,wrapper:e=>(0,$.jsx)(DP,{blockInspectorAnimationSettings:u,selectedBlockClientId:o,children:e}),children:(0,$.jsx)(OP,{clientId:o,blockName:r.name})}):e?(0,$.jsx)("span",{className:"block-editor-block-inspector__no-blocks",children:(0,C.__)("No block selected.")}):null},VP=()=>(y()("__unstableUseClipboardHandler",{alternative:"BlockCanvas or WritingFlow",since:"6.4",version:"6.7"}),Cy());function FP(e){return y()("CopyHandler",{alternative:"BlockCanvas or WritingFlow",since:"6.4",version:"6.7"}),(0,$.jsx)("div",{...e,ref:Cy()})}const HP=()=>{};const GP=(0,a.forwardRef)((function({rootClientId:e,clientId:t,isAppender:n,showInserterHelpPanel:o,showMostUsedBlocks:r=!1,__experimentalInsertionIndex:i,__experimentalInitialTab:s,__experimentalInitialCategory:l,__experimentalFilterValue:a,onPatternCategorySelection:u,onSelect:d=HP,shouldFocusBlock:p=!1,onClose:h},g){const{destinationRootClientId:m}=(0,c.useSelect)((n=>{const{getBlockRootClientId:o}=n(li);return{destinationRootClientId:e||o(t)||void 0}}),[t,e]);return(0,$.jsx)(Yw,{onSelect:d,rootClientId:m,clientId:t,isAppender:n,showInserterHelpPanel:o,showMostUsedBlocks:r,__experimentalInsertionIndex:i,__experimentalFilterValue:a,onPatternCategorySelection:u,__experimentalInitialTab:s,__experimentalInitialCategory:l,shouldFocusBlock:p,ref:g,onClose:h})}));const $P=(0,a.forwardRef)((function(e,t){return(0,$.jsx)(GP,{...e,onPatternCategorySelection:void 0,ref:t})}));function UP(){return y()("wp.blockEditor.MultiSelectScrollIntoView",{hint:"This behaviour is now built-in.",since:"5.8"}),null}const WP=-1!==window.navigator.userAgent.indexOf("Trident"),KP=new Set([va.UP,va.DOWN,va.LEFT,va.RIGHT]),ZP=.75;function qP(){const e=(0,c.useSelect)((e=>e(li).hasSelectedBlock()),[]);return(0,u.useRefEffect)((t=>{if(!e)return;const{ownerDocument:n}=t,{defaultView:o}=n;let r,i,s;function l(){r||(r=o.requestAnimationFrame((()=>{p(),r=null})))}function a(e){i&&o.cancelAnimationFrame(i),i=o.requestAnimationFrame((()=>{c(e),i=null}))}function c({keyCode:e}){if(!h())return;const r=(0,ba.computeCaretRect)(o);if(!r)return;if(!s)return void(s=r);if(KP.has(e))return void(s=r);const i=r.top-s.top;if(0===i)return;const l=(0,ba.getScrollContainer)(t);if(!l)return;const a=l===n.body||l===n.documentElement,c=a?o.scrollY:l.scrollTop,u=a?0:l.getBoundingClientRect().top,d=a?s.top/o.innerHeight:(s.top-u)/(o.innerHeight-u);if(0===c&&d<ZP&&function(){const e=t.querySelectorAll('[contenteditable="true"]');return e[e.length-1]===n.activeElement}())return void(s=r);const p=a?o.innerHeight:l.clientHeight;s.top+s.height>u+p||s.top<u?s=r:a?o.scrollBy(0,i):l.scrollTop+=i}function u(){n.addEventListener("selectionchange",d)}function d(){n.removeEventListener("selectionchange",d),p()}function p(){h()&&(s=(0,ba.computeCaretRect)(o))}function h(){return t.contains(n.activeElement)&&n.activeElement.isContentEditable}return o.addEventListener("scroll",l,!0),o.addEventListener("resize",l,!0),t.addEventListener("keydown",a),t.addEventListener("keyup",c),t.addEventListener("mousedown",u),t.addEventListener("touchstart",u),()=>{o.removeEventListener("scroll",l,!0),o.removeEventListener("resize",l,!0),t.removeEventListener("keydown",a),t.removeEventListener("keyup",c),t.removeEventListener("mousedown",u),t.removeEventListener("touchstart",u),n.removeEventListener("selectionchange",d),o.cancelAnimationFrame(r),o.cancelAnimationFrame(i)}}),[e])}const YP=WP?e=>e.children:function({children:e}){return(0,$.jsx)("div",{ref:qP(),className:"block-editor__typewriter",children:e})},XP=(0,a.createContext)({});function QP({children:e,uniqueId:t,blockName:n=""}){const o=(0,a.useContext)(XP),{name:r}=_();n=n||r;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}(o,n,t)),[o,n,t]);return(0,$.jsx)(XP.Provider,{value:i,children:e})}function JP(e,t=""){const n=(0,a.useContext)(XP),{name:o}=_();return t=t||o,Boolean(n[t]?.has(e))}const eR=e=>(y()("wp.blockEditor.__experimentalRecursionProvider",{since:"6.5",alternative:"wp.blockEditor.RecursionProvider"}),(0,$.jsx)(QP,{...e})),tR=(...e)=>(y()("wp.blockEditor.__experimentalUseHasRecursion",{since:"6.5",alternative:"wp.blockEditor.useHasRecursion"}),JP(...e));function nR({title:e,help:t,actions:n=[],onClose:o}){return(0,$.jsxs)(os.__experimentalVStack,{className:"block-editor-inspector-popover-header",spacing:4,children:[(0,$.jsxs)(os.__experimentalHStack,{alignment:"center",children:[(0,$.jsx)(os.__experimentalHeading,{className:"block-editor-inspector-popover-header__heading",level:2,size:13,children:e}),(0,$.jsx)(os.__experimentalSpacer,{}),n.map((({label:e,icon:t,onClick:n})=>(0,$.jsx)(os.Button,{size:"small",className:"block-editor-inspector-popover-header__action",label:e,icon:t,variant:!t&&"tertiary",onClick:n,children:!t&&e},e))),o&&(0,$.jsx)(os.Button,{size:"small",className:"block-editor-inspector-popover-header__action",label:(0,C.__)("Close"),icon:Uw,onClick:o})]}),t&&(0,$.jsx)(os.__experimentalText,{children:t})]})}const oR=(0,a.forwardRef)((function({onClose:e,onChange:t,showPopoverHeaderActions:n,isCompact:o,currentDate:r,...i},s){const l={startOfWeek:(0,iT.getSettings)().l10n.startOfWeek,onChange:t,currentDate:o?void 0:r,currentTime:o?r:void 0,...i},a=o?os.TimePicker:os.DateTimePicker;return(0,$.jsxs)("div",{ref:s,className:"block-editor-publish-date-time-picker",children:[(0,$.jsx)(nR,{title:(0,C.__)("Publish"),actions:n?[{label:(0,C.__)("Now"),onClick:()=>t?.(null)}]:void 0,onClose:e}),(0,$.jsx)(a,{...l})]})}));const rR=(0,a.forwardRef)((function(e,t){return(0,$.jsx)(oR,{...e,showPopoverHeaderActions:!0,isCompact:!1,ref:t})})),iR={button:"wp-element-button",caption:"wp-element-caption"},sR=e=>iR[e]?iR[e]:"",lR=()=>"";function aR(e,t,n){return"core/image"===e&&n?.lightbox?.allowEditing||!!t?.lightbox}function cR({onChange:e,value:t,inheritedValue:n,panelId:o}){const r=Pi(),i=()=>{e(void 0)};let s=!1;return n?.lightbox?.enabled&&(s=n.lightbox.enabled),(0,$.jsx)($.Fragment,{children:(0,$.jsx)(os.__experimentalToolsPanel,{label:(0,C._x)("Settings","Image settings"),resetAll:i,panelId:o,dropdownMenuProps:r,children:(0,$.jsx)(os.__experimentalToolsPanelItem,{hasValue:()=>!!t?.lightbox,label:(0,C.__)("Expand on click"),onDeselect:i,isShownByDefault:!0,panelId:o,children:(0,$.jsx)(os.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,C.__)("Expand on click"),checked:s,onChange:t=>{e({enabled:t})}})})})})}function uR({value:e,onChange:t,inheritedValue:n=e}){const[o,r]=(0,a.useState)(null),i=n?.css;return(0,$.jsxs)(os.__experimentalVStack,{spacing:3,children:[o&&(0,$.jsx)(os.Notice,{status:"error",onRemove:()=>r(null),children:o}),(0,$.jsx)(os.TextareaControl,{label:(0,C.__)("Additional CSS"),__nextHasNoMarginBottom:!0,value:i,onChange:n=>function(n){if(t({...e,css:n}),o){const[e]=Xy([{css:n}],".for-validation-only");e&&r(null)}}(n),onBlur:function(e){if(!e?.target?.value)return void r(null);const[t]=Xy([{css:e.target.value}],".for-validation-only");r(null===t?(0,C.__)("There is an error with your CSS structure."):null)},className:"block-editor-global-styles-advanced-panel__custom-css-input",spellCheck:!1})]})}const dR=new Map,pR=[],hR={caption:(0,C.__)("Caption"),link:(0,C.__)("Link"),button:(0,C.__)("Button"),heading:(0,C.__)("Heading"),h1:(0,C.__)("H1"),h2:(0,C.__)("H2"),h3:(0,C.__)("H3"),h4:(0,C.__)("H4"),h5:(0,C.__)("H5"),h6:(0,C.__)("H6"),"settings.color":(0,C.__)("Color"),"settings.typography":(0,C.__)("Typography"),"styles.color":(0,C.__)("Colors"),"styles.spacing":(0,C.__)("Spacing"),"styles.background":(0,C.__)("Background"),"styles.typography":(0,C.__)("Typography")},gR=function(e,t){var n,o,r=0;function i(){var i,s,l=n,a=arguments.length;e:for(;l;){if(l.args.length===arguments.length){for(s=0;s<a;s++)if(l.args[s]!==arguments[s]){l=l.next;continue e}return l!==n&&(l===o&&(o=l.prev),l.prev.next=l.next,l.next&&(l.next.prev=l.prev),l.next=n,l.prev=null,n.prev=l,n=l),l.val}l=l.next}for(i=new Array(a),s=0;s<a;s++)i[s]=arguments[s];return l={args:i,val:e.apply(null,i)},n?(n.prev=l,l.next=n):o=l,r===t.maxSize?(o=o.prev).next=null:r++,n=l,l.val}return t=t||{},i.clear=function(){n=null,o=null,r=0},i}((()=>(0,l.getBlockTypes)().reduce(((e,{name:t,title:n})=>(e[t]=n,e)),{}))),mR=e=>null!==e&&"object"==typeof e;function fR(e,t,n=""){if(!mR(e)&&!mR(t))return e!==t?n.split(".").slice(0,2).join("."):void 0;e=mR(e)?e:{},t=mR(t)?t:{};const o=new Set([...Object.keys(e),...Object.keys(t)]);let r=[];for(const i of o){const o=n?n+"."+i:i,s=fR(e[i],t[i],o);s&&(r=r.concat(s))}return r}function bR(e,t){const n=JSON.stringify({next:e,previous:t});if(dR.has(n))return dR.get(n);const o=fR({styles:{background:e?.styles?.background,color:e?.styles?.color,typography:e?.styles?.typography,spacing:e?.styles?.spacing},blocks:e?.styles?.blocks,elements:e?.styles?.elements,settings:e?.settings},{styles:{background:t?.styles?.background,color:t?.styles?.color,typography:t?.styles?.typography,spacing:t?.styles?.spacing},blocks:t?.styles?.blocks,elements:t?.styles?.elements,settings:t?.settings});if(!o.length)return dR.set(n,pR),pR;const r=[...new Set(o)].reduce(((e,t)=>{const n=function(e){if(hR[e])return hR[e];const t=e.split(".");if("blocks"===t?.[0]){const e=gR()?.[t[1]];return e||t[1]}return"elements"===t?.[0]?hR[t[1]]||t[1]:void 0}(t);return n&&e.push([t.split(".")[0],n]),e}),[]);return dR.set(n,r),r}function kR(e,t,n={}){let o=bR(e,t);const r=o.length,{maxResults:i}=n;return r?(i&&r>i&&(o=o.slice(0,i)),Object.entries(o.reduce(((e,t)=>{const n=e[t[0]]||[];return n.includes(t[1])||(e[t[0]]=[...n,t[1]]),e}),{})).map((([e,t])=>{const n=t.length,o=t.join((0,C.__)(", "));switch(e){case"blocks":return(0,C.sprintf)((0,C._n)("%s block.","%s blocks.",n),o);case"elements":return(0,C.sprintf)((0,C._n)("%s element.","%s elements.",n),o);case"settings":return(0,C.sprintf)((0,C.__)("%s settings."),o);case"styles":return(0,C.sprintf)((0,C.__)("%s styles."),o);default:return(0,C.sprintf)((0,C.__)("%s."),o)}}))):pR}function vR(e,t,n){if(null==e||!1===e)return;if(Array.isArray(e))return _R(e,t,n);switch(typeof e){case"string":case"number":return}const{type:o,props:r}=e;switch(o){case a.StrictMode:case a.Fragment:return _R(r.children,t,n);case a.RawHTML:return;case Zx.Content:return xR(t,n);case jM:return void t.push(r.value)}switch(typeof o){case"string":return void 0!==r.children?_R(r.children,t,n):void 0;case"function":return vR(o.prototype&&"function"==typeof o.prototype.render?new o(r).render():o(r),t,n)}}function _R(e,...t){e=Array.isArray(e)?e:[e];for(let n=0;n<e.length;n++)vR(e[n],...t)}function xR(e,t){for(let n=0;n<t.length;n++){const{name:o,attributes:r,innerBlocks:i}=t[n];vR((0,l.getSaveElement)(o,r,(0,$.jsx)(Zx.Content,{})),e,i)}}const yR=[{value:"fill",label:(0,C._x)("Fill","Scale option for dimensions control"),help:(0,C.__)("Fill the space by stretching the content.")},{value:"contain",label:(0,C._x)("Contain","Scale option for dimensions control"),help:(0,C.__)("Fit the content to the space without clipping.")},{value:"cover",label:(0,C._x)("Cover","Scale option for dimensions control"),help:(0,C.__)("Fill the space by clipping what doesn't fit.")},{value:"none",label:(0,C._x)("None","Scale option for dimensions control"),help:(0,C.__)("Do not adjust the sizing of the content. Content that is too large will be clipped, and content that is too small will have additional padding.")},{value:"scale-down",label:(0,C._x)("Scale down","Scale option for dimensions control"),help:(0,C.__)("Scale down the content to fit the space if it is too big. Content that is too small will have additional padding.")}];function SR({panelId:e,value:t,onChange:n,options:o=yR,defaultValue:r=yR[0].value,isShownByDefault:i=!0}){const s=null!=t?t:"fill",l=(0,a.useMemo)((()=>o.reduce(((e,t)=>(e[t.value]=t.help,e)),{})),[o]);return(0,$.jsx)(os.__experimentalToolsPanelItem,{label:(0,C.__)("Scale"),isShownByDefault:i,hasValue:()=>s!==r,onDeselect:()=>n(r),panelId:e,children:(0,$.jsx)(os.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,label:(0,C.__)("Scale"),isBlock:!0,help:l[s],value:s,onChange:n,size:"__unstable-large",children:o.map((e=>(0,$.jsx)(os.__experimentalToggleGroupControlOption,{...e},e.value)))})})}function wR(){return wR=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},wR.apply(this,arguments)}function CR(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var BR=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,IR=CR((function(e){return BR.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}));var jR=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){0}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}(),ER=Math.abs,TR=String.fromCharCode,MR=Object.assign;function PR(e){return e.trim()}function RR(e,t,n){return e.replace(t,n)}function NR(e,t){return e.indexOf(t)}function LR(e,t){return 0|e.charCodeAt(t)}function AR(e,t,n){return e.slice(t,n)}function DR(e){return e.length}function OR(e){return e.length}function zR(e,t){return t.push(e),e}var VR=1,FR=1,HR=0,GR=0,$R=0,UR="";function WR(e,t,n,o,r,i,s){return{value:e,root:t,parent:n,type:o,props:r,children:i,line:VR,column:FR,length:s,return:""}}function KR(e,t){return MR(WR("",null,null,"",null,null,0),e,{length:-e.length},t)}function ZR(){return $R=GR>0?LR(UR,--GR):0,FR--,10===$R&&(FR=1,VR--),$R}function qR(){return $R=GR<HR?LR(UR,GR++):0,FR++,10===$R&&(FR=1,VR++),$R}function YR(){return LR(UR,GR)}function XR(){return GR}function QR(e,t){return AR(UR,e,t)}function JR(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function eN(e){return VR=FR=1,HR=DR(UR=e),GR=0,[]}function tN(e){return UR="",e}function nN(e){return PR(QR(GR-1,iN(91===e?e+2:40===e?e+1:e)))}function oN(e){for(;($R=YR())&&$R<33;)qR();return JR(e)>2||JR($R)>3?"":" "}function rN(e,t){for(;--t&&qR()&&!($R<48||$R>102||$R>57&&$R<65||$R>70&&$R<97););return QR(e,XR()+(t<6&&32==YR()&&32==qR()))}function iN(e){for(;qR();)switch($R){case e:return GR;case 34:case 39:34!==e&&39!==e&&iN($R);break;case 40:41===e&&iN(e);break;case 92:qR()}return GR}function sN(e,t){for(;qR()&&e+$R!==57&&(e+$R!==84||47!==YR()););return"/*"+QR(t,GR-1)+"*"+TR(47===e?e:qR())}function lN(e){for(;!JR(YR());)qR();return QR(e,GR)}var aN="-ms-",cN="-moz-",uN="-webkit-",dN="comm",pN="rule",hN="decl",gN="@keyframes";function mN(e,t){for(var n="",o=OR(e),r=0;r<o;r++)n+=t(e[r],r,e,t)||"";return n}function fN(e,t,n,o){switch(e.type){case"@import":case hN:return e.return=e.return||e.value;case dN:return"";case gN:return e.return=e.value+"{"+mN(e.children,o)+"}";case pN:e.value=e.props.join(",")}return DR(n=mN(e.children,o))?e.return=e.value+"{"+n+"}":""}function bN(e){return tN(kN("",null,null,null,[""],e=eN(e),0,[0],e))}function kN(e,t,n,o,r,i,s,l,a){for(var c=0,u=0,d=s,p=0,h=0,g=0,m=1,f=1,b=1,k=0,v="",_=r,x=i,y=o,S=v;f;)switch(g=k,k=qR()){case 40:if(108!=g&&58==LR(S,d-1)){-1!=NR(S+=RR(nN(k),"&","&\f"),"&\f")&&(b=-1);break}case 34:case 39:case 91:S+=nN(k);break;case 9:case 10:case 13:case 32:S+=oN(g);break;case 92:S+=rN(XR()-1,7);continue;case 47:switch(YR()){case 42:case 47:zR(_N(sN(qR(),XR()),t,n),a);break;default:S+="/"}break;case 123*m:l[c++]=DR(S)*b;case 125*m:case 59:case 0:switch(k){case 0:case 125:f=0;case 59+u:h>0&&DR(S)-d&&zR(h>32?xN(S+";",o,n,d-1):xN(RR(S," ","")+";",o,n,d-2),a);break;case 59:S+=";";default:if(zR(y=vN(S,t,n,c,u,r,l,v,_=[],x=[],d),i),123===k)if(0===u)kN(S,t,y,y,_,i,d,l,x);else switch(99===p&&110===LR(S,3)?100:p){case 100:case 109:case 115:kN(e,y,y,o&&zR(vN(e,y,y,0,0,r,l,v,r,_=[],d),x),r,x,d,l,o?_:x);break;default:kN(S,y,y,y,[""],x,0,l,x)}}c=u=h=0,m=b=1,v=S="",d=s;break;case 58:d=1+DR(S),h=g;default:if(m<1)if(123==k)--m;else if(125==k&&0==m++&&125==ZR())continue;switch(S+=TR(k),k*m){case 38:b=u>0?1:(S+="\f",-1);break;case 44:l[c++]=(DR(S)-1)*b,b=1;break;case 64:45===YR()&&(S+=nN(qR())),p=YR(),u=d=DR(v=S+=lN(XR())),k++;break;case 45:45===g&&2==DR(S)&&(m=0)}}return i}function vN(e,t,n,o,r,i,s,l,a,c,u){for(var d=r-1,p=0===r?i:[""],h=OR(p),g=0,m=0,f=0;g<o;++g)for(var b=0,k=AR(e,d+1,d=ER(m=s[g])),v=e;b<h;++b)(v=PR(m>0?p[b]+" "+k:RR(k,/&\f/g,p[b])))&&(a[f++]=v);return WR(e,t,n,0===r?pN:l,a,c,u)}function _N(e,t,n){return WR(e,t,n,dN,TR($R),AR(e,2,-2),0)}function xN(e,t,n,o){return WR(e,t,n,hN,AR(e,0,o),AR(e,o+1,-1),o)}var yN=function(e,t,n){for(var o=0,r=0;o=r,r=YR(),38===o&&12===r&&(t[n]=1),!JR(r);)qR();return QR(e,GR)},SN=function(e,t){return tN(function(e,t){var n=-1,o=44;do{switch(JR(o)){case 0:38===o&&12===YR()&&(t[n]=1),e[n]+=yN(GR-1,t,n);break;case 2:e[n]+=nN(o);break;case 4:if(44===o){e[++n]=58===YR()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=TR(o)}}while(o=qR());return e}(eN(e),t))},wN=new WeakMap,CN=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,o=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||wN.get(n))&&!o){wN.set(e,!0);for(var r=[],i=SN(t,r),s=n.props,l=0,a=0;l<i.length;l++)for(var c=0;c<s.length;c++,a++)e.props[a]=r[l]?i[l].replace(/&\f/g,s[c]):s[c]+" "+i[l]}}},BN=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function IN(e,t){switch(function(e,t){return 45^LR(e,0)?(((t<<2^LR(e,0))<<2^LR(e,1))<<2^LR(e,2))<<2^LR(e,3):0}(e,t)){case 5103:return uN+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return uN+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return uN+e+cN+e+aN+e+e;case 6828:case 4268:return uN+e+aN+e+e;case 6165:return uN+e+aN+"flex-"+e+e;case 5187:return uN+e+RR(e,/(\w+).+(:[^]+)/,uN+"box-$1$2"+aN+"flex-$1$2")+e;case 5443:return uN+e+aN+"flex-item-"+RR(e,/flex-|-self/,"")+e;case 4675:return uN+e+aN+"flex-line-pack"+RR(e,/align-content|flex-|-self/,"")+e;case 5548:return uN+e+aN+RR(e,"shrink","negative")+e;case 5292:return uN+e+aN+RR(e,"basis","preferred-size")+e;case 6060:return uN+"box-"+RR(e,"-grow","")+uN+e+aN+RR(e,"grow","positive")+e;case 4554:return uN+RR(e,/([^-])(transform)/g,"$1"+uN+"$2")+e;case 6187:return RR(RR(RR(e,/(zoom-|grab)/,uN+"$1"),/(image-set)/,uN+"$1"),e,"")+e;case 5495:case 3959:return RR(e,/(image-set\([^]*)/,uN+"$1$`$1");case 4968:return RR(RR(e,/(.+:)(flex-)?(.*)/,uN+"box-pack:$3"+aN+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+uN+e+e;case 4095:case 3583:case 4068:case 2532:return RR(e,/(.+)-inline(.+)/,uN+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(DR(e)-1-t>6)switch(LR(e,t+1)){case 109:if(45!==LR(e,t+4))break;case 102:return RR(e,/(.+:)(.+)-([^]+)/,"$1"+uN+"$2-$3$1"+cN+(108==LR(e,t+3)?"$3":"$2-$3"))+e;case 115:return~NR(e,"stretch")?IN(RR(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==LR(e,t+1))break;case 6444:switch(LR(e,DR(e)-3-(~NR(e,"!important")&&10))){case 107:return RR(e,":",":"+uN)+e;case 101:return RR(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+uN+(45===LR(e,14)?"inline-":"")+"box$3$1"+uN+"$2$3$1"+aN+"$2box$3")+e}break;case 5936:switch(LR(e,t+11)){case 114:return uN+e+aN+RR(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return uN+e+aN+RR(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return uN+e+aN+RR(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return uN+e+aN+e+e}return e}var jN=[function(e,t,n,o){if(e.length>-1&&!e.return)switch(e.type){case hN:e.return=IN(e.value,e.length);break;case gN:return mN([KR(e,{value:RR(e.value,"@","@"+uN)})],o);case pN:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return mN([KR(e,{props:[RR(t,/:(read-\w+)/,":-moz-$1")]})],o);case"::placeholder":return mN([KR(e,{props:[RR(t,/:(plac\w+)/,":"+uN+"input-$1")]}),KR(e,{props:[RR(t,/:(plac\w+)/,":-moz-$1")]}),KR(e,{props:[RR(t,/:(plac\w+)/,aN+"input-$1")]})],o)}return""}))}}];const EN=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var o=e.stylisPlugins||jN;var r,i,s={},l=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)s[t[n]]=!0;l.push(e)}));var a,c,u,d,p=[fN,(d=function(e){a.insert(e)},function(e){e.root||(e=e.return)&&d(e)})],h=(c=[CN,BN].concat(o,p),u=OR(c),function(e,t,n,o){for(var r="",i=0;i<u;i++)r+=c[i](e,t,n,o)||"";return r});i=function(e,t,n,o){a=n,function(e){mN(bN(e),h)}(e?e+"{"+t.styles+"}":t.styles),o&&(g.inserted[t.name]=!0)};var g={key:t,sheet:new jR({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:s,registered:{},insert:i};return g.sheet.hydrate(l),g};const TN=function(e){for(var t,n=0,o=0,r=e.length;r>=4;++o,r-=4)t=1540483477*(65535&(t=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(r){case 3:n^=(255&e.charCodeAt(o+2))<<16;case 2:n^=(255&e.charCodeAt(o+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(o)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)};const MN={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var PN=/[A-Z]|^ms/g,RN=/_EMO_([^_]+?)_([^]*?)_EMO_/g,NN=function(e){return 45===e.charCodeAt(1)},LN=function(e){return null!=e&&"boolean"!=typeof e},AN=CR((function(e){return NN(e)?e:e.replace(PN,"-$&").toLowerCase()})),DN=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(RN,(function(e,t,n){return zN={name:t,styles:n,next:zN},t}))}return 1===MN[e]||NN(e)||"number"!=typeof t||0===t?t:t+"px"};function ON(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return zN={name:n.name,styles:n.styles,next:zN},n.name;if(void 0!==n.styles){var o=n.next;if(void 0!==o)for(;void 0!==o;)zN={name:o.name,styles:o.styles,next:zN},o=o.next;return n.styles+";"}return function(e,t,n){var o="";if(Array.isArray(n))for(var r=0;r<n.length;r++)o+=ON(e,t,n[r])+";";else for(var i in n){var s=n[i];if("object"!=typeof s)null!=t&&void 0!==t[s]?o+=i+"{"+t[s]+"}":LN(s)&&(o+=AN(i)+":"+DN(i,s)+";");else if(!Array.isArray(s)||"string"!=typeof s[0]||null!=t&&void 0!==t[s[0]]){var l=ON(e,t,s);switch(i){case"animation":case"animationName":o+=AN(i)+":"+l+";";break;default:o+=i+"{"+l+"}"}}else for(var a=0;a<s.length;a++)LN(s[a])&&(o+=AN(i)+":"+DN(i,s[a])+";")}return o}(e,t,n);case"function":if(void 0!==e){var r=zN,i=n(e);return zN=r,ON(e,t,i)}}if(null==t)return n;var s=t[n];return void 0!==s?s:n}var zN,VN=/label:\s*([^\s;\n{]+)\s*(;|$)/g;var FN=!!Pa.useInsertionEffect&&Pa.useInsertionEffect,HN=FN||function(e){return e()},GN=(0,Pa.createContext)("undefined"!=typeof HTMLElement?EN({key:"css"}):null);GN.Provider;var $N=function(e){return(0,Pa.forwardRef)((function(t,n){var o=(0,Pa.useContext)(GN);return e(t,o,n)}))},UN=(0,Pa.createContext)({});var WN=function(e,t,n){var o=e.key+"-"+t.name;!1===n&&void 0===e.registered[o]&&(e.registered[o]=t.styles)},KN=IR,ZN=function(e){return"theme"!==e},qN=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?KN:ZN},YN=function(e,t,n){var o;if(t){var r=t.shouldForwardProp;o=e.__emotion_forwardProp&&r?function(t){return e.__emotion_forwardProp(t)&&r(t)}:r}return"function"!=typeof o&&n&&(o=e.__emotion_forwardProp),o},XN=function(e){var t=e.cache,n=e.serialized,o=e.isStringTag;WN(t,n,o);HN((function(){return function(e,t,n){WN(e,t,n);var o=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var r=t;do{e.insert(t===r?"."+o:"",r,e.sheet,!0),r=r.next}while(void 0!==r)}}(t,n,o)}));return null};const QN=function e(t,n){var o,r,i=t.__emotion_real===t,s=i&&t.__emotion_base||t;void 0!==n&&(o=n.label,r=n.target);var l=YN(t,n,i),a=l||qN(s),c=!a("as");return function(){var u=arguments,d=i&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==o&&d.push("label:"+o+";"),null==u[0]||void 0===u[0].raw)d.push.apply(d,u);else{0,d.push(u[0][0]);for(var p=u.length,h=1;h<p;h++)d.push(u[h],u[0][h])}var g=$N((function(e,t,n){var o=c&&e.as||s,i="",u=[],p=e;if(null==e.theme){for(var h in p={},e)p[h]=e[h];p.theme=(0,Pa.useContext)(UN)}"string"==typeof e.className?i=function(e,t,n){var o="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):o+=n+" "})),o}(t.registered,u,e.className):null!=e.className&&(i=e.className+" ");var g=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var o=!0,r="";zN=void 0;var i=e[0];null==i||void 0===i.raw?(o=!1,r+=ON(n,t,i)):r+=i[0];for(var s=1;s<e.length;s++)r+=ON(n,t,e[s]),o&&(r+=i[s]);VN.lastIndex=0;for(var l,a="";null!==(l=VN.exec(r));)a+="-"+l[1];return{name:TN(r)+a,styles:r,next:zN}}(d.concat(u),t.registered,p);i+=t.key+"-"+g.name,void 0!==r&&(i+=" "+r);var m=c&&void 0===l?qN(o):a,f={};for(var b in e)c&&"as"===b||m(b)&&(f[b]=e[b]);return f.className=i,f.ref=n,(0,Pa.createElement)(Pa.Fragment,null,(0,Pa.createElement)(XN,{cache:t,serialized:g,isStringTag:"string"==typeof o}),(0,Pa.createElement)(o,f))}));return g.displayName=void 0!==o?o:"Styled("+("string"==typeof s?s:s.displayName||s.name||"Component")+")",g.defaultProps=t.defaultProps,g.__emotion_real=g,g.__emotion_base=s,g.__emotion_styles=d,g.__emotion_forwardProp=l,Object.defineProperty(g,"toString",{value:function(){return"."+r}}),g.withComponent=function(t,o){return e(t,wR({},n,o,{shouldForwardProp:YN(g,o,!0)})).apply(void 0,d)},g}};const JN=QN(os.__experimentalToolsPanelItem,{target:"ef8pe3d0"})({name:"957xgf",styles:"grid-column:span 1"});function eL({panelId:e,value:t={},onChange:n=(()=>{}),units:o,isShownByDefault:r=!0}){var i,s;const l="auto"===t.width?"":null!==(i=t.width)&&void 0!==i?i:"",a="auto"===t.height?"":null!==(s=t.height)&&void 0!==s?s:"",c=e=>o=>{const r={...t};o?r[e]=o:delete r[e],n(r)};return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(JN,{label:(0,C.__)("Width"),isShownByDefault:r,hasValue:()=>""!==l,onDeselect:c("width"),panelId:e,children:(0,$.jsx)(os.__experimentalUnitControl,{label:(0,C.__)("Width"),placeholder:(0,C.__)("Auto"),labelPosition:"top",units:o,min:0,value:l,onChange:c("width"),size:"__unstable-large"})}),(0,$.jsx)(JN,{label:(0,C.__)("Height"),isShownByDefault:r,hasValue:()=>""!==a,onDeselect:c("height"),panelId:e,children:(0,$.jsx)(os.__experimentalUnitControl,{label:(0,C.__)("Height"),placeholder:(0,C.__)("Auto"),labelPosition:"top",units:o,min:0,value:a,onChange:c("height"),size:"__unstable-large"})})]})}const tL=function({panelId:e,value:t={},onChange:n=(()=>{}),aspectRatioOptions:o,defaultAspectRatio:r="auto",scaleOptions:i,defaultScale:s="fill",unitsOptions:l,tools:c=["aspectRatio","widthHeight","scale"]}){const u=void 0===t.width||"auto"===t.width?null:t.width,d=void 0===t.height||"auto"===t.height?null:t.height,p=void 0===t.aspectRatio||"auto"===t.aspectRatio?null:t.aspectRatio,h=void 0===t.scale||"fill"===t.scale?null:t.scale,[g,m]=(0,a.useState)(h),[f,b]=(0,a.useState)(p),k=u&&d?"custom":f,v=p||u&&d;return(0,$.jsxs)($.Fragment,{children:[c.includes("aspectRatio")&&(0,$.jsx)(Sg,{panelId:e,options:o,defaultValue:r,value:k,onChange:e=>{const o={...t};b(e="auto"===e?null:e),e?o.aspectRatio=e:delete o.aspectRatio,e?g?o.scale=g:(o.scale=s,m(s)):delete o.scale,"custom"!==e&&u&&d&&delete o.height,n(o)}}),c.includes("widthHeight")&&(0,$.jsx)(eL,{panelId:e,units:l,value:{width:u,height:d},onChange:({width:e,height:o})=>{const r={...t};o="auto"===o?null:o,(e="auto"===e?null:e)?r.width=e:delete r.width,o?r.height=o:delete r.height,e&&o?delete r.aspectRatio:f&&(r.aspectRatio=f),f||!!e==!!o?g?r.scale=g:(r.scale=s,m(s)):delete r.scale,n(r)}}),c.includes("scale")&&v&&(0,$.jsx)(SR,{panelId:e,options:i,defaultValue:s,value:g,onChange:e=>{const o={...t};m(e="fill"===e?null:e),e?o.scale=e:delete o.scale,n(o)}})]})},nL=[{label:(0,C._x)("Thumbnail","Image size option for resolution control"),value:"thumbnail"},{label:(0,C._x)("Medium","Image size option for resolution control"),value:"medium"},{label:(0,C._x)("Large","Image size option for resolution control"),value:"large"},{label:(0,C._x)("Full Size","Image size option for resolution control"),value:"full"}];const oL={};ee(oL,{...s,ExperimentalBlockCanvas:$j,ExperimentalBlockEditorProvider:Jf,getDuotoneFilter:jm,getRichTextValues:function(e=[]){l.__unstableGetBlockProps.skipFilters=!0;const t=[];return xR(t,e),l.__unstableGetBlockProps.skipFilters=!1,t.map((e=>e instanceof W.RichTextData?e:W.RichTextData.fromHTMLString(e)))},PrivateQuickInserter:Qw,extractWords:ew,getNormalizedSearchTerms:nw,normalizeString:tw,PrivateListView:jE,ResizableBoxPopover:function({clientId:e,resizableBoxProps:t,...n}){return(0,$.jsx)(tm,{clientId:e,__unstablePopoverSlot:"block-toolbar",...n,children:(0,$.jsx)(os.ResizableBox,{...t})})},BlockInfo:MP,useHasBlockToolbar:xj,cleanEmptyObject:qi,BlockQuickNavigation:PP,LayoutStyle:function({layout:e={},css:t,...n}){const o=Bl(e.type),[r]=ci("spacing.blockGap"),i=null!==r;if(o){if(t)return(0,$.jsx)("style",{children:t});const r=o.getLayoutStyle?.({hasBlockGapSupport:i,layout:e,...n});if(r)return(0,$.jsx)("style",{children:r})}return null},BlockRemovalWarningModal:function({rules:e}){const{clientIds:t,selectPrevious:n,message:o}=(0,c.useSelect)((e=>te(e(li)).getRemovalPromptData())),{clearBlockRemovalPrompt:r,setBlockRemovalRules:i,privateRemoveBlocks:s}=te((0,c.useDispatch)(li));if((0,a.useEffect)((()=>(i(e),()=>{i()})),[e,i]),!o)return;return(0,$.jsxs)(os.Modal,{title:(0,C.__)("Be careful!"),onRequestClose:r,size:"medium",children:[(0,$.jsx)("p",{children:o}),(0,$.jsxs)(os.__experimentalHStack,{justify:"right",children:[(0,$.jsx)(os.Button,{variant:"tertiary",onClick:r,__next40pxDefaultSize:!0,children:(0,C.__)("Cancel")}),(0,$.jsx)(os.Button,{variant:"primary",onClick:()=>{s(t,n,!0),r()},__next40pxDefaultSize:!0,children:(0,C.__)("Delete")})]})]})},useLayoutClasses:Ef,useLayoutStyles:function(e={},t,n){const{layout:o={},style:r={}}=e,i=o?.inherit||o?.contentSize||o?.wideSize?{...o,type:"constrained"}:o||{},s=Bl(i?.type||"default"),[l]=ci("spacing.blockGap"),a=null!==l;return s?.getLayoutStyle?.({blockName:t,selector:n,layout:o,style:r,hasBlockGapSupport:a})},DimensionsTool:tL,ResolutionTool:function({panelId:e,value:t,onChange:n,options:o=nL,defaultValue:r=nL[0].value,isShownByDefault:i=!0}){const s=null!=t?t:r;return(0,$.jsx)(os.__experimentalToolsPanelItem,{hasValue:()=>s!==r,label:(0,C.__)("Resolution"),onDeselect:()=>n(r),isShownByDefault:i,panelId:e,children:(0,$.jsx)(os.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,C.__)("Resolution"),value:s,options:o,onChange:n,help:(0,C.__)("Select the size of the source image."),size:"__unstable-large"})})},TabbedSidebar:Kw,TextAlignmentControl:Kp,usesContextKey:wM,useFlashEditableBlocks:nx,useZoomOutModeExit:J_,useZoomOut:Zw,globalStylesDataKey:Z,globalStylesLinksDataKey:q,selectBlockPatternsKey:Y,requiresWrapperOnCopy:Sy,PrivateRichText:LM,PrivateInserterLibrary:GP,reusableBlocksSelectKey:X,PrivateBlockPopover:Qg,PrivatePublishDateTimePicker:oR,useSpacingSizes:hg,useBlockDisplayTitle:bB,__unstableBlockStyleVariationOverridesWithConfig:function({config:e}){const{getBlockStyles:t,overrides:n}=(0,c.useSelect)((e=>({getBlockStyles:e(l.store).getBlockStyles,overrides:te(e(li)).getStyleOverrides()})),[]),{getBlockName:o}=(0,c.useSelect)(li),r=(0,a.useMemo)((()=>{if(!n?.length)return;const r=[],i=[];for(const[,s]of n)if(s?.variation&&s?.clientId&&!i.includes(s.clientId)){const n=o(s.clientId),a=e?.styles?.blocks?.[n]?.variations?.[s.variation];if(a){const o={settings:e?.settings,styles:{blocks:{[n]:{variations:{[`${s.variation}-${s.clientId}`]:a}}}}},c=bf((0,l.getBlockTypes)(),t,s.clientId),u=mf(o,c,!1,!0,!0,!0,{blockGap:!1,blockStyles:!0,layoutStyles:!1,marginReset:!1,presets:!1,rootPadding:!1,variationStyles:!0});r.push({id:`${s.variation}-${s.clientId}`,css:u,__unstableType:"variation",variation:s.variation,clientId:s.clientId}),i.push(s.clientId)}}return r}),[e,n,t,o]);if(r&&r.length)return(0,$.jsx)($.Fragment,{children:r.map((e=>(0,$.jsx)(Sf,{override:e},e.id)))})},setBackgroundStyleDefaults:eu,sectionRootClientIdKey:Q})})(),(window.wp=window.wp||{}).blockEditor=o})();
\ No newline at end of file
+ */,e.exports=function(e,t){if(!r.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,i=n in document;if(!i){var s=document.createElement("div");s.setAttribute(n,"return;"),i="function"==typeof s[n]}return!i&&o&&"wheel"===e&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}},7191:(e,t,n)=>{"use strict";var o=n(2213),r=n(1087);function i(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}}i.getEventType=function(){return o.firefox()?"DOMMouseScroll":r("wheel")?"wheel":"mousewheel"},e.exports=i},2775:e=>{var t=String,n=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t,blackBright:t,redBright:t,greenBright:t,yellowBright:t,blueBright:t,magentaBright:t,cyanBright:t,whiteBright:t,bgBlackBright:t,bgRedBright:t,bgGreenBright:t,bgYellowBright:t,bgBlueBright:t,bgMagentaBright:t,bgCyanBright:t,bgWhiteBright:t}};e.exports=n(),e.exports.createColors=n},1443:e=>{function t(e,t){return t.some((t=>t instanceof RegExp?t.test(e):e.includes(t)))}e.exports=function(e){const n=e.prefix,o=/\s+$/.test(n)?n:`${n} `,r=e.ignoreFiles?[].concat(e.ignoreFiles):[],i=e.includeFiles?[].concat(e.includeFiles):[];return function(s){r.length&&s.source.input.file&&t(s.source.input.file,r)||i.length&&s.source.input.file&&!t(s.source.input.file,i)||s.walkRules((t=>{t.parent&&["keyframes","-webkit-keyframes","-moz-keyframes","-o-keyframes","-ms-keyframes"].includes(t.parent.name)||(t.selectors=t.selectors.map((r=>e.exclude&&function(e,t){return t.some((t=>t instanceof RegExp?t.test(e):e===t))}(r,e.exclude)?r:e.transform?e.transform(n,r,o+r,s.source.input.file,t):o+r)))}))}}},5404:(e,t,n)=>{const o=n(1544);e.exports=e=>{const t=Object.assign({skipHostRelativeUrls:!0},e);return{postcssPlugin:"rebaseUrl",Declaration(n){const r=o(n.value);let i=!1;r.walk((n=>{if("function"!==n.type||"url"!==n.value)return;const o=n.nodes[0].value,r=new URL(o,e.rootUrl);return r.pathname===o&&t.skipHostRelativeUrls||(n.nodes[0].value=r.toString(),i=!0),!1})),i&&(n.value=o.stringify(r))}}},e.exports.postcss=!0},1544:(e,t,n)=>{var o=n(8491),r=n(3815),i=n(4725);function s(e){return this instanceof s?(this.nodes=o(e),this):new s(e)}s.prototype.toString=function(){return Array.isArray(this.nodes)?i(this.nodes):""},s.prototype.walk=function(e,t){return r(this.nodes,e,t),this},s.unit=n(1524),s.walk=r,s.stringify=i,e.exports=s},8491:e=>{var t="(".charCodeAt(0),n=")".charCodeAt(0),o="'".charCodeAt(0),r='"'.charCodeAt(0),i="\\".charCodeAt(0),s="/".charCodeAt(0),l=",".charCodeAt(0),a=":".charCodeAt(0),c="*".charCodeAt(0),u="u".charCodeAt(0),d="U".charCodeAt(0),p="+".charCodeAt(0),h=/^[a-f0-9?-]+$/i;e.exports=function(e){for(var g,m,f,b,k,v,_,x,y,S=[],w=e,C=0,B=w.charCodeAt(C),I=w.length,j=[{nodes:S}],E=0,T="",M="",P="";C<I;)if(B<=32){g=C;do{g+=1,B=w.charCodeAt(g)}while(B<=32);b=w.slice(C,g),f=S[S.length-1],B===n&&E?P=b:f&&"div"===f.type?(f.after=b,f.sourceEndIndex+=b.length):B===l||B===a||B===s&&w.charCodeAt(g+1)!==c&&(!y||y&&"function"===y.type&&"calc"!==y.value)?M=b:S.push({type:"space",sourceIndex:C,sourceEndIndex:g,value:b}),C=g}else if(B===o||B===r){g=C,b={type:"string",sourceIndex:C,quote:m=B===o?"'":'"'};do{if(k=!1,~(g=w.indexOf(m,g+1)))for(v=g;w.charCodeAt(v-1)===i;)v-=1,k=!k;else g=(w+=m).length-1,b.unclosed=!0}while(k);b.value=w.slice(C+1,g),b.sourceEndIndex=b.unclosed?g:g+1,S.push(b),C=g+1,B=w.charCodeAt(C)}else if(B===s&&w.charCodeAt(C+1)===c)b={type:"comment",sourceIndex:C,sourceEndIndex:(g=w.indexOf("*/",C))+2},-1===g&&(b.unclosed=!0,g=w.length,b.sourceEndIndex=g),b.value=w.slice(C+2,g),S.push(b),C=g+2,B=w.charCodeAt(C);else if(B!==s&&B!==c||!y||"function"!==y.type||"calc"!==y.value)if(B===s||B===l||B===a)b=w[C],S.push({type:"div",sourceIndex:C-M.length,sourceEndIndex:C+b.length,value:b,before:M,after:""}),M="",C+=1,B=w.charCodeAt(C);else if(t===B){g=C;do{g+=1,B=w.charCodeAt(g)}while(B<=32);if(x=C,b={type:"function",sourceIndex:C-T.length,value:T,before:w.slice(x+1,g)},C=g,"url"===T&&B!==o&&B!==r){g-=1;do{if(k=!1,~(g=w.indexOf(")",g+1)))for(v=g;w.charCodeAt(v-1)===i;)v-=1,k=!k;else g=(w+=")").length-1,b.unclosed=!0}while(k);_=g;do{_-=1,B=w.charCodeAt(_)}while(B<=32);x<_?(b.nodes=C!==_+1?[{type:"word",sourceIndex:C,sourceEndIndex:_+1,value:w.slice(C,_+1)}]:[],b.unclosed&&_+1!==g?(b.after="",b.nodes.push({type:"space",sourceIndex:_+1,sourceEndIndex:g,value:w.slice(_+1,g)})):(b.after=w.slice(_+1,g),b.sourceEndIndex=g)):(b.after="",b.nodes=[]),C=g+1,b.sourceEndIndex=b.unclosed?g:C,B=w.charCodeAt(C),S.push(b)}else E+=1,b.after="",b.sourceEndIndex=C+1,S.push(b),j.push(b),S=b.nodes=[],y=b;T=""}else if(n===B&&E)C+=1,B=w.charCodeAt(C),y.after=P,y.sourceEndIndex+=P.length,P="",E-=1,j[j.length-1].sourceEndIndex=C,j.pop(),S=(y=j[E]).nodes;else{g=C;do{B===i&&(g+=1),g+=1,B=w.charCodeAt(g)}while(g<I&&!(B<=32||B===o||B===r||B===l||B===a||B===s||B===t||B===c&&y&&"function"===y.type&&"calc"===y.value||B===s&&"function"===y.type&&"calc"===y.value||B===n&&E));b=w.slice(C,g),t===B?T=b:u!==b.charCodeAt(0)&&d!==b.charCodeAt(0)||p!==b.charCodeAt(1)||!h.test(b.slice(2))?S.push({type:"word",sourceIndex:C,sourceEndIndex:g,value:b}):S.push({type:"unicode-range",sourceIndex:C,sourceEndIndex:g,value:b}),C=g}else b=w[C],S.push({type:"word",sourceIndex:C-M.length,sourceEndIndex:C+b.length,value:b}),C+=1,B=w.charCodeAt(C);for(C=j.length-1;C;C-=1)j[C].unclosed=!0,j[C].sourceEndIndex=w.length;return j[0].nodes}},4725:e=>{function t(e,t){var o,r,i=e.type,s=e.value;return t&&void 0!==(r=t(e))?r:"word"===i||"space"===i?s:"string"===i?(o=e.quote||"")+s+(e.unclosed?"":o):"comment"===i?"/*"+s+(e.unclosed?"":"*/"):"div"===i?(e.before||"")+s+(e.after||""):Array.isArray(e.nodes)?(o=n(e.nodes,t),"function"!==i?o:s+"("+(e.before||"")+o+(e.after||"")+(e.unclosed?"":")")):s}function n(e,n){var o,r;if(Array.isArray(e)){for(o="",r=e.length-1;~r;r-=1)o=t(e[r],n)+o;return o}return t(e,n)}e.exports=n},1524:e=>{var t="-".charCodeAt(0),n="+".charCodeAt(0),o=".".charCodeAt(0),r="e".charCodeAt(0),i="E".charCodeAt(0);e.exports=function(e){var s,l,a,c=0,u=e.length;if(0===u||!function(e){var r,i=e.charCodeAt(0);if(i===n||i===t){if((r=e.charCodeAt(1))>=48&&r<=57)return!0;var s=e.charCodeAt(2);return r===o&&s>=48&&s<=57}return i===o?(r=e.charCodeAt(1))>=48&&r<=57:i>=48&&i<=57}(e))return!1;for((s=e.charCodeAt(c))!==n&&s!==t||c++;c<u&&!((s=e.charCodeAt(c))<48||s>57);)c+=1;if(s=e.charCodeAt(c),l=e.charCodeAt(c+1),s===o&&l>=48&&l<=57)for(c+=2;c<u&&!((s=e.charCodeAt(c))<48||s>57);)c+=1;if(s=e.charCodeAt(c),l=e.charCodeAt(c+1),a=e.charCodeAt(c+2),(s===r||s===i)&&(l>=48&&l<=57||(l===n||l===t)&&a>=48&&a<=57))for(c+=l===n||l===t?3:2;c<u&&!((s=e.charCodeAt(c))<48||s>57);)c+=1;return{number:e.slice(0,c),unit:e.slice(c)}}},3815:e=>{e.exports=function e(t,n,o){var r,i,s,l;for(r=0,i=t.length;r<i;r+=1)s=t[r],o||(l=n(s,r,t)),!1!==l&&"function"===s.type&&Array.isArray(s.nodes)&&e(s.nodes,n,o),o&&n(s,r,t)}},1326:(e,t,n)=>{"use strict";let o=n(683);class r extends o{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}}e.exports=r,r.default=r,o.registerAtRule(r)},6589:(e,t,n)=>{"use strict";let o=n(7490);class r extends o{constructor(e){super(e),this.type="comment"}}e.exports=r,r.default=r},683:(e,t,n)=>{"use strict";let o,r,i,s,l=n(6589),a=n(1516),c=n(7490),{isClean:u,my:d}=n(1381);function p(e){return e.map((e=>(e.nodes&&(e.nodes=p(e.nodes)),delete e.source,e)))}function h(e){if(e[u]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)h(t)}class g extends c{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,n,o=this.getIterator();for(;this.indexes[o]<this.proxyOf.nodes.length&&(t=this.indexes[o],n=e(this.proxyOf.nodes[t],t),!1!==n);)this.indexes[o]+=1;return delete this.indexes[o],n}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...n)=>e[t](...n.map((e=>"function"==typeof e?(t,n)=>e(t.toProxy(),n):e))):"every"===t||"some"===t?n=>e[t](((e,...t)=>n(e.toProxy(),...t))):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map((e=>e.toProxy())):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,n)=>(e[t]===n||(e[t]=n,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let n,o=this.index(e),r=this.normalize(t,this.proxyOf.nodes[o]).reverse();o=this.index(e);for(let e of r)this.proxyOf.nodes.splice(o+1,0,e);for(let e in this.indexes)n=this.indexes[e],o<n&&(this.indexes[e]=n+r.length);return this.markDirty(),this}insertBefore(e,t){let n,o=this.index(e),r=0===o&&"prepend",i=this.normalize(t,this.proxyOf.nodes[o],r).reverse();o=this.index(e);for(let e of i)this.proxyOf.nodes.splice(o,0,e);for(let e in this.indexes)n=this.indexes[e],o<=n&&(this.indexes[e]=n+i.length);return this.markDirty(),this}normalize(e,t){if("string"==typeof e)e=p(r(e).nodes);else if(void 0===e)e=[];else if(Array.isArray(e)){e=e.slice(0);for(let t of e)t.parent&&t.parent.removeChild(t,"ignore")}else if("root"===e.type&&"document"!==this.type){e=e.nodes.slice(0);for(let t of e)t.parent&&t.parent.removeChild(t,"ignore")}else if(e.type)e=[e];else if(e.prop){if(void 0===e.value)throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new a(e)]}else if(e.selector||e.selectors)e=[new s(e)];else if(e.name)e=[new o(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new l(e)]}return e.map((e=>(e[d]||g.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[u]&&h(e),e.raws||(e.raws={}),void 0===e.raws.before&&t&&void 0!==t.raws.before&&(e.raws.before=t.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e)))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let n in this.indexes)t=this.indexes[n],t>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}replaceValues(e,t,n){return n||(n=t,t={}),this.walkDecls((o=>{t.props&&!t.props.includes(o.prop)||t.fast&&!o.value.includes(t.fast)||(o.value=o.value.replace(e,n))})),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each(((t,n)=>{let o;try{o=e(t,n)}catch(e){throw t.addToError(e)}return!1!==o&&t.walk&&(o=t.walk(e)),o}))}walkAtRules(e,t){return t?e instanceof RegExp?this.walk(((n,o)=>{if("atrule"===n.type&&e.test(n.name))return t(n,o)})):this.walk(((n,o)=>{if("atrule"===n.type&&n.name===e)return t(n,o)})):(t=e,this.walk(((e,n)=>{if("atrule"===e.type)return t(e,n)})))}walkComments(e){return this.walk(((t,n)=>{if("comment"===t.type)return e(t,n)}))}walkDecls(e,t){return t?e instanceof RegExp?this.walk(((n,o)=>{if("decl"===n.type&&e.test(n.prop))return t(n,o)})):this.walk(((n,o)=>{if("decl"===n.type&&n.prop===e)return t(n,o)})):(t=e,this.walk(((e,n)=>{if("decl"===e.type)return t(e,n)})))}walkRules(e,t){return t?e instanceof RegExp?this.walk(((n,o)=>{if("rule"===n.type&&e.test(n.selector))return t(n,o)})):this.walk(((n,o)=>{if("rule"===n.type&&n.selector===e)return t(n,o)})):(t=e,this.walk(((e,n)=>{if("rule"===e.type)return t(e,n)})))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}g.registerParse=e=>{r=e},g.registerRule=e=>{s=e},g.registerAtRule=e=>{o=e},g.registerRoot=e=>{i=e},e.exports=g,g.default=g,g.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,o.prototype):"rule"===e.type?Object.setPrototypeOf(e,s.prototype):"decl"===e.type?Object.setPrototypeOf(e,a.prototype):"comment"===e.type?Object.setPrototypeOf(e,l.prototype):"root"===e.type&&Object.setPrototypeOf(e,i.prototype),e[d]=!0,e.nodes&&e.nodes.forEach((e=>{g.rebuild(e)}))}},356:(e,t,n)=>{"use strict";let o=n(2775),r=n(9746);class i extends Error{constructor(e,t,n,o,r,s){super(e),this.name="CssSyntaxError",this.reason=e,r&&(this.file=r),o&&(this.source=o),s&&(this.plugin=s),void 0!==t&&void 0!==n&&("number"==typeof t?(this.line=t,this.column=n):(this.line=t.line,this.column=t.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,i)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=o.isColorSupported);let n=e=>e,i=e=>e,s=e=>e;if(e){let{bold:e,gray:t,red:l}=o.createColors(!0);i=t=>e(l(t)),n=e=>t(e),r&&(s=e=>r(e))}let l=t.split(/\r?\n/),a=Math.max(this.line-3,0),c=Math.min(this.line+2,l.length),u=String(c).length;return l.slice(a,c).map(((e,t)=>{let o=a+1+t,r=" "+(" "+o).slice(-u)+" | ";if(o===this.line){if(e.length>160){let t=20,o=Math.max(0,this.column-t),l=Math.max(this.column+t,this.endColumn+t),a=e.slice(o,l),c=n(r.replace(/\d/g," "))+e.slice(0,Math.min(this.column-1,t-1)).replace(/[^\t]/g," ");return i(">")+n(r)+s(a)+"\n "+c+i("^")}let t=n(r.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+n(r)+s(e)+"\n "+t+i("^")}return" "+n(r)+s(e)})).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}}e.exports=i,i.default=i},1516:(e,t,n)=>{"use strict";let o=n(7490);class r extends o{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}}e.exports=r,r.default=r},271:(e,t,n)=>{"use strict";let o,r,i=n(683);class s extends i{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new o(new r,this,e).stringify()}}s.registerLazyResult=e=>{o=e},s.registerProcessor=e=>{r=e},e.exports=s,s.default=s},8940:(e,t,n)=>{"use strict";let o=n(1326),r=n(6589),i=n(1516),s=n(5380),l=n(5696),a=n(9434),c=n(4092);function u(e,t){if(Array.isArray(e))return e.map((e=>u(e)));let{inputs:n,...d}=e;if(n){t=[];for(let e of n){let n={...e,__proto__:s.prototype};n.map&&(n.map={...n.map,__proto__:l.prototype}),t.push(n)}}if(d.nodes&&(d.nodes=e.nodes.map((e=>u(e,t)))),d.source){let{inputId:e,...n}=d.source;d.source=n,null!=e&&(d.source.input=t[e])}if("root"===d.type)return new a(d);if("decl"===d.type)return new i(d);if("rule"===d.type)return new c(d);if("comment"===d.type)return new r(d);if("atrule"===d.type)return new o(d);throw new Error("Unknown node type: "+e.type)}e.exports=u,u.default=u},5380:(e,t,n)=>{"use strict";let{nanoid:o}=n(5042),{isAbsolute:r,resolve:i}=n(197),{SourceMapConsumer:s,SourceMapGenerator:l}=n(1866),{fileURLToPath:a,pathToFileURL:c}=n(2739),u=n(356),d=n(5696),p=n(9746),h=Symbol("fromOffsetCache"),g=Boolean(s&&l),m=Boolean(i&&r);class f{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!m||/^\w+:\/\//.test(t.from)||r(t.from)?this.file=t.from:this.file=i(t.from)),m&&g){let e=new d(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+o(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,n,o={}){let r,i,s;if(t&&"object"==typeof t){let e=t,o=n;if("number"==typeof e.offset){let o=this.fromOffset(e.offset);t=o.line,n=o.col}else t=e.line,n=e.column;if("number"==typeof o.offset){let e=this.fromOffset(o.offset);i=e.line,r=e.col}else i=o.line,r=o.column}else if(!n){let e=this.fromOffset(t);t=e.line,n=e.col}let l=this.origin(t,n,i,r);return s=l?new u(e,void 0===l.endLine?l.line:{column:l.column,line:l.line},void 0===l.endLine?l.column:{column:l.endColumn,line:l.endLine},l.source,l.file,o.plugin):new u(e,void 0===i?t:{column:n,line:t},void 0===i?n:{column:r,line:i},this.css,this.file,o.plugin),s.input={column:n,endColumn:r,endLine:i,line:t,source:this.css},this.file&&(c&&(s.input.url=c(this.file).toString()),s.input.file=this.file),s}fromOffset(e){let t,n;if(this[h])n=this[h];else{let e=this.css.split("\n");n=new Array(e.length);let t=0;for(let o=0,r=e.length;o<r;o++)n[o]=t,t+=e[o].length+1;this[h]=n}t=n[n.length-1];let o=0;if(e>=t)o=n.length-1;else{let t,r=n.length-2;for(;o<r;)if(t=o+(r-o>>1),e<n[t])r=t-1;else{if(!(e>=n[t+1])){o=t;break}o=t+1}}return{col:e-n[o]+1,line:o+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:i(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,n,o){if(!this.map)return!1;let i,s,l=this.map.consumer(),u=l.originalPositionFor({column:t,line:e});if(!u.source)return!1;"number"==typeof n&&(i=l.originalPositionFor({column:o,line:n})),s=r(u.source)?c(u.source):new URL(u.source,this.map.consumer().sourceRoot||c(this.map.mapFile));let d={column:u.column,endColumn:i&&i.column,endLine:i&&i.line,line:u.line,url:s.toString()};if("file:"===s.protocol){if(!a)throw new Error("file: protocol is not available in this PostCSS build");d.file=a(s)}let p=l.sourceContentFor(u.source);return p&&(d.source=p),d}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}}e.exports=f,f.default=f,p&&p.registerInput&&p.registerInput(f)},448:(e,t,n)=>{"use strict";let o=n(683),r=n(271),i=n(1670),s=n(4295),l=n(9055),a=n(9434),c=n(633),{isClean:u,my:d}=n(1381);n(3122);const p={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},h={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},g={Once:!0,postcssPlugin:!0,prepare:!0},m=0;function f(e){return"object"==typeof e&&"function"==typeof e.then}function b(e){let t=!1,n=p[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,m,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,m,n+"Exit"]:[n,n+"Exit"]}function k(e){let t;return t="document"===e.type?["Document",m,"DocumentExit"]:"root"===e.type?["Root",m,"RootExit"]:b(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function v(e){return e[u]=!1,e.nodes&&e.nodes.forEach((e=>v(e))),e}let _={};class x{constructor(e,t,n){let r;if(this.stringified=!1,this.processed=!1,"object"!=typeof t||null===t||"root"!==t.type&&"document"!==t.type)if(t instanceof x||t instanceof l)r=v(t.root),t.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=t.map);else{let e=s;n.syntax&&(e=n.syntax.parse),n.parser&&(e=n.parser),e.parse&&(e=e.parse);try{r=e(t,n)}catch(e){this.processed=!0,this.error=e}r&&!r[d]&&o.rebuild(r)}else r=v(t);this.result=new l(e,r,n),this.helpers={..._,postcss:_,result:this.result},this.plugins=this.processor.plugins.map((e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e))}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let n=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin?n.postcssVersion:(e.plugin=n.postcssPlugin,e.setMessage())}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,n)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,n])};for(let t of this.plugins)if("object"==typeof t)for(let n in t){if(!h[n]&&/^[A-Z]/.test(n))throw new Error(`Unknown event ${n} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!g[n])if("object"==typeof t[n])for(let o in t[n])e(t,"*"===o?n:n+"-"+o.toLowerCase(),t[n][o]);else"function"==typeof t[n]&&e(t,n,t[n])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],n=this.runOnRoot(t);if(f(n))try{await n}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[u];){e[u]=!0;let t=[k(e)];for(;t.length>0;){let e=this.visitTick(t);if(f(e))try{await e}catch(e){let n=t[t.length-1].node;throw this.handleError(e,n)}}}if(this.listeners.OnceExit)for(let[t,n]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map((e=>n(e,this.helpers)));await Promise.all(t)}else await n(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map((t=>e.Once(t,this.helpers)));return f(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=c;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let n=new i(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){if(f(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[u];)e[u]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[n,o]of e){let e;this.result.lastPlugin=n;try{e=o(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(f(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:n,visitors:o}=t;if("root"!==n.type&&"document"!==n.type&&!n.parent)return void e.pop();if(o.length>0&&t.visitorIndex<o.length){let[e,r]=o[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===o.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return r(n.toProxy(),this.helpers)}catch(e){throw this.handleError(e,n)}}if(0!==t.iterator){let o,r=t.iterator;for(;o=n.nodes[n.indexes[r]];)if(n.indexes[r]+=1,!o[u])return o[u]=!0,void e.push(k(o));t.iterator=0,delete n.indexes[r]}let r=t.events;for(;t.eventIndex<r.length;){let e=r[t.eventIndex];if(t.eventIndex+=1,e===m)return void(n.nodes&&n.nodes.length&&(n[u]=!0,t.iterator=n.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[u]=!0;let t=b(e);for(let n of t)if(n===m)e.nodes&&e.each((e=>{e[u]||this.walkSync(e)}));else{let t=this.listeners[n];if(t&&this.visitSync(t,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}x.registerPostcss=e=>{_=e},e.exports=x,x.default=x,a.registerLazyResult(x),r.registerLazyResult(x)},7374:e=>{"use strict";let t={comma:e=>t.split(e,[","],!0),space:e=>t.split(e,[" ","\n","\t"]),split(e,t,n){let o=[],r="",i=!1,s=0,l=!1,a="",c=!1;for(let n of e)c?c=!1:"\\"===n?c=!0:l?n===a&&(l=!1):'"'===n||"'"===n?(l=!0,a=n):"("===n?s+=1:")"===n?s>0&&(s-=1):0===s&&t.includes(n)&&(i=!0),i?(""!==r&&o.push(r.trim()),r="",i=!1):r+=n;return(n||""!==r)&&o.push(r.trim()),o}};e.exports=t,t.default=t},1670:(e,t,n)=>{"use strict";let{dirname:o,relative:r,resolve:i,sep:s}=n(197),{SourceMapConsumer:l,SourceMapGenerator:a}=n(1866),{pathToFileURL:c}=n(2739),u=n(5380),d=Boolean(l&&a),p=Boolean(o&&i&&r&&s);e.exports=class{constructor(e,t,n,o){this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=o,this.originalCSS=o,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,n=this.toUrl(this.path(e.file)),r=e.root||o(e.file);!1===this.mapOpts.sourcesContent?(t=new l(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,n,this.toUrl(this.path(r)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&e.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),p&&d&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,(t=>{e+=t})),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=a.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new a({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new a({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,n=1,o=1,r="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((s,l,a)=>{if(this.css+=s,l&&"end"!==a&&(i.generated.line=n,i.generated.column=o-1,l.source&&l.source.start?(i.source=this.sourcePath(l),i.original.line=l.source.start.line,i.original.column=l.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),t=s.match(/\n/g),t?(n+=t.length,e=s.lastIndexOf("\n"),o=s.length-e):o+=s.length,l&&"start"!==a){let e=l.parent||{raws:{}};("decl"===l.type||"atrule"===l.type&&!l.nodes)&&l===e.last&&!e.raws.semicolon||(l.source&&l.source.end?(i.source=this.sourcePath(l),i.original.line=l.source.end.line,i.original.column=l.source.end.column-1,i.generated.line=n,i.generated.column=o-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=n,i.generated.column=o-1,this.map.addMapping(i)))}}))}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((e=>e.annotation)))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some((e=>e.inline)))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some((e=>e.withContent()))}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let n=this.opts.to?o(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(n=o(i(n,this.mapOpts.annotation)));let s=r(n,e);return this.memoizedPaths.set(e,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}}));else{let e=new u(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk((t=>{if(t.source){let n=t.source.input.from;if(n&&!e[n]){e[n]=!0;let o=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(o,t.source.input.css)}}}));else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(c){let t=c(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===s&&(e=e.replace(/\\/g,"/"));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}}},7661:(e,t,n)=>{"use strict";let o=n(1670),r=n(4295);const i=n(9055);let s=n(633);n(3122);class l{constructor(e,t,n){let r;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=n,this._map=void 0;let l=s;this.result=new i(this._processor,r,this._opts),this.result.css=t;let a=this;Object.defineProperty(this.result,"root",{get:()=>a.root});let c=new o(l,r,this._opts,t);if(c.isMap()){let[e,t]=c.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else c.clearAnnotation(),this.result.css=c.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=r;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}}e.exports=l,l.default=l},7490:(e,t,n)=>{"use strict";let o=n(356),r=n(346),i=n(633),{isClean:s,my:l}=n(1381);function a(e,t){let n=new e.constructor;for(let o in e){if(!Object.prototype.hasOwnProperty.call(e,o))continue;if("proxyCache"===o)continue;let r=e[o],i=typeof r;"parent"===o&&"object"===i?t&&(n[o]=t):"source"===o?n[o]=r:Array.isArray(r)?n[o]=r.map((e=>a(e,n))):("object"===i&&null!==r&&(r=a(r)),n[o]=r)}return n}class c{constructor(e={}){this.raws={},this[s]=!1,this[l]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let n of e[t])"function"==typeof n.clone?this.append(n.clone()):this.append(n)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=a(this);for(let n in e)t[n]=e[n];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:n,start:o}=this.rangeBy(t);return this.source.input.error(e,{column:o.column,line:o.line},{column:n.column,line:n.line},t)}return new o(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,n)=>(e[t]===n||(e[t]=n,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markClean(){this[s]=!0}markDirty(){if(this[s]){this[s]=!1;let e=this;for(;e=e.parent;)e[s]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let n=this.source.start;if(e.index)n=this.positionInside(e.index,t);else if(e.word){let o=(t=this.toString()).indexOf(e.word);-1!==o&&(n=this.positionInside(o,t))}return n}positionInside(e,t){let n=t||this.toString(),o=this.source.start.column,r=this.source.start.line;for(let t=0;t<e;t++)"\n"===n[t]?(o=1,r+=1):o+=1;return{column:o,line:r}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let o=this.toString(),r=o.indexOf(e.word);-1!==r&&(t=this.positionInside(r,o),n=this.positionInside(r+e.word.length,o))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return(n.line<t.line||n.line===t.line&&n.column<=t.column)&&(n={column:t.column+1,line:t.line}),{end:n,start:t}}raw(e,t){return(new r).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,n=!1;for(let o of e)o===this?n=!0:n?(this.parent.insertAfter(t,o),t=o):this.parent.insertBefore(t,o);n||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let n={},o=null==t;t=t||new Map;let r=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let o=this[e];if(Array.isArray(o))n[e]=o.map((e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e));else if("object"==typeof o&&o.toJSON)n[e]=o.toJSON(null,t);else if("source"===e){let i=t.get(o.input);null==i&&(i=r,t.set(o.input,r),r++),n[e]={end:o.end,inputId:i,start:o.start}}else n[e]=o}return o&&(n.inputs=[...t.keys()].map((e=>e.toJSON()))),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=i){e.stringify&&(e=e.stringify);let t="";return e(this,(e=>{t+=e})),t}warn(e,t,n){let o={node:this};for(let e in n)o[e]=n[e];return e.warn(t,o)}get proxyOf(){return this}}e.exports=c,c.default=c},4295:(e,t,n)=>{"use strict";let o=n(683),r=n(5380),i=n(3937);function s(e,t){let n=new r(e,t),o=new i(n);try{o.parse()}catch(e){throw e}return o.root}e.exports=s,s.default=s,o.registerParse(s)},3937:(e,t,n)=>{"use strict";let o=n(1326),r=n(6589),i=n(1516),s=n(9434),l=n(4092),a=n(2327);const c={empty:!0,space:!0};e.exports=class{constructor(e){this.input=e,this.root=new s,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,n,r,i=new o;i.name=e[1].slice(1),""===i.name&&this.unnamedAtrule(i,e),this.init(i,e[2]);let s=!1,l=!1,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?c.push("("===t?")":"]"):"{"===t&&c.length>0?c.push("}"):t===c[c.length-1]&&c.pop(),0===c.length){if(";"===t){i.source.end=this.getPosition(e[2]),i.source.end.offset++,this.semicolon=!0;break}if("{"===t){l=!0;break}if("}"===t){if(a.length>0){for(r=a.length-1,n=a[r];n&&"space"===n[0];)n=a[--r];n&&(i.source.end=this.getPosition(n[3]||n[2]),i.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){s=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(i.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(i,"params",a),s&&(e=a[a.length-1],i.source.end=this.getPosition(e[3]||e[2]),i.source.end.offset++,this.spaces=i.raws.between,i.raws.between="")):(i.raws.afterName="",i.params=""),l&&(i.nodes=[],this.current=i)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let n,o=0;for(let r=t-1;r>=0&&(n=e[r],"space"===n[0]||(o+=1,2!==o));r--);throw this.input.error("Missed semicolon","word"===n[0]?n[3]+1:n[2])}colon(e){let t,n,o,r=0;for(let[i,s]of e.entries()){if(n=s,o=n[0],"("===o&&(r+=1),")"===o&&(r-=1),0===r&&":"===o){if(t){if("word"===t[0]&&"progid"===t[1])continue;return i}this.doubleColon(n)}t=n}return!1}comment(e){let t=new r;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let n=e[1].slice(2,-2);if(/^\s*$/.test(n))t.text="",t.raws.left=n,t.raws.right="";else{let e=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=a(this.input)}decl(e,t){let n=new i;this.init(n,e[0][2]);let o,r=e[e.length-1];for(";"===r[0]&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(r[3]||r[2]||function(e){for(let t=e.length-1;t>=0;t--){let n=e[t],o=n[3]||n[2];if(o)return o}}(e)),n.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;n.prop+=e.shift()[1]}for(n.raws.between="";e.length;){if(o=e.shift(),":"===o[0]){n.raws.between+=o[1];break}"word"===o[0]&&/\w/.test(o[1])&&this.unknownWord([o]),n.raws.between+=o[1]}"_"!==n.prop[0]&&"*"!==n.prop[0]||(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let s,l=[];for(;e.length&&(s=e[0][0],"space"===s||"comment"===s);)l.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(o=e[t],"!important"===o[1].toLowerCase()){n.important=!0;let o=this.stringFrom(e,t);o=this.spacesFromEnd(e)+o," !important"!==o&&(n.raws.important=o);break}if("important"===o[1].toLowerCase()){let o=e.slice(0),r="";for(let e=t;e>0;e--){let t=o[e][0];if(r.trim().startsWith("!")&&"space"!==t)break;r=o.pop()[1]+r}r.trim().startsWith("!")&&(n.important=!0,n.raws.important=r,e=o)}if("space"!==o[0]&&"comment"!==o[0])break}e.some((e=>"space"!==e[0]&&"comment"!==e[0]))&&(n.raws.between+=l.map((e=>e[1])).join(""),l=[]),this.raw(n,"value",l.concat(e),t),n.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new l;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,n=null,o=!1,r=null,i=[],s=e[1].startsWith("--"),l=[],a=e;for(;a;){if(n=a[0],l.push(a),"("===n||"["===n)r||(r=a),i.push("("===n?")":"]");else if(s&&o&&"{"===n)r||(r=a),i.push("}");else if(0===i.length){if(";"===n){if(o)return void this.decl(l,s);break}if("{"===n)return void this.rule(l);if("}"===n){this.tokenizer.back(l.pop()),t=!0;break}":"===n&&(o=!0)}else n===i[i.length-1]&&(i.pop(),0===i.length&&(r=null));a=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),i.length>0&&this.unclosedBracket(r),t&&o){if(!s)for(;l.length&&(a=l[l.length-1][0],"space"===a||"comment"===a);)this.tokenizer.back(l.pop());this.decl(l,s)}else this.unknownWord(l)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,n,o){let r,i,s,l,a=n.length,u="",d=!0;for(let e=0;e<a;e+=1)r=n[e],i=r[0],"space"!==i||e!==a-1||o?"comment"===i?(l=n[e-1]?n[e-1][0]:"empty",s=n[e+1]?n[e+1][0]:"empty",c[l]||c[s]||","===u.slice(-1)?d=!1:u+=r[1]):u+=r[1]:d=!1;if(!d){let o=n.reduce(((e,t)=>e+t[1]),"");e.raws[t]={raw:o,value:u}}e[t]=u}rule(e){e.pop();let t=new l;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let t,n="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)n+=e.shift()[1];return n}spacesFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)n=e.pop()[1]+n;return n}stringFrom(e,t){let n="";for(let o=t;o<e.length;o++)n+=e[o][1];return e.splice(t,e.length-t),n}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}}},4529:(e,t,n)=>{"use strict";let o=n(1326),r=n(6589),i=n(683),s=n(356),l=n(1516),a=n(271),c=n(8940),u=n(5380),d=n(448),p=n(7374),h=n(7490),g=n(4295),m=n(9656),f=n(9055),b=n(9434),k=n(4092),v=n(633),_=n(5776);function x(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new m(e)}x.plugin=function(e,t){let n,o=!1;function r(...n){console&&console.warn&&!o&&(o=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let r=t(...n);return r.postcssPlugin=e,r.postcssVersion=(new m).version,r}return Object.defineProperty(r,"postcss",{get:()=>(n||(n=r()),n)}),r.process=function(e,t,n){return x([r(n)]).process(e,t)},r},x.stringify=v,x.parse=g,x.fromJSON=c,x.list=p,x.comment=e=>new r(e),x.atRule=e=>new o(e),x.decl=e=>new l(e),x.rule=e=>new k(e),x.root=e=>new b(e),x.document=e=>new a(e),x.CssSyntaxError=s,x.Declaration=l,x.Container=i,x.Processor=m,x.Document=a,x.Comment=r,x.Warning=_,x.AtRule=o,x.Result=f,x.Input=u,x.Rule=k,x.Root=b,x.Node=h,d.registerPostcss(x),e.exports=x,x.default=x},5696:(e,t,n)=>{"use strict";let{existsSync:o,readFileSync:r}=n(9977),{dirname:i,join:s}=n(197),{SourceMapConsumer:l,SourceMapGenerator:a}=n(1866);class c{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let n=t.map?t.map.prev:void 0,o=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=i(this.mapFile)),o&&(this.text=o)}consumer(){return this.consumerCache||(this.consumerCache=new l(this.text)),this.consumerCache}decodeInline(e){let t=e.match(/^data:application\/json;charset=utf-?8,/)||e.match(/^data:application\/json,/);if(t)return decodeURIComponent(e.substr(t[0].length));let n=e.match(/^data:application\/json;charset=utf-?8;base64,/)||e.match(/^data:application\/json;base64,/);if(n)return o=e.substr(n[0].length),Buffer?Buffer.from(o,"base64").toString():window.atob(o);var o;let r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/g);if(!t)return;let n=e.lastIndexOf(t.pop()),o=e.indexOf("*/",n);n>-1&&o>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,o)))}loadFile(e){if(this.root=i(e),o(e))return this.mapFile=e,r(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof l)return a.fromSourceMap(t).toString();if(t instanceof a)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let n=t(e);if(n){let e=this.loadFile(n);if(!e)throw new Error("Unable to load previous source map: "+n.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=s(i(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}e.exports=c,c.default=c},9656:(e,t,n)=>{"use strict";let o=n(271),r=n(448),i=n(7661),s=n(9434);class l{constructor(e=[]){this.version="8.4.47",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let n of e)if(!0===n.postcss?n=n():n.postcss&&(n=n.postcss),"object"==typeof n&&Array.isArray(n.plugins))t=t.concat(n.plugins);else if("object"==typeof n&&n.postcssPlugin)t.push(n);else if("function"==typeof n)t.push(n);else{if("object"!=typeof n||!n.parse&&!n.stringify)throw new Error(n+" is not a PostCSS plugin")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new r(this,e,t):new i(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}e.exports=l,l.default=l,s.registerProcessor(l),o.registerProcessor(l)},9055:(e,t,n)=>{"use strict";let o=n(5776);class r{constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let n=new o(e,t);return this.messages.push(n),n}warnings(){return this.messages.filter((e=>"warning"===e.type))}get content(){return this.css}}e.exports=r,r.default=r},9434:(e,t,n)=>{"use strict";let o,r,i=n(683);class s extends i{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,n){let o=super.normalize(e);if(t)if("prepend"===n)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of o)e.raws.before=t.raws.before;return o}removeChild(e,t){let n=this.index(e);return!t&&0===n&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}toResult(e={}){return new o(new r,this,e).stringify()}}s.registerLazyResult=e=>{o=e},s.registerProcessor=e=>{r=e},e.exports=s,s.default=s,i.registerRoot(s)},4092:(e,t,n)=>{"use strict";let o=n(683),r=n(7374);class i extends o{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return r.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n)}}e.exports=i,i.default=i,o.registerRule(i)},346:e=>{"use strict";const t={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};class n{constructor(e){this.builder=e}atrule(e,t){let n="@"+e.name,o=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?n+=e.raws.afterName:o&&(n+=" "),e.nodes)this.block(e,n+o);else{let r=(e.raws.between||"")+(t?";":"");this.builder(n+o+r,e)}}beforeAfter(e,t){let n;n="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let o=e.parent,r=0;for(;o&&"root"!==o.type;)r+=1,o=o.parent;if(n.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<r;e++)n+=t}return n}block(e,t){let n,o=this.raw(e,"between","beforeOpen");this.builder(t+o+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),n=this.raw(e,"after")):n=this.raw(e,"after","emptyBody"),n&&this.builder(n),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let n=this.raw(e,"semicolon");for(let o=0;o<e.nodes.length;o++){let r=e.nodes[o],i=this.raw(r,"before");i&&this.builder(i),this.stringify(r,t!==o||n)}}comment(e){let t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e)}decl(e,t){let n=this.raw(e,"between","colon"),o=e.prop+n+this.rawValue(e,"value");e.important&&(o+=e.raws.important||" !important"),t&&(o+=";"),this.builder(o,e)}document(e){this.body(e)}raw(e,n,o){let r;if(o||(o=n),n&&(r=e.raws[n],void 0!==r))return r;let i=e.parent;if("before"===o){if(!i||"root"===i.type&&i.first===e)return"";if(i&&"document"===i.type)return""}if(!i)return t[o];let s=e.root();if(s.rawCache||(s.rawCache={}),void 0!==s.rawCache[o])return s.rawCache[o];if("before"===o||"after"===o)return this.beforeAfter(e,o);{let t="raw"+((l=o)[0].toUpperCase()+l.slice(1));this[t]?r=this[t](s,e):s.walk((e=>{if(r=e.raws[n],void 0!==r)return!1}))}var l;return void 0===r&&(r=t[o]),s.rawCache[o]=r,r}rawBeforeClose(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let n;return e.walkComments((e=>{if(void 0!==e.raws.before)return n=e.raws.before,n.includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1})),void 0===n?n=this.raw(t,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(e,t){let n;return e.walkDecls((e=>{if(void 0!==e.raws.before)return n=e.raws.before,n.includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1})),void 0===n?n=this.raw(t,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeOpen(e){let t;return e.walk((e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1})),t}rawBeforeRule(e){let t;return e.walk((n=>{if(n.nodes&&(n.parent!==e||e.first!==n)&&void 0!==n.raws.before)return t=n.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls((e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1})),t}rawEmptyBody(e){let t;return e.walk((e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1})),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk((n=>{let o=n.parent;if(o&&o!==e&&o.parent&&o.parent===e&&void 0!==n.raws.before){let e=n.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}})),t}rawSemicolon(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1})),t}rawValue(e,t){let n=e[t],o=e.raws[t];return o&&o.value===n?o.raw:n}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}}e.exports=n,n.default=n},633:(e,t,n)=>{"use strict";let o=n(346);function r(e,t){new o(t).stringify(e)}e.exports=r,r.default=r},1381:e=>{"use strict";e.exports.isClean=Symbol("isClean"),e.exports.my=Symbol("my")},2327:e=>{"use strict";const t="'".charCodeAt(0),n='"'.charCodeAt(0),o="\\".charCodeAt(0),r="/".charCodeAt(0),i="\n".charCodeAt(0),s=" ".charCodeAt(0),l="\f".charCodeAt(0),a="\t".charCodeAt(0),c="\r".charCodeAt(0),u="[".charCodeAt(0),d="]".charCodeAt(0),p="(".charCodeAt(0),h=")".charCodeAt(0),g="{".charCodeAt(0),m="}".charCodeAt(0),f=";".charCodeAt(0),b="*".charCodeAt(0),k=":".charCodeAt(0),v="@".charCodeAt(0),_=/[\t\n\f\r "#'()/;[\\\]{}]/g,x=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,y=/.[\r\n"'(/\\]/,S=/[\da-f]/i;e.exports=function(e,w={}){let C,B,I,j,E,T,M,P,R,N,L=e.css.valueOf(),A=w.ignoreErrors,D=L.length,O=0,z=[],V=[];function F(t){throw e.error("Unclosed "+t,O)}return{back:function(e){V.push(e)},endOfFile:function(){return 0===V.length&&O>=D},nextToken:function(e){if(V.length)return V.pop();if(O>=D)return;let w=!!e&&e.ignoreUnclosed;switch(C=L.charCodeAt(O),C){case i:case s:case a:case c:case l:j=O;do{j+=1,C=L.charCodeAt(j)}while(C===s||C===i||C===a||C===c||C===l);T=["space",L.slice(O,j)],O=j-1;break;case u:case d:case g:case m:case k:case f:case h:{let e=String.fromCharCode(C);T=[e,e,O];break}case p:if(N=z.length?z.pop()[1]:"",R=L.charCodeAt(O+1),"url"===N&&R!==t&&R!==n&&R!==s&&R!==i&&R!==a&&R!==l&&R!==c){j=O;do{if(M=!1,j=L.indexOf(")",j+1),-1===j){if(A||w){j=O;break}F("bracket")}for(P=j;L.charCodeAt(P-1)===o;)P-=1,M=!M}while(M);T=["brackets",L.slice(O,j+1),O,j],O=j}else j=L.indexOf(")",O+1),B=L.slice(O,j+1),-1===j||y.test(B)?T=["(","(",O]:(T=["brackets",B,O,j],O=j);break;case t:case n:E=C===t?"'":'"',j=O;do{if(M=!1,j=L.indexOf(E,j+1),-1===j){if(A||w){j=O+1;break}F("string")}for(P=j;L.charCodeAt(P-1)===o;)P-=1,M=!M}while(M);T=["string",L.slice(O,j+1),O,j],O=j;break;case v:_.lastIndex=O+1,_.test(L),j=0===_.lastIndex?L.length-1:_.lastIndex-2,T=["at-word",L.slice(O,j+1),O,j],O=j;break;case o:for(j=O,I=!0;L.charCodeAt(j+1)===o;)j+=1,I=!I;if(C=L.charCodeAt(j+1),I&&C!==r&&C!==s&&C!==i&&C!==a&&C!==c&&C!==l&&(j+=1,S.test(L.charAt(j)))){for(;S.test(L.charAt(j+1));)j+=1;L.charCodeAt(j+1)===s&&(j+=1)}T=["word",L.slice(O,j+1),O,j],O=j;break;default:C===r&&L.charCodeAt(O+1)===b?(j=L.indexOf("*/",O+2)+1,0===j&&(A||w?j=L.length:F("comment")),T=["comment",L.slice(O,j+1),O,j],O=j):(x.lastIndex=O+1,x.test(L),j=0===x.lastIndex?L.length-1:x.lastIndex-2,T=["word",L.slice(O,j+1),O,j],z.push(T),O=j)}return O++,T},position:function(){return O}}}},3122:e=>{"use strict";let t={};e.exports=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}},5776:e=>{"use strict";class t{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}e.exports=t,t.default=t},628:(e,t,n)=>{"use strict";var o=n(4067);function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,i,s){if(s!==o){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,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:r};return n.PropTypes=n,n}},5826:(e,t,n)=>{e.exports=n(628)()},4067:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},4462: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)}),i=this&&this.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},s=this&&this.__rest||function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&(n[o[r]]=e[o[r]])}return n};t.__esModule=!0;var l=n(1609),a=n(5826),c=n(4306),u=n(461),d="autosize:resized",p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={lineHeight:null},t.textarea=null,t.onResize=function(e){t.props.onResize&&t.props.onResize(e)},t.updateLineHeight=function(){t.textarea&&t.setState({lineHeight:u(t.textarea)})},t.onChange=function(e){var n=t.props.onChange;t.currentValue=e.currentTarget.value,n&&n(e)},t}return r(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.maxRows,o=t.async;"number"==typeof n&&this.updateLineHeight(),"number"==typeof n||o?setTimeout((function(){return e.textarea&&c(e.textarea)})):this.textarea&&c(this.textarea),this.textarea&&this.textarea.addEventListener(d,this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener(d,this.onResize),c.destroy(this.textarea))},t.prototype.render=function(){var e=this,t=this.props,n=(t.onResize,t.maxRows),o=(t.onChange,t.style),r=(t.innerRef,t.children),a=s(t,["onResize","maxRows","onChange","style","innerRef","children"]),c=this.state.lineHeight,u=n&&c?c*n:null;return l.createElement("textarea",i({},a,{onChange:this.onChange,style:u?i({},o,{maxHeight:u}):o,ref:function(t){e.textarea=t,"function"==typeof e.props.innerRef?e.props.innerRef(t):e.props.innerRef&&(e.props.innerRef.current=t)}}),r)},t.prototype.componentDidUpdate=function(){this.textarea&&c.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:a.number,maxRows:a.number,onResize:a.func,innerRef:a.any,async:a.bool},t}(l.Component);t.TextareaAutosize=l.forwardRef((function(e,t){return l.createElement(p,i({},e,{innerRef:t}))}))},4132:(e,t,n)=>{"use strict";var o=n(4462);t.A=o.TextareaAutosize},9681:e=>{var t={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ả:"A",Ạ:"A",Ẩ:"A",Ẫ:"A",Ậ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ẻ:"E",Ẽ:"E",Ẹ:"E",Ể:"E",Ễ:"E",Ệ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ỉ:"I",Ị:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ỏ:"O",Ọ:"O",Ổ:"O",Ỗ:"O",Ộ:"O",Ờ:"O",Ở:"O",Ỡ:"O",Ớ:"O",Ợ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ủ:"U",Ụ:"U",Ử:"U",Ữ:"U",Ự:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ả:"a",ạ:"a",ẩ:"a",ẫ:"a",ậ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ẻ:"e",ẽ:"e",ẹ:"e",ể:"e",ễ:"e",ệ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ỉ:"i",ị:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ỏ:"o",ọ:"o",ổ:"o",ỗ:"o",ộ:"o",ờ:"o",ở:"o",ỡ:"o",ớ:"o",ợ:"o",ù:"u",ú:"u",û:"u",ü:"u",ủ:"u",ụ:"u",ử:"u",ữ:"u",ự:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z",й:"и",Й:"И",ё:"е",Ё:"Е"},n=Object.keys(t).join("|"),o=new RegExp(n,"g"),r=new RegExp(n,"");function i(e){return t[e]}var s=function(e){return e.replace(o,i)};e.exports=s,e.exports.has=function(e){return!!e.match(r)},e.exports.remove=s},1609:e=>{"use strict";e.exports=window.React},9746:()=>{},9977:()=>{},197:()=>{},1866:()=>{},2739:()=>{},5042:e=>{e.exports={nanoid:(e=21)=>{let t="",n=e;for(;n--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(n=t)=>{let o="",r=n;for(;r--;)o+=e[Math.random()*e.length|0];return o}}}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o].call(i.exports,i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};(()=>{"use strict";n.r(o),n.d(o,{AlignmentControl:()=>Hh,AlignmentToolbar:()=>Gh,Autocomplete:()=>pB,BlockAlignmentControl:()=>Fl,BlockAlignmentToolbar:()=>Hl,BlockBreadcrumb:()=>_B,BlockCanvas:()=>Uj,BlockColorsStyleSelector:()=>qj,BlockContextProvider:()=>nb,BlockControls:()=>us,BlockEdit:()=>db,BlockEditorKeyboardShortcuts:()=>Qf,BlockEditorProvider:()=>eb,BlockFormatControls:()=>cs,BlockIcon:()=>Uf,BlockInspector:()=>zP,BlockList:()=>ry,BlockMover:()=>DB,BlockNavigationDropdown:()=>ME,BlockPopover:()=>Jg,BlockPreview:()=>sS,BlockSelectionClearer:()=>jx,BlockSettingsMenu:()=>sj,BlockSettingsMenuControls:()=>ej,BlockStyles:()=>NE,BlockTitle:()=>kB,BlockToolbar:()=>Ij,BlockTools:()=>Nj,BlockVerticalAlignmentControl:()=>Ys,BlockVerticalAlignmentToolbar:()=>Xs,ButtonBlockAppender:()=>rC,ButtonBlockerAppender:()=>oC,ColorPalette:()=>oT,ColorPaletteControl:()=>rT,ContrastChecker:()=>hp,CopyHandler:()=>FP,DefaultBlockAppender:()=>fx,FontSizePicker:()=>eB,HeadingLevelDropdown:()=>zE,HeightControl:()=>fg,InnerBlocks:()=>Zx,Inserter:()=>tC,InspectorAdvancedControls:()=>ga,InspectorControls:()=>ma,JustifyContentControl:()=>el,JustifyToolbar:()=>tl,LineHeightControl:()=>zp,MediaPlaceholder:()=>lM,MediaReplaceFlow:()=>Nc,MediaUpload:()=>Sa,MediaUploadCheck:()=>wa,MultiSelectScrollIntoView:()=>UP,NavigableToolbar:()=>vj,ObserveTyping:()=>Qx,PanelColorSettings:()=>aM,PlainText:()=>FM,RecursionProvider:()=>QP,RichText:()=>OM,RichTextShortcut:()=>$M,RichTextToolbarButton:()=>UM,SETTINGS_DEFAULTS:()=>I,SkipToSelectedBlock:()=>aP,ToolSelector:()=>ZM,Typewriter:()=>YP,URLInput:()=>La,URLInputButton:()=>QM,URLPopover:()=>oM,Warning:()=>ab,WritingFlow:()=>Iy,__experimentalBlockAlignmentMatrixControl:()=>fB,__experimentalBlockFullHeightAligmentControl:()=>gB,__experimentalBlockPatternSetup:()=>XE,__experimentalBlockPatternsList:()=>NS,__experimentalBlockVariationPicker:()=>FE,__experimentalBlockVariationTransforms:()=>tT,__experimentalBorderRadiusControl:()=>ad,__experimentalColorGradientControl:()=>Xd,__experimentalColorGradientSettingsDropdown:()=>pT,__experimentalDateFormatPicker:()=>lT,__experimentalDuotoneControl:()=>Cm,__experimentalFontAppearanceControl:()=>Dp,__experimentalFontFamilyControl:()=>Lp,__experimentalGetBorderClassesAndStyles:()=>DC,__experimentalGetColorClassesAndStyles:()=>VC,__experimentalGetElementClassName:()=>sR,__experimentalGetGapCSSValue:()=>Fs,__experimentalGetGradientClass:()=>Fd,__experimentalGetGradientObjectByGradientValue:()=>Gd,__experimentalGetShadowClassesAndStyles:()=>zC,__experimentalGetSpacingClassesAndStyles:()=>HC,__experimentalImageEditor:()=>YT,__experimentalImageSizeControl:()=>JT,__experimentalImageURLInputUI:()=>iP,__experimentalInspectorPopoverHeader:()=>nR,__experimentalLetterSpacingControl:()=>Vp,__experimentalLibrary:()=>$P,__experimentalLinkControl:()=>Mc,__experimentalLinkControlSearchInput:()=>pc,__experimentalLinkControlSearchItem:()=>Xa,__experimentalLinkControlSearchResults:()=>rc,__experimentalListView:()=>EE,__experimentalPanelColorGradientSettings:()=>fT,__experimentalPreviewOptions:()=>sP,__experimentalPublishDateTimePicker:()=>rR,__experimentalRecursionProvider:()=>eR,__experimentalResponsiveBlockControl:()=>GM,__experimentalSpacingSizesControl:()=>gg,__experimentalTextDecorationControl:()=>oh,__experimentalTextTransformControl:()=>Jp,__experimentalUnitControl:()=>qM,__experimentalUseBlockOverlayActive:()=>xB,__experimentalUseBlockPreview:()=>lS,__experimentalUseBorderProps:()=>OC,__experimentalUseColorProps:()=>FC,__experimentalUseCustomSides:()=>pm,__experimentalUseGradient:()=>Ud,__experimentalUseHasRecursion:()=>tR,__experimentalUseMultipleOriginColorsAndGradients:()=>Zu,__experimentalUseResizeCanvas:()=>lP,__experimentalWritingModeControl:()=>lh,__unstableBlockNameContext:()=>mj,__unstableBlockSettingsMenuFirstItem:()=>NI,__unstableBlockToolbarLastItem:()=>fI,__unstableEditorStyles:()=>Jy,__unstableIframe:()=>Py,__unstableInserterMenuExtension:()=>Fw,__unstableRichTextInputEvent:()=>WM,__unstableUseBlockSelectionClearer:()=>Ix,__unstableUseClipboardHandler:()=>VP,__unstableUseMouseMoveTypingReset:()=>Yx,__unstableUseTypewriter:()=>qP,__unstableUseTypingObserver:()=>Xx,createCustomColorsHOC:()=>QC,getColorClassName:()=>Ku,getColorObjectByAttributeValues:()=>Uu,getColorObjectByColorValue:()=>Wu,getComputedFluidTypographyValue:()=>ki,getCustomValueFromPreset:()=>As,getFontSize:()=>Ph,getFontSizeClass:()=>Nh,getFontSizeObjectByValue:()=>Rh,getGradientSlugByValue:()=>$d,getGradientValueBySlug:()=>Hd,getPxFromCssUnit:()=>lR,getSpacingPresetCssVar:()=>Os,getTypographyClassesAndStyles:()=>$C,isValueSpacingPreset:()=>Ls,privateApis:()=>oL,store:()=>li,storeConfig:()=>si,transformStyles:()=>Xy,useBlockBindingsUtils:()=>CC,useBlockCommands:()=>Hj,useBlockDisplayInformation:()=>Um,useBlockEditContext:()=>_,useBlockEditingMode:()=>Gl,useBlockProps:()=>ax,useCachedTruthy:()=>UC,useHasRecursion:()=>JP,useInnerBlocksProps:()=>Kx,useSetting:()=>ui,useSettings:()=>ci,useStyleOverride:()=>Ji,withColorContext:()=>nT,withColors:()=>JC,withFontSizes:()=>oB});var e={};n.r(e),n.d(e,{getAllPatterns:()=>Fe,getBlockRemovalRules:()=>Re,getBlockSettings:()=>Ce,getBlockStyles:()=>Xe,getBlockWithoutAttributes:()=>je,getContentLockingParent:()=>Ze,getEnabledBlockParents:()=>Me,getEnabledClientIdsTree:()=>Te,getExpandedBlock:()=>Ke,getInserterMediaCategories:()=>De,getLastFocus:()=>Ue,getLastInsertedBlocksClientIds:()=>Ie,getOpenedBlockSettingsMenu:()=>Ne,getParentSectionBlock:()=>nt,getPatternBySlug:()=>Ve,getRegisteredInserterMediaCategories:()=>Ae,getRemovalPromptData:()=>Pe,getReusableBlocks:()=>$e,getSectionRootClientId:()=>Je,getStyleOverrides:()=>Le,getTemporarilyEditingAsBlocks:()=>qe,getTemporarilyEditingFocusModeToRevert:()=>Ye,getZoomLevel:()=>et,hasAllowedPatterns:()=>Oe,isBlockInterfaceHidden:()=>Be,isBlockSubtreeDisabled:()=>Ee,isDragging:()=>We,isResolvingPatterns:()=>He,isSectionBlock:()=>ot,isZoomOut:()=>tt,isZoomOutMode:()=>Qe});var t={};n.r(t),n.d(t,{__experimentalGetActiveBlockIdByBlockNames:()=>uo,__experimentalGetAllowedBlocks:()=>Vn,__experimentalGetAllowedPatterns:()=>Kn,__experimentalGetBlockListSettingsForBlocks:()=>eo,__experimentalGetDirectInsertBlock:()=>Hn,__experimentalGetGlobalBlocksByName:()=>vt,__experimentalGetLastBlockAttributeChanges:()=>oo,__experimentalGetParsedPattern:()=>Gn,__experimentalGetPatternTransformItems:()=>Yn,__experimentalGetPatternsByBlockTypes:()=>qn,__experimentalGetReusableBlockTitle:()=>to,__unstableGetBlockWithoutInnerBlocks:()=>dt,__unstableGetClientIdWithClientIdsTree:()=>ht,__unstableGetClientIdsTree:()=>gt,__unstableGetContentLockingParent:()=>xo,__unstableGetEditorMode:()=>io,__unstableGetSelectedBlocksWithPartialSelection:()=>en,__unstableGetTemporarilyEditingAsBlocks:()=>yo,__unstableGetTemporarilyEditingFocusModeToRevert:()=>So,__unstableGetVisibleBlocks:()=>mo,__unstableHasActiveBlockOverlayActive:()=>fo,__unstableIsFullySelected:()=>Yt,__unstableIsLastBlockChangeIgnored:()=>no,__unstableIsSelectionCollapsed:()=>Xt,__unstableIsSelectionMergeable:()=>Jt,__unstableIsWithinBlockOverlay:()=>bo,__unstableSelectionHasUnmergeableBlock:()=>Qt,areInnerBlocksControlled:()=>co,canEditBlock:()=>Tn,canInsertBlockType:()=>wn,canInsertBlocks:()=>Cn,canLockBlockType:()=>Mn,canMoveBlock:()=>jn,canMoveBlocks:()=>En,canRemoveBlock:()=>Bn,canRemoveBlocks:()=>In,didAutomaticChange:()=>lo,getAdjacentBlockClientId:()=>At,getAllowedBlocks:()=>zn,getBlock:()=>ut,getBlockAttributes:()=>ct,getBlockCount:()=>yt,getBlockEditingMode:()=>ko,getBlockHierarchyRootClientId:()=>Nt,getBlockIndex:()=>nn,getBlockInsertionPoint:()=>kn,getBlockListSettings:()=>Xn,getBlockMode:()=>dn,getBlockName:()=>lt,getBlockNamesByClientId:()=>xt,getBlockOrder:()=>tn,getBlockParents:()=>Pt,getBlockParentsByBlockName:()=>Rt,getBlockRootClientId:()=>Mt,getBlockSelectionEnd:()=>Bt,getBlockSelectionStart:()=>Ct,getBlockTransformItems:()=>Dn,getBlocks:()=>pt,getBlocksByClientId:()=>_t,getBlocksByName:()=>kt,getClientIdsOfDescendants:()=>mt,getClientIdsWithDescendants:()=>ft,getDirectInsertBlock:()=>Fn,getDraggedBlockClientIds:()=>gn,getFirstMultiSelectedBlockClientId:()=>Gt,getGlobalBlockCount:()=>bt,getHoveredBlockClientId:()=>go,getInserterItems:()=>An,getLastMultiSelectedBlockClientId:()=>$t,getLowestCommonAncestorWithSelectedBlock:()=>Lt,getMultiSelectedBlockClientIds:()=>Ft,getMultiSelectedBlocks:()=>Ht,getMultiSelectedBlocksEndClientId:()=>qt,getMultiSelectedBlocksStartClientId:()=>Zt,getNextBlockClientId:()=>Ot,getPatternsByBlockTypes:()=>Zn,getPreviousBlockClientId:()=>Dt,getSelectedBlock:()=>Tt,getSelectedBlockClientId:()=>Et,getSelectedBlockClientIds:()=>Vt,getSelectedBlockCount:()=>It,getSelectedBlocksInitialCaretPosition:()=>zt,getSelectionEnd:()=>wt,getSelectionStart:()=>St,getSettings:()=>Qn,getTemplate:()=>xn,getTemplateLock:()=>yn,hasBlockMovingClientId:()=>so,hasDraggedInnerBlock:()=>sn,hasInserterItems:()=>On,hasMultiSelection:()=>an,hasSelectedBlock:()=>jt,hasSelectedInnerBlock:()=>rn,isAncestorBeingDragged:()=>fn,isAncestorMultiSelected:()=>Kt,isBlockBeingDragged:()=>mn,isBlockHighlighted:()=>ao,isBlockInsertionPointVisible:()=>vn,isBlockMultiSelected:()=>Wt,isBlockSelected:()=>on,isBlockValid:()=>at,isBlockVisible:()=>ho,isBlockWithinSelection:()=>ln,isCaretWithinFormattedText:()=>bn,isDraggingBlocks:()=>hn,isFirstMultiSelectedBlock:()=>Ut,isGroupable:()=>_o,isLastBlockChangePersistent:()=>Jn,isMultiSelecting:()=>cn,isNavigationMode:()=>ro,isSelectionEnabled:()=>un,isTyping:()=>pn,isUngroupable:()=>vo,isValidTemplate:()=>_n,wasBlockJustInserted:()=>po});var r={};n.r(r),n.d(r,{__experimentalUpdateSettings:()=>Co,clearBlockRemovalPrompt:()=>Mo,deleteStyleOverride:()=>Lo,ensureDefaultBlock:()=>Eo,expandBlock:()=>Vo,hideBlockInterface:()=>Bo,modifyContentLockBlock:()=>Fo,privateRemoveBlocks:()=>jo,resetZoomLevel:()=>Go,setBlockRemovalRules:()=>Po,setLastFocus:()=>Ao,setOpenedBlockSettingsMenu:()=>Ro,setStyleOverride:()=>No,setZoomLevel:()=>Ho,showBlockInterface:()=>Io,startDragging:()=>Oo,stopDragging:()=>zo,stopEditingAsBlocks:()=>Do});var i={};n.r(i),n.d(i,{__unstableDeleteSelection:()=>wr,__unstableExpandSelection:()=>Br,__unstableMarkAutomaticChange:()=>Ur,__unstableMarkLastChangeAsPersistent:()=>Gr,__unstableMarkNextChangeAsNotPersistent:()=>$r,__unstableSaveReusableBlock:()=>Hr,__unstableSetEditorMode:()=>Kr,__unstableSetTemporarilyEditingAsBlocks:()=>ni,__unstableSplitSelection:()=>Cr,clearSelectedBlock:()=>cr,duplicateBlocks:()=>qr,enterFormattedText:()=>Ar,exitFormattedText:()=>Dr,flashBlock:()=>Jr,hideInsertionPoint:()=>xr,hoverBlock:()=>or,insertAfterBlock:()=>Xr,insertBeforeBlock:()=>Yr,insertBlock:()=>kr,insertBlocks:()=>vr,insertDefaultBlock:()=>zr,mergeBlocks:()=>Ir,moveBlockToPosition:()=>br,moveBlocksDown:()=>gr,moveBlocksToPosition:()=>fr,moveBlocksUp:()=>mr,multiSelect:()=>ar,receiveBlocks:()=>Jo,registerInserterMediaCategory:()=>oi,removeBlock:()=>Er,removeBlocks:()=>jr,replaceBlock:()=>pr,replaceBlocks:()=>dr,replaceInnerBlocks:()=>Tr,resetBlocks:()=>Yo,resetSelection:()=>Qo,selectBlock:()=>nr,selectNextBlock:()=>ir,selectPreviousBlock:()=>rr,selectionChange:()=>Or,setBlockEditingMode:()=>ri,setBlockMovingClientId:()=>Zr,setBlockVisibility:()=>ti,setHasControlledInnerBlocks:()=>ei,setNavigationMode:()=>Wr,setTemplateValidity:()=>yr,showInsertionPoint:()=>_r,startDraggingBlocks:()=>Nr,startMultiSelect:()=>sr,startTyping:()=>Pr,stopDraggingBlocks:()=>Lr,stopMultiSelect:()=>lr,stopTyping:()=>Rr,synchronizeTemplate:()=>Sr,toggleBlockHighlight:()=>Qr,toggleBlockMode:()=>Mr,toggleSelection:()=>ur,unsetBlockEditingMode:()=>ii,updateBlock:()=>tr,updateBlockAttributes:()=>er,updateBlockListSettings:()=>Vr,updateSettings:()=>Fr,validateBlocksToTemplate:()=>Xo});var s={};n.r(s),n.d(s,{AdvancedPanel:()=>uR,BackgroundPanel:()=>Yc,BorderPanel:()=>Bd,ColorPanel:()=>pp,DimensionsPanel:()=>Og,FiltersPanel:()=>Om,GlobalStylesContext:()=>Oi,ImageSettingsPanel:()=>cR,TypographyPanel:()=>Sh,areGlobalStyleConfigsEqual:()=>Ai,getBlockCSSSelector:()=>Em,getBlockSelectors:()=>bf,getGlobalStylesChanges:()=>kR,getLayoutStyles:()=>cf,toStyles:()=>mf,useGlobalSetting:()=>Hi,useGlobalStyle:()=>Gi,useGlobalStylesOutput:()=>_f,useGlobalStylesOutputWithConfig:()=>vf,useGlobalStylesReset:()=>Fi,useHasBackgroundPanel:()=>Kc,useHasBorderPanel:()=>bd,useHasBorderPanelControls:()=>kd,useHasColorPanel:()=>Qd,useHasDimensionsPanel:()=>Cg,useHasFiltersPanel:()=>Pm,useHasImageSettingsPanel:()=>aR,useHasTypographyPanel:()=>uh,useSettingsForBlockElement:()=>$i});const l=window.wp.blocks,a=window.wp.element,c=window.wp.data,u=window.wp.compose,d=window.wp.hooks,p=Symbol("mayDisplayControls"),h=Symbol("mayDisplayParentControls"),g=Symbol("blockEditingMode"),m=Symbol("blockBindings"),f=Symbol("isPreviewMode"),b={name:"",isSelected:!1},k=(0,a.createContext)(b),{Provider:v}=k;function _(){return(0,a.useContext)(k)}const x=window.wp.deprecated;var y=n.n(x),S=n(7734),w=n.n(S);const C=window.wp.i18n,B={insertUsage:{}},I={alignWide:!1,supportsLayout:!0,colors:[{name:(0,C.__)("Black"),slug:"black",color:"#000000"},{name:(0,C.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:(0,C.__)("White"),slug:"white",color:"#ffffff"},{name:(0,C.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:(0,C.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:(0,C.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:(0,C.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:(0,C.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:(0,C.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:(0,C.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:(0,C.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:(0,C.__)("Vivid purple"),slug:"vivid-purple",color:"#9b51e0"}],fontSizes:[{name:(0,C._x)("Small","font size name"),size:13,slug:"small"},{name:(0,C._x)("Normal","font size name"),size:16,slug:"normal"},{name:(0,C._x)("Medium","font size name"),size:20,slug:"medium"},{name:(0,C._x)("Large","font size name"),size:36,slug:"large"},{name:(0,C._x)("Huge","font size name"),size:42,slug:"huge"}],imageDefaultSize:"large",imageSizes:[{slug:"thumbnail",name:(0,C.__)("Thumbnail")},{slug:"medium",name:(0,C.__)("Medium")},{slug:"large",name:(0,C.__)("Large")},{slug:"full",name:(0,C.__)("Full Size")}],imageEditing:!0,maxWidth:580,allowedBlockTypes:!0,maxUploadFileSize:0,allowedMimeTypes:null,canLockBlocks:!0,enableOpenverseMediaCategory:!0,clearBlockSelection:!0,__experimentalCanUserUseUnfilteredHTML:!1,__experimentalBlockDirectory:!1,__mobileEnablePageTemplates:!1,__experimentalBlockPatterns:[],__experimentalBlockPatternCategories:[],__unstableIsPreviewMode:!1,blockInspectorAnimation:{animationParent:"core/navigation","core/navigation":{enterDirection:"leftToRight"},"core/navigation-submenu":{enterDirection:"rightToLeft"},"core/navigation-link":{enterDirection:"rightToLeft"},"core/search":{enterDirection:"rightToLeft"},"core/social-links":{enterDirection:"rightToLeft"},"core/page-list":{enterDirection:"rightToLeft"},"core/spacer":{enterDirection:"rightToLeft"},"core/home-link":{enterDirection:"rightToLeft"},"core/site-title":{enterDirection:"rightToLeft"},"core/site-logo":{enterDirection:"rightToLeft"}},generateAnchors:!1,gradients:[{name:(0,C.__)("Vivid cyan blue to vivid purple"),gradient:"linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)",slug:"vivid-cyan-blue-to-vivid-purple"},{name:(0,C.__)("Light green cyan to vivid green cyan"),gradient:"linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%)",slug:"light-green-cyan-to-vivid-green-cyan"},{name:(0,C.__)("Luminous vivid amber to luminous vivid orange"),gradient:"linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%)",slug:"luminous-vivid-amber-to-luminous-vivid-orange"},{name:(0,C.__)("Luminous vivid orange to vivid red"),gradient:"linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%)",slug:"luminous-vivid-orange-to-vivid-red"},{name:(0,C.__)("Very light gray to cyan bluish gray"),gradient:"linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%)",slug:"very-light-gray-to-cyan-bluish-gray"},{name:(0,C.__)("Cool to warm spectrum"),gradient:"linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%)",slug:"cool-to-warm-spectrum"},{name:(0,C.__)("Blush light purple"),gradient:"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",slug:"blush-light-purple"},{name:(0,C.__)("Blush bordeaux"),gradient:"linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%)",slug:"blush-bordeaux"},{name:(0,C.__)("Luminous dusk"),gradient:"linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%)",slug:"luminous-dusk"},{name:(0,C.__)("Pale ocean"),gradient:"linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%)",slug:"pale-ocean"},{name:(0,C.__)("Electric grass"),gradient:"linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",slug:"electric-grass"},{name:(0,C.__)("Midnight"),gradient:"linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",slug:"midnight"}],__unstableResolvedAssets:{styles:[],scripts:[]}};function j(e,t,n){return[...e.slice(0,n),...Array.isArray(t)?t:[t],...e.slice(n)]}function E(e,t,n,o=1){const r=[...e];return r.splice(t,o),j(r,e.slice(t,t+o),n)}const T=e=>e;function M(e,t=""){const n=new Map,o=[];return n.set(t,o),e.forEach((e=>{const{clientId:t,innerBlocks:r}=e;o.push(t),M(r,t).forEach(((e,t)=>{n.set(t,e)}))})),n}function P(e,t=""){const n=[],o=[[t,e]];for(;o.length;){const[e,t]=o.shift();t.forEach((({innerBlocks:t,...r})=>{n.push([r.clientId,e]),t?.length&&o.push([r.clientId,t])}))}return n}function R(e,t=T){const n=[],o=[...e];for(;o.length;){const{innerBlocks:e,...r}=o.shift();o.push(...e),n.push([r.clientId,t(r)])}return n}function N(e){return R(e,(e=>{const{attributes:t,...n}=e;return n}))}function L(e){return R(e,(e=>e.attributes))}function A(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&void 0!==t&&"UPDATE_BLOCK_ATTRIBUTES"===t.type&&w()(e.clientIds,t.clientIds)&&function(e,t){return w()(Object.keys(e),Object.keys(t))}(e.attributes,t.attributes)}function D(e,t){const n=e.tree,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.set(e.clientId,{});for(const t of r)n.set(t.clientId,Object.assign(n.get(t.clientId),{...e.byClientId.get(t.clientId),attributes:e.attributes.get(t.clientId),innerBlocks:t.innerBlocks.map((e=>n.get(e.clientId)))}))}function O(e,t,n=!1){const o=e.tree,r=new Set([]),i=new Set;for(const o of t){let t=n?o:e.parents.get(o);do{if(e.controlledInnerBlocks[t]){i.add(t);break}r.add(t),t=e.parents.get(t)}while(void 0!==t)}for(const e of r)o.set(e,{...o.get(e)});for(const t of r)o.get(t).innerBlocks=(e.order.get(t)||[]).map((e=>o.get(e)));for(const t of i)o.set("controlled||"+t,{innerBlocks:(e.order.get(t)||[]).map((e=>o.get(e)))})}const z=(0,u.pipe)(c.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=new Map(t.attributes),t.attributes.forEach(((n,r)=>{const{name:i}=t.byClientId.get(r);"core/block"===i&&n.ref===e&&t.attributes.set(r,{...n,ref:o})}))}return e(t,n)}),(e=>(t={},n)=>{const o=e(t,n);if(o===t)return t;switch(o.tree=t.tree?t.tree:new Map,n.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":o.tree=new Map(o.tree),D(o,n.blocks),O(o,n.rootClientId?[n.rootClientId]:[""],!0);break;case"UPDATE_BLOCK":o.tree=new Map(o.tree),o.tree.set(n.clientId,{...o.tree.get(n.clientId),...o.byClientId.get(n.clientId),attributes:o.attributes.get(n.clientId)}),O(o,[n.clientId],!1);break;case"SYNC_DERIVED_BLOCK_ATTRIBUTES":case"UPDATE_BLOCK_ATTRIBUTES":o.tree=new Map(o.tree),n.clientIds.forEach((e=>{o.tree.set(e,{...o.tree.get(e),attributes:o.attributes.get(e)})})),O(o,n.clientIds,!1);break;case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const e=function(e){const t={},n=[...e];for(;n.length;){const{innerBlocks:e,...o}=n.shift();n.push(...e),t[o.clientId]=!0}return t}(n.blocks);o.tree=new Map(o.tree),n.replacedClientIds.forEach((t=>{o.tree.delete(t),e[t]||o.tree.delete("controlled||"+t)})),D(o,n.blocks),O(o,n.blocks.map((e=>e.clientId)),!1);const r=[];for(const e of n.clientIds){const n=t.parents.get(e);void 0===n||""!==n&&!o.byClientId.get(n)||r.push(n)}O(o,r,!0);break}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":const e=[];for(const r of n.clientIds){const n=t.parents.get(r);void 0===n||""!==n&&!o.byClientId.get(n)||e.push(n)}o.tree=new Map(o.tree),n.removedClientIds.forEach((e=>{o.tree.delete(e),o.tree.delete("controlled||"+e)})),O(o,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=new Map(o.tree),O(o,e,!0);break}case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":{const e=[n.rootClientId?n.rootClientId:""];o.tree=new Map(o.tree),O(o,e,!0);break}case"SAVE_REUSABLE_BLOCK_SUCCESS":{const e=[];o.attributes.forEach(((t,r)=>{"core/block"===o.byClientId.get(r).name&&t.ref===n.updatedId&&e.push(r)})),o.tree=new Map(o.tree),e.forEach((e=>{o.tree.set(e,{...o.byClientId.get(e),attributes:o.attributes.get(e),innerBlocks:o.tree.get(e).innerBlocks})})),O(o,e,!1)}}return o}),(e=>(t,n)=>{const o=e=>{let o=e;for(let r=0;r<o.length;r++)!t.order.get(o[r])||n.keepControlledInnerBlocks&&n.keepControlledInnerBlocks[o[r]]||(o===e&&(o=[...o]),o.push(...t.order.get(o[r])));return o};if(t)switch(n.type){case"REMOVE_BLOCKS":n={...n,type:"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN",removedClientIds:o(n.clientIds)};break;case"REPLACE_BLOCKS":n={...n,type:"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN",replacedClientIds:o(n.clientIds)}}return e(t,n)}),(e=>(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.get(n.rootClientId)&&(r=e(r,{type:"REMOVE_BLOCKS",keepControlledInnerBlocks:o,clientIds:t.order.get(n.rootClientId)}));let i=r;if(n.blocks.length){i=e(i,{...n,type:"INSERT_BLOCKS",index:0});const r=new Map(i.order);Object.keys(o).forEach((e=>{t.order.get(e)&&r.set(e,t.order.get(e))})),i.order=r,i.tree=new Map(i.tree),Object.keys(o).forEach((e=>{const n=`controlled||${e}`;t.tree.has(n)&&i.tree.set(n,t.tree.get(n))}))}return i}),(e=>(t,n)=>{if("RESET_BLOCKS"===n.type){const e={...t,byClientId:new Map(N(n.blocks)),attributes:new Map(L(n.blocks)),order:M(n.blocks),parents:new Map(P(n.blocks)),controlledInnerBlocks:{}};return e.tree=new Map(t?.tree),D(e,n.blocks),e.tree.set("",{innerBlocks:n.blocks.map((t=>e.tree.get(t.clientId)))}),e}return e(t,n)}),(function(e){let t,n,o=!1;return(r,i)=>{let s,l=e(r,i);var a;"SET_EXPLICIT_PERSISTENT"===i.type&&(n=i.isPersistentChange,s=null===(a=r.isPersistentChange)||void 0===a||a);if(void 0!==n)return s=n,s===l.isPersistentChange?l:{...l,isPersistentChange:s};const c="MARK_LAST_CHANGE_AS_PERSISTENT"===i.type||o;var u;return r!==l||c?(l={...l,isPersistentChange:c?!o:!A(i,t)},t=i,o="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===i.type,l):(o="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===i.type,s=null===(u=r?.isPersistentChange)||void 0===u||u,r.isPersistentChange===s?r:{...l,isPersistentChange:s})}}),(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(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{const n=new Map(e);return N(t.blocks).forEach((([e,t])=>{n.set(e,t)})),n}case"UPDATE_BLOCK":{if(!e.has(t.clientId))return e;const{attributes:n,...o}=t.updates;if(0===Object.values(o).length)return e;const r=new Map(e);return r.set(t.clientId,{...e.get(t.clientId),...o}),r}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{if(!t.blocks)return e;const n=new Map(e);return t.replacedClientIds.forEach((e=>{n.delete(e)})),N(t.blocks).forEach((([e,t])=>{n.set(e,t)})),n}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n}}return e},attributes(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{const n=new Map(e);return L(t.blocks).forEach((([e,t])=>{n.set(e,t)})),n}case"UPDATE_BLOCK":{if(!e.get(t.clientId)||!t.updates.attributes)return e;const n=new Map(e);return n.set(t.clientId,{...e.get(t.clientId),...t.updates.attributes}),n}case"SYNC_DERIVED_BLOCK_ATTRIBUTES":case"UPDATE_BLOCK_ATTRIBUTES":{if(t.clientIds.every((t=>!e.get(t))))return e;let o=!1;const r=new Map(e);for(const i of t.clientIds){var n;const s=Object.entries(t.uniqueByBlock?t.attributes[i]:null!==(n=t.attributes)&&void 0!==n?n:{});if(0===s.length)continue;let l=!1;const a=e.get(i),c={};s.forEach((([e,t])=>{a[e]!==t&&(l=!0,c[e]=t)})),o=o||l,l&&r.set(i,{...a,...c})}return o?r:e}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{if(!t.blocks)return e;const n=new Map(e);return t.replacedClientIds.forEach((e=>{n.delete(e)})),L(t.blocks).forEach((([e,t])=>{n.set(e,t)})),n}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n}}return e},order(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":{var n;const o=M(t.blocks),r=new Map(e);return o.forEach(((e,t)=>{""!==t&&r.set(t,e)})),r.set("",(null!==(n=e.get(""))&&void 0!==n?n:[]).concat(o[""])),r}case"INSERT_BLOCKS":{const{rootClientId:n=""}=t,o=e.get(n)||[],r=M(t.blocks,n),{index:i=o.length}=t,s=new Map(e);return r.forEach(((e,t)=>{s.set(t,e)})),s.set(n,j(o,r.get(n),i)),s}case"MOVE_BLOCKS_TO_POSITION":{var o;const{fromRootClientId:n="",toRootClientId:r="",clientIds:i}=t,{index:s=e.get(r).length}=t;if(n===r){const t=e.get(r).indexOf(i[0]),n=new Map(e);return n.set(r,E(e.get(r),t,s,i.length)),n}const l=new Map(e);return l.set(n,null!==(o=e.get(n)?.filter((e=>!i.includes(e))))&&void 0!==o?o:[]),l.set(r,j(e.get(r),i,s)),l}case"MOVE_BLOCKS_UP":{const{clientIds:n,rootClientId:o=""}=t,r=n[0],i=e.get(o);if(!i.length||r===i[0])return e;const s=i.indexOf(r),l=new Map(e);return l.set(o,E(i,s,s-1,n.length)),l}case"MOVE_BLOCKS_DOWN":{const{clientIds:n,rootClientId:o=""}=t,r=n[0],i=n[n.length-1],s=e.get(o);if(!s.length||i===s[s.length-1])return e;const l=s.indexOf(r),a=new Map(e);return a.set(o,E(s,l,l+1,n.length)),a}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const{clientIds:n}=t;if(!t.blocks)return e;const o=M(t.blocks),r=new Map(e);return t.replacedClientIds.forEach((e=>{r.delete(e)})),o.forEach(((e,t)=>{""!==t&&r.set(t,e)})),r.forEach(((e,t)=>{const i=Object.values(e).reduce(((e,t)=>t===n[0]?[...e,...o.get("")]:(-1===n.indexOf(t)&&e.push(t),e)),[]);r.set(t,i)})),r}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n.forEach(((e,o)=>{var r;const i=null!==(r=e?.filter((e=>!t.removedClientIds.includes(e))))&&void 0!==r?r:[];i.length!==e.length&&n.set(o,i)})),n}}return e},parents(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":{const n=new Map(e);return P(t.blocks).forEach((([e,t])=>{n.set(e,t)})),n}case"INSERT_BLOCKS":{const n=new Map(e);return P(t.blocks,t.rootClientId||"").forEach((([e,t])=>{n.set(e,t)})),n}case"MOVE_BLOCKS_TO_POSITION":{const n=new Map(e);return t.clientIds.forEach((e=>{n.set(e,t.toRootClientId||"")})),n}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.replacedClientIds.forEach((e=>{n.delete(e)})),P(t.blocks,e.get(t.clientIds[0])).forEach((([e,t])=>{n.set(e,t)})),n}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n}}return e},controlledInnerBlocks:(e={},{type:t,clientId:n,hasControlledInnerBlocks:o})=>"SET_HAS_CONTROLLED_INNER_BLOCKS"===t?{...e,[n]:o}:e});function V(e={},t){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}const F=(0,c.combineReducers)({blocks:z,isDragging:function(e=!1,t){switch(t.type){case"START_DRAGGING":return!0;case"STOP_DRAGGING":return!1}return e},isTyping:function(e=!1,t){switch(t.type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e},isBlockInterfaceHidden:function(e=!1,t){switch(t.type){case"HIDE_BLOCK_INTERFACE":return!0;case"SHOW_BLOCK_INTERFACE":return!1}return e},draggedBlocks:function(e=[],t){switch(t.type){case"START_DRAGGING_BLOCKS":return t.clientIds;case"STOP_DRAGGING_BLOCKS":return[]}return e},selection:function(e={},t){switch(t.type){case"SELECTION_CHANGE":return t.clientId?{selectionStart:{clientId:t.clientId,attributeKey:t.attributeKey,offset:t.startOffset},selectionEnd:{clientId:t.clientId,attributeKey:t.attributeKey,offset:t.endOffset}}:{selectionStart:t.start||e.selectionStart,selectionEnd:t.end||e.selectionEnd};case"RESET_SELECTION":const{selectionStart:n,selectionEnd:o}=t;return{selectionStart:n,selectionEnd:o};case"MULTI_SELECT":const{start:r,end:i}=t;return r===e.selectionStart?.clientId&&i===e.selectionEnd?.clientId?e:{selectionStart:{clientId:r},selectionEnd:{clientId:i}};case"RESET_BLOCKS":const s=e?.selectionStart?.clientId,l=e?.selectionEnd?.clientId;if(!s&&!l)return e;if(!t.blocks.some((e=>e.clientId===s)))return{selectionStart:{},selectionEnd:{}};if(!t.blocks.some((e=>e.clientId===l)))return{...e,selectionEnd:e.selectionStart}}const n=V(e.selectionStart,t),o=V(e.selectionEnd,t);return n===e.selectionStart&&o===e.selectionEnd?e:{selectionStart:n,selectionEnd:o}},isMultiSelecting:function(e=!1,t){switch(t.type){case"START_MULTI_SELECT":return!0;case"STOP_MULTI_SELECT":return!1}return e},isSelectionEnabled:function(e=!0,t){return"TOGGLE_SELECTION"===t.type?t.isSelectionEnabled:e},initialPosition:function(e=null,t){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(e={},t){if("TOGGLE_BLOCK_MODE"===t.type){const{clientId:n}=t;return{...e,[n]:e[n]&&"html"===e[n]?"visual":"html"}}return e},blockListSettings:(e={},t)=>{switch(t.type){case"REPLACE_BLOCKS":case"REMOVE_BLOCKS":return Object.fromEntries(Object.entries(e).filter((([e])=>!t.clientIds.includes(e))));case"UPDATE_BLOCK_LIST_SETTINGS":{const n="string"==typeof t.clientId?{[t.clientId]:t.settings}:t.clientId;for(const t in n)n[t]?w()(e[t],n[t])&&delete n[t]:e[t]||delete n[t];if(0===Object.keys(n).length)return e;const o={...e,...n};for(const e in n)n[e]||delete o[e];return o}}return e},insertionPoint:function(e=null,t){switch(t.type){case"SHOW_INSERTION_POINT":{const{rootClientId:n,index:o,__unstableWithInserter:r,operation:i,nearestSide:s}=t,l={rootClientId:n,index:o,__unstableWithInserter:r,operation:i,nearestSide:s};return w()(e,l)?e:l}case"HIDE_INSERTION_POINT":return null}return e},template:function(e={isValid:!0},t){return"SET_TEMPLATE_VALIDITY"===t.type?{...e,isValid:t.isValid}:e},settings:function(e=I,t){return"UPDATE_SETTINGS"===t.type?t.reset?{...I,...t.settings}:{...e,...t.settings}:e},preferences:function(e=B,t){switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":{const n=t.blocks.reduce(((e,n)=>{const{attributes:o,name:r}=n;let i=r;const s=(0,c.select)(l.store).getActiveBlockVariation(r,o);return s?.name&&(i+="/"+s.name),"core/block"===r&&(i+="/"+o.ref),{...e,[i]:{time:t.time,count:e[i]?e[i].count+1:1}}}),e.insertUsage);return{...e,insertUsage:n}}}return e},lastBlockAttributesChange:function(e=null,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 e},lastFocus:function(e=!1,t){return"LAST_FOCUS"===t.type?t.lastFocus:e},editorMode:function(e="edit",t){return"INSERT_BLOCKS"===t.type&&"navigation"===e?"edit":"SET_EDITOR_MODE"===t.type?t.mode:e},hasBlockMovingClientId:function(e=null,t){return"SET_BLOCK_MOVING_MODE"===t.type?t.hasBlockMovingClientId:"SET_EDITOR_MODE"===t.type?null:e},expandedBlock:function(e=null,t){switch(t.type){case"SET_BLOCK_EXPANDED_IN_LIST_VIEW":return t.clientId;case"SELECT_BLOCK":if(t.clientId!==e)return null}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(e={},t){switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":if(!t.blocks.length)return e;const n=t.blocks.map((e=>e.clientId)),o=t.meta?.source;return{clientIds:n,source:o};case"RESET_BLOCKS":return{}}return e},temporarilyEditingAsBlocks:function(e="",t){return"SET_TEMPORARILY_EDITING_AS_BLOCKS"===t.type?t.temporarilyEditingAsBlocks:e},temporarilyEditingFocusModeRevert:function(e="",t){return"SET_TEMPORARILY_EDITING_AS_BLOCKS"===t.type?t.focusModeToRevert:e},blockVisibility:function(e={},t){return"SET_BLOCK_VISIBILITY"===t.type?{...e,...t.updates}:e},blockEditingModes:function(e=new Map,t){switch(t.type){case"SET_BLOCK_EDITING_MODE":return new Map(e).set(t.clientId,t.mode);case"UNSET_BLOCK_EDITING_MODE":{const n=new Map(e);return n.delete(t.clientId),n}case"RESET_BLOCKS":return e.has("")?(new Map).set("",e.get("")):e}return e},styleOverrides:function(e=new Map,t){switch(t.type){case"SET_STYLE_OVERRIDE":return new Map(e).set(t.id,t.style);case"DELETE_STYLE_OVERRIDE":{const n=new Map(e);return n.delete(t.id),n}}return e},removalPromptData:function(e=!1,t){switch(t.type){case"DISPLAY_BLOCK_REMOVAL_PROMPT":const{clientIds:e,selectPrevious:n,message:o}=t;return{clientIds:e,selectPrevious:n,message:o};case"CLEAR_BLOCK_REMOVAL_PROMPT":return!1}return e},blockRemovalRules:function(e=!1,t){return"SET_BLOCK_REMOVAL_RULES"===t.type?t.rules:e},openedBlockSettingsMenu:function(e=null,t){var n;return"SET_OPENED_BLOCK_SETTINGS_MENU"===t.type?null!==(n=t?.clientId)&&void 0!==n?n:null:e},registeredInserterMediaCategories:function(e=[],t){return"REGISTER_INSERTER_MEDIA_CATEGORY"===t.type?[...e,t.category]:e},hoveredBlockClientId:function(e=!1,t){return"HOVER_BLOCK"===t.type?t.clientId:e},zoomLevel:function(e=100,t){switch(t.type){case"SET_ZOOM_LEVEL":return t.zoom;case"RESET_ZOOM_LEVEL":return 100}return e}});const H=function(e){return(t,n)=>{const o=e(t,n);return t?(o.automaticChangeStatus=t.automaticChangeStatus,"MARK_AUTOMATIC_CHANGE"===n.type?{...o,automaticChangeStatus:"pending"}:"MARK_AUTOMATIC_CHANGE_FINAL"===n.type&&"pending"===t.automaticChangeStatus?{...o,automaticChangeStatus:"final"}:o.blocks===t.blocks&&o.selection===t.selection||"final"!==o.automaticChangeStatus&&o.selection!==t.selection?o:{...o,automaticChangeStatus:void 0}):o}}(F),G=window.wp.primitives,$=window.ReactJSXRuntime,U=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})}),W=window.wp.richText,K=window.wp.blockSerializationDefaultParser,Z=Symbol("globalStylesDataKey"),q=Symbol("globalStylesLinks"),Y=Symbol("selectBlockPatternsKey"),X=Symbol("reusableBlocksSelect"),Q=Symbol("sectionRootClientIdKey"),J=window.wp.privateApis,{lock:ee,unlock:te}=(0,J.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/block-editor"),ne="core/block-editor",oe=Symbol("withRootClientId"),re=new WeakMap,ie=new WeakMap;function se(e){let t=re.get(e);return t||(t=function(e){const t=(0,l.parse)(e.content,{__unstableSkipMigrationLogs:!0});return 1===t.length&&(t[0].attributes={...t[0].attributes,metadata:{...t[0].attributes.metadata||{},categories:e.categories,patternName:e.name,name:t[0].attributes.metadata?.name||e.title}}),{...e,blocks:t}}(e),re.set(e,t)),t}function le(e){let t=ie.get(e);return t||(t=(0,K.parse)(e.content),t=t.filter((e=>null!==e.blockName)),ie.set(e,t)),t}const ae=(e,t,n=null)=>"boolean"==typeof e?e:Array.isArray(e)?!(!e.includes("core/post-content")||null!==t)||e.includes(t):n,ce=(e,t)=>{if("boolean"==typeof t)return t;const n=[...e];for(;n.length>0;){const e=n.shift();if(!ae(t,e.name||e.blockName,!0))return!1;e.innerBlocks?.forEach((e=>{n.push(e)}))}return!0},ue=e=>t=>[t.settings.__experimentalBlockPatterns,t.settings.__experimentalUserPatternCategories,t.settings.__experimentalReusableBlocks,t.settings[Y]?.(e),t.blockPatterns,te(e(ne)).getReusableBlocks()];function de(e,t){return[e.blockListSettings[t],e.blocks.byClientId.get(t),e.settings.allowedBlockTypes,e.settings.templateLock,e.blockEditingModes]}const pe=(e,t,n)=>(o,r)=>{let i,s;if("function"==typeof e?(i=e(o),s=e(r)):(i=o[e],s=r[e]),i>s)return"asc"===n?1:-1;if(s>i)return"asc"===n?-1:1;const l=t.findIndex((e=>e===o)),a=t.findIndex((e=>e===r));return l>a?1:a>l?-1:0};function he(e,t,n="asc"){return e.concat().sort(pe(t,e,n))}const ge={user:"user",theme:"theme",directory:"directory"},me={full:"fully",unsynced:"unsynced"},fe={name:"allPatterns",label:(0,C._x)("All","patterns")},be={name:"myPatterns",label:(0,C.__)("My patterns")};function ke(e,t,n){const o=e.name.startsWith("core/block"),r="core"===e.source||e.source?.startsWith("pattern-directory");return!(t!==ge.theme||!o&&!r)||(!(t!==ge.directory||!o&&r)||(t===ge.user&&e.type!==ge.user||(n===me.full&&""!==e.syncStatus||!(n!==me.unsynced||"unsynced"===e.syncStatus||!o))))}function ve(e,t,n){t=Array.isArray(t)?[...t]:[t],e=Array.isArray(e)?[...e]:{...e};const o=t.pop();let r=e;for(const e of t){const t=r[e];r=r[e]=Array.isArray(t)?[...t]:{...t}}return r[o]=n,e}const _e=(e,t,n)=>{var o;const r=Array.isArray(t)?t:t.split(".");let i=e;return r.forEach((e=>{i=i?.[e]})),null!==(o=i)&&void 0!==o?o:n};const xe=["color","border","dimensions","typography","spacing"],ye={"color.palette":e=>e.colors,"color.gradients":e=>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=>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},Se={"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"},we=e=>Se[e]||e;function Ce(e,t,...n){const o=lt(e,t),r=[];if(t){let n=t;do{const t=lt(e,n);(0,l.hasBlockSupport)(t,"__experimentalSettings",!1)&&r.push(n)}while(n=e.blocks.parents.get(n))}return n.map((n=>{if(xe.includes(n))return void console.warn("Top level useSetting paths are disabled. Please use a subpath to query the information needed.");let i=(0,d.applyFilters)("blockEditor.useSetting.before",void 0,n,t,o);if(void 0!==i)return i;const s=we(n);for(const t of r){var a;const n=ct(e,t);if(i=null!==(a=_e(n.settings?.blocks?.[o],s))&&void 0!==a?a:_e(n.settings,s),void 0!==i)break}const c=Qn(e);var u,p;if(void 0===i&&o&&(i=_e(c.__experimentalFeatures?.blocks?.[o],s)),void 0===i&&(i=_e(c.__experimentalFeatures,s)),void 0!==i)return l.__EXPERIMENTAL_PATHS_WITH_OVERRIDE[s]?null!==(u=null!==(p=i.custom)&&void 0!==p?p:i.theme)&&void 0!==u?u:i.default:i;const h=ye[s]?.(c);return void 0!==h?h:"typography.dropCap"===s||void 0}))}function Be(e){return e.isBlockInterfaceHidden}function Ie(e){return e?.lastBlockInserted?.clientIds}function je(e,t){return e.blocks.byClientId.get(t)}const Ee=(e,t)=>{const n=t=>"disabled"===ko(e,t)&&tn(e,t).every(n);return tn(e,t).every(n)};const Te=(0,c.createSelector)((function e(t,n){const o=tn(t,n),r=[];for(const n of o){const o=e(t,n);"disabled"!==ko(t,n)?r.push({clientId:n,innerBlocks:o}):r.push(...o)}return r}),(e=>[e.blocks.order,e.blockEditingModes,e.settings.templateLock,e.blockListSettings,e.editorMode])),Me=(0,c.createSelector)(((e,t,n=!1)=>Pt(e,t,n).filter((t=>"disabled"!==ko(e,t)))),(e=>[e.blocks.parents,e.blockEditingModes,e.settings.templateLock,e.blockListSettings]));function Pe(e){return e.removalPromptData}function Re(e){return e.blockRemovalRules}function Ne(e){return e.openedBlockSettingsMenu}const Le=(0,c.createSelector)((e=>{const t=ft(e).reduce(((e,t,n)=>(e[t]=n,e)),{});return[...e.styleOverrides].sort(((e,n)=>{var o,r;const[,{clientId:i}]=e,[,{clientId:s}]=n;return(null!==(o=t[i])&&void 0!==o?o:-1)-(null!==(r=t[s])&&void 0!==r?r:-1)}))}),(e=>[e.blocks.order,e.styleOverrides]));function Ae(e){return e.registeredInserterMediaCategories}const De=(0,c.createSelector)((e=>{const{settings:{inserterMediaCategories:t,allowedMimeTypes:n,enableOpenverseMediaCategory:o},registeredInserterMediaCategories:r}=e;if(!t&&!r.length||!n)return;const i=t?.map((({name:e})=>e))||[];return[...t||[],...(r||[]).filter((({name:e})=>!i.includes(e)))].filter((e=>!(!o&&"openverse"===e.name)&&Object.values(n).some((t=>t.startsWith(`${e.mediaType}/`)))))}),(e=>[e.settings.inserterMediaCategories,e.settings.allowedMimeTypes,e.settings.enableOpenverseMediaCategory,e.registeredInserterMediaCategories])),Oe=(0,c.createRegistrySelector)((e=>(0,c.createSelector)(((t,n=null)=>{const{getAllPatterns:o}=te(e(ne)),r=o(),{allowedBlockTypes:i}=Qn(t);return r.some((e=>{const{inserter:o=!0}=e;if(!o)return!1;const r=le(e);return ce(r,i)&&r.every((({name:e})=>wn(t,e,n)))}))}),((t,n)=>[...ue(e)(t),...de(t,n)]))));function ze(e,t=[]){return{name:`core/block/${e.id}`,id:e.id,type:ge.user,title:e.title.raw,categories:e.wp_pattern_category.map((e=>{const n=t.find((({id:t})=>t===e));return n?n.slug:e})),content:e.content.raw,syncStatus:e.wp_pattern_sync_status}}const Ve=(0,c.createRegistrySelector)((e=>(0,c.createSelector)(((t,n)=>{var o,r;if(n?.startsWith("core/block/")){const o=parseInt(n.slice(11),10),r=te(e(ne)).getReusableBlocks().find((({id:e})=>e===o));return r?ze(r,t.settings.__experimentalUserPatternCategories):null}return[...null!==(o=t.settings.__experimentalBlockPatterns)&&void 0!==o?o:[],...null!==(r=t.settings[Y]?.(e))&&void 0!==r?r:[]].find((({name:e})=>e===n))}),((t,n)=>n?.startsWith("core/block/")?[te(e(ne)).getReusableBlocks(),t.settings.__experimentalReusableBlocks]:[t.settings.__experimentalBlockPatterns,t.settings[Y]?.(e)])))),Fe=(0,c.createRegistrySelector)((e=>(0,c.createSelector)((t=>{var n,o;return[...te(e(ne)).getReusableBlocks().map((e=>ze(e,t.settings.__experimentalUserPatternCategories))),...null!==(n=t.settings.__experimentalBlockPatterns)&&void 0!==n?n:[],...null!==(o=t.settings[Y]?.(e))&&void 0!==o?o:[]].filter(((e,t,n)=>t===n.findIndex((t=>e.name===t.name))))}),ue(e)))),He=(0,c.createRegistrySelector)((e=>(0,c.createSelector)((t=>{const n=t.settings[Y],o=t.settings[X];return!!n&&void 0===n(e)||!!o&&void 0===o(e)}),ue(e)))),Ge=[],$e=(0,c.createRegistrySelector)((e=>t=>{var n;const o=t.settings[X];return null!==(n=o?o(e):t.settings.__experimentalReusableBlocks)&&void 0!==n?n:Ge}));function Ue(e){return e.lastFocus}function We(e){return e.isDragging}function Ke(e){return e.expandedBlock}const Ze=(0,c.createSelector)(((e,t)=>{let n,o=t;for(;o=e.blocks.parents.get(o);)"core/block"!==lt(e,o)&&"contentOnly"!==yn(e,o)||(n=o);return n}),(e=>[e.blocks.parents,e.blockListSettings]));function qe(e){return e.temporarilyEditingAsBlocks}function Ye(e){return e.temporarilyEditingFocusModeRevert}const Xe=(0,c.createSelector)(((e,t)=>t.reduce(((t,n)=>(t[n]=e.blocks.attributes.get(n)?.style,t)),{})),((e,t)=>[...t.map((t=>e.blocks.attributes.get(t)?.style))]));function Qe(e){return"zoom-out"===io(e)}function Je(e){return e.settings?.[Q]}function et(e){return e.zoomLevel}function tt(e){return et(e)<100}const nt=(e,t)=>{let n,o=t;for(;!n&&(o=e.blocks.parents.get(o));)ot(e,o)&&(n=o);return n};function ot(e,t){const n=tn(e,Je(e));return"core/block"===lt(e,t)||"contentOnly"===yn(e,t)||ro(e)&&n.includes(t)}const rt=[],it=new Set,st={};function lt(e,t){const n=e.blocks.byClientId.get(t),o="core/social-link";if("web"!==a.Platform.OS&&n?.name===o){const n=e.blocks.attributes.get(t),{service:r}=null!=n?n:{};return r?`${o}-${r}`:o}return n?n.name:null}function at(e,t){const n=e.blocks.byClientId.get(t);return!!n&&n.isValid}function ct(e,t){return e.blocks.byClientId.get(t)?e.blocks.attributes.get(t):null}function ut(e,t){return e.blocks.byClientId.has(t)?e.blocks.tree.get(t):null}const dt=(0,c.createSelector)(((e,t)=>{const n=e.blocks.byClientId.get(t);return n?{...n,attributes:ct(e,t)}:null}),((e,t)=>[e.blocks.byClientId.get(t),e.blocks.attributes.get(t)]));function pt(e,t){const n=t&&co(e,t)?"controlled||"+t:t||"";return e.blocks.tree.get(n)?.innerBlocks||rt}const ht=(0,c.createSelector)(((e,t)=>(y()("wp.data.select( 'core/block-editor' ).__unstableGetClientIdWithClientIdsTree",{since:"6.3",version:"6.5"}),{clientId:t,innerBlocks:gt(e,t)})),(e=>[e.blocks.order])),gt=(0,c.createSelector)(((e,t="")=>(y()("wp.data.select( 'core/block-editor' ).__unstableGetClientIdsTree",{since:"6.3",version:"6.5"}),tn(e,t).map((t=>ht(e,t))))),(e=>[e.blocks.order])),mt=(0,c.createSelector)(((e,t)=>{t=Array.isArray(t)?[...t]:[t];const n=[];for(const o of t){const t=e.blocks.order.get(o);t&&n.push(...t)}let o=0;for(;o<n.length;){const t=n[o],r=e.blocks.order.get(t);r&&n.splice(o+1,0,...r),o++}return n}),(e=>[e.blocks.order])),ft=e=>mt(e,""),bt=(0,c.createSelector)(((e,t)=>{const n=ft(e);if(!t)return n.length;let o=0;for(const r of n){e.blocks.byClientId.get(r).name===t&&o++}return o}),(e=>[e.blocks.order,e.blocks.byClientId])),kt=(0,c.createSelector)(((e,t)=>{if(!t)return rt;const n=Array.isArray(t)?t:[t],o=ft(e).filter((t=>{const o=e.blocks.byClientId.get(t);return n.includes(o.name)}));return o.length>0?o:rt}),(e=>[e.blocks.order,e.blocks.byClientId]));function vt(e,t){return y()("wp.data.select( 'core/block-editor' ).__experimentalGetGlobalBlocksByName",{since:"6.5",alternative:"wp.data.select( 'core/block-editor' ).getBlocksByName"}),kt(e,t)}const _t=(0,c.createSelector)(((e,t)=>(Array.isArray(t)?t:[t]).map((t=>ut(e,t)))),((e,t)=>(Array.isArray(t)?t:[t]).map((t=>e.blocks.tree.get(t))))),xt=(0,c.createSelector)(((e,t)=>_t(e,t).filter(Boolean).map((e=>e.name))),((e,t)=>_t(e,t)));function yt(e,t){return tn(e,t).length}function St(e){return e.selection.selectionStart}function wt(e){return e.selection.selectionEnd}function Ct(e){return e.selection.selectionStart.clientId}function Bt(e){return e.selection.selectionEnd.clientId}function It(e){const t=Ft(e).length;return t||(e.selection.selectionStart.clientId?1:0)}function jt(e){const{selectionStart:t,selectionEnd:n}=e.selection;return!!t.clientId&&t.clientId===n.clientId}function Et(e){const{selectionStart:t,selectionEnd:n}=e.selection,{clientId:o}=t;return o&&o===n.clientId?o:null}function Tt(e){const t=Et(e);return t?ut(e,t):null}function Mt(e,t){var n;return null!==(n=e.blocks.parents.get(t))&&void 0!==n?n:null}const Pt=(0,c.createSelector)(((e,t,n=!1)=>{const o=[];let r=t;for(;r=e.blocks.parents.get(r);)o.push(r);return o.length?n?o:o.reverse():rt}),(e=>[e.blocks.parents])),Rt=(0,c.createSelector)(((e,t,n,o=!1)=>{const r=Pt(e,t,o),i=Array.isArray(n)?e=>n.includes(e):e=>n===e;return r.filter((t=>i(lt(e,t))))}),(e=>[e.blocks.parents]));function Nt(e,t){let n,o=t;do{n=o,o=e.blocks.parents.get(o)}while(o);return n}function Lt(e,t){const n=Et(e),o=[...Pt(e,t),t],r=[...Pt(e,n),n];let i;const s=Math.min(o.length,r.length);for(let e=0;e<s&&o[e]===r[e];e++)i=o[e];return i}function At(e,t,n=1){if(void 0===t&&(t=Et(e)),void 0===t&&(t=n<0?Gt(e):$t(e)),!t)return null;const o=Mt(e,t);if(null===o)return null;const{order:r}=e.blocks,i=r.get(o),s=i.indexOf(t)+1*n;return s<0||s===i.length?null:i[s]}function Dt(e,t){return At(e,t,-1)}function Ot(e,t){return At(e,t,1)}function zt(e){return e.initialPosition}const Vt=(0,c.createSelector)((e=>{const{selectionStart:t,selectionEnd:n}=e.selection;if(!t.clientId||!n.clientId)return rt;if(t.clientId===n.clientId)return[t.clientId];const o=Mt(e,t.clientId);if(null===o)return rt;const r=tn(e,o),i=r.indexOf(t.clientId),s=r.indexOf(n.clientId);return i>s?r.slice(s,i+1):r.slice(i,s+1)}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function Ft(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?rt:Vt(e)}const Ht=(0,c.createSelector)((e=>{const t=Ft(e);return t.length?t.map((t=>ut(e,t))):rt}),(e=>[...Vt.getDependants(e),e.blocks.byClientId,e.blocks.order,e.blocks.attributes]));function Gt(e){return Ft(e)[0]||null}function $t(e){const t=Ft(e);return t[t.length-1]||null}function Ut(e,t){return Gt(e)===t}function Wt(e,t){return-1!==Ft(e).indexOf(t)}const Kt=(0,c.createSelector)(((e,t)=>{let n=t,o=!1;for(;n&&!o;)n=Mt(e,n),o=Wt(e,n);return o}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function Zt(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:t.clientId||null}function qt(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:n.clientId||null}function Yt(e){const t=St(e),n=wt(e);return!t.attributeKey&&!n.attributeKey&&void 0===t.offset&&void 0===n.offset}function Xt(e){const t=St(e),n=wt(e);return!!t&&!!n&&t.clientId===n.clientId&&t.attributeKey===n.attributeKey&&t.offset===n.offset}function Qt(e){return Vt(e).some((t=>{const n=lt(e,t);return!(0,l.getBlockType)(n).merge}))}function Jt(e,t){const n=St(e),o=wt(e);if(n.clientId===o.clientId)return!1;if(!n.attributeKey||!o.attributeKey||void 0===n.offset||void 0===o.offset)return!1;const r=Mt(e,n.clientId);if(r!==Mt(e,o.clientId))return!1;const i=tn(e,r);let s,a;i.indexOf(n.clientId)>i.indexOf(o.clientId)?(s=o,a=n):(s=n,a=o);const c=t?a.clientId:s.clientId,u=t?s.clientId:a.clientId,d=lt(e,c);if(!(0,l.getBlockType)(d).merge)return!1;const p=ut(e,u);if(p.name===d)return!0;const h=(0,l.switchToBlockType)(p,d);return h&&h.length}const en=e=>{const t=St(e),n=wt(e);if(t.clientId===n.clientId)return rt;if(!t.attributeKey||!n.attributeKey||void 0===t.offset||void 0===n.offset)return rt;const o=Mt(e,t.clientId);if(o!==Mt(e,n.clientId))return rt;const r=tn(e,o),i=r.indexOf(t.clientId),s=r.indexOf(n.clientId),[l,a]=i>s?[n,t]:[t,n],c=ut(e,l.clientId),u=ut(e,a.clientId),d=c.attributes[l.attributeKey],p=u.attributes[a.attributeKey];let h=(0,W.create)({html:d}),g=(0,W.create)({html:p});return h=(0,W.remove)(h,0,l.offset),g=(0,W.remove)(g,a.offset,g.text.length),[{...c,attributes:{...c.attributes,[l.attributeKey]:(0,W.toHTMLString)({value:h})}},{...u,attributes:{...u.attributes,[a.attributeKey]:(0,W.toHTMLString)({value:g})}}]};function tn(e,t){return e.blocks.order.get(t||"")||rt}function nn(e,t){return tn(e,Mt(e,t)).indexOf(t)}function on(e,t){const{selectionStart:n,selectionEnd:o}=e.selection;return n.clientId===o.clientId&&n.clientId===t}function rn(e,t,n=!1){const o=Vt(e);return!!o.length&&(n?o.some((n=>Pt(e,n,!0).includes(t))):o.some((n=>Mt(e,n)===t)))}function sn(e,t,n=!1){return tn(e,t).some((t=>mn(e,t)||n&&sn(e,t,n)))}function ln(e,t){if(!t)return!1;const n=Ft(e),o=n.indexOf(t);return o>-1&&o<n.length-1}function an(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId!==n.clientId}function cn(e){return e.isMultiSelecting}function un(e){return e.isSelectionEnabled}function dn(e,t){return e.blocksMode[t]||"visual"}function pn(e){return e.isTyping}function hn(e){return!!e.draggedBlocks.length}function gn(e){return e.draggedBlocks}function mn(e,t){return e.draggedBlocks.includes(t)}function fn(e,t){if(!hn(e))return!1;return Pt(e,t).some((t=>mn(e,t)))}function bn(){return y()('wp.data.select( "core/block-editor" ).isCaretWithinFormattedText',{since:"6.1",version:"6.3"}),!1}const kn=(0,c.createSelector)((e=>{let t,n;const{insertionPoint:o,selection:{selectionEnd:r}}=e;if(null!==o)return o;const{clientId:i}=r;return i?(t=Mt(e,i)||void 0,n=nn(e,r.clientId)+1):n=tn(e).length,{rootClientId:t,index:n}}),(e=>[e.insertionPoint,e.selection.selectionEnd.clientId,e.blocks.parents,e.blocks.order]));function vn(e){return null!==e.insertionPoint}function _n(e){return e.template.isValid}function xn(e){return e.settings.template}function yn(e,t){var n,o;return t?null!==(n=Xn(e,t)?.templateLock)&&void 0!==n&&n:null!==(o=e.settings.templateLock)&&void 0!==o&&o}const Sn=(e,t,n=null)=>{let o;if(t&&"object"==typeof t?(o=t,t=o.name):o=(0,l.getBlockType)(t),!o)return!1;const{allowedBlockTypes:r}=Qn(e);if(!ae(r,t,!0))return!1;if(!!yn(e,n))return!1;if("disabled"===ko(e,null!=n?n:""))return!1;const i=Xn(e,n);if(n&&void 0===i)return!1;const s=lt(e,n),a=(0,l.getBlockType)(s),c=a?.allowedBlocks;let u=ae(c,t);if(!1!==u){const e=i?.allowedBlocks,n=ae(e,t);null!==n&&(u=n)}const p=o.parent,h=ae(p,s);let g=!0;const m=o.ancestor;if(m){g=[n,...Pt(e,n)].some((t=>ae(m,lt(e,t))))}const f=g&&(null===u&&null===h||!0===u||!0===h);return f?(0,d.applyFilters)("blockEditor.__unstableCanInsertBlockType",f,o,n,{getBlock:ut.bind(null,e),getBlockParentsByBlockName:Rt.bind(null,e)}):f},wn=(0,c.createSelector)(Sn,((e,t,n)=>de(e,n)));function Cn(e,t,n=null){return t.every((t=>wn(e,lt(e,t),n)))}function Bn(e,t){const n=ct(e,t);if(null===n)return!0;if(void 0!==n.lock?.remove)return!n.lock.remove;const o=Mt(e,t);return!yn(e,o)&&"disabled"!==ko(e,o)}function In(e,t){return t.every((t=>Bn(e,t)))}function jn(e,t){const n=ct(e,t);if(null===n)return!0;if(void 0!==n.lock?.move)return!n.lock.move;const o=Mt(e,t);return"all"!==yn(e,o)&&"disabled"!==ko(e,o)}function En(e,t){return t.every((t=>jn(e,t)))}function Tn(e,t){const n=ct(e,t);if(null===n)return!0;const{lock:o}=n;return!o?.edit}function Mn(e,t){return!!(0,l.hasBlockSupport)(t,"lock",!0)&&!!e.settings?.canLockBlocks}function Pn(e,t){var n;return null!==(n=e.preferences.insertUsage?.[t])&&void 0!==n?n:null}const Rn=(e,t,n)=>!!(0,l.hasBlockSupport)(t,"inserter",!0)&&Sn(e,t.name,n),Nn=(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}},Ln=(e,{buildScope:t="inserter"})=>n=>{const o=n.name;let r=!1;(0,l.hasBlockSupport)(n.name,"multiple",!0)||(r=_t(e,ft(e)).some((({name:e})=>e===n.name)));const{time:i,count:s=0}=Pn(e,o)||{},a={id:o,name:n.name,title:n.title,icon:n.icon,isDisabled:r,frecency:Nn(i,s)};if("transform"===t)return a;const c=(0,l.getBlockVariations)(n.name,"inserter");return{...a,initialAttributes:{},description:n.description,category:n.category,keywords:n.keywords,variations:c,example:n.example,utility:1}},An=(0,c.createRegistrySelector)((e=>(0,c.createSelector)(((t,n=null,o=st)=>{const r=Sn(t,"core/block",n)?te(e(ne)).getReusableBlocks().map((e=>{const n=e.wp_pattern_sync_status?U:{src:U,foreground:"var(--wp-block-synced-color)"},o=`core/block/${e.id}`,{time:r,count:i=0}=Pn(t,o)||{},s=Nn(r,i);return{id:o,name:"core/block",initialAttributes:{ref:e.id},title:e.title?.raw,icon:n,category:"reusable",keywords:["reusable"],isDisabled:!1,utility:1,frecency:s,content:e.content?.raw,syncStatus:e.wp_pattern_sync_status}})):[],i=Ln(t,{buildScope:"inserter"});let s=(0,l.getBlockTypes)().filter((e=>(0,l.hasBlockSupport)(e,"inserter",!0))).map(i);s=o[oe]?s.reduce(((e,o)=>{for(o.rootClientId=null!=n?n:"";!Sn(t,o.name,o.rootClientId);){if(!o.rootClientId){let e;try{e=Je(t)}catch(e){}e&&Sn(t,o.name,e)?o.rootClientId=e:delete o.rootClientId;break}{const e=Mt(t,o.rootClientId);o.rootClientId=e}}return o.hasOwnProperty("rootClientId")&&e.push(o),e}),[]):s.filter((e=>Rn(t,e,n)));const a=s.reduce(((e,n)=>{const{variations:o=[]}=n;if(o.some((({isDefault:e})=>e))||e.push(n),o.length){const r=((e,t)=>n=>{const o=`${t.id}/${n.name}`,{time:r,count:i=0}=Pn(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:Nn(r,i)}})(t,n);e.push(...o.map(r))}return e}),[]),{core:c,noncore:u}=a.reduce(((e,t)=>{const{core:n,noncore:o}=e;return(t.name.startsWith("core/")?n:o).push(t),e}),{core:[],noncore:[]});return[...[...c,...u],...r]}),((t,n)=>[(0,l.getBlockTypes)(),te(e(ne)).getReusableBlocks(),t.blocks.order,t.preferences.insertUsage,...de(t,n)])))),Dn=(0,c.createSelector)(((e,t,n=null)=>{const o=Array.isArray(t)?t:[t],r=Ln(e,{buildScope:"transform"}),i=(0,l.getBlockTypes)().filter((t=>Rn(e,t,n))).map(r),s=Object.fromEntries(Object.entries(i).map((([,e])=>[e.name,e]))),a=(0,l.getPossibleBlockTransformations)(o).reduce(((e,t)=>(s[t?.name]&&e.push(s[t.name]),e)),[]);return he(a,(e=>s[e.name].frecency),"desc")}),((e,t,n)=>[(0,l.getBlockTypes)(),e.preferences.insertUsage,...de(e,n)])),On=(0,c.createRegistrySelector)((e=>(t,n=null)=>{if((0,l.getBlockTypes)().some((e=>Rn(t,e,n))))return!0;return Sn(t,"core/block",n)&&te(e(ne)).getReusableBlocks().length>0})),zn=(0,c.createRegistrySelector)((e=>(0,c.createSelector)(((t,n=null)=>{if(!n)return;const o=(0,l.getBlockTypes)().filter((e=>Rn(t,e,n)));return Sn(t,"core/block",n)&&te(e(ne)).getReusableBlocks().length>0&&o.push("core/block"),o}),((t,n)=>[(0,l.getBlockTypes)(),te(e(ne)).getReusableBlocks(),...de(t,n)])))),Vn=(0,c.createSelector)(((e,t=null)=>(y()('wp.data.select( "core/block-editor" ).__experimentalGetAllowedBlocks',{alternative:'wp.data.select( "core/block-editor" ).getAllowedBlocks',since:"6.2",version:"6.4"}),zn(e,t))),((e,t)=>zn.getDependants(e,t)));function Fn(e,t=null){var n;if(!t)return;const{defaultBlock:o,directInsert:r}=null!==(n=e.blockListSettings[t])&&void 0!==n?n:{};return o&&r?o:void 0}function Hn(e,t=null){return y()('wp.data.select( "core/block-editor" ).__experimentalGetDirectInsertBlock',{alternative:'wp.data.select( "core/block-editor" ).getDirectInsertBlock',since:"6.3",version:"6.4"}),Fn(e,t)}const Gn=(0,c.createRegistrySelector)((e=>(t,n)=>{const o=te(e(ne)).getPatternBySlug(n);return o?se(o):null})),$n=e=>(t,n)=>[...ue(e)(t),...de(t,n)],Un=new WeakMap;function Wn(e){let t=Un.get(e);return t||(t={...e,get blocks(){return se(e).blocks}},Un.set(e,t)),t}const Kn=(0,c.createRegistrySelector)((e=>(0,c.createSelector)(((t,n=null)=>{const{getAllPatterns:o}=te(e(ne)),r=o(),{allowedBlockTypes:i}=Qn(t),s=r.filter((({inserter:e=!0})=>!!e)).map(Wn);return s.filter((e=>ce(le(e),i))).filter((e=>le(e).every((({blockName:e})=>wn(t,e,n)))))}),$n(e)))),Zn=(0,c.createRegistrySelector)((e=>(0,c.createSelector)(((t,n,o=null)=>{if(!n)return rt;const r=e(ne).__experimentalGetAllowedPatterns(o),i=Array.isArray(n)?n:[n],s=r.filter((e=>e?.blockTypes?.some?.((e=>i.includes(e)))));return 0===s.length?rt:s}),((t,n,o)=>$n(e)(t,o))))),qn=(0,c.createRegistrySelector)((e=>(y()('wp.data.select( "core/block-editor" ).__experimentalGetPatternsByBlockTypes',{alternative:'wp.data.select( "core/block-editor" ).getPatternsByBlockTypes',since:"6.2",version:"6.4"}),e(ne).getPatternsByBlockTypes))),Yn=(0,c.createRegistrySelector)((e=>(0,c.createSelector)(((t,n,o=null)=>{if(!n)return rt;if(n.some((({clientId:e,innerBlocks:n})=>n.length||co(t,e))))return rt;const r=Array.from(new Set(n.map((({name:e})=>e))));return e(ne).getPatternsByBlockTypes(r,o)}),((t,n,o)=>$n(e)(t,o)))));function Xn(e,t){return e.blockListSettings[t]}function Qn(e){return e.settings}function Jn(e){return e.blocks.isPersistentChange}const eo=(0,c.createSelector)(((e,t=[])=>t.reduce(((t,n)=>e.blockListSettings[n]?{...t,[n]:e.blockListSettings[n]}:t),{})),(e=>[e.blockListSettings])),to=(0,c.createRegistrySelector)((e=>(0,c.createSelector)(((t,n)=>{y()("wp.data.select( 'core/block-editor' ).__experimentalGetReusableBlockTitle",{since:"6.6",version:"6.8"});const o=te(e(ne)).getReusableBlocks().find((e=>e.id===n));return o?o.title?.raw:null}),(()=>[te(e(ne)).getReusableBlocks()]))));function no(e){return e.blocks.isIgnoredChange}function oo(e){return e.lastBlockAttributesChange}function ro(e){return"navigation"===e.editorMode}function io(e){return e.editorMode}function so(e){return e.hasBlockMovingClientId}function lo(e){return!!e.automaticChangeStatus}function ao(e,t){return e.highlightedBlock===t}function co(e,t){return!!e.blocks.controlledInnerBlocks[t]}const uo=(0,c.createSelector)(((e,t)=>{if(!t.length)return null;const n=Et(e);if(t.includes(lt(e,n)))return n;const o=Ft(e),r=Rt(e,n||o[0],t);return r?r[r.length-1]:null}),((e,t)=>[e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId,t]));function po(e,t,n){const{lastBlockInserted:o}=e;return o.clientIds?.includes(t)&&o.source===n}function ho(e,t){var n;return null===(n=e.blockVisibility?.[t])||void 0===n||n}function go(e){return e.hoveredBlockClientId}const mo=(0,c.createSelector)((e=>{const t=new Set(Object.keys(e.blockVisibility).filter((t=>e.blockVisibility[t])));return 0===t.size?it:t}),(e=>[e.blockVisibility]));function fo(e,t){if("default"!==ko(e,t))return!1;if(!Tn(e,t))return!0;const n=io(e);if("zoom-out"===n){const n=Je(e);if(n){const o=tn(e,n);if(o?.includes(t))return!0}else if(t&&!Mt(e,t))return!0}const o=(0,l.hasBlockSupport)(lt(e,t),"__experimentalDisableBlockOverlay",!1);return("navigation"===n||!o&&co(e,t))&&!on(e,t)&&!rn(e,t,!0)}function bo(e,t){let n=e.blocks.parents.get(t);for(;n;){if(fo(e,n))return!0;n=e.blocks.parents.get(n)}return!1}const ko=(0,c.createRegistrySelector)((e=>(t,n="")=>{null===n&&(n="");if("zoom-out"===io(t)){const e=Je(t);if(""===n)return e?"disabled":"contentOnly";if(n===e)return"contentOnly";const o=tn(t,e);return o?.includes(n)?"contentOnly":"disabled"}const o=t.blockEditingModes.get(n);if(o)return o;if(!n)return"default";const r=Mt(t,n);if("contentOnly"===yn(t,r)){const o=lt(t,n),{hasContentRoleAttribute:r}=te(e(l.store));return r(o)?"contentOnly":"disabled"}const i=ko(t,r);return"contentOnly"===i?"default":i})),vo=(0,c.createRegistrySelector)((e=>(t,n="")=>{const o=n||Et(t);if(!o)return!1;const{getGroupingBlockName:r}=e(l.store),i=ut(t,o),s=r();return i&&(i.name===s||(0,l.getBlockType)(i.name)?.transforms?.ungroup)&&!!i.innerBlocks.length&&Bn(t,o)})),_o=(0,c.createRegistrySelector)((e=>(t,n=rt)=>{const{getGroupingBlockName:o}=e(l.store),r=o(),i=n?.length?n:Vt(t),s=i?.length?Mt(t,i[0]):void 0;return wn(t,r,s)&&i.length&&In(t,i)})),xo=(e,t)=>(y()("wp.data.select( 'core/block-editor' ).__unstableGetContentLockingParent",{since:"6.1",version:"6.7"}),Ze(e,t));function yo(e){return y()("wp.data.select( 'core/block-editor' ).__unstableGetTemporarilyEditingAsBlocks",{since:"6.1",version:"6.7"}),qe(e)}function So(e){return y()("wp.data.select( 'core/block-editor' ).__unstableGetTemporarilyEditingFocusModeToRevert",{since:"6.5",version:"6.7"}),Ye(e)}const wo=["inserterMediaCategories","blockInspectorAnimation"];function Co(e,{stripExperimentalSettings:t=!1,reset:n=!1}={}){let o=e;if(t&&"web"===a.Platform.OS){o={};for(const t in e)wo.includes(t)||(o[t]=e[t])}return{type:"UPDATE_SETTINGS",settings:o,reset:n}}function Bo(){return{type:"HIDE_BLOCK_INTERFACE"}}function Io(){return{type:"SHOW_BLOCK_INTERFACE"}}const jo=(e,t=!0,n=!1)=>({select:o,dispatch:r,registry:i})=>{if(!e||!e.length)return;var s;s=e,e=Array.isArray(s)?s:[s];if(!o.canRemoveBlocks(e))return;const l=!n&&o.getBlockRemovalRules();if(l){function a(e){const t=[],n=[...e];for(;n.length;){const{innerBlocks:e,...o}=n.shift();n.push(...e),t.push(o)}return t}const c=a(e.map(o.getBlock));let u;for(const d of l)if(u=d.callback(c),u)return void r(To(e,t,u))}t&&r.selectPreviousBlock(e[0],t),i.batch((()=>{r({type:"REMOVE_BLOCKS",clientIds:e}),r(Eo())}))},Eo=()=>({select:e,dispatch:t})=>{if(e.getBlockCount()>0)return;const{__unstableHasCustomAppender:n}=e.getSettings();n||t.insertDefaultBlock()};function To(e,t,n){return{type:"DISPLAY_BLOCK_REMOVAL_PROMPT",clientIds:e,selectPrevious:t,message:n}}function Mo(){return{type:"CLEAR_BLOCK_REMOVAL_PROMPT"}}function Po(e=!1){return{type:"SET_BLOCK_REMOVAL_RULES",rules:e}}function Ro(e){return{type:"SET_OPENED_BLOCK_SETTINGS_MENU",clientId:e}}function No(e,t){return{type:"SET_STYLE_OVERRIDE",id:e,style:t}}function Lo(e){return{type:"DELETE_STYLE_OVERRIDE",id:e}}function Ao(e=null){return{type:"LAST_FOCUS",lastFocus:e}}function Do(e){return({select:t,dispatch:n,registry:o})=>{const r=te(o.select(li)).getTemporarilyEditingFocusModeToRevert();n.__unstableMarkNextChangeAsNotPersistent(),n.updateBlockAttributes(e,{templateLock:"contentOnly"}),n.updateBlockListSettings(e,{...t.getBlockListSettings(e),templateLock:"contentOnly"}),n.updateSettings({focusMode:r}),n.__unstableSetTemporarilyEditingAsBlocks()}}function Oo(){return{type:"START_DRAGGING"}}function zo(){return{type:"STOP_DRAGGING"}}function Vo(e){return{type:"SET_BLOCK_EXPANDED_IN_LIST_VIEW",clientId:e}}const Fo=e=>({select:t,dispatch:n})=>{n.selectBlock(e),n.__unstableMarkNextChangeAsNotPersistent(),n.updateBlockAttributes(e,{templateLock:void 0}),n.updateBlockListSettings(e,{...t.getBlockListSettings(e),templateLock:!1});const o=t.getSettings().focusMode;n.updateSettings({focusMode:!0}),n.__unstableSetTemporarilyEditingAsBlocks(e,o)};function Ho(e=100){return{type:"SET_ZOOM_LEVEL",zoom:e}}function Go(){return{type:"RESET_ZOOM_LEVEL"}}const $o=window.wp.a11y,Uo=window.wp.notices,Wo="";function Ko(e){if(e)return Object.keys(e).find((t=>{const n=e[t];return("string"==typeof n||n instanceof W.RichTextData)&&-1!==n.toString().indexOf(Wo)}))}function Zo(e){for(const[t,n]of Object.entries(e.attributes))if("rich-text"===n.source||"html"===n.source)return t}const qo=e=>Array.isArray(e)?e:[e],Yo=e=>({dispatch:t})=>{t({type:"RESET_BLOCKS",blocks:e}),t(Xo(e))},Xo=e=>({select:t,dispatch:n})=>{const o=t.getTemplate(),r=t.getTemplateLock(),i=!o||"all"!==r||(0,l.doBlocksMatchTemplate)(e,o);if(i!==t.isValidTemplate())return n.setTemplateValidity(i),i};function Qo(e,t,n){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t,initialPosition:n}}function Jo(e){return y()('wp.data.dispatch( "core/block-editor" ).receiveBlocks',{since:"5.9",alternative:"resetBlocks or insertBlocks"}),{type:"RECEIVE_BLOCKS",blocks:e}}function er(e,t,n=!1){return{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:qo(e),attributes:t,uniqueByBlock:n}}function tr(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function nr(e,t=0){return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}function or(e){return{type:"HOVER_BLOCK",clientId:e}}const rr=(e,t=!1)=>({select:n,dispatch:o})=>{const r=n.getPreviousBlockClientId(e);if(r)o.selectBlock(r,-1);else if(t){const t=n.getBlockRootClientId(e);t&&o.selectBlock(t,-1)}},ir=e=>({select:t,dispatch:n})=>{const o=t.getNextBlockClientId(e);o&&n.selectBlock(o)};function sr(){return{type:"START_MULTI_SELECT"}}function lr(){return{type:"STOP_MULTI_SELECT"}}const ar=(e,t,n=0)=>({select:o,dispatch:r})=>{if(o.getBlockRootClientId(e)!==o.getBlockRootClientId(t))return;r({type:"MULTI_SELECT",start:e,end:t,initialPosition:n});const i=o.getSelectedBlockCount();(0,$o.speak)((0,C.sprintf)((0,C._n)("%s block selected.","%s blocks selected.",i),i),"assertive")};function cr(){return{type:"CLEAR_SELECTED_BLOCK"}}function ur(e=!0){return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}const dr=(e,t,n,o=0,r)=>({select:i,dispatch:s,registry:l})=>{e=qo(e),t=qo(t);const a=i.getBlockRootClientId(e[0]);for(let e=0;e<t.length;e++){const n=t[e];if(!i.canInsertBlockType(n.name,a))return}l.batch((()=>{s({type:"REPLACE_BLOCKS",clientIds:e,blocks:t,time:Date.now(),indexToSelect:n,initialPosition:o,meta:r}),s.ensureDefaultBlock()}))};function pr(e,t){return dr(e,t)}const hr=e=>(t,n)=>({select:o,dispatch:r})=>{o.canMoveBlocks(t)&&r({type:e,clientIds:qo(t),rootClientId:n})},gr=hr("MOVE_BLOCKS_DOWN"),mr=hr("MOVE_BLOCKS_UP"),fr=(e,t="",n="",o)=>({select:r,dispatch:i})=>{if(r.canMoveBlocks(e)){if(t!==n){if(!r.canRemoveBlocks(e))return;if(!r.canInsertBlocks(e,n))return}i({type:"MOVE_BLOCKS_TO_POSITION",fromRootClientId:t,toRootClientId:n,clientIds:e,index:o})}};function br(e,t="",n="",o){return fr([e],t,n,o)}function kr(e,t,n,o,r){return vr([e],t,n,o,0,r)}const vr=(e,t,n,o=!0,r=0,i)=>({select:s,dispatch:l})=>{null!==r&&"object"==typeof r&&(i=r,r=0,y()("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=qo(e);const a=[];for(const t of e){s.canInsertBlockType(t.name,n)&&a.push(t)}a.length&&l({type:"INSERT_BLOCKS",blocks:a,index:t,rootClientId:n,time:Date.now(),updateSelection:o,initialPosition:o?r:null,meta:i})};function _r(e,t,n={}){const{__unstableWithInserter:o,operation:r,nearestSide:i}=n;return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t,__unstableWithInserter:o,operation:r,nearestSide:i}}const xr=()=>({select:e,dispatch:t})=>{e.isBlockInsertionPointVisible()&&t({type:"HIDE_INSERTION_POINT"})};function yr(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}const Sr=()=>({select:e,dispatch:t})=>{t({type:"SYNCHRONIZE_TEMPLATE"});const n=e.getBlocks(),o=e.getTemplate(),r=(0,l.synchronizeBlocksWithTemplate)(n,o);t.resetBlocks(r)},wr=e=>({registry:t,select:n,dispatch:o})=>{const r=n.getSelectionStart(),i=n.getSelectionEnd();if(r.clientId===i.clientId)return;if(!r.attributeKey||!i.attributeKey||void 0===r.offset||void 0===i.offset)return!1;const s=n.getBlockRootClientId(r.clientId);if(s!==n.getBlockRootClientId(i.clientId))return;const a=n.getBlockOrder(s);let c,u;a.indexOf(r.clientId)>a.indexOf(i.clientId)?(c=i,u=r):(c=r,u=i);const d=e?u:c,p=n.getBlock(d.clientId),h=(0,l.getBlockType)(p.name);if(!h.merge)return;const g=c,m=u,f=n.getBlock(g.clientId),b=n.getBlock(m.clientId),k=f.attributes[g.attributeKey],v=b.attributes[m.attributeKey];let _=(0,W.create)({html:k}),x=(0,W.create)({html:v});_=(0,W.remove)(_,g.offset,_.text.length),x=(0,W.insert)(x,Wo,0,m.offset);const y=(0,l.cloneBlock)(f,{[g.attributeKey]:(0,W.toHTMLString)({value:_})}),S=(0,l.cloneBlock)(b,{[m.attributeKey]:(0,W.toHTMLString)({value:x})}),w=e?y:S,C=f.name===b.name?[w]:(0,l.switchToBlockType)(w,h.name);if(!C||!C.length)return;let B;if(e){const e=C.pop();B=h.merge(e.attributes,S.attributes)}else{const e=C.shift();B=h.merge(y.attributes,e.attributes)}const I=Ko(B),j=B[I],E=(0,W.create)({html:j}),T=E.text.indexOf(Wo),M=(0,W.remove)(E,T,T+1),P=(0,W.toHTMLString)({value:M});B[I]=P;const R=n.getSelectedBlockClientIds(),N=[...e?C:[],{...p,attributes:{...p.attributes,...B}},...e?[]:C];t.batch((()=>{o.selectionChange(p.clientId,I,T,T),o.replaceBlocks(R,N,0,n.getSelectedBlocksInitialCaretPosition())}))},Cr=(e=[])=>({registry:t,select:n,dispatch:o})=>{const r=n.getSelectionStart(),i=n.getSelectionEnd(),s=n.getBlockRootClientId(r.clientId),a=n.getBlockRootClientId(i.clientId);if(s!==a)return;const c=n.getBlockOrder(s);let u,d;c.indexOf(r.clientId)>c.indexOf(i.clientId)?(u=i,d=r):(u=r,d=i);const p=u,h=d,g=n.getBlock(p.clientId),m=n.getBlock(h.clientId),f=(0,l.getBlockType)(g.name),b=(0,l.getBlockType)(m.name),k="string"==typeof p.attributeKey?p.attributeKey:Zo(f),v="string"==typeof h.attributeKey?h.attributeKey:Zo(b),_=n.getBlockAttributes(p.clientId),x=_?.metadata?.bindings;if(x?.[k]){if(e.length){const{createWarningNotice:O}=t.dispatch(Uo.store);return void O((0,C.__)("Blocks can't be inserted into other blocks with bindings"),{type:"snackbar"})}return void o.insertAfterBlock(p.clientId)}if(!k||!v||void 0===r.offset||void 0===i.offset)return;if(p.clientId===h.clientId&&k===v&&p.offset===h.offset)if(e.length){if((0,l.isUnmodifiedDefaultBlock)(g))return void o.replaceBlocks([p.clientId],e,e.length-1,-1)}else if(!n.getBlockOrder(p.clientId).length){function z(){const e=(0,l.getDefaultBlockName)();return n.canInsertBlockType(e,s)?(0,l.createBlock)(e):(0,l.createBlock)(n.getBlockName(p.clientId))}const V=_[k].length;if(0===p.offset&&V)return void o.insertBlocks([z()],n.getBlockIndex(p.clientId),s,!1);if(p.offset===V)return void o.insertBlocks([z()],n.getBlockIndex(p.clientId)+1,s)}const y=g.attributes[k],S=m.attributes[v];let w=(0,W.create)({html:y}),B=(0,W.create)({html:S});w=(0,W.remove)(w,p.offset,w.text.length),B=(0,W.remove)(B,0,h.offset);let I={...g,innerBlocks:g.clientId===m.clientId?[]:g.innerBlocks,attributes:{...g.attributes,[k]:(0,W.toHTMLString)({value:w})}},j={...m,clientId:g.clientId===m.clientId?(0,l.createBlock)(m.name).clientId:m.clientId,attributes:{...m.attributes,[v]:(0,W.toHTMLString)({value:B})}};const E=(0,l.getDefaultBlockName)();if(g.clientId===m.clientId&&E&&j.name!==E&&n.canInsertBlockType(E,s)){const F=(0,l.switchToBlockType)(j,E);1===F?.length&&(j=F[0])}if(!e.length)return void o.replaceBlocks(n.getSelectedBlockClientIds(),[I,j]);let T;const M=[],P=[...e],R=P.shift(),N=(0,l.getBlockType)(I.name),L=N.merge&&R.name===N.name?[R]:(0,l.switchToBlockType)(R,N.name);if(L?.length){const H=L.shift();I={...I,attributes:{...I.attributes,...N.merge(I.attributes,H.attributes)}},M.push(I),T={clientId:I.clientId,attributeKey:k,offset:(0,W.create)({html:I.attributes[k]}).text.length},P.unshift(...L)}else(0,l.isUnmodifiedBlock)(I)||M.push(I),M.push(R);const A=P.pop(),D=(0,l.getBlockType)(j.name);if(P.length&&M.push(...P),A){const G=D.merge&&D.name===A.name?[A]:(0,l.switchToBlockType)(A,D.name);if(G?.length){const $=G.pop();M.push({...j,attributes:{...j.attributes,...D.merge($.attributes,j.attributes)}}),M.push(...G),T={clientId:j.clientId,attributeKey:v,offset:(0,W.create)({html:$.attributes[v]}).text.length}}else M.push(A),(0,l.isUnmodifiedBlock)(j)||M.push(j)}else(0,l.isUnmodifiedBlock)(j)||M.push(j);t.batch((()=>{o.replaceBlocks(n.getSelectedBlockClientIds(),M,M.length-1,0),T&&o.selectionChange(T.clientId,T.attributeKey,T.offset,T.offset)}))},Br=()=>({select:e,dispatch:t})=>{const n=e.getSelectionStart(),o=e.getSelectionEnd();t.selectionChange({start:{clientId:n.clientId},end:{clientId:o.clientId}})},Ir=(e,t)=>({registry:n,select:o,dispatch:r})=>{const i=e,s=t,a=o.getBlock(i),c=(0,l.getBlockType)(a.name);if(!c)return;const u=o.getBlock(s);if(!c.merge&&(0,l.getBlockSupport)(a.name,"__experimentalOnMerge")){const e=(0,l.switchToBlockType)(u,c.name);if(1!==e?.length)return void r.selectBlock(a.clientId);const[t]=e;return t.innerBlocks.length<1?void r.selectBlock(a.clientId):void n.batch((()=>{r.insertBlocks(t.innerBlocks,void 0,i),r.removeBlock(s),r.selectBlock(t.innerBlocks[0].clientId);const e=o.getNextBlockClientId(i);if(e&&o.getBlockName(i)===o.getBlockName(e)){const t=o.getBlockAttributes(i),n=o.getBlockAttributes(e);Object.keys(t).every((e=>t[e]===n[e]))&&(r.moveBlocksToPosition(o.getBlockOrder(e),e,i),r.removeBlock(e,!1))}}))}if((0,l.isUnmodifiedDefaultBlock)(a))return void r.removeBlock(i,o.isBlockSelected(i));if((0,l.isUnmodifiedDefaultBlock)(u))return void r.removeBlock(s,o.isBlockSelected(s));if(!c.merge)return void r.selectBlock(a.clientId);const d=(0,l.getBlockType)(u.name),{clientId:p,attributeKey:h,offset:g}=o.getSelectionStart(),m=(p===i?c:d).attributes[h],f=(p===i||p===s)&&void 0!==h&&void 0!==g&&!!m;m||("number"==typeof h?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 h):window.console.error("The RichText identifier prop does not match any attributes defined by the block."));const b=(0,l.cloneBlock)(a),k=(0,l.cloneBlock)(u);if(f){const e=p===i?b:k,t=e.attributes[h],n=(0,W.insert)((0,W.create)({html:t}),Wo,g,g);e.attributes[h]=(0,W.toHTMLString)({value:n})}const v=a.name===u.name?[k]:(0,l.switchToBlockType)(k,a.name);if(!v||!v.length)return;const _=c.merge(b.attributes,v[0].attributes);if(f){const e=Ko(_),t=_[e],n=(0,W.create)({html:t}),o=n.text.indexOf(Wo),i=(0,W.remove)(n,o,o+1),s=(0,W.toHTMLString)({value:i});_[e]=s,r.selectionChange(a.clientId,e,o,o)}r.replaceBlocks([a.clientId,u.clientId],[{...a,attributes:{...a.attributes,..._}},...v.slice(1)],0)},jr=(e,t=!0)=>jo(e,t);function Er(e,t){return jr([e],t)}function Tr(e,t,n=!1,o=0){return{type:"REPLACE_INNER_BLOCKS",rootClientId:e,blocks:t,updateSelection:n,initialPosition:n?o:null,time:Date.now()}}function Mr(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function Pr(){return{type:"START_TYPING"}}function Rr(){return{type:"STOP_TYPING"}}function Nr(e=[]){return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function Lr(){return{type:"STOP_DRAGGING_BLOCKS"}}function Ar(){return y()('wp.data.dispatch( "core/block-editor" ).enterFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function Dr(){return y()('wp.data.dispatch( "core/block-editor" ).exitFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function Or(e,t,n,o){return"string"==typeof e?{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:n,endOffset:o}:{type:"SELECTION_CHANGE",...e}}const zr=(e,t,n)=>({dispatch:o})=>{const r=(0,l.getDefaultBlockName)();if(!r)return;const i=(0,l.createBlock)(r,e);return o.insertBlock(i,n,t)};function Vr(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function Fr(e){return Co(e,{stripExperimentalSettings:!0})}function Hr(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function Gr(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function $r(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}const Ur=()=>({dispatch:e})=>{e({type:"MARK_AUTOMATIC_CHANGE"});const{requestIdleCallback:t=(e=>setTimeout(e,100))}=window;t((()=>{e({type:"MARK_AUTOMATIC_CHANGE_FINAL"})}))},Wr=(e=!0)=>({dispatch:t})=>{t.__unstableSetEditorMode(e?"navigation":"edit")},Kr=e=>({dispatch:t,select:n})=>{if("zoom-out"===e){const e=n.getBlockSelectionStart(),o=n.getSectionRootClientId();if(e){let r;if(o){const t=n.getBlockOrder(o);r=t?.includes(e)?e:n.getBlockParents(e).find((e=>t.includes(e)))}else r=n.getBlockHierarchyRootClientId(e);r?t.selectBlock(r):t.clearSelectedBlock()}}t({type:"SET_EDITOR_MODE",mode:e}),"navigation"===e?(0,$o.speak)((0,C.__)("You are currently in navigation mode. Navigate blocks using the Tab key and Arrow keys. Use Left and Right Arrow keys to move between nesting levels. To exit navigation mode and edit the selected block, press Enter.")):"edit"===e?(0,$o.speak)((0,C.__)("You are currently in edit mode. To return to the navigation mode, press Escape.")):"zoom-out"===e&&(0,$o.speak)((0,C.__)("You are currently in zoom-out mode."))},Zr=(e=null)=>({dispatch:t})=>{t({type:"SET_BLOCK_MOVING_MODE",hasBlockMovingClientId:e}),e&&(0,$o.speak)((0,C.__)("Use the Tab key and Arrow keys to choose new block location. Use Left and Right Arrow keys to move between nesting levels. Once location is selected press Enter or Space to move the block."))},qr=(e,t=!0)=>({select:n,dispatch:o})=>{if(!e||!e.length)return;const r=n.getBlocksByClientId(e);if(r.some((e=>!e)))return;const i=r.map((e=>e.name));if(i.some((e=>!(0,l.hasBlockSupport)(e,"multiple",!0))))return;const s=n.getBlockRootClientId(e[0]),a=qo(e),c=n.getBlockIndex(a[a.length-1]),u=r.map((e=>(0,l.__experimentalCloneSanitizedBlock)(e)));return o.insertBlocks(u,c+1,s,t),u.length>1&&t&&o.multiSelect(u[0].clientId,u[u.length-1].clientId),u.map((e=>e.clientId))},Yr=e=>({select:t,dispatch:n})=>{if(!e)return;const o=t.getBlockRootClientId(e);if(t.getTemplateLock(o))return;const r=t.getBlockIndex(e),i=o?t.getDirectInsertBlock(o):null;if(!i)return n.insertDefaultBlock({},o,r);const s={};if(i.attributesToCopy){const n=t.getBlockAttributes(e);i.attributesToCopy.forEach((e=>{n[e]&&(s[e]=n[e])}))}const a=(0,l.createBlock)(i.name,{...i.attributes,...s});return n.insertBlock(a,r,o)},Xr=e=>({select:t,dispatch:n})=>{if(!e)return;const o=t.getBlockRootClientId(e);if(t.getTemplateLock(o))return;const r=t.getBlockIndex(e),i=o?t.getDirectInsertBlock(o):null;if(!i)return n.insertDefaultBlock({},o,r+1);const s={};if(i.attributesToCopy){const n=t.getBlockAttributes(e);i.attributesToCopy.forEach((e=>{n[e]&&(s[e]=n[e])}))}const a=(0,l.createBlock)(i.name,{...i.attributes,...s});return n.insertBlock(a,r+1,o)};function Qr(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}const Jr=e=>async({dispatch:t})=>{t(Qr(e,!0)),await new Promise((e=>setTimeout(e,150))),t(Qr(e,!1))};function ei(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}function ti(e){return{type:"SET_BLOCK_VISIBILITY",updates:e}}function ni(e,t){return{type:"SET_TEMPORARILY_EDITING_AS_BLOCKS",temporarilyEditingAsBlocks:e,focusModeToRevert:t}}const oi=e=>({select:t,dispatch:n})=>{if(!e||"object"!=typeof e)return void console.error("Category should be an `InserterMediaCategory` object.");if(!e.name)return void console.error("Category should have a `name` that should be unique among all media categories.");if(!e.labels?.name)return void console.error("Category should have a `labels.name`.");if(!["image","audio","video"].includes(e.mediaType))return void console.error("Category should have `mediaType` property that is one of `image|audio|video`.");if(!e.fetch||"function"!=typeof e.fetch)return void console.error("Category should have a `fetch` function defined with the following signature `(InserterMediaRequest) => Promise<InserterMediaItem[]>`.");const o=t.getRegisteredInserterMediaCategories();o.some((({name:t})=>t===e.name))?console.error(`A category is already registered with the same name: "${e.name}".`):o.some((({labels:{name:t}={}})=>t===e.labels?.name))?console.error(`A category is already registered with the same labels.name: "${e.labels.name}".`):n({type:"REGISTER_INSERTER_MEDIA_CATEGORY",category:{...e,isExternalResource:!0}})};function ri(e="",t){return{type:"SET_BLOCK_EDITING_MODE",clientId:e,mode:t}}function ii(e=""){return{type:"UNSET_BLOCK_EDITING_MODE",clientId:e}}const si={reducer:H,selectors:t,actions:i},li=(0,c.createReduxStore)(ne,{...si,persist:["preferences"]}),ai=(0,c.registerStore)(ne,{...si,persist:["preferences"]});function ci(...e){const{clientId:t=null}=_();return(0,c.useSelect)((n=>te(n(li)).getBlockSettings(t,...e)),[t,...e])}function ui(e){y()("wp.blockEditor.useSetting",{since:"6.5",alternative:"wp.blockEditor.useSettings",note:"The new useSettings function can retrieve multiple settings at once, with better performance."});const[t]=ci(e);return t}te(ai).registerPrivateActions(r),te(ai).registerPrivateSelectors(e),te(li).registerPrivateActions(r),te(li).registerPrivateSelectors(e);const di=window.wp.styleEngine,pi="1600px",hi="320px",gi=1,mi=.25,fi=.75,bi="14px";function ki({minimumFontSize:e,maximumFontSize:t,fontSize:n,minimumViewportWidth:o=hi,maximumViewportWidth:r=pi,scaleFactor:i=gi,minimumFontSizeLimit:s}){if(s=vi(s)?s:bi,n){const o=vi(n);if(!o?.unit)return null;const r=vi(s,{coerceTo:o.unit});if(r?.value&&!e&&!t&&o?.value<=r?.value)return null;if(t||(t=`${o.value}${o.unit}`),!e){const t="px"===o.unit?o.value:16*o.value,n=Math.min(Math.max(1-.075*Math.log2(t),mi),fi),i=_i(o.value*n,3);e=r?.value&&i<r?.value?`${r.value}${r.unit}`:`${i}${o.unit}`}}const l=vi(e),a=l?.unit||"rem",c=vi(t,{coerceTo:a});if(!l||!c)return null;const u=vi(e,{coerceTo:"rem"}),d=vi(r,{coerceTo:a}),p=vi(o,{coerceTo:a});if(!d||!p||!u)return null;const h=d.value-p.value;if(!h)return null;const g=_i(p.value/100,3),m=_i(g,3)+a,f=_i(((c.value-l.value)/h*100||1)*i,3);return`clamp(${e}, ${`${u.value}${u.unit} + ((1vw - ${m}) * ${f})`}, ${t})`}function vi(e,t={}){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},i=r?.join("|"),s=new RegExp(`^(\\d*\\.?\\d+)(${i}){1,1}$`),l=e.match(s);if(!l||l.length<3)return null;let[,a,c]=l,u=parseFloat(a);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:_i(u,3),unit:c}}function _i(e,t=3){const n=Math.pow(10,t);return Number.isFinite(e)?parseFloat(Math.round(e*n)/n):void 0}function xi(e){if(!e)return{};if("object"==typeof e)return e;let t;switch(e){case"normal":case"400":t=(0,C._x)("Regular","font weight");break;case"bold":case"700":t=(0,C._x)("Bold","font weight");break;case"100":t=(0,C._x)("Thin","font weight");break;case"200":t=(0,C._x)("Extra Light","font weight");break;case"300":t=(0,C._x)("Light","font weight");break;case"500":t=(0,C._x)("Medium","font weight");break;case"600":t=(0,C._x)("Semi Bold","font weight");break;case"800":t=(0,C._x)("Extra Bold","font weight");break;case"900":t=(0,C._x)("Black","font weight");break;case"1000":t=(0,C._x)("Extra Black","font weight");break;default:t=e}return{name:t,value:e}}const yi=[{name:(0,C._x)("Regular","font style"),value:"normal"},{name:(0,C._x)("Italic","font style"),value:"italic"}],Si=[{name:(0,C._x)("Thin","font weight"),value:"100"},{name:(0,C._x)("Extra Light","font weight"),value:"200"},{name:(0,C._x)("Light","font weight"),value:"300"},{name:(0,C._x)("Regular","font weight"),value:"400"},{name:(0,C._x)("Medium","font weight"),value:"500"},{name:(0,C._x)("Semi Bold","font weight"),value:"600"},{name:(0,C._x)("Bold","font weight"),value:"700"},{name:(0,C._x)("Extra Bold","font weight"),value:"800"},{name:(0,C._x)("Black","font weight"),value:"900"},{name:(0,C._x)("Extra Black","font weight"),value:"1000"}];function wi(e){let t=[],n=[];const o=[],r=!e||0===e?.length;let i=!1;return e?.forEach((e=>{if("string"==typeof e.fontWeight&&/\s/.test(e.fontWeight.trim())){i=!0;let[t,o]=e.fontWeight.split(" ");t=parseInt(t.slice(0,1)),o="1000"===o?10:parseInt(o.slice(0,1));for(let e=t;e<=o;e++){const t=`${e.toString()}00`;n.some((e=>e.value===t))||n.push(xi(t))}}const o=xi("number"==typeof e.fontWeight?e.fontWeight.toString():e.fontWeight),r=function(e){if(!e)return{};if("object"==typeof e)return e;let t;switch(e){case"normal":t=(0,C._x)("Regular","font style");break;case"italic":t=(0,C._x)("Italic","font style");break;case"oblique":t=(0,C._x)("Oblique","font style");break;default:t=e}return{name:t,value:e}}(e.fontStyle);r&&Object.keys(r).length&&(t.some((e=>e.value===r.value))||t.push(r)),o&&Object.keys(o).length&&(n.some((e=>e.value===o.value))||i||n.push(o))})),n.some((e=>e.value>="600"))||n.push({name:(0,C._x)("Bold","font weight"),value:"700"}),t.some((e=>"italic"===e.value))||t.push({name:(0,C._x)("Italic","font style"),value:"italic"}),r&&(t=yi,n=Si),t=0===t.length?yi:t,n=0===n.length?Si:n,t.forEach((({name:e,value:t})=>{n.forEach((({name:n,value:r})=>{const i="normal"===t?n:(0,C.sprintf)((0,C._x)("%1$s %2$s","font"),n,e);o.push({key:`${t}-${r}`,name:i,style:{fontStyle:t,fontWeight:r}})}))})),{fontStyles:t,fontWeights:n,combinedStyleAndWeightOptions:o,isSystemFont:r,isVariableFont:i}}function Ci(e,t){const{size:n}=e;if(!n||"0"===n||!1===e?.fluid)return n;if(!Bi(t?.typography)&&!Bi(e))return n;let o=function(e){const t=e?.typography,n=e?.layout,o=vi(n?.wideSize)?n?.wideSize:null;return Bi(t)&&o?{fluid:{maxViewportWidth:o,...t.fluid}}:{fluid:t?.fluid}}(t);o="object"==typeof o?.fluid?o?.fluid:{};const r=ki({minimumFontSize:e?.fluid?.min,maximumFontSize:e?.fluid?.max,fontSize:n,minimumFontSizeLimit:o?.minFontSize,maximumViewportWidth:o?.maxViewportWidth,minimumViewportWidth:o?.minViewportWidth});return r||n}function Bi(e){const t=e?.fluid;return!0===t||t&&"object"==typeof t&&Object.keys(t).length>0}function Ii(e,t){if(!(t="number"==typeof t?t.toString():t)||"string"!=typeof t)return"";if(!e||0===e.length)return t;const n=e?.reduce(((e,{value:n})=>Math.abs(parseInt(n)-parseInt(t))<Math.abs(parseInt(e)-parseInt(t))?n:e),e[0]?.value);return n}const ji="body",Ei=":root",Ti=[{path:["color","palette"],valueKey:"color",cssVarInfix:"color",classes:[{classSuffix:"color",propertyName:"color"},{classSuffix:"background-color",propertyName:"background-color"},{classSuffix:"border-color",propertyName:"border-color"}]},{path:["color","gradients"],valueKey:"gradient",cssVarInfix:"gradient",classes:[{classSuffix:"gradient-background",propertyName:"background"}]},{path:["color","duotone"],valueKey:"colors",cssVarInfix:"duotone",valueFunc:({slug:e})=>`url( '#wp-duotone-${e}' )`,classes:[]},{path:["shadow","presets"],valueKey:"shadow",cssVarInfix:"shadow",classes:[]},{path:["typography","fontSizes"],valueFunc:(e,t)=>Ci(e,t),valueKey:"size",cssVarInfix:"font-size",classes:[{classSuffix:"font-size",propertyName:"font-size"}]},{path:["typography","fontFamilies"],valueKey:"fontFamily",cssVarInfix:"font-family",classes:[{classSuffix:"font-family",propertyName:"font-family"}]},{path:["spacing","spacingSizes"],valueKey:"size",cssVarInfix:"spacing",valueFunc:({size:e})=>e,classes:[]}],Mi={"color.background":"color","color.text":"color","filter.duotone":"duotone","elements.link.color.text":"color","elements.link.:hover.color.text":"color","elements.link.typography.fontFamily":"font-family","elements.link.typography.fontSize":"font-size","elements.button.color.text":"color","elements.button.color.background":"color","elements.caption.color.text":"color","elements.button.typography.fontFamily":"font-family","elements.button.typography.fontSize":"font-size","elements.heading.color":"color","elements.heading.color.background":"color","elements.heading.typography.fontFamily":"font-family","elements.heading.gradient":"gradient","elements.heading.color.gradient":"gradient","elements.h1.color":"color","elements.h1.color.background":"color","elements.h1.typography.fontFamily":"font-family","elements.h1.color.gradient":"gradient","elements.h2.color":"color","elements.h2.color.background":"color","elements.h2.typography.fontFamily":"font-family","elements.h2.color.gradient":"gradient","elements.h3.color":"color","elements.h3.color.background":"color","elements.h3.typography.fontFamily":"font-family","elements.h3.color.gradient":"gradient","elements.h4.color":"color","elements.h4.color.background":"color","elements.h4.typography.fontFamily":"font-family","elements.h4.color.gradient":"gradient","elements.h5.color":"color","elements.h5.color.background":"color","elements.h5.typography.fontFamily":"font-family","elements.h5.color.gradient":"gradient","elements.h6.color":"color","elements.h6.color.background":"color","elements.h6.typography.fontFamily":"font-family","elements.h6.color.gradient":"gradient","color.gradient":"gradient",shadow:"shadow","typography.fontSize":"font-size","typography.fontFamily":"font-family"};function Pi(){return(0,u.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}}}function Ri(e,t,n,o,r){const i=[_e(e,["blocks",t,...n]),_e(e,n)];for(const s of i)if(s){const i=["custom","theme","default"];for(const l of i){const i=s[l];if(i){const s=i.find((e=>e[o]===r));if(s){if("slug"===o)return s;return Ri(e,t,n,"slug",s.slug)[o]===s[o]?s:void 0}}}}}function Ni(e,t,n){if(!n||"string"!=typeof n){if("string"!=typeof n?.ref)return n;if(!(n=_e(e,n.ref))||n?.ref)return n}const o="var:",r="var(--wp--";let i;if(n.startsWith(o))i=n.slice(4).split("|");else{if(!n.startsWith(r)||!n.endsWith(")"))return n;i=n.slice(10,-1).split("--")}const[s,...l]=i;return"preset"===s?function(e,t,n,[o,r]){const i=Ti.find((e=>e.cssVarInfix===o));if(!i)return n;const s=Ri(e.settings,t,i.path,"slug",r);if(s){const{valueKey:n}=i;return Ni(e,t,s[n])}return n}(e,t,n,l):"custom"===s?function(e,t,n,o){var r;const i=null!==(r=_e(e.settings,["blocks",t,"custom",...o]))&&void 0!==r?r:_e(e.settings,["custom",...o]);return i?Ni(e,t,i):n}(e,t,n,l):n}function Li(e,t){if(!e||!t)return t;const n=e.split(","),o=t.split(","),r=[];return n.forEach((e=>{o.forEach((t=>{r.push(`${e.trim()} ${t.trim()}`)}))})),r.join(", ")}function Ai(e,t){return"object"!=typeof e||"object"!=typeof t?e===t:w()(e?.styles,t?.styles)&&w()(e?.settings,t?.settings)}function Di(e,t){if(!e||!t)return e;const n=function(e,t){if(!e||!t)return e;if("string"!=typeof e&&e?.ref){const n=(0,di.getCSSValueFromRawStyle)(_e(t,e.ref));if(n?.ref)return;return void 0===n?e:n}return e}(e,t);return n?.url&&(n.url=function(e,t){if(!e||!t||!Array.isArray(t))return e;const n=t.find((t=>t?.name===e));return n?.href?n?.href:e}(n.url,t?._links?.["wp:theme-file"])),n}const Oi=(0,a.createContext)({user:{},base:{},merged:{},setUserConfig:()=>{}}),zi={settings:{},styles:{}},Vi=["appearanceTools","useRootPaddingAwareAlignments","background.backgroundImage","background.backgroundRepeat","background.backgroundSize","background.backgroundPosition","border.color","border.radius","border.style","border.width","shadow.presets","shadow.defaultPresets","color.background","color.button","color.caption","color.custom","color.customDuotone","color.customGradient","color.defaultDuotone","color.defaultGradients","color.defaultPalette","color.duotone","color.gradients","color.heading","color.link","color.palette","color.text","custom","dimensions.aspectRatio","dimensions.minHeight","layout.contentSize","layout.definitions","layout.wideSize","lightbox.enabled","lightbox.allowEditing","position.fixed","position.sticky","spacing.customSpacingSize","spacing.defaultSpacingSizes","spacing.spacingSizes","spacing.spacingScale","spacing.blockGap","spacing.margin","spacing.padding","spacing.units","typography.fluid","typography.customFontSize","typography.defaultFontSizes","typography.dropCap","typography.fontFamilies","typography.fontSizes","typography.fontStyle","typography.fontWeight","typography.letterSpacing","typography.lineHeight","typography.textAlign","typography.textColumns","typography.textDecoration","typography.textTransform","typography.writingMode"],Fi=()=>{const{user:e,setUserConfig:t}=(0,a.useContext)(Oi),n={settings:e.settings,styles:e.styles};return[!!n&&!w()(n,zi),(0,a.useCallback)((()=>t(zi)),[t])]};function Hi(e,t,n="all"){const{setUserConfig:o,...r}=(0,a.useContext)(Oi),i=t?".blocks."+t:"",s=e?"."+e:"",l=`settings${i}${s}`,c=`settings${s}`,u="all"===n?"merged":n;return[(0,a.useMemo)((()=>{const t=r[u];if(!t)throw"Unsupported source";var n;if(e)return null!==(n=_e(t,l))&&void 0!==n?n:_e(t,c);let o={};return Vi.forEach((e=>{var n;const r=null!==(n=_e(t,`settings${i}.${e}`))&&void 0!==n?n:_e(t,`settings.${e}`);void 0!==r&&(o=ve(o,e.split("."),r))})),o}),[r,u,e,l,c,i]),e=>{o((t=>ve(t,l.split("."),e)))}]}function Gi(e,t,n="all",{shouldDecodeEncode:o=!0}={}){const{merged:r,base:i,user:s,setUserConfig:l}=(0,a.useContext)(Oi),c=e?"."+e:"",u=t?`styles.blocks.${t}${c}`:`styles${c}`;let d,p;switch(n){case"all":d=_e(r,u),p=o?Ni(r,t,d):d;break;case"user":d=_e(s,u),p=o?Ni(r,t,d):d;break;case"base":d=_e(i,u),p=o?Ni(i,t,d):d;break;default:throw"Unsupported source"}return[p,n=>{l((i=>ve(i,u.split("."),o?function(e,t,n,o){if(!o)return o;const r=Mi[n],i=Ti.find((e=>e.cssVarInfix===r));if(!i)return o;const{valueKey:s,path:l}=i,a=Ri(e,t,l,s,o);return a?`var:preset|${r}|${a.slug}`:o}(r.settings,t,e,n):n)))}]}function $i(e,t,n){const{supportedStyles:o,supports:r}=(0,c.useSelect)((e=>({supportedStyles:te(e(l.store)).getSupportedStyles(t,n),supports:e(l.store).getBlockType(t)?.supports})),[t,n]);return(0,a.useMemo)((()=>{const t={...e};return o.includes("fontSize")||(t.typography={...t.typography,fontSizes:{},customFontSize:!1,defaultFontSizes:!1}),o.includes("fontFamily")||(t.typography={...t.typography,fontFamilies:{}}),t.color={...t.color,text:t.color?.text&&o.includes("color"),background:t.color?.background&&(o.includes("background")||o.includes("backgroundColor")),button:t.color?.button&&o.includes("buttonColor"),heading:t.color?.heading&&o.includes("headingColor"),link:t.color?.link&&o.includes("linkColor"),caption:t.color?.caption&&o.includes("captionColor")},o.includes("background")||(t.color.gradients=[],t.color.customGradient=!1),o.includes("filter")||(t.color.defaultDuotone=!1,t.color.customDuotone=!1),["lineHeight","fontStyle","fontWeight","letterSpacing","textAlign","textTransform","textDecoration","writingMode"].forEach((e=>{o.includes(e)||(t.typography={...t.typography,[e]:!1})})),o.includes("columnCount")||(t.typography={...t.typography,textColumns:!1}),["contentSize","wideSize"].forEach((e=>{o.includes(e)||(t.layout={...t.layout,[e]:!1})})),["padding","margin","blockGap"].forEach((e=>{o.includes(e)||(t.spacing={...t.spacing,[e]:!1});const n=Array.isArray(r?.spacing?.[e])?r?.spacing?.[e]:r?.spacing?.[e]?.sides;n?.length&&t.spacing?.[e]&&(t.spacing={...t.spacing,[e]:{...t.spacing?.[e],sides:n}})})),["aspectRatio","minHeight"].forEach((e=>{o.includes(e)||(t.dimensions={...t.dimensions,[e]:!1})})),["radius","color","style","width"].forEach((e=>{o.includes("border"+e.charAt(0).toUpperCase()+e.slice(1))||(t.border={...t.border,[e]:!1})})),["backgroundImage","backgroundSize"].forEach((e=>{o.includes(e)||(t.background={...t.background,[e]:!1})})),t.shadow=!!o.includes("shadow")&&t.shadow,n&&(t.typography.textAlign=!1),t}),[e,o,r,n])}function Ui(e){const t=e?.color?.palette?.custom,n=e?.color?.palette?.theme,o=e?.color?.palette?.default,r=e?.color?.defaultPalette;return(0,a.useMemo)((()=>{const e=[];return n&&n.length&&e.push({name:(0,C._x)("Theme","Indicates this palette comes from the theme."),colors:n}),r&&o&&o.length&&e.push({name:(0,C._x)("Default","Indicates this palette comes from WordPress."),colors:o}),t&&t.length&&e.push({name:(0,C._x)("Custom","Indicates this palette is created by the user."),colors:t}),e}),[t,n,o,r])}function Wi(e){const t=e?.color?.gradients?.custom,n=e?.color?.gradients?.theme,o=e?.color?.gradients?.default,r=e?.color?.defaultGradients;return(0,a.useMemo)((()=>{const e=[];return n&&n.length&&e.push({name:(0,C._x)("Theme","Indicates this palette comes from the theme."),gradients:n}),r&&o&&o.length&&e.push({name:(0,C._x)("Default","Indicates this palette comes from WordPress."),gradients:o}),t&&t.length&&e.push({name:(0,C._x)("Custom","Indicates this palette is created by the user."),gradients:t}),e}),[t,n,o,r])}function Ki(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=Ki(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}const Zi=function(){for(var e,t,n=0,o="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=Ki(e))&&(o&&(o+=" "),o+=t);return o},qi=e=>{if(null===e||"object"!=typeof e||Array.isArray(e))return e;const t=Object.entries(e).map((([e,t])=>[e,qi(t)])).filter((([,e])=>void 0!==e));return t.length?Object.fromEntries(t):void 0};function Yi(e,t,n,o,r,i){if(Object.values(null!=e?e:{}).every((e=>!e)))return n;if(1===i.length&&n.innerBlocks.length===o.length)return n;let s=o[0]?.attributes;if(i.length>1&&o.length>1){if(!o[r])return n;s=o[r]?.attributes}let l=n;return Object.entries(e).forEach((([e,n])=>{n&&t[e].forEach((e=>{const t=_e(s,e);t&&(l={...l,attributes:ve(l.attributes,e,t)})}))})),l}function Xi(e,t,n){const o=(0,l.getBlockSupport)(e,t),r=o?.__experimentalSkipSerialization;return Array.isArray(r)?r.includes(n):r}const Qi=new WeakMap;function Ji({id:e,css:t}){return es({id:e,css:t})}function es({id:e,css:t,assets:n,__unstableType:o,variation:r,clientId:i}={}){const{setStyleOverride:s,deleteStyleOverride:l}=te((0,c.useDispatch)(li)),u=(0,c.useRegistry)(),d=(0,a.useId)();(0,a.useEffect)((()=>{if(!t&&!n)return;const a=e||d,c={id:e,css:t,assets:n,__unstableType:o,variation:r,clientId:i};return Qi.get(u)||Qi.set(u,[]),Qi.get(u).push([a,c]),window.queueMicrotask((()=>{Qi.get(u)?.length&&u.batch((()=>{Qi.get(u).forEach((e=>{s(...e)})),Qi.set(u,[])}))})),()=>{const e=Qi.get(u)?.find((([e])=>e===a));e?Qi.set(u,Qi.get(u).filter((([e])=>e!==a))):l(a)}}),[e,t,i,n,o,d,s,l,u])}function ts(e,t){const[n,o,r,i,s,l,c,u,d,p,h,g,m,f,b,k,v,_,x,y,S,w,C,B,I,j,E,T,M,P,R,N,L,A,D,O,z,V,F,H,G,$,U,W,K,Z,q,Y,X,Q,J,ee,te,ne,oe,re]=ci("background.backgroundImage","background.backgroundSize","typography.fontFamilies.custom","typography.fontFamilies.default","typography.fontFamilies.theme","typography.defaultFontSizes","typography.fontSizes.custom","typography.fontSizes.default","typography.fontSizes.theme","typography.customFontSize","typography.fontStyle","typography.fontWeight","typography.lineHeight","typography.textAlign","typography.textColumns","typography.textDecoration","typography.writingMode","typography.textTransform","typography.letterSpacing","spacing.padding","spacing.margin","spacing.blockGap","spacing.defaultSpacingSizes","spacing.customSpacingSize","spacing.spacingSizes.custom","spacing.spacingSizes.default","spacing.spacingSizes.theme","spacing.units","dimensions.aspectRatio","dimensions.minHeight","layout","border.color","border.radius","border.style","border.width","color.custom","color.palette.custom","color.customDuotone","color.palette.theme","color.palette.default","color.defaultPalette","color.defaultDuotone","color.duotone.custom","color.duotone.theme","color.duotone.default","color.gradients.custom","color.gradients.theme","color.gradients.default","color.defaultGradients","color.customGradient","color.background","color.link","color.text","color.heading","color.button","shadow");return $i((0,a.useMemo)((()=>({background:{backgroundImage:n,backgroundSize:o},color:{palette:{custom:z,theme:F,default:H},gradients:{custom:Z,theme:q,default:Y},duotone:{custom:U,theme:W,default:K},defaultGradients:X,defaultPalette:G,defaultDuotone:$,custom:O,customGradient:Q,customDuotone:V,background:J,link:ee,heading:ne,button:oe,text:te},typography:{fontFamilies:{custom:r,default:i,theme:s},fontSizes:{custom:c,default:u,theme:d},customFontSize:p,defaultFontSizes:l,fontStyle:h,fontWeight:g,lineHeight:m,textAlign:f,textColumns:b,textDecoration:k,textTransform:_,letterSpacing:x,writingMode:v},spacing:{spacingSizes:{custom:I,default:j,theme:E},customSpacingSize:B,defaultSpacingSizes:C,padding:y,margin:S,blockGap:w,units:T},border:{color:N,radius:L,style:A,width:D},dimensions:{aspectRatio:M,minHeight:P},layout:R,parentLayout:t,shadow:re})),[n,o,r,i,s,l,c,u,d,p,h,g,m,f,b,k,_,x,v,y,S,w,C,B,I,j,E,T,M,P,R,t,N,L,A,D,O,z,V,F,H,G,$,U,W,K,Z,q,Y,X,Q,J,ee,te,ne,oe,re]),e)}const ns=(0,a.memo)((function({index:e,useBlockProps:t,setAllWrapperProps:n,...o}){const r=t(o),i=t=>n((n=>{const o=[...n];return o[e]=t,o}));return(0,a.useEffect)((()=>(i(r),()=>{i(void 0)}))),null}));(0,d.addFilter)("blocks.registerBlockType","core/compat/migrateLightBlockWrapper",(function(e){const{apiVersion:t=1}=e;return t<2&&(0,l.hasBlockSupport)(e,"lightBlockWrapper",!1)&&(e.apiVersion=2),e}));const os=window.wp.components,rs={default:(0,os.createSlotFill)("BlockControls"),block:(0,os.createSlotFill)("BlockControlsBlock"),inline:(0,os.createSlotFill)("BlockFormatControls"),other:(0,os.createSlotFill)("BlockControlsOther"),parent:(0,os.createSlotFill)("BlockControlsParent")};function is({group:e="default",controls:t,children:n,__experimentalShareWithChildBlocks:o=!1}){const r=function(e,t){const n=_();return n[p]?rs[e]?.Fill:n[h]&&t?rs.parent.Fill:null}(e,o);if(!r)return null;const i=(0,$.jsxs)($.Fragment,{children:["default"===e&&(0,$.jsx)(os.ToolbarGroup,{controls:t}),n]});return(0,$.jsx)(os.__experimentalStyleProvider,{document,children:(0,$.jsx)(r,{children:e=>{const{forwardedContext:t=[]}=e;return t.reduce(((e,[t,n])=>(0,$.jsx)(t,{...n,children:e})),i)}})})}window.wp.warning;const{ComponentsContext:ss}=te(os.privateApis);function ls({group:e="default",...t}){const n=(0,a.useContext)(os.__experimentalToolbarContext),o=(0,a.useContext)(ss),r=(0,a.useMemo)((()=>({forwardedContext:[[os.__experimentalToolbarContext.Provider,{value:n}],[ss.Provider,{value:o}]]})),[n,o]),i=rs[e]?.Slot,s=(0,os.__experimentalUseSlotFills)(i?.__unstableName);if(!i)return null;if(!s?.length)return null;const l=(0,$.jsx)(i,{...t,bubblesVirtually:!0,fillProps:r});return"default"===e?l:(0,$.jsx)(os.ToolbarGroup,{children:l})}const as=is;as.Slot=ls;const cs=e=>(0,$.jsx)(is,{group:"inline",...e});cs.Slot=e=>(0,$.jsx)(ls,{group:"inline",...e});const us=as,ds=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"})}),ps=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M12.5 15v5H11v-5H4V9h7V4h1.5v5h7v6h-7Z"})}),hs=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"})}),gs=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"})}),ms=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M4 4H5.5V20H4V4ZM7 10L17 10V14L7 14V10ZM20 4H18.5V20H20V4Z"})}),fs=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"m14.5 6.5-1 1 3.7 3.7H4v1.6h13.2l-3.7 3.7 1 1 5.6-5.5z"})}),bs=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"m16.5 13.5-3.7 3.7V4h-1.5v13.2l-3.8-3.7-1 1 5.5 5.6 5.5-5.6z"})}),ks={default:{name:"default",slug:"flow",className:"is-layout-flow",baseStyles:[{selector:" > .alignleft",rules:{float:"left","margin-inline-start":"0","margin-inline-end":"2em"}},{selector:" > .alignright",rules:{float:"right","margin-inline-start":"2em","margin-inline-end":"0"}},{selector:" > .aligncenter",rules:{"margin-left":"auto !important","margin-right":"auto !important"}}],spacingStyles:[{selector:" > :first-child",rules:{"margin-block-start":"0"}},{selector:" > :last-child",rules:{"margin-block-end":"0"}},{selector:" > *",rules:{"margin-block-start":null,"margin-block-end":"0"}}]},constrained:{name:"constrained",slug:"constrained",className:"is-layout-constrained",baseStyles:[{selector:" > .alignleft",rules:{float:"left","margin-inline-start":"0","margin-inline-end":"2em"}},{selector:" > .alignright",rules:{float:"right","margin-inline-start":"2em","margin-inline-end":"0"}},{selector:" > .aligncenter",rules:{"margin-left":"auto !important","margin-right":"auto !important"}},{selector:" > :where(:not(.alignleft):not(.alignright):not(.alignfull))",rules:{"max-width":"var(--wp--style--global--content-size)","margin-left":"auto !important","margin-right":"auto !important"}},{selector:" > .alignwide",rules:{"max-width":"var(--wp--style--global--wide-size)"}}],spacingStyles:[{selector:" > :first-child",rules:{"margin-block-start":"0"}},{selector:" > :last-child",rules:{"margin-block-end":"0"}},{selector:" > *",rules:{"margin-block-start":null,"margin-block-end":"0"}}]},flex:{name:"flex",slug:"flex",className:"is-layout-flex",displayMode:"flex",baseStyles:[{selector:"",rules:{"flex-wrap":"wrap","align-items":"center"}},{selector:" > :is(*, div)",rules:{margin:"0"}}],spacingStyles:[{selector:"",rules:{gap:null}}]},grid:{name:"grid",slug:"grid",className:"is-layout-grid",displayMode:"grid",baseStyles:[{selector:" > :is(*, div)",rules:{margin:"0"}}],spacingStyles:[{selector:"",rules:{gap:null}}]}};function vs(e,t=""){return e.split(",").map((e=>`${e}${t?` ${t}`:""}`)).join(",")}function _s(e,t=ks,n,o){let r="";return t?.[n]?.spacingStyles?.length&&o&&t[n].spacingStyles.forEach((t=>{r+=`${vs(e,t.selector.trim())} { `,r+=Object.entries(t.rules).map((([e,t])=>`${e}: ${t||o}`)).join("; "),r+="; }"})),r}function xs(e){const{contentSize:t,wideSize:n,type:o="default"}=e,r={},i=/^(?!0)\d+(px|em|rem|vw|vh|%|svw|lvw|dvw|svh|lvh|dvh|vi|svi|lvi|dvi|vb|svb|lvb|dvb|vmin|svmin|lvmin|dvmin|vmax|svmax|lvmax|dvmax)?$/i;return i.test(t)&&"constrained"===o&&(r.none=(0,C.sprintf)((0,C.__)("Max %s wide"),t)),i.test(n)&&(r.wide=(0,C.sprintf)((0,C.__)("Max %s wide"),n)),r}const ys=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z"})}),Ss=(0,$.jsxs)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,$.jsx)(G.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,$.jsx)(G.Path,{d:"m4.5 7.5v9h1.5v-9z"}),(0,$.jsx)(G.Path,{d:"m18 7.5v9h1.5v-9z"})]}),ws=(0,$.jsxs)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,$.jsx)(G.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,$.jsx)(G.Path,{d:"m7.5 6h9v-1.5h-9z"}),(0,$.jsx)(G.Path,{d:"m7.5 19.5h9v-1.5h-9z"})]}),Cs=(0,$.jsxs)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,$.jsx)(G.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,$.jsx)(G.Path,{d:"m16.5 6h-9v-1.5h9z"})]}),Bs=(0,$.jsxs)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,$.jsx)(G.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,$.jsx)(G.Path,{d:"m18 16.5v-9h1.5v9z"})]}),Is=(0,$.jsxs)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,$.jsx)(G.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,$.jsx)(G.Path,{d:"m16.5 19.5h-9v-1.5h9z"})]}),js=(0,$.jsxs)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,$.jsx)(G.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,$.jsx)(G.Path,{d:"m4.5 16.5v-9h1.5v9z"})]}),Es=8,Ts=["top","right","bottom","left"],Ms={top:void 0,right:void 0,bottom:void 0,left:void 0},Ps={custom:ys,axial:ys,horizontal:Ss,vertical:ws,top:Cs,right:Bs,bottom:Is,left:js},Rs={default:(0,C.__)("Spacing control"),top:(0,C.__)("Top"),bottom:(0,C.__)("Bottom"),left:(0,C.__)("Left"),right:(0,C.__)("Right"),mixed:(0,C.__)("Mixed"),vertical:(0,C.__)("Vertical"),horizontal:(0,C.__)("Horizontal"),axial:(0,C.__)("Horizontal & vertical"),custom:(0,C.__)("Custom")},Ns={axial:"axial",top:"top",right:"right",bottom:"bottom",left:"left",custom:"custom"};function Ls(e){return!!e?.includes&&("0"===e||e.includes("var:preset|spacing|"))}function As(e,t){if(!Ls(e))return e;const n=zs(e),o=t.find((e=>String(e.slug)===n));return o?.size}function Ds(e,t){if(!e||Ls(e)||"0"===e)return e;const n=t.find((t=>String(t.size)===String(e)));return n?.slug?`var:preset|spacing|${n.slug}`:e}function Os(e){if(!e)return;const t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function zs(e){if(!e)return;if("0"===e||"default"===e)return e;const t=e.match(/var:preset\|spacing\|(.+)/);return t?t[1]:void 0}function Vs(e,t){if(!e||!e.length)return!1;const n=e.includes("horizontal")||e.includes("left")&&e.includes("right"),o=e.includes("vertical")||e.includes("top")&&e.includes("bottom");return"horizontal"===t?n:"vertical"===t?o:n||o}function Fs(e,t="0"){const n=function(e){if(!e)return null;const t="string"==typeof e;return{top:t?e:e?.top,left:t?e:e?.left}}(e);if(!n)return null;const o=Os(n?.top)||t,r=Os(n?.left)||t;return o===r?o:`${o} ${r}`}const Hs=(0,$.jsx)(os.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(os.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})}),Gs=(0,$.jsx)(os.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(os.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"})}),$s=(0,$.jsx)(os.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(os.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})}),Us=(0,$.jsx)(os.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(os.Path,{d:"M4 4L20 4L20 5.5L4 5.5L4 4ZM10 7L14 7L14 17L10 17L10 7ZM20 18.5L4 18.5L4 20L20 20L20 18.5Z"})}),Ws=(0,$.jsx)(os.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(os.Path,{d:"M7 4H17V8L7 8V4ZM7 16L17 16V20L7 20V16ZM20 11.25H4V12.75H20V11.25Z"})}),Ks={top:{icon:$s,title:(0,C._x)("Align top","Block vertical alignment setting")},center:{icon:Gs,title:(0,C._x)("Align middle","Block vertical alignment setting")},bottom:{icon:Hs,title:(0,C._x)("Align bottom","Block vertical alignment setting")},stretch:{icon:Us,title:(0,C._x)("Stretch to fill","Block vertical alignment setting")},"space-between":{icon:Ws,title:(0,C._x)("Space between","Block vertical alignment setting")}},Zs=["top","center","bottom"];const qs=function({value:e,onChange:t,controls:n=Zs,isCollapsed:o=!0,isToolbar:r}){function i(n){return()=>t(e===n?void 0:n)}const s=Ks[e],l=Ks.top,a=r?os.ToolbarGroup:os.ToolbarDropdownMenu,c=r?{isCollapsed:o}:{};return(0,$.jsx)(a,{icon:s?s.icon:l.icon,label:(0,C._x)("Change vertical alignment","Block vertical alignment setting label"),controls:n.map((t=>({...Ks[t],isActive:e===t,role:o?"menuitemradio":void 0,onClick:i(t)}))),...c})},Ys=e=>(0,$.jsx)(qs,{...e,isToolbar:!1}),Xs=e=>(0,$.jsx)(qs,{...e,isToolbar:!0}),Qs={left:ds,center:ps,right:hs,"space-between":gs,stretch:ms};const Js=function({allowedControls:e=["left","center","right","space-between"],isCollapsed:t=!0,onChange:n,value:o,popoverProps:r,isToolbar:i}){const s=e=>{n(e===o?void 0:e)},l=o?Qs[o]:Qs.left,a=[{name:"left",icon:ds,title:(0,C.__)("Justify items left"),isActive:"left"===o,onClick:()=>s("left")},{name:"center",icon:ps,title:(0,C.__)("Justify items center"),isActive:"center"===o,onClick:()=>s("center")},{name:"right",icon:hs,title:(0,C.__)("Justify items right"),isActive:"right"===o,onClick:()=>s("right")},{name:"space-between",icon:gs,title:(0,C.__)("Space between items"),isActive:"space-between"===o,onClick:()=>s("space-between")},{name:"stretch",icon:ms,title:(0,C.__)("Stretch items"),isActive:"stretch"===o,onClick:()=>s("stretch")}],c=i?os.ToolbarGroup:os.ToolbarDropdownMenu,u=i?{isCollapsed:t}:{};return(0,$.jsx)(c,{icon:l,popoverProps:r,label:(0,C.__)("Change items justification"),controls:a.filter((t=>e.includes(t.name))),...u})},el=e=>(0,$.jsx)(Js,{...e,isToolbar:!1}),tl=e=>(0,$.jsx)(Js,{...e,isToolbar:!0}),nl={left:"flex-start",right:"flex-end",center:"center","space-between":"space-between"},ol={left:"flex-start",right:"flex-end",center:"center",stretch:"stretch"},rl={top:"flex-start",center:"center",bottom:"flex-end",stretch:"stretch","space-between":"space-between"},il=["wrap","nowrap"],sl={name:"flex",label:(0,C.__)("Flex"),inspectorControls:function({layout:e={},onChange:t,layoutBlockSupport:n={}}){const{allowOrientation:o=!0}=n;return(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(os.Flex,{children:[(0,$.jsx)(os.FlexItem,{children:(0,$.jsx)(cl,{layout:e,onChange:t})}),(0,$.jsx)(os.FlexItem,{children:o&&(0,$.jsx)(dl,{layout:e,onChange:t})})]}),(0,$.jsx)(ul,{layout:e,onChange:t})]})},toolBarControls:function({layout:e={},onChange:t,layoutBlockSupport:n}){if(n?.allowSwitching)return null;const{allowVerticalAlignment:o=!0}=n;return(0,$.jsxs)(us,{group:"block",__experimentalShareWithChildBlocks:!0,children:[(0,$.jsx)(cl,{layout:e,onChange:t,isToolbar:!0}),o&&(0,$.jsx)(ll,{layout:e,onChange:t})]})},getLayoutStyle:function({selector:e,layout:t,style:n,blockName:o,hasBlockGapSupport:r,layoutDefinitions:i=ks}){const{orientation:s="horizontal"}=t,l=n?.spacing?.blockGap&&!Xi(o,"spacing","blockGap")?Fs(n?.spacing?.blockGap,"0.5em"):void 0,a=nl[t.justifyContent],c=il.includes(t.flexWrap)?t.flexWrap:"wrap",u=rl[t.verticalAlignment],d=ol[t.justifyContent]||ol.left;let p="";const h=[];return c&&"wrap"!==c&&h.push(`flex-wrap: ${c}`),"horizontal"===s?(u&&h.push(`align-items: ${u}`),a&&h.push(`justify-content: ${a}`)):(u&&h.push(`justify-content: ${u}`),h.push("flex-direction: column"),h.push(`align-items: ${d}`)),h.length&&(p=`${vs(e)} {\n\t\t\t\t${h.join("; ")};\n\t\t\t}`),r&&l&&(p+=_s(e,i,"flex",l)),p},getOrientation(e){const{orientation:t="horizontal"}=e;return t},getAlignments:()=>[]};function ll({layout:e,onChange:t}){const{orientation:n="horizontal"}=e,o="horizontal"===n?rl.center:rl.top,{verticalAlignment:r=o}=e;return(0,$.jsx)(Ys,{onChange:n=>{t({...e,verticalAlignment:n})},value:r,controls:"horizontal"===n?["top","center","bottom","stretch"]:["top","center","bottom","space-between"]})}const al={placement:"bottom-start"};function cl({layout:e,onChange:t,isToolbar:n=!1}){const{justifyContent:o="left",orientation:r="horizontal"}=e,i=n=>{t({...e,justifyContent:n})},s=["left","center","right"];if("horizontal"===r?s.push("space-between"):s.push("stretch"),n)return(0,$.jsx)(el,{allowedControls:s,value:o,onChange:i,popoverProps:al});const l=[{value:"left",icon:ds,label:(0,C.__)("Justify items left")},{value:"center",icon:ps,label:(0,C.__)("Justify items center")},{value:"right",icon:hs,label:(0,C.__)("Justify items right")}];return"horizontal"===r?l.push({value:"space-between",icon:gs,label:(0,C.__)("Space between items")}):l.push({value:"stretch",icon:ms,label:(0,C.__)("Stretch items")}),(0,$.jsx)(os.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,C.__)("Justification"),value:o,onChange:i,className:"block-editor-hooks__flex-layout-justification-controls",children:l.map((({value:e,icon:t,label:n})=>(0,$.jsx)(os.__experimentalToggleGroupControlOptionIcon,{value:e,icon:t,label:n},e)))})}function ul({layout:e,onChange:t}){const{flexWrap:n="wrap"}=e;return(0,$.jsx)(os.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,C.__)("Allow to wrap to multiple lines"),onChange:n=>{t({...e,flexWrap:n?"wrap":"nowrap"})},checked:"wrap"===n})}function dl({layout:e,onChange:t}){const{orientation:n="horizontal",verticalAlignment:o,justifyContent:r}=e;return(0,$.jsxs)(os.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,className:"block-editor-hooks__flex-layout-orientation-controls",label:(0,C.__)("Orientation"),value:n,onChange:n=>{let i=o,s=r;return"horizontal"===n?("space-between"===o&&(i="center"),"stretch"===r&&(s="left")):("stretch"===o&&(i="top"),"space-between"===r&&(s="left")),t({...e,orientation:n,verticalAlignment:i,justifyContent:s})},children:[(0,$.jsx)(os.__experimentalToggleGroupControlOptionIcon,{icon:fs,value:"horizontal",label:(0,C.__)("Horizontal")}),(0,$.jsx)(os.__experimentalToggleGroupControlOptionIcon,{icon:bs,value:"vertical",label:(0,C.__)("Vertical")})]})}const pl={name:"default",label:(0,C.__)("Flow"),inspectorControls:function(){return null},toolBarControls:function(){return null},getLayoutStyle:function({selector:e,style:t,blockName:n,hasBlockGapSupport:o,layoutDefinitions:r=ks}){const i=Fs(t?.spacing?.blockGap);let s="";Xi(n,"spacing","blockGap")||(i?.top?s=Fs(i?.top):"string"==typeof i&&(s=Fs(i)));let l="";return o&&s&&(l+=_s(e,r,"default",s)),l},getOrientation:()=>"vertical",getAlignments(e,t){const n=xs(e);if(void 0!==e.alignments)return e.alignments.includes("none")||e.alignments.unshift("none"),e.alignments.map((e=>({name:e,info:n[e]})));const o=[{name:"left"},{name:"center"},{name:"right"}];if(!t){const{contentSize:t,wideSize:r}=e;t&&o.unshift({name:"full"}),r&&o.unshift({name:"wide",info:n.wide})}return o.unshift({name:"none",info:n.none}),o}};const hl=(0,a.forwardRef)((function({icon:e,size:t=24,...n},o){return(0,a.cloneElement)(e,{width:t,height:t,...n,ref:o})})),gl=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM5 9h14v6H5V9Z"})}),ml=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M16 5.5H8V4h8v1.5ZM16 20H8v-1.5h8V20ZM5 9h14v6H5V9Z"})}),fl={name:"constrained",label:(0,C.__)("Constrained"),inspectorControls:function({layout:e,onChange:t,layoutBlockSupport:n={}}){const{wideSize:o,contentSize:r,justifyContent:i="center"}=e,{allowJustification:s=!0,allowCustomContentAndWideSize:l=!0}=n,a=[{value:"left",icon:ds,label:(0,C.__)("Justify items left")},{value:"center",icon:ps,label:(0,C.__)("Justify items center")},{value:"right",icon:hs,label:(0,C.__)("Justify items right")}],[c]=ci("spacing.units"),u=(0,os.__experimentalUseCustomUnits)({availableUnits:c||["%","px","em","rem","vw"]});return(0,$.jsxs)(os.__experimentalVStack,{spacing:4,className:"block-editor-hooks__layout-constrained",children:[l&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(os.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,C.__)("Content width"),labelPosition:"top",value:r||o||"",onChange:n=>{n=0>parseFloat(n)?"0":n,t({...e,contentSize:n})},units:u,prefix:(0,$.jsx)(os.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,$.jsx)(hl,{icon:gl})})}),(0,$.jsx)(os.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,C.__)("Wide width"),labelPosition:"top",value:o||r||"",onChange:n=>{n=0>parseFloat(n)?"0":n,t({...e,wideSize:n})},units:u,prefix:(0,$.jsx)(os.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,$.jsx)(hl,{icon:ml})})}),(0,$.jsx)("p",{className:"block-editor-hooks__layout-constrained-helptext",children:(0,C.__)("Customize the width for all elements that are assigned to the center or wide columns.")})]}),s&&(0,$.jsx)(os.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,C.__)("Justification"),value:i,onChange:n=>{t({...e,justifyContent:n})},children:a.map((({value:e,icon:t,label:n})=>(0,$.jsx)(os.__experimentalToggleGroupControlOptionIcon,{value:e,icon:t,label:n},e)))})]})},toolBarControls:function({layout:e={},onChange:t,layoutBlockSupport:n}){const{allowJustification:o=!0}=n;return o?(0,$.jsx)(us,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,$.jsx)(kl,{layout:e,onChange:t})}):null},getLayoutStyle:function({selector:e,layout:t={},style:n,blockName:o,hasBlockGapSupport:r,layoutDefinitions:i=ks}){const{contentSize:s,wideSize:l,justifyContent:a}=t,c=Fs(n?.spacing?.blockGap);let u="";Xi(o,"spacing","blockGap")||(c?.top?u=Fs(c?.top):"string"==typeof c&&(u=Fs(c)));const d="left"===a?"0 !important":"auto !important",p="right"===a?"0 !important":"auto !important";let h=s||l?`\n\t\t\t\t\t${vs(e,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")} {\n\t\t\t\t\t\tmax-width: ${null!=s?s:l};\n\t\t\t\t\t\tmargin-left: ${d};\n\t\t\t\t\t\tmargin-right: ${p};\n\t\t\t\t\t}\n\t\t\t\t\t${vs(e,"> .alignwide")} {\n\t\t\t\t\t\tmax-width: ${null!=l?l:s};\n\t\t\t\t\t}\n\t\t\t\t\t${vs(e,"> .alignfull")} {\n\t\t\t\t\t\tmax-width: none;\n\t\t\t\t\t}\n\t\t\t\t`:"";if("left"===a?h+=`${vs(e,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}\n\t\t\t{ margin-left: ${d}; }`:"right"===a&&(h+=`${vs(e,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}\n\t\t\t{ margin-right: ${p}; }`),n?.spacing?.padding){(0,di.getCSSRules)(n).forEach((t=>{if("paddingRight"===t.key){const n="0"===t.value?"0px":t.value;h+=`\n\t\t\t\t\t${vs(e,"> .alignfull")} {\n\t\t\t\t\t\tmargin-right: calc(${n} * -1);\n\t\t\t\t\t}\n\t\t\t\t\t`}else if("paddingLeft"===t.key){const n="0"===t.value?"0px":t.value;h+=`\n\t\t\t\t\t${vs(e,"> .alignfull")} {\n\t\t\t\t\t\tmargin-left: calc(${n} * -1);\n\t\t\t\t\t}\n\t\t\t\t\t`}}))}return r&&u&&(h+=_s(e,i,"constrained",u)),h},getOrientation:()=>"vertical",getAlignments(e){const t=xs(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}},bl={placement:"bottom-start"};function kl({layout:e,onChange:t}){const{justifyContent:n="center"}=e;return(0,$.jsx)(el,{allowedControls:["left","center","right"],value:n,onChange:n=>{t({...e,justifyContent:n})},popoverProps:bl})}const vl={px:600,"%":100,vw:100,vh:100,em:38,rem:38,svw:100,lvw:100,dvw:100,svh:100,lvh:100,dvh:100,vi:100,svi:100,lvi:100,dvi:100,vb:100,svb:100,lvb:100,dvb:100,vmin:100,svmin:100,lvmin:100,dvmin:100,vmax:100,svmax:100,lvmax:100,dvmax:100},_l=[{value:"px",label:"px",default:0},{value:"rem",label:"rem",default:0},{value:"em",label:"em",default:0}],xl={name:"grid",label:(0,C.__)("Grid"),inspectorControls:function({layout:e={},onChange:t,layoutBlockSupport:n={}}){const{allowSizingOnChildren:o=!1}=n,r=window.__experimentalEnableGridInteractivity||!!e?.columnCount,i=window.__experimentalEnableGridInteractivity||!e?.columnCount;return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(wl,{layout:e,onChange:t}),(0,$.jsxs)(os.__experimentalVStack,{spacing:4,children:[r&&(0,$.jsx)(Sl,{layout:e,onChange:t,allowSizingOnChildren:o}),i&&(0,$.jsx)(yl,{layout:e,onChange:t})]})]})},toolBarControls:function(){return null},getLayoutStyle:function({selector:e,layout:t,style:n,blockName:o,hasBlockGapSupport:r,layoutDefinitions:i=ks}){const{minimumColumnWidth:s=null,columnCount:l=null,rowCount:a=null}=t;const c=n?.spacing?.blockGap&&!Xi(o,"spacing","blockGap")?Fs(n?.spacing?.blockGap,"0.5em"):void 0;let u="";const d=[];if(s&&l>0){const e=`max(${s}, ( 100% - (${c||"1.2rem"}*${l-1}) ) / ${l})`;d.push(`grid-template-columns: repeat(auto-fill, minmax(${e}, 1fr))`,"container-type: inline-size"),a&&d.push(`grid-template-rows: repeat(${a}, minmax(1rem, auto))`)}else l?(d.push(`grid-template-columns: repeat(${l}, minmax(0, 1fr))`),a&&d.push(`grid-template-rows: repeat(${a}, minmax(1rem, auto))`)):d.push(`grid-template-columns: repeat(auto-fill, minmax(min(${s||"12rem"}, 100%), 1fr))`,"container-type: inline-size");return d.length&&(u=`${vs(e)} { ${d.join("; ")}; }`),r&&c&&(u+=_s(e,i,"grid",c)),u},getOrientation:()=>"horizontal",getAlignments:()=>[]};function yl({layout:e,onChange:t}){const{minimumColumnWidth:n,columnCount:o,isManualPlacement:r}=e,i=n||(r||o?null:"12rem"),[s,l="rem"]=(0,os.__experimentalParseQuantityAndUnitFromRawValue)(i);return(0,$.jsxs)("fieldset",{children:[(0,$.jsx)(os.BaseControl.VisualLabel,{as:"legend",children:(0,C.__)("Minimum column width")}),(0,$.jsxs)(os.Flex,{gap:4,children:[(0,$.jsx)(os.FlexItem,{isBlock:!0,children:(0,$.jsx)(os.__experimentalUnitControl,{size:"__unstable-large",onChange:n=>{t({...e,minimumColumnWidth:""===n?void 0:n})},onUnitChange:n=>{let o;["em","rem"].includes(n)&&"px"===l?o=(s/16).toFixed(2)+n:["em","rem"].includes(l)&&"px"===n&&(o=Math.round(16*s)+n),t({...e,minimumColumnWidth:o})},value:i,units:_l,min:0,label:(0,C.__)("Minimum column width"),hideLabelFromVision:!0})}),(0,$.jsx)(os.FlexItem,{isBlock:!0,children:(0,$.jsx)(os.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,onChange:n=>{t({...e,minimumColumnWidth:[n,l].join("")})},value:s||0,min:0,max:vl[l]||600,withInputField:!1,label:(0,C.__)("Minimum column width"),hideLabelFromVision:!0})})]})]})}function Sl({layout:e,onChange:t,allowSizingOnChildren:n}){const o=window.__experimentalEnableGridInteractivity?void 0:3,{columnCount:r=o,rowCount:i,isManualPlacement:s}=e;return(0,$.jsx)($.Fragment,{children:(0,$.jsxs)("fieldset",{children:[(!window.__experimentalEnableGridInteractivity||!s)&&(0,$.jsx)(os.BaseControl.VisualLabel,{as:"legend",children:(0,C.__)("Columns")}),(0,$.jsxs)(os.Flex,{gap:4,children:[(0,$.jsx)(os.FlexItem,{isBlock:!0,children:(0,$.jsx)(os.__experimentalNumberControl,{size:"__unstable-large",onChange:n=>{if(window.__experimentalEnableGridInteractivity){const o=""===n||"0"===n?s?1:void 0:parseInt(n,10);t({...e,columnCount:o})}else{const o=""===n||"0"===n?1:parseInt(n,10);t({...e,columnCount:o})}},value:r,min:1,label:(0,C.__)("Columns"),hideLabelFromVision:!window.__experimentalEnableGridInteractivity||!s})}),(0,$.jsx)(os.FlexItem,{isBlock:!0,children:window.__experimentalEnableGridInteractivity&&n&&s?(0,$.jsx)(os.__experimentalNumberControl,{size:"__unstable-large",onChange:n=>{const o=""===n||"0"===n?1:parseInt(n,10);t({...e,rowCount:o})},value:i,min:1,label:(0,C.__)("Rows")}):(0,$.jsx)(os.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:null!=r?r:1,onChange:n=>t({...e,columnCount:""===n||"0"===n?1:n}),min:1,max:16,withInputField:!1,label:(0,C.__)("Columns"),hideLabelFromVision:!0})})]})]})})}function wl({layout:e,onChange:t}){const{columnCount:n,rowCount:o,minimumColumnWidth:r,isManualPlacement:i}=e,[s,l]=(0,a.useState)(n||3),[c,u]=(0,a.useState)(o),[d,p]=(0,a.useState)(r||"12rem"),h=i||n&&!window.__experimentalEnableGridInteractivity?"manual":"auto",g="manual"===h?(0,C.__)("Grid items can be manually placed in any position on the grid."):(0,C.__)("Grid items are placed automatically depending on their order.");return(0,$.jsxs)(os.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,C.__)("Grid item position"),value:h,onChange:i=>{"manual"===i?p(r||"12rem"):(l(n||3),u(o)),t({...e,columnCount:"manual"===i?s:null,rowCount:"manual"===i&&window.__experimentalEnableGridInteractivity?c:void 0,isManualPlacement:!("manual"!==i||!window.__experimentalEnableGridInteractivity)||void 0,minimumColumnWidth:"auto"===i?d:null})},isBlock:!0,help:window.__experimentalEnableGridInteractivity?g:void 0,children:[(0,$.jsx)(os.__experimentalToggleGroupControlOption,{value:"auto",label:(0,C.__)("Auto")},"auto"),(0,$.jsx)(os.__experimentalToggleGroupControlOption,{value:"manual",label:(0,C.__)("Manual")},"manual")]})}const Cl=[pl,sl,fl,xl];function Bl(e="default"){return Cl.find((t=>t.name===e))}const Il={type:"default"},jl=(0,a.createContext)(Il),El=jl.Provider;function Tl(){return(0,a.useContext)(jl)}const Ml=[],Pl=["none","left","center","right","wide","full"],Rl=["wide","full"];function Nl(e=Pl){e.includes("none")||(e=["none",...e]);const t=1===e.length&&"none"===e[0],[n,o,r]=(0,c.useSelect)((e=>{var n;if(t)return[!1,!1,!1];const o=e(li).getSettings();return[null!==(n=o.alignWide)&&void 0!==n&&n,o.supportsLayout,o.__unstableIsBlockBasedTheme]}),[t]),i=Tl();if(t)return Ml;const s=Bl(i?.type);if(o){const t=s.getAlignments(i,r).filter((t=>e.includes(t.name)));return 1===t.length&&"none"===t[0].name?Ml:t}if("default"!==s.name&&"constrained"!==s.name)return Ml;const l=e.filter((e=>i.alignments?i.alignments.includes(e):!(!n&&Rl.includes(e))&&Pl.includes(e))).map((e=>({name:e})));return 1===l.length&&"none"===l[0].name?Ml:l}const Ll=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M5 5.5h8V4H5v1.5ZM5 20h8v-1.5H5V20ZM19 9H5v6h14V9Z"})}),Al=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM7 9h10v6H7V9Z"})}),Dl=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M19 5.5h-8V4h8v1.5ZM19 20h-8v-1.5h8V20ZM5 9h14v6H5V9Z"})}),Ol=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M5 4h14v11H5V4Zm11 16H8v-1.5h8V20Z"})}),zl={none:{icon:gl,title:(0,C._x)("None","Alignment option")},left:{icon:Ll,title:(0,C.__)("Align left")},center:{icon:Al,title:(0,C.__)("Align center")},right:{icon:Dl,title:(0,C.__)("Align right")},wide:{icon:ml,title:(0,C.__)("Wide width")},full:{icon:Ol,title:(0,C.__)("Full width")}};const Vl=function({value:e,onChange:t,controls:n,isToolbar:o,isCollapsed:r=!0}){const i=Nl(n);if(!!!i.length)return null;function s(n){t([e,"none"].includes(n)?void 0:n)}const l=zl[e],a=zl.none,c=o?os.ToolbarGroup:os.ToolbarDropdownMenu,u={icon:l?l.icon:a.icon,label:(0,C.__)("Align")},d=o?{isCollapsed:r,controls:i.map((({name:t})=>({...zl[t],isActive:e===t||!e&&"none"===t,role:r?"menuitemradio":void 0,onClick:()=>s(t)})))}:{toggleProps:{description:(0,C.__)("Change alignment")},children:({onClose:t})=>(0,$.jsx)($.Fragment,{children:(0,$.jsx)(os.MenuGroup,{className:"block-editor-block-alignment-control__menu-group",children:i.map((({name:n,info:o})=>{const{icon:r,title:i}=zl[n],l=n===e||!e&&"none"===n;return(0,$.jsx)(os.MenuItem,{icon:r,iconPosition:"left",className:Zi("components-dropdown-menu__menu-item",{"is-active":l}),isSelected:l,onClick:()=>{s(n),t()},role:"menuitemradio",info:o,children:i},n)}))})})};return(0,$.jsx)(c,{...u,...d})},Fl=e=>(0,$.jsx)(Vl,{...e,isToolbar:!1}),Hl=e=>(0,$.jsx)(Vl,{...e,isToolbar:!0});function Gl(e){const t=_(),{clientId:n=""}=t,{setBlockEditingMode:o,unsetBlockEditingMode:r}=(0,c.useDispatch)(li),i=(0,c.useSelect)((e=>n?null:e(li).getBlockEditingMode()),[n]);return(0,a.useEffect)((()=>(e&&o(n,e),()=>{e&&r(n)})),[n,e,o,r]),n?t[g]:i}const $l=["left","center","right","wide","full"],Ul=["wide","full"];function Wl(e,t=!0,n=!0){let o;return o=Array.isArray(e)?$l.filter((t=>e.includes(t))):!0===e?[...$l]:[],!n||!0===e&&!t?o.filter((e=>!Ul.includes(e))):o}const Kl={shareWithChildBlocks:!0,edit:function({name:e,align:t,setAttributes:n}){const o=Nl(Wl((0,l.getBlockSupport)(e,"align"),(0,l.hasBlockSupport)(e,"alignWide",!0))).map((({name:e})=>e)),r=Gl();return o.length&&"default"===r?(0,$.jsx)(us,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,$.jsx)(Fl,{value:t,onChange:t=>{if(!t){const n=(0,l.getBlockType)(e),o=n?.attributes?.align?.default;o&&(t="")}n({align:t})},controls:o})}):null},useBlockProps:function({name:e,align:t}){const n=Wl((0,l.getBlockSupport)(e,"align"),(0,l.hasBlockSupport)(e,"alignWide",!0));if(Nl(n).some((e=>e.name===t)))return{"data-align":t};return{}},addSaveProps:function(e,t,n){const{align:o}=n,r=(0,l.getBlockSupport)(t,"align"),i=(0,l.hasBlockSupport)(t,"alignWide",!0),s=Wl(r,i).includes(o);s&&(e.className=Zi(`align${o}`,e.className));return e},attributeKeys:["align"],hasSupport:e=>(0,l.hasBlockSupport)(e,"align",!1)};(0,d.addFilter)("blocks.registerBlockType","core/editor/align/addAttribute",(function(e){var t;return"type"in(null!==(t=e.attributes?.align)&&void 0!==t?t:{})||(0,l.hasBlockSupport)(e,"align")&&(e.attributes={...e.attributes,align:{type:"string",enum:[...$l,""]}}),e}));const Zl=(0,os.createSlotFill)("InspectorControls"),ql=(0,os.createSlotFill)("InspectorAdvancedControls"),Yl=(0,os.createSlotFill)("InspectorControlsBindings"),Xl=(0,os.createSlotFill)("InspectorControlsBackground"),Ql=(0,os.createSlotFill)("InspectorControlsBorder"),Jl=(0,os.createSlotFill)("InspectorControlsColor"),ea=(0,os.createSlotFill)("InspectorControlsFilter"),ta=(0,os.createSlotFill)("InspectorControlsDimensions"),na=(0,os.createSlotFill)("InspectorControlsPosition"),oa=(0,os.createSlotFill)("InspectorControlsTypography"),ra=(0,os.createSlotFill)("InspectorControlsListView"),ia=(0,os.createSlotFill)("InspectorControlsStyles"),sa={default:Zl,advanced:ql,background:Xl,bindings:Yl,border:Ql,color:Jl,dimensions:ta,effects:(0,os.createSlotFill)("InspectorControlsEffects"),filter:ea,list:ra,position:na,settings:Zl,styles:ia,typography:oa};function la({children:e,group:t="default",__experimentalGroup:n,resetAllFilter:o}){n&&(y()("`__experimentalGroup` property in `InspectorControlsFill`",{since:"6.2",version:"6.4",alternative:"`group`"}),t=n);const r=_(),i=sa[t]?.Fill;return i&&r[p]?(0,$.jsx)(os.__experimentalStyleProvider,{document,children:(0,$.jsx)(i,{children:t=>(0,$.jsx)(ca,{fillProps:t,children:e,resetAllFilter:o})})}):null}function aa({resetAllFilter:e,children:t}){const{registerResetAllFilter:n,deregisterResetAllFilter:o}=(0,a.useContext)(os.__experimentalToolsPanelContext);return(0,a.useEffect)((()=>{if(e&&n&&o)return n(e),()=>{o(e)}}),[e,n,o]),t}function ca({children:e,resetAllFilter:t,fillProps:n}){const{forwardedContext:o=[]}=n,r=(0,$.jsx)(aa,{resetAllFilter:t,children:e});return o.reduce(((e,[t,n])=>(0,$.jsx)(t,{...n,children:e})),r)}function ua({children:e,group:t,label:n}){const{updateBlockAttributes:o}=(0,c.useDispatch)(li),{getBlockAttributes:r,getMultiSelectedBlockClientIds:i,getSelectedBlockClientId:s,hasMultiSelection:l}=(0,c.useSelect)(li),u=Pi(),d=s(),p=(0,a.useCallback)(((e=[])=>{const t={},n=l()?i():[d];n.forEach((n=>{const{style:o}=r(n);let i={style:o};e.forEach((e=>{i={...i,...e(i)}})),i={...i,style:qi(i.style)},t[n]=i})),o(n,t,!0)}),[r,i,l,d,o]);return(0,$.jsx)(os.__experimentalToolsPanel,{className:`${t}-block-support-panel`,label:n,resetAll:p,panelId:d,hasInnerWrapper:!0,shouldRenderPlaceholderItems:!0,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",dropdownMenuProps:u,children:e},d)}function da({Slot:e,fillProps:t,...n}){const o=(0,a.useContext)(os.__experimentalToolsPanelContext),r=(0,a.useMemo)((()=>{var e;return{...null!=t?t:{},forwardedContext:[...null!==(e=t?.forwardedContext)&&void 0!==e?e:[],[os.__experimentalToolsPanelContext.Provider,{value:o}]]}}),[o,t]);return(0,$.jsx)(e,{...n,fillProps:r,bubblesVirtually:!0})}function pa({__experimentalGroup:e,group:t="default",label:n,fillProps:o,...r}){e&&(y()("`__experimentalGroup` property in `InspectorControlsSlot`",{since:"6.2",version:"6.4",alternative:"`group`"}),t=e);const i=sa[t]?.Slot,s=(0,os.__experimentalUseSlotFills)(i?.__unstableName),l=(0,a.useContext)(os.__unstableMotionContext),c=(0,a.useMemo)((()=>{var e;return{...null!=o?o:{},forwardedContext:[...null!==(e=o?.forwardedContext)&&void 0!==e?e:[],[os.__unstableMotionContext.Provider,{value:l}]]}}),[l,o]);return i&&s?.length?n?(0,$.jsx)(ua,{group:t,label:n,children:(0,$.jsx)(da,{...r,fillProps:c,Slot:i})}):(0,$.jsx)(i,{...r,fillProps:c,bubblesVirtually:!0}):null}const ha=la;ha.Slot=pa;const ga=e=>(0,$.jsx)(la,{...e,group:"advanced"});ga.Slot=e=>(0,$.jsx)(pa,{...e,group:"advanced"}),ga.slotName="InspectorAdvancedControls";const ma=ha,fa=window.wp.url,ba=window.wp.dom,ka=window.wp.blob,va=window.wp.keycodes,_a=(0,$.jsxs)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,$.jsx)(G.Path,{d:"m7 6.5 4 2.5-4 2.5z"}),(0,$.jsx)(G.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"m5 3c-1.10457 0-2 .89543-2 2v14c0 1.1046.89543 2 2 2h14c1.1046 0 2-.8954 2-2v-14c0-1.10457-.8954-2-2-2zm14 1.5h-14c-.27614 0-.5.22386-.5.5v10.7072l3.62953-2.6465c.25108-.1831.58905-.1924.84981-.0234l2.92666 1.8969 3.5712-3.4719c.2911-.2831.7545-.2831 1.0456 0l2.9772 2.8945v-9.3568c0-.27614-.2239-.5-.5-.5zm-14.5 14.5v-1.4364l4.09643-2.987 2.99567 1.9417c.2936.1903.6798.1523.9307-.0917l3.4772-3.3806 3.4772 3.3806.0228-.0234v2.5968c0 .2761-.2239.5-.5.5h-14c-.27614 0-.5-.2239-.5-.5z"})]}),xa=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.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"})}),ya=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.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"})}),Sa=(0,os.withFilters)("editor.MediaUpload")((()=>null));const wa=function({fallback:e=null,children:t}){const n=(0,c.useSelect)((e=>{const{getSettings:t}=e(li);return!!t().mediaUpload}),[]);return n?t:e},Ca=window.wp.isShallowEqual;var Ba=n.n(Ca);const Ia=window.wp.preferences,ja=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",children:(0,$.jsx)(G.Path,{d:"m6.734 16.106 2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.158 1.093-1.028-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"})}),Ea=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})}),Ta=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"})});const Ma=function e({children:t,settingsOpen:n,setSettingsOpen:o}){const r=(0,u.useReducedMotion)(),i=r?a.Fragment:os.__unstableAnimatePresence,s=r?"div":os.__unstableMotion.div,l=`link-control-settings-drawer-${(0,u.useInstanceId)(e)}`;return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,className:"block-editor-link-control__drawer-toggle","aria-expanded":n,onClick:()=>o(!n),icon:(0,C.isRTL)()?Ea:Ta,"aria-controls":l,children:(0,C._x)("Advanced","Additional link settings")}),(0,$.jsx)(i,{children:n&&(0,$.jsx)(s,{className:"block-editor-link-control__drawer",hidden:!n,id:l,initial:"collapsed",animate:"open",exit:"collapsed",variants:{open:{opacity:1,height:"auto"},collapsed:{opacity:0,height:0}},transition:{duration:.1},children:(0,$.jsx)("div",{className:"block-editor-link-control__drawer-inner",children:t})})})]})};var Pa=n(1609);function Ra(e){return"function"==typeof e}class Na 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.suggestionsRequest=null,this.state={suggestions:[],showSuggestions:!1,suggestionsValue:null,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.suggestionNodes[n].scrollIntoView({behavior:"instant",block:"nearest",inline:"nearest"}),e.value===o||this.props.disableSuggestions||(o?.length?this.updateSuggestions(o):r&&this.updateSuggestions())}componentDidMount(){this.shouldShowInitialSuggestions()&&this.updateSuggestions()}componentWillUnmount(){this.suggestionsRequest?.cancel?.(),this.suggestionsRequest=null}bindSuggestionNode(e){return t=>{this.suggestionNodes[e]=t}}shouldShowInitialSuggestions(){const{__experimentalShowInitialSuggestions:e=!1,value:t}=this.props;return e&&!(t&&t.length)}updateSuggestions(e=""){const{__experimentalFetchLinkSuggestions:t,__experimentalHandleURLSuggestions:n}=this.props;if(!t)return;const o=!e?.length;if(e=e.trim(),!o&&(e.length<2||!n&&(0,fa.isURL)(e)))return this.suggestionsRequest?.cancel?.(),this.suggestionsRequest=null,void this.setState({suggestions:[],showSuggestions:!1,suggestionsValue:e,selectedSuggestion:null,loading:!1});this.setState({selectedSuggestion:null,loading:!0});const r=t(e,{isInitialSuggestions:o});r.then((t=>{this.suggestionsRequest===r&&(this.setState({suggestions:t,suggestionsValue:e,loading:!1,showSuggestions:!!t.length}),t.length?this.props.debouncedSpeak((0,C.sprintf)((0,C._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",t.length),t.length),"assertive"):this.props.debouncedSpeak((0,C.__)("No results."),"assertive"))})).catch((()=>{this.suggestionsRequest===r&&this.setState({loading:!1})})).finally((()=>{this.suggestionsRequest===r&&(this.suggestionsRequest=null)})),this.suggestionsRequest=r}onChange(e){this.props.onChange(e)}onFocus(){const{suggestions:e}=this.state,{disableSuggestions:t,value:n}=this.props;!n||t||e&&e.length||null!==this.suggestionsRequest||this.updateSuggestions(n)}onKeyDown(e){this.props.onKeyDown?.(e);const{showSuggestions:t,selectedSuggestion:n,suggestions:o,loading:r}=this.state;if(!t||!o.length||r){switch(e.keyCode){case va.UP:0!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(0,0));break;case va.DOWN:this.props.value.length!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length));break;case va.ENTER:this.props.onSubmit&&(e.preventDefault(),this.props.onSubmit(null,e))}return}const i=this.state.suggestions[this.state.selectedSuggestion];switch(e.keyCode){case va.UP:{e.preventDefault();const t=n?n-1:o.length-1;this.setState({selectedSuggestion:t});break}case va.DOWN:{e.preventDefault();const t=null===n||n===o.length-1?0:n+1;this.setState({selectedSuggestion:t});break}case va.TAB:null!==this.state.selectedSuggestion&&(this.selectLink(i),this.props.speak((0,C.__)("Link selected.")));break;case va.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({value:e,instanceId:t,disableSuggestions:n,__experimentalShowInitialSuggestions:o=!1},{showSuggestions:r}){let i=r;const s=e&&e.length;return o||s||(i=!1),!0===n&&(i=!1),{showSuggestions:i,suggestionsListboxId:`block-editor-url-input-suggestions-${t}`,suggestionOptionIdPrefix:`block-editor-url-input-suggestion-${t}`}}render(){return(0,$.jsxs)($.Fragment,{children:[this.renderControl(),this.renderSuggestions()]})}renderControl(){const{label:e=null,className:t,isFullWidth:n,instanceId:o,placeholder:r=(0,C.__)("Paste URL or type to search"),__experimentalRenderControl:i,value:s="",hideLabelFromVision:l=!1}=this.props,{loading:a,showSuggestions:c,selectedSuggestion:u,suggestionsListboxId:d,suggestionOptionIdPrefix:p}=this.state,h=`url-input-control-${o}`,g={id:h,label:e,className:Zi("block-editor-url-input",t,{"is-full-width":n}),hideLabelFromVision:l},m={id:h,value:s,required:!0,type:"text",onChange:this.onChange,onFocus:this.onFocus,placeholder:r,onKeyDown:this.onKeyDown,role:"combobox","aria-label":e?void 0:(0,C.__)("URL"),"aria-expanded":c,"aria-autocomplete":"list","aria-owns":d,"aria-activedescendant":null!==u?`${p}-${u}`:void 0,ref:this.inputRef,suffix:this.props.suffix};return i?i(g,m,a):(0,$.jsxs)(os.BaseControl,{__nextHasNoMarginBottom:!0,...g,children:[(0,$.jsx)(os.__experimentalInputControl,{...m,__next40pxDefaultSize:!0}),a&&(0,$.jsx)(os.Spinner,{})]})}renderSuggestions(){const{className:e,__experimentalRenderSuggestions:t}=this.props,{showSuggestions:n,suggestions:o,suggestionsValue:r,selectedSuggestion:i,suggestionsListboxId:s,suggestionOptionIdPrefix:l,loading:a}=this.state;if(!n||0===o.length)return null;const c={id:s,ref:this.autocompleteRef,role:"listbox"},u=(e,t)=>({role:"option",tabIndex:"-1",id:`${l}-${t}`,ref:this.bindSuggestionNode(t),"aria-selected":t===i||void 0});return Ra(t)?t({suggestions:o,selectedSuggestion:i,suggestionsListProps:c,buildSuggestionItemProps:u,isLoading:a,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:!r?.length,currentInputValue:r}):(0,$.jsx)(os.Popover,{placement:"bottom",focusOnMount:!1,children:(0,$.jsx)("div",{...c,className:Zi("block-editor-url-input__suggestions",`${e}__suggestions`),children:o.map(((e,t)=>(0,Pa.createElement)(os.Button,{__next40pxDefaultSize:!0,...u(0,t),key:e.id,className:Zi("block-editor-url-input__suggestion",{"is-selected":t===i}),onClick:()=>this.handleOnClick(e)},e.title)))})})}}const La=(0,u.compose)(u.withSafeTimeout,os.withSpokenMessages,u.withInstanceId,(0,c.withSelect)(((e,t)=>{if(Ra(t.__experimentalFetchLinkSuggestions))return;const{getSettings:n}=e(li);return{__experimentalFetchLinkSuggestions:n().__experimentalFetchLinkSuggestions}})))(Na),Aa=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})}),Da=({searchTerm:e,onClick:t,itemProps:n,buttonText:o})=>{if(!e)return null;let r;return r=o?"function"==typeof o?o(e):o:(0,a.createInterpolateElement)((0,C.sprintf)((0,C.__)("Create: <mark>%s</mark>"),e),{mark:(0,$.jsx)("mark",{})}),(0,$.jsx)(os.MenuItem,{...n,iconPosition:"left",icon:Aa,className:"block-editor-link-control__search-item",onClick:t,children:r})},Oa=(0,$.jsx)(G.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,$.jsx)(G.Path,{d:"M18 5.5H6a.5.5 0 0 0-.5.5v12a.5.5 0 0 0 .5.5h12a.5.5 0 0 0 .5-.5V6a.5.5 0 0 0-.5-.5ZM6 4h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Zm1 5h1.5v1.5H7V9Zm1.5 4.5H7V15h1.5v-1.5ZM10 9h7v1.5h-7V9Zm7 4.5h-7V15h7v-1.5Z"})}),za=(0,$.jsxs)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,$.jsx)(G.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,$.jsx)(G.Path,{d:"M17 4H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2ZM7 5.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5Z"})]}),Va=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M4.75 4a.75.75 0 0 0-.75.75v7.826c0 .2.08.39.22.53l6.72 6.716a2.313 2.313 0 0 0 3.276-.001l5.61-5.611-.531-.53.532.528a2.315 2.315 0 0 0 0-3.264L13.104 4.22a.75.75 0 0 0-.53-.22H4.75ZM19 12.576a.815.815 0 0 1-.236.574l-5.61 5.611a.814.814 0 0 1-1.153 0L5.5 12.264V5.5h6.763l6.5 6.502a.816.816 0 0 1 .237.574ZM8.75 9.75a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"})}),Fa=(0,$.jsx)(G.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,$.jsx)(G.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"})}),Ha=(0,$.jsx)(G.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,$.jsx)(G.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12.848 8a1 1 0 0 1-.914-.594l-.723-1.63a.5.5 0 0 0-.447-.276H5a.5.5 0 0 0-.5.5v11.5a.5.5 0 0 0 .5.5h14a.5.5 0 0 0 .5-.5v-9A.5.5 0 0 0 19 8h-6.152Zm.612-1.5a.5.5 0 0 1-.462-.31l-.445-1.084A2 2 0 0 0 10.763 4H5a2 2 0 0 0-2 2v11.5a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-9a2 2 0 0 0-2-2h-5.54Z"})}),Ga=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.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"})}),$a=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"})}),Ua=(0,$.jsx)(G.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,$.jsx)(G.Path,{d:"M17.8 2l-.9.3c-.1 0-3.6 1-5.2 2.1C10 5.5 9.3 6.5 8.9 7.1c-.6.9-1.7 4.7-1.7 6.3l-.9 2.3c-.2.4 0 .8.4 1 .1 0 .2.1.3.1.3 0 .6-.2.7-.5l.6-1.5c.3 0 .7-.1 1.2-.2.7-.1 1.4-.3 2.2-.5.8-.2 1.6-.5 2.4-.8.7-.3 1.4-.7 1.9-1.2s.8-1.2 1-1.9c.2-.7.3-1.6.4-2.4.1-.8.1-1.7.2-2.5 0-.8.1-1.5.2-2.1V2zm-1.9 5.6c-.1.8-.2 1.5-.3 2.1-.2.6-.4 1-.6 1.3-.3.3-.8.6-1.4.9-.7.3-1.4.5-2.2.8-.6.2-1.3.3-1.8.4L15 7.5c.3-.3.6-.7 1-1.1 0 .4 0 .8-.1 1.2zM6 20h8v-1.5H6V20z"})}),Wa={post:Oa,page:za,post_tag:Va,category:Fa,attachment:Ha};function Ka({isURL:e,suggestion:t}){let n=null;return e?n=Ga:t.type in Wa&&(n=Wa[t.type],"page"===t.type&&(t.isFrontPage&&(n=$a),t.isBlogHome&&(n=Ua))),n?(0,$.jsx)(hl,{className:"block-editor-link-control__search-item-icon",icon:n}):null}function Za(e){const t=e?.trim();return t?.length?e?.replace(/^\/?/,"/"):e}function qa(e){const t=e?.trim();return t?.length?e?.replace(/\/$/,""):e}function Ya(e){return e.isFrontPage?"front page":e.isBlogHome?"blog home":"post_tag"===e.type?"tag":e.type}const Xa=({itemProps:e,suggestion:t,searchTerm:n,onClick:o,isURL:r=!1,shouldShowType:i=!1})=>{const s=r?(0,C.__)("Press ENTER to add this link"):(l=t.url)?(0,u.pipe)(fa.safeDecodeURI,fa.getPath,(e=>t=>null==t||t!=t?e:t)(""),((e,...t)=>(...n)=>e(...n,...t))(fa.filterURLForDisplay,24),qa,Za)(l):l;var l;return(0,$.jsx)(os.MenuItem,{...e,info:s,iconPosition:"left",icon:(0,$.jsx)(Ka,{suggestion:t,isURL:r}),onClick:o,shortcut:i&&Ya(t),className:"block-editor-link-control__search-item",children:(0,$.jsx)(os.TextHighlight,{text:(0,ba.__unstableStripHTML)(t.title),highlight:n})})},Qa="__CREATE__",Ja="link",ec="mailto",tc="internal",nc=[Ja,ec,"tel",tc],oc=[{id:"opensInNewTab",title:(0,C.__)("Open in new tab")}];function rc({instanceId:e,withCreateSuggestion:t,currentInputValue:n,handleSuggestionClick:o,suggestionsListProps:r,buildSuggestionItemProps:i,suggestions:s,selectedSuggestion:l,isLoading:a,isInitialSuggestions:c,createSuggestionButtonText:u,suggestionsQuery:d}){const p=Zi("block-editor-link-control__search-results",{"is-loading":a}),h=1===s.length&&nc.includes(s[0].type),g=t&&!h&&!c,m=!d?.type,f=`block-editor-link-control-search-results-label-${e}`,b=c?(0,C.__)("Suggestions"):(0,C.sprintf)((0,C.__)('Search results for "%s"'),n),k=(0,$.jsx)(os.VisuallyHidden,{id:f,children:b});return(0,$.jsxs)("div",{className:"block-editor-link-control__search-results-wrapper",children:[k,(0,$.jsx)("div",{...r,className:p,"aria-labelledby":f,children:(0,$.jsx)(os.MenuGroup,{children:s.map(((e,t)=>g&&Qa===e.type?(0,$.jsx)(Da,{searchTerm:n,buttonText:u,onClick:()=>o(e),itemProps:i(e,t),isSelected:t===l},e.type):Qa===e.type?null:(0,$.jsx)(Xa,{itemProps:i(e,t),suggestion:e,index:t,onClick:()=>{o(e)},isSelected:t===l,isURL:nc.includes(e.type),searchTerm:n,shouldShowType:m,isFrontPage:e?.isFrontPage,isBlogHome:e?.isBlogHome},`${e.id}-${e.type}`)))})})]})}function ic(e){if(e.includes(" "))return!1;const t=(0,fa.getProtocol)(e),n=(0,fa.isValidProtocol)(t),o=function(e,t=6){const n=e.split(/[?#]/)[0];return new RegExp(`(?<=\\S)\\.(?:[a-zA-Z_]{2,${t}})(?:\\/|$)`).test(n)}(e),r=e?.startsWith("www."),i=e?.startsWith("#")&&(0,fa.isValidFragment)(e);return n||r||i||o}const sc=()=>Promise.resolve([]),lc=e=>{let t=Ja;const n=(0,fa.getProtocol)(e)||"";return n.includes("mailto")&&(t=ec),n.includes("tel")&&(t="tel"),e?.startsWith("#")&&(t=tc),Promise.resolve([{id:e,title:e,url:"URL"===t?(0,fa.prependHTTP)(e):e,type:t}])};function ac(e,t,n){const{fetchSearchSuggestions:o,pageOnFront:r,pageForPosts:i}=(0,c.useSelect)((e=>{const{getSettings:t}=e(li);return{pageOnFront:t().pageOnFront,pageForPosts:t().pageForPosts,fetchSearchSuggestions:t().__experimentalFetchLinkSuggestions}}),[]),s=t?lc:sc;return(0,a.useCallback)(((t,{isInitialSuggestions:l})=>ic(t)?s(t,{isInitialSuggestions:l}):(async(e,t,n,o,r,i)=>{const{isInitialSuggestions:s}=t,l=await n(e,t);return l.map((e=>Number(e.id)===r?(e.isFrontPage=!0,e):Number(e.id)===i?(e.isBlogHome=!0,e):e)),s||ic(e)||!o?l:l.concat({title:e,url:e,type:Qa})})(t,{...e,isInitialSuggestions:l},o,n,r,i)),[s,o,r,i,e,n])}const cc=()=>Promise.resolve([]),uc=()=>{},dc=(0,a.forwardRef)((({value:e,children:t,currentLink:n={},className:o=null,placeholder:r=null,withCreateSuggestion:i=!1,onCreateSuggestion:s=uc,onChange:l=uc,onSelect:c=uc,showSuggestions:d=!0,renderSuggestions:p=(e=>(0,$.jsx)(rc,{...e})),fetchSuggestions:h=null,allowDirectEntry:g=!0,showInitialSuggestions:m=!1,suggestionsQuery:f={},withURLSuggestion:b=!0,createSuggestionButtonText:k,hideLabelFromVision:v=!1,suffix:_},x)=>{const y=ac(f,g,i),S=d?h||y:cc,w=(0,u.useInstanceId)(dc),[B,I]=(0,a.useState)(),j=async e=>{let t=e;if(Qa!==e.type){if(g||t&&Object.keys(t).length>=1){const{id:e,url:o,...r}=null!=n?n:{};c({...r,...t},t)}}else try{t=await s(e.title),t?.url&&c(t)}catch(e){}};return(0,$.jsxs)("div",{className:"block-editor-link-control__search-input-container",children:[(0,$.jsx)(La,{disableSuggestions:n?.url===e,label:(0,C.__)("Link"),hideLabelFromVision:v,className:o,value:e,onChange:(e,t)=>{l(e),I(t)},placeholder:null!=r?r:(0,C.__)("Search or type URL"),__experimentalRenderSuggestions:d?e=>p({...e,instanceId:w,withCreateSuggestion:i,createSuggestionButtonText:k,suggestionsQuery:f,handleSuggestionClick:t=>{e.handleSuggestionClick&&e.handleSuggestionClick(t),j(t)}}):null,__experimentalFetchLinkSuggestions:S,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:m,onSubmit:(t,n)=>{const o=t||B;o||e?.trim()?.length?j(o||{url:e}):n.preventDefault()},ref:x,suffix:_}),t]})})),pc=dc,hc=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.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"})}),gc=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})}),mc=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M17.031 4.703 15.576 4l-1.56 3H14v.03l-2.324 4.47H9.5V13h1.396l-1.502 2.889h-.95a3.694 3.694 0 0 1 0-7.389H10V7H8.444a5.194 5.194 0 1 0 0 10.389h.17L7.5 19.53l1.416.719L15.049 8.5h.507a3.694 3.694 0 0 1 0 7.39H14v1.5h1.556a5.194 5.194 0 0 0 .273-10.383l1.202-2.304Z"})}),fc=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.625 5.5h9.75c.069 0 .125.056.125.125v9.75a.125.125 0 0 1-.125.125h-9.75a.125.125 0 0 1-.125-.125v-9.75c0-.069.056-.125.125-.125ZM4 5.625C4 4.728 4.728 4 5.625 4h9.75C16.273 4 17 4.728 17 5.625v9.75c0 .898-.727 1.625-1.625 1.625h-9.75A1.625 1.625 0 0 1 4 15.375v-9.75Zm14.5 11.656v-9H20v9C20 18.8 18.77 20 17.251 20H6.25v-1.5h11.001c.69 0 1.249-.528 1.249-1.219Z"})}),{Slot:bc,Fill:kc}=(0,os.createSlotFill)("BlockEditorLinkControlViewer");function vc(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}`)}}const _c=function(e){const[t,n]=(0,a.useReducer)(vc,{richData:null,isFetching:!1}),{fetchRichUrlData:o}=(0,c.useSelect)((e=>{const{getSettings:t}=e(li);return{fetchRichUrlData:t().__experimentalFetchRichUrlData}}),[]);return(0,a.useEffect)((()=>{if(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 xc({value:e,onEditClick:t,hasRichPreviews:n=!1,hasUnlinkControl:o=!1,onRemove:r}){const i=(0,c.useSelect)((e=>e(Ia.store).get("core","showIconLabels")),[]),s=n?e?.url:null,{richData:l,isFetching:a}=_c(s),d=l&&Object.keys(l).length,p=e&&(0,fa.filterURLForDisplay)((0,fa.safeDecodeURI)(e.url),24)||"",h=!e?.url?.length,g=!h&&(0,ba.__unstableStripHTML)(l?.title||e?.title||p),m=!e?.url||g.replace(/^[a-z\-.\+]+[0-9]*:(\/\/)?/i,"").replace(/^www\./i,"")===p;let f;f=l?.icon?(0,$.jsx)("img",{src:l?.icon,alt:""}):h?(0,$.jsx)(hl,{icon:hc,size:32}):(0,$.jsx)(hl,{icon:Ga});const{createNotice:b}=(0,c.useDispatch)(Uo.store),k=(0,u.useCopyToClipboard)(e.url,(()=>{b("info",(0,C.__)("Link copied to clipboard."),{isDismissible:!0,type:"snackbar"})}));return(0,$.jsx)("div",{"aria-label":(0,C.__)("Currently selected"),className:Zi("block-editor-link-control__search-item",{"is-current":!0,"is-rich":d,"is-fetching":!!a,"is-preview":!0,"is-error":h,"is-url-title":g===p}),children:(0,$.jsxs)("div",{className:"block-editor-link-control__search-item-top",children:[(0,$.jsxs)("span",{className:"block-editor-link-control__search-item-header",children:[(0,$.jsx)("span",{className:Zi("block-editor-link-control__search-item-icon",{"is-image":l?.icon}),children:f}),(0,$.jsx)("span",{className:"block-editor-link-control__search-item-details",children:h?(0,$.jsx)("span",{className:"block-editor-link-control__search-item-error-notice",children:(0,C.__)("Link is empty")}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(os.ExternalLink,{className:"block-editor-link-control__search-item-title",href:e.url,children:(0,$.jsx)(os.__experimentalTruncate,{numberOfLines:1,children:g})}),!m&&(0,$.jsx)("span",{className:"block-editor-link-control__search-item-info",children:(0,$.jsx)(os.__experimentalTruncate,{numberOfLines:1,children:p})})]})})]}),(0,$.jsx)(os.Button,{icon:gc,label:(0,C.__)("Edit link"),onClick:t,size:"compact"}),o&&(0,$.jsx)(os.Button,{icon:mc,label:(0,C.__)("Remove link"),onClick:r,size:"compact"}),(0,$.jsx)(os.Button,{icon:fc,label:(0,C.sprintf)((0,C.__)("Copy link%s"),h||i?"":": "+e.url),ref:k,accessibleWhenDisabled:!0,disabled:h,size:"compact"}),(0,$.jsx)(bc,{fillProps:e})]})})}const yc=()=>{},Sc=({value:e,onChange:t=yc,settings:n})=>{if(!n||!n.length)return null;const o=n=>o=>{t({...e,[n.id]:o})},r=n.map((t=>(0,$.jsx)(os.CheckboxControl,{__nextHasNoMarginBottom:!0,className:"block-editor-link-control__setting",label:t.title,onChange:o(t),checked:!!e&&!!e[t.id],help:t?.help},t.id)));return(0,$.jsxs)("fieldset",{className:"block-editor-link-control__settings",children:[(0,$.jsx)(os.VisuallyHidden,{as:"legend",children:(0,C.__)("Currently selected link settings")}),r]})};const wc=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}}};var Cc=n(5215),Bc=n.n(Cc);const Ic=()=>{},jc="core/block-editor",Ec="linkControlSettingsDrawer";function Tc({searchInputPlaceholder:e,value:t,settings:n=oc,onChange:o=Ic,onRemove:r,onCancel:i,noDirectEntry:s=!1,showSuggestions:l=!0,showInitialSuggestions:u,forceIsEditingLink:d,createSuggestion:p,withCreateSuggestion:h,inputValue:g="",suggestionsQuery:m={},noURLSuggestion:f=!1,createSuggestionButtonText:b,hasRichPreviews:k=!1,hasTextControl:v=!1,renderControlBottom:_=null}){void 0===h&&p&&(h=!0);const[x,y]=(0,a.useState)(!1),{advancedSettingsPreference:S}=(0,c.useSelect)((e=>{var t;return{advancedSettingsPreference:null!==(t=e(Ia.store).get(jc,Ec))&&void 0!==t&&t}}),[]),{set:w}=(0,c.useDispatch)(Ia.store),B=S||x,I=(0,a.useRef)(!0),j=(0,a.useRef)(),E=(0,a.useRef)(),T=(0,a.useRef)(!1),M=n.map((({id:e})=>e)),[P,R,N,L,A]=function(e){const[t,n]=(0,a.useState)(e||{}),[o,r]=(0,a.useState)(e);return Bc()(e,o)||(r(e),n(e)),[t,n,e=>{n({...t,url:e})},e=>{n({...t,title:e})},e=>o=>{const r=Object.keys(o).reduce(((t,n)=>(e.includes(n)&&(t[n]=o[n]),t)),{});n({...t,...r})}]}(t),D=t&&!(0,Ca.isShallowEqualObjects)(P,t),[O,z]=(0,a.useState)(void 0!==d?d:!t||!t.url),{createPage:V,isCreatingPage:F,errorMessage:H}=function(e){const t=(0,a.useRef)(),[n,o]=(0,a.useState)(!1),[r,i]=(0,a.useState)(null);return(0,a.useEffect)((()=>()=>{t.current&&t.current.cancel()}),[]),{createPage:async function(n){o(!0),i(null);try{return t.current=wc(Promise.resolve(e(n))),await t.current.promise}catch(e){if(e&&e.isCanceled)return;throw i(e.message||(0,C.__)("An unknown error occurred during creation. Please try again.")),e}finally{o(!1)}},isCreatingPage:n,errorMessage:r}}(p);(0,a.useEffect)((()=>{void 0!==d&&z(d)}),[d]),(0,a.useEffect)((()=>{if(I.current)return;(ba.focus.focusable.find(j.current)[0]||j.current).focus(),T.current=!1}),[O,F]),(0,a.useEffect)((()=>(I.current=!1,()=>{I.current=!0})),[]);const G=t?.url?.trim()?.length>0,U=()=>{T.current=!!j.current?.contains(j.current.ownerDocument.activeElement),z(!1)},W=()=>{D&&o({...t,...P,url:K}),U()},K=g||P?.url||"",Z=!K?.trim()?.length,q=r&&t&&!O&&!F,Y=O&&G,X=G&&v,Q=(O||!t)&&!F,J=!D||Z,ee=!!n?.length&&O&&G;return(0,$.jsxs)("div",{tabIndex:-1,ref:j,className:"block-editor-link-control",children:[F&&(0,$.jsxs)("div",{className:"block-editor-link-control__loading",children:[(0,$.jsx)(os.Spinner,{})," ",(0,C.__)("Creating"),"…"]}),Q&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)("div",{className:Zi({"block-editor-link-control__search-input-wrapper":!0,"has-text-control":X,"has-actions":Y}),children:[X&&(0,$.jsx)(os.TextControl,{__nextHasNoMarginBottom:!0,ref:E,className:"block-editor-link-control__field block-editor-link-control__text-content",label:(0,C.__)("Text"),value:P?.title,onChange:L,onKeyDown:e=>{const{keyCode:t}=e;t!==va.ENTER||Z||(e.preventDefault(),W())},__next40pxDefaultSize:!0}),(0,$.jsx)(pc,{currentLink:t,className:"block-editor-link-control__field block-editor-link-control__search-input",placeholder:e,value:K,withCreateSuggestion:h,onCreateSuggestion:V,onChange:N,onSelect:e=>{const t=Object.keys(e).reduce(((t,n)=>(M.includes(n)||(t[n]=e[n]),t)),{});o({...P,...t,title:P?.title||e?.title}),U()},showInitialSuggestions:u,allowDirectEntry:!s,showSuggestions:l,suggestionsQuery:m,withURLSuggestion:!f,createSuggestionButtonText:b,hideLabelFromVision:!X,suffix:Y?void 0:(0,$.jsx)(os.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,$.jsx)(os.Button,{onClick:J?Ic:W,label:(0,C.__)("Submit"),icon:ja,className:"block-editor-link-control__search-submit","aria-disabled":J,size:"small"})}),props:!0})]}),H&&(0,$.jsx)(os.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1,children:H})]}),t&&!O&&!F&&(0,$.jsx)(xc,{value:t,onEditClick:()=>z(!0),hasRichPreviews:k,hasUnlinkControl:q,onRemove:()=>{r(),z(!0)}},t?.url),ee&&(0,$.jsx)("div",{className:"block-editor-link-control__tools",children:!Z&&(0,$.jsx)(Ma,{settingsOpen:B,setSettingsOpen:e=>{w&&w(jc,Ec,e),y(e)},children:(0,$.jsx)(Sc,{value:P,settings:n,onChange:A(M)})})}),Y&&(0,$.jsxs)(os.__experimentalHStack,{justify:"right",className:"block-editor-link-control__search-actions",children:[(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:e=>{e.preventDefault(),e.stopPropagation(),R(t),G?U():r?.(),i?.()},children:(0,C.__)("Cancel")}),(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:J?Ic:W,className:"block-editor-link-control__search-submit","aria-disabled":J,children:(0,C.__)("Save")})]}),!F&&_&&_()]})}Tc.ViewerFill=kc,Tc.DEFAULT_LINK_SETTINGS=oc;const Mc=Tc,Pc=()=>{};let Rc=0;const Nc=(0,u.compose)([(0,c.withDispatch)((e=>{const{createNotice:t,removeNotice:n}=e(Uo.store);return{createNotice:t,removeNotice:n}})),(0,os.withFilters)("editor.MediaReplaceFlow")])((({mediaURL:e,mediaId:t,mediaIds:n,allowedTypes:o,accept:r,onError:i,onSelect:s,onSelectURL:l,onReset:u,onToggleFeaturedImage:d,useFeaturedImage:p,onFilesUpload:h=Pc,name:g=(0,C.__)("Replace"),createNotice:m,removeNotice:f,children:b,multiple:k=!1,addToGallery:v,handleUpload:_=!0,popoverProps:x})=>{const y=(0,c.useSelect)((e=>e(li).getSettings().mediaUpload),[]),S=!!y,w=(0,a.useRef)(),B="block-editor/media-replace-flow/error-notice/"+ ++Rc,I=e=>{const t=(0,ba.__unstableStripHTML)(e);i?i(t):setTimeout((()=>{m("error",t,{speak:!0,id:B,isDismissible:!0})}),1e3)},j=(e,t)=>{p&&d&&d(),t(),s(e),(0,$o.speak)((0,C.__)("The media file has been replaced")),f(B)},E=e=>{e.keyCode===va.DOWN&&(e.preventDefault(),e.target.click())},T=k&&!(!o||0===o.length)&&o.every((e=>"image"===e||e.startsWith("image/")));return(0,$.jsx)(os.Dropdown,{popoverProps:x,contentClassName:"block-editor-media-replace-flow__options",renderToggle:({isOpen:e,onToggle:t})=>(0,$.jsx)(os.ToolbarButton,{ref:w,"aria-expanded":e,"aria-haspopup":"true",onClick:t,onKeyDown:E,children:g}),renderContent:({onClose:i})=>(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(os.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu",children:[(0,$.jsxs)(wa,{children:[(0,$.jsx)(Sa,{gallery:T,addToGallery:v,multiple:k,value:k?n:t,onSelect:e=>j(e,i),allowedTypes:o,render:({open:e})=>(0,$.jsx)(os.MenuItem,{icon:_a,onClick:e,children:(0,C.__)("Open Media Library")})}),(0,$.jsx)(os.FormFileUpload,{onChange:e=>{((e,t)=>{const n=e.target.files;if(!_)return t(),s(n);h(n),y({allowedTypes:o,filesList:n,onFileChange:([e])=>{j(e,t)},onError:I})})(e,i)},accept:r,multiple:!!k,render:({openFileDialog:e})=>(0,$.jsx)(os.MenuItem,{icon:xa,onClick:()=>{e()},children:(0,C.__)("Upload")})})]}),d&&(0,$.jsx)(os.MenuItem,{icon:ya,onClick:d,isPressed:p,children:(0,C.__)("Use featured image")}),e&&u&&(0,$.jsx)(os.MenuItem,{onClick:()=>{u(),i()},children:(0,C.__)("Reset")}),"function"==typeof b?b({onClose:i}):b]}),l&&(0,$.jsxs)("form",{className:Zi("block-editor-media-flow__url-input",{"has-siblings":S||d}),children:[(0,$.jsx)("span",{className:"block-editor-media-replace-flow__image-url-label",children:(0,C.__)("Current media URL:")}),(0,$.jsx)(Mc,{value:{url:e},settings:[],showSuggestions:!1,onChange:({url:e})=>{l(e),w.current.focus()}})]})]})})})),Lc="image",Ac={placement:"left-start",offset:36,shift:!0,className:"block-editor-global-styles-background-panel__popover"},Dc=()=>{};const Oc=e=>{if(!e||isNaN(e.x)&&isNaN(e.y))return;return`${100*(isNaN(e.x)?.5:e.x)}% ${100*(isNaN(e.y)?.5:e.y)}%`},zc=e=>{if(!e)return{x:void 0,y:void 0};let[t,n]=e.split(" ").map((e=>parseFloat(e)/100));return t=isNaN(t)?void 0:t,n=isNaN(n)?t:n,{x:t,y:n}};function Vc({as:e="span",imgUrl:t,toggleProps:n={},filename:o,label:r,className:i,onToggleCallback:s=Dc}){return(0,a.useEffect)((()=>{void 0!==n?.isOpen&&s(n?.isOpen)}),[n?.isOpen,s]),(0,$.jsx)(os.__experimentalItemGroup,{as:e,className:i,...n,children:(0,$.jsxs)(os.__experimentalHStack,{justify:"flex-start",as:"span",className:"block-editor-global-styles-background-panel__inspector-preview-inner",children:[t&&(0,$.jsx)("span",{className:"block-editor-global-styles-background-panel__inspector-image-indicator-wrapper","aria-hidden":!0,children:(0,$.jsx)("span",{className:"block-editor-global-styles-background-panel__inspector-image-indicator",style:{backgroundImage:`url(${t})`}})}),(0,$.jsxs)(os.FlexItem,{as:"span",style:t?{}:{flexGrow:1},children:[(0,$.jsx)(os.__experimentalTruncate,{numberOfLines:1,className:"block-editor-global-styles-background-panel__inspector-media-replace-title",children:r}),(0,$.jsx)(os.VisuallyHidden,{as:"span",children:t?(0,C.sprintf)((0,C.__)("Background image: %s"),o||r):(0,C.__)("No background image selected")})]})]})})}function Fc({label:e,filename:t,url:n,children:o,onToggle:r=Dc,hasImageValue:i}){if(!i)return;const s=e||(0,fa.getFilename)(n)||(0,C.__)("Add background image");return(0,$.jsx)(os.Dropdown,{popoverProps:Ac,renderToggle:({onToggle:e,isOpen:o})=>{const i={onClick:e,className:"block-editor-global-styles-background-panel__dropdown-toggle","aria-expanded":o,"aria-label":(0,C.__)("Background size, position and repeat options."),isOpen:o};return(0,$.jsx)(Vc,{imgUrl:n,filename:t,label:s,toggleProps:i,as:"button",onToggleCallback:r})},renderContent:()=>(0,$.jsx)(os.__experimentalDropdownContentWrapper,{className:"block-editor-global-styles-background-panel__dropdown-content-wrapper",paddingSize:"medium",children:o})})}function Hc(){return(0,$.jsx)(os.Placeholder,{className:"block-editor-global-styles-background-panel__loading",children:(0,$.jsx)(os.Spinner,{})})}function Gc({onChange:e,style:t,inheritedValue:n,onRemoveImage:o=Dc,onResetImage:r=Dc,displayInPanel:i,defaultValues:s}){const[l,u]=(0,a.useState)(!1),{getSettings:d}=(0,c.useSelect)(li),{id:p,title:h,url:g}=t?.background?.backgroundImage||{...n?.background?.backgroundImage},m=(0,a.useRef)(),{createErrorNotice:f}=(0,c.useDispatch)(Uo.store),b=e=>{f(e,{type:"snackbar"}),u(!1)},k=n=>{if(!n||!n.url)return e(ve(t,["background","backgroundImage"],void 0)),void u(!1);if((0,ka.isBlobURL)(n.url))return void u(!0);if(n.media_type&&n.media_type!==Lc||!n.media_type&&n.type&&n.type!==Lc)return void b((0,C.__)("Only images can be used as a background image."));const o=t?.background?.backgroundSize||s?.backgroundSize,r=t?.background?.backgroundPosition;e(ve(t,["background"],{...t?.background,backgroundImage:{url:n.url,id:n.id,source:"file",title:n.title||void 0},backgroundPosition:r||"auto"!==o&&o?r:"50% 0",backgroundSize:o})),u(!1)},v=Zc(t),_=()=>{const[e]=ba.focus.tabbable.find(m.current);e?.focus(),e?.click()},x=!v&&Zc(n),y=h||(0,fa.getFilename)(g)||(0,C.__)("Add background image");return(0,$.jsxs)("div",{ref:m,className:"block-editor-global-styles-background-panel__image-tools-panel-item",children:[l&&(0,$.jsx)(Hc,{}),(0,$.jsx)(Nc,{mediaId:p,mediaURL:g,allowedTypes:[Lc],accept:"image/*",onSelect:k,popoverProps:{className:Zi({"block-editor-global-styles-background-panel__media-replace-popover":i})},name:(0,$.jsx)(Vc,{className:"block-editor-global-styles-background-panel__image-preview",imgUrl:g,filename:h,label:y}),variant:"secondary",onError:b,onReset:()=>{_(),r()},children:x&&(0,$.jsx)(os.MenuItem,{onClick:()=>{_(),e(ve(t,["background"],{backgroundImage:"none"})),o()},children:(0,C.__)("Remove")})}),(0,$.jsx)(os.DropZone,{onFilesDrop:e=>{e?.length>1?b((0,C.__)("Only one image can be used as a background image.")):d().mediaUpload({allowedTypes:[Lc],filesList:e,onFileChange([e]){k(e)},onError:b})},label:(0,C.__)("Drop to upload")})]})}function $c({onChange:e,style:t,inheritedValue:n,defaultValues:o}){const r=t?.background?.backgroundSize||n?.background?.backgroundSize,i=t?.background?.backgroundRepeat||n?.background?.backgroundRepeat,s=t?.background?.backgroundImage?.url||n?.background?.backgroundImage?.url,l=t?.background?.backgroundImage?.id,a=t?.background?.backgroundPosition||n?.background?.backgroundPosition,c=t?.background?.backgroundAttachment||n?.background?.backgroundAttachment;let u=!r&&l?o?.backgroundSize:r||"auto";u=["cover","contain","auto"].includes(u)?u:"auto";const d=!("no-repeat"===i||"cover"===u&&void 0===i),p=n=>{let o=i,r=a;"contain"===n&&(o="no-repeat",r=void 0),"cover"===n&&(o=void 0,r=void 0),"cover"!==u&&"contain"!==u||"auto"!==n||(o=void 0,t?.background?.backgroundImage?.id&&(r="50% 0")),n||"auto"!==u||(n="auto"),e(ve(t,["background"],{...t?.background,backgroundPosition:r,backgroundRepeat:o,backgroundSize:n}))},h=!a&&l&&"contain"===r?o?.backgroundPosition:a;return(0,$.jsxs)(os.__experimentalVStack,{spacing:3,className:"single-column",children:[(0,$.jsx)(os.FocalPointPicker,{__nextHasNoMarginBottom:!0,label:(0,C.__)("Focal point"),url:s,value:zc(h),onChange:n=>{e(ve(t,["background","backgroundPosition"],Oc(n)))}}),(0,$.jsx)(os.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,C.__)("Fixed background"),checked:"fixed"===c,onChange:()=>e(ve(t,["background","backgroundAttachment"],"fixed"===c?"scroll":"fixed"))}),(0,$.jsxs)(os.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,size:"__unstable-large",label:(0,C.__)("Size"),value:u,onChange:p,isBlock:!0,help:(g=r||o?.backgroundSize,"cover"===g||void 0===g?(0,C.__)("Image covers the space evenly."):"contain"===g?(0,C.__)("Image is contained without distortion."):(0,C.__)("Image has a fixed width.")),children:[(0,$.jsx)(os.__experimentalToggleGroupControlOption,{value:"cover",label:(0,C._x)("Cover","Size option for background image control")},"cover"),(0,$.jsx)(os.__experimentalToggleGroupControlOption,{value:"contain",label:(0,C._x)("Contain","Size option for background image control")},"contain"),(0,$.jsx)(os.__experimentalToggleGroupControlOption,{value:"auto",label:(0,C._x)("Tile","Size option for background image control")},"tile")]}),(0,$.jsxs)(os.__experimentalHStack,{justify:"flex-start",spacing:2,as:"span",children:[(0,$.jsx)(os.__experimentalUnitControl,{"aria-label":(0,C.__)("Background image width"),onChange:p,value:r,size:"__unstable-large",__unstableInputWidth:"100px",min:0,placeholder:(0,C.__)("Auto"),disabled:"auto"!==u||void 0===u}),(0,$.jsx)(os.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,C.__)("Repeat"),checked:d,onChange:()=>e(ve(t,["background","backgroundRepeat"],!0===d?"no-repeat":"repeat")),disabled:"cover"===u})]})]});var g}function Uc({value:e,onChange:t,inheritedValue:n=e,settings:o,defaultValues:r={}}){const{globalStyles:i,_links:s}=(0,c.useSelect)((e=>{const{getSettings:t}=e(li),n=t();return{globalStyles:n[Z],_links:n[q]}}),[]),l=(0,a.useMemo)((()=>{const e={background:{}};return n?.background?(Object.entries(n?.background).forEach((([t,n])=>{e.background[t]=Di(n,{styles:i,_links:s})})),e):n}),[i,s,n]),u=()=>t(ve(e,["background"],{})),{title:d,url:p}=e?.background?.backgroundImage||{...l?.background?.backgroundImage},h=Zc(e)||Zc(l),g=h&&"none"!==(e?.background?.backgroundImage||n?.background?.backgroundImage)&&(o?.background?.backgroundSize||o?.background?.backgroundPosition||o?.background?.backgroundRepeat),[m,f]=(0,a.useState)(!1);return(0,$.jsx)("div",{className:Zi("block-editor-global-styles-background-panel__inspector-media-replace-container",{"is-open":m}),children:g?(0,$.jsx)(Fc,{label:d,filename:d,url:p,onToggle:f,hasImageValue:h,children:(0,$.jsxs)(os.__experimentalVStack,{spacing:3,className:"single-column",children:[(0,$.jsx)(Gc,{onChange:t,style:e,inheritedValue:l,displayInPanel:!0,onResetImage:()=>{f(!1),u()},onRemoveImage:()=>f(!1),defaultValues:r}),(0,$.jsx)($c,{onChange:t,style:e,defaultValues:r,inheritedValue:l})]})}):(0,$.jsx)(Gc,{onChange:t,style:e,inheritedValue:l,defaultValues:r,onResetImage:()=>{f(!1),u()},onRemoveImage:()=>f(!1)})})}const Wc={backgroundImage:!0};function Kc(e){return"web"===a.Platform.OS&&e?.background?.backgroundImage}function Zc(e){return!!e?.background?.backgroundImage?.id||"string"==typeof e?.background?.backgroundImage||!!e?.background?.backgroundImage?.url}function qc({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r,headerLabel:i}){const s=Pi();return(0,$.jsx)(os.__experimentalToolsPanel,{label:i,resetAll:()=>{const o=e(n);t(o)},panelId:o,dropdownMenuProps:s,children:r})}function Yc({as:e=qc,value:t,onChange:n,inheritedValue:o,settings:r,panelId:i,defaultControls:s=Wc,defaultValues:l={},headerLabel:c=(0,C.__)("Background image")}){const u=Kc(r),d=(0,a.useCallback)((e=>({...e,background:{}})),[]);return(0,$.jsx)(e,{resetAllFilter:d,value:t,onChange:n,panelId:i,headerLabel:c,children:u&&(0,$.jsx)(os.__experimentalToolsPanelItem,{hasValue:()=>!!t?.background,label:(0,C.__)("Image"),onDeselect:()=>n(ve(t,["background"],{})),isShownByDefault:s.backgroundImage,panelId:i,children:(0,$.jsx)(Uc,{value:t,onChange:n,settings:r,inheritedValue:o,defaultControls:s,defaultValues:l})})})}const Xc="background",Qc={backgroundSize:"cover",backgroundPosition:"50% 50%"};function Jc(e,t="any"){const n=(0,l.getBlockSupport)(e,Xc);return!0===n||("any"===t?!!n?.backgroundImage||!!n?.backgroundSize||!!n?.backgroundRepeat:!!n?.[t])}function eu(e){if(!e||!e?.backgroundImage?.url)return;let t;return e?.backgroundSize||(t={backgroundSize:Qc.backgroundSize}),"contain"!==e?.backgroundSize||e?.backgroundPosition||(t={backgroundPosition:Qc.backgroundPosition}),t}function tu(e){return Zc(e)?"has-background":""}function nu({children:e}){const t=(0,a.useCallback)((e=>({...e,style:{...e.style,background:void 0}})),[]);return(0,$.jsx)(ma,{group:"background",resetAllFilter:t,children:e})}function ou({clientId:e,name:t,setAttributes:n,settings:o}){const{style:r,inheritedValue:i}=(0,c.useSelect)((n=>{const{getBlockAttributes:o,getSettings:r}=n(li),i=r();return{style:o(e)?.style,inheritedValue:i[Z]?.blocks?.[t]}}),[e,t]);if(!Kc(o)||!Jc(t,"backgroundImage"))return null;const s={...o,background:{...o.background,backgroundSize:o?.background?.backgroundSize&&Jc(t,"backgroundSize")}};return(0,$.jsx)(Yc,{inheritedValue:i,as:nu,panelId:e,defaultValues:Qc,settings:s,onChange:e=>{n({style:qi(e)})},value:r})}const ru={useBlockProps:function({name:e,style:t}){if(!Jc(e)||!t?.background?.backgroundImage)return;const n=eu(t?.background);return n?{style:{...n}}:void 0},attributeKeys:["style"],hasSupport:Jc};(0,d.addFilter)("blocks.registerBlockType","core/lock/addAttribute",(function(e){var t;return"type"in(null!==(t=e.attributes?.lock)&&void 0!==t?t:{})||(e.attributes={...e.attributes,lock:{type:"object"}}),e}));const iu=/[\s#]/g,su={type:"string",source:"attribute",attribute:"id",selector:"*"};const lu={addSaveProps:function(e,t,n){(0,l.hasBlockSupport)(t,"anchor")&&(e.id=""===n.anchor?null:n.anchor);return e},edit:function({anchor:e,setAttributes:t}){if("default"!==Gl())return null;const n="web"===a.Platform.OS;return(0,$.jsx)(ma,{group:"advanced",children:(0,$.jsx)(os.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,className:"html-anchor-control",label:(0,C.__)("HTML anchor"),help:(0,$.jsxs)($.Fragment,{children:[(0,C.__)("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,$.jsxs)($.Fragment,{children:[" ",(0,$.jsx)(os.ExternalLink,{href:(0,C.__)("https://wordpress.org/documentation/article/page-jumps/"),children:(0,C.__)("Learn more about anchors")})]})]}),value:e||"",placeholder:n?null:(0,C.__)("Add an anchor"),onChange:e=>{e=e.replace(iu,"-"),t({anchor:e})},autoCapitalize:"none",autoComplete:"off"})})},attributeKeys:["anchor"],hasSupport:e=>(0,l.hasBlockSupport)(e,"anchor")};(0,d.addFilter)("blocks.registerBlockType","core/anchor/attribute",(function(e){var t;return"type"in(null!==(t=e.attributes?.anchor)&&void 0!==t?t:{})||(0,l.hasBlockSupport)(e,"anchor")&&(e.attributes={...e.attributes,anchor:su}),e}));const au={type:"string",source:"attribute",attribute:"aria-label",selector:"*"};const cu={addSaveProps:function(e,t,n){return(0,l.hasBlockSupport)(t,"ariaLabel")&&(e["aria-label"]=""===n.ariaLabel?null:n.ariaLabel),e},attributeKeys:["ariaLabel"],hasSupport:e=>(0,l.hasBlockSupport)(e,"ariaLabel")};(0,d.addFilter)("blocks.registerBlockType","core/ariaLabel/attribute",(function(e){return e?.attributes?.ariaLabel?.type||(0,l.hasBlockSupport)(e,"ariaLabel")&&(e.attributes={...e.attributes,ariaLabel:au}),e}));const uu={edit:function({className:e,setAttributes:t}){return"default"!==Gl()?null:(0,$.jsx)(ma,{group:"advanced",children:(0,$.jsx)(os.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,autoComplete:"off",label:(0,C.__)("Additional CSS class(es)"),value:e||"",onChange:e=>{t({className:""!==e?e:void 0})},help:(0,C.__)("Separate multiple classes with spaces.")})})},addSaveProps:function(e,t,n){(0,l.hasBlockSupport)(t,"customClassName",!0)&&n.className&&(e.className=Zi(e.className,n.className));return e},attributeKeys:["className"],hasSupport:e=>(0,l.hasBlockSupport)(e,"customClassName",!0)};(0,d.addFilter)("blocks.registerBlockType","core/editor/custom-class-name/attribute",(function(e){return(0,l.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes={...e.attributes,className:{type:"string"}}),e})),(0,d.addFilter)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",(function(e,t,n,o){if(!(0,l.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]){const o=t[n]?.attributes.className;if(o)return{...e,attributes:{...e.attributes,className:o}}}return e})),(0,d.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",(function(e,t){return(0,l.hasBlockSupport)(t,"className",!0)&&("string"==typeof e.className?e.className=[...new Set([(0,l.getBlockDefaultClassName)(t.name),...e.className.split(" ")])].join(" ").trim():e.className=(0,l.getBlockDefaultClassName)(t.name)),e}));var du={grad:.9,turn:360,rad:360/(2*Math.PI)},pu=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},hu=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},gu=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},mu=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},fu=function(e){return{r:gu(e.r,0,255),g:gu(e.g,0,255),b:gu(e.b,0,255),a:gu(e.a)}},bu=function(e){return{r:hu(e.r),g:hu(e.g),b:hu(e.b),a:hu(e.a,3)}},ku=/^#([0-9a-f]{3,8})$/i,vu=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},_u=function(e){var t=e.r,n=e.g,o=e.b,r=e.a,i=Math.max(t,n,o),s=i-Math.min(t,n,o),l=s?i===t?(n-o)/s:i===n?2+(o-t)/s:4+(t-n)/s:0;return{h:60*(l<0?l+6:l),s:i?s/i*100:0,v:i/255*100,a:r}},xu=function(e){var t=e.h,n=e.s,o=e.v,r=e.a;t=t/360*6,n/=100,o/=100;var i=Math.floor(t),s=o*(1-n),l=o*(1-(t-i)*n),a=o*(1-(1-t+i)*n),c=i%6;return{r:255*[o,l,s,s,a,o][c],g:255*[a,o,o,l,s,s][c],b:255*[s,s,a,o,o,l][c],a:r}},yu=function(e){return{h:mu(e.h),s:gu(e.s,0,100),l:gu(e.l,0,100),a:gu(e.a)}},Su=function(e){return{h:hu(e.h),s:hu(e.s),l:hu(e.l),a:hu(e.a,3)}},wu=function(e){return xu((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},Cu=function(e){return{h:(t=_u(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},Bu=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Iu=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ju=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Eu=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Tu={string:[[function(e){var t=ku.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?hu(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?hu(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=ju.exec(e)||Eu.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:fu({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=Bu.exec(e)||Iu.exec(e);if(!t)return null;var n,o,r=yu({h:(n=t[1],o=t[2],void 0===o&&(o="deg"),Number(n)*(du[o]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return wu(r)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,o=e.b,r=e.a,i=void 0===r?1:r;return pu(t)&&pu(n)&&pu(o)?fu({r:Number(t),g:Number(n),b:Number(o),a:Number(i)}):null},"rgb"],[function(e){var t=e.h,n=e.s,o=e.l,r=e.a,i=void 0===r?1:r;if(!pu(t)||!pu(n)||!pu(o))return null;var s=yu({h:Number(t),s:Number(n),l:Number(o),a:Number(i)});return wu(s)},"hsl"],[function(e){var t=e.h,n=e.s,o=e.v,r=e.a,i=void 0===r?1:r;if(!pu(t)||!pu(n)||!pu(o))return null;var s=function(e){return{h:mu(e.h),s:gu(e.s,0,100),v:gu(e.v,0,100),a:gu(e.a)}}({h:Number(t),s:Number(n),v:Number(o),a:Number(i)});return xu(s)},"hsv"]]},Mu=function(e,t){for(var n=0;n<t.length;n++){var o=t[n][0](e);if(o)return[o,t[n][1]]}return[null,void 0]},Pu=function(e){return"string"==typeof e?Mu(e.trim(),Tu.string):"object"==typeof e&&null!==e?Mu(e,Tu.object):[null,void 0]},Ru=function(e,t){var n=Cu(e);return{h:n.h,s:gu(n.s+100*t,0,100),l:n.l,a:n.a}},Nu=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},Lu=function(e,t){var n=Cu(e);return{h:n.h,s:n.s,l:gu(n.l+100*t,0,100),a:n.a}},Au=function(){function e(e){this.parsed=Pu(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return null!==this.parsed},e.prototype.brightness=function(){return hu(Nu(this.rgba),2)},e.prototype.isDark=function(){return Nu(this.rgba)<.5},e.prototype.isLight=function(){return Nu(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=bu(this.rgba)).r,n=e.g,o=e.b,i=(r=e.a)<1?vu(hu(255*r)):"","#"+vu(t)+vu(n)+vu(o)+i;var e,t,n,o,r,i},e.prototype.toRgb=function(){return bu(this.rgba)},e.prototype.toRgbString=function(){return t=(e=bu(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 Su(Cu(this.rgba))},e.prototype.toHslString=function(){return t=(e=Su(Cu(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=_u(this.rgba),{h:hu(e.h),s:hu(e.s),v:hu(e.v),a:hu(e.a,3)};var e},e.prototype.invert=function(){return Du({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),Du(Ru(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),Du(Ru(this.rgba,-e))},e.prototype.grayscale=function(){return Du(Ru(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),Du(Lu(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),Du(Lu(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?Du({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):hu(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=Cu(this.rgba);return"number"==typeof e?Du({h:e,s:t.s,l:t.l,a:t.a}):hu(t.h)},e.prototype.isEqual=function(e){return this.toHex()===Du(e).toHex()},e}(),Du=function(e){return e instanceof Au?e:new Au(e)},Ou=[],zu=function(e){e.forEach((function(e){Ou.indexOf(e)<0&&(e(Au,Tu),Ou.push(e))}))};function Vu(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 i={};e.prototype.toName=function(t){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var r,s,l=o[this.toHex()];if(l)return l;if(null==t?void 0:t.closest){var a=this.toRgb(),c=1/0,u="black";if(!i.length)for(var d in n)i[d]=new e(n[d]).toRgb();for(var p in n){var h=(r=a,s=i[p],Math.pow(r.r-s.r,2)+Math.pow(r.g-s.g,2)+Math.pow(r.b-s.b,2));h<c&&(c=h,u=p)}return u}},t.string.push([function(t){var o=t.toLowerCase(),r="transparent"===o?"#0000":n[o];return r?new e(r).toRgb():null},"name"])}var Fu=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},Hu=function(e){return.2126*Fu(e.r)+.7152*Fu(e.g)+.0722*Fu(e.b)};function Gu(e){e.prototype.luminance=function(){return e=Hu(this.rgba),void 0===(t=2)&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0;var e,t,n},e.prototype.contrast=function(t){void 0===t&&(t="#FFF");var n,o,r,i,s,l,a,c=t instanceof e?t:new e(t);return i=this.rgba,s=c.toRgb(),n=(l=Hu(i))>(a=Hu(s))?(l+.05)/(a+.05):(a+.05)/(l+.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)>=(s=void 0===(i=(n=t).size)?"normal":i,"AAA"===(r=void 0===(o=n.level)?"AA":o)&&"normal"===s?7:"AA"===r&&"large"===s?3:4.5);var n,o,r,i,s}}zu([Vu,Gu]);const{kebabCase:$u}=te(os.privateApis),Uu=(e,t,n)=>{if(t){const n=e?.find((e=>e.slug===t));if(n)return n}return{color:n}},Wu=(e,t)=>e?.find((e=>e.color===t));function Ku(e,t){if(e&&t)return`has-${$u(t)}-${e}`}function Zu(){const[e,t,n,o,r,i,s,l,c,u]=ci("color.custom","color.palette.custom","color.palette.theme","color.palette.default","color.defaultPalette","color.customGradient","color.gradients.custom","color.gradients.theme","color.gradients.default","color.defaultGradients"),d={disableCustomColors:!e,disableCustomGradients:!i};return d.colors=(0,a.useMemo)((()=>{const e=[];return n&&n.length&&e.push({name:(0,C._x)("Theme","Indicates this palette comes from the theme."),colors:n}),r&&o&&o.length&&e.push({name:(0,C._x)("Default","Indicates this palette comes from WordPress."),colors:o}),t&&t.length&&e.push({name:(0,C._x)("Custom","Indicates this palette comes from the theme."),colors:t}),e}),[t,n,o,r]),d.gradients=(0,a.useMemo)((()=>{const e=[];return l&&l.length&&e.push({name:(0,C._x)("Theme","Indicates this palette comes from the theme."),gradients:l}),u&&c&&c.length&&e.push({name:(0,C._x)("Default","Indicates this palette comes from WordPress."),gradients:c}),s&&s.length&&e.push({name:(0,C._x)("Custom","Indicates this palette is created by the user."),gradients:s}),e}),[s,l,c,u]),d.hasColorsOrGradients=!!d.colors.length||!!d.gradients.length,d}function qu(e){return[...e].sort(((t,n)=>e.filter((e=>e===n)).length-e.filter((e=>e===t)).length)).shift()}function Yu(e={}){const{flat:t,...n}=e;return t||qu(Object.values(n).filter(Boolean))||"px"}function Xu(e={}){if("string"==typeof e)return e;const t=Object.values(e).map((e=>(0,os.__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]:"",i=qu(o);return 0===r||r?`${r}${i}`:void 0}function Qu(e={}){const t=Xu(e);return"string"!=typeof e&&isNaN(parseFloat(t))}function Ju(e){if(!e)return!1;if("string"==typeof e)return!0;return!!Object.values(e).filter((e=>!!e||0===e)).length}function ed({onChange:e,selectedUnits:t,setSelectedUnits:n,values:o,...r}){let i=Xu(o);void 0===i&&(i=Yu(t));const s=Ju(o)&&Qu(o),l=s?(0,C.__)("Mixed"):null;return(0,$.jsx)(os.__experimentalUnitControl,{...r,"aria-label":(0,C.__)("Border radius"),disableUnits:s,isOnly:!0,value:i,onChange:t=>{const n=!isNaN(parseFloat(t));e(n?t:void 0)},onUnitChange:e=>{n({topLeft:e,topRight:e,bottomLeft:e,bottomRight:e})},placeholder:l,size:"__unstable-large"})}const td={topLeft:(0,C.__)("Top left"),topRight:(0,C.__)("Top right"),bottomLeft:(0,C.__)("Bottom left"),bottomRight:(0,C.__)("Bottom right")};function nd({onChange:e,selectedUnits:t,setSelectedUnits:n,values:o,...r}){const i=t=>n=>{if(!e)return;const o=!isNaN(parseFloat(n))?n:void 0;e({...s,[t]:o})},s="string"!=typeof o?o:{topLeft:o,topRight:o,bottomLeft:o,bottomRight:o};return(0,$.jsx)("div",{className:"components-border-radius-control__input-controls-wrapper",children:Object.entries(td).map((([e,o])=>{const[l,a]=(0,os.__experimentalParseQuantityAndUnitFromRawValue)(s[e]),c=s[e]?a:t[e]||t.flat;return(0,$.jsx)(os.Tooltip,{text:o,placement:"top",children:(0,$.jsx)("div",{className:"components-border-radius-control__tooltip-wrapper",children:(0,$.jsx)(os.__experimentalUnitControl,{...r,"aria-label":o,value:[l,c].join(""),onChange:i(e),onUnitChange:(u=e,e=>{const o={...t};o[u]=e,n(o)}),size:"__unstable-large"})})},e);var u}))})}const od=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})});function rd({isLinked:e,...t}){const n=e?(0,C.__)("Unlink radii"):(0,C.__)("Link radii");return(0,$.jsx)(os.Tooltip,{text:n,children:(0,$.jsx)(os.Button,{...t,className:"component-border-radius-control__linked-button",size:"small",icon:e?od:mc,iconSize:24,"aria-label":n})})}const id={topLeft:void 0,topRight:void 0,bottomLeft:void 0,bottomRight:void 0},sd=0,ld={px:100,em:20,rem:20};function ad({onChange:e,values:t}){const[n,o]=(0,a.useState)(!Ju(t)||!Qu(t)),[r,i]=(0,a.useState)({flat:"string"==typeof t?(0,os.__experimentalParseQuantityAndUnitFromRawValue)(t)[1]:void 0,topLeft:(0,os.__experimentalParseQuantityAndUnitFromRawValue)(t?.topLeft)[1],topRight:(0,os.__experimentalParseQuantityAndUnitFromRawValue)(t?.topRight)[1],bottomLeft:(0,os.__experimentalParseQuantityAndUnitFromRawValue)(t?.bottomLeft)[1],bottomRight:(0,os.__experimentalParseQuantityAndUnitFromRawValue)(t?.bottomRight)[1]}),[s]=ci("spacing.units"),l=(0,os.__experimentalUseCustomUnits)({availableUnits:s||["px","em","rem"]}),c=Yu(r),u=l&&l.find((e=>e.value===c)),d=u?.step||1,[p]=(0,os.__experimentalParseQuantityAndUnitFromRawValue)(Xu(t));return(0,$.jsxs)("fieldset",{className:"components-border-radius-control",children:[(0,$.jsx)(os.BaseControl.VisualLabel,{as:"legend",children:(0,C.__)("Radius")}),(0,$.jsxs)("div",{className:"components-border-radius-control__wrapper",children:[n?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(ed,{className:"components-border-radius-control__unit-control",values:t,min:sd,onChange:e,selectedUnits:r,setSelectedUnits:i,units:l}),(0,$.jsx)(os.RangeControl,{__next40pxDefaultSize:!0,label:(0,C.__)("Border radius"),hideLabelFromVision:!0,className:"components-border-radius-control__range-control",value:null!=p?p:"",min:sd,max:ld[c],initialPosition:0,withInputField:!1,onChange:t=>{e(void 0!==t?`${t}${c}`:void 0)},step:d,__nextHasNoMarginBottom:!0})]}):(0,$.jsx)(nd,{min:sd,onChange:e,selectedUnits:r,setSelectedUnits:i,values:t||id,units:l}),(0,$.jsx)(rd,{onClick:()=>o(!n),isLinked:n})]})]})}const cd=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})}),ud=(0,$.jsx)(G.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,$.jsx)(G.Path,{d:"M12 8c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4zm0 6.5c-1.4 0-2.5-1.1-2.5-2.5s1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5-1.1 2.5-2.5 2.5zM12.8 3h-1.5v3h1.5V3zm-1.6 18h1.5v-3h-1.5v3zm6.8-9.8v1.5h3v-1.5h-3zm-12 0H3v1.5h3v-1.5zm9.7 5.6 2.1 2.1 1.1-1.1-2.1-2.1-1.1 1.1zM8.3 7.2 6.2 5.1 5.1 6.2l2.1 2.1 1.1-1.1zM5.1 17.8l1.1 1.1 2.1-2.1-1.1-1.1-2.1 2.1zM18.9 6.2l-1.1-1.1-2.1 2.1 1.1 1.1 2.1-2.1z"})}),dd=[];function pd({shadow:e,onShadowChange:t,settings:n}){const o=fd(n);return(0,$.jsx)("div",{className:"block-editor-global-styles__shadow-popover-container",children:(0,$.jsxs)(os.__experimentalVStack,{spacing:4,children:[(0,$.jsx)(os.__experimentalHeading,{level:5,children:(0,C.__)("Drop shadow")}),(0,$.jsx)(hd,{presets:o,activeShadow:e,onSelect:t}),(0,$.jsx)("div",{className:"block-editor-global-styles__clear-shadow",children:(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>t(void 0),children:(0,C.__)("Clear")})})]})})}function hd({presets:e,activeShadow:t,onSelect:n}){return e?(0,$.jsx)(os.Composite,{role:"listbox",className:"block-editor-global-styles__shadow__list","aria-label":(0,C.__)("Drop shadows"),children:e.map((({name:e,slug:o,shadow:r})=>(0,$.jsx)(gd,{label:e,isActive:r===t,type:"unset"===o?"unset":"preset",onSelect:()=>n(r===t?void 0:r),shadow:r},o)))}):null}function gd({type:e,label:t,isActive:n,onSelect:o,shadow:r}){return(0,$.jsx)(os.Tooltip,{text:t,children:(0,$.jsx)(os.Composite.Item,{role:"option","aria-label":t,"aria-selected":n,className:Zi("block-editor-global-styles__shadow__item",{"is-active":n}),render:(0,$.jsx)("button",{className:Zi("block-editor-global-styles__shadow-indicator",{unset:"unset"===e}),onClick:o,style:{boxShadow:r},"aria-label":t,children:n&&(0,$.jsx)(hl,{icon:cd})})})})}function md({shadow:e,onShadowChange:t,settings:n}){return(0,$.jsx)(os.Dropdown,{popoverProps:{placement:"left-start",offset:36,shift:!0},className:"block-editor-global-styles__shadow-dropdown",renderToggle:({onToggle:e,isOpen:t})=>{const n={onClick:e,className:Zi({"is-open":t}),"aria-expanded":t};return(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,...n,children:(0,$.jsxs)(os.__experimentalHStack,{justify:"flex-start",children:[(0,$.jsx)(hl,{className:"block-editor-global-styles__toggle-icon",icon:ud,size:24}),(0,$.jsx)(os.FlexItem,{children:(0,C.__)("Drop shadow")})]})})},renderContent:()=>(0,$.jsx)(os.__experimentalDropdownContentWrapper,{paddingSize:"medium",children:(0,$.jsx)(pd,{shadow:e,onShadowChange:t,settings:n})})})}function fd(e){return(0,a.useMemo)((()=>{var t;if(!e?.shadow)return dd;const n=e?.shadow?.defaultPresets,{default:o,theme:r,custom:i}=null!==(t=e?.shadow?.presets)&&void 0!==t?t:{},s={name:(0,C.__)("Unset"),slug:"unset",shadow:"none"},l=[...n&&o||dd,...r||dd,...i||dd];return l.length&&l.unshift(s),l}),[e])}function bd(e){return Object.values(kd(e)).some(Boolean)}function kd(e){return{hasBorderColor:vd(e),hasBorderRadius:_d(e),hasBorderStyle:xd(e),hasBorderWidth:yd(e),hasShadow:Sd(e)}}function vd(e){return e?.border?.color}function _d(e){return e?.border?.radius}function xd(e){return e?.border?.style}function yd(e){return e?.border?.width}function Sd(e){const t=fd(e);return!!e?.shadow&&t.length>0}function wd({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r,label:i}){const s=Pi();return(0,$.jsx)(os.__experimentalToolsPanel,{label:i,resetAll:()=>{const o=e(n);t(o)},panelId:o,dropdownMenuProps:s,children:r})}const Cd={radius:!0,color:!0,width:!0,shadow:!0};function Bd({as:e=wd,value:t,onChange:n,inheritedValue:o=t,settings:r,panelId:i,name:s,defaultControls:l=Cd}){var c,u,d,p;const h=Ui(r),g=(0,a.useCallback)((e=>Ni({settings:r},"",e)),[r]),m=e=>{const t=h.flatMap((({colors:e})=>e)).find((({color:t})=>t===e));return t?"var:preset|color|"+t.slug:e},f=(0,a.useMemo)((()=>{if((0,os.__experimentalHasSplitBorders)(o?.border)){const e={...o?.border};return["top","right","bottom","left"].forEach((t=>{e[t]={...e[t],color:g(e[t]?.color)}})),e}return{...o?.border,color:o?.border?.color?g(o?.border?.color):void 0}}),[o?.border,g]),b=e=>n({...t,border:e}),k=vd(r),v=xd(r),_=yd(r),x=_d(r),y=g(f?.radius),S=e=>b({...f,radius:e}),w=()=>{const e=t?.border?.radius;return"object"==typeof e?Object.entries(e).some(Boolean):!!e},B=Sd(r),I=g(o?.shadow),j=null!==(c=r?.shadow?.presets)&&void 0!==c?c:{},E=null!==(u=null!==(d=null!==(p=j.custom)&&void 0!==p?p:j.theme)&&void 0!==d?d:j.default)&&void 0!==u?u:[],T=e=>{const o=E?.find((({shadow:t})=>t===e))?.slug;n(ve(t,["shadow"],o?`var:preset|shadow|${o}`:e||void 0))},M=(0,a.useCallback)((e=>({...e,border:void 0,shadow:void 0})),[]),P=l?.color||l?.width,R=k||v||_||x,N=Dd({blockName:s,hasShadowControl:B,hasBorderControl:R});return(0,$.jsxs)(e,{resetAllFilter:M,value:t,onChange:n,panelId:i,label:N,children:[(_||k)&&(0,$.jsx)(os.__experimentalToolsPanelItem,{hasValue:()=>(0,os.__experimentalIsDefinedBorder)(t?.border),label:(0,C.__)("Border"),onDeselect:()=>(()=>{if(w())return b({radius:t?.border?.radius});b(void 0)})(),isShownByDefault:P,panelId:i,children:(0,$.jsx)(os.__experimentalBorderBoxControl,{colors:h,enableAlpha:!0,enableStyle:v,onChange:e=>{const t={...e};(0,os.__experimentalHasSplitBorders)(t)?["top","right","bottom","left"].forEach((e=>{t[e]&&(t[e]={...t[e],color:m(t[e]?.color)})})):t&&(t.color=m(t.color)),b({radius:f?.radius,...t})},popoverOffset:40,popoverPlacement:"left-start",value:f,__experimentalIsRenderedInSidebar:!0,size:"__unstable-large",hideLabelFromVision:!B,label:(0,C.__)("Border")})}),x&&(0,$.jsx)(os.__experimentalToolsPanelItem,{hasValue:w,label:(0,C.__)("Radius"),onDeselect:()=>S(void 0),isShownByDefault:l.radius,panelId:i,children:(0,$.jsx)(ad,{values:y,onChange:e=>{S(e||void 0)}})}),B&&(0,$.jsxs)(os.__experimentalToolsPanelItem,{label:(0,C.__)("Shadow"),hasValue:()=>!!t?.shadow,onDeselect:()=>T(void 0),isShownByDefault:l.shadow,panelId:i,children:[R?(0,$.jsx)(os.BaseControl.VisualLabel,{as:"legend",children:(0,C.__)("Shadow")}):null,(0,$.jsx)(os.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:(0,$.jsx)(md,{shadow:I,onShadowChange:T,settings:r})})]})]})}const Id="__experimentalBorder",jd="shadow",Ed=(e,t,n)=>{let o;return e.some((e=>e.colors.some((e=>e[t]===n&&(o=e,!0))))),o},Td=({colors:e,namedColor:t,customColor:n})=>{if(t){const n=Ed(e,"slug",t);if(n)return n}if(!n)return{color:void 0};const o=Ed(e,"color",n);return o||{color:n}};function Md(e){const t=/var:preset\|color\|(.+)/.exec(e);return t&&t[1]?t[1]:null}function Pd(e){if((0,os.__experimentalHasSplitBorders)(e?.border))return{style:e,borderColor:void 0};const t=e?.border?.color,n=t?.startsWith("var:preset|color|")?t.substring(17):void 0,o={...e};return o.border={...o.border,color:n?void 0:t},{style:qi(o),borderColor:n}}function Rd(e){return(0,os.__experimentalHasSplitBorders)(e.style?.border)?e.style:{...e.style,border:{...e.style?.border,color:e.borderColor?"var:preset|color|"+e.borderColor:e.style?.border?.color}}}function Nd({label:e,children:t,resetAllFilter:n}){const o=(0,a.useCallback)((e=>{const t=Rd(e),o=n(t);return{...e,...Pd(o)}}),[n]);return(0,$.jsx)(ma,{group:"border",resetAllFilter:o,label:e,children:t})}function Ld({clientId:e,name:t,setAttributes:n,settings:o}){const r=bd(o);const{style:i,borderColor:s}=(0,c.useSelect)((function(t){const{style:n,borderColor:o}=t(li).getBlockAttributes(e)||{};return{style:n,borderColor:o}}),[e]),u=(0,a.useMemo)((()=>Rd({style:i,borderColor:s})),[i,s]);if(!r)return null;const d={...(0,l.getBlockSupport)(t,[Id,"__experimentalDefaultControls"]),...(0,l.getBlockSupport)(t,[jd,"__experimentalDefaultControls"])};return(0,$.jsx)(Bd,{as:Nd,panelId:e,settings:o,value:u,onChange:e=>{n(Pd(e))},defaultControls:d})}function Ad(e,t="any"){if("web"!==a.Platform.OS)return!1;const n=(0,l.getBlockSupport)(e,Id);return!0===n||("any"===t?!!(n?.color||n?.radius||n?.width||n?.style):!!n?.[t])}function Dd({blockName:e,hasBorderControl:t,hasShadowControl:n}={}){const o=kd(ts(e));return t||n||!e||(t=o?.hasBorderColor||o?.hasBorderStyle||o?.hasBorderWidth||o?.hasBorderRadius,n=o?.hasShadow),t&&n?(0,C.__)("Border & Shadow"):n?(0,C.__)("Shadow"):(0,C.__)("Border")}function Od(e,t,n){if(!Ad(t,"color")||Xi(t,Id,"color"))return e;const o=zd(n),r=Zi(e.className,o);return e.className=r||void 0,e}function zd(e){const{borderColor:t,style:n}=e,o=Ku("border-color",t);return Zi({"has-border-color":t||n?.border?.color,[o]:!!o})}const Vd={useBlockProps:function({name:e,borderColor:t,style:n}){const{colors:o}=Zu();if(!Ad(e,"color")||Xi(e,Id,"color"))return{};const{color:r}=Td({colors:o,namedColor:t}),{color:i}=Td({colors:o,namedColor:Md(n?.border?.top?.color)}),{color:s}=Td({colors:o,namedColor:Md(n?.border?.right?.color)}),{color:l}=Td({colors:o,namedColor:Md(n?.border?.bottom?.color)}),{color:a}=Td({colors:o,namedColor:Md(n?.border?.left?.color)});return Od({style:qi({borderTopColor:i||r,borderRightColor:s||r,borderBottomColor:l||r,borderLeftColor:a||r})||{}},e,{borderColor:t,style:n})},addSaveProps:Od,attributeKeys:["borderColor","style"],hasSupport:e=>Ad(e,"color")};function Fd(e){if(e)return`has-${e}-gradient-background`}function Hd(e,t){const n=e?.find((e=>e.slug===t));return n&&n.gradient}function Gd(e,t){const n=e?.find((e=>e.gradient===t));return n}function $d(e,t){const n=Gd(e,t);return n&&n.slug}function Ud({gradientAttribute:e="gradient",customGradientAttribute:t="customGradient"}={}){const{clientId:n}=_(),[o,r,i]=ci("color.gradients.custom","color.gradients.theme","color.gradients.default"),s=(0,a.useMemo)((()=>[...o||[],...r||[],...i||[]]),[o,r,i]),{gradient:l,customGradient:u}=(0,c.useSelect)((o=>{const{getBlockAttributes:r}=o(li),i=r(n)||{};return{customGradient:i[t],gradient:i[e]}}),[n,e,t]),{updateBlockAttributes:d}=(0,c.useDispatch)(li),p=(0,a.useCallback)((o=>{const r=$d(s,o);d(n,r?{[e]:r,[t]:void 0}:{[e]:void 0,[t]:o})}),[s,n,d]),h=Fd(l);let g;return g=l?Hd(s,l):u,{gradientClass:h,gradientValue:g,setGradient:p}}(0,d.addFilter)("blocks.registerBlockType","core/border/addAttributes",(function(e){return Ad(e,"color")?e.attributes.borderColor?e:{...e,attributes:{...e.attributes,borderColor:{type:"string"}}}:e}));const{Tabs:Wd}=te(os.privateApis),Kd=["colors","disableCustomColors","gradients","disableCustomGradients"],Zd={color:"color",gradient:"gradient"};function qd({colors:e,gradients:t,disableCustomColors:n,disableCustomGradients:o,__experimentalIsRenderedInSidebar:r,className:i,label:s,onColorChange:l,onGradientChange:a,colorValue:c,gradientValue:u,clearable:d,showTitle:p=!0,enableAlpha:h,headingLevel:g}){const m=l&&(e&&e.length>0||!n),f=a&&(t&&t.length>0||!o);if(!m&&!f)return null;const b={[Zd.color]:(0,$.jsx)(os.ColorPalette,{value:c,onChange:f?e=>{l(e),a()}:l,colors:e,disableCustomColors:n,__experimentalIsRenderedInSidebar:r,clearable:d,enableAlpha:h,headingLevel:g}),[Zd.gradient]:(0,$.jsx)(os.GradientPicker,{value:u,onChange:m?e=>{a(e),l()}:a,gradients:t,disableCustomGradients:o,__experimentalIsRenderedInSidebar:r,clearable:d,headingLevel:g})},k=e=>(0,$.jsx)("div",{className:"block-editor-color-gradient-control__panel",children:b[e]});return(0,$.jsx)(os.BaseControl,{__nextHasNoMarginBottom:!0,className:Zi("block-editor-color-gradient-control",i),children:(0,$.jsx)("fieldset",{className:"block-editor-color-gradient-control__fieldset",children:(0,$.jsxs)(os.__experimentalVStack,{spacing:1,children:[p&&(0,$.jsx)("legend",{children:(0,$.jsx)("div",{className:"block-editor-color-gradient-control__color-indicator",children:(0,$.jsx)(os.BaseControl.VisualLabel,{children:s})})}),m&&f&&(0,$.jsx)("div",{children:(0,$.jsxs)(Wd,{defaultTabId:u?Zd.gradient:!!m&&Zd.color,children:[(0,$.jsxs)(Wd.TabList,{children:[(0,$.jsx)(Wd.Tab,{tabId:Zd.color,children:(0,C.__)("Color")}),(0,$.jsx)(Wd.Tab,{tabId:Zd.gradient,children:(0,C.__)("Gradient")})]}),(0,$.jsx)(Wd.TabPanel,{tabId:Zd.color,className:"block-editor-color-gradient-control__panel",focusable:!1,children:b.color}),(0,$.jsx)(Wd.TabPanel,{tabId:Zd.gradient,className:"block-editor-color-gradient-control__panel",focusable:!1,children:b.gradient})]})}),!f&&k(Zd.color),!m&&k(Zd.gradient)]})})})}function Yd(e){const[t,n,o,r]=ci("color.palette","color.gradients","color.custom","color.customGradient");return(0,$.jsx)(qd,{colors:t,gradients:n,disableCustomColors:!o,disableCustomGradients:!r,...e})}const Xd=function(e){return Kd.every((t=>e.hasOwnProperty(t)))?(0,$.jsx)(qd,{...e}):(0,$.jsx)(Yd,{...e})};function Qd(e){const t=Jd(e),n=rp(e),o=ep(e),r=np(e),i=op(e),s=tp(e);return t||n||o||r||i||s}function Jd(e){const t=Ui(e);return e?.color?.text&&(t?.length>0||e?.color?.custom)}function ep(e){const t=Ui(e);return e?.color?.link&&(t?.length>0||e?.color?.custom)}function tp(e){const t=Ui(e);return e?.color?.caption&&(t?.length>0||e?.color?.custom)}function np(e){const t=Ui(e),n=Wi(e);return e?.color?.heading&&(t?.length>0||e?.color?.custom||n?.length>0||e?.color?.customGradient)}function op(e){const t=Ui(e),n=Wi(e);return e?.color?.button&&(t?.length>0||e?.color?.custom||n?.length>0||e?.color?.customGradient)}function rp(e){const t=Ui(e),n=Wi(e);return e?.color?.background&&(t?.length>0||e?.color?.custom||n?.length>0||e?.color?.customGradient)}function ip({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r}){const i=Pi();return(0,$.jsx)(os.__experimentalToolsPanel,{label:(0,C.__)("Elements"),resetAll:()=>{const o=e(n);t(o)},panelId:o,hasInnerWrapper:!0,headingLevel:3,className:"color-block-support-panel",__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",dropdownMenuProps:i,children:(0,$.jsx)("div",{className:"color-block-support-panel__inner-wrapper",children:r})})}const sp={text:!0,background:!0,link:!0,heading:!0,button:!0,caption:!0},lp={placement:"left-start",offset:36,shift:!0},{Tabs:ap}=te(os.privateApis),cp=({indicators:e,label:t})=>(0,$.jsxs)(os.__experimentalHStack,{justify:"flex-start",children:[(0,$.jsx)(os.__experimentalZStack,{isLayered:!1,offset:-8,children:e.map(((e,t)=>(0,$.jsx)(os.Flex,{expanded:!1,children:(0,$.jsx)(os.ColorIndicator,{colorValue:e})},t)))}),(0,$.jsx)(os.FlexItem,{className:"block-editor-panel-color-gradient-settings__color-name",title:t,children:t})]});function up({isGradient:e,inheritedValue:t,userValue:n,setValue:o,colorGradientControlSettings:r}){return(0,$.jsx)(Xd,{...r,showTitle:!1,enableAlpha:!0,__experimentalIsRenderedInSidebar:!0,colorValue:e?void 0:t,gradientValue:e?t:void 0,onColorChange:e?void 0:o,onGradientChange:e?o:void 0,clearable:t===n,headingLevel:3})}function dp({label:e,hasValue:t,resetValue:n,isShownByDefault:o,indicators:r,tabs:i,colorGradientControlSettings:s,panelId:l}){var a;const c=i.find((e=>void 0!==e.userValue)),{key:u,...d}=null!==(a=i[0])&&void 0!==a?a:{};return(0,$.jsx)(os.__experimentalToolsPanelItem,{className:"block-editor-tools-panel-color-gradient-settings__item",hasValue:t,label:e,onDeselect:n,isShownByDefault:o,panelId:l,children:(0,$.jsx)(os.Dropdown,{popoverProps:lp,className:"block-editor-tools-panel-color-gradient-settings__dropdown",renderToggle:({onToggle:t,isOpen:n})=>{const o={onClick:t,className:Zi("block-editor-panel-color-gradient-settings__dropdown",{"is-open":n}),"aria-expanded":n,"aria-label":(0,C.sprintf)((0,C.__)("Color %s styles"),e)};return(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,...o,children:(0,$.jsx)(cp,{indicators:r,label:e})})},renderContent:()=>(0,$.jsx)(os.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,$.jsxs)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content",children:[1===i.length&&(0,$.jsx)(up,{...d,colorGradientControlSettings:s},u),i.length>1&&(0,$.jsxs)(ap,{defaultTabId:c?.key,children:[(0,$.jsx)(ap.TabList,{children:i.map((e=>(0,$.jsx)(ap.Tab,{tabId:e.key,children:e.label},e.key)))}),i.map((e=>{const{key:t,...n}=e;return(0,$.jsx)(ap.TabPanel,{tabId:t,focusable:!1,children:(0,$.jsx)(up,{...n,colorGradientControlSettings:s},t)},t)}))]})]})})})})}function pp({as:e=ip,value:t,onChange:n,inheritedValue:o=t,settings:r,panelId:i,defaultControls:s=sp,children:l}){const c=Ui(r),u=Wi(r),d=r?.color?.custom,p=r?.color?.customGradient,h=c.length>0||d,g=u.length>0||p,m=e=>Ni({settings:r},"",e),f=e=>{const t=c.flatMap((({colors:e})=>e)).find((({color:t})=>t===e));return t?"var:preset|color|"+t.slug:e},b=e=>{const t=u.flatMap((({gradients:e})=>e)).find((({gradient:t})=>t===e));return t?"var:preset|gradient|"+t.slug:e},k=rp(r),v=m(o?.color?.background),_=m(t?.color?.background),x=m(o?.color?.gradient),y=m(t?.color?.gradient),S=ep(r),w=m(o?.elements?.link?.color?.text),B=m(t?.elements?.link?.color?.text),I=m(o?.elements?.link?.[":hover"]?.color?.text),j=m(t?.elements?.link?.[":hover"]?.color?.text),E=Jd(r),T=m(o?.color?.text),M=m(t?.color?.text),P=e=>{let o=ve(t,["color","text"],f(e));T===w&&(o=ve(o,["elements","link","color","text"],f(e))),n(o)},R=[{name:"caption",label:(0,C.__)("Captions"),showPanel:tp(r)},{name:"button",label:(0,C.__)("Button"),showPanel:op(r)},{name:"heading",label:(0,C.__)("Heading"),showPanel:np(r)},{name:"h1",label:(0,C.__)("H1"),showPanel:np(r)},{name:"h2",label:(0,C.__)("H2"),showPanel:np(r)},{name:"h3",label:(0,C.__)("H3"),showPanel:np(r)},{name:"h4",label:(0,C.__)("H4"),showPanel:np(r)},{name:"h5",label:(0,C.__)("H5"),showPanel:np(r)},{name:"h6",label:(0,C.__)("H6"),showPanel:np(r)}],N=(0,a.useCallback)((e=>({...e,color:void 0,elements:{...e?.elements,link:{...e?.elements?.link,color:void 0,":hover":{color:void 0}},...R.reduce(((t,n)=>({...t,[n.name]:{...e?.elements?.[n.name],color:void 0}})),{})}})),[]),L=[E&&{key:"text",label:(0,C.__)("Text"),hasValue:()=>!!M,resetValue:()=>P(void 0),isShownByDefault:s.text,indicators:[T],tabs:[{key:"text",label:(0,C.__)("Text"),inheritedValue:T,setValue:P,userValue:M}]},k&&{key:"background",label:(0,C.__)("Background"),hasValue:()=>!!_||!!y,resetValue:()=>{const e=ve(t,["color","background"],void 0);e.color.gradient=void 0,n(e)},isShownByDefault:s.background,indicators:[null!=x?x:v],tabs:[h&&{key:"background",label:(0,C.__)("Color"),inheritedValue:v,setValue:e=>{const o=ve(t,["color","background"],f(e));o.color.gradient=void 0,n(o)},userValue:_},g&&{key:"gradient",label:(0,C.__)("Gradient"),inheritedValue:x,setValue:e=>{const o=ve(t,["color","gradient"],b(e));o.color.background=void 0,n(o)},userValue:y,isGradient:!0}].filter(Boolean)},S&&{key:"link",label:(0,C.__)("Link"),hasValue:()=>!!B||!!j,resetValue:()=>{let e=ve(t,["elements","link",":hover","color","text"],void 0);e=ve(e,["elements","link","color","text"],void 0),n(e)},isShownByDefault:s.link,indicators:[w,I],tabs:[{key:"link",label:(0,C.__)("Default"),inheritedValue:w,setValue:e=>{n(ve(t,["elements","link","color","text"],f(e)))},userValue:B},{key:"hover",label:(0,C.__)("Hover"),inheritedValue:I,setValue:e=>{n(ve(t,["elements","link",":hover","color","text"],f(e)))},userValue:j}]}].filter(Boolean);return R.forEach((({name:e,label:r,showPanel:i})=>{if(!i)return;const l=m(o?.elements?.[e]?.color?.background),a=m(o?.elements?.[e]?.color?.gradient),c=m(o?.elements?.[e]?.color?.text),u=m(t?.elements?.[e]?.color?.background),d=m(t?.elements?.[e]?.color?.gradient),p=m(t?.elements?.[e]?.color?.text),k="caption"!==e;L.push({key:e,label:r,hasValue:()=>!!(p||u||d),resetValue:()=>{const o=ve(t,["elements",e,"color","background"],void 0);o.elements[e].color.gradient=void 0,o.elements[e].color.text=void 0,n(o)},isShownByDefault:s[e],indicators:k?[c,null!=a?a:l]:[c],tabs:[h&&{key:"text",label:(0,C.__)("Text"),inheritedValue:c,setValue:o=>{n(ve(t,["elements",e,"color","text"],f(o)))},userValue:p},h&&k&&{key:"background",label:(0,C.__)("Background"),inheritedValue:l,setValue:o=>{const r=ve(t,["elements",e,"color","background"],f(o));r.elements[e].color.gradient=void 0,n(r)},userValue:u},g&&k&&{key:"gradient",label:(0,C.__)("Gradient"),inheritedValue:a,setValue:o=>{const r=ve(t,["elements",e,"color","gradient"],b(o));r.elements[e].color.background=void 0,n(r)},userValue:d,isGradient:!0}].filter(Boolean)})})),(0,$.jsxs)(e,{resetAllFilter:N,value:t,onChange:n,panelId:i,children:[L.map((e=>{const{key:t,...n}=e;return(0,$.jsx)(dp,{...n,colorGradientControlSettings:{colors:c,disableCustomColors:!d,gradients:u,disableCustomGradients:!p},panelId:i},t)})),l]})}zu([Vu,Gu]);const hp=function({backgroundColor:e,fallbackBackgroundColor:t,fallbackTextColor:n,fallbackLinkColor:o,fontSize:r,isLargeText:i,textColor:s,linkColor:l,enableAlphaChecker:a=!1}){const c=e||t;if(!c)return null;const u=s||n,d=l||o;if(!u&&!d)return null;const p=[{color:u,description:(0,C.__)("text color")},{color:d,description:(0,C.__)("link color")}],h=Du(c),g=h.alpha()<1,m=h.brightness(),f={level:"AA",size:i||!1!==i&&r>=24?"large":"small"};let b="",k="";for(const e of p){if(!e.color)continue;const t=Du(e.color),n=t.isReadable(h,f),o=t.alpha()<1;if(!n){if(g||o)continue;b=m<t.brightness()?(0,C.sprintf)((0,C.__)("This color combination may be hard for people to read. Try using a darker background color and/or a brighter %s."),e.description):(0,C.sprintf)((0,C.__)("This color combination may be hard for people to read. Try using a brighter background color and/or a darker %s."),e.description),k=(0,C.__)("This color combination may be hard for people to read.");break}o&&a&&(b=(0,C.__)("Transparent text may be hard for people to read."),k=(0,C.__)("Transparent text may be hard for people to read."))}return b?((0,$o.speak)(k),(0,$.jsx)("div",{className:"block-editor-contrast-checker",children:(0,$.jsx)(os.Notice,{spokenMessage:null,status:"warning",isDismissible:!1,children:b})})):null},gp=(0,a.createContext)({refsMap:(0,u.observableMap)()});function mp({children:e}){const t=(0,a.useMemo)((()=>({refsMap:(0,u.observableMap)()})),[]);return(0,$.jsx)(gp.Provider,{value:t,children:e})}function fp(e){const{refsMap:t}=(0,a.useContext)(gp);return(0,u.useRefEffect)((n=>(t.set(e,n),()=>t.delete(e))),[e])}function bp(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function kp(e,t){const{refsMap:n}=(0,a.useContext)(gp);(0,a.useLayoutEffect)((()=>{bp(t,n.get(e));const o=n.subscribe(e,(()=>bp(t,n.get(e))));return()=>{o(),bp(t,null)}}),[n,e,t])}function vp(e){const[t,n]=(0,a.useState)(null);return kp(e,n),t}function _p(e){return e.ownerDocument.defaultView.getComputedStyle(e)}function xp({clientId:e}){const[t,n]=(0,a.useState)(),[o,r]=(0,a.useState)(),[i,s]=(0,a.useState)(),l=vp(e);return(0,a.useEffect)((()=>{if(!l)return;r(_p(l).color);const e=l.querySelector("a");e&&e.innerText&&s(_p(e).color);let t=l,o=_p(t).backgroundColor;for(;"rgba(0, 0, 0, 0)"===o&&t.parentNode&&t.parentNode.nodeType===t.parentNode.ELEMENT_NODE;)t=t.parentNode,o=_p(t).backgroundColor;n(o)}),[l]),(0,$.jsx)(hp,{backgroundColor:t,textColor:o,enableAlphaChecker:!0,linkColor:i})}const yp="color",Sp=e=>{const t=(0,l.getBlockSupport)(e,yp);return t&&(!0===t.link||!0===t.gradient||!1!==t.background||!1!==t.text)},wp=e=>{if("web"!==a.Platform.OS)return!1;const t=(0,l.getBlockSupport)(e,yp);return null!==t&&"object"==typeof t&&!!t.link},Cp=e=>{const t=(0,l.getBlockSupport)(e,yp);return null!==t&&"object"==typeof t&&!!t.gradients},Bp=e=>{const t=(0,l.getBlockSupport)(e,yp);return t&&!1!==t.background},Ip=e=>{const t=(0,l.getBlockSupport)(e,yp);return t&&!1!==t.text};function jp(e,t,n){if(!Sp(t)||Xi(t,yp))return e;const o=Cp(t),{backgroundColor:r,textColor:i,gradient:s,style:l}=n,a=e=>!Xi(t,yp,e),c=a("text")?Ku("color",i):void 0,u=a("gradients")?Fd(s):void 0,d=a("background")?Ku("background-color",r):void 0,p=a("background")||a("gradients"),h=r||l?.color?.background||o&&(s||l?.color?.gradient),g=Zi(e.className,c,u,{[d]:!(o&&l?.color?.gradient||!d),"has-text-color":a("text")&&(i||l?.color?.text),"has-background":p&&h,"has-link-color":a("link")&&l?.elements?.link?.color});return e.className=g||void 0,e}function Ep(e){const t=e?.color?.text,n=t?.startsWith("var:preset|color|")?t.substring(17):void 0,o=e?.color?.background,r=o?.startsWith("var:preset|color|")?o.substring(17):void 0,i=e?.color?.gradient,s=i?.startsWith("var:preset|gradient|")?i.substring(20):void 0,l={...e};return l.color={...l.color,text:n?void 0:t,background:r?void 0:o,gradient:s?void 0:i},{style:qi(l),textColor:n,backgroundColor:r,gradient:s}}function Tp(e){return{...e.style,color:{...e.style?.color,text:e.textColor?"var:preset|color|"+e.textColor:e.style?.color?.text,background:e.backgroundColor?"var:preset|color|"+e.backgroundColor:e.style?.color?.background,gradient:e.gradient?"var:preset|gradient|"+e.gradient:e.style?.color?.gradient}}}function Mp({children:e,resetAllFilter:t}){const n=(0,a.useCallback)((e=>{const n=Tp(e),o=t(n);return{...e,...Ep(o)}}),[t]);return(0,$.jsx)(ma,{group:"color",resetAllFilter:n,children:e})}function Pp({clientId:e,name:t,setAttributes:n,settings:o}){const r=Qd(o);const{style:i,textColor:s,backgroundColor:u,gradient:d}=(0,c.useSelect)((function(t){const{style:n,textColor:o,backgroundColor:r,gradient:i}=t(li).getBlockAttributes(e)||{};return{style:n,textColor:o,backgroundColor:r,gradient:i}}),[e]),p=(0,a.useMemo)((()=>Tp({style:i,textColor:s,backgroundColor:u,gradient:d})),[i,s,u,d]);if(!r)return null;const h=(0,l.getBlockSupport)(t,[yp,"__experimentalDefaultControls"]),g="web"===a.Platform.OS&&!p?.color?.gradient&&(o?.color?.text||o?.color?.link)&&!1!==(0,l.getBlockSupport)(t,[yp,"enableContrastChecker"]);return(0,$.jsx)(pp,{as:Mp,panelId:e,settings:o,value:p,onChange:e=>{n(Ep(e))},defaultControls:h,enableContrastChecker:!1!==(0,l.getBlockSupport)(t,[yp,"enableContrastChecker"]),children:g&&(0,$.jsx)(xp,{clientId:e})})}const Rp={useBlockProps:function({name:e,backgroundColor:t,textColor:n,gradient:o,style:r}){const[i,s,l]=ci("color.palette.custom","color.palette.theme","color.palette.default"),c=(0,a.useMemo)((()=>[...i||[],...s||[],...l||[]]),[i,s,l]);if(!Sp(e)||Xi(e,yp))return{};const u={};n&&!Xi(e,yp,"text")&&(u.color=Uu(c,n)?.color),t&&!Xi(e,yp,"background")&&(u.backgroundColor=Uu(c,t)?.color);const d=jp({style:u},e,{textColor:n,backgroundColor:t,gradient:o,style:r}),p=t||r?.color?.background||o||r?.color?.gradient;return{...d,className:Zi(d.className,!p&&tu(r))}},addSaveProps:jp,attributeKeys:["backgroundColor","textColor","gradient","style"],hasSupport:Sp},Np={linkColor:[["style","elements","link","color","text"]],textColor:[["textColor"],["style","color","text"]],backgroundColor:[["backgroundColor"],["style","color","background"]],gradient:[["gradient"],["style","color","gradient"]]};function Lp({__next40pxDefaultSize:e=!1,__nextHasNoMarginBottom:t=!1,value:n="",onChange:o,fontFamilies:r,...i}){const[s]=ci("typography.fontFamilies");if(r||(r=s),!r||0===r.length)return null;const l=[{value:"",label:(0,C.__)("Default")},...r.map((({fontFamily:e,name:t})=>({value:e,label:t||e})))];return t||y()("Bottom margin styles for wp.blockEditor.FontFamilyControl",{since:"6.7",version:"7.0",hint:"Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version"}),(0,$.jsx)(os.SelectControl,{__next40pxDefaultSize:e,__nextHasNoMarginBottom:t,label:(0,C.__)("Font"),options:l,value:n,onChange:o,labelPosition:"top",...i})}(0,d.addFilter)("blocks.registerBlockType","core/color/addAttribute",(function(e){return Sp(e)?(e.attributes.backgroundColor||Object.assign(e.attributes,{backgroundColor:{type:"string"}}),e.attributes.textColor||Object.assign(e.attributes,{textColor:{type:"string"}}),Cp(e)&&!e.attributes.gradient&&Object.assign(e.attributes,{gradient:{type:"string"}}),e):e})),(0,d.addFilter)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",(function(e,t,n,o){const r=e.name;return Yi({linkColor:wp(r),textColor:Ip(r),backgroundColor:Bp(r),gradient:Cp(r)},Np,e,t,n,o)}));const Ap=(e,t)=>e?t?(0,C.__)("Appearance"):(0,C.__)("Font style"):(0,C.__)("Font weight");function Dp(e){const{__next40pxDefaultSize:t=!1,onChange:n,hasFontStyles:o=!0,hasFontWeights:r=!0,fontFamilyFaces:i,value:{fontStyle:s,fontWeight:l},...c}=e,u=o||r,d=Ap(o,r),p={key:"default",name:(0,C.__)("Default"),style:{fontStyle:void 0,fontWeight:void 0}},{fontStyles:h,fontWeights:g,combinedStyleAndWeightOptions:m}=wi(i),f=(0,a.useMemo)((()=>o&&r?(()=>{const e=[p];return m&&e.push(...m),e})():o?(()=>{const e=[p];return h.forEach((({name:t,value:n})=>{e.push({key:n,name:t,style:{fontStyle:n,fontWeight:void 0}})})),e})():(()=>{const e=[p];return g.forEach((({name:t,value:n})=>{e.push({key:n,name:t,style:{fontStyle:void 0,fontWeight:n}})})),e})()),[e.options,h,g,m]),b=f.find((e=>e.style.fontStyle===s&&e.style.fontWeight===l))||f[0];return u&&(0,$.jsx)(os.CustomSelectControl,{...c,className:"components-font-appearance-control",__next40pxDefaultSize:t,label:d,describedBy:b?o?r?(0,C.sprintf)((0,C.__)("Currently selected font appearance: %s"),b.name):(0,C.sprintf)((0,C.__)("Currently selected font style: %s"),b.name):(0,C.sprintf)((0,C.__)("Currently selected font weight: %s"),b.name):(0,C.__)("No selected font appearance"),options:f,value:b,onChange:({selectedItem:e})=>n(e.style)})}const Op=1.5;const zp=({__next40pxDefaultSize:e=!1,value:t,onChange:n,__unstableInputWidth:o="60px",...r})=>{const i=function(e){return void 0!==e&&""!==e}(t),s=(e,t)=>{if(i)return e;switch(`${e}`){case"0.1":return 1.6;case"0":return t?e:1.4;case"":return Op;default:return e}},l=i?t:"";return(0,$.jsx)("div",{className:"block-editor-line-height-control",children:(0,$.jsx)(os.__experimentalNumberControl,{...r,__next40pxDefaultSize:e,__unstableInputWidth:o,__unstableStateReducer:(e,t)=>{const n=["insertText","insertFromPaste"].includes(t.payload.event.nativeEvent?.inputType),o=s(e.value,n);return{...e,value:o}},onChange:(e,{event:t})=>{""!==e?"click"!==t.type?n(`${e}`):n(s(`${e}`,!1)):n()},label:(0,C.__)("Line height"),placeholder:Op,step:.01,spinFactor:10,value:l,min:0,spinControls:"custom"})})};function Vp({__next40pxDefaultSize:e=!1,value:t,onChange:n,__unstableInputWidth:o="60px",...r}){const[i]=ci("spacing.units"),s=(0,os.__experimentalUseCustomUnits)({availableUnits:i||["px","em","rem"],defaultValues:{px:2,em:.2,rem:.2}});return(0,$.jsx)(os.__experimentalUnitControl,{__next40pxDefaultSize:e,...r,label:(0,C.__)("Letter spacing"),value:t,__unstableInputWidth:o,units:s,onChange:n})}const Fp=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M13 5.5H4V4h9v1.5Zm7 7H4V11h16v1.5Zm-7 7H4V18h9v1.5Z"})}),Hp=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M7.5 5.5h9V4h-9v1.5Zm-3.5 7h16V11H4v1.5Zm3.5 7h9V18h-9v1.5Z"})}),Gp=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M11.111 5.5H20V4h-8.889v1.5ZM4 12.5h16V11H4v1.5Zm7.111 7H20V18h-8.889v1.5Z"})}),$p=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M4 12.8h16v-1.5H4v1.5zm0 7h12.4v-1.5H4v1.5zM4 4.3v1.5h16V4.3H4z"})}),Up=[{label:(0,C.__)("Align text left"),value:"left",icon:Fp},{label:(0,C.__)("Align text center"),value:"center",icon:Hp},{label:(0,C.__)("Align text right"),value:"right",icon:Gp},{label:(0,C.__)("Justify text"),value:"justify",icon:$p}],Wp=["left","center","right"];function Kp({className:e,value:t,onChange:n,options:o=Wp}){const r=(0,a.useMemo)((()=>Up.filter((e=>o.includes(e.value)))),[o]);return r.length?(0,$.jsx)(os.__experimentalToggleGroupControl,{isDeselectable:!0,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,C.__)("Text alignment"),className:Zi("block-editor-text-alignment-control",e),value:t,onChange:e=>{n(e===t?void 0:e)},children:r.map((e=>(0,$.jsx)(os.__experimentalToggleGroupControlOptionIcon,{value:e.value,icon:e.icon,label:e.label},e.value)))}):null}const Zp=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M7 11.5h10V13H7z"})}),qp=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.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"})}),Yp=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.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"})}),Xp=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.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"})}),Qp=[{label:(0,C.__)("None"),value:"none",icon:Zp},{label:(0,C.__)("Uppercase"),value:"uppercase",icon:qp},{label:(0,C.__)("Lowercase"),value:"lowercase",icon:Yp},{label:(0,C.__)("Capitalize"),value:"capitalize",icon:Xp}];function Jp({className:e,value:t,onChange:n}){return(0,$.jsx)(os.__experimentalToggleGroupControl,{isDeselectable:!0,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,C.__)("Letter case"),className:Zi("block-editor-text-transform-control",e),value:t,onChange:e=>{n(e===t?void 0:e)},children:Qp.map((e=>(0,$.jsx)(os.__experimentalToggleGroupControlOptionIcon,{value:e.value,icon:e.icon,label:e.label},e.value)))})}const eh=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.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"})}),th=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.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"})}),nh=[{label:(0,C.__)("None"),value:"none",icon:Zp},{label:(0,C.__)("Underline"),value:"underline",icon:eh},{label:(0,C.__)("Strikethrough"),value:"line-through",icon:th}];function oh({value:e,onChange:t,className:n}){return(0,$.jsx)(os.__experimentalToggleGroupControl,{isDeselectable:!0,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,C.__)("Decoration"),className:Zi("block-editor-text-decoration-control",n),value:e,onChange:n=>{t(n===e?void 0:n)},children:nh.map((e=>(0,$.jsx)(os.__experimentalToggleGroupControlOptionIcon,{value:e.value,icon:e.icon,label:e.label},e.value)))})}const rh=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M8.2 14.4h3.9L13 17h1.7L11 6.5H9.3L5.6 17h1.7l.9-2.6zm2-5.5 1.4 4H8.8l1.4-4zm7.4 7.5-1.3.8.8 1.4H5.5V20h14.3l-2.2-3.6z"})}),ih=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M7 5.6v1.7l2.6.9v3.9L7 13v1.7L17.5 11V9.3L7 5.6zm4.2 6V8.8l4 1.4-4 1.4zm-5.7 5.6V5.5H4v14.3l3.6-2.2-.8-1.3-1.3.9z"})}),sh=[{label:(0,C.__)("Horizontal"),value:"horizontal-tb",icon:rh},{label:(0,C.__)("Vertical"),value:(0,C.isRTL)()?"vertical-lr":"vertical-rl",icon:ih}];function lh({className:e,value:t,onChange:n}){return(0,$.jsx)(os.__experimentalToggleGroupControl,{isDeselectable:!0,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,C.__)("Orientation"),className:Zi("block-editor-writing-mode-control",e),value:t,onChange:e=>{n(e===t?void 0:e)},children:sh.map((e=>(0,$.jsx)(os.__experimentalToggleGroupControlOptionIcon,{value:e.value,icon:e.icon,label:e.label},e.value)))})}const ah=1,ch=6;function uh(e){const t=ph(e),n=hh(e),o=gh(e),r=mh(e),i=bh(e),s=fh(e),l=kh(e),a=vh(e),c=_h(e),u=dh(e);return t||n||o||r||i||s||u||l||a||c}function dh(e){return!1!==e?.typography?.defaultFontSizes&&e?.typography?.fontSizes?.default?.length||e?.typography?.fontSizes?.theme?.length||e?.typography?.fontSizes?.custom?.length||e?.typography?.customFontSize}function ph(e){return["default","theme","custom"].some((t=>e?.typography?.fontFamilies?.[t]?.length))}function hh(e){return e?.typography?.lineHeight}function gh(e){return e?.typography?.fontStyle||e?.typography?.fontWeight}function mh(e){return e?.typography?.letterSpacing}function fh(e){return e?.typography?.textTransform}function bh(e){return e?.typography?.textAlign}function kh(e){return e?.typography?.textDecoration}function vh(e){return e?.typography?.writingMode}function _h(e){return e?.typography?.textColumns}function xh({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r}){const i=Pi();return(0,$.jsx)(os.__experimentalToolsPanel,{label:(0,C.__)("Typography"),resetAll:()=>{const o=e(n);t(o)},panelId:o,dropdownMenuProps:i,children:r})}const yh={fontFamily:!0,fontSize:!0,fontAppearance:!0,lineHeight:!0,letterSpacing:!0,textAlign:!0,textTransform:!0,textDecoration:!0,writingMode:!0,textColumns:!0};function Sh({as:e=xh,value:t,onChange:n,inheritedValue:o=t,settings:r,panelId:i,defaultControls:s=yh}){const l=e=>Ni({settings:r},"",e),c=ph(r),u=l(o?.typography?.fontFamily),{fontFamilies:d,fontFamilyFaces:p}=(0,a.useMemo)((()=>function(e,t){var n;const o=e?.typography?.fontFamilies,r=["default","theme","custom"].flatMap((e=>{var t;return null!==(t=o?.[e])&&void 0!==t?t:[]})),i=null!==(n=r.find((e=>e.fontFamily===t))?.fontFace)&&void 0!==n?n:[];return{fontFamilies:r,fontFamilyFaces:i}}(r,u)),[r,u]),h=e=>{const o=d?.find((({fontFamily:t})=>t===e))?.slug;n(ve(t,["typography","fontFamily"],o?`var:preset|font-family|${o}`:e||void 0))},g=dh(r),m=!r?.typography?.customFontSize,f=function(e){var t,n,o;const r=e?.typography?.fontSizes,i=!!e?.typography?.defaultFontSizes;return[...null!==(t=r?.custom)&&void 0!==t?t:[],...null!==(n=r?.theme)&&void 0!==n?n:[],...i&&null!==(o=r?.default)&&void 0!==o?o:[]]}(r),b=l(o?.typography?.fontSize),k=(e,o)=>{n(ve(t,["typography","fontSize"],(o?.slug?`var:preset|font-size|${o?.slug}`:e)||void 0))},v=gh(r),_=function(e){return e?.typography?.fontStyle?e?.typography?.fontWeight?(0,C.__)("Appearance"):(0,C.__)("Font style"):(0,C.__)("Font weight")}(r),x=r?.typography?.fontStyle,y=r?.typography?.fontWeight,S=l(o?.typography?.fontStyle),w=l(o?.typography?.fontWeight),{nearestFontStyle:B,nearestFontWeight:I}=function(e,t,n){let o=t,r=n;const{fontStyles:i,fontWeights:s,combinedStyleAndWeightOptions:l}=wi(e),a=i?.some((({value:e})=>e===t)),c=s?.some((({value:e})=>e?.toString()===n?.toString()));var u,d;return a||(o=t?(u=i,"string"==typeof(d=t)&&d&&["normal","italic","oblique"].includes(d)?!u||0===u.length||u.find((e=>e.value===d))?d:"oblique"!==d||u.find((e=>"oblique"===e.value))?"":"italic":""):l?.find((e=>e.style.fontWeight===Ii(s,n)))?.style?.fontStyle),c||(r=n?Ii(s,n):l?.find((e=>e.style.fontStyle===(o||t)))?.style?.fontWeight),{nearestFontStyle:o,nearestFontWeight:r}}(p,S,w),j=(0,a.useCallback)((({fontStyle:e,fontWeight:o})=>{e===S&&o===w||n({...t,typography:{...t?.typography,fontStyle:e||void 0,fontWeight:o||void 0}})}),[S,w,n,t]),E=(0,a.useCallback)((()=>{j({})}),[j]);(0,a.useEffect)((()=>{B&&I?j({fontStyle:B,fontWeight:I}):E()}),[B,I,E,j]);const T=hh(r),M=l(o?.typography?.lineHeight),P=e=>{n(ve(t,["typography","lineHeight"],e||void 0))},R=mh(r),N=l(o?.typography?.letterSpacing),L=e=>{n(ve(t,["typography","letterSpacing"],e||void 0))},A=_h(r),D=l(o?.typography?.textColumns),O=e=>{n(ve(t,["typography","textColumns"],e||void 0))},z=fh(r),V=l(o?.typography?.textTransform),F=e=>{n(ve(t,["typography","textTransform"],e||void 0))},H=kh(r),G=l(o?.typography?.textDecoration),U=e=>{n(ve(t,["typography","textDecoration"],e||void 0))},W=vh(r),K=l(o?.typography?.writingMode),Z=e=>{n(ve(t,["typography","writingMode"],e||void 0))},q=bh(r),Y=l(o?.typography?.textAlign),X=e=>{n(ve(t,["typography","textAlign"],e||void 0))},Q=(0,a.useCallback)((e=>({...e,typography:{}})),[]);return(0,$.jsxs)(e,{resetAllFilter:Q,value:t,onChange:n,panelId:i,children:[c&&(0,$.jsx)(os.__experimentalToolsPanelItem,{label:(0,C.__)("Font"),hasValue:()=>!!t?.typography?.fontFamily,onDeselect:()=>h(void 0),isShownByDefault:s.fontFamily,panelId:i,children:(0,$.jsx)(Lp,{fontFamilies:d,value:u,onChange:h,size:"__unstable-large",__nextHasNoMarginBottom:!0})}),g&&(0,$.jsx)(os.__experimentalToolsPanelItem,{label:(0,C.__)("Size"),hasValue:()=>!!t?.typography?.fontSize,onDeselect:()=>k(void 0),isShownByDefault:s.fontSize,panelId:i,children:(0,$.jsx)(os.FontSizePicker,{value:b,onChange:k,fontSizes:f,disableCustomFontSizes:m,withReset:!1,withSlider:!0,size:"__unstable-large"})}),v&&(0,$.jsx)(os.__experimentalToolsPanelItem,{className:"single-column",label:_,hasValue:()=>!!t?.typography?.fontStyle||!!t?.typography?.fontWeight,onDeselect:E,isShownByDefault:s.fontAppearance,panelId:i,children:(0,$.jsx)(Dp,{value:{fontStyle:S,fontWeight:w},onChange:j,hasFontStyles:x,hasFontWeights:y,fontFamilyFaces:p,size:"__unstable-large"})}),T&&(0,$.jsx)(os.__experimentalToolsPanelItem,{className:"single-column",label:(0,C.__)("Line height"),hasValue:()=>void 0!==t?.typography?.lineHeight,onDeselect:()=>P(void 0),isShownByDefault:s.lineHeight,panelId:i,children:(0,$.jsx)(zp,{__unstableInputWidth:"auto",value:M,onChange:P,size:"__unstable-large"})}),R&&(0,$.jsx)(os.__experimentalToolsPanelItem,{className:"single-column",label:(0,C.__)("Letter spacing"),hasValue:()=>!!t?.typography?.letterSpacing,onDeselect:()=>L(void 0),isShownByDefault:s.letterSpacing,panelId:i,children:(0,$.jsx)(Vp,{value:N,onChange:L,size:"__unstable-large",__unstableInputWidth:"auto"})}),A&&(0,$.jsx)(os.__experimentalToolsPanelItem,{className:"single-column",label:(0,C.__)("Columns"),hasValue:()=>!!t?.typography?.textColumns,onDeselect:()=>O(void 0),isShownByDefault:s.textColumns,panelId:i,children:(0,$.jsx)(os.__experimentalNumberControl,{label:(0,C.__)("Columns"),max:ch,min:ah,onChange:O,size:"__unstable-large",spinControls:"custom",value:D,initialPosition:1})}),H&&(0,$.jsx)(os.__experimentalToolsPanelItem,{className:"single-column",label:(0,C.__)("Decoration"),hasValue:()=>!!t?.typography?.textDecoration,onDeselect:()=>U(void 0),isShownByDefault:s.textDecoration,panelId:i,children:(0,$.jsx)(oh,{value:G,onChange:U,size:"__unstable-large",__unstableInputWidth:"auto"})}),W&&(0,$.jsx)(os.__experimentalToolsPanelItem,{className:"single-column",label:(0,C.__)("Orientation"),hasValue:()=>!!t?.typography?.writingMode,onDeselect:()=>Z(void 0),isShownByDefault:s.writingMode,panelId:i,children:(0,$.jsx)(lh,{value:K,onChange:Z,size:"__unstable-large",__nextHasNoMarginBottom:!0})}),z&&(0,$.jsx)(os.__experimentalToolsPanelItem,{label:(0,C.__)("Letter case"),hasValue:()=>!!t?.typography?.textTransform,onDeselect:()=>F(void 0),isShownByDefault:s.textTransform,panelId:i,children:(0,$.jsx)(Jp,{value:V,onChange:F,showNone:!0,isBlock:!0,size:"__unstable-large",__nextHasNoMarginBottom:!0})}),q&&(0,$.jsx)(os.__experimentalToolsPanelItem,{label:(0,C.__)("Text alignment"),hasValue:()=>!!t?.typography?.textAlign,onDeselect:()=>X(void 0),isShownByDefault:s.textAlign,panelId:i,children:(0,$.jsx)(Kp,{value:Y,onChange:X,size:"__unstable-large",__nextHasNoMarginBottom:!0})})]})}const wh="typography.lineHeight";const Ch=window.wp.tokenList;var Bh=n.n(Ch);const Ih="typography.__experimentalFontFamily",{kebabCase:jh}=te(os.privateApis);function Eh(e,t,n){if(!(0,l.hasBlockSupport)(t,Ih))return e;if(Xi(t,Xh,"fontFamily"))return e;if(!n?.fontFamily)return e;const o=new(Bh())(e.className);o.add(`has-${jh(n?.fontFamily)}-font-family`);const r=o.value;return e.className=r||void 0,e}const Th={useBlockProps:function({name:e,fontFamily:t}){return Eh({},e,{fontFamily:t})},addSaveProps:Eh,attributeKeys:["fontFamily"],hasSupport:e=>(0,l.hasBlockSupport)(e,Ih)};(0,d.addFilter)("blocks.registerBlockType","core/fontFamily/addAttribute",(function(e){return(0,l.hasBlockSupport)(e,Ih)?(e.attributes.fontFamily||Object.assign(e.attributes,{fontFamily:{type:"string"}}),e):e}));const{kebabCase:Mh}=te(os.privateApis),Ph=(e,t,n)=>{if(t){const n=e?.find((({slug:e})=>e===t));if(n)return n}return{size:n}};function Rh(e,t){const n=e?.find((({size:e})=>e===t));return n||{size:t}}function Nh(e){if(e)return`has-${Mh(e)}-font-size`}const Lh="typography.fontSize";function Ah(e,t,n){if(!(0,l.hasBlockSupport)(t,Lh))return e;if(Xi(t,Xh,"fontSize"))return e;const o=new(Bh())(e.className);o.add(Nh(n.fontSize));const r=o.value;return e.className=r||void 0,e}const Dh={useBlockProps:function({name:e,fontSize:t,style:n}){const[o,r,i]=ci("typography.fontSizes","typography.fluid","layout");if(!(0,l.hasBlockSupport)(e,Lh)||Xi(e,Xh,"fontSize")||!t&&!n?.typography?.fontSize)return;let s;return n?.typography?.fontSize&&(s={style:{fontSize:Ci({size:n.typography.fontSize},{typography:{fluid:r},layout:i})}}),t&&(s={style:{fontSize:Ph(o,t,n?.typography?.fontSize).size}}),s?Ah(s,e,{fontSize:t}):void 0},addSaveProps:Ah,attributeKeys:["fontSize","style"],hasSupport:e=>(0,l.hasBlockSupport)(e,Lh)},Oh={fontSize:[["fontSize"],["style","typography","fontSize"]]};(0,d.addFilter)("blocks.registerBlockType","core/font/addAttribute",(function(e){return(0,l.hasBlockSupport)(e,Lh)?(e.attributes.fontSize||Object.assign(e.attributes,{fontSize:{type:"string"}}),e):e})),(0,d.addFilter)("blocks.switchToBlockType.transformedBlock","core/font-size/addTransforms",(function(e,t,n,o){const r=e.name;return Yi({fontSize:(0,l.hasBlockSupport)(r,Lh)},Oh,e,t,n,o)}));const zh=[{icon:Fp,title:(0,C.__)("Align text left"),align:"left"},{icon:Hp,title:(0,C.__)("Align text center"),align:"center"},{icon:Gp,title:(0,C.__)("Align text right"),align:"right"}],Vh={placement:"bottom-start"};const Fh=function({value:e,onChange:t,alignmentControls:n=zh,label:o=(0,C.__)("Align text"),description:r=(0,C.__)("Change text alignment"),isCollapsed:i=!0,isToolbar:s}){function l(n){return()=>t(e===n?void 0:n)}const a=n.find((t=>t.align===e)),c=s?os.ToolbarGroup:os.ToolbarDropdownMenu,u=s?{isCollapsed:i}:{toggleProps:{description:r},popoverProps:Vh};return(0,$.jsx)(c,{icon:a?a.icon:(0,C.isRTL)()?Gp:Fp,label:o,controls:n.map((t=>{const{align:n}=t,o=e===n;return{...t,isActive:o,role:i?"menuitemradio":void 0,onClick:l(n)}})),...u})},Hh=e=>(0,$.jsx)(Fh,{...e,isToolbar:!1}),Gh=e=>(0,$.jsx)(Fh,{...e,isToolbar:!0}),$h="typography.textAlign",Uh=[{icon:Fp,title:(0,C.__)("Align text left"),align:"left"},{icon:Hp,title:(0,C.__)("Align text center"),align:"center"},{icon:Gp,title:(0,C.__)("Align text right"),align:"right"}],Wh=["left","center","right"],Kh=[];function Zh(e){return Array.isArray(e)?Wh.filter((t=>e.includes(t))):!0===e?Wh:Kh}const qh={edit:function({style:e,name:t,setAttributes:n}){const o=ts(t),r=o?.typography?.textAlign,i=Gl();if(!r||"default"!==i)return null;const s=Zh((0,l.getBlockSupport)(t,$h));if(!s.length)return null;const a=Uh.filter((e=>s.includes(e.align)));return(0,$.jsx)(us,{group:"block",children:(0,$.jsx)(Hh,{value:e?.typography?.textAlign,onChange:t=>{const o={...e,typography:{...e?.typography,textAlign:t}};n({style:qi(o)})},alignmentControls:a})})},useBlockProps:function({name:e,style:t}){if(!t?.typography?.textAlign)return null;if(!Zh((0,l.getBlockSupport)(e,$h)).length)return null;if(Xi(e,Xh,"textAlign"))return null;const n=t.typography.textAlign;return{className:Zi({[`has-text-align-${n}`]:n})}},addSaveProps:function(e,t,n){if(!n?.style?.typography?.textAlign)return e;const{textAlign:o}=n.style.typography,r=(0,l.getBlockSupport)(t,$h);Zh(r).includes(o)&&!Xi(t,Xh,"textAlign")&&(e.className=Zi(`has-text-align-${o}`,e.className));return e},attributeKeys:["style"],hasSupport:e=>(0,l.hasBlockSupport)(e,$h,!1)};function Yh(e,t){return Object.fromEntries(Object.entries(e).filter((([e])=>!t.includes(e))))}const Xh="typography",Qh=[wh,Lh,"typography.__experimentalFontStyle","typography.__experimentalFontWeight",Ih,$h,"typography.textColumns","typography.__experimentalTextDecoration","typography.__experimentalWritingMode","typography.__experimentalTextTransform","typography.__experimentalLetterSpacing"];function Jh(e){const t={...Yh(e,["fontFamily"])},n=e?.typography?.fontSize,o=e?.typography?.fontFamily,r=n?.startsWith("var:preset|font-size|")?n.substring(21):void 0,i=o?.startsWith("var:preset|font-family|")?o.substring(23):void 0;return t.typography={...Yh(t.typography,["fontFamily"]),fontSize:r?void 0:n},{style:qi(t),fontFamily:i,fontSize:r}}function eg(e){return{...e.style,typography:{...e.style?.typography,fontFamily:e.fontFamily?"var:preset|font-family|"+e.fontFamily:void 0,fontSize:e.fontSize?"var:preset|font-size|"+e.fontSize:e.style?.typography?.fontSize}}}function tg({children:e,resetAllFilter:t}){const n=(0,a.useCallback)((e=>{const n=eg(e),o=t(n);return{...e,...Jh(o)}}),[t]);return(0,$.jsx)(ma,{group:"typography",resetAllFilter:n,children:e})}function ng({clientId:e,name:t,setAttributes:n,settings:o}){const{style:r,fontFamily:i,fontSize:s}=(0,c.useSelect)((function(t){const{style:n,fontFamily:o,fontSize:r}=t(li).getBlockAttributes(e)||{};return{style:n,fontFamily:o,fontSize:r}}),[e]),u=uh(o),d=(0,a.useMemo)((()=>eg({style:r,fontFamily:i,fontSize:s})),[r,s,i]);if(!u)return null;const p=(0,l.getBlockSupport)(t,[Xh,"__experimentalDefaultControls"]);return(0,$.jsx)(Sh,{as:tg,panelId:e,settings:o,value:d,onChange:e=>{n(Jh(e))},defaultControls:p})}const og=(0,$.jsxs)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,$.jsx)(G.Path,{d:"m19 7.5h-7.628c-.3089-.87389-1.1423-1.5-2.122-1.5-.97966 0-1.81309.62611-2.12197 1.5h-2.12803v1.5h2.12803c.30888.87389 1.14231 1.5 2.12197 1.5.9797 0 1.8131-.62611 2.122-1.5h7.628z"}),(0,$.jsx)(G.Path,{d:"m19 15h-2.128c-.3089-.8739-1.1423-1.5-2.122-1.5s-1.8131.6261-2.122 1.5h-7.628v1.5h7.628c.3089.8739 1.1423 1.5 2.122 1.5s1.8131-.6261 2.122-1.5h2.128z"})]}),rg={px:{max:300,steps:1},"%":{max:100,steps:1},vw:{max:100,steps:1},vh:{max:100,steps:1},em:{max:10,steps:.1},rm:{max:10,steps:.1},svw:{max:100,steps:1},lvw:{max:100,steps:1},dvw:{max:100,steps:1},svh:{max:100,steps:1},lvh:{max:100,steps:1},dvh:{max:100,steps:1},vi:{max:100,steps:1},svi:{max:100,steps:1},lvi:{max:100,steps:1},dvi:{max:100,steps:1},vb:{max:100,steps:1},svb:{max:100,steps:1},lvb:{max:100,steps:1},dvb:{max:100,steps:1},vmin:{max:100,steps:1},svmin:{max:100,steps:1},lvmin:{max:100,steps:1},dvmin:{max:100,steps:1},vmax:{max:100,steps:1},svmax:{max:100,steps:1},lvmax:{max:100,steps:1},dvmax:{max:100,steps:1}};function ig({icon:e,isMixed:t=!1,minimumCustomValue:n,onChange:o,onMouseOut:r,onMouseOver:i,showSideInLabel:s=!0,side:l,spacingSizes:d,type:p,value:h}){var g,m;h=Ds(h,d);let f=d;const b=d.length<=Es,k=(0,c.useSelect)((e=>{const t=e(li).getSettings();return t?.disableCustomSpacingSizes})),[v,_]=(0,a.useState)(!k&&void 0!==h&&!Ls(h)),[x,y]=(0,a.useState)(n),S=(0,u.usePrevious)(h);h&&S!==h&&!Ls(h)&&!0!==v&&_(!0);const[w]=ci("spacing.units"),B=(0,os.__experimentalUseCustomUnits)({availableUnits:w||["px","em","rem"]});let I=null;!b&&!v&&void 0!==h&&(!Ls(h)||Ls(h)&&t)?(f=[...d,{name:t?(0,C.__)("Mixed"):(0,C.sprintf)((0,C.__)("Custom (%s)"),h),slug:"custom",size:h}],I=f.length-1):t||(I=v?As(h,d):function(e,t){if(void 0===e)return 0;const n=0===parseFloat(e,10)?"0":zs(e),o=t.findIndex((e=>String(e.slug)===n));return-1!==o?o:NaN}(h,d));const j=(0,a.useMemo)((()=>(0,os.__experimentalParseQuantityAndUnitFromRawValue)(I)),[I])[1]||B[0]?.value,E=parseFloat(I,10),T=(e,t)=>{const n=parseInt(e,10);if("selectList"===t){if(0===n)return;if(1===n)return"0"}else if(0===n)return"0";return`var:preset|spacing|${d[e]?.slug}`},M=t?(0,C.__)("Mixed"):null,P=f.map(((e,t)=>({key:t,name:e.name}))),R=d.slice(1,d.length-1).map(((e,t)=>({value:t+1,label:void 0}))),N=Ts.includes(l)&&s?Rs[l]:"",L=s?p?.toLowerCase():p,A=(0,C.sprintf)((0,C._x)("%1$s %2$s","spacing"),N,L).trim();return(0,$.jsxs)(os.__experimentalHStack,{className:"spacing-sizes-control__wrapper",children:[e&&(0,$.jsx)(os.Icon,{className:"spacing-sizes-control__icon",icon:e,size:24}),v&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(os.__experimentalUnitControl,{onMouseOver:i,onMouseOut:r,onFocus:i,onBlur:r,onChange:e=>o((e=>isNaN(parseFloat(e))?void 0:e)(e)),value:I,units:B,min:x,placeholder:M,disableUnits:t,label:A,hideLabelFromVision:!0,className:"spacing-sizes-control__custom-value-input",size:"__unstable-large",onDragStart:()=>{"-"===h?.charAt(0)&&y(0)},onDrag:()=>{"-"===h?.charAt(0)&&y(0)},onDragEnd:()=>{y(n)}}),(0,$.jsx)(os.RangeControl,{__next40pxDefaultSize:!0,onMouseOver:i,onMouseOut:r,onFocus:i,onBlur:r,value:E,min:0,max:null!==(g=rg[j]?.max)&&void 0!==g?g:10,step:null!==(m=rg[j]?.steps)&&void 0!==m?m:.1,withInputField:!1,onChange:e=>{o([e,j].join(""))},className:"spacing-sizes-control__custom-value-range",__nextHasNoMarginBottom:!0,label:A,hideLabelFromVision:!0})]}),b&&!v&&(0,$.jsx)(os.RangeControl,{__next40pxDefaultSize:!0,onMouseOver:i,onMouseOut:r,className:"spacing-sizes-control__range-control",value:I,onChange:e=>o(T(e)),onMouseDown:e=>{e?.nativeEvent?.offsetX<35&&void 0===h&&o("0")},withInputField:!1,"aria-valuenow":I,"aria-valuetext":d[I]?.name,renderTooltipContent:e=>void 0===h?void 0:d[e]?.name,min:0,max:d.length-1,marks:R,label:A,hideLabelFromVision:!0,__nextHasNoMarginBottom:!0,onFocus:i,onBlur:r}),!b&&!v&&(0,$.jsx)(os.CustomSelectControl,{className:"spacing-sizes-control__custom-select-control",value:P.find((e=>e.key===I))||"",onChange:e=>{o(T(e.selectedItem.key,"selectList"))},options:P,label:A,hideLabelFromVision:!0,size:"__unstable-large",onMouseOver:i,onMouseOut:r,onFocus:i,onBlur:r}),!k&&(0,$.jsx)(os.Button,{label:v?(0,C.__)("Use size preset"):(0,C.__)("Set custom size"),icon:og,onClick:()=>{_(!v)},isPressed:v,size:"small",className:"spacing-sizes-control__custom-toggle",iconSize:24})]})}const sg=["vertical","horizontal"];function lg({minimumCustomValue:e,onChange:t,onMouseOut:n,onMouseOver:o,sides:r,spacingSizes:i,type:s,values:l}){const a=e=>n=>{if(!t)return;const o={...Object.keys(l).reduce(((e,t)=>(e[t]=Ds(l[t],i),e)),{})};"vertical"===e&&(o.top=n,o.bottom=n),"horizontal"===e&&(o.left=n,o.right=n),t(o)},c=r?.length?sg.filter((e=>Vs(r,e))):sg;return(0,$.jsx)($.Fragment,{children:c.map((t=>{const r="vertical"===t?l.top:l.left;return(0,$.jsx)(ig,{icon:Ps[t],label:Rs[t],minimumCustomValue:e,onChange:a(t),onMouseOut:n,onMouseOver:o,side:t,spacingSizes:i,type:s,value:r,withInputField:!1},`spacing-sizes-control-${t}`)}))})}function ag({minimumCustomValue:e,onChange:t,onMouseOut:n,onMouseOver:o,sides:r,spacingSizes:i,type:s,values:l}){const a=r?.length?Ts.filter((e=>r.includes(e))):Ts,c=e=>n=>{const o={...Object.keys(l).reduce(((e,t)=>(e[t]=Ds(l[t],i),e)),{})};o[e]=n,t(o)};return(0,$.jsx)($.Fragment,{children:a.map((t=>(0,$.jsx)(ig,{icon:Ps[t],label:Rs[t],minimumCustomValue:e,onChange:c(t),onMouseOut:n,onMouseOver:o,side:t,spacingSizes:i,type:s,value:l[t],withInputField:!1},`spacing-sizes-control-${t}`)))})}function cg({minimumCustomValue:e,onChange:t,onMouseOut:n,onMouseOver:o,showSideInLabel:r,side:i,spacingSizes:s,type:l,values:a}){return(0,$.jsx)(ig,{label:Rs[i],minimumCustomValue:e,onChange:(c=i,e=>{const n={...Object.keys(a).reduce(((e,t)=>(e[t]=Ds(a[t],s),e)),{})};n[c]=e,t(n)}),onMouseOut:n,onMouseOver:o,showSideInLabel:r,side:i,spacingSizes:s,type:l,value:a[i],withInputField:!1});var c}function ug({isLinked:e,...t}){const n=e?(0,C.__)("Unlink sides"):(0,C.__)("Link sides");return(0,$.jsx)(os.Tooltip,{text:n,children:(0,$.jsx)(os.Button,{...t,size:"small",icon:e?od:mc,iconSize:24,"aria-label":n})})}const dg=[],pg=new Intl.Collator("und",{numeric:!0}).compare;function hg(){const[e,t,n,o]=ci("spacing.spacingSizes.custom","spacing.spacingSizes.theme","spacing.spacingSizes.default","spacing.defaultSpacingSizes"),r=null!=e?e:dg,i=null!=t?t:dg,s=n&&!1!==o?n:dg;return(0,a.useMemo)((()=>{const e=[{name:(0,C.__)("None"),slug:"0",size:0},...r,...i,...s];return e.every((({slug:e})=>/^[0-9]/.test(e)))&&e.sort(((e,t)=>pg(e.slug,t.slug))),e.length>Es?[{name:(0,C.__)("Default"),slug:"default",size:void 0},...e]:e}),[r,i,s])}function gg({inputProps:e,label:t,minimumCustomValue:n=0,onChange:o,onMouseOut:r,onMouseOver:i,showSideInLabel:s=!0,sides:l=Ts,useSelect:c,values:u}){const d=hg(),p=u||Ms,h=1===l?.length,g=l?.includes("horizontal")&&l?.includes("vertical")&&2===l?.length,[m,f]=(0,a.useState)(function(e={},t){const{top:n,right:o,bottom:r,left:i}=e,s=[n,o,r,i].filter(Boolean),l=!(n!==r||i!==o||!n&&!i),a=!s.length&&function(e=[]){const t={top:0,right:0,bottom:0,left:0};return e.forEach((e=>t[e]+=1)),(t.top+t.bottom)%2==0&&(t.left+t.right)%2==0}(t),c=t?.includes("horizontal")&&t?.includes("vertical")&&2===t?.length;if(Vs(t)&&(l||a))return Ns.axial;if(c&&1===s.length){let t;return Object.entries(e).some((([e,n])=>(t=e,void 0!==n))),t}return 1!==t?.length||s.length?Ns.custom:t[0]}(p,l)),b={...e,minimumCustomValue:n,onChange:e=>{const t={...u,...e};o(t)},onMouseOut:r,onMouseOver:i,sides:l,spacingSizes:d,type:t,useSelect:c,values:p},k=Ts.includes(m)&&s?Rs[m]:"",v=(0,C.sprintf)((0,C._x)("%1$s %2$s","spacing"),t,k).trim();return(0,$.jsxs)("fieldset",{className:"spacing-sizes-control",children:[(0,$.jsxs)(os.__experimentalHStack,{className:"spacing-sizes-control__header",children:[(0,$.jsx)(os.BaseControl.VisualLabel,{as:"legend",className:"spacing-sizes-control__label",children:v}),!h&&!g&&(0,$.jsx)(ug,{label:t,onClick:()=>{f(m===Ns.axial?Ns.custom:Ns.axial)},isLinked:m===Ns.axial})]}),(0,$.jsx)(os.__experimentalVStack,{spacing:.5,children:m===Ns.axial?(0,$.jsx)(lg,{...b}):m===Ns.custom?(0,$.jsx)(ag,{...b}):(0,$.jsx)(cg,{side:m,...b,showSideInLabel:s})})]})}const mg={px:{max:1e3,step:1},"%":{max:100,step:1},vw:{max:100,step:1},vh:{max:100,step:1},em:{max:50,step:.1},rem:{max:50,step:.1},svw:{max:100,step:1},lvw:{max:100,step:1},dvw:{max:100,step:1},svh:{max:100,step:1},lvh:{max:100,step:1},dvh:{max:100,step:1},vi:{max:100,step:1},svi:{max:100,step:1},lvi:{max:100,step:1},dvi:{max:100,step:1},vb:{max:100,step:1},svb:{max:100,step:1},lvb:{max:100,step:1},dvb:{max:100,step:1},vmin:{max:100,step:1},svmin:{max:100,step:1},lvmin:{max:100,step:1},dvmin:{max:100,step:1},vmax:{max:100,step:1},svmax:{max:100,step:1},lvmax:{max:100,step:1},dvmax:{max:100,step:1}};function fg({label:e=(0,C.__)("Height"),onChange:t,value:n}){var o,r;const i=parseFloat(n),[s]=ci("spacing.units"),l=(0,os.__experimentalUseCustomUnits)({availableUnits:s||["%","px","em","rem","vh","vw"]}),c=(0,a.useMemo)((()=>(0,os.__experimentalParseQuantityAndUnitFromRawValue)(n)),[n])[1]||l[0]?.value||"px";return(0,$.jsxs)("fieldset",{className:"block-editor-height-control",children:[(0,$.jsx)(os.BaseControl.VisualLabel,{as:"legend",children:e}),(0,$.jsxs)(os.Flex,{children:[(0,$.jsx)(os.FlexItem,{isBlock:!0,children:(0,$.jsx)(os.__experimentalUnitControl,{value:n,units:l,onChange:t,onUnitChange:e=>{const[o,r]=(0,os.__experimentalParseQuantityAndUnitFromRawValue)(n);["em","rem"].includes(e)&&"px"===r?t((o/16).toFixed(2)+e):["em","rem"].includes(r)&&"px"===e?t(Math.round(16*o)+e):["%","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax"].includes(e)&&o>100&&t(100+e)},min:0,size:"__unstable-large",label:e,hideLabelFromVision:!0})}),(0,$.jsx)(os.FlexItem,{isBlock:!0,children:(0,$.jsx)(os.__experimentalSpacer,{marginX:2,marginBottom:0,children:(0,$.jsx)(os.RangeControl,{__next40pxDefaultSize:!0,value:i,min:0,max:null!==(o=mg[c]?.max)&&void 0!==o?o:100,step:null!==(r=mg[c]?.step)&&void 0!==r?r:.1,withInputField:!1,onChange:e=>{t([e,c].join(""))},__nextHasNoMarginBottom:!0,label:e,hideLabelFromVision:!0})})})]})]})}function bg(e,t){const{getBlockOrder:n,getBlockAttributes:o}=(0,c.useSelect)(li);return(r,i)=>{const s=(i-1)*t+r-1;let l=0;for(const r of n(e)){var a;const{columnStart:e,rowStart:n}=null!==(a=o(r).style?.layout)&&void 0!==a?a:{};(n-1)*t+e-1<s&&l++}return l}}function kg(e,t){const{orientation:n="horizontal"}=t;return"fill"===e?(0,C.__)("Stretch to fill available space."):"fixed"===e&&"horizontal"===n?(0,C.__)("Specify a fixed width."):"fixed"===e?(0,C.__)("Specify a fixed height."):(0,C.__)("Fit contents.")}function vg({value:e={},onChange:t,parentLayout:n,isShownByDefault:o,panelId:r}){const{type:i,default:{type:s="default"}={}}=null!=n?n:{},l=i||s;return"flex"===l?(0,$.jsx)(_g,{childLayout:e,onChange:t,parentLayout:n,isShownByDefault:o,panelId:r}):"grid"===l?(0,$.jsx)(yg,{childLayout:e,onChange:t,parentLayout:n,isShownByDefault:o,panelId:r}):null}function _g({childLayout:e,onChange:t,parentLayout:n,isShownByDefault:o,panelId:r}){const{selfStretch:i,flexSize:s}=e,{orientation:l="horizontal"}=null!=n?n:{},c="horizontal"===l?(0,C.__)("Width"):(0,C.__)("Height");return(0,a.useEffect)((()=>{"fixed"!==i||s||t({...e,selfStretch:"fit"})}),[]),(0,$.jsxs)(os.__experimentalVStack,{as:os.__experimentalToolsPanelItem,spacing:2,hasValue:()=>!!i,label:c,onDeselect:()=>{t({selfStretch:void 0,flexSize:void 0})},isShownByDefault:o,panelId:r,children:[(0,$.jsxs)(os.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,size:"__unstable-large",label:xg(n),value:i||"fit",help:kg(i,n),onChange:e=>{t({selfStretch:e,flexSize:"fixed"!==e?null:s})},isBlock:!0,children:[(0,$.jsx)(os.__experimentalToggleGroupControlOption,{value:"fit",label:(0,C._x)("Fit","Intrinsic block width in flex layout")},"fit"),(0,$.jsx)(os.__experimentalToggleGroupControlOption,{value:"fill",label:(0,C._x)("Grow","Block with expanding width in flex layout")},"fill"),(0,$.jsx)(os.__experimentalToggleGroupControlOption,{value:"fixed",label:(0,C._x)("Fixed","Block with fixed width in flex layout")},"fixed")]}),"fixed"===i&&(0,$.jsx)(os.__experimentalUnitControl,{size:"__unstable-large",onChange:e=>{t({selfStretch:i,flexSize:e})},value:s,label:c,hideLabelFromVision:!0})]})}function xg(e){const{orientation:t="horizontal"}=e;return"horizontal"===t?(0,C.__)("Width"):(0,C.__)("Height")}function yg({childLayout:e,onChange:t,parentLayout:n,isShownByDefault:o,panelId:r}){const{columnStart:i,rowStart:s,columnSpan:l,rowSpan:a}=e,{columnCount:u=3,rowCount:d}=null!=n?n:{},p=(0,c.useSelect)((e=>e(li).getBlockRootClientId(r))),{moveBlocksToPosition:h,__unstableMarkNextChangeAsNotPersistent:g}=(0,c.useDispatch)(li),m=bg(p,u);return(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(os.__experimentalHStack,{as:os.__experimentalToolsPanelItem,hasValue:()=>!!l||!!a,label:(0,C.__)("Grid span"),onDeselect:()=>{t({columnSpan:void 0,rowSpan:void 0})},isShownByDefault:o,panelId:r,children:[(0,$.jsx)(os.__experimentalInputControl,{size:"__unstable-large",label:(0,C.__)("Column span"),type:"number",onChange:e=>{const n=""===e?1:parseInt(e,10);t({columnStart:i,rowStart:s,rowSpan:a,columnSpan:n})},value:null!=l?l:1,min:1}),(0,$.jsx)(os.__experimentalInputControl,{size:"__unstable-large",label:(0,C.__)("Row span"),type:"number",onChange:e=>{const n=""===e?1:parseInt(e,10);t({columnStart:i,rowStart:s,columnSpan:l,rowSpan:n})},value:null!=a?a:1,min:1})]}),window.__experimentalEnableGridInteractivity&&u&&(0,$.jsxs)(os.Flex,{as:os.__experimentalToolsPanelItem,hasValue:()=>!!i||!!s,label:(0,C.__)("Grid placement"),onDeselect:()=>{t({columnStart:void 0,rowStart:void 0})},isShownByDefault:!1,panelId:r,children:[(0,$.jsx)(os.FlexItem,{style:{width:"50%"},children:(0,$.jsx)(os.__experimentalInputControl,{size:"__unstable-large",label:(0,C.__)("Column"),type:"number",onChange:e=>{const n=""===e?1:parseInt(e,10);t({columnStart:n,rowStart:s,columnSpan:l,rowSpan:a}),g(),h([r],p,p,m(n,s))},value:null!=i?i:1,min:1,max:u?u-(null!=l?l:1)+1:void 0})}),(0,$.jsx)(os.FlexItem,{style:{width:"50%"},children:(0,$.jsx)(os.__experimentalInputControl,{size:"__unstable-large",label:(0,C.__)("Row"),type:"number",onChange:e=>{const n=""===e?1:parseInt(e,10);t({columnStart:i,rowStart:n,columnSpan:l,rowSpan:a}),g(),h([r],p,p,m(i,n))},value:null!=s?s:1,min:1,max:d?d-(null!=a?a:1)+1:void 0})})]})]})}function Sg({panelId:e,value:t,onChange:n=(()=>{}),options:o,defaultValue:r="auto",hasValue:i,isShownByDefault:s=!0}){const l=null!=t?t:"auto",[a,c,u]=ci("dimensions.aspectRatios.default","dimensions.aspectRatios.theme","dimensions.defaultAspectRatios"),d=c?.map((({name:e,ratio:t})=>({label:e,value:t}))),p=a?.map((({name:e,ratio:t})=>({label:e,value:t}))),h=[{label:(0,C._x)("Original","Aspect ratio option for dimensions control"),value:"auto"},...u?p:[],...d||[],{label:(0,C._x)("Custom","Aspect ratio option for dimensions control"),value:"custom",disabled:!0,hidden:!0}];return(0,$.jsx)(os.__experimentalToolsPanelItem,{hasValue:i||(()=>l!==r),label:(0,C.__)("Aspect ratio"),onDeselect:()=>n(void 0),isShownByDefault:s,panelId:e,children:(0,$.jsx)(os.SelectControl,{label:(0,C.__)("Aspect ratio"),value:l,options:null!=o?o:h,onChange:n,size:"__unstable-large",__nextHasNoMarginBottom:!0})})}const wg=["horizontal","vertical"];function Cg(e){const t=Bg(e),n=Ig(e),o=jg(e),r=Eg(e),i=Tg(e),s=Mg(e),l=Pg(e),c=Rg(e);return"web"===a.Platform.OS&&(t||n||o||r||i||s||l||c)}function Bg(e){return e?.layout?.contentSize}function Ig(e){return e?.layout?.wideSize}function jg(e){return e?.spacing?.padding}function Eg(e){return e?.spacing?.margin}function Tg(e){return e?.spacing?.blockGap}function Mg(e){return e?.dimensions?.minHeight}function Pg(e){return e?.dimensions?.aspectRatio}function Rg(e){var t;const{type:n="default",default:{type:o="default"}={},allowSizingOnChildren:r=!1}=null!==(t=e?.parentLayout)&&void 0!==t?t:{},i=("flex"===o||"flex"===n||"grid"===o||"grid"===n)&&r;return!!e?.layout&&i}function Ng(e,t){if(!t||!e)return e;const n={};return t.forEach((t=>{"vertical"===t&&(n.top=e.top,n.bottom=e.bottom),"horizontal"===t&&(n.left=e.left,n.right=e.right),n[t]=e?.[t]})),n}function Lg(e){return e&&"string"==typeof e?{top:e,right:e,bottom:e,left:e}:e}function Ag({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r}){const i=Pi();return(0,$.jsx)(os.__experimentalToolsPanel,{label:(0,C.__)("Dimensions"),resetAll:()=>{const o=e(n);t(o)},panelId:o,dropdownMenuProps:i,children:r})}const Dg={contentSize:!0,wideSize:!0,padding:!0,margin:!0,blockGap:!0,minHeight:!0,aspectRatio:!0,childLayout:!0};function Og({as:e=Ag,value:t,onChange:n,inheritedValue:o=t,settings:r,panelId:i,defaultControls:s=Dg,onVisualize:l=(()=>{}),includeLayoutControls:c=!1}){var u,d,p,h,g,m,f,b;const{dimensions:k,spacing:v}=r,_=e=>e&&"object"==typeof e?Object.keys(e).reduce(((t,n)=>(t[n]=Ni({settings:{dimensions:k,spacing:v}},"",e[n]),t)),{}):Ni({settings:{dimensions:k,spacing:v}},"",e),x=function(e){const{defaultSpacingSizes:t,spacingSizes:n}=e?.spacing||{};return!1!==t&&n?.default?.length>0||n?.theme?.length>0||n?.custom?.length>0}(r),y=(0,os.__experimentalUseCustomUnits)({availableUnits:r?.spacing?.units||["%","px","em","rem","vw"]}),S=-1/0,[w,B]=(0,a.useState)(S),I=Bg(r)&&c,j=_(o?.layout?.contentSize),E=e=>{n(ve(t,["layout","contentSize"],e||void 0))},T=Ig(r)&&c,M=_(o?.layout?.wideSize),P=e=>{n(ve(t,["layout","wideSize"],e||void 0))},R=jg(r),N=Lg(_(o?.spacing?.padding)),L=Array.isArray(r?.spacing?.padding)?r?.spacing?.padding:r?.spacing?.padding?.sides,A=L&&L.some((e=>wg.includes(e))),D=e=>{const o=Ng(e,L);n(ve(t,["spacing","padding"],o))},O=()=>l("padding"),z=Eg(r),V=Lg(_(o?.spacing?.margin)),F=Array.isArray(r?.spacing?.margin)?r?.spacing?.margin:r?.spacing?.margin?.sides,H=F&&F.some((e=>wg.includes(e))),G=e=>{const o=Ng(e,F);n(ve(t,["spacing","margin"],o))},U=()=>l("margin"),W=Tg(r),K=_(o?.spacing?.blockGap),Z=function(e){return e&&"string"==typeof e?{top:e}:e?{...e,right:e?.left,bottom:e?.top}:e}(K),q=Array.isArray(r?.spacing?.blockGap)?r?.spacing?.blockGap:r?.spacing?.blockGap?.sides,Y=q&&q.some((e=>wg.includes(e))),X=e=>{n(ve(t,["spacing","blockGap"],e))},Q=e=>{e||X(null),!Y&&e?.hasOwnProperty("top")?X(e.top):X({top:e?.top,left:e?.left})},J=Mg(r),ee=_(o?.dimensions?.minHeight),te=e=>{const o=ve(t,["dimensions","minHeight"],e);n(ve(o,["dimensions","aspectRatio"],void 0))},ne=Pg(r),oe=_(o?.dimensions?.aspectRatio),re=Rg(r),ie=o?.layout,se=(0,a.useCallback)((e=>({...e,layout:qi({...e?.layout,contentSize:void 0,wideSize:void 0,selfStretch:void 0,flexSize:void 0,columnStart:void 0,rowStart:void 0,columnSpan:void 0,rowSpan:void 0}),spacing:{...e?.spacing,padding:void 0,margin:void 0,blockGap:void 0},dimensions:{...e?.dimensions,minHeight:void 0,aspectRatio:void 0}})),[]),le=()=>l(!1),ae={min:w,onDragStart:()=>{B(0)},onDragEnd:()=>{B(S)}};return(0,$.jsxs)(e,{resetAllFilter:se,value:t,onChange:n,panelId:i,children:[(I||T)&&(0,$.jsx)("span",{className:"span-columns",children:(0,C.__)("Set the width of the main content area.")}),I&&(0,$.jsx)(os.__experimentalToolsPanelItem,{label:(0,C.__)("Content width"),hasValue:()=>!!t?.layout?.contentSize,onDeselect:()=>E(void 0),isShownByDefault:null!==(u=s.contentSize)&&void 0!==u?u:Dg.contentSize,panelId:i,children:(0,$.jsx)(os.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,C.__)("Content width"),labelPosition:"top",value:j||"",onChange:e=>{E(e)},units:y,prefix:(0,$.jsx)(os.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,$.jsx)(hl,{icon:gl})})})}),T&&(0,$.jsx)(os.__experimentalToolsPanelItem,{label:(0,C.__)("Wide width"),hasValue:()=>!!t?.layout?.wideSize,onDeselect:()=>P(void 0),isShownByDefault:null!==(d=s.wideSize)&&void 0!==d?d:Dg.wideSize,panelId:i,children:(0,$.jsx)(os.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,C.__)("Wide width"),labelPosition:"top",value:M||"",onChange:e=>{P(e)},units:y,prefix:(0,$.jsx)(os.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,$.jsx)(hl,{icon:ml})})})}),R&&(0,$.jsxs)(os.__experimentalToolsPanelItem,{hasValue:()=>!!t?.spacing?.padding&&Object.keys(t?.spacing?.padding).length,label:(0,C.__)("Padding"),onDeselect:()=>D(void 0),isShownByDefault:null!==(p=s.padding)&&void 0!==p?p:Dg.padding,className:Zi({"tools-panel-item-spacing":x}),panelId:i,children:[!x&&(0,$.jsx)(os.__experimentalBoxControl,{__next40pxDefaultSize:!0,values:N,onChange:D,label:(0,C.__)("Padding"),sides:L,units:y,allowReset:!1,splitOnAxis:A,onMouseOver:O,onMouseOut:le}),x&&(0,$.jsx)(gg,{values:N,onChange:D,label:(0,C.__)("Padding"),sides:L,units:y,allowReset:!1,onMouseOver:O,onMouseOut:le})]}),z&&(0,$.jsxs)(os.__experimentalToolsPanelItem,{hasValue:()=>!!t?.spacing?.margin&&Object.keys(t?.spacing?.margin).length,label:(0,C.__)("Margin"),onDeselect:()=>G(void 0),isShownByDefault:null!==(h=s.margin)&&void 0!==h?h:Dg.margin,className:Zi({"tools-panel-item-spacing":x}),panelId:i,children:[!x&&(0,$.jsx)(os.__experimentalBoxControl,{__next40pxDefaultSize:!0,values:V,onChange:G,inputProps:ae,label:(0,C.__)("Margin"),sides:F,units:y,allowReset:!1,splitOnAxis:H,onMouseOver:U,onMouseOut:le}),x&&(0,$.jsx)(gg,{values:V,onChange:G,minimumCustomValue:-1/0,label:(0,C.__)("Margin"),sides:F,units:y,allowReset:!1,onMouseOver:U,onMouseOut:le})]}),W&&(0,$.jsxs)(os.__experimentalToolsPanelItem,{hasValue:()=>!!t?.spacing?.blockGap,label:(0,C.__)("Block spacing"),onDeselect:()=>X(void 0),isShownByDefault:null!==(g=s.blockGap)&&void 0!==g?g:Dg.blockGap,className:Zi({"tools-panel-item-spacing":x,"single-column":!x&&!Y}),panelId:i,children:[!x&&(Y?(0,$.jsx)(os.__experimentalBoxControl,{__next40pxDefaultSize:!0,label:(0,C.__)("Block spacing"),min:0,onChange:Q,units:y,sides:q,values:Z,allowReset:!1,splitOnAxis:Y}):(0,$.jsx)(os.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,C.__)("Block spacing"),min:0,onChange:X,units:y,value:K})),x&&(0,$.jsx)(gg,{label:(0,C.__)("Block spacing"),min:0,onChange:Q,showSideInLabel:!1,sides:Y?q:["top"],values:Z,allowReset:!1})]}),re&&(0,$.jsx)(vg,{value:ie,onChange:e=>{n({...t,layout:{...e}})},parentLayout:r?.parentLayout,panelId:i,isShownByDefault:null!==(m=s.childLayout)&&void 0!==m?m:Dg.childLayout}),J&&(0,$.jsx)(os.__experimentalToolsPanelItem,{hasValue:()=>!!t?.dimensions?.minHeight,label:(0,C.__)("Minimum height"),onDeselect:()=>{te(void 0)},isShownByDefault:null!==(f=s.minHeight)&&void 0!==f?f:Dg.minHeight,panelId:i,children:(0,$.jsx)(fg,{label:(0,C.__)("Minimum height"),value:ee,onChange:te})}),ne&&(0,$.jsx)(Sg,{hasValue:()=>!!t?.dimensions?.aspectRatio,value:oe,onChange:e=>{const o=ve(t,["dimensions","aspectRatio"],e);n(ve(o,["dimensions","minHeight"],void 0))},panelId:i,isShownByDefault:null!==(b=s.aspectRatio)&&void 0!==b?b:Dg.aspectRatio})]})}const zg=function(e){return(0,u.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])},Vg=".block-editor-block-list__block",Fg=".block-list-appender",Hg=".block-editor-button-block-appender";function Gg(e,t){return e.closest(Vg)===t.closest(Vg)}function $g(e,t){return t.closest([Vg,Fg,Hg].join(","))===e}function Ug(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(!e)return;const t=e.closest(Vg);return t?t.id.slice(6):void 0}function Wg(e,t){const n=Math.min(e.left,t.left),o=Math.max(e.right,t.right),r=Math.max(e.bottom,t.bottom),i=Math.min(e.top,t.top);return new window.DOMRectReadOnly(n,i,o-n,r-i)}function Kg(e){const t=e.ownerDocument.defaultView;if(!t)return!1;if(e.classList.contains("components-visually-hidden"))return!1;const n=e.getBoundingClientRect();if(0===n.width||0===n.height)return!1;if(e.checkVisibility)return e.checkVisibility?.({opacityProperty:!0,contentVisibilityAuto:!0,visibilityProperty:!0});const o=t.getComputedStyle(e);return"none"!==o.display&&"hidden"!==o.visibility&&"0"!==o.opacity}function Zg(e){const t=window.getComputedStyle(e);return"auto"===t.overflowX||"scroll"===t.overflowX||"auto"===t.overflowY||"scroll"===t.overflowY}const qg=["core/navigation"];function Yg(e){const t=e.ownerDocument.defaultView;if(!t)return new window.DOMRectReadOnly;let n=e.getBoundingClientRect();const o=e.getAttribute("data-type");if(o&&qg.includes(o)){const t=[e];let o;for(;o=t.pop();)if(!Zg(o))for(const e of o.children)if(Kg(e)){n=Wg(n,e.getBoundingClientRect()),t.push(e)}}const r=Math.max(n.left,0),i=Math.min(n.right,t.innerWidth);return n=new window.DOMRectReadOnly(r,n.top,i-r,n.height),n}const Xg=Number.MAX_SAFE_INTEGER;const Qg=(0,a.forwardRef)((function({clientId:e,bottomClientId:t,children:n,__unstablePopoverSlot:o,__unstableContentRef:r,shift:i=!0,...s},l){const c=vp(e),d=vp(null!=t?t:e),p=(0,u.useMergeRefs)([l,zg(r)]),[h,g]=(0,a.useReducer)((e=>(e+1)%Xg),0);(0,a.useLayoutEffect)((()=>{if(!c)return;const e=new window.MutationObserver(g);return e.observe(c,{attributes:!0}),()=>{e.disconnect()}}),[c]);const m=(0,a.useMemo)((()=>{if(!(h<0||!c||t&&!d))return{getBoundingClientRect:()=>d?Wg(Yg(c),Yg(d)):Yg(c),contextElement:c}}),[h,c,t,d]);return!c||t&&!d?null:(0,$.jsx)(os.Popover,{ref:p,animate:!1,focusOnMount:!1,anchor:m,__unstableSlotName:o,inline:!o,placement:"top-start",resize:!1,flip:!1,shift:i,...s,className:Zi("block-editor-block-popover",s.className),variant:"unstyled",children:n})})),Jg=(0,a.forwardRef)((({clientId:e,bottomClientId:t,children:n,...o},r)=>(0,$.jsx)(Qg,{...o,bottomClientId:t,clientId:e,__unstableContentRef:void 0,__unstablePopoverSlot:void 0,ref:r,children:n})));function em({selectedElement:e,additionalStyles:t={},children:n}){const[o,r]=(0,a.useState)(e.offsetWidth),[i,s]=(0,a.useState)(e.offsetHeight);(0,a.useEffect)((()=>{const t=new window.ResizeObserver((()=>{r(e.offsetWidth),s(e.offsetHeight)}));return t.observe(e,{box:"border-box"}),()=>t.disconnect()}),[e]);const l=(0,a.useMemo)((()=>({position:"absolute",width:o,height:i,...t})),[o,i,t]);return(0,$.jsx)("div",{style:l,children:n})}const tm=(0,a.forwardRef)((function({clientId:e,bottomClientId:t,children:n,shift:o=!1,additionalStyles:r,...i},s){var l;null!==(l=t)&&void 0!==l||(t=e);const a=vp(e);return(0,$.jsx)(Qg,{ref:s,clientId:e,bottomClientId:t,shift:o,...i,children:a&&e===t?(0,$.jsx)(em,{selectedElement:a,additionalStyles:r,children:n}):n})}));function nm({clientId:e,value:t,computeStyle:n,forceShow:o}){const r=vp(e),[i,s]=(0,a.useReducer)((()=>n(r)));(0,a.useLayoutEffect)((()=>{r&&window.requestAnimationFrame((()=>window.requestAnimationFrame(s)))}),[r,t]);const l=(0,a.useRef)(t),[c,u]=(0,a.useState)(!1);return(0,a.useEffect)((()=>{if(Ba()(t,l.current)||o)return;u(!0),l.current=t;const e=setTimeout((()=>{u(!1)}),400);return()=>{u(!1),clearTimeout(e)}}),[t,o]),c||o?(0,$.jsx)(tm,{clientId:e,__unstablePopoverSlot:"block-toolbar",children:(0,$.jsx)("div",{className:"block-editor__spacing-visualizer",style:i})}):null}function om(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function rm({clientId:e,value:t,forceShow:n}){return(0,$.jsx)(nm,{clientId:e,value:t?.spacing?.margin,computeStyle:e=>{const t=om(e,"margin-top"),n=om(e,"margin-right"),o=om(e,"margin-bottom"),r=om(e,"margin-left");return{borderTopWidth:t,borderRightWidth:n,borderBottomWidth:o,borderLeftWidth:r,top:t?`-${t}`:0,right:n?`-${n}`:0,bottom:o?`-${o}`:0,left:r?`-${r}`:0}},forceShow:n})}function im({clientId:e,value:t,forceShow:n}){return(0,$.jsx)(nm,{clientId:e,value:t?.spacing?.padding,computeStyle:e=>({borderTopWidth:om(e,"padding-top"),borderRightWidth:om(e,"padding-right"),borderBottomWidth:om(e,"padding-bottom"),borderLeftWidth:om(e,"padding-left")}),forceShow:n})}const sm="dimensions",lm="spacing";function am({children:e,resetAllFilter:t}){const n=(0,a.useCallback)((e=>{const n=e.style,o=t(n);return{...e,style:o}}),[t]);return(0,$.jsx)(ma,{group:"dimensions",resetAllFilter:n,children:e})}function cm({clientId:e,name:t,setAttributes:n,settings:o}){const r=Cg(o),i=(0,c.useSelect)((t=>t(li).getBlockAttributes(e)?.style),[e]),[s,u]=function(){const[e,t]=(0,a.useState)(!1),{hideBlockInterface:n,showBlockInterface:o}=te((0,c.useDispatch)(li));return(0,a.useEffect)((()=>{e?n():o()}),[e,o,n]),[e,t]}();if(!r)return null;const d={...(0,l.getBlockSupport)(t,[sm,"__experimentalDefaultControls"]),...(0,l.getBlockSupport)(t,[lm,"__experimentalDefaultControls"])};return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Og,{as:am,panelId:e,settings:o,value:i,onChange:e=>{n({style:qi(e)})},defaultControls:d,onVisualize:u}),!!o?.spacing?.padding&&(0,$.jsx)(im,{forceShow:"padding"===s,clientId:e,value:i}),!!o?.spacing?.margin&&(0,$.jsx)(rm,{forceShow:"margin"===s,clientId:e,value:i})]})}function um(e,t="any"){if("web"!==a.Platform.OS)return!1;const n=(0,l.getBlockSupport)(e,sm);return!0===n||("any"===t?!(!n?.aspectRatio&&!n?.minHeight):!!n?.[t])}const dm={useBlockProps:function({name:e,minHeight:t,style:n}){if(!um(e,"aspectRatio")||Xi(e,sm,"aspectRatio"))return{};const o=Zi({"has-aspect-ratio":!!n?.dimensions?.aspectRatio}),r={};n?.dimensions?.aspectRatio?r.minHeight="unset":(t||n?.dimensions?.minHeight)&&(r.aspectRatio="unset");return{className:o,style:r}},attributeKeys:["minHeight","style"],hasSupport:e=>um(e,"aspectRatio")};function pm(){y()("wp.blockEditor.__experimentalUseCustomSides",{since:"6.3",version:"6.4"})}const hm=[...Qh,Id,yp,sm,Xc,lm,jd],gm=e=>hm.some((t=>(0,l.hasBlockSupport)(e,t)));function mm(e={}){const t={};return(0,di.getCSSRules)(e).forEach((e=>{t[e.key]=e.value})),t}const fm={[`${Id}.__experimentalSkipSerialization`]:["border"],[`${yp}.__experimentalSkipSerialization`]:[yp],[`${Xh}.__experimentalSkipSerialization`]:[Xh],[`${sm}.__experimentalSkipSerialization`]:[sm],[`${lm}.__experimentalSkipSerialization`]:[lm],[`${jd}.__experimentalSkipSerialization`]:[jd]},bm={...fm,[`${sm}.aspectRatio`]:[`${sm}.aspectRatio`],[`${Xc}`]:[Xc]},km={[`${sm}.aspectRatio`]:!0,[`${Xc}`]:!0},vm={gradients:"gradient"};function _m(e,t,n=!1){if(!e)return e;let o=e;return n||(o=JSON.parse(JSON.stringify(e))),Array.isArray(t)||(t=[t]),t.forEach((e=>{if(Array.isArray(e)||(e=e.split(".")),e.length>1){const[t,...n]=e;_m(o[t],[n],!0)}else 1===e.length&&delete o[e[0]]})),o}function xm(e,t,n,o=bm){if(!gm(t))return e;let{style:r}=n;return Object.entries(o).forEach((([e,n])=>{const o=km[e]||(0,l.getBlockSupport)(t,e);!0===o&&(r=_m(r,n)),Array.isArray(o)&&o.forEach((e=>{const t=vm[e]||e;r=_m(r,[[...n,t]])}))})),e.style={...mm(r),...e.style},e}const ym={edit:function({clientId:e,name:t,setAttributes:n,__unstableParentLayout:o}){const r=ts(t,o),i=Gl(),s={clientId:e,name:t,setAttributes:n,settings:{...r,typography:{...r.typography,textAlign:!1}}};return"default"!==i?null:(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Pp,{...s}),(0,$.jsx)(ou,{...s}),(0,$.jsx)(ng,{...s}),(0,$.jsx)(Ld,{...s}),(0,$.jsx)(cm,{...s})]})},hasSupport:gm,addSaveProps:xm,attributeKeys:["style"],useBlockProps:function e({name:t,style:n}){const o=`wp-elements-${(0,u.useInstanceId)(e)}`,r=`.${o}`,i=n?.elements,s=(0,a.useMemo)((()=>{if(!i)return;const e=[];return Sm.forEach((({elementType:n,pseudo:o,elements:s})=>{if(Xi(t,yp,n))return;const a=i?.[n];if(a){const t=Li(r,l.__EXPERIMENTAL_ELEMENTS[n]);e.push((0,di.compileCSS)(a,{selector:t})),o&&o.forEach((t=>{a[t]&&e.push((0,di.compileCSS)(a[t],{selector:Li(r,`${l.__EXPERIMENTAL_ELEMENTS[n]}${t}`)}))}))}s&&s.forEach((t=>{i[t]&&e.push((0,di.compileCSS)(i[t],{selector:Li(r,l.__EXPERIMENTAL_ELEMENTS[t])}))}))})),e.length>0?e.join(""):void 0}),[r,i,t]);return Ji({css:s}),xm({className:o},t,{style:n},fm)}},Sm=[{elementType:"button"},{elementType:"link",pseudo:[":hover"]},{elementType:"heading",elements:["h1","h2","h3","h4","h5","h6"]}];(0,d.addFilter)("blocks.registerBlockType","core/style/addAttribute",(function(e){return gm(e)?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e}));(0,d.addFilter)("blocks.registerBlockType","core/settings/addAttribute",(function(e){return t=e,(0,l.hasBlockSupport)(t,"__experimentalSettings",!1)?(e?.attributes?.settings||(e.attributes={...e.attributes,settings:{type:"object"}}),e):e;var t}));const wm=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M12 4 4 19h16L12 4zm0 3.2 5.5 10.3H12V7.2z"})});const Cm=function e({id:t,colorPalette:n,duotonePalette:o,disableCustomColors:r,disableCustomDuotone:i,value:s,onChange:l}){let a;a="unset"===s?(0,$.jsx)(os.ColorIndicator,{className:"block-editor-duotone-control__unset-indicator"}):s?(0,$.jsx)(os.DuotoneSwatch,{values:s}):(0,$.jsx)(hl,{icon:wm});const c=(0,C.__)("Apply duotone filter"),d=`${(0,u.useInstanceId)(e,"duotone-control",t)}__description`;return(0,$.jsx)(os.Dropdown,{popoverProps:{className:"block-editor-duotone-control__popover",headerTitle:(0,C.__)("Duotone")},renderToggle:({isOpen:e,onToggle:t})=>(0,$.jsx)(os.ToolbarButton,{showTooltip:!0,onClick:t,"aria-haspopup":"true","aria-expanded":e,onKeyDown:n=>{e||n.keyCode!==va.DOWN||(n.preventDefault(),t())},label:c,icon:a}),renderContent:()=>(0,$.jsxs)(os.MenuGroup,{label:(0,C.__)("Duotone"),children:[(0,$.jsx)("p",{children:(0,C.__)("Create a two-tone color effect without losing your original image.")}),(0,$.jsx)(os.DuotonePicker,{"aria-label":c,"aria-describedby":d,colorPalette:n,duotonePalette:o,disableCustomColors:r,disableCustomDuotone:i,value:s,onChange:l})]})})};function Bm(e){return`${e}{filter:none}`}function Im(e,t){return`${e}{filter:url(#${t})}`}function jm(e,t){const n=function(e=[]){const t={r:[],g:[],b:[],a:[]};return e.forEach((e=>{const n=Du(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}(t);return`\n<svg\n\txmlns:xlink="http://www.w3.org/1999/xlink"\n\tviewBox="0 0 0 0"\n\twidth="0"\n\theight="0"\n\tfocusable="false"\n\trole="none"\n\taria-hidden="true"\n\tstyle="visibility: hidden; position: absolute; left: -9999px; overflow: hidden;"\n>\n\t<defs>\n\t\t<filter id="${e}">\n\t\t\t\x3c!--\n\t\t\t\tUse sRGB instead of linearRGB so transparency looks correct.\n\t\t\t\tUse perceptual brightness to convert to grayscale.\n\t\t\t--\x3e\n\t\t\t<feColorMatrix color-interpolation-filters="sRGB" type="matrix" values=" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 "></feColorMatrix>\n\t\t\t\x3c!-- Use sRGB instead of linearRGB to be consistent with how CSS gradients work. --\x3e\n\t\t\t<feComponentTransfer color-interpolation-filters="sRGB">\n\t\t\t\t<feFuncR type="table" tableValues="${n.r.join(" ")}"></feFuncR>\n\t\t\t\t<feFuncG type="table" tableValues="${n.g.join(" ")}"></feFuncG>\n\t\t\t\t<feFuncB type="table" tableValues="${n.b.join(" ")}"></feFuncB>\n\t\t\t\t<feFuncA type="table" tableValues="${n.a.join(" ")}"></feFuncA>\n\t\t\t</feComponentTransfer>\n\t\t\t\x3c!-- Re-mask the image with the original transparency since the feColorMatrix above loses that information. --\x3e\n\t\t\t<feComposite in2="SourceGraphic" operator="in"></feComposite>\n\t\t</filter>\n\t</defs>\n</svg>`}function Em(e,t="root",n={}){if(!t)return null;const{fallback:o=!1}=n,{name:r,selectors:i,supports:s}=e,l=i&&Object.keys(i).length>0,a=Array.isArray(t)?t.join("."):t;let c=null;if(c=l&&i.root?i?.root:s?.__experimentalSelector?s.__experimentalSelector:".wp-block-"+r.replace("core/","").replace("/","-"),"root"===a)return c;const u=Array.isArray(t)?t:t.split(".");if(1===u.length){const e=o?c:null;if(l){return _e(i,`${a}.root`,null)||_e(i,a,null)||e}const t=_e(s,`${a}.__experimentalSelector`,null);return t?Li(c,t):e}let d;return l&&(d=_e(i,a,null)),d||(o?Em(e,u[0],n):null)}const Tm=[];function Mm(e,{presetSetting:t,defaultSetting:n}){const o=!e?.color?.[n],r=e?.color?.[t]?.custom||Tm,i=e?.color?.[t]?.theme||Tm,s=e?.color?.[t]?.default||Tm;return(0,a.useMemo)((()=>[...r,...i,...o?Tm:s]),[o,r,i,s])}function Pm(e){return Rm(e)}function Rm(e){return e.color.customDuotone||e.color.defaultDuotone||e.color.duotone.length>0}function Nm({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r}){const i=Pi();return(0,$.jsx)(os.__experimentalToolsPanel,{label:(0,C._x)("Filters","Name for applying graphical effects"),resetAll:()=>{const o=e(n);t(o)},panelId:o,dropdownMenuProps:i,children:r})}const Lm={duotone:!0},Am={placement:"left-start",offset:36,shift:!0,className:"block-editor-duotone-control__popover",headerTitle:(0,C.__)("Duotone")},Dm=({indicator:e,label:t})=>(0,$.jsxs)(os.__experimentalHStack,{justify:"flex-start",children:[(0,$.jsx)(os.__experimentalZStack,{isLayered:!1,offset:-8,children:(0,$.jsx)(os.Flex,{expanded:!1,children:"unset"!==e&&e?(0,$.jsx)(os.DuotoneSwatch,{values:e}):(0,$.jsx)(os.ColorIndicator,{className:"block-editor-duotone-control__unset-indicator"})})}),(0,$.jsx)(os.FlexItem,{title:t,children:t})]});function Om({as:e=Nm,value:t,onChange:n,inheritedValue:o=t,settings:r,panelId:i,defaultControls:s=Lm}){const l=Rm(r),c=Mm(r,{presetSetting:"duotone",defaultSetting:"defaultDuotone"}),u=Mm(r,{presetSetting:"palette",defaultSetting:"defaultPalette"}),d=(p=o?.filter?.duotone,Ni({settings:r},"",p));var p;const h=e=>{const o=c.find((({colors:t})=>t===e)),r=o?`var:preset|duotone|${o.slug}`:e;n(ve(t,["filter","duotone"],r))},g=(0,a.useCallback)((e=>({...e,filter:{...e.filter,duotone:void 0}})),[]);return(0,$.jsx)(e,{resetAllFilter:g,value:t,onChange:n,panelId:i,children:l&&(0,$.jsx)(os.__experimentalToolsPanelItem,{label:(0,C.__)("Duotone"),hasValue:()=>!!t?.filter?.duotone,onDeselect:()=>h(void 0),isShownByDefault:s.duotone,panelId:i,children:(0,$.jsx)(os.Dropdown,{popoverProps:Am,className:"block-editor-global-styles-filters-panel__dropdown",renderToggle:({onToggle:e,isOpen:t})=>{const n={onClick:e,className:Zi({"is-open":t}),"aria-expanded":t};return(0,$.jsx)(os.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,...n,children:(0,$.jsx)(Dm,{indicator:d,label:(0,C.__)("Duotone")})})})},renderContent:()=>(0,$.jsx)(os.__experimentalDropdownContentWrapper,{paddingSize:"small",children:(0,$.jsxs)(os.MenuGroup,{label:(0,C.__)("Duotone"),children:[(0,$.jsx)("p",{children:(0,C.__)("Create a two-tone color effect without losing your original image.")}),(0,$.jsx)(os.DuotonePicker,{colorPalette:u,duotonePalette:c,disableCustomColors:!0,disableCustomDuotone:!0,value:d,onChange:h})]})})})})})}const zm=[],Vm=window?.navigator.userAgent&&window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome")&&!window.navigator.userAgent.includes("Chromium");function Fm({presetSetting:e,defaultSetting:t}){const[n,o,r,i]=ci(t,`${e}.custom`,`${e}.theme`,`${e}.default`);return(0,a.useMemo)((()=>[...o||zm,...r||zm,...n&&i||zm]),[n,o,r,i])}function Hm(e,t){if(!e)return;const n=t?.find((({slug:t})=>e===`var:preset|duotone|${t}`));return n?n.colors:void 0}zu([Vu]);const Gm={shareWithChildBlocks:!0,edit:function({style:e,setAttributes:t,name:n}){const o=e?.color?.duotone,r=ts(n),i=Gl(),s=Fm({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),l=Fm({presetSetting:"color.palette",defaultSetting:"color.defaultPalette"}),[a,c]=ci("color.custom","color.customDuotone"),u=!a,d=!c||0===l?.length&&u;if(0===s?.length&&d)return null;if("default"!==i)return null;const p=Array.isArray(o)?o:Hm(o,s);return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(ma,{group:"filter",children:(0,$.jsx)(Om,{value:{filter:{duotone:p}},onChange:n=>{const o={...e,color:{...n?.filter}};t({style:o})},settings:r})}),(0,$.jsx)(us,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,$.jsx)(Cm,{duotonePalette:s,colorPalette:l,disableCustomDuotone:d,disableCustomColors:u,value:p,onChange:n=>{const o=function(e,t){if(!e||!Array.isArray(e))return;const n=t?.find((t=>t?.colors?.every(((t,n)=>t===e[n]))));return n?`var:preset|duotone|${n.slug}`:void 0}(n,s),r={...e,color:{...e?.color,duotone:null!=o?o:n}};t({style:r})},settings:r})})]})},useBlockProps:function e({clientId:t,name:n,style:o}){const r=(0,u.useInstanceId)(e),i=(0,a.useMemo)((()=>{const e=(0,l.getBlockType)(n);if(e){if(!(0,l.getBlockSupport)(e,"filter.duotone",!1))return null;const t=(0,l.getBlockSupport)(e,"color.__experimentalDuotone",!1);if(t){const n=Em(e);return"string"==typeof t?Li(n,t):n}return Em(e,"filter.duotone",{fallback:!0})}}),[n]),s=o?.color?.duotone,c=`wp-duotone-${r}`,d=i&&s;return $m({clientId:t,id:c,selector:i,attribute:s}),{className:d?c:""}},attributeKeys:["style"],hasSupport:e=>(0,l.hasBlockSupport)(e,"filter.duotone")};function $m({clientId:e,id:t,selector:n,attribute:o}){const r=Fm({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),i=Array.isArray(o),s=i?void 0:Hm(o,r),l="string"==typeof o&&s;let c=null;l?c=s:("string"==typeof o&&!l||i)&&(c=o);const u=n.split(",").map((e=>`.${t}${e.trim()}`)).join(", "),d=Array.isArray(c)||"unset"===c;es(d?{css:"unset"!==c?Im(u,t):Bm(u),__unstableType:"presets"}:void 0),es(d?{assets:"unset"!==c?jm(t,c):"",__unstableType:"svgs"}:void 0);const p=vp(e);(0,a.useEffect)((()=>{if(d&&p&&Vm){const e=p.style.display;p.style.display="inline-block",p.offsetHeight,p.style.display=e}}),[d,p,c])}function Um(e){return(0,c.useSelect)((t=>{if(!e)return null;const{getBlockName:n,getBlockAttributes:o}=t(li),{getBlockType:r,getActiveBlockVariation:i}=t(l.store),s=n(e),a=r(s);if(!a)return null;const c=o(e),u=i(s,c),d=(0,l.isReusableBlock)(a)||(0,l.isTemplatePart)(a),p=(d?(0,l.__experimentalGetBlockLabel)(a,c):void 0)||a.title,h=function(e){const t=e?.style?.position?.type;return"sticky"===t?(0,C.__)("Sticky"):"fixed"===t?(0,C.__)("Fixed"):null}(c),g={isSynced:d,title:p,icon:a.icon,description:a.description,anchor:c?.anchor,positionLabel:h,positionType:c?.style?.position?.type,name:c?.metadata?.name};return u?{isSynced:d,title:u.title||a.title,icon:u.icon||a.icon,description:u.description||a.description,anchor:c?.anchor,positionLabel:h,positionType:c?.style?.position?.type,name:c?.metadata?.name}:g}),[e])}(0,d.addFilter)("blocks.registerBlockType","core/editor/duotone/add-attributes",(function(e){return(0,l.hasBlockSupport)(e,"filter.duotone")?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e}));const Wm="position",Km={key:"default",value:"",name:(0,C.__)("Default")},Zm={key:"sticky",value:"sticky",name:(0,C._x)("Sticky","Name for the value of the CSS position property"),hint:(0,C.__)("The block will stick to the top of the window instead of scrolling.")},qm={key:"fixed",value:"fixed",name:(0,C._x)("Fixed","Name for the value of the CSS position property"),hint:(0,C.__)("The block will not move when the page is scrolled.")},Ym=["top","right","bottom","left"],Xm=["sticky","fixed"];function Qm(e){const t=e?.style?.position?.type;return"sticky"===t||"fixed"===t}function Jm({name:e}={}){const[t,n]=ci("position.fixed","position.sticky"),o=!t&&!n;return r=e,!(0,l.getBlockSupport)(r,Wm)||o;var r}function ef({style:e={},clientId:t,name:n,setAttributes:o}){const r=function(e){const t=(0,l.getBlockSupport)(e,Wm);return!(!0!==t&&!t?.fixed)}(n),i=function(e){const t=(0,l.getBlockSupport)(e,Wm);return!(!0!==t&&!t?.sticky)}(n),s=e?.position?.type,{firstParentClientId:u}=(0,c.useSelect)((e=>{const{getBlockParents:n}=e(li),o=n(t);return{firstParentClientId:o[o.length-1]}}),[t]),d=Um(u),p=i&&s===Zm.value&&d?(0,C.sprintf)((0,C.__)("The block will stick to the scrollable area of the parent %s block."),d.title):null,h=(0,a.useMemo)((()=>{const e=[Km];return(i||s===Zm.value)&&e.push(Zm),(r||s===qm.value)&&e.push(qm),e}),[r,i,s]),g=s&&h.find((e=>e.value===s))||Km;return a.Platform.select({web:h.length>1?(0,$.jsx)(ma,{group:"position",children:(0,$.jsx)(os.BaseControl,{__nextHasNoMarginBottom:!0,help:p,children:(0,$.jsx)(os.CustomSelectControl,{__next40pxDefaultSize:!0,label:(0,C.__)("Position"),hideLabelFromVision:!0,describedBy:(0,C.sprintf)((0,C.__)("Currently selected position: %s"),g.name),options:h,value:g,onChange:({selectedItem:t})=>{(t=>{const n={...e,position:{...e?.position,type:t,top:"sticky"===t||"fixed"===t?"0px":void 0}};o({style:qi(n)})})(t.value)},size:"__unstable-large"})})}):null,native:null})}const tf={edit:function(e){return Jm(e)?null:(0,$.jsx)(ef,{...e})},useBlockProps:function e({name:t,style:n}){const o=(0,l.hasBlockSupport)(t,Wm),r=Jm({name:t}),i=o&&!r,s=(0,u.useInstanceId)(e),a=`.wp-container-${s}.wp-container-${s}`;let c;i&&(c=function({selector:e,style:t}){let n="";const{type:o}=t?.position||{};return Xm.includes(o)?(n+=`${e} {`,n+=`position: ${o};`,Ym.forEach((e=>{void 0!==t?.position?.[e]&&(n+=`${e}: ${t.position[e]};`)})),"sticky"!==o&&"fixed"!==o||(n+="z-index: 10"),n+="}",n):n}({selector:a,style:n})||"");const d=Zi({[`wp-container-${s}`]:i&&!!c,[`is-position-${n?.position?.type}`]:i&&!!c&&!!n?.position?.type});return Ji({css:c}),{className:d}},attributeKeys:["style"],hasSupport:e=>(0,l.hasBlockSupport)(e,Wm)};const nf={button:"wp-element-button",caption:"wp-element-caption"},of={__experimentalBorder:"border",color:"color",spacing:"spacing",typography:"typography"},{kebabCase:rf}=te(os.privateApis);function sf(e={},t,n){let o=[];return Object.keys(e).forEach((r=>{const i=t+rf(r.replace("/","-")),s=e[r];if(s instanceof Object){const e=i+n;o=[...o,...sf(s,e,n)]}else o.push(`${i}: ${s}`)})),o}const lf=(e,t)=>{const n={};return Object.entries(e).forEach((([e,o])=>{if("root"===e||!t?.[e])return;const r="string"==typeof o;if(r||Object.entries(o).forEach((([o,r])=>{if("root"===o||!t?.[e][o])return;const i=af({[e]:{[o]:t[e][o]}});n[r]=[...n[r]||[],...i],delete t[e][o]})),r||o.root){const i=r?o:o.root,s=af({[e]:t[e]});n[i]=[...n[i]||[],...s],delete t[e]}})),n};function af(e={},t="",n,o={},r=!1){const i=ji===t,s=Object.entries(l.__EXPERIMENTAL_STYLE_PROPERTY).reduce(((t,[o,{value:r,properties:s,useEngine:l,rootOnly:a}])=>{if(a&&!i)return t;const c=r;if("elements"===c[0]||l)return t;const u=_e(e,c);if("--wp--style--root--padding"===o&&("string"==typeof u||!n))return t;if(s&&"string"!=typeof u)Object.entries(s).forEach((e=>{const[n,o]=e;if(!_e(u,[o],!1))return;const r=n.startsWith("--")?n:rf(n);t.push(`${r}: ${(0,di.getCSSValueFromRawStyle)(_e(u,[o]))}`)}));else if(_e(e,c,!1)){const n=o.startsWith("--")?o:rf(o);t.push(`${n}: ${(0,di.getCSSValueFromRawStyle)(_e(e,c))}`)}return t}),[]);e.background&&(e.background?.backgroundImage&&(e.background.backgroundImage=Di(e.background.backgroundImage,o)),!i&&e.background?.backgroundImage?.id&&(e={...e,background:{...e.background,...eu(e.background)}}));return(0,di.getCSSRules)(e).forEach((e=>{if(i&&(n||r)&&e.key.startsWith("padding"))return;const t=e.key.startsWith("--")?e.key:rf(e.key);let l=Di(e.value,o);"font-size"===t&&(l=Ci({size:l},o?.settings)),"aspect-ratio"===t&&s.push("min-height: unset"),s.push(`${t}: ${l}`)})),s}function cf({layoutDefinitions:e=ks,style:t,selector:n,hasBlockGapSupport:o,hasFallbackGapSupport:r,fallbackGapValue:i}){let s="",l=o?Fs(t?.spacing?.blockGap):"";if(r&&(n===ji?l=l||"0.5em":!o&&i&&(l=i)),l&&e&&(Object.values(e).forEach((({className:e,name:t,spacingStyles:r})=>{(o||"flex"===t||"grid"===t)&&r?.length&&r.forEach((t=>{const r=[];if(t.rules&&Object.entries(t.rules).forEach((([e,t])=>{r.push(`${e}: ${t||l}`)})),r.length){let i="";i=o?n===ji?`:root :where(.${e})${t?.selector||""}`:`:root :where(${n}-${e})${t?.selector||""}`:n===ji?`:where(.${e}${t?.selector||""})`:`:where(${n}.${e}${t?.selector||""})`,s+=`${i} { ${r.join("; ")}; }`}}))})),n===ji&&o&&(s+=`${Ei} { --wp--style--block-gap: ${l}; }`)),n===ji&&e){const t=["block","flex","grid"];Object.values(e).forEach((({className:e,displayMode:o,baseStyles:r})=>{o&&t.includes(o)&&(s+=`${n} .${e} { display:${o}; }`),r?.length&&r.forEach((t=>{const n=[];if(t.rules&&Object.entries(t.rules).forEach((([e,t])=>{n.push(`${e}: ${t}`)})),n.length){s+=`${`.${e}${t?.selector||""}`} { ${n.join("; ")}; }`}}))}))}return s}const uf=["border","color","dimensions","spacing","typography","filter","outline","shadow","background"];function df(e){if(!e)return{};const t=Object.entries(e).filter((([e])=>uf.includes(e))).map((([e,t])=>[e,JSON.parse(JSON.stringify(t))]));return Object.fromEntries(t)}const pf=(e,t)=>{var n;const o=[];if(!e?.styles)return o;const r=df(e.styles);return r&&o.push({styles:r,selector:ji,skipSelectorWrapper:!0}),Object.entries(l.__EXPERIMENTAL_ELEMENTS).forEach((([t,n])=>{e.styles?.elements?.[t]&&o.push({styles:e.styles?.elements?.[t],selector:n,skipSelectorWrapper:!nf[t]})})),Object.entries(null!==(n=e.styles?.blocks)&&void 0!==n?n:{}).forEach((([e,n])=>{var r;const i=df(n);if(n?.variations){const r={};Object.entries(n.variations).forEach((([n,i])=>{var s,a;r[n]=df(i),i?.css&&(r[n].css=i.css);const c=t[e]?.styleVariationSelectors?.[n];Object.entries(null!==(s=i?.elements)&&void 0!==s?s:{}).forEach((([e,t])=>{t&&l.__EXPERIMENTAL_ELEMENTS[e]&&o.push({styles:t,selector:Li(c,l.__EXPERIMENTAL_ELEMENTS[e])})})),Object.entries(null!==(a=i?.blocks)&&void 0!==a?a:{}).forEach((([e,n])=>{var r;const i=Li(c,t[e]?.selector),s=Li(c,t[e]?.duotoneSelector),a=function(e,t){if(!e||!t)return;const n={};return Object.entries(t).forEach((([t,o])=>{"string"==typeof o&&(n[t]=Li(e,o)),"object"==typeof o&&(n[t]={},Object.entries(o).forEach((([o,r])=>{n[t][o]=Li(e,r)})))})),n}(c,t[e]?.featureSelectors),u=df(n);n?.css&&(u.css=n.css),o.push({selector:i,duotoneSelector:s,featureSelectors:a,fallbackGapValue:t[e]?.fallbackGapValue,hasLayoutSupport:t[e]?.hasLayoutSupport,styles:u}),Object.entries(null!==(r=n.elements)&&void 0!==r?r:{}).forEach((([e,t])=>{t&&l.__EXPERIMENTAL_ELEMENTS[e]&&o.push({styles:t,selector:Li(i,l.__EXPERIMENTAL_ELEMENTS[e])})}))}))})),i.variations=r}t?.[e]?.selector&&o.push({duotoneSelector:t[e].duotoneSelector,fallbackGapValue:t[e].fallbackGapValue,hasLayoutSupport:t[e].hasLayoutSupport,selector:t[e].selector,styles:i,featureSelectors:t[e].featureSelectors,styleVariationSelectors:t[e].styleVariationSelectors}),Object.entries(null!==(r=n?.elements)&&void 0!==r?r:{}).forEach((([n,r])=>{r&&t?.[e]&&l.__EXPERIMENTAL_ELEMENTS[n]&&o.push({styles:r,selector:t[e]?.selector.split(",").map((e=>l.__EXPERIMENTAL_ELEMENTS[n].split(",").map((t=>e+" "+t)))).join(",")})}))})),o},hf=(e,t)=>{var n;const o=[];if(!e?.settings)return o;const r=e=>{let t={};return Ti.forEach((({path:n})=>{const o=_e(e,n,!1);!1!==o&&(t=ve(t,n,o))})),t},i=r(e.settings),s=e.settings?.custom;return(Object.keys(i).length>0||s)&&o.push({presets:i,custom:s,selector:Ei}),Object.entries(null!==(n=e.settings?.blocks)&&void 0!==n?n:{}).forEach((([e,n])=>{const i=r(n),s=n.custom;(Object.keys(i).length>0||s)&&o.push({presets:i,custom:s,selector:t[e]?.selector})})),o},gf=(e,t)=>{const n=hf(e,t);let o="";return n.forEach((({presets:t,custom:n,selector:r})=>{const i=function(e={},t){return Ti.reduce(((n,{path:o,valueKey:r,valueFunc:i,cssVarInfix:s})=>{const l=_e(e,o,[]);return["default","theme","custom"].forEach((e=>{l[e]&&l[e].forEach((e=>{r&&!i?n.push(`--wp--preset--${s}--${rf(e.slug)}: ${e[r]}`):i&&"function"==typeof i&&n.push(`--wp--preset--${s}--${rf(e.slug)}: ${i(e,t)}`)}))})),n}),[])}(t,e?.settings),s=sf(n,"--wp--custom--","--");s.length>0&&i.push(...s),i.length>0&&(o+=`${r}{${i.join(";")};}`)})),o},mf=(e,t,n,o,r=!1,i=!1,s=void 0)=>{const l={blockGap:!0,blockStyles:!0,layoutStyles:!0,marginReset:!0,presets:!0,rootPadding:!0,variationStyles:!1,...s},a=pf(e,t),c=hf(e,t),u=e?.settings?.useRootPaddingAwareAlignments,{contentSize:d,wideSize:p}=e?.settings?.layout||{},h=l.marginReset||l.rootPadding||l.layoutStyles;let g="";if(l.presets&&(d||p)&&(g+=`${Ei} {`,g=d?g+` --wp--style--global--content-size: ${d};`:g,g=p?g+` --wp--style--global--wide-size: ${p};`:g,g+="}"),h&&(g+=":where(body) {margin: 0;",l.rootPadding&&u&&(g+="padding-right: 0; padding-left: 0; padding-top: var(--wp--style--root--padding-top); padding-bottom: var(--wp--style--root--padding-bottom) }\n\t\t\t\t.has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }\n\t\t\t\t.has-global-padding > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); }\n\t\t\t\t.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) { padding-right: 0; padding-left: 0; }\n\t\t\t\t.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) > .alignfull { margin-left: 0; margin-right: 0;\n\t\t\t\t"),g+="}"),l.blockStyles&&a.forEach((({selector:t,duotoneSelector:s,styles:a,fallbackGapValue:c,hasLayoutSupport:d,featureSelectors:p,styleVariationSelectors:h,skipSelectorWrapper:m})=>{if(p){const e=lf(p,a);Object.entries(e).forEach((([e,t])=>{if(t.length){const n=t.join(";");g+=`:root :where(${e}){${n};}`}}))}if(s){const e={};a?.filter&&(e.filter=a.filter,delete a.filter);const t=af(e);t.length&&(g+=`${s}{${t.join(";")};}`)}r||ji!==t&&!d||(g+=cf({style:a,selector:t,hasBlockGapSupport:n,hasFallbackGapSupport:o,fallbackGapValue:c}));const f=af(a,t,u,e,i);if(f?.length){g+=`${m?t:`:root :where(${t})`}{${f.join(";")};}`}a?.css&&(g+=kf(a.css,`:root :where(${t})`)),l.variationStyles&&h&&Object.entries(h).forEach((([t,n])=>{const o=a?.variations?.[t];if(o){if(p){const e=lf(p,o);Object.entries(e).forEach((([e,t])=>{if(t.length){const o=function(e,t){const n=e.split(","),o=[];return n.forEach((e=>{o.push(`${t.trim()}${e.trim()}`)})),o.join(", ")}(e,n),r=t.join(";");g+=`:root :where(${o}){${r};}`}}))}const t=af(o,n,u,e);t.length&&(g+=`:root :where(${n}){${t.join(";")};}`),o?.css&&(g+=kf(o.css,`:root :where(${n})`))}}));const b=Object.entries(a).filter((([e])=>e.startsWith(":")));b?.length&&b.forEach((([e,n])=>{const o=af(n);if(!o?.length)return;const r=`:root :where(${t.split(",").map((t=>t+e)).join(",")}){${o.join(";")};}`;g+=r}))})),l.layoutStyles&&(g+=".wp-site-blocks > .alignleft { float: left; margin-right: 2em; }",g+=".wp-site-blocks > .alignright { float: right; margin-left: 2em; }",g+=".wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }"),l.blockGap&&n){const t=Fs(e?.styles?.spacing?.blockGap)||"0.5em";g+=`:root :where(.wp-site-blocks) > * { margin-block-start: ${t}; margin-block-end: 0; }`,g+=":root :where(.wp-site-blocks) > :first-child { margin-block-start: 0; }",g+=":root :where(.wp-site-blocks) > :last-child { margin-block-end: 0; }"}return l.presets&&c.forEach((({selector:e,presets:t})=>{ji!==e&&Ei!==e||(e="");const n=function(e="*",t={}){return Ti.reduce(((n,{path:o,cssVarInfix:r,classes:i})=>{if(!i)return n;const s=_e(t,o,[]);return["default","theme","custom"].forEach((t=>{s[t]&&s[t].forEach((({slug:t})=>{i.forEach((({classSuffix:o,propertyName:i})=>{const s=`.has-${rf(t)}-${o}`,l=e.split(",").map((e=>`${e}${s}`)).join(","),a=`var(--wp--preset--${r}--${rf(t)})`;n+=`${l}{${i}: ${a} !important;}`}))}))})),n}),"")}(e,t);n.length>0&&(g+=n)})),g};function ff(e,t){return hf(e,t).flatMap((({presets:e})=>function(e={}){return Ti.filter((e=>"duotone"===e.path.at(-1))).flatMap((t=>{const n=_e(e,t.path,{});return["default","theme"].filter((e=>n[e])).flatMap((e=>n[e].map((e=>jm(`wp-duotone-${e.slug}`,e.colors))))).join("")}))}(e)))}const bf=(e,t,n)=>{const o={};return e.forEach((e=>{const r=e.name,i=Em(e);let s=Em(e,"filter.duotone");if(!s){const t=Em(e),n=(0,l.getBlockSupport)(e,"color.__experimentalDuotone",!1);s=n&&Li(t,n)}const a=!!e?.supports?.layout||!!e?.supports?.__experimentalLayout,c=e?.supports?.spacing?.blockGap?.__experimentalDefault,u=t(r),d={};u?.forEach((e=>{const t=n?`-${n}`:"",o=`${e.name}${t}`,r=function(e,t){const n=`.is-style-${e}`;if(!t)return n;const o=/((?::\([^)]+\))?\s*)([^\s:]+)/,r=(e,t,o)=>t+o+n;return t.split(",").map((e=>e.replace(o,r))).join(",")}(o,i);d[o]=r}));const p=((e,t)=>{if(e?.selectors&&Object.keys(e.selectors).length>0)return e.selectors;const n={root:t};return Object.entries(of).forEach((([t,o])=>{const r=Em(e,t);r&&(n[o]=r)})),n})(e,i);o[r]={duotoneSelector:s,fallbackGapValue:c,featureSelectors:Object.keys(p).length?p:void 0,hasLayoutSupport:a,name:r,selector:i,styleVariationSelectors:u?.length?d:void 0}})),o};function kf(e,t){let n="";if(!e||""===e.trim())return n;return e.split("&").forEach((e=>{if(!e||""===e.trim())return;if(!e.includes("{"))n+=`:root :where(${t}){${e.trim()}}`;else{const o=e.replace("}","").split("{");if(2!==o.length)return;const[r,i]=o,s=r.match(/([>+~\s]*::[a-zA-Z-]+)/),l=s?s[1]:"",a=s?r.replace(l,"").trim():r.trim();let c;c=""===a?t:r.startsWith(" ")?Li(t,a):function(e,t){return e.includes(",")?e.split(",").map((e=>e+t)).join(","):e+t}(t,a),n+=`:root :where(${c})${l}{${i.trim()}}`}})),n}function vf(e={},t){const[n]=Hi("spacing.blockGap"),o=null!==n,r=!o,i=(0,c.useSelect)((e=>{const{getSettings:t}=e(li);return!!t().disableLayoutStyles})),{getBlockStyles:s}=(0,c.useSelect)(l.store);return(0,a.useMemo)((()=>{var n;if(!e?.styles||!e?.settings)return[];const a=(c=e,c.styles?.blocks?.["core/separator"]&&c.styles?.blocks?.["core/separator"].color?.background&&!c.styles?.blocks?.["core/separator"].color?.text&&!c.styles?.blocks?.["core/separator"].border?.color?{...c,styles:{...c.styles,blocks:{...c.styles.blocks,"core/separator":{...c.styles.blocks["core/separator"],color:{...c.styles.blocks["core/separator"].color,text:c.styles?.blocks["core/separator"].color.background}}}}}:c);var c;const u=bf((0,l.getBlockTypes)(),s),d=gf(a,u),p=mf(a,u,o,r,i,t),h=ff(a,u),g=[{css:d,isGlobalStyles:!0},{css:p,isGlobalStyles:!0},{css:null!==(n=a.styles.css)&&void 0!==n?n:"",isGlobalStyles:!0},{assets:h,__unstableType:"svg",isGlobalStyles:!0}];return(0,l.getBlockTypes)().forEach((e=>{if(a.styles.blocks[e.name]?.css){const t=u[e.name].selector;g.push({css:kf(a.styles.blocks[e.name]?.css,t),isGlobalStyles:!0})}})),[g,a.settings]}),[o,r,e,i,t,s])}function _f(e=!1){const{merged:t}=(0,a.useContext)(Oi);return vf(t,e)}const xf="is-style-";function yf(e){return e?e.split(/\s+/).reduce(((e,t)=>{if(t.startsWith(xf)){const n=t.slice(xf.length);"default"!==n&&e.push(n)}return e}),[]):[]}function Sf({override:e}){es(e)}function wf(e,t,n){const{merged:o}=(0,a.useContext)(Oi),{globalSettings:r,globalStyles:i}=(0,c.useSelect)((e=>{const t=e(li).getSettings();return{globalSettings:t.__experimentalFeatures,globalStyles:t[Z]}}),[]);return(0,a.useMemo)((()=>{var s,l,a;const c=function(e,t,n){if(!e?.styles?.blocks?.[t]?.variations?.[n])return;const o=t=>{Object.keys(t).forEach((n=>{const r=t[n];if("object"==typeof r&&null!==r)if(void 0!==r.ref)if("string"!=typeof r.ref||""===r.ref.trim())delete t[n];else{const o=_e(e,r.ref);o?t[n]=o:delete t[n]}else o(r),0===Object.keys(r).length&&delete t[n]}))},r=JSON.parse(JSON.stringify(e.styles.blocks[t].variations[n]));return o(r),r}({settings:null!==(s=o?.settings)&&void 0!==s?s:r,styles:null!==(l=o?.styles)&&void 0!==l?l:i},e,t);return{settings:null!==(a=o?.settings)&&void 0!==a?a:r,styles:{blocks:{[e]:{variations:{[`${t}-${n}`]:c}}}}}}),[o,r,i,t,n,e])}const Cf={hasSupport:()=>!0,attributeKeys:["className"],isMatch:({className:e})=>yf(e).length>0,useBlockProps:function({name:e,className:t,clientId:n}){const{getBlockStyles:o}=(0,c.useSelect)(l.store),r=function(e,t=[]){const n=yf(e);if(!n)return null;for(const e of n)if(t.some((t=>t.name===e)))return e;return null}(t,o(e)),i=`${xf}${r}-${n}`,{settings:s,styles:u}=wf(e,r,n),d=(0,a.useMemo)((()=>{if(!r)return;const e={settings:s,styles:u},t=bf((0,l.getBlockTypes)(),o,n);return mf(e,t,!1,!0,!0,!0,{blockGap:!1,blockStyles:!0,layoutStyles:!1,marginReset:!1,presets:!1,rootPadding:!1,variationStyles:!0})}),[r,s,u,o,n]);return es({id:`variation-${n}`,css:d,__unstableType:"variation",variation:r,clientId:n}),r?{className:i}:{}}},Bf="layout",{kebabCase:If}=te(os.privateApis);function jf(e){return(0,l.hasBlockSupport)(e,"layout")||(0,l.hasBlockSupport)(e,"__experimentalLayout")}function Ef(e={},t=""){const{layout:n}=e,{default:o}=(0,l.getBlockSupport)(t,Bf)||{},r=n?.inherit||n?.contentSize||n?.wideSize?{...n,type:"constrained"}:n||o||{},i=[];if(ks[r?.type||"default"]?.className){const e=ks[r?.type||"default"]?.className,n=t.split("/"),o=`wp-block-${"core"===n[0]?n.pop():n.join("-")}-${e}`;i.push(e,o)}return(0,c.useSelect)((e=>(r?.inherit||r?.contentSize||"constrained"===r?.type)&&e(li).getSettings().__experimentalFeatures?.useRootPaddingAwareAlignments),[r?.contentSize,r?.inherit,r?.type])&&i.push("has-global-padding"),r?.orientation&&i.push(`is-${If(r.orientation)}`),r?.justifyContent&&i.push(`is-content-justification-${If(r.justifyContent)}`),r?.flexWrap&&"nowrap"===r.flexWrap&&i.push("is-nowrap"),i}const Tf={shareWithChildBlocks:!0,edit:function({layout:e,setAttributes:t,name:n,clientId:o}){const r=ts(n),{layout:i}=r,{themeSupportsLayout:s}=(0,c.useSelect)((e=>{const{getSettings:t}=e(li);return{themeSupportsLayout:t().supportsLayout}}),[]);if("default"!==Gl())return null;const a=(0,l.getBlockSupport)(n,Bf,{}),u={...i,...a},{allowSwitching:d,allowEditing:p=!0,allowInheriting:h=!0,default:g}=u;if(!p)return null;const m={...a,...e},{type:f,default:{type:b="default"}={}}=m,k=f||b,v=!(!h||k&&"default"!==k&&"constrained"!==k&&!m.inherit),_=e||g||{},{inherit:x=!1,contentSize:y=null}=_;if(("default"===k||"constrained"===k)&&!s)return null;const S=Bl(k),w=Bl("constrained"),B=!_.type&&(y||x),I=!!x||!!y,j=e=>t({layout:e});return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(ma,{children:(0,$.jsxs)(os.PanelBody,{title:(0,C.__)("Layout"),children:[v&&(0,$.jsx)($.Fragment,{children:(0,$.jsx)(os.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,C.__)("Inner blocks use content width"),checked:"constrained"===S?.name||I,onChange:()=>t({layout:{type:"constrained"===S?.name||I?"default":"constrained"}}),help:"constrained"===S?.name||I?(0,C.__)("Nested blocks use content width with options for full and wide widths."):(0,C.__)("Nested blocks will fill the width of this container. Toggle to constrain.")})}),!x&&d&&(0,$.jsx)(Mf,{type:k,onChange:e=>t({layout:{type:e}})}),S&&"default"!==S.name&&(0,$.jsx)(S.inspectorControls,{layout:_,onChange:j,layoutBlockSupport:u,name:n,clientId:o}),w&&B&&(0,$.jsx)(w.inspectorControls,{layout:_,onChange:j,layoutBlockSupport:u,name:n,clientId:o})]})}),!x&&S&&(0,$.jsx)(S.toolBarControls,{layout:_,onChange:j,layoutBlockSupport:a,name:n,clientId:o})]})},attributeKeys:["layout"],hasSupport:e=>jf(e)};function Mf({type:e,onChange:t}){return(0,$.jsx)(os.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,isBlock:!0,label:(0,C.__)("Layout type"),__nextHasNoMarginBottom:!0,hideLabelFromVision:!0,isAdaptiveWidth:!0,value:e,onChange:t,children:Cl.map((({name:e,label:t})=>(0,$.jsx)(os.__experimentalToggleGroupControlOption,{value:e,label:t},e)))})}function Pf({block:e,props:t,blockGapSupport:n,layoutClasses:o}){const{name:r,attributes:i}=t,s=(0,u.useInstanceId)(e),{layout:a}=i,{default:c}=(0,l.getBlockSupport)(r,Bf)||{},d=a?.inherit||a?.contentSize||a?.wideSize?{...a,type:"constrained"}:a||c||{},p=`wp-container-${If(r)}-is-layout-`,h=`.${p}${s}`,g=null!==n,m=Bl(d?.type||"default"),f=m?.getLayoutStyle?.({blockName:r,selector:h,layout:d,style:i?.style,hasBlockGapSupport:g}),b=Zi({[`${p}${s}`]:!!f},o);return Ji({css:f}),(0,$.jsx)(e,{...t,__unstableLayoutClassNames:b})}const Rf=(0,u.createHigherOrderComponent)((e=>t=>{const{clientId:n,name:o,attributes:r}=t,i=jf(o),s=Ef(r,o),l=(0,c.useSelect)((e=>{if(!i)return;const{getSettings:t,getBlockSettings:o}=te(e(li)),{disableLayoutStyles:r}=t();if(r)return;const[s]=o(n,"spacing.blockGap");return{blockGapSupport:s}}),[i,n]);return l?(0,$.jsx)(Pf,{block:e,props:t,layoutClasses:s,...l}):(0,$.jsx)(e,{...t,__unstableLayoutClassNames:i?s:void 0})}),"withLayoutStyles");function Nf(e,t){return Array.from({length:t},((t,n)=>e+n))}(0,d.addFilter)("blocks.registerBlockType","core/layout/addAttribute",(function(e){var t;return"type"in(null!==(t=e.attributes?.layout)&&void 0!==t?t:{})||jf(e)&&(e.attributes={...e.attributes,layout:{type:"object"}}),e})),(0,d.addFilter)("editor.BlockListBlock","core/editor/layout/with-layout-styles",Rf);class Lf{constructor({columnStart:e,rowStart:t,columnEnd:n,rowEnd:o,columnSpan:r,rowSpan:i}={}){this.columnStart=null!=e?e:1,this.rowStart=null!=t?t:1,this.columnEnd=void 0!==r?this.columnStart+r-1:null!=n?n:this.columnStart,this.rowEnd=void 0!==i?this.rowStart+i-1:null!=o?o:this.rowStart}get columnSpan(){return this.columnEnd-this.columnStart+1}get rowSpan(){return this.rowEnd-this.rowStart+1}contains(e,t){return e>=this.columnStart&&e<=this.columnEnd&&t>=this.rowStart&&t<=this.rowEnd}containsRect(e){return this.contains(e.columnStart,e.rowStart)&&this.contains(e.columnEnd,e.rowEnd)}intersectsRect(e){return this.columnStart<=e.columnEnd&&this.columnEnd>=e.columnStart&&this.rowStart<=e.rowEnd&&this.rowEnd>=e.rowStart}}function Af(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function Df(e,t){const n=[];for(const o of e.split(" ")){const e=n[n.length-1],r=e?e.end+t:0,i=r+parseFloat(o);n.push({start:r,end:i})}return n}function Of(e,t,n="start"){return e.reduce(((o,r,i)=>Math.abs(r[n]-t)<Math.abs(e[o][n]-t)?i:o),0)}function zf(e){const t=Af(e,"grid-template-columns"),n=Af(e,"grid-template-rows"),o=t.split(" ").length,r=n.split(" ").length;return{numColumns:o,numRows:r,numItems:o*r,currentColor:Af(e,"color"),style:{gridTemplateColumns:t,gridTemplateRows:n,gap:Af(e,"gap"),padding:Af(e,"padding")}}}const Vf=[(0,a.createInterpolateElement)((0,C.__)("While writing, you can press <kbd>/</kbd> to quickly insert new blocks."),{kbd:(0,$.jsx)("kbd",{})}),(0,a.createInterpolateElement)((0,C.__)("Indent a list by pressing <kbd>space</kbd> at the beginning of a line."),{kbd:(0,$.jsx)("kbd",{})}),(0,a.createInterpolateElement)((0,C.__)("Outdent a list by pressing <kbd>backspace</kbd> at the beginning of a line."),{kbd:(0,$.jsx)("kbd",{})}),(0,C.__)("Drag files into the editor to automatically insert media blocks."),(0,C.__)("Change a block's type by pressing the block icon on the toolbar.")];const Ff=function(){const[e]=(0,a.useState)(Math.floor(Math.random()*Vf.length));return(0,$.jsx)(os.Tip,{children:Vf[e]})},Hf=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})}),Gf=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})}),$f=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.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"})});const Uf=(0,a.memo)((function({icon:e,showColors:t=!1,className:n,context:o}){"block-default"===e?.src&&(e={src:$f});const r=(0,$.jsx)(os.Icon,{icon:e&&e.src?e.src:e,context:o}),i=t?{backgroundColor:e&&e.background,color:e&&e.foreground}:{};return(0,$.jsx)("span",{style:i,className:Zi("block-editor-block-icon",n,{"has-colors":t}),children:r})}));const Wf=function({title:e,icon:t,description:n,blockType:o,className:r,name:i}){o&&(y()("`blockType` property in `BlockCard component`",{since:"5.7",alternative:"`title, icon and description` properties"}),({title:e,icon:t,description:n}=o));const{parentNavBlockClientId:s}=(0,c.useSelect)((e=>{const{getSelectedBlockClientId:t,getBlockParentsByBlockName:n}=e(li);return{parentNavBlockClientId:n(t(),"core/navigation",!0)[0]}}),[]),{selectBlock:l}=(0,c.useDispatch)(li);return(0,$.jsxs)("div",{className:Zi("block-editor-block-card",r),children:[s&&(0,$.jsx)(os.Button,{onClick:()=>l(s),label:(0,C.__)("Go to parent Navigation block"),style:{minWidth:24,padding:0},icon:(0,C.isRTL)()?Hf:Gf,size:"small"}),(0,$.jsx)(Uf,{icon:t,showColors:!0}),(0,$.jsxs)(os.__experimentalVStack,{spacing:1,children:[(0,$.jsx)("h2",{className:"block-editor-block-card__title",children:i?.length?(0,C.sprintf)((0,C._x)("%1$s (%2$s)","block label"),i,e):e}),n&&(0,$.jsx)(os.__experimentalText,{className:"block-editor-block-card__description",children:n})]})]})};const Kf=(0,u.createHigherOrderComponent)((e=>({useSubRegistry:t=!0,...n})=>{const o=(0,c.useRegistry)(),[r]=(0,a.useState)((()=>new WeakMap)),i=function(e,t,n){if(!n)return t;let o=e.get(t);return o||(o=(0,c.createRegistry)({},t),o.registerStore(ne,si),e.set(t,o)),o}(r,o,t);return i===o?(0,$.jsx)(e,{registry:o,...n}):(0,$.jsx)(c.RegistryProvider,{value:i,children:(0,$.jsx)(e,{registry:i,...n})})}),"withRegistryProvider"),Zf=()=>{};function qf({clientId:e=null,value:t,selection:n,onChange:o=Zf,onInput:r=Zf}){const i=(0,c.useRegistry)(),{resetBlocks:s,resetSelection:u,replaceInnerBlocks:d,setHasControlledInnerBlocks:p,__unstableMarkNextChangeAsNotPersistent:h}=i.dispatch(li),{getBlockName:g,getBlocks:m,getSelectionStart:f,getSelectionEnd:b}=i.select(li),k=(0,c.useSelect)((t=>!e||t(li).areInnerBlocksControlled(e)),[e]),v=(0,a.useRef)({incoming:null,outgoing:[]}),_=(0,a.useRef)(!1),x=()=>{t&&(h(),e?i.batch((()=>{p(e,!0);const n=t.map((e=>(0,l.cloneBlock)(e)));_.current&&(v.current.incoming=n),h(),d(e,n)})):(_.current&&(v.current.incoming=t),s(t)))},y=(0,a.useRef)(r),S=(0,a.useRef)(o);(0,a.useEffect)((()=>{y.current=r,S.current=o}),[r,o]),(0,a.useEffect)((()=>{v.current.outgoing.includes(t)?v.current.outgoing[v.current.outgoing.length-1]===t&&(v.current.outgoing=[]):m(e)!==t&&(v.current.outgoing=[],x(),n&&u(n.selectionStart,n.selectionEnd,n.initialPosition))}),[t,e]);const w=(0,a.useRef)(!1);(0,a.useEffect)((()=>{w.current?k||(v.current.outgoing=[],x()):w.current=!0}),[k]),(0,a.useEffect)((()=>{const{getSelectedBlocksInitialCaretPosition:t,isLastBlockChangePersistent:n,__unstableIsLastBlockChangeIgnored:o,areInnerBlocksControlled:r}=i.select(li);let s=m(e),l=n(),a=!1;_.current=!0;const c=i.subscribe((()=>{if(null!==e&&null===g(e))return;if(!(!e||r(e)))return;const i=n(),c=m(e),u=c!==s;if(s=c,u&&(v.current.incoming||o()))return v.current.incoming=null,void(l=i);if(u||a&&!u&&i&&!l){l=i,v.current.outgoing.push(s);(l?S.current:y.current)(s,{selection:{selectionStart:f(),selectionEnd:b(),initialPosition:t()}})}a=u}),li);return()=>{_.current=!1,c()}}),[i,e]),(0,a.useEffect)((()=>()=>{h(),e?(p(e,!1),h(),d(e,[])):s([])}),[])}const Yf=window.wp.keyboardShortcuts;function Xf(){return null}Xf.Register=function(){const{registerShortcut:e}=(0,c.useDispatch)(Yf.store);return(0,a.useEffect)((()=>{e({name:"core/block-editor/duplicate",category:"block",description:(0,C.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:(0,C.__)("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/insert-before",category:"block",description:(0,C.__)("Insert a new block before the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"t"}}),e({name:"core/block-editor/insert-after",category:"block",description:(0,C.__)("Insert a new block after the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"y"}}),e({name:"core/block-editor/delete-multi-selection",category:"block",description:(0,C.__)("Delete selection."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/select-all",category:"selection",description:(0,C.__)("Select all text when typing. Press again to select all blocks."),keyCombination:{modifier:"primary",character:"a"}}),e({name:"core/block-editor/unselect",category:"selection",description:(0,C.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/multi-text-selection",category:"selection",description:(0,C.__)("Select text across multiple blocks."),keyCombination:{modifier:"shift",character:"arrow"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:(0,C.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:(0,C.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:(0,C.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}}),e({name:"core/block-editor/collapse-list-view",category:"list-view",description:(0,C.__)("Collapse all other items."),keyCombination:{modifier:"alt",character:"l"}}),e({name:"core/block-editor/group",category:"block",description:(0,C.__)("Create a group block from the selected multiple blocks."),keyCombination:{modifier:"primary",character:"g"}})}),[e]),null};const Qf=Xf,Jf=Kf((e=>{const{children:t,settings:n,stripExperimentalSettings:o=!1}=e,{__experimentalUpdateSettings:r}=te((0,c.useDispatch)(li));return(0,a.useEffect)((()=>{r({...n,__internalIsInitialized:!0},{stripExperimentalSettings:o,reset:!0})}),[n,o,r]),qf(e),(0,$.jsxs)(os.SlotFillProvider,{passthrough:!0,children:[!n?.__unstableIsPreviewMode&&(0,$.jsx)(Qf.Register,{}),(0,$.jsx)(mp,{children:t})]})})),eb=e=>(0,$.jsx)(Jf,{...e,stripExperimentalSettings:!0,children:e.children}),tb=(0,a.createContext)({});function nb({value:e,children:t}){const n=(0,a.useContext)(tb),o=(0,a.useMemo)((()=>({...n,...e})),[n,e]);return(0,$.jsx)(tb.Provider,{value:o,children:t})}const ob=tb,rb={},ib=(0,os.withFilters)("editor.BlockEdit")((e=>{const{name:t}=e,n=(0,l.getBlockType)(t);if(!n)return null;const o=n.edit||n.save;return(0,$.jsx)(o,{...e})})),sb=e=>{const{attributes:t={},name:n}=e,o=(0,l.getBlockType)(n),r=(0,a.useContext)(ob),i=(0,a.useMemo)((()=>o&&o.usesContext?Object.fromEntries(Object.entries(r).filter((([e])=>o.usesContext.includes(e)))):rb),[o,r]);if(!o)return null;if(o.apiVersion>1)return(0,$.jsx)(ib,{...e,context:i});const s=(0,l.hasBlockSupport)(o,"className",!0)?(0,l.getBlockDefaultClassName)(n):null,c=Zi(s,t.className,e.className);return(0,$.jsx)(ib,{...e,context:i,className:c})},lb=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})});const ab=function({className:e,actions:t,children:n,secondaryActions:o}){return(0,$.jsx)("div",{style:{display:"contents",all:"initial"},children:(0,$.jsx)("div",{className:Zi(e,"block-editor-warning"),children:(0,$.jsxs)("div",{className:"block-editor-warning__contents",children:[(0,$.jsx)("p",{className:"block-editor-warning__message",children:n}),(a.Children.count(t)>0||o)&&(0,$.jsxs)("div",{className:"block-editor-warning__actions",children:[a.Children.count(t)>0&&a.Children.map(t,((e,t)=>(0,$.jsx)("span",{className:"block-editor-warning__action",children:e},t))),o&&(0,$.jsx)(os.DropdownMenu,{className:"block-editor-warning__secondary",icon:lb,label:(0,C.__)("More options"),popoverProps:{position:"bottom left",className:"block-editor-warning__dropdown"},noIcons:!0,children:()=>(0,$.jsx)(os.MenuGroup,{children:o.map(((e,t)=>(0,$.jsx)(os.MenuItem,{onClick:e.onClick,children:e.title},t)))})})]})]})})})};function cb({originalBlockClientId:e,name:t,onReplace:n}){const{selectBlock:o}=(0,c.useDispatch)(li),r=(0,l.getBlockType)(t);return(0,$.jsxs)(ab,{actions:[(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>o(e),children:(0,C.__)("Find original")},"find-original"),(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>n([]),children:(0,C.__)("Remove")},"remove")],children:[(0,$.jsxs)("strong",{children:[r?.title,": "]}),(0,C.__)("This block can only be used once.")]})}const ub=(0,a.createContext)({});function db({mayDisplayControls:e,mayDisplayParentControls:t,blockEditingMode:n,isPreviewMode:o,...r}){const{name:i,isSelected:s,clientId:c,attributes:u={},__unstableLayoutClassNames:d}=r,{layout:b=null,metadata:k={}}=u,{bindings:_}=k,x=(0,l.hasBlockSupport)(i,"layout",!1)||(0,l.hasBlockSupport)(i,"__experimentalLayout",!1),{originalBlockClientId:y}=(0,a.useContext)(ub);return(0,$.jsxs)(v,{value:(0,a.useMemo)((()=>({name:i,isSelected:s,clientId:c,layout:x?b:null,__unstableLayoutClassNames:d,[p]:e,[h]:t,[g]:n,[m]:_,[f]:o})),[i,s,c,x,b,d,e,t,n,_,o]),children:[(0,$.jsx)(sb,{...r}),y&&(0,$.jsx)(cb,{originalBlockClientId:y,name:i,onReplace:r.onReplace})]})}var pb=n(8021);function hb({title:e,rawContent:t,renderedContent:n,action:o,actionText:r,className:i}){return(0,$.jsxs)("div",{className:i,children:[(0,$.jsxs)("div",{className:"block-editor-block-compare__content",children:[(0,$.jsx)("h2",{className:"block-editor-block-compare__heading",children:e}),(0,$.jsx)("div",{className:"block-editor-block-compare__html",children:t}),(0,$.jsx)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor",children:(0,$.jsx)(a.RawHTML,{children:(0,ba.safeHTML)(n)})})]}),(0,$.jsx)("div",{className:"block-editor-block-compare__action",children:(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,variant:"secondary",tabIndex:"0",onClick:o,children:r})})]})}const gb=function({block:e,onKeep:t,onConvert:n,convertor:o,convertButtonText:r}){const i=(s=o(e),(Array.isArray(s)?s:[s]).map((e=>(0,l.getSaveContent)(e.name,e.attributes,e.innerBlocks))).join(""));var s;const a=(c=e.originalContent,u=i,(0,pb.JJ)(c,u).map(((e,t)=>{const n=Zi({"block-editor-block-compare__added":e.added,"block-editor-block-compare__removed":e.removed});return(0,$.jsx)("span",{className:n,children:e.value},t)})));var c,u;return(0,$.jsxs)("div",{className:"block-editor-block-compare__wrapper",children:[(0,$.jsx)(hb,{title:(0,C.__)("Current"),className:"block-editor-block-compare__current",action:t,actionText:(0,C.__)("Convert to HTML"),rawContent:e.originalContent,renderedContent:e.originalContent}),(0,$.jsx)(hb,{title:(0,C.__)("After Conversion"),className:"block-editor-block-compare__converted",action:n,actionText:r,rawContent:a,renderedContent:i})]})},mb=e=>(0,l.rawHandler)({HTML:e.originalContent});function fb({clientId:e}){const{block:t,canInsertHTMLBlock:n,canInsertClassicBlock:o}=(0,c.useSelect)((t=>{const{canInsertBlockType:n,getBlock:o,getBlockRootClientId:r}=t(li),i=r(e);return{block:o(e),canInsertHTMLBlock:n("core/html",i),canInsertClassicBlock:n("core/freeform",i)}}),[e]),{replaceBlock:r}=(0,c.useDispatch)(li),[i,s]=(0,a.useState)(!1),u=(0,a.useCallback)((()=>s(!1)),[]),d=(0,a.useMemo)((()=>({toClassic(){const e=(0,l.createBlock)("core/freeform",{content:t.originalContent});return r(t.clientId,e)},toHTML(){const e=(0,l.createBlock)("core/html",{content:t.originalContent});return r(t.clientId,e)},toBlocks(){const e=mb(t);return r(t.clientId,e)},toRecoveredBlock(){const e=(0,l.createBlock)(t.name,t.attributes,t.innerBlocks);return r(t.clientId,e)}})),[t,r]),p=(0,a.useMemo)((()=>[{title:(0,C._x)("Resolve","imperative verb"),onClick:()=>s(!0)},n&&{title:(0,C.__)("Convert to HTML"),onClick:d.toHTML},o&&{title:(0,C.__)("Convert to Classic Block"),onClick:d.toClassic}].filter(Boolean)),[n,o,d]);return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(ab,{actions:[(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,onClick:d.toRecoveredBlock,variant:"primary",children:(0,C.__)("Attempt recovery")},"recover")],secondaryActions:p,children:(0,C.__)("Block contains unexpected or invalid content.")}),i&&(0,$.jsx)(os.Modal,{title:(0,C.__)("Resolve Block"),onRequestClose:u,className:"block-editor-block-compare",children:(0,$.jsx)(gb,{block:t,onKeep:d.toHTML,onConvert:d.toBlocks,convertor:mb,convertButtonText:(0,C.__)("Convert to Blocks")})})]})}const bb=(0,$.jsx)(ab,{className:"block-editor-block-list__block-crash-warning",children:(0,C.__)("This block has encountered an error and cannot be previewed.")}),kb=()=>bb;class vb 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}}const _b=vb;var xb=n(4132);const yb=function({clientId:e}){const[t,n]=(0,a.useState)(""),o=(0,c.useSelect)((t=>t(li).getBlock(e)),[e]),{updateBlock:r}=(0,c.useDispatch)(li);return(0,a.useEffect)((()=>{n((0,l.getBlockContent)(o))}),[o]),(0,$.jsx)(xb.A,{className:"block-editor-block-list__block-html-textarea",value:t,onBlur:()=>{const i=(0,l.getBlockType)(o.name);if(!i)return;const s=(0,l.getBlockAttributes)(i,t,o.attributes),a=t||(0,l.getSaveContent)(i,s),[c]=t?(0,l.validateBlock)({...o,attributes:s,originalContent:a}):[!0];r(e,{attributes:s,originalContent:a,isValid:c}),t||n(a)},onChange:e=>n(e.target.value)})};var Sb=zb(),wb=e=>Lb(e,Sb),Cb=zb();wb.write=e=>Lb(e,Cb);var Bb=zb();wb.onStart=e=>Lb(e,Bb);var Ib=zb();wb.onFrame=e=>Lb(e,Ib);var jb=zb();wb.onFinish=e=>Lb(e,jb);var Eb=[];wb.setTimeout=(e,t)=>{let n=wb.now()+t,o=()=>{let e=Eb.findIndex((e=>e.cancel==o));~e&&Eb.splice(e,1),Rb-=~e?1:0},r={time:n,handler:e,cancel:o};return Eb.splice(Tb(n),0,r),Rb+=1,Ab(),r};var Tb=e=>~(~Eb.findIndex((t=>t.time>e))||~Eb.length);wb.cancel=e=>{Bb.delete(e),Ib.delete(e),jb.delete(e),Sb.delete(e),Cb.delete(e)},wb.sync=e=>{Nb=!0,wb.batchedUpdates(e),Nb=!1},wb.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function o(...e){t=e,wb.onStart(n)}return o.handler=e,o.cancel=()=>{Bb.delete(n),t=null},o};var Mb=typeof window<"u"?window.requestAnimationFrame:()=>{};wb.use=e=>Mb=e,wb.now=typeof performance<"u"?()=>performance.now():Date.now,wb.batchedUpdates=e=>e(),wb.catch=console.error,wb.frameLoop="always",wb.advance=()=>{"demand"!==wb.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):Ob()};var Pb=-1,Rb=0,Nb=!1;function Lb(e,t){Nb?(t.delete(e),e(0)):(t.add(e),Ab())}function Ab(){Pb<0&&(Pb=0,"demand"!==wb.frameLoop&&Mb(Db))}function Db(){~Pb&&(Mb(Db),wb.batchedUpdates(Ob))}function Ob(){let e=Pb;Pb=wb.now();let t=Tb(Pb);t&&(Vb(Eb.splice(0,t),(e=>e.handler())),Rb-=t),Rb?(Bb.flush(),Sb.flush(e?Math.min(64,Pb-e):16.667),Ib.flush(),Cb.flush(),jb.flush()):Pb=-1}function zb(){let e=new Set,t=e;return{add(n){Rb+=t!=e||e.has(n)?0:1,e.add(n)},delete:n=>(Rb-=t==e&&e.has(n)?1:0,e.delete(n)),flush(n){t.size&&(e=new Set,Rb-=t.size,Vb(t,(t=>t(n)&&e.add(t))),Rb+=e.size,t=e)}}}function Vb(e,t){e.forEach((e=>{try{t(e)}catch(e){wb.catch(e)}}))}var Fb=Object.defineProperty,Hb={};function Gb(){}((e,t)=>{for(var n in t)Fb(e,n,{get:t[n],enumerable:!0})})(Hb,{assign:()=>ok,colors:()=>ek,createStringInterpolator:()=>Yb,skipAnimation:()=>tk,to:()=>Xb,willAdvance:()=>nk});var $b={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 Ub(e,t){if($b.arr(e)){if(!$b.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var Wb=(e,t)=>e.forEach(t);function Kb(e,t,n){if($b.arr(e))for(let o=0;o<e.length;o++)t.call(n,e[o],`${o}`);else for(let o in e)e.hasOwnProperty(o)&&t.call(n,e[o],o)}var Zb=e=>$b.und(e)?[]:$b.arr(e)?e:[e];function qb(e,t){if(e.size){let n=Array.from(e);e.clear(),Wb(n,t)}}var Yb,Xb,Qb=(e,...t)=>qb(e,(e=>e(...t))),Jb=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),ek=null,tk=!1,nk=Gb,ok=e=>{e.to&&(Xb=e.to),e.now&&(wb.now=e.now),void 0!==e.colors&&(ek=e.colors),null!=e.skipAnimation&&(tk=e.skipAnimation),e.createStringInterpolator&&(Yb=e.createStringInterpolator),e.requestAnimationFrame&&wb.use(e.requestAnimationFrame),e.batchedUpdates&&(wb.batchedUpdates=e.batchedUpdates),e.willAdvance&&(nk=e.willAdvance),e.frameLoop&&(wb.frameLoop=e.frameLoop)},rk=new Set,ik=[],sk=[],lk=0,ak={get idle(){return!rk.size&&!ik.length},start(e){lk>e.priority?(rk.add(e),wb.onStart(ck)):(uk(e),wb(pk))},advance:pk,sort(e){if(lk)wb.onFrame((()=>ak.sort(e)));else{let t=ik.indexOf(e);~t&&(ik.splice(t,1),dk(e))}},clear(){ik=[],rk.clear()}};function ck(){rk.forEach(uk),rk.clear(),wb(pk)}function uk(e){ik.includes(e)||dk(e)}function dk(e){ik.splice(function(e,t){let n=e.findIndex(t);return n<0?e.length:n}(ik,(t=>t.priority>e.priority)),0,e)}function pk(e){let t=sk;for(let n=0;n<ik.length;n++){let o=ik[n];lk=o.priority,o.idle||(nk(o),o.advance(e),o.idle||t.push(o))}return lk=0,(sk=ik).length=0,(ik=t).length>0}var hk="[-+]?\\d*\\.?\\d+",gk=hk+"%";function mk(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var fk=new RegExp("rgb"+mk(hk,hk,hk)),bk=new RegExp("rgba"+mk(hk,hk,hk,hk)),kk=new RegExp("hsl"+mk(hk,gk,gk)),vk=new RegExp("hsla"+mk(hk,gk,gk,hk)),_k=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,xk=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,yk=/^#([0-9a-fA-F]{6})$/,Sk=/^#([0-9a-fA-F]{8})$/;function wk(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 Ck(e,t,n){let o=n<.5?n*(1+t):n+t-n*t,r=2*n-o,i=wk(r,o,e+1/3),s=wk(r,o,e),l=wk(r,o,e-1/3);return Math.round(255*i)<<24|Math.round(255*s)<<16|Math.round(255*l)<<8}function Bk(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function Ik(e){return(parseFloat(e)%360+360)%360/360}function jk(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function Ek(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function Tk(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=yk.exec(e))?parseInt(t[1]+"ff",16)>>>0:ek&&void 0!==ek[e]?ek[e]:(t=fk.exec(e))?(Bk(t[1])<<24|Bk(t[2])<<16|Bk(t[3])<<8|255)>>>0:(t=bk.exec(e))?(Bk(t[1])<<24|Bk(t[2])<<16|Bk(t[3])<<8|jk(t[4]))>>>0:(t=_k.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Sk.exec(e))?parseInt(t[1],16)>>>0:(t=xk.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=kk.exec(e))?(255|Ck(Ik(t[1]),Ek(t[2]),Ek(t[3])))>>>0:(t=vk.exec(e))?(Ck(Ik(t[1]),Ek(t[2]),Ek(t[3]))|jk(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})`)}var Mk=(e,t,n)=>{if($b.fun(e))return e;if($b.arr(e))return Mk({range:e,output:t,extrapolate:n});if($b.str(e.output[0]))return Yb(e);let o=e,r=o.output,i=o.range||[0,1],s=o.extrapolateLeft||o.extrapolate||"extend",l=o.extrapolateRight||o.extrapolate||"extend",a=o.easing||(e=>e);return e=>{let t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,i);return function(e,t,n,o,r,i,s,l,a){let c=a?a(e):e;if(c<t){if("identity"===s)return c;"clamp"===s&&(c=t)}if(c>n){if("identity"===l)return c;"clamp"===l&&(c=n)}return o===r?o:t===n?e<=t?o:r:(t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t),c=i(c),o===-1/0?c=-c:r===1/0?c+=o:c=c*(r-o)+o,c)}(e,i[t],i[t+1],r[t],r[t+1],a,s,l,o.map)}};var Pk=1.70158,Rk=1.525*Pk,Nk=Pk+1,Lk=2*Math.PI/3,Ak=2*Math.PI/4.5,Dk=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,Ok={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=>Nk*e*e*e-Pk*e*e,easeOutBack:e=>1+Nk*Math.pow(e-1,3)+Pk*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*(2*(Rk+1)*e-Rk)/2:(Math.pow(2*e-2,2)*((Rk+1)*(2*e-2)+Rk)+2)/2,easeInElastic:e=>0===e?0:1===e?1:-Math.pow(2,10*e-10)*Math.sin((10*e-10.75)*Lk),easeOutElastic:e=>0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin((10*e-.75)*Lk)+1,easeInOutElastic:e=>0===e?0:1===e?1:e<.5?-Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*Ak)/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*Ak)/2+1,easeInBounce:e=>1-Dk(1-e),easeOutBounce:Dk,easeInOutBounce:e=>e<.5?(1-Dk(1-2*e))/2:(1+Dk(2*e-1))/2,steps:(e,t="end")=>n=>{let o=(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(o):Math.ceil(o))/e)}},zk=Symbol.for("FluidValue.get"),Vk=Symbol.for("FluidValue.observers"),Fk=e=>Boolean(e&&e[zk]),Hk=e=>e&&e[zk]?e[zk]():e,Gk=e=>e[Vk]||null;function $k(e,t){let n=e[Vk];n&&n.forEach((e=>{!function(e,t){e.eventObserved?e.eventObserved(t):e(t)}(e,t)}))}var Uk=class{[zk];[Vk];constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");Wk(this,e)}},Wk=(e,t)=>Yk(e,zk,t);function Kk(e,t){if(e[zk]){let n=e[Vk];n||Yk(e,Vk,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function Zk(e,t){let n=e[Vk];if(n&&n.has(t)){let o=n.size-1;o?n.delete(t):e[Vk]=null,e.observerRemoved&&e.observerRemoved(o,t)}}var qk,Yk=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),Xk=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Qk=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Jk=new RegExp(`(${Xk.source})(%|[a-z]+)`,"i"),ev=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,tv=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,nv=e=>{let[t,n]=ov(e);if(!t||Jb())return e;let o=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(o)return o.trim();if(n&&n.startsWith("--")){return window.getComputedStyle(document.documentElement).getPropertyValue(n)||e}return n&&tv.test(n)?nv(n):n||e},ov=e=>{let t=tv.exec(e);if(!t)return[,];let[,n,o]=t;return[n,o]},rv=(e,t,n,o,r)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(o)}, ${r})`,iv=e=>{qk||(qk=ek?new RegExp(`(${Object.keys(ek).join("|")})(?!\\w)`,"g"):/^\b$/);let t=e.output.map((e=>Hk(e).replace(tv,nv).replace(Qk,Tk).replace(qk,Tk))),n=t.map((e=>e.match(Xk).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]})))).map((t=>Mk({...e,output:t})));return e=>{let n=!Jk.test(t[0])&&t.find((e=>Jk.test(e)))?.replace(Xk,""),r=0;return t[0].replace(Xk,(()=>`${o[r++](e)}${n||""}`)).replace(ev,rv)}},sv="react-spring: ",lv=e=>{let t=e,n=!1;if("function"!=typeof t)throw new TypeError(`${sv}once requires a function parameter`);return(...e)=>{n||(t(...e),n=!0)}},av=lv(console.warn);lv(console.warn);function cv(e){return $b.str(e)&&("#"==e[0]||/\d/.test(e)||!Jb()&&tv.test(e)||e in(ek||{}))}new WeakMap;new Set,new WeakMap,new WeakMap,new WeakMap;var uv=Jb()?Pa.useEffect:Pa.useLayoutEffect;function dv(){let e=(0,Pa.useState)()[1],t=(()=>{let e=(0,Pa.useRef)(!1);return uv((()=>(e.current=!0,()=>{e.current=!1})),[]),e})();return()=>{t.current&&e(Math.random())}}var pv=[];var hv=Symbol.for("Animated:node"),gv=e=>e&&e[hv],mv=(e,t)=>((e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}))(e,hv,t),fv=e=>e&&e[hv]&&e[hv].getPayload(),bv=class{payload;constructor(){mv(this,this)}getPayload(){return this.payload||[]}},kv=class extends bv{constructor(e){super(),this._value=e,$b.num(this._value)&&(this.lastPosition=this._value)}done=!0;elapsedTime;lastPosition;lastVelocity;v0;durationProgress=0;static create(e){return new kv(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return $b.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(){let{done:e}=this;this.done=!1,$b.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},vv=class extends kv{_string=null;_toString;constructor(e){super(0),this._toString=Mk({output:[e,e]})}static create(e){return new vv(e)}getValue(){return this._string??(this._string=this._toString(this._value))}setValue(e){if($b.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=Mk({output:[this.getValue(),e]})),this._value=0,super.reset()}},_v={dependencies:null},xv=class extends bv{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){let t={};return Kb(this.source,((n,o)=>{(e=>!!e&&e[hv]===e)(n)?t[o]=n.getValue(e):Fk(n)?t[o]=Hk(n):e||(t[o]=n)})),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&Wb(this.payload,(e=>e.reset()))}_makePayload(e){if(e){let t=new Set;return Kb(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){_v.dependencies&&Fk(e)&&_v.dependencies.add(e);let t=fv(e);t&&Wb(t,(e=>this.add(e)))}},yv=class extends xv{constructor(e){super(e)}static create(e){return new yv(e)}getValue(){return this.source.map((e=>e.getValue()))}setValue(e){let t=this.getPayload();return e.length==t.length?t.map(((t,n)=>t.setValue(e[n]))).some(Boolean):(super.setValue(e.map(Sv)),!0)}};function Sv(e){return(cv(e)?vv:kv).create(e)}function wv(e){let t=gv(e);return t?t.constructor:$b.arr(e)?yv:cv(e)?vv:kv}var Cv=(e,t)=>{let n=!$b.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,Pa.forwardRef)(((o,r)=>{let i=(0,Pa.useRef)(null),s=n&&(0,Pa.useCallback)((e=>{i.current=function(e,t){return e&&($b.fun(e)?e(t):e.current=t),t}(r,e)}),[r]),[l,a]=function(e,t){let n=new Set;return _v.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new xv(e),_v.dependencies=null,[e,n]}(o,t),c=dv(),u=()=>{let e=i.current;n&&!e||!1===(!!e&&t.applyAnimatedValues(e,l.getValue(!0)))&&c()},d=new Bv(u,a),p=(0,Pa.useRef)();uv((()=>(p.current=d,Wb(a,(e=>Kk(e,d))),()=>{p.current&&(Wb(p.current.deps,(e=>Zk(e,p.current))),wb.cancel(p.current.update))}))),(0,Pa.useEffect)(u,[]),(e=>{(0,Pa.useEffect)(e,pv)})((()=>()=>{let e=p.current;Wb(e.deps,(t=>Zk(t,e)))}));let h=t.getComponentProps(l.getValue());return Pa.createElement(e,{...h,ref:s})}))},Bv=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){"change"==e.type&&wb.write(this.update)}};var Iv=Symbol.for("AnimatedComponent"),jv=e=>$b.str(e)?e:e&&$b.str(e.displayName)?e.displayName:$b.fun(e)&&e.name||null;function Ev(e,...t){return $b.fun(e)?e(...t):e}var Tv=(e,t)=>!0===e||!!(t&&e&&($b.fun(e)?e(t):Zb(e).includes(t))),Mv=(e,t)=>$b.obj(e)?t&&e[t]:e,Pv=(e,t)=>!0===e.default?e[t]:e.default?e.default[t]:void 0,Rv=e=>e,Nv=(e,t=Rv)=>{let n=Lv;e.default&&!0!==e.default&&(e=e.default,n=Object.keys(e));let o={};for(let r of n){let n=t(e[r],r);$b.und(n)||(o[r]=n)}return o},Lv=["config","onProps","onStart","onChange","onPause","onResume","onRest"],Av={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 Dv(e){let t=function(e){let t={},n=0;if(Kb(e,((e,o)=>{Av[o]||(t[o]=e,n++)})),n)return t}(e);if(t){let n={to:t};return Kb(e,((e,o)=>o in t||(n[o]=e))),n}return{...e}}function Ov(e){return e=Hk(e),$b.arr(e)?e.map(Ov):cv(e)?Hb.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function zv(e){return $b.fun(e)||$b.arr(e)&&$b.obj(e[0])}var Vv={tension:170,friction:26,mass:1,damping:1,easing:Ok.linear,clamp:!1},Fv=class{tension;friction;frequency;damping;mass;velocity=0;restVelocity;precision;progress;duration;easing;clamp;bounce;decay;round;constructor(){Object.assign(this,Vv)}};function Hv(e,t){if($b.und(t.decay)){let n=!$b.und(t.tension)||!$b.und(t.friction);(n||!$b.und(t.frequency)||!$b.und(t.damping)||!$b.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}else e.duration=void 0}var Gv=[],$v=class{changed=!1;values=Gv;toValues=null;fromValues=Gv;to;from;config=new Fv;immediate=!1};function Uv(e,{key:t,props:n,defaultProps:o,state:r,actions:i}){return new Promise(((s,l)=>{let a,c,u=Tv(n.cancel??o?.cancel,t);if(u)h();else{$b.und(n.pause)||(r.paused=Tv(n.pause,t));let e=o?.pause;!0!==e&&(e=r.paused||Tv(e,t)),a=Ev(n.delay||0,t),e?(r.resumeQueue.add(p),i.pause()):(i.resume(),p())}function d(){r.resumeQueue.add(p),r.timeouts.delete(c),c.cancel(),a=c.time-wb.now()}function p(){a>0&&!Hb.skipAnimation?(r.delayed=!0,c=wb.setTimeout(h,a),r.pauseQueue.add(d),r.timeouts.add(c)):h()}function h(){r.delayed&&(r.delayed=!1),r.pauseQueue.delete(d),r.timeouts.delete(c),e<=(r.cancelId||0)&&(u=!0);try{i.start({...n,callId:e,cancel:u},s)}catch(e){l(e)}}}))}var Wv=(e,t)=>1==t.length?t[0]:t.some((e=>e.cancelled))?qv(e.get()):t.every((e=>e.noop))?Kv(e.get()):Zv(e.get(),t.every((e=>e.finished))),Kv=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),Zv=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),qv=e=>({value:e,cancelled:!0,finished:!1});function Yv(e,t,n,o){let{callId:r,parentId:i,onRest:s}=t,{asyncTo:l,promise:a}=n;return i||e!==l||t.reset?n.promise=(async()=>{n.asyncId=r,n.asyncTo=e;let c,u,d,p=Nv(t,((e,t)=>"onRest"===t?void 0:e)),h=new Promise(((e,t)=>(c=e,u=t))),g=e=>{let t=r<=(n.cancelId||0)&&qv(o)||r!==n.asyncId&&Zv(o,!1);if(t)throw e.result=t,u(e),e},m=(e,t)=>{let i=new Qv,s=new Jv;return(async()=>{if(Hb.skipAnimation)throw Xv(n),s.result=Zv(o,!1),u(s),s;g(i);let l=$b.obj(e)?{...e}:{...t,to:e};l.parentId=r,Kb(p,((e,t)=>{$b.und(l[t])&&(l[t]=e)}));let a=await o.start(l);return g(i),n.paused&&await new Promise((e=>{n.resumeQueue.add(e)})),a})()};if(Hb.skipAnimation)return Xv(n),Zv(o,!1);try{let t;t=$b.arr(e)?(async e=>{for(let t of e)await m(t)})(e):Promise.resolve(e(m,o.stop.bind(o))),await Promise.all([t.then(c),h]),d=Zv(o.get(),!0,!1)}catch(e){if(e instanceof Qv)d=e.result;else{if(!(e instanceof Jv))throw e;d=e.result}}finally{r==n.asyncId&&(n.asyncId=i,n.asyncTo=i?l:void 0,n.promise=i?a:void 0)}return $b.fun(s)&&wb.batchedUpdates((()=>{s(d,o,o.item)})),d})():a}function Xv(e,t){qb(e.timeouts,(e=>e.cancel())),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var Qv=class extends Error{result;constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},Jv=class extends Error{result;constructor(){super("SkipAnimationSignal")}},e_=e=>e instanceof n_,t_=1,n_=class extends Uk{id=t_++;_priority=0;get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){let e=gv(this);return e&&e.getValue()}to(...e){return Hb.to(this,e)}interpolate(...e){return av(`${sv}The "interpolate" function is deprecated in v9 (use "to" instead)`),Hb.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){$k(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||ak.sort(this),$k(this,{type:"priority",parent:this,priority:e})}},o_=Symbol.for("SpringPhase"),r_=e=>(1&e[o_])>0,i_=e=>(2&e[o_])>0,s_=e=>(4&e[o_])>0,l_=(e,t)=>t?e[o_]|=3:e[o_]&=-3,a_=(e,t)=>t?e[o_]|=4:e[o_]&=-5,c_=class extends n_{key;animation=new $v;queue;defaultProps={};_state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set};_pendingCalls=new Set;_lastCallId=0;_lastToId=0;_memoizedDuration=0;constructor(e,t){if(super(),!$b.und(e)||!$b.und(t)){let n=$b.obj(e)?{...e}:{...t,from:e};$b.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(i_(this)||this._state.asyncTo)||s_(this)}get goal(){return Hk(this.animation.to)}get velocity(){let e=gv(this);return e instanceof kv?e.lastVelocity||0:e.getPayload().map((e=>e.lastVelocity||0))}get hasAnimated(){return r_(this)}get isAnimating(){return i_(this)}get isPaused(){return s_(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1,o=this.animation,{config:r,toValues:i}=o,s=fv(o.to);!s&&Fk(o.to)&&(i=Zb(Hk(o.to))),o.values.forEach(((l,a)=>{if(l.done)return;let c=l.constructor==vv?1:s?s[a].lastPosition:i[a],u=o.immediate,d=c;if(!u){if(d=l.lastPosition,r.tension<=0)return void(l.done=!0);let t,n=l.elapsedTime+=e,i=o.fromValues[a],s=null!=l.v0?l.v0:l.v0=$b.arr(r.velocity)?r.velocity[a]:r.velocity,p=r.precision||(i==c?.005:Math.min(1,.001*Math.abs(c-i)));if($b.und(r.duration))if(r.decay){let e=!0===r.decay?.998:r.decay,o=Math.exp(-(1-e)*n);d=i+s/(1-e)*(1-o),u=Math.abs(l.lastPosition-d)<=p,t=s*o}else{t=null==l.lastVelocity?s:l.lastVelocity;let n,o=r.restVelocity||p/10,a=r.clamp?0:r.bounce,h=!$b.und(a),g=i==c?l.v0>0:i<c,m=!1,f=1,b=Math.ceil(e/f);for(let e=0;e<b&&(n=Math.abs(t)>o,n||(u=Math.abs(c-d)<=p,!u));++e){h&&(m=d==c||d>c==g,m&&(t=-t*a,d=c)),t+=(1e-6*-r.tension*(d-c)+.001*-r.friction*t)/r.mass*f,d+=t*f}}else{let o=1;r.duration>0&&(this._memoizedDuration!==r.duration&&(this._memoizedDuration=r.duration,l.durationProgress>0&&(l.elapsedTime=r.duration*l.durationProgress,n=l.elapsedTime+=e)),o=(r.progress||0)+n/this._memoizedDuration,o=o>1?1:o<0?0:o,l.durationProgress=o),d=i+r.easing(o)*(c-i),t=(d-l.lastPosition)/e,u=1==o}l.lastVelocity=t,Number.isNaN(d)&&(console.warn("Got NaN while animating:",this),u=!0)}s&&!s[a].done&&(u=!1),u?l.done=!0:t=!1,l.setValue(d,r.round)&&(n=!0)}));let l=gv(this),a=l.getValue();if(t){let e=Hk(o.to);a===e&&!n||r.decay?n&&r.decay&&this._onChange(a):(l.setValue(e),this._onChange(e)),this._stop()}else n&&this._onChange(a)}set(e){return wb.batchedUpdates((()=>{this._stop(),this._focus(e),this._set(e)})),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(i_(this)){let{to:e,config:t}=this.animation;wb.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 $b.und(e)?(n=this.queue||[],this.queue=[]):n=[$b.obj(e)?e:{...t,to:e}],Promise.all(n.map((e=>this._update(e)))).then((e=>Wv(this,e)))}stop(e){let{to:t}=this.animation;return this._focus(this.get()),Xv(this._state,e&&this._lastCallId),wb.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){let t=this.key||"",{to:n,from:o}=e;n=$b.obj(n)?n[t]:n,(null==n||zv(n))&&(n=void 0),o=$b.obj(o)?o[t]:o,null==o&&(o=void 0);let r={to:n,from:o};return r_(this)||(e.reverse&&([n,o]=[o,n]),o=Hk(o),$b.und(o)?gv(this)||this._set(n):this._set(o)),r}_update({...e},t){let{key:n,defaultProps:o}=this;e.default&&Object.assign(o,Nv(e,((e,t)=>/^on/.test(t)?Mv(e,n):e))),m_(this,e,"onProps"),f_(this,"onProps",e,this);let r=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?");let i=this._state;return Uv(++this._lastCallId,{key:n,props:e,defaultProps:o,state:i,actions:{pause:()=>{s_(this)||(a_(this,!0),Qb(i.pauseQueue),f_(this,"onPause",Zv(this,u_(this,this.animation.to)),this))},resume:()=>{s_(this)&&(a_(this,!1),i_(this)&&this._resume(),Qb(i.resumeQueue),f_(this,"onResume",Zv(this,u_(this,this.animation.to)),this))},start:this._merge.bind(this,r)}}).then((n=>{if(e.loop&&n.finished&&(!t||!n.noop)){let t=d_(e);if(t)return this._update(t,!0)}return n}))}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(qv(this));let o=!$b.und(e.to),r=!$b.und(e.from);if(o||r){if(!(t.callId>this._lastToId))return n(qv(this));this._lastToId=t.callId}let{key:i,defaultProps:s,animation:l}=this,{to:a,from:c}=l,{to:u=a,from:d=c}=e;r&&!o&&(!t.default||$b.und(u))&&(u=d),t.reverse&&([u,d]=[d,u]);let p=!Ub(d,c);p&&(l.from=d),d=Hk(d);let h=!Ub(u,a);h&&this._focus(u);let g=zv(t.to),{config:m}=l,{decay:f,velocity:b}=m;(o||r)&&(m.velocity=0),t.config&&!g&&function(e,t,n){n&&(Hv(n={...n},t),t={...n,...t}),Hv(e,t),Object.assign(e,t);for(let t in Vv)null==e[t]&&(e[t]=Vv[t]);let{mass:o,frequency:r,damping:i}=e;$b.und(r)||(r<.01&&(r=.01),i<0&&(i=0),e.tension=Math.pow(2*Math.PI/r,2)*o,e.friction=4*Math.PI*i*o/r)}(m,Ev(t.config,i),t.config!==s.config?Ev(s.config,i):void 0);let k=gv(this);if(!k||$b.und(u))return n(Zv(this,!0));let v=$b.und(t.reset)?r&&!t.default:!$b.und(d)&&Tv(t.reset,i),_=v?d:this.get(),x=Ov(u),y=$b.num(x)||$b.arr(x)||cv(x),S=!g&&(!y||Tv(s.immediate||t.immediate,i));if(h){let e=wv(u);if(e!==k.constructor){if(!S)throw Error(`Cannot animate between ${k.constructor.name} and ${e.name}, as the "to" prop suggests`);k=this._set(x)}}let w=k.constructor,C=Fk(u),B=!1;if(!C){let e=v||!r_(this)&&p;(h||e)&&(B=Ub(Ov(_),x),C=!B),(!Ub(l.immediate,S)&&!S||!Ub(m.decay,f)||!Ub(m.velocity,b))&&(C=!0)}if(B&&i_(this)&&(l.changed&&!v?C=!0:C||this._stop(a)),!g&&((C||Fk(a))&&(l.values=k.getPayload(),l.toValues=Fk(u)?null:w==vv?[1]:Zb(x)),l.immediate!=S&&(l.immediate=S,!S&&!v&&this._set(a)),C)){let{onRest:e}=l;Wb(g_,(e=>m_(this,t,e)));let o=Zv(this,u_(this,a));Qb(this._pendingCalls,o),this._pendingCalls.add(n),l.changed&&wb.batchedUpdates((()=>{l.changed=!v,e?.(o,this),v?Ev(s.onRest,o):l.onStart?.(o,this)}))}v&&this._set(_),g?n(Yv(t.to,t,this._state,this)):C?this._start():i_(this)&&!h?this._pendingCalls.add(n):n(Kv(_))}_focus(e){let t=this.animation;e!==t.to&&(Gk(this)&&this._detach(),t.to=e,Gk(this)&&this._attach())}_attach(){let e=0,{to:t}=this.animation;Fk(t)&&(Kk(t,this),e_(t)&&(e=t.priority+1)),this.priority=e}_detach(){let{to:e}=this.animation;Fk(e)&&Zk(e,this)}_set(e,t=!0){let n=Hk(e);if(!$b.und(n)){let e=gv(this);if(!e||!Ub(n,e.getValue())){let o=wv(n);e&&e.constructor==o?e.setValue(n):mv(this,o.create(n)),e&&wb.batchedUpdates((()=>{this._onChange(n,t)}))}}return gv(this)}_onStart(){let e=this.animation;e.changed||(e.changed=!0,f_(this,"onStart",Zv(this,u_(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),Ev(this.animation.onChange,e,this)),Ev(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){let e=this.animation;gv(this).reset(Hk(e.to)),e.immediate||(e.fromValues=e.values.map((e=>e.lastPosition))),i_(this)||(l_(this,!0),s_(this)||this._resume())}_resume(){Hb.skipAnimation?this.finish():ak.start(this)}_stop(e,t){if(i_(this)){l_(this,!1);let n=this.animation;Wb(n.values,(e=>{e.done=!0})),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),$k(this,{type:"idle",parent:this});let o=t?qv(this.get()):Zv(this.get(),u_(this,e??n.to));Qb(this._pendingCalls,o),n.changed&&(n.changed=!1,f_(this,"onRest",o,this))}}};function u_(e,t){let n=Ov(t);return Ub(Ov(e.get()),n)}function d_(e,t=e.loop,n=e.to){let o=Ev(t);if(o){let r=!0!==o&&Dv(o),i=(r||e).reverse,s=!r||r.reset;return p_({...e,loop:t,default:!1,pause:void 0,to:!i||zv(n)?n:void 0,from:s?e.from:void 0,reset:s,...r})}}function p_(e){let{to:t,from:n}=e=Dv(e),o=new Set;return $b.obj(t)&&h_(t,o),$b.obj(n)&&h_(n,o),e.keys=o.size?Array.from(o):null,e}function h_(e,t){Kb(e,((e,n)=>null!=e&&t.add(n)))}var g_=["onStart","onRest","onChange","onPause","onResume"];function m_(e,t,n){e.animation[n]=t[n]!==Pv(t,n)?Mv(t[n],e.key):void 0}function f_(e,t,...n){e.animation[t]?.(...n),e.defaultProps[t]?.(...n)}var b_=["onStart","onChange","onRest"],k_=1,v_=class{id=k_++;springs={};queue=[];ref;_flush;_initialProps;_lastAsyncId=0;_active=new Set;_changed=new Set;_started=!1;_item;_state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set};_events={onStart:new Map,onChange:new Map,onRest:new Map};constructor(e,t){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(){let e={};return this.each(((t,n)=>e[n]=t.get())),e}set(e){for(let t in e){let n=e[t];$b.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(p_(e)),this}start(e){let{queue:t}=this;return e?t=Zb(e).map(p_):this.queue=[],this._flush?this._flush(this,t):(w_(this,t),__(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){let n=this.springs;Wb(Zb(t),(t=>n[t].stop(!!e)))}else Xv(this._state,this._lastAsyncId),this.each((t=>t.stop(!!e)));return this}pause(e){if($b.und(e))this.start({pause:!0});else{let t=this.springs;Wb(Zb(e),(e=>t[e].pause()))}return this}resume(e){if($b.und(e))this.start({pause:!1});else{let t=this.springs;Wb(Zb(e),(e=>t[e].resume()))}return this}each(e){Kb(this.springs,e)}_onFrame(){let{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,qb(e,(([e,t])=>{t.value=this.get(),e(t,this,this._item)})));let i=!o&&this._started,s=r||i&&n.size?this.get():null;r&&t.size&&qb(t,(([e,t])=>{t.value=s,e(t,this,this._item)})),i&&(this._started=!1,qb(n,(([e,t])=>{t.value=s,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)}wb.onFrame(this._onFrame)}};function __(e,t){return Promise.all(t.map((t=>x_(e,t)))).then((t=>Wv(e,t)))}async function x_(e,t,n){let{keys:o,to:r,from:i,loop:s,onRest:l,onResolve:a}=t,c=$b.obj(t.default)&&t.default;s&&(t.loop=!1),!1===r&&(t.to=null),!1===i&&(t.from=null);let u=$b.arr(r)||$b.fun(r)?r:void 0;u?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):Wb(b_,(n=>{let o=t[n];if($b.fun(o)){let r=e._events[n];t[n]=({finished:e,cancelled:t})=>{let 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])}}));let d=e._state;t.pause===!d.paused?(d.paused=t.pause,Qb(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);let p=(o||Object.keys(e.springs)).map((n=>e.springs[n].start(t))),h=!0===t.cancel||!0===Pv(t,"cancel");(u||h&&d.asyncId)&&p.push(Uv(++e._lastAsyncId,{props:t,state:d,actions:{pause:Gb,resume:Gb,start(t,n){h?(Xv(d,e._lastAsyncId),n(qv(e))):(t.onRest=l,n(Yv(u,t,d,e)))}}})),d.paused&&await new Promise((e=>{d.resumeQueue.add(e)}));let g=Wv(e,await Promise.all(p));if(s&&g.finished&&(!n||!g.noop)){let n=d_(t,s,r);if(n)return w_(e,[n]),x_(e,n,!0)}return a&&wb.batchedUpdates((()=>a(g,e,e.item))),g}function y_(e,t){let n=new c_;return n.key=e,t&&Kk(n,t),n}function S_(e,t,n){t.keys&&Wb(t.keys,(o=>{(e[o]||(e[o]=n(o)))._prepareNode(t)}))}function w_(e,t){Wb(t,(t=>{S_(e.springs,t,(t=>y_(t,e)))}))}var C_=({children:e,...t})=>{let n=(0,Pa.useContext)(B_),o=t.pause||!!n.pause,r=t.immediate||!!n.immediate;t=function(e,t){let[n]=(0,Pa.useState)((()=>({inputs:t,result:e()}))),o=(0,Pa.useRef)(),r=o.current,i=r;return i?Boolean(t&&i.inputs&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,i.inputs))||(i={inputs:t,result:e()}):i=n,(0,Pa.useEffect)((()=>{o.current=i,r==n&&(n.inputs=n.result=void 0)}),[i]),i.result}((()=>({pause:o,immediate:r})),[o,r]);let{Provider:i}=B_;return Pa.createElement(i,{value:t},e)},B_=function(e,t){return Object.assign(e,Pa.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}(C_,{});C_.Provider=B_.Provider,C_.Consumer=B_.Consumer;var I_=class extends n_{constructor(e,t){super(),this.source=e,this.calc=Mk(...t);let n=this._get(),o=wv(n);mv(this,o.create(n))}key;idle=!0;calc;_active=new Set;advance(e){let t=this._get();Ub(t,this.get())||(gv(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&E_(this._active)&&T_(this)}_get(){let e=$b.arr(this.source)?this.source.map(Hk):Zb(Hk(this.source));return this.calc(...e)}_start(){this.idle&&!E_(this._active)&&(this.idle=!1,Wb(fv(this),(e=>{e.done=!1})),Hb.skipAnimation?(wb.batchedUpdates((()=>this.advance())),T_(this)):ak.start(this))}_attach(){let e=1;Wb(Zb(this.source),(t=>{Fk(t)&&Kk(t,this),e_(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))})),this.priority=e,this._start()}_detach(){Wb(Zb(this.source),(e=>{Fk(e)&&Zk(e,this)})),this._active.clear(),T_(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=Zb(this.source).reduce(((e,t)=>Math.max(e,(e_(t)?t.priority:0)+1)),0))}};function j_(e){return!1!==e.idle}function E_(e){return!e.size||Array.from(e).every(j_)}function T_(e){e.idle||(e.idle=!0,Wb(fv(e),(e=>{e.done=!0})),$k(e,{type:"idle",parent:e}))}Hb.assign({createStringInterpolator:iv,to:(e,t)=>new I_(e,t)});ak.advance;const M_=window.ReactDOM;var P_=/^--/;function R_(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||P_.test(e)||L_.hasOwnProperty(e)&&L_[e]?(""+t).trim():t+"px"}var N_={};var L_={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},A_=["Webkit","Ms","Moz","O"];L_=Object.keys(L_).reduce(((e,t)=>(A_.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),L_);var D_=/^(matrix|translate|scale|rotate|skew)/,O_=/^(translate)/,z_=/^(rotate|skew)/,V_=(e,t)=>$b.num(e)&&0!==e?e+t:e,F_=(e,t)=>$b.arr(e)?e.every((e=>F_(e,t))):$b.num(e)?e===t:parseFloat(e)===t,H_=class extends xv{constructor({x:e,y:t,z:n,...o}){let r=[],i=[];(e||t||n)&&(r.push([e||0,t||0,n||0]),i.push((e=>[`translate3d(${e.map((e=>V_(e,"px"))).join(",")})`,F_(e,0)]))),Kb(o,((e,t)=>{if("transform"===t)r.push([e||""]),i.push((e=>[e,""===e]));else if(D_.test(t)){if(delete o[t],$b.und(e))return;let n=O_.test(t)?"px":z_.test(t)?"deg":"";r.push(Zb(e)),i.push("rotate3d"===t?([e,t,o,r])=>[`rotate3d(${e},${t},${o},${V_(r,n)})`,F_(r,0)]:e=>[`${t}(${e.map((e=>V_(e,n))).join(",")})`,F_(e,t.startsWith("scale")?1:0)])}})),r.length&&(o.transform=new G_(r,i)),super(o)}},G_=class extends Uk{constructor(e,t){super(),this.inputs=e,this.transforms=t}_value=null;get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return Wb(this.inputs,((n,o)=>{let r=Hk(n[0]),[i,s]=this.transforms[o]($b.arr(r)?r:n.map(Hk));e+=" "+i,t=t&&s})),t?"none":e}observerAdded(e){1==e&&Wb(this.inputs,(e=>Wb(e,(e=>Fk(e)&&Kk(e,this)))))}observerRemoved(e){0==e&&Wb(this.inputs,(e=>Wb(e,(e=>Fk(e)&&Zk(e,this)))))}eventObserved(e){"change"==e.type&&(this._value=null),$k(this,e)}};Hb.assign({batchedUpdates:M_.unstable_batchedUpdates,createStringInterpolator:iv,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 $_=((e,{applyAnimatedValues:t=(()=>!1),createAnimatedStyle:n=(e=>new xv(e)),getComponentProps:o=(e=>e)}={})=>{let r={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:o},i=e=>{let t=jv(e)||"Anonymous";return(e=$b.str(e)?i[e]||(i[e]=Cv(e,r)):e[Iv]||(e[Iv]=Cv(e,r))).displayName=`Animated(${t})`,e};return Kb(e,((t,n)=>{$b.arr(e)&&(n=jv(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;let n="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName,{style:o,children:r,scrollTop:i,scrollLeft:s,viewBox:l,...a}=t,c=Object.values(a),u=Object.keys(a).map((t=>n||e.hasAttribute(t)?t:N_[t]||(N_[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())))));void 0!==r&&(e.textContent=r);for(let t in o)if(o.hasOwnProperty(t)){let n=R_(t,o[t]);P_.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!==s&&(e.scrollLeft=s),void 0!==l&&e.setAttribute("viewBox",l)},createAnimatedStyle:e=>new H_(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),U_=$_.animated;function W_(e){return{top:e.offsetTop,left:e.offsetLeft}}const K_=function({triggerAnimationOnChange:e,clientId:t}){const n=(0,a.useRef)(),{isTyping:o,getGlobalBlockCount:r,isBlockSelected:i,isFirstMultiSelectedBlock:s,isBlockMultiSelected:l,isAncestorMultiSelected:u}=(0,c.useSelect)(li),{previous:d,prevRect:p}=(0,a.useMemo)((()=>({previous:n.current&&W_(n.current),prevRect:n.current&&n.current.getBoundingClientRect()})),[e]);return(0,a.useLayoutEffect)((()=>{if(!d||!n.current)return;const e=(0,ba.getScrollContainer)(n.current),a=i(t),c=a||s(t);function h(){if(c&&p){const t=n.current.getBoundingClientRect().top-p.top;t&&(e.scrollTop+=t)}}if(window.matchMedia("(prefers-reduced-motion: reduce)").matches||o()||r()>200)return void h();const g=a||l(t)||u(t)?"1":"",m=new v_({x:0,y:0,config:{mass:5,tension:2e3,friction:200},onChange({value:e}){if(!n.current)return;let{x:t,y:o}=e;t=Math.round(t),o=Math.round(o);const r=0===t&&0===o;n.current.style.transformOrigin="center center",n.current.style.transform=r?null:`translate3d(${t}px,${o}px,0)`,n.current.style.zIndex=g,h()}});n.current.style.transform=void 0;const f=W_(n.current),b=Math.round(d.left-f.left),k=Math.round(d.top-f.top);return m.start({x:0,y:0,from:{x:b,y:k}}),()=>{m.stop(),m.set({x:0,y:0})}}),[d,p,t,o,r,i,s,l,u]),n};function Z_({clientId:e,initialPosition:t}){const n=(0,a.useRef)(),{isBlockSelected:o,isMultiSelecting:r,__unstableGetEditorMode:i}=(0,c.useSelect)(li);return(0,a.useEffect)((()=>{if(!o(e)||r()||"zoom-out"===i())return;if(null==t)return;if(!n.current)return;const{ownerDocument:s}=n.current;if($g(n.current,s.activeElement))return;const l=ba.focus.tabbable.find(n.current).filter((e=>(0,ba.isTextField)(e))),a=-1===t,c=l[a?l.length-1:0]||n.current;if($g(n.current,c)){if(!n.current.getAttribute("contenteditable")){const e=ba.focus.tabbable.findNext(n.current);if(e&&$g(n.current,e)&&(0,ba.isFormElement)(e))return void e.focus()}(0,ba.placeCaretAtHorizontalEdge)(c,a)}else n.current.focus()}),[t,e]),n}function q_({clientId:e}){const{hoverBlock:t}=(0,c.useDispatch)(li);function n(n){if(n.defaultPrevented)return;const o="mouseover"===n.type?"add":"remove";n.preventDefault(),n.currentTarget.classList[o]("is-hovered"),t("add"===o?e:null)}return(0,u.useRefEffect)((e=>(e.addEventListener("mouseout",n),e.addEventListener("mouseover",n),()=>{e.removeEventListener("mouseout",n),e.removeEventListener("mouseover",n),e.classList.remove("is-hovered"),t(null)})),[])}function Y_(e){const{isBlockSelected:t}=(0,c.useSelect)(li),{selectBlock:n,selectionChange:o}=(0,c.useDispatch)(li);return(0,u.useRefEffect)((r=>{function i(i){r.parentElement.closest('[contenteditable="true"]')||(t(e)?i.target.isContentEditable||o(e):$g(r,i.target)&&n(e))}return r.addEventListener("focusin",i),()=>{r.removeEventListener("focusin",i)}}),[t,n])}function X_({clientId:e,isSelected:t}){const{getBlockRootClientId:n,getBlockIndex:o,isZoomOut:r,__unstableGetEditorMode:i}=te((0,c.useSelect)(li)),{insertAfterBlock:s,removeBlock:l,__unstableSetEditorMode:a,resetZoomLevel:d}=te((0,c.useDispatch)(li));return(0,u.useRefEffect)((n=>{if(t)return n.addEventListener("keydown",o),n.addEventListener("dragstart",c),()=>{n.removeEventListener("keydown",o),n.removeEventListener("dragstart",c)};function o(t){const{keyCode:o,target:c}=t;o!==va.ENTER&&o!==va.BACKSPACE&&o!==va.DELETE||c!==n||(0,ba.isTextField)(c)||(t.preventDefault(),o===va.ENTER&&"zoom-out"===i()&&r()?(a("edit"),d()):o===va.ENTER?s(e):l(e))}function c(e){e.preventDefault()}}),[e,t,n,o,s,l,i,a,r,d])}function Q_(e){const{isNavigationMode:t,isBlockSelected:n}=(0,c.useSelect)(li),{setNavigationMode:o,selectBlock:r}=(0,c.useDispatch)(li);return(0,u.useRefEffect)((i=>{function s(i){t()&&!i.defaultPrevented&&(i.preventDefault(),n(e)?o(!1):r(e))}return i.addEventListener("mousedown",s),()=>{i.removeEventListener("mousedown",s)}}),[e,t,n,o])}function J_(){const{getSettings:e,isZoomOut:t,__unstableGetEditorMode:n}=te((0,c.useSelect)(li)),{__unstableSetEditorMode:o,resetZoomLevel:r}=te((0,c.useDispatch)(li));return(0,u.useRefEffect)((i=>{function s(i){if("zoom-out"===n()&&t()&&!i.defaultPrevented){i.preventDefault();const{__experimentalSetIsInserterOpened:t}=e();"function"==typeof t&&t(!1),o("edit"),r()}}return i.addEventListener("dblclick",s),()=>{i.removeEventListener("dblclick",s)}}),[e,o,n,t,r])}function ex(){const e=(0,a.useContext)(ey);return(0,u.useRefEffect)((t=>{if(e)return e.observe(t),()=>{e.unobserve(t)}}),[e])}function tx({isSelected:e}){const t=(0,u.useReducedMotion)();return(0,u.useRefEffect)((n=>{if(e){const{ownerDocument:e}=n,{defaultView:o}=e;if(!o.IntersectionObserver)return;const r=new o.IntersectionObserver((e=>{e[0].isIntersecting||n.scrollIntoView({behavior:t?"instant":"smooth"}),r.disconnect()}));return r.observe(n),()=>{r.disconnect()}}}),[e])}function nx({clientId:e="",isEnabled:t=!0}={}){const{getEnabledClientIdsTree:n}=te((0,c.useSelect)(li));return(0,u.useRefEffect)((o=>{if(!t)return;const r=t=>{(t.target===o||t.target.classList.contains("is-root-container"))&&(t.defaultPrevented||(t.preventDefault(),n(e).forEach((({clientId:e})=>{const t=o.querySelector(`[data-block="${e}"]`);t&&(t.classList.remove("has-editable-outline"),t.offsetWidth,t.classList.add("has-editable-outline"))}))))};return o.addEventListener("click",r),()=>o.removeEventListener("click",r)}),[t])}const ox={"core/paragraph":["content"],"core/heading":["content"],"core/image":["id","url","title","alt"],"core/button":["url","text","linkTarget","rel"]},rx="__default";function ix(e){return e in ox}function sx(e,t){return ix(e)&&ox[e].includes(t)}const lx=(0,u.createHigherOrderComponent)((e=>t=>{const n=(0,c.useRegistry)(),o=(0,a.useContext)(ob),r=(0,c.useSelect)((e=>te(e(l.store)).getAllBlockBindingsSources())),{name:i,clientId:s,context:u,setAttributes:d}=t,p=(0,a.useMemo)((()=>function(e,t){if("core/pattern-overrides"===t?.[rx]?.source){const n=ox[e],o={};for(const e of n){const n=t[e]?t[e]:{source:"core/pattern-overrides"};o[e]=n}return o}return t}(i,t.attributes.metadata?.bindings)),[t.attributes.metadata?.bindings,i]),h={},g=(0,c.useSelect)((e=>{if(!p)return;const t={},n=new Map;for(const[e,t]of Object.entries(p)){const{source:s,args:l}=t,a=r[s];if(a&&sx(i,e)){for(const e of a.usesContext||[])h[e]=o[e];n.set(a,{...n.get(a),[e]:{args:l}})}}if(n.size)for(const[o,r]of n){let n={};o.getValues?n=o.getValues({select:e,context:h,clientId:s,bindings:r}):Object.keys(r).forEach((e=>{n[e]=o.label}));for(const[e,o]of Object.entries(n))"url"!==e||o&&ic(o)?t[e]=o:t[e]=null}return t}),[p,i,s,h,r]),m=!!h["pattern/overrides"],f="core/pattern-overrides"===t.attributes.metadata?.bindings?.[rx]?.source,b=(0,a.useCallback)((e=>{n.batch((()=>{if(!p)return void d(e);const t={...e},o=new Map;for(const[e,n]of Object.entries(t)){if(!p[e]||!sx(i,e))continue;const s=p[e],l=r[s?.source];l?.setValues&&(o.set(l,{...o.get(l),[e]:{args:s.args,newValue:n}}),delete t[e])}if(o.size)for(const[e,t]of o)e.setValues({select:n.select,dispatch:n.dispatch,context:h,clientId:s,bindings:t});f&&m||!Object.keys(t).length||(f&&(delete t?.caption,delete t?.href),d(t))}))}),[n,p,i,s,h,d,r,f,m]);return(0,$.jsx)($.Fragment,{children:(0,$.jsx)(e,{...t,attributes:{...t.attributes,...g},setAttributes:b,context:{...u,...h}})})}),"withBlockBindingSupport");function ax(e={},{__unstableIsHtml:t}={}){const{clientId:n,className:o,wrapperProps:r={},isAligned:i,index:s,mode:l,name:c,blockApiVersion:d,blockTitle:p,isSelected:h,isSubtreeDisabled:g,hasOverlay:f,initialPosition:b,blockEditingMode:k,isHighlighted:v,isMultiSelected:x,isPartiallySelected:y,isReusable:S,isDragging:w,hasChildSelected:B,isBlockMovingMode:I,canInsertMovingBlock:j,isEditingDisabled:E,hasEditableOutline:T,isTemporarilyEditingAsBlocks:M,defaultClassName:P,templateLock:R}=(0,a.useContext)(ub),N=(0,C.sprintf)((0,C.__)("Block: %s"),p),L="html"!==l||t?"":"-visual",A=(0,u.useMergeRefs)([e.ref,Z_({clientId:n,initialPosition:b}),fp(n),Y_(n),X_({clientId:n,isSelected:h}),Q_(n),J_(),q_({clientId:n}),ex(),K_({triggerAnimationOnChange:s,clientId:n}),(0,u.useDisabled)({isDisabled:!f}),nx({clientId:n,isEnabled:"core/block"===c||"contentOnly"===R}),tx({isSelected:h})]),D=_(),O=!!D[m]&&ix(c)?{"--wp-admin-theme-color":"var(--wp-block-synced-color)","--wp-admin-theme-color--rgb":"var(--wp-block-synced-color--rgb)"}:{};d<2&&D.clientId;let z=!1;return"-"!==r?.style?.marginTop?.charAt(0)&&"-"!==r?.style?.marginBottom?.charAt(0)&&"-"!==r?.style?.marginLeft?.charAt(0)&&"-"!==r?.style?.marginRight?.charAt(0)||(z=!0),{tabIndex:"disabled"===k?-1:0,...r,...e,ref:A,id:`block-${n}${L}`,role:"document","aria-label":N,"data-block":n,"data-type":c,"data-title":p,inert:g?"true":void 0,className:Zi("block-editor-block-list__block",{"wp-block":!i,"has-block-overlay":f,"is-selected":h,"is-highlighted":v,"is-multi-selected":x,"is-partially-selected":y,"is-reusable":S,"is-dragging":w,"has-child-selected":B,"is-block-moving-mode":I,"can-insert-moving-block":j,"is-editing-disabled":E,"has-editable-outline":T,"has-negative-margin":z,"is-content-locked-temporarily-editing-as-blocks":M},o,e.className,r.className,P),style:{...r.style,...e.style,...O}}}(0,d.addFilter)("blocks.registerBlockType","core/editor/custom-sources-backwards-compatibility/shim-attribute-source",(function(e,t){return ix(t)?{...e,edit:lx(e.edit)}:e})),ax.save=l.__unstableGetBlockProps;const{isUnmodifiedBlockContent:cx}=te(l.privateApis);function ux({children:e,isHtml:t,...n}){return(0,$.jsx)("div",{...ax(n,{__unstableIsHtml:t}),children:e})}function dx({block:{__unstableBlockSource:e},mode:t,isLocked:n,canRemove:o,clientId:r,isSelected:i,isSelectionEnabled:s,className:u,__unstableLayoutClassNames:d,name:p,isValid:h,attributes:g,wrapperProps:m,setAttributes:f,onReplace:b,onInsertBlocksAfter:k,onMerge:v,toggleSelection:_}){var x;const{mayDisplayControls:y,mayDisplayParentControls:S,themeSupportsLayout:w,...C}=(0,a.useContext)(ub),{removeBlock:B}=(0,c.useDispatch)(li),I=(0,a.useCallback)((()=>B(r)),[r,B]),j=Tl()||{};let E=(0,$.jsx)(db,{name:p,isSelected:i,attributes:g,setAttributes:f,insertBlocksAfter:n?void 0:k,onReplace:o?b:void 0,onRemove:o?I:void 0,mergeBlocks:o?v:void 0,clientId:r,isSelectionEnabled:s,toggleSelection:_,__unstableLayoutClassNames:d,__unstableParentLayout:Object.keys(j).length?j:void 0,mayDisplayControls:y,mayDisplayParentControls:S,blockEditingMode:C.blockEditingMode,isPreviewMode:C.isPreviewMode});const T=(0,l.getBlockType)(p);T?.getEditWrapperProps&&(m=function(e,t){const n={...e,...t};return e?.hasOwnProperty("className")&&t?.hasOwnProperty("className")&&(n.className=Zi(e.className,t.className)),e?.hasOwnProperty("style")&&t?.hasOwnProperty("style")&&(n.style={...e.style,...t.style}),n}(m,T.getEditWrapperProps(g)));const M=m&&!!m["data-align"]&&!w,P=u?.includes("is-position-sticky");let R;if(M&&(E=(0,$.jsx)("div",{className:Zi("wp-block",P&&u),"data-align":m["data-align"],children:E})),h)R="html"===t?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)("div",{style:{display:"none"},children:E}),(0,$.jsx)(ux,{isHtml:!0,children:(0,$.jsx)(yb,{clientId:r})})]}):T?.apiVersion>1?E:(0,$.jsx)(ux,{children:E});else{const t=e?(0,l.serializeRawBlock)(e):(0,l.getSaveContent)(T,g);R=(0,$.jsxs)(ux,{className:"has-warning",children:[(0,$.jsx)(fb,{clientId:r}),(0,$.jsx)(a.RawHTML,{children:(0,ba.safeHTML)(t)})]})}const{"data-align":N,...L}=null!==(x=m)&&void 0!==x?x:{},A={...L,className:Zi(L.className,N&&w&&`align${N}`,!(N&&P)&&u)};return(0,$.jsx)(ub.Provider,{value:{wrapperProps:A,isAligned:M,...C},children:(0,$.jsx)(_b,{fallback:(0,$.jsx)(ux,{className:"has-warning",children:(0,$.jsx)(kb,{})}),children:R})})}const px=(0,c.withDispatch)(((e,t,n)=>{const{updateBlockAttributes:o,insertBlocks:r,mergeBlocks:i,replaceBlocks:s,toggleSelection:a,__unstableMarkLastChangeAsPersistent:c,moveBlocksToPosition:u,removeBlock:d,selectBlock:p}=e(li);return{setAttributes(e){const{getMultiSelectedBlockClientIds:r}=n.select(li),i=r(),{clientId:s}=t,l=i.length?i:[s];o(l,e)},onInsertBlocks(e,n){const{rootClientId:o}=t;r(e,n,o)},onInsertBlocksAfter(e){const{clientId:o,rootClientId:i}=t,{getBlockIndex:s}=n.select(li),l=s(o);r(e,l+1,i)},onMerge(e){const{clientId:o,rootClientId:a}=t,{getPreviousBlockClientId:c,getNextBlockClientId:h,getBlock:g,getBlockAttributes:m,getBlockName:f,getBlockOrder:b,getBlockIndex:k,getBlockRootClientId:v,canInsertBlockType:_}=n.select(li);function x(){const e=g(o),t=(0,l.getDefaultBlockName)();if(f(o)!==t){const n=(0,l.switchToBlockType)(e,t);n&&n.length&&s(o,n)}else if((0,l.isUnmodifiedDefaultBlock)(e)){const e=h(o);e&&n.batch((()=>{d(o),p(e)}))}}function y(e,t=!0){const i=v(e),a=b(e),[c]=a;1===a.length&&(0,l.isUnmodifiedBlock)(g(c))?d(e):n.batch((()=>{const n=g(c),a=cx(n),m=(0,l.getDefaultBlockName)(),f=(0,l.switchToBlockType)(n,m),v=!!f?.length&&f.every((t=>_(t.name,e)));if(a&&v)s(c,f,t);else if(a&&n.name===m){d(c);const e=h(o);e&&p(e)}else if(_(n.name,i))u([c],e,i,k(e));else{const n=!!f?.length&&f.every((e=>_(e.name,i)));n?(r(f,k(e),i,t),d(c,!1)):x()}!b(e).length&&(0,l.isUnmodifiedBlock)(g(e))&&d(e,!1)}))}if(e){if(a){const e=h(a);if(e){if(f(a)!==f(e))return void i(a,e);{const t=m(a),o=m(e);if(Object.keys(t).every((e=>t[e]===o[e])))return void n.batch((()=>{u(b(e),e,a),d(e,!1)}))}}}const e=h(o);if(!e)return;b(e).length?y(e,!1):i(o,e)}else{const e=c(o);if(e)i(e,o);else if(a){const e=c(a);if(e&&f(a)===f(e)){const t=m(a),o=m(e);if(Object.keys(t).every((e=>t[e]===o[e])))return void n.batch((()=>{u(b(a),a,e),d(a,!1)}))}y(a)}else x()}},onReplace(e,n,o){e.length&&!(0,l.isUnmodifiedDefaultBlock)(e[e.length-1])&&c();const r=1===e?.length&&Array.isArray(e[0])?e[0]:e;s([t.clientId],r,n,o)},toggleSelection(e){a(e)}}}));dx=(0,u.compose)(px,(0,os.withFilters)("editor.BlockListBlock"))(dx);const hx=(0,a.memo)((function(e){const{clientId:t,rootClientId:n}=e,o=(0,c.useSelect)((e=>{const{isBlockSelected:o,getBlockMode:r,isSelectionEnabled:i,getTemplateLock:s,getBlockWithoutAttributes:a,getBlockAttributes:c,canRemoveBlock:u,canMoveBlock:d,getSettings:p,getTemporarilyEditingAsBlocks:h,getBlockEditingMode:g,getBlockName:m,isFirstMultiSelectedBlock:f,getMultiSelectedBlockClientIds:b,hasSelectedInnerBlock:k,getBlocksByName:v,getBlockIndex:_,isBlockMultiSelected:x,isBlockSubtreeDisabled:y,isBlockHighlighted:S,__unstableIsFullySelected:w,__unstableSelectionHasUnmergeableBlock:C,isBlockBeingDragged:B,isDragging:I,hasBlockMovingClientId:j,canInsertBlockType:E,__unstableHasActiveBlockOverlayActive:T,__unstableGetEditorMode:M,getSelectedBlocksInitialCaretPosition:P}=te(e(li)),R=a(t);if(!R)return;const{hasBlockSupport:N,getActiveBlockVariation:L}=e(l.store),A=c(t),{name:D,isValid:O}=R,z=(0,l.getBlockType)(D),{supportsLayout:V,__unstableIsPreviewMode:F}=p(),H=z?.apiVersion>1,G={isPreviewMode:F,blockWithoutAttributes:R,name:D,attributes:A,isValid:O,themeSupportsLayout:V,index:_(t),isReusable:(0,l.isReusableBlock)(z),className:H?A.className:void 0,defaultClassName:H?(0,l.getBlockDefaultClassName)(D):void 0,blockTitle:z?.title};if(F)return G;const $=o(t),U=u(t),W=d(t),K=L(D,A),Z=x(t),q=k(t,!0),Y=j(),X=g(t),Q=(0,l.hasBlockSupport)(D,"multiple",!0)?[]:v(D),J=Q.length&&Q[0]!==t,ee=M();return{...G,mode:r(t),isSelectionEnabled:i(),isLocked:!!s(n),templateLock:s(t),canRemove:U,canMove:W,isSelected:$,isTemporarilyEditingAsBlocks:h()===t,blockEditingMode:X,mayDisplayControls:$||f(t)&&b().every((e=>m(e)===D)),mayDisplayParentControls:N(m(t),"__experimentalExposeControlsToChildren",!1)&&k(t),blockApiVersion:z?.apiVersion||1,blockTitle:K?.title||z?.title,isSubtreeDisabled:"disabled"===X&&y(t),hasOverlay:T(t)&&!I(),initialPosition:!$||"edit"!==ee&&"zoom-out"!==ee?void 0:P(),isHighlighted:S(t),isMultiSelected:Z,isPartiallySelected:Z&&!w()&&!C(),isDragging:B(t),hasChildSelected:q,isBlockMovingMode:!!Y,canInsertMovingBlock:Y&&E(m(Y),n),isEditingDisabled:"disabled"===X,hasEditableOutline:"disabled"!==X&&"disabled"===g(n),originalBlockClientId:!!J&&Q[0]}}),[t,n]),{isPreviewMode:r,mode:i="visual",isSelectionEnabled:s=!1,isLocked:u=!1,canRemove:d=!1,canMove:p=!1,blockWithoutAttributes:h,name:g,attributes:m,isValid:f,isSelected:b=!1,themeSupportsLayout:k,isTemporarilyEditingAsBlocks:v,blockEditingMode:_,mayDisplayControls:x,mayDisplayParentControls:y,index:S,blockApiVersion:w,blockTitle:C,isSubtreeDisabled:B,hasOverlay:I,initialPosition:j,isHighlighted:E,isMultiSelected:T,isPartiallySelected:M,isReusable:P,isDragging:R,hasChildSelected:N,isBlockMovingMode:L,canInsertMovingBlock:A,templateLock:D,isEditingDisabled:O,hasEditableOutline:z,className:V,defaultClassName:F,originalBlockClientId:H}=o,G=(0,a.useMemo)((()=>({...h,attributes:m})),[h,m]);if(!o)return null;const U={isPreviewMode:r,clientId:t,className:V,index:S,mode:i,name:g,blockApiVersion:w,blockTitle:C,isSelected:b,isSubtreeDisabled:B,hasOverlay:I,initialPosition:j,blockEditingMode:_,isHighlighted:E,isMultiSelected:T,isPartiallySelected:M,isReusable:P,isDragging:R,hasChildSelected:N,isBlockMovingMode:L,canInsertMovingBlock:A,templateLock:D,isEditingDisabled:O,hasEditableOutline:z,isTemporarilyEditingAsBlocks:v,defaultClassName:F,mayDisplayControls:x,mayDisplayParentControls:y,originalBlockClientId:H,themeSupportsLayout:k};return(0,$.jsx)(ub.Provider,{value:U,children:(0,$.jsx)(dx,{...e,mode:i,isSelectionEnabled:s,isLocked:u,canRemove:d,canMove:p,block:G,name:g,attributes:m,isValid:f,isSelected:b})})})),gx=window.wp.htmlEntities,mx="\ufeff";function fx({rootClientId:e}){const{showPrompt:t,isLocked:n,placeholder:o,isManualGrid:r}=(0,c.useSelect)((t=>{const{getBlockCount:n,getSettings:o,getTemplateLock:r,getBlockAttributes:i}=t(li),s=!n(e),{bodyPlaceholder:l}=o();return{showPrompt:s,isLocked:!!r(e),placeholder:l,isManualGrid:i(e)?.layout?.isManualPlacement}}),[e]),{insertDefaultBlock:i,startTyping:s}=(0,c.useDispatch)(li);if(n||r)return null;const l=(0,gx.decodeEntities)(o)||(0,C.__)("Type / to choose a block"),a=()=>{i(void 0,e),s()};return(0,$.jsxs)("div",{"data-root-client-id":e||"",className:Zi("block-editor-default-block-appender",{"has-visible-prompt":t}),children:[(0,$.jsx)("p",{tabIndex:"0",role:"button","aria-label":(0,C.__)("Add default block"),className:"block-editor-default-block-appender__content",onKeyDown:e=>{va.ENTER!==e.keyCode&&va.SPACE!==e.keyCode||a()},onClick:()=>a(),onFocus:()=>{t&&a()},children:t?l:mx}),(0,$.jsx)(tC,{rootClientId:e,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0})]})}function bx({rootClientId:e}){return(0,c.useSelect)((t=>t(li).canInsertBlockType((0,l.getDefaultBlockName)(),e)))?(0,$.jsx)(fx,{rootClientId:e}):(0,$.jsx)(rC,{rootClientId:e,className:"block-list-appender__toggle"})}function kx({rootClientId:e,CustomAppender:t,className:n,tagName:o="div"}){const r=(0,c.useSelect)((t=>{const{getBlockInsertionPoint:n,isBlockInsertionPointVisible:o,getBlockCount:r}=t(li),i=n();return o()&&e===i?.rootClientId&&0===r(e)}),[e]);return(0,$.jsx)(o,{tabIndex:-1,className:Zi("block-list-appender wp-block",n,{"is-drag-over":r}),contentEditable:!1,"data-block":!0,children:t?(0,$.jsx)(t,{}):(0,$.jsx)(bx,{rootClientId:e})})}const vx=Number.MAX_SAFE_INTEGER;(0,a.createContext)();const _x=function({previousClientId:e,nextClientId:t,children:n,__unstablePopoverSlot:o,__unstableContentRef:r,operation:i="insert",nearestSide:s="right",...l}){const[u,d]=(0,a.useReducer)((e=>(e+1)%vx),0),{orientation:p,rootClientId:h,isVisible:g}=(0,c.useSelect)((n=>{const{getBlockListSettings:o,getBlockRootClientId:r,isBlockVisible:i}=n(li),s=r(null!=e?e:t);return{orientation:o(s)?.orientation||"vertical",rootClientId:s,isVisible:i(e)&&i(t)}}),[e,t]),m=vp(e),f=vp(t),b="vertical"===p,k=(0,a.useMemo)((()=>{if(u<0||!m&&!f||!g)return;return{contextElement:"group"===i?f||m:m||f,getBoundingClientRect(){const e=m?m.getBoundingClientRect():null,t=f?f.getBoundingClientRect():null;let n=0,o=0,r=0,l=0;if("group"===i){const i=t||e;o=i.top,r=0,l=i.bottom-i.top,n="left"===s?i.left-2:i.right-2}else b?(o=e?e.bottom:t.top,r=e?e.width:t.width,l=t&&e?t.top-e.bottom:0,n=e?e.left:t.left):(o=e?e.top:t.top,l=e?e.height:t.height,(0,C.isRTL)()?(n=t?t.right:e.left,r=e&&t?e.left-t.right:0):(n=e?e.right:t.left,r=e&&t?t.left-e.right:0));return new window.DOMRect(n,o,r,l)}}}),[m,f,u,b,g,i,s]),v=zg(r);return(0,a.useLayoutEffect)((()=>{if(!m)return;const e=new window.MutationObserver(d);return e.observe(m,{attributes:!0}),()=>{e.disconnect()}}),[m]),(0,a.useLayoutEffect)((()=>{if(!f)return;const e=new window.MutationObserver(d);return e.observe(f,{attributes:!0}),()=>{e.disconnect()}}),[f]),(0,a.useLayoutEffect)((()=>{if(m)return m.ownerDocument.defaultView.addEventListener("resize",d),()=>{m.ownerDocument.defaultView?.removeEventListener("resize",d)}}),[m]),(m||f)&&g?(0,$.jsx)(os.Popover,{ref:v,animate:!1,anchor:k,focusOnMount:!1,__unstableSlotName:o,inline:!o,...l,className:Zi("block-editor-block-popover","block-editor-block-popover__inbetween",l.className),resize:!1,flip:!1,placement:"overlay",variant:"unstyled",children:(0,$.jsx)("div",{className:"block-editor-block-popover__inbetween-container",children:n})},t+"--"+h):null},xx={hide:{opacity:0,scaleY:.75},show:{opacity:1,scaleY:1},exit:{opacity:0,scaleY:.9}};const yx=function({__unstablePopoverSlot:e,__unstableContentRef:t}){const{clientId:n}=(0,c.useSelect)((e=>{const{getBlockOrder:t,getBlockInsertionPoint:n}=e(li),o=n(),r=t(o.rootClientId);return r.length?{clientId:r[o.index]}:{}}),[]),o=(0,u.useReducedMotion)();return(0,$.jsx)(tm,{clientId:n,__unstablePopoverSlot:e,__unstableContentRef:t,className:"block-editor-block-popover__drop-zone",children:(0,$.jsx)(os.__unstableMotion.div,{"data-testid":"block-popover-drop-zone",initial:o?xx.show:xx.hide,animate:xx.show,exit:o?xx.show:xx.exit,className:"block-editor-block-popover__drop-zone-foreground"})})},Sx=(0,a.createContext)();function wx({__unstablePopoverSlot:e,__unstableContentRef:t,operation:n="insert",nearestSide:o="right"}){const{selectBlock:r,hideInsertionPoint:i}=(0,c.useDispatch)(li),s=(0,a.useContext)(Sx),l=(0,a.useRef)(),{orientation:d,previousClientId:p,nextClientId:h,rootClientId:g,isInserterShown:m,isDistractionFree:f,isNavigationMode:b,isZoomOutMode:k}=(0,c.useSelect)((e=>{const{getBlockOrder:t,getBlockListSettings:n,getBlockInsertionPoint:o,isBlockBeingDragged:r,getPreviousBlockClientId:i,getNextBlockClientId:s,getSettings:l,isNavigationMode:a,__unstableGetEditorMode:c}=e(li),u=o(),d=t(u.rootClientId);if(!d.length)return{};let p=d[u.index-1],h=d[u.index];for(;r(p);)p=i(p);for(;r(h);)h=s(h);const g=l();return{previousClientId:p,nextClientId:h,orientation:n(u.rootClientId)?.orientation||"vertical",rootClientId:u.rootClientId,isNavigationMode:a(),isDistractionFree:g.isDistractionFree,isInserterShown:u?.__unstableWithInserter,isZoomOutMode:"zoom-out"===c()}}),[]),{getBlockEditingMode:v}=(0,c.useSelect)(li),_=(0,u.useReducedMotion)();const x={start:{opacity:0,scale:0},rest:{opacity:1,scale:1,transition:{delay:m?.5:0,type:"tween"}},hover:{opacity:1,scale:1,transition:{delay:.5,type:"tween"}}},y={start:{scale:_?1:0},rest:{scale:1,transition:{delay:.4,type:"tween"}}};if(f&&!b)return null;if(k&&"insert"!==n)return null;const S=Zi("block-editor-block-list__insertion-point","horizontal"===d||"group"===n?"is-horizontal":"is-vertical");return(0,$.jsx)(_x,{previousClientId:p,nextClientId:h,__unstablePopoverSlot:e,__unstableContentRef:t,operation:n,nearestSide:o,children:(0,$.jsxs)(os.__unstableMotion.div,{layout:!_,initial:_?"rest":"start",animate:"rest",whileHover:"hover",whileTap:"pressed",exit:"start",ref:l,tabIndex:-1,onClick:function(e){e.target===l.current&&h&&"disabled"!==v(h)&&r(h,-1)},onFocus:function(e){e.target!==l.current&&(s.current=!0)},className:Zi(S,{"is-with-inserter":m}),onHoverEnd:function(e){e.target!==l.current||s.current||i()},children:[(0,$.jsx)(os.__unstableMotion.div,{variants:x,className:"block-editor-block-list__insertion-point-indicator","data-testid":"block-list-insertion-point-indicator"}),m&&(0,$.jsx)(os.__unstableMotion.div,{variants:y,className:Zi("block-editor-block-list__insertion-point-inserter"),children:(0,$.jsx)(tC,{position:"bottom center",clientId:h,rootClientId:g,__experimentalIsQuick:!0,onToggle:e=>{s.current=e},onSelectOrClose:()=>{s.current=!1}})})]})})}function Cx(e){const{insertionPoint:t,isVisible:n,isBlockListEmpty:o}=(0,c.useSelect)((e=>{const{getBlockInsertionPoint:t,isBlockInsertionPointVisible:n,getBlockCount:o}=e(li),r=t();return{insertionPoint:r,isVisible:n(),isBlockListEmpty:0===o(r?.rootClientId)}}),[]);return!n||o?null:"replace"===t.operation?(0,$.jsx)(yx,{...e},`${t.rootClientId}-${t.index}`):(0,$.jsx)(wx,{operation:t.operation,nearestSide:t.nearestSide,...e})}function Bx(){const e=(0,a.useContext)(Sx),t=(0,c.useSelect)((e=>e(li).getSettings().isDistractionFree||"zoom-out"===e(li).__unstableGetEditorMode()),[]),{getBlockListSettings:n,getBlockIndex:o,isMultiSelecting:r,getSelectedBlockClientIds:i,getSettings:s,getTemplateLock:l,__unstableIsWithinBlockOverlay:d,getBlockEditingMode:p,getBlockName:h,getBlockAttributes:g}=(0,c.useSelect)(li),{showInsertionPoint:m,hideInsertionPoint:f}=(0,c.useDispatch)(li);return(0,u.useRefEffect)((a=>{if(!t)return a.addEventListener("mousemove",c),()=>{a.removeEventListener("mousemove",c)};function c(t){if(void 0===e||e.current)return;if(t.target.nodeType===t.target.TEXT_NODE)return;if(r())return;if(!t.target.classList.contains("block-editor-block-list__layout"))return void 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(l(a)||"disabled"===p(a)||"core/block"===h(a)||a&&g(a).layout?.isManualPlacement)return;const c=n(a),u=c?.orientation||"vertical",b=!!c?.__experimentalCaptureToolbars,k=t.clientY,v=t.clientX;let _=Array.from(t.target.children).find((e=>{const t=e.getBoundingClientRect();return e.classList.contains("wp-block")&&"vertical"===u&&t.top>k||e.classList.contains("wp-block")&&"horizontal"===u&&((0,C.isRTL)()?t.right<v:t.left>v)}));if(!_)return void f();if(!_.id&&(_=_.firstElementChild,!_))return void f();const x=_.id.slice(6);if(!x||d(x))return;if(i().includes(x)&&"vertical"===u&&!b&&!s().hasFixedToolbar)return;const y=_.getBoundingClientRect();if("horizontal"===u&&(t.clientY>y.bottom||t.clientY<y.top)||"vertical"===u&&(t.clientX>y.right||t.clientX<y.left))return void f();const S=o(x);0!==S?m(a,S,{__unstableWithInserter:!0}):f()}}),[e,n,o,r,m,f,i,t])}function Ix(){const{getSettings:e,hasSelectedBlock:t,hasMultiSelection:n}=(0,c.useSelect)(li),{clearSelectedBlock:o}=(0,c.useDispatch)(li),{clearBlockSelection:r}=e();return(0,u.useRefEffect)((e=>{if(r)return e.addEventListener("mousedown",i),()=>{e.removeEventListener("mousedown",i)};function i(r){(t()||n())&&r.target===e&&o()}}),[t,n,o,r])}function jx(e){return(0,$.jsx)("div",{ref:Ix(),...e})}const Ex=new WeakMap;function Tx(e,t,n,o,r,i,s,l,u,d,p,h){const g=(0,c.useRegistry)(),m=function(e){const[t,n]=(0,a.useState)(e);return Ba()(t,e)||n(e),t}(n),f=(0,a.useMemo)((()=>o),o),b=void 0===u||"contentOnly"===t?t:u;(0,a.useLayoutEffect)((()=>{const t={allowedBlocks:m,prioritizedInserterBlocks:f,templateLock:b};if(void 0!==d&&(t.__experimentalCaptureToolbars=d),void 0!==p)t.orientation=p;else{const e=Bl(h?.type);t.orientation=e.getOrientation(h)}void 0!==s&&(y()("__experimentalDefaultBlock",{alternative:"defaultBlock",since:"6.3",version:"6.4"}),t.defaultBlock=s),void 0!==r&&(t.defaultBlock=r),void 0!==l&&(y()("__experimentalDirectInsert",{alternative:"directInsert",since:"6.3",version:"6.4"}),t.directInsert=l),void 0!==i&&(t.directInsert=i),void 0!==t.directInsert&&"boolean"!=typeof t.directInsert&&y()("Using `Function` as a `directInsert` argument",{alternative:"`boolean` values",since:"6.5"}),Ex.get(g)||Ex.set(g,{}),Ex.get(g)[e]=t,window.queueMicrotask((()=>{const e=Ex.get(g);if(Object.keys(e).length){const{updateBlockListSettings:t}=g.dispatch(li);t(e),Ex.set(g,{})}}))}),[e,m,f,b,r,i,s,l,d,p,h,g])}function Mx(e,t,n,o,r,i,s,a,c){return u=>{const{srcRootClientId:d,srcClientIds:p,type:h,blocks:g}=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}(u);if("inserter"===h){s();const e=g.map((e=>(0,l.cloneBlock)(e)));i(e,!0,null)}if("block"===h){const s=n(p[0]);if(d===e&&s===t)return;if(p.includes(e)||o(p).some((t=>t===e)))return;if("group"===a){const e=p.map((e=>c(e)));return void i(e,!0,null,p)}const l=d===e,u=p.length;r(p,d,l&&s<t?t-u:t)}}}function Px(e,t,n={}){const{operation:o="insert",nearestSide:r="right"}=n,{canInsertBlockType:i,getBlockIndex:s,getClientIdsOfDescendants:u,getBlockOrder:d,getBlocksByClientId:p,getSettings:h,getBlock:g}=(0,c.useSelect)(li),{getGroupingBlockName:m}=(0,c.useSelect)(l.store),{insertBlocks:f,moveBlocksToPosition:b,updateBlockAttributes:k,clearSelectedBlock:v,replaceBlocks:_,removeBlocks:x}=(0,c.useDispatch)(li),y=(0,c.useRegistry)(),S=(0,a.useCallback)(((n,s=!0,a=0,c=[])=>{Array.isArray(n)||(n=[n]);const u=d(e)[t];if("replace"===o)_(u,n,void 0,a);else if("group"===o){const t=g(u);"left"===r?n.push(t):n.unshift(t);const o=n.map((e=>(0,l.createBlock)(e.name,e.attributes,e.innerBlocks))),s=n.every((e=>"core/image"===e.name)),d=i("core/gallery",e),p=(0,l.createBlock)(s&&d?"core/gallery":m(),{layout:{type:"flex",flexWrap:s&&d?null:"nowrap"}},o);_([u,...c],p,void 0,a)}else f(n,t,e,s,a)}),[d,e,t,o,_,g,r,i,m,f]),w=(0,a.useCallback)(((n,r,i)=>{if("replace"===o){const o=p(n),r=d(e)[t];y.batch((()=>{x(n,!1),_(r,o,void 0,0)}))}else b(n,r,e,i)}),[o,d,p,b,y,x,_,t,e]),C=Mx(e,t,s,u,w,S,v,o,g),B=function(e,t,n,o,r){return i=>{if(!t().mediaUpload)return;const s=(0,l.findTransform)((0,l.getBlockTransforms)("from"),(t=>"files"===t.type&&o(t.blockName,e)&&t.isMatch(i)));if(s){const e=s.transform(i,n);r(e)}}}(e,h,k,i,S),I=function(e){return t=>{const n=(0,l.pasteHandler)({HTML:t,mode:"BLOCKS"});n.length&&e(n)}}(S);return e=>{const t=(0,ba.getFilesFromDataTransfer)(e.dataTransfer),n=e.dataTransfer.getData("text/html");n?I(n):t.length?B(t):C(e)}}function Rx(e,t,n=["top","bottom","left","right"]){let o,r;return n.forEach((n=>{const i=function(e,t,n){const o="top"===n||"bottom"===n,{x:r,y:i}=e,s=o?r:i,l=o?i:r,a=o?t.left:t.top,c=o?t.right:t.bottom,u=t[n];let d;return d=s>=a&&s<=c?s:s<c?a:c,Math.sqrt((s-d)**2+(l-u)**2)}(e,t,n);(void 0===o||i<o)&&(o=i,r=n)})),[o,r]}function Nx(e,t){return t.left<=e.x&&t.right>=e.x&&t.top<=e.y&&t.bottom>=e.y}const Lx=30,Ax=120,Dx=120;function Ox(e,t,n,o){let r=!0;if(t){const e=t?.map((({name:e})=>e));r=n.every((t=>e?.includes(t)))}const i=n.map((t=>e(t))).every((e=>{const[t]=e?.parent||[];return!t||t===o}));return r&&i}function zx(e,t){const{defaultView:n}=t;return!!(n&&e instanceof n.HTMLElement&&e.closest("[data-is-insertion-point]"))}function Vx({dropZoneElement:e,rootClientId:t="",parentClientId:n="",isDisabled:o=!1}={}){const r=(0,c.useRegistry)(),[i,s]=(0,a.useState)({index:null,operation:"insert"}),{getBlockType:d,getBlockVariations:p,getGroupingBlockName:h}=(0,c.useSelect)(l.store),{canInsertBlockType:g,getBlockListSettings:m,getBlocks:f,getBlockIndex:b,getDraggedBlockClientIds:k,getBlockNamesByClientId:v,getAllowedBlocks:_,isDragging:x,isGroupable:y,isZoomOutMode:S,getSectionRootClientId:w}=te((0,c.useSelect)(li)),{showInsertionPoint:B,hideInsertionPoint:I,startDragging:j,stopDragging:E}=te((0,c.useDispatch)(li)),T=Px("before"===i.operation||"after"===i.operation?n:t,i.index,{operation:i.operation,nearestSide:i.nearestSide}),M=(0,u.useThrottle)((0,a.useCallback)(((o,i)=>{x()||j();const a=_(t),c=v([t])[0],u=v(k());if(!Ox(d,a,u,c))return;const I=w();if(S()&&I!==t)return;const E=f(t);if(0===E.length)return void r.batch((()=>{s({index:0,operation:"insert"}),B(t,0,{operation:"insert"})}));const T=E.map((e=>{const t=e.clientId;return{isUnmodifiedDefaultBlock:(0,l.isUnmodifiedDefaultBlock)(e),getBoundingClientRect:()=>i.getElementById(`block-${t}`).getBoundingClientRect(),blockIndex:b(t),blockOrientation:m(t)?.orientation}})),M=function(e,t,n="vertical",o={}){const r="horizontal"===n?["left","right"]:["top","bottom"];let i=0,s="before",l=1/0,a=null,c="right";const{dropZoneElement:u,parentBlockOrientation:d,rootBlockIndex:p=0}=o;if(u&&"horizontal"!==d){const e=u.getBoundingClientRect(),[n,o]=Rx(t,e,["top","bottom"]);if(e.height>Ax&&n<Lx){if("top"===o)return[p,"before"];if("bottom"===o)return[p+1,"after"]}}const h=(0,C.isRTL)();if(u&&"horizontal"===d){const e=u.getBoundingClientRect(),[n,o]=Rx(t,e,["left","right"]);if(e.width>Dx&&n<Lx){if(h&&"right"===o||!h&&"left"===o)return[p,"before"];if(h&&"left"===o||!h&&"right"===o)return[p+1,"after"]}}e.forEach((({isUnmodifiedDefaultBlock:e,getBoundingClientRect:o,blockIndex:u,blockOrientation:d})=>{const p=o();let[g,m]=Rx(t,p,r);const[f,b]=Rx(t,p,["left","right"]),k=Nx(t,p);e&&k?g=0:"vertical"===n&&"horizontal"!==d&&(k&&f<Lx||!k&&function(e,t){return t.top<=e.y&&t.bottom>=e.y}(t,p))&&(a=u,c=b),g<l&&(s="bottom"===m||!h&&"right"===m||h&&"left"===m?"after":"before",l=g,i=u)}));const g=i+("after"===s?1:-1),m=!!e[i]?.isUnmodifiedDefaultBlock,f=!!e[g]?.isUnmodifiedDefaultBlock;if(null!==a)return[a,"group",c];if(!m&&!f)return["after"===s?i+1:i,"insert"];return[m?i:g,"replace"]}(T,{x:o.clientX,y:o.clientY},m(t)?.orientation,{dropZoneElement:e,parentBlockClientId:n,parentBlockOrientation:n?m(n)?.orientation:void 0,rootBlockIndex:b(t)}),[P,R,N]=M;if(!S()||"insert"===R){if("group"===R){const e=E[P],n=[e.name,...u].every((e=>"core/image"===e)),o=g("core/gallery",t),r=y([e.clientId,k()]),i=p(h(),"block"),s=i&&i.find((({name:e})=>"group-row"===e));if(n&&!o&&(!r||!s))return;if(!(n||r&&s))return}r.batch((()=>{s({index:P,operation:R,nearestSide:N});const e=["before","after"].includes(R)?n:t;B(e,P,{operation:R,nearestSide:N})}))}}),[x,_,t,v,k,d,w,S,f,m,e,n,b,r,j,B,g,y,p,h]),200);return(0,u.__experimentalUseDropZone)({dropZoneElement:e,isDisabled:o,onDrop:T,onDragOver(e){M(e,e.currentTarget.ownerDocument)},onDragLeave(e){const{ownerDocument:t}=e.currentTarget;zx(e.relatedTarget,t)||zx(e.target,t)||(M.cancel(),I())},onDragEnd(){M.cancel(),E(),I()}})}const Fx={};function Hx({children:e,clientId:t}){const n=function(e){return(0,c.useSelect)((t=>{const n=t(li).getBlock(e);if(!n)return;const o=t(l.store).getBlockType(n.name);return o&&0!==Object.keys(o.providesContext).length?Object.fromEntries(Object.entries(o.providesContext).map((([e,t])=>[e,n.attributes[t]]))):void 0}),[e])}(t);return(0,$.jsx)(nb,{value:n,children:e})}const Gx=(0,a.memo)(ay);function $x(e){const{clientId:t,allowedBlocks:n,prioritizedInserterBlocks:o,defaultBlock:r,directInsert:i,__experimentalDefaultBlock:s,__experimentalDirectInsert:u,template:d,templateLock:p,wrapperRef:h,templateInsertUpdatesSelection:g,__experimentalCaptureToolbars:m,__experimentalAppenderTagName:f,renderAppender:b,orientation:k,placeholder:v,layout:_,name:x,blockType:y,parentLock:S,defaultLayout:C}=e;Tx(t,S,n,o,r,i,s,u,p,m,k,_),function(e,t,n,o){const{getBlocks:r,getSelectedBlocksInitialCaretPosition:i,isBlockSelected:s}=(0,c.useSelect)(li),{replaceInnerBlocks:u,__unstableMarkNextChangeAsNotPersistent:d}=(0,c.useDispatch)(li),p=(0,a.useRef)(null);(0,a.useLayoutEffect)((()=>{let a=!1;return window.queueMicrotask((()=>{if(a)return;const c=r(e),h=0===c.length||"all"===n||"contentOnly"===n,g=!w()(t,p.current);if(!h||!g)return;p.current=t;const m=(0,l.synchronizeBlocksWithTemplate)(c,t);w()(m,c)||(d(),u(e,m,0===c.length&&o&&0!==m.length&&s(e),i()))})),()=>{a=!0}}),[t,n,e])}(t,d,p,g);const B=(0,l.getBlockSupport)(x,"layout")||(0,l.getBlockSupport)(x,"__experimentalLayout")||Fx,{allowSizingOnChildren:I=!1}=B,j=_||B,E=(0,a.useMemo)((()=>({...C,...j,...I&&{allowSizingOnChildren:!0}})),[C,j,I]),T=(0,$.jsx)(Gx,{rootClientId:t,renderAppender:b,__experimentalAppenderTagName:f,layout:E,wrapperRef:h,placeholder:v});return y?.providesContext&&0!==Object.keys(y.providesContext).length?(0,$.jsx)(Hx,{clientId:t,children:T}):T}function Ux(e){return qf(e),(0,$.jsx)($x,{...e})}const Wx=(0,a.forwardRef)(((e,t)=>{const n=Kx({ref:t},e);return(0,$.jsx)("div",{className:"block-editor-inner-blocks",children:(0,$.jsx)("div",{...n})})}));function Kx(e={},t={}){const{__unstableDisableLayoutClassNames:n,__unstableDisableDropZone:o,dropZoneElement:r}=t,{clientId:i,layout:s=null,__unstableLayoutClassNames:a=""}=_(),d=(0,c.useSelect)((e=>{const{getBlockName:t,isBlockSelected:n,hasSelectedInnerBlock:o,__unstableGetEditorMode:r,getTemplateLock:s,getBlockRootClientId:a,getBlockEditingMode:c,getBlockSettings:u,isDragging:d,getSectionRootClientId:p,isZoomOutMode:h}=te(e(li));if(!i){const e=p();return{isDropZoneDisabled:h()&&""!==e}}const{hasBlockSupport:g,getBlockType:m}=e(l.store),f=t(i),b="navigation"===r(),k=c(i),v=a(i),[_]=u(i,"layout");let x="disabled"===k;if("zoom-out"===r()){const e=p();x=i!==e}return{__experimentalCaptureToolbars:g(f,"__experimentalExposeControlsToChildren",!1),hasOverlay:"core/template"!==f&&!n(i)&&!o(i,!0)&&b&&!d(),name:f,blockType:m(f),parentLock:s(v),parentClientId:v,isDropZoneDisabled:x,defaultLayout:_}}),[i]),{__experimentalCaptureToolbars:p,hasOverlay:h,name:g,blockType:m,parentLock:f,parentClientId:b,isDropZoneDisabled:k,defaultLayout:v}=d,x=Vx({dropZoneElement:r,rootClientId:i,parentClientId:b}),y=(0,u.useMergeRefs)([e.ref,o||k||s?.isManualPlacement&&window.__experimentalEnableGridInteractivity?null:x]),S={__experimentalCaptureToolbars:p,layout:s,name:g,blockType:m,parentLock:f,defaultLayout:v,...t},w=S.value&&S.onChange?Ux:$x;return{...e,ref:y,className:Zi(e.className,"block-editor-block-list__layout",n?"":a,{"has-overlay":h}),children:i?(0,$.jsx)(w,{...S,clientId:i}):(0,$.jsx)(ay,{...t})}}Kx.save=l.__unstableGetInnerBlocksProps,Wx.DefaultBlockAppender=function(){const{clientId:e}=_();return(0,$.jsx)(fx,{rootClientId:e})},Wx.ButtonBlockAppender=function({showSeparator:e,isFloating:t,onAddBlock:n,isToggle:o}){const{clientId:r}=_();return(0,$.jsx)(rC,{className:Zi({"block-list-appender__toggle":o}),rootClientId:r,showSeparator:e,isFloating:t,onAddBlock:n})},Wx.Content=()=>Kx.save().children;const Zx=Wx,qx=new Set([va.UP,va.RIGHT,va.DOWN,va.LEFT,va.ENTER,va.BACKSPACE]);function Yx(){const e=(0,c.useSelect)((e=>e(li).isTyping()),[]),{stopTyping:t}=(0,c.useDispatch)(li);return(0,u.useRefEffect)((n=>{if(!e)return;const{ownerDocument:o}=n;let r,i;function s(e){const{clientX:n,clientY:o}=e;r&&i&&(r!==n||i!==o)&&t(),r=n,i=o}return o.addEventListener("mousemove",s),()=>{o.removeEventListener("mousemove",s)}}),[e,t])}function Xx(){const{isTyping:e}=(0,c.useSelect)((e=>{const{isTyping:t}=e(li);return{isTyping:t()}}),[]),{startTyping:t,stopTyping:n}=(0,c.useDispatch)(li),o=Yx(),r=(0,u.useRefEffect)((o=>{const{ownerDocument:r}=o,{defaultView:i}=r,s=i.getSelection();if(e){let a;function c(e){const{target:t}=e;a=i.setTimeout((()=>{(0,ba.isTextField)(t)||n()}))}function u(e){const{keyCode:t}=e;t!==va.ESCAPE&&t!==va.TAB||n()}function d(){s.isCollapsed||n()}return o.addEventListener("focus",c),o.addEventListener("keydown",u),r.addEventListener("selectionchange",d),()=>{i.clearTimeout(a),o.removeEventListener("focus",c),o.removeEventListener("keydown",u),r.removeEventListener("selectionchange",d)}}function l(e){const{type:n,target:r}=e;(0,ba.isTextField)(r)&&o.contains(r)&&("keydown"!==n||function(e){const{keyCode:t,shiftKey:n}=e;return!n&&qx.has(t)}(e))&&t()}return o.addEventListener("keypress",l),o.addEventListener("keydown",l),()=>{o.removeEventListener("keypress",l),o.removeEventListener("keydown",l)}}),[e,t,n]);return(0,u.useMergeRefs)([o,r])}const Qx=function({children:e}){return(0,$.jsx)("div",{ref:Xx(),children:e})};function Jx({clientId:e,rootClientId:t="",position:n="top"}){const[o,r]=(0,a.useState)(!1),{sectionRootClientId:i,sectionClientIds:s,blockInsertionPoint:l,blockInsertionPointVisible:d}=(0,c.useSelect)((e=>{const{getBlockInsertionPoint:t,getBlockOrder:n,isBlockInsertionPointVisible:o,getSectionRootClientId:r}=te(e(li)),i=r();return{sectionRootClientId:i,sectionClientIds:n(i),blockOrder:n(i),blockInsertionPoint:t(),blockInsertionPointVisible:o()}}),[]),p=(0,u.useReducedMotion)();if(!e)return;let h=!1;return t===i&&s&&s.includes(e)?("top"===n&&(h=d&&0===l.index&&e===s[l.index]),"bottom"===n&&(h=d&&e===s[l.index-1]),(0,$.jsx)(os.__unstableAnimatePresence,{children:h&&(0,$.jsx)(os.__unstableMotion.div,{initial:{height:0},animate:{height:"calc(1.5 * var(--wp-block-editor-iframe-zoom-out-frame-size) / var(--wp-block-editor-iframe-zoom-out-scale)"},exit:{height:0},transition:{type:"tween",duration:p?0:.2,ease:[.6,0,.4,1]},className:Zi("block-editor-block-list__zoom-out-separator",{"is-dragged-over":o}),"data-is-insertion-point":"true",onDragOver:()=>r(!0),onDragLeave:()=>r(!1),children:(0,$.jsx)(os.__unstableMotion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,transition:{delay:-.125}},transition:{ease:"linear",duration:.1,delay:.125},children:(0,C.__)("Drop pattern.")})})})):null}const ey=(0,a.createContext)(),ty=new WeakMap;function ny({className:e,...t}){const n=(0,u.useViewportMatch)("medium"),{isOutlineMode:o,isFocusMode:r,editorMode:i,temporarilyEditingAsBlocks:s}=(0,c.useSelect)((e=>{const{getSettings:t,__unstableGetEditorMode:n,getTemporarilyEditingAsBlocks:o,isTyping:r}=te(e(li)),{outlineMode:i,focusMode:s}=t();return{isOutlineMode:i&&!r(),isFocusMode:s,editorMode:n(),temporarilyEditingAsBlocks:o()}}),[]),l=(0,c.useRegistry)(),{setBlockVisibility:d}=(0,c.useDispatch)(li),p=(0,u.useDebounce)((0,a.useCallback)((()=>{const e={};ty.get(l).forEach((([t,n])=>{e[t]=n})),d(e)}),[l]),300,{trailing:!0}),h=(0,a.useMemo)((()=>{const{IntersectionObserver:e}=window;if(e)return new e((e=>{ty.get(l)||ty.set(l,[]);for(const t of e){const e=t.target.getAttribute("data-block");ty.get(l).push([e,t.isIntersecting])}p()}))}),[]),g=Kx({ref:(0,u.useMergeRefs)([Ix(),Bx(),Xx()]),className:Zi("is-root-container",e,{"is-outline-mode":o,"is-focus-mode":r&&n,"is-navigate-mode":"navigation"===i})},t);return(0,$.jsxs)(ey.Provider,{value:h,children:[(0,$.jsx)("div",{...g}),!!s&&(0,$.jsx)(oy,{clientId:s})]})}function oy({clientId:e}){const{stopEditingAsBlocks:t}=te((0,c.useDispatch)(li)),n=(0,c.useSelect)((t=>{const{isBlockSelected:n,hasSelectedInnerBlock:o}=t(li);return n(e)||o(e,!0)}),[e]);return(0,a.useEffect)((()=>{n||t(e)}),[n,e,t]),null}function ry(e){return(0,$.jsx)(v,{value:b,children:(0,$.jsx)(ny,{...e})})}const iy=[],sy=new Set;function ly({placeholder:e,rootClientId:t,renderAppender:n,__experimentalAppenderTagName:o,layout:r=Il}){const i=!1!==n,s=!!n,{order:l,isZoomOut:a,selectedBlocks:u,visibleBlocks:d,shouldRenderAppender:p}=(0,c.useSelect)((e=>{const{getSettings:n,getBlockOrder:o,getSelectedBlockClientId:r,getSelectedBlockClientIds:l,__unstableGetVisibleBlocks:a,getTemplateLock:c,getBlockEditingMode:u,__unstableGetEditorMode:d}=e(li),p=o(t);if(n().__unstableIsPreviewMode)return{order:p,selectedBlocks:iy,visibleBlocks:sy};const h=r();return{order:p,selectedBlocks:l(),visibleBlocks:a(),isZoomOut:"zoom-out"===d(),shouldRenderAppender:i&&"zoom-out"!==d()&&(s?!c(t)&&"disabled"!==u(t):t===h||!t&&!h&&!p.length)}}),[t,i,s]);return(0,$.jsxs)(El,{value:r,children:[l.map((e=>(0,$.jsxs)(c.AsyncModeProvider,{value:!d.has(e)&&!u.includes(e),children:[a&&(0,$.jsx)(Jx,{clientId:e,rootClientId:t,position:"top"}),(0,$.jsx)(hx,{rootClientId:t,clientId:e}),a&&(0,$.jsx)(Jx,{clientId:e,rootClientId:t,position:"bottom"})]},e))),l.length<1&&e,p&&(0,$.jsx)(kx,{tagName:o,rootClientId:t,CustomAppender:n})]})}function ay(e){return(0,$.jsx)(c.AsyncModeProvider,{value:!1,children:(0,$.jsx)(ly,{...e})})}function cy(e){const{isMultiSelecting:t,getMultiSelectedBlockClientIds:n,hasMultiSelection:o,getSelectedBlockClientId:r,getSelectedBlocksInitialCaretPosition:i,__unstableIsFullySelected:s}=e(li);return{isMultiSelecting:t(),multiSelectedBlockClientIds:n(),hasMultiSelection:o(),selectedBlockClientId:r(),initialPosition:i(),isFullSelection:s()}}function uy(){const{initialPosition:e,isMultiSelecting:t,multiSelectedBlockClientIds:n,hasMultiSelection:o,selectedBlockClientId:r,isFullSelection:i}=(0,c.useSelect)(cy,[]);return(0,u.useRefEffect)((r=>{const{ownerDocument:s}=r,{defaultView:l}=s;if(null==e)return;if(!o||t)return;const{length:a}=n;a<2||i&&(r.contentEditable=!0,r.focus(),l.getSelection().removeAllRanges())}),[o,t,n,r,e,i])}function dy(e,t,n,o){let r,i=ba.focus.focusable.find(n);return t&&i.reverse(),i=i.slice(i.indexOf(e)+1),o&&(r=e.getBoundingClientRect()),i.find((function(e){if(!(e.closest("[inert]")||1===e.children.length&&Gg(e,e.firstElementChild)&&"true"===e.firstElementChild.getAttribute("contenteditable"))){if(!ba.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 py(){const{getMultiSelectedBlocksStartClientId:e,getMultiSelectedBlocksEndClientId:t,getSettings:n,hasMultiSelection:o,__unstableIsFullySelected:r}=(0,c.useSelect)(li),{selectBlock:i}=(0,c.useDispatch)(li);return(0,u.useRefEffect)((s=>{let l;function a(){l=null}function c(a){if(a.defaultPrevented)return;const{keyCode:c,target:u,shiftKey:d,ctrlKey:p,altKey:h,metaKey:g}=a,m=c===va.UP,f=c===va.DOWN,b=c===va.LEFT,k=c===va.RIGHT,v=m||b,_=b||k,x=m||f,y=_||x,S=d||p||h||g,w=x?ba.isVerticalEdge:ba.isHorizontalEdge,{ownerDocument:C}=s,{defaultView:B}=C;if(!y)return;if(o()){if(d)return;if(!r())return;return a.preventDefault(),void(v?i(e()):i(t(),-1))}if(!function(e,t,n){const o=t===va.UP||t===va.DOWN,{tagName:r}=e,i=e.getAttribute("type");if(o&&!n)return"INPUT"!==r||!["date","datetime-local","month","number","range","time","week"].includes(i);if("INPUT"===r)return["button","checkbox","number","color","file","image","radio","reset","submit"].includes(i);return"TEXTAREA"!==r}(u,c,S))return;x?l||(l=(0,ba.computeCaretRect)(B)):l=null;const I=(0,ba.isRTL)(u)?!v:v,{keepCaretInsideBlock:j}=n();if(d)(function(e,t){const n=dy(e,t,s);return n&&Ug(n)})(u,v)&&w(u,v)&&(s.contentEditable=!0,s.focus());else if(!x||!(0,ba.isVerticalEdge)(u,v)||h&&!(0,ba.isHorizontalEdge)(u,I)||j){if(_&&B.getSelection().isCollapsed&&(0,ba.isHorizontalEdge)(u,I)&&!j){const e=dy(u,I,s);(0,ba.placeCaretAtHorizontalEdge)(e,v),a.preventDefault()}}else{const e=dy(u,v,s,!0);e&&((0,ba.placeCaretAtVerticalEdge)(e,h?!v:v,h?void 0:l),a.preventDefault())}}return s.addEventListener("mousedown",a),s.addEventListener("keydown",c),()=>{s.removeEventListener("mousedown",a),s.removeEventListener("keydown",c)}}),[])}function hy(){const{getBlockOrder:e,getSelectedBlockClientIds:t,getBlockRootClientId:n}=(0,c.useSelect)(li),{multiSelect:o,selectBlock:r}=(0,c.useDispatch)(li),i=(0,Yf.__unstableUseShortcutEventMatch)();return(0,u.useRefEffect)((s=>{function l(l){if(!i("core/block-editor/select-all",l))return;const a=t();if(a.length<2&&!(0,ba.isEntirelySelected)(l.target))return;l.preventDefault();const[c]=a,u=n(c),d=e(u);a.length!==d.length?o(d[0],d[d.length-1]):u&&(s.ownerDocument.defaultView.getSelection().removeAllRanges(),r(u))}return s.addEventListener("keydown",l),()=>{s.removeEventListener("keydown",l)}}),[])}function gy(e,t){e.contentEditable=t,t&&e.focus()}function my(){const{startMultiSelect:e,stopMultiSelect:t}=(0,c.useDispatch)(li),{isSelectionEnabled:n,hasSelectedBlock:o,isDraggingBlocks:r,isMultiSelecting:i}=(0,c.useSelect)(li);return(0,u.useRefEffect)((s=>{const{ownerDocument:l}=s,{defaultView:a}=l;let c,u;function d(){t(),a.removeEventListener("mouseup",d),u=a.requestAnimationFrame((()=>{if(!o())return;gy(s,!1);const e=a.getSelection();if(e.rangeCount){const t=e.getRangeAt(0),{commonAncestorContainer:n}=t,o=t.cloneRange();c.contains(n)&&(c.focus(),e.removeAllRanges(),e.addRange(o))}}))}function p({buttons:t,target:o,relatedTarget:l}){o.contains(l)||r()||1===t&&(i()||s!==o&&"true"===o.getAttribute("contenteditable")&&n()&&(c=o,e(),a.addEventListener("mouseup",d),gy(s,!0)))}return s.addEventListener("mouseout",p),()=>{s.removeEventListener("mouseout",p),a.removeEventListener("mouseup",d),a.cancelAnimationFrame(u)}}),[e,t,n,o])}function fy(e,t){e.contentEditable!==String(t)&&(e.contentEditable=t,t&&e.focus())}function by(e){const t=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;return t?.closest("[data-wp-block-attribute-key]")}function ky(){const{multiSelect:e,selectBlock:t,selectionChange:n}=(0,c.useDispatch)(li),{getBlockParents:o,getBlockSelectionStart:r,isMultiSelecting:i}=(0,c.useSelect)(li);return(0,u.useRefEffect)((s=>{const{ownerDocument:l}=s,{defaultView:a}=l;function c(l){const c=a.getSelection();if(!c.rangeCount)return;const u=function(e){const{anchorNode:t,anchorOffset:n}=e;return t.nodeType===t.TEXT_NODE||0===n?t:t.childNodes[n-1]}(c),d=function(e){const{focusNode:t,focusOffset:n}=e;return t.nodeType===t.TEXT_NODE||n===t.childNodes.length?t:0===n&&(0,ba.isSelectionForward)(e)?null!==(o=t.previousSibling)&&void 0!==o?o:t.parentElement:t.childNodes[n];var o}(c);if(!s.contains(u)||!s.contains(d))return;const p=l.shiftKey&&"mouseup"===l.type;if(c.isCollapsed&&!p){if("true"===s.contentEditable&&!i()){fy(s,!1);let e=u.nodeType===u.ELEMENT_NODE?u:u.parentElement;e=e?.closest("[contenteditable]"),e?.focus()}return}let h=Ug(u),g=Ug(d);if(p){const e=r(),t=Ug(l.target),n=t!==g;(h===g&&c.isCollapsed||!g||n)&&(g=t),h!==e&&(h=e)}if(void 0===h&&void 0===g)return void fy(s,!1);if(h===g)i()?e(h,h):t(h);else{const t=[...o(h),h],r=[...o(g),g],i=function(e,t){let n=0;for(;e[n]===t[n];)n++;return n}(t,r);if(t[i]!==h||r[i]!==g)return void e(t[i],r[i]);const s=by(u),l=by(d);if(s&&l){var m,f;const e=c.getRangeAt(0),t=(0,W.create)({element:s,range:e,__unstableIsEditableTree:!0}),o=(0,W.create)({element:l,range:e,__unstableIsEditableTree:!0}),r=null!==(m=t.start)&&void 0!==m?m:t.end,i=null!==(f=o.start)&&void 0!==f?f:o.end;n({start:{clientId:h,attributeKey:s.dataset.wpBlockAttributeKey,offset:r},end:{clientId:g,attributeKey:l.dataset.wpBlockAttributeKey,offset:i}})}else e(h,g)}}return l.addEventListener("selectionchange",c),a.addEventListener("mouseup",c),()=>{l.removeEventListener("selectionchange",c),a.removeEventListener("mouseup",c)}}),[e,t,n,o])}function vy(){const{selectBlock:e}=(0,c.useDispatch)(li),{isSelectionEnabled:t,getBlockSelectionStart:n,hasMultiSelection:o}=(0,c.useSelect)(li);return(0,u.useRefEffect)((r=>{function i(i){if(!t()||0!==i.button)return;const s=n(),l=Ug(i.target);i.shiftKey?s!==l&&(r.contentEditable=!0,r.focus()):o()&&e(l)}return r.addEventListener("mousedown",i),()=>{r.removeEventListener("mousedown",i)}}),[e,t,n,o])}function _y(){const{__unstableIsFullySelected:e,getSelectedBlockClientIds:t,getSelectedBlockClientId:n,__unstableIsSelectionMergeable:o,hasMultiSelection:r,getBlockName:i,canInsertBlockType:s,getBlockRootClientId:a,getSelectionStart:d,getSelectionEnd:p,getBlockAttributes:h}=(0,c.useSelect)(li),{replaceBlocks:g,__unstableSplitSelection:m,removeBlocks:f,__unstableDeleteSelection:b,__unstableExpandSelection:k,__unstableMarkAutomaticChange:v}=(0,c.useDispatch)(li);return(0,u.useRefEffect)((c=>{function u(e){"true"===c.contentEditable&&e.preventDefault()}function _(u){if(!u.defaultPrevented)if(r())u.keyCode===va.ENTER?(c.contentEditable=!1,u.preventDefault(),e()?g(t(),(0,l.createBlock)((0,l.getDefaultBlockName)())):m()):u.keyCode===va.BACKSPACE||u.keyCode===va.DELETE?(c.contentEditable=!1,u.preventDefault(),e()?f(t()):o()?b(u.keyCode===va.DELETE):k()):1!==u.key.length||u.metaKey||u.ctrlKey||(c.contentEditable=!1,o()?b(u.keyCode===va.DELETE):(u.preventDefault(),c.ownerDocument.defaultView.getSelection().removeAllRanges()));else if(u.keyCode===va.ENTER){if(u.shiftKey||e())return;const t=n(),o=i(t),r=d(),c=p();if(r.attributeKey===c.attributeKey){const e=h(t)[r.attributeKey],n=(0,l.getBlockTransforms)("from").filter((({type:e})=>"enter"===e)),o=(0,l.findTransform)(n,(t=>t.regExp.test(e)));if(o)return g(t,o.transform({content:e})),void v()}if(!(0,l.hasBlockSupport)(o,"splitting",!1)&&!u.__deprecatedOnSplit)return;s(o,a(t))&&(m(),u.preventDefault())}}function x(e){r()&&(c.contentEditable=!1,o()?b():(e.preventDefault(),c.ownerDocument.defaultView.getSelection().removeAllRanges()))}return c.addEventListener("beforeinput",u),c.addEventListener("keydown",_),c.addEventListener("compositionstart",x),()=>{c.removeEventListener("beforeinput",u),c.removeEventListener("keydown",_),c.removeEventListener("compositionstart",x)}}),[])}function xy(){const{getBlockName:e}=(0,c.useSelect)(li),{getBlockType:t}=(0,c.useSelect)(l.store),{createSuccessNotice:n}=(0,c.useDispatch)(Uo.store);return(0,a.useCallback)(((o,r)=>{let i="";if(1===r.length){const n=r[0],s=t(e(n))?.title;i="copy"===o?(0,C.sprintf)((0,C.__)('Copied "%s" to clipboard.'),s):(0,C.sprintf)((0,C.__)('Moved "%s" to clipboard.'),s)}else i="copy"===o?(0,C.sprintf)((0,C._n)("Copied %d block to clipboard.","Copied %d blocks to clipboard.",r.length),r.length):(0,C.sprintf)((0,C._n)("Moved %d block to clipboard.","Moved %d blocks to clipboard.",r.length),r.length);n(i,{type:"snackbar"})}),[])}function yy({clipboardData:e}){let t="",n="";try{t=e.getData("text/plain"),n=e.getData("text/html")}catch(e){return}n=function(e){const t="\x3c!--StartFragment--\x3e",n=e.indexOf(t);if(!(n>-1))return e;const o=(e=e.substring(n+20)).indexOf("\x3c!--EndFragment--\x3e");return o>-1&&(e=e.substring(0,o)),e}(n),n=function(e){const t="<meta charset='utf-8'>";return e.startsWith(t)?e.slice(22):e}(n);const o=(0,ba.getFilesFromDataTransfer)(e);return o.length&&!function(e,t){if(t&&1===e?.length&&0===e[0].type.indexOf("image/")){const e=/<\s*img\b/gi;if(1!==t.match(e)?.length)return!0;const n=/<\s*img\b[^>]*\bsrc="file:\/\//i;if(t.match(n))return!0}return!1}(o,n)?{files:o}:{html:n,plainText:t,files:[]}}const Sy=Symbol("requiresWrapperOnCopy");function wy(e,t,n){let o=t;const[r]=t;if(r){if(n.select(l.store).getBlockType(r.name)[Sy]){const{getBlockRootClientId:e,getBlockName:t,getBlockAttributes:i}=n.select(li),s=e(r.clientId),a=t(s);a&&(o=(0,l.createBlock)(a,i(s),o))}}const i=(0,l.serialize)(o);e.clipboardData.setData("text/plain",function(e){e=e.replace(/<br>/g,"\n");return(0,ba.__unstableStripHTML)(e).trim().replace(/\n\n+/g,"\n\n")}(i)),e.clipboardData.setData("text/html",i)}function Cy(){const e=(0,c.useRegistry)(),{getBlocksByClientId:t,getSelectedBlockClientIds:n,hasMultiSelection:o,getSettings:r,getBlockName:i,__unstableIsFullySelected:s,__unstableIsSelectionCollapsed:a,__unstableIsSelectionMergeable:d,__unstableGetSelectedBlocksWithPartialSelection:p,canInsertBlockType:h,getBlockRootClientId:g}=(0,c.useSelect)(li),{flashBlock:m,removeBlocks:f,replaceBlocks:b,__unstableDeleteSelection:k,__unstableExpandSelection:v,__unstableSplitSelection:_}=(0,c.useDispatch)(li),x=xy();return(0,u.useRefEffect)((c=>{function u(u){if(u.defaultPrevented)return;const y=n();if(0===y.length)return;if(!o()){const{target:e}=u,{ownerDocument:t}=e;if("copy"===u.type||"cut"===u.type?(0,ba.documentHasUncollapsedSelection)(t):(0,ba.documentHasSelection)(t)&&!t.activeElement.isContentEditable)return}const{activeElement:S}=u.target.ownerDocument;if(!c.contains(S))return;const w=d(),C=a()||s(),B=!C&&!w;if("copy"===u.type||"cut"===u.type)if(u.preventDefault(),1===y.length&&m(y[0]),B)v();else{let n;if(x(u.type,y),C)n=t(y);else{const[e,o]=p();n=[e,...t(y.slice(1,y.length-1)),o]}wy(u,n,e)}if("cut"===u.type)C&&!B?f(y):(u.target.ownerDocument.activeElement.contentEditable=!1,k());else if("paste"===u.type){const{__experimentalCanUserUseUnfilteredHTML:e}=r();if("true"===u.clipboardData.getData("rich-text"))return;const{plainText:t,html:n,files:a}=yy(u),c=s();let d=[];if(a.length){const e=(0,l.getBlockTransforms)("from");d=a.reduce(((t,n)=>{const o=(0,l.findTransform)(e,(e=>"files"===e.type&&e.isMatch([n])));return o&&t.push(o.transform([n])),t}),[]).flat()}else d=(0,l.pasteHandler)({HTML:n,plainText:t,mode:c?"BLOCKS":"AUTO",canUserUseUnfilteredHTML:e});if("string"==typeof d)return;if(c)return b(y,d,d.length-1,-1),void u.preventDefault();if(!o()&&!(0,l.hasBlockSupport)(i(y[0]),"splitting",!1)&&!u.__deprecatedOnSplit)return;const[p]=y,m=g(p),f=[];for(const e of d)if(h(e.name,m))f.push(e);else{const t=i(m),n=e.name!==t?(0,l.switchToBlockType)(e,t):[e];if(!n)return;for(const e of n)for(const t of e.innerBlocks)f.push(t)}_(f),u.preventDefault()}}return c.ownerDocument.addEventListener("copy",u),c.ownerDocument.addEventListener("cut",u),c.ownerDocument.addEventListener("paste",u),()=>{c.ownerDocument.removeEventListener("copy",u),c.ownerDocument.removeEventListener("cut",u),c.ownerDocument.removeEventListener("paste",u)}}),[])}function By(){const[e,t,n]=function(){const e=(0,a.useRef)(),t=(0,a.useRef)(),n=(0,a.useRef)(),{hasMultiSelection:o,getSelectedBlockClientId:r,getBlockCount:i}=(0,c.useSelect)(li),{setNavigationMode:s,setLastFocus:l}=te((0,c.useDispatch)(li)),d=(0,c.useSelect)((e=>e(li).isNavigationMode()),[]),{getLastFocus:p}=te((0,c.useSelect)(li)),h=d?void 0:"0",g=(0,a.useRef)();function m(t){if(g.current)g.current=null;else if(o())e.current.focus();else if(r())p()?.current?p().current.focus():e.current.querySelector(`[data-block="${r()}"]`).focus();else{s(!0);const n=e.current.ownerDocument===t.target.ownerDocument?e.current:e.current.ownerDocument.defaultView.frameElement,o=t.target.compareDocumentPosition(n)&t.target.DOCUMENT_POSITION_FOLLOWING,r=ba.focus.tabbable.find(e.current);r.length&&(o?r[0]:r[r.length-1]).focus()}}const f=(0,$.jsx)("div",{ref:t,tabIndex:h,onFocus:m}),b=(0,$.jsx)("div",{ref:n,tabIndex:h,onFocus:m}),k=(0,u.useRefEffect)((a=>{function c(e){if(e.defaultPrevented)return;if(e.keyCode===va.ESCAPE&&!o())return e.preventDefault(),void s(!0);if(e.keyCode!==va.TAB)return;const i=e.shiftKey,l=i?"findPrevious":"findNext";if(!o()&&!r())return void(e.target===a&&s(!0));const c=ba.focus.tabbable[l](e.target),u=e.target.closest("[data-block]"),d=u&&c&&(Gg(u,c)||$g(u,c));if((0,ba.isFormElement)(c)&&d)return;const p=i?t:n;g.current=!0,p.current.focus({preventScroll:!0})}function u(e){l({...p(),current:e.target});const{ownerDocument:t}=a;e.relatedTarget||t.activeElement!==t.body||0!==i()||a.focus()}function d(o){if(o.keyCode!==va.TAB)return;if("region"===o.target?.getAttribute("role"))return;if(e.current===o.target)return;const r=o.shiftKey?"findPrevious":"findNext",i=ba.focus.tabbable[r](o.target);i!==t.current&&i!==n.current||(o.preventDefault(),i.focus({preventScroll:!0}))}const{ownerDocument:h}=a,{defaultView:m}=h;return m.addEventListener("keydown",d),a.addEventListener("keydown",c),a.addEventListener("focusout",u),()=>{m.removeEventListener("keydown",d),a.removeEventListener("keydown",c),a.removeEventListener("focusout",u)}}),[]);return[f,(0,u.useMergeRefs)([e,k]),b]}(),o=(0,c.useSelect)((e=>e(li).hasMultiSelection()),[]);return[e,(0,u.useMergeRefs)([t,Cy(),_y(),my(),ky(),vy(),uy(),hy(),py(),(0,u.useRefEffect)((e=>{if(e.tabIndex=0,o)return e.classList.add("has-multi-selection"),e.setAttribute("aria-label",(0,C.__)("Multiple selected blocks")),()=>{e.classList.remove("has-multi-selection"),e.removeAttribute("aria-label")}}),[o])]),n]}const Iy=(0,a.forwardRef)((function({children:e,...t},n){const[o,r,i]=By();return(0,$.jsxs)($.Fragment,{children:[o,(0,$.jsx)("div",{...t,ref:(0,u.useMergeRefs)([r,n]),className:Zi(t.className,"block-editor-writing-flow"),children:e}),i]})}));let jy=null;function Ey(e,t,n){const o={};for(const t in e)o[t]=e[t];if(e instanceof n.contentDocument.defaultView.MouseEvent){const e=n.getBoundingClientRect();o.clientX+=e.left,o.clientY+=e.top}const r=new t(e.type,o);o.defaultPrevented&&r.preventDefault();!n.dispatchEvent(r)&&e.preventDefault()}function Ty(e){return(0,u.useRefEffect)((()=>{const{defaultView:t}=e;if(!t)return;const{frameElement:n}=t,o=e.documentElement,r=["dragover","mousemove"],i={};for(const e of r)i[e]=e=>{const t=Object.getPrototypeOf(e).constructor.name;Ey(e,window[t],n)},o.addEventListener(e,i[e]);return()=>{for(const e of r)o.removeEventListener(e,i[e])}}))}function My({contentRef:e,children:t,tabIndex:n=0,scale:o=1,frameSize:r=0,readonly:i,forwardedRef:s,title:l=(0,C.__)("Editor canvas"),...d}){const{resolvedAssets:p,isPreviewMode:h}=(0,c.useSelect)((e=>{const{getSettings:t}=e(li),n=t();return{resolvedAssets:n.__unstableResolvedAssets,isPreviewMode:n.__unstableIsPreviewMode}}),[]),{styles:g="",scripts:m=""}=p,[f,b]=(0,a.useState)(),k=(0,a.useRef)(0),[v,_]=(0,a.useState)([]),x=Ix(),[y,S,w]=By(),[B,{height:I}]=(0,u.useResizeObserver)(),[j,{width:E}]=(0,u.useResizeObserver)(),T=(0,u.useRefEffect)((e=>{let t;function n(e){e.preventDefault()}function o(){const{contentDocument:o,ownerDocument:r}=e,{documentElement:i}=o;t=o,i.classList.add("block-editor-iframe__html"),x(i),_(Array.from(r.body.classList).filter((e=>e.startsWith("admin-color-")||e.startsWith("post-type-")||"wp-embed-responsive"===e))),o.dir=r.dir;for(const e of jy||(jy=Array.from(document.styleSheets).reduce(((e,t)=>{try{t.cssRules}catch(t){return e}const{ownerNode:n,cssRules:o}=t;if(null===n)return e;if(!o)return e;if(["wp-reset-editor-styles-css","wp-reset-editor-styles-rtl-css"].includes(n.id))return e;if(!n.id)return e;if(function e(t){return Array.from(t).find((({selectorText:t,conditionText:n,cssRules:o})=>n?e(o):t&&(t.includes(".editor-styles-wrapper")||t.includes(".wp-block"))))}(o)){const t="STYLE"===n.tagName;if(t){const t=n.id.replace("-inline-css","-css"),o=document.getElementById(t);o&&e.push(o.cloneNode(!0))}if(e.push(n.cloneNode(!0)),!t){const t=n.id.replace("-css","-inline-css"),o=document.getElementById(t);o&&e.push(o.cloneNode(!0))}}return e}),[]),jy))o.getElementById(e.id)||(o.head.appendChild(e.cloneNode(!0)),h||console.warn(`${e.id} was added to the iframe incorrectly. Please use block.json or enqueue_block_assets to add styles to the iframe.`,e));t.addEventListener("dragover",n,!1),t.addEventListener("drop",n,!1)}return e._load=()=>{b(e.contentDocument)},e.addEventListener("load",o),()=>{delete e._load,e.removeEventListener("load",o),t?.removeEventListener("dragover",n),t?.removeEventListener("drop",n)}}),[]),[M,P]=(0,a.useState)(),R=(0,u.useRefEffect)((e=>{const t=e.ownerDocument.defaultView;P(t.innerHeight);const n=()=>{P(t.innerHeight)};return t.addEventListener("resize",n),()=>{t.removeEventListener("resize",n)}}),[]),[N,L]=(0,a.useState)(),A=(0,u.useRefEffect)((e=>{const t=e.ownerDocument.defaultView;L(t.innerWidth);const n=()=>{L(t.innerWidth)};return t.addEventListener("resize",n),()=>{t.removeEventListener("resize",n)}}),[]),D=1!==o;(0,a.useEffect)((()=>{D||(k.current=E)}),[E,D]);const O=Math.max(k.current,E),z=(0,u.useDisabled)({isDisabled:!i}),V=(0,u.useMergeRefs)([Ty(f),e,x,S,z,D?R:null]),F=`<!doctype html>\n<html>\n\t<head>\n\t\t<meta charset="utf-8">\n\t\t<script>window.frameElement._load()<\/script>\n\t\t<style>\n\t\t\thtml{\n\t\t\t\theight: auto !important;\n\t\t\t\tmin-height: 100%;\n\t\t\t}\n\t\t\t/* Lowest specificity to not override global styles */\n\t\t\t:where(body) {\n\t\t\t\tmargin: 0;\n\t\t\t\t/* Default background color in case zoom out mode background\n\t\t\t\tcolors the html element */\n\t\t\t\tbackground-color: white;\n\t\t\t}\n\t\t</style>\n\t\t${g}\n\t\t${m}\n\t</head>\n\t<body>\n\t\t<script>document.currentScript.parentElement.remove()<\/script>\n\t</body>\n</html>`,[H,G]=(0,a.useMemo)((()=>{const e=URL.createObjectURL(new window.Blob([F],{type:"text/html"}));return[e,()=>URL.revokeObjectURL(e)]}),[F]);(0,a.useEffect)((()=>G),[G]);const U=(0,a.useRef)(null);(0,a.useEffect)((()=>{if(!f||!D)return;const e=()=>{clearTimeout(U.current),f.documentElement.classList.add("zoom-out-animation"),U.current=setTimeout((()=>{f.documentElement.classList.remove("zoom-out-animation")}),400)};return e(),f.documentElement.classList.add("is-zoomed-out"),()=>{e(),f.documentElement.classList.remove("is-zoomed-out")}}),[f,D]),(0,a.useEffect)((()=>{if(!f||!D)return;return f.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scale","default"===o?(Math.min(E,750)-2*parseInt(r))/O:o),f.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-frame-size","number"==typeof r?`${r}px`:r),f.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-content-height",`${I}px`),f.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-inner-height",`${M}px`),f.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-container-width",`${E}px`),f.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scale-container-width",`${O}px`),()=>{f.documentElement.style.removeProperty("--wp-block-editor-iframe-zoom-out-scale"),f.documentElement.style.removeProperty("--wp-block-editor-iframe-zoom-out-frame-size"),f.documentElement.style.removeProperty("--wp-block-editor-iframe-zoom-out-content-height"),f.documentElement.style.removeProperty("--wp-block-editor-iframe-zoom-out-inner-height"),f.documentElement.style.removeProperty("--wp-block-editor-iframe-zoom-out-container-width"),f.documentElement.style.removeProperty("--wp-block-editor-iframe-zoom-out-scale-container-width")}}),[o,r,f,M,I,E,N,D,O]);const W=n>=0&&!h,K=(0,$.jsxs)($.Fragment,{children:[W&&y,(0,$.jsx)("iframe",{...d,style:{...d.style,height:d.style?.height,border:0},ref:(0,u.useMergeRefs)([s,T]),tabIndex:n,src:H,title:l,onKeyDown:e=>{if(d.onKeyDown&&d.onKeyDown(e),e.currentTarget.ownerDocument!==e.target.ownerDocument){const{stopPropagation:t}=e.nativeEvent;e.nativeEvent.stopPropagation=()=>{},e.stopPropagation(),e.nativeEvent.stopPropagation=t,Ey(e,window.KeyboardEvent,e.currentTarget)}},children:f&&(0,a.createPortal)((0,$.jsxs)("body",{ref:V,className:Zi("block-editor-iframe__body","editor-styles-wrapper",...v),children:[B,(0,$.jsx)(os.__experimentalStyleProvider,{document:f,children:t})]}),f.documentElement)}),W&&w]});return(0,$.jsxs)("div",{className:"block-editor-iframe__container",ref:A,children:[j,(0,$.jsx)("div",{className:Zi("block-editor-iframe__scale-container",D&&"is-zoomed-out"),style:{"--wp-block-editor-iframe-zoom-out-scale-container-width":D&&`${O}px`},children:K})]})}const Py=(0,a.forwardRef)((function(e,t){return(0,c.useSelect)((e=>e(li).getSettings().__internalIsInitialized),[])?(0,$.jsx)(My,{...e,forwardedRef:t}):null})),Ry={attribute:/\[\s*(?:(?<namespace>\*|[-\w\P{ASCII}]*)\|)?(?<name>[-\w\P{ASCII}]+)\s*(?:(?<operator>\W?=)\s*(?<value>.+?)\s*(\s(?<caseSensitive>[iIsS]))?\s*)?\]/gu,id:/#(?<name>[-\w\P{ASCII}]+)/gu,class:/\.(?<name>[-\w\P{ASCII}]+)/gu,comma:/\s*,\s*/g,combinator:/\s*[\s>+~]\s*/g,"pseudo-element":/::(?<name>[-\w\P{ASCII}]+)(?:\((?<argument>¶*)\))?/gu,"pseudo-class":/:(?<name>[-\w\P{ASCII}]+)(?:\((?<argument>¶*)\))?/gu,universal:/(?:(?<namespace>\*|[-\w\P{ASCII}]*)\|)?\*/gu,type:/(?:(?<namespace>\*|[-\w\P{ASCII}]*)\|)?(?<name>[-\w\P{ASCII}]+)/gu},Ny=new Set(["combinator","comma"]),Ly=(new Set(["not","is","where","has","matches","-moz-any","-webkit-any","nth-child","nth-last-child"]),e=>{switch(e){case"pseudo-element":case"pseudo-class":return new RegExp(Ry[e].source.replace("(?<argument>¶*)","(?<argument>.*)"),"gu");default:return Ry[e]}});function Ay(e,t){let n=0,o="";for(;t<e.length;t++){const r=e[t];switch(r){case"(":++n;break;case")":--n}if(o+=r,0===n)return o}return o}const Dy=/(['"])([^\\\n]+?)\1/g,Oy=/\\./g;function zy(e,t=Ry){if(""===(e=e.trim()))return[];const n=[];e=(e=e.replace(Oy,((e,t)=>(n.push({value:e,offset:t}),"".repeat(e.length))))).replace(Dy,((e,t,o,r)=>(n.push({value:e,offset:r}),`${t}${"".repeat(o.length)}${t}`)));{let t,o=0;for(;(t=e.indexOf("(",o))>-1;){const r=Ay(e,t);n.push({value:r,offset:t}),e=`${e.substring(0,t)}(${"¶".repeat(r.length-2)})${e.substring(t+r.length)}`,o=t+r.length}}const o=function(e,t=Ry){if(!e)return[];const n=[e];for(const[e,o]of Object.entries(t))for(let t=0;t<n.length;t++){const r=n[t];if("string"!=typeof r)continue;o.lastIndex=0;const i=o.exec(r);if(!i)continue;const s=i.index-1,l=[],a=i[0],c=r.slice(0,s+1);c&&l.push(c),l.push({...i.groups,type:e,content:a});const u=r.slice(s+a.length+1);u&&l.push(u),n.splice(t,1,...l)}let o=0;for(const e of n)switch(typeof e){case"string":throw new Error(`Unexpected sequence ${e} found at index ${o}`);case"object":o+=e.content.length,e.pos=[o-e.content.length,o],Ny.has(e.type)&&(e.content=e.content.trim()||" ")}return n}(e,t),r=new Set;for(const e of n.reverse())for(const t of o){const{offset:n,value:o}=e;if(!(t.pos[0]<=n&&n+o.length<=t.pos[1]))continue;const{content:i}=t,s=n-t.pos[0];t.content=i.slice(0,s)+o+i.slice(s+o.length),t.content!==i&&r.add(t)}for(const e of r){const t=Ly(e.type);if(!t)throw new Error(`Unknown token type: ${e.type}`);t.lastIndex=0;const n=t.exec(e.content);if(!n)throw new Error(`Unable to parse content for ${e.type}: ${e.content}`);Object.assign(e,n.groups)}return o}function*Vy(e,t){switch(e.type){case"list":for(let t of e.list)yield*Vy(t,e);break;case"complex":yield*Vy(e.left,e),yield*Vy(e.right,e);break;case"compound":yield*e.list.map((t=>[t,e]));break;default:yield[e,t]}}var Fy=n(4529);const Hy=Fy,Gy=(Fy.stringify,Fy.fromJSON,Fy.plugin,Fy.parse,Fy.list,Fy.document,Fy.comment,Fy.atRule,Fy.rule,Fy.decl,Fy.root,Fy.CssSyntaxError);Fy.Declaration,Fy.Container,Fy.Processor,Fy.Document,Fy.Comment,Fy.Warning,Fy.AtRule,Fy.Result,Fy.Input,Fy.Rule,Fy.Root,Fy.Node;var $y=n(1443),Uy=n.n($y),Wy=n(5404),Ky=n.n(Wy);const Zy=new Map,qy=[{type:"type",content:"body"},{type:"type",content:"html"},{type:"pseudo-class",content:":root"},{type:"pseudo-class",content:":where(body)"},{type:"pseudo-class",content:":where(:root)"},{type:"pseudo-class",content:":where(html)"}];function Yy(e,t){const n=zy(t);let o=-1;for(let e=n.findLastIndex((({content:e,type:t})=>qy.some((n=>e===n.content&&t===n.type))))+1;e<n.length;e++)if("combinator"===n[e].type){o=e;break}const r=zy(e);return n.splice(-1===o?n.length:o,0,{type:"combinator",content:" "},...r),function(e){let t;return t=Array.isArray(e)?e:[...Vy(e)].map((([e])=>e)),t.map((e=>e.content)).join("")}(n)}const Xy=(e,t="",n)=>{let o=Zy.get(t);return o||(o=new WeakMap,Zy.set(t,o)),e.map((e=>{let r=o.get(e);return r||(r=function({css:e,ignoredSelectors:t=[],baseURL:n},o="",r){if(!o&&!n)return e;try{var i;const s=[...t,...null!==(i=r?.ignoredSelectors)&&void 0!==i?i:[],o];return Hy([o&&Uy()({prefix:o,transform:(e,t,n)=>s.some((e=>e instanceof RegExp?t.match(e):t.includes(e)))?t:qy.some((e=>t.startsWith(e.content)))?Yy(e,t):n}),n&&Ky()({rootUrl:n})].filter(Boolean)).process(e,{}).css}catch(e){return e instanceof Gy?console.warn("wp.blockEditor.transformStyles Failed to transform CSS.",e.message+"\n"+e.showSourceCode(!1)):console.warn("wp.blockEditor.transformStyles Failed to transform CSS.",e),null}}(e,t,n),o.set(e,r)),r}))};function Qy(e,t){return(0,a.useCallback)((e=>{if(!e)return;const{ownerDocument:n}=e,{defaultView:o,body:r}=n,i=t?n.querySelector(t):r;let s;if(i)s=o?.getComputedStyle(i,null).getPropertyValue("background-color");else{const e=n.createElement("div");e.classList.add("editor-styles-wrapper"),r.appendChild(e),s=o?.getComputedStyle(e,null).getPropertyValue("background-color"),r.removeChild(e)}const l=Du(s);l.luminance()>.5||0===l.alpha()?r.classList.remove("is-dark-theme"):r.classList.add("is-dark-theme")}),[e,t])}zu([Vu,Gu]);const Jy=(0,a.memo)((function({styles:e,scope:t,transformOptions:n}){const o=(0,c.useSelect)((e=>te(e(li)).getStyleOverrides()),[]),[r,i]=(0,a.useMemo)((()=>{const r=Object.values(null!=e?e:[]);for(const[e,t]of o){const n=r.findIndex((({id:t})=>e===t)),o={...t,id:e};-1===n?r.push(o):r[n]=o}return[Xy(r.filter((e=>e?.css)),t,n),r.filter((e=>"svgs"===e.__unstableType)).map((e=>e.assets)).join("")]}),[e,o,t,n]);return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)("style",{ref:Qy(r,t)}),r.map(((e,t)=>(0,$.jsx)("style",{children:e},t))),(0,$.jsx)(os.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 0 0",width:"0",height:"0",role:"none",style:{visibility:"hidden",position:"absolute",left:"-9999px",overflow:"hidden"},dangerouslySetInnerHTML:{__html:i}})]})}));let eS;const tS=2e3,nS=[];function oS({viewportWidth:e,containerWidth:t,minHeight:n,additionalStyles:o=nS}){e||(e=t);const[r,{height:i}]=(0,u.useResizeObserver)(),{styles:s}=(0,c.useSelect)((e=>({styles:e(li).getSettings().styles})),[]),l=(0,a.useMemo)((()=>s?[...s,{css:"body{height:auto;overflow:hidden;border:none;padding:0;}",__unstableType:"presets"},...o]:s),[s,o]);eS=eS||(0,a.memo)(ry);const d=t/e,p=i?t/(i*d):0;return(0,$.jsx)(os.Disabled,{className:"block-editor-block-preview__content",style:{transform:`scale(${d})`,aspectRatio:p,maxHeight:i>tS?tS*d:void 0,minHeight:n},children:(0,$.jsxs)(Py,{contentRef:(0,u.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.boxSizing="border-box",e.style.position="absolute",e.style.width="100%"}),[]),"aria-hidden":!0,tabIndex:-1,style:{position:"absolute",width:e,height:i,pointerEvents:"none",maxHeight:tS,minHeight:0!==d&&d<1&&n?n/d:n},children:[(0,$.jsx)(Jy,{styles:l}),r,(0,$.jsx)(eS,{renderAppender:!1})]})})}function rS(e){const[t,{width:n}]=(0,u.useResizeObserver)();return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)("div",{style:{position:"relative",width:"100%",height:0},children:t}),(0,$.jsx)("div",{className:"block-editor-block-preview__container",children:!!n&&(0,$.jsx)(oS,{...e,containerWidth:n})})]})}const iS=[];const sS=(0,a.memo)((function({blocks:e,viewportWidth:t=1200,minHeight:n,additionalStyles:o=iS,__experimentalMinHeight:r,__experimentalPadding:i}){r&&(n=r,y()("The __experimentalMinHeight prop",{since:"6.2",version:"6.4",alternative:"minHeight"})),i&&(o=[...o,{css:`body { padding: ${i}px; }`}],y()("The __experimentalPadding prop of BlockPreview",{since:"6.2",version:"6.4",alternative:"additionalStyles"}));const s=(0,c.useSelect)((e=>e(li).getSettings()),[]),l=(0,a.useMemo)((()=>({...s,focusMode:!1,__unstableIsPreviewMode:!0})),[s]),u=(0,a.useMemo)((()=>Array.isArray(e)?e:[e]),[e]);return e&&0!==e.length?(0,$.jsx)(Jf,{value:u,settings:l,children:(0,$.jsx)(rS,{viewportWidth:t,minHeight:n,additionalStyles:o})}):null}));function lS({blocks:e,props:t={},layout:n}){const o=(0,c.useSelect)((e=>e(li).getSettings()),[]),r=(0,a.useMemo)((()=>({...o,styles:void 0,focusMode:!1,__unstableIsPreviewMode:!0})),[o]),i=(0,u.useDisabled)(),s=(0,u.useMergeRefs)([t.ref,i]),l=(0,a.useMemo)((()=>Array.isArray(e)?e:[e]),[e]),d=(0,$.jsxs)(Jf,{value:l,settings:r,children:[(0,$.jsx)(Jy,{}),(0,$.jsx)(ay,{renderAppender:!1,layout:n})]});return{...t,ref:s,className:Zi(t.className,"block-editor-block-preview__live-content","components-disabled"),children:e?.length?d:null}}const aS=function({item:e}){var t;const{name:n,title:o,icon:r,description:i,initialAttributes:s,example:c}=e,u=(0,l.isReusableBlock)(e),d=(0,a.useMemo)((()=>c?(0,l.getBlockFromExample)(n,{attributes:{...c.attributes,...s},innerBlocks:c.innerBlocks}):(0,l.createBlock)(n,s)),[n,c,s]),p=144,h=null!==(t=c?.viewportWidth)&&void 0!==t?t:500,g=280/h,m=0!==g&&g<1?p/g:p;return(0,$.jsxs)("div",{className:"block-editor-inserter__preview-container",children:[(0,$.jsx)("div",{className:"block-editor-inserter__preview",children:u||c?(0,$.jsx)("div",{className:"block-editor-inserter__preview-content",children:(0,$.jsx)(sS,{blocks:d,viewportWidth:h,minHeight:p,additionalStyles:[{css:`\n\t\t\t\t\t\t\t\t\t\tbody { \n\t\t\t\t\t\t\t\t\t\t\tpadding: 24px;\n\t\t\t\t\t\t\t\t\t\t\tmin-height:${Math.round(m)}px;\n\t\t\t\t\t\t\t\t\t\t\tdisplay:flex;\n\t\t\t\t\t\t\t\t\t\t\talign-items:center;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t.is-root-container { width: 100%; }\n\t\t\t\t\t\t\t\t\t`}]})}):(0,$.jsx)("div",{className:"block-editor-inserter__preview-content-missing",children:(0,C.__)("No preview available.")})}),!u&&(0,$.jsx)(Wf,{title:o,icon:r,description:i})]})};const cS=(0,a.forwardRef)((function({isFirst:e,as:t,children:n,...o},r){return(0,$.jsx)(os.Composite.Item,{ref:r,role:"option",accessibleWhenDisabled:!0,...o,render:o=>{const r={...o,tabIndex:e?0:o.tabIndex};return t?(0,$.jsx)(t,{...r,children:n}):"function"==typeof n?n(r):(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,...r,children:n})}})})),uS=(0,$.jsx)(G.SVG,{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M8 7h2V5H8v2zm0 6h2v-2H8v2zm0 6h2v-2H8v2zm6-14v2h2V5h-2zm0 8h2v-2h-2v2zm0 6h2v-2h-2v2z"})});function dS({count:e,icon:t,isPattern:n,fadeWhenDisabled:o}){const r=n&&(0,C.__)("Pattern");return(0,$.jsx)("div",{className:"block-editor-block-draggable-chip-wrapper",children:(0,$.jsx)("div",{className:"block-editor-block-draggable-chip","data-testid":"block-draggable-chip",children:(0,$.jsxs)(os.Flex,{justify:"center",className:"block-editor-block-draggable-chip__content",children:[(0,$.jsx)(os.FlexItem,{children:t?(0,$.jsx)(Uf,{icon:t}):r||(0,C.sprintf)((0,C._n)("%d block","%d blocks",e),e)}),(0,$.jsx)(os.FlexItem,{children:(0,$.jsx)(Uf,{icon:uS})}),o&&(0,$.jsx)(os.FlexItem,{className:"block-editor-block-draggable-chip__disabled",children:(0,$.jsx)("span",{className:"block-editor-block-draggable-chip__disabled-icon"})})]})})})}const pS=({isEnabled:e,blocks:t,icon:n,children:o,pattern:r})=>{const i={type:"inserter",blocks:t},s=(0,c.useSelect)((e=>{const{getBlockType:n}=e(l.store);return 1===t.length&&n(t[0].name)?.icon}),[t]),{startDragging:a,stopDragging:u}=te((0,c.useDispatch)(li));return e?(0,$.jsx)(os.Draggable,{__experimentalTransferDataType:"wp-blocks",transferData:i,onDragStart:e=>{a();const n=r?.type===ge.user&&"unsynced"!==r?.syncStatus?[(0,l.createBlock)("core/block",{ref:r.id})]:t;e.dataTransfer.setData("text/html",(0,l.serialize)(n))},onDragEnd:()=>{u()},__experimentalDragComponent:(0,$.jsx)(dS,{count:t.length,icon:n||!r&&s,isPattern:!!r}),children:({onDraggableStart:e,onDraggableEnd:t})=>o({draggable:!0,onDragStart:e,onDragEnd:t})}):o({draggable:!1,onDragStart:void 0,onDragEnd:void 0})};const hS=(0,a.memo)((function({className:e,isFirst:t,item:n,onSelect:o,onHover:r,isDraggable:i,...s}){const c=(0,a.useRef)(!1),u=n.icon?{backgroundColor:n.icon.background,color:n.icon.foreground}:{},d=(0,a.useMemo)((()=>[(0,l.createBlock)(n.name,n.initialAttributes,(0,l.createBlocksFromInnerBlocksTemplate)(n.innerBlocks))]),[n.name,n.initialAttributes,n.innerBlocks]),p=(0,l.isReusableBlock)(n)&&"unsynced"!==n.syncStatus||(0,l.isTemplatePart)(n);return(0,$.jsx)(pS,{isEnabled:i&&!n.isDisabled,blocks:d,icon:n.icon,children:({draggable:i,onDragStart:l,onDragEnd:a})=>(0,$.jsx)("div",{className:Zi("block-editor-block-types-list__list-item",{"is-synced":p}),draggable:i,onDragStart:e=>{c.current=!0,l&&(r(null),l(e))},onDragEnd:e=>{c.current=!1,a&&a(e)},children:(0,$.jsxs)(cS,{isFirst:t,className:Zi("block-editor-block-types-list__item",e),disabled:n.isDisabled,onClick:e=>{e.preventDefault(),o(n,(0,va.isAppleOS)()?e.metaKey:e.ctrlKey),r(null)},onKeyDown:e=>{const{keyCode:t}=e;t===va.ENTER&&(e.preventDefault(),o(n,(0,va.isAppleOS)()?e.metaKey:e.ctrlKey),r(null))},onMouseEnter:()=>{c.current||r(n)},onMouseLeave:()=>r(null),...s,children:[(0,$.jsx)("span",{className:"block-editor-block-types-list__item-icon",style:u,children:(0,$.jsx)(Uf,{icon:n.icon,showColors:!0})}),(0,$.jsx)("span",{className:"block-editor-block-types-list__item-title",children:(0,$.jsx)(os.__experimentalTruncate,{numberOfLines:3,children:n.title})})]})})})}));const gS=(0,a.forwardRef)((function(e,t){const[n,o]=(0,a.useState)(!1);return(0,a.useEffect)((()=>{n&&(0,$o.speak)((0,C.__)("Use left and right arrow keys to move through blocks"))}),[n]),(0,$.jsx)("div",{ref:t,role:"listbox","aria-orientation":"horizontal",onFocus:()=>{o(!0)},onBlur:e=>{!e.currentTarget.contains(e.relatedTarget)&&o(!1)},...e})}));const mS=(0,a.forwardRef)((function(e,t){return(0,$.jsx)(os.Composite.Group,{role:"presentation",ref:t,...e})}));function fS(e,t){const n=[];for(let o=0,r=e.length;o<r;o+=t)n.push(e.slice(o,o+t));return n}const bS=function e({items:t=[],onSelect:n,onHover:o=(()=>{}),children:r,label:i,isDraggable:s=!0}){const a="block-editor-block-types-list",c=(0,u.useInstanceId)(e,a);return(0,$.jsxs)(gS,{className:a,"aria-label":i,children:[fS(t,3).map(((e,t)=>(0,$.jsx)(mS,{children:e.map(((e,r)=>(0,$.jsx)(hS,{item:e,className:(0,l.getBlockMenuDefaultClassName)(e.id),onSelect:n,onHover:o,isDraggable:s&&!e.isDisabled,isFirst:0===t&&0===r,rowId:`${c}-${t}`},e.id)))},t))),r]})};const kS=function({title:e,icon:t,children:n}){return(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)("div",{className:"block-editor-inserter__panel-header",children:[(0,$.jsx)("h2",{className:"block-editor-inserter__panel-title",children:e}),(0,$.jsx)(os.Icon,{icon:t})]}),(0,$.jsx)("div",{className:"block-editor-inserter__panel-content",children:n})]})},vS=(e,t,n)=>{const o=(0,a.useMemo)((()=>({[oe]:!n})),[n]),[r]=(0,c.useSelect)((t=>[t(li).getInserterItems(e,o)]),[e,o]),[i,s]=(0,c.useSelect)((e=>{const{getCategories:t,getCollections:n}=e(l.store);return[t(),n()]}),[]);return[r,i,s,(0,a.useCallback)((({name:e,initialAttributes:n,innerBlocks:o,syncStatus:r,content:i,rootClientId:s},a)=>{const c="unsynced"===r?(0,l.parse)(i,{__unstableSkipMigrationLogs:!0}):(0,l.createBlock)(e,n,(0,l.createBlocksFromInnerBlocksTemplate)(o));t(c,void 0,a,s)}),[t])]};const _S=function({children:e}){return(0,$.jsx)(os.Composite,{focusShift:!0,focusWrap:"horizontal",render:(0,$.jsx)($.Fragment,{}),children:e})};const xS=function(){return(0,$.jsxs)("div",{className:"block-editor-inserter__no-results",children:[(0,$.jsx)(hl,{className:"block-editor-inserter__no-results-icon",icon:$f}),(0,$.jsx)("p",{children:(0,C.__)("No results found.")})]})},yS=e=>e.name.split("/")[0],SS=6,wS=[];function CS({items:e,collections:t,categories:n,onSelectItem:o,onHover:r,showMostUsedBlocks:i,className:s}){const l=(0,a.useMemo)((()=>he(e,"frecency","desc").slice(0,SS)),[e]),c=(0,a.useMemo)((()=>e.filter((e=>!e.category))),[e]),d=(0,a.useMemo)((()=>{const n={...t};return Object.keys(t).forEach((t=>{n[t]=e.filter((e=>yS(e)===t)),0===n[t].length&&delete n[t]})),n}),[e,t]);(0,a.useEffect)((()=>()=>r(null)),[]);const p=(0,u.useAsyncList)(n),h=n.length===p.length,g=(0,a.useMemo)((()=>Object.entries(t)),[t]),m=(0,u.useAsyncList)(h?g:wS);return(0,$.jsxs)("div",{className:s,children:[i&&e.length>3&&!!l.length&&(0,$.jsx)(kS,{title:(0,C._x)("Most used","blocks"),children:(0,$.jsx)(bS,{items:l,onSelect:o,onHover:r,label:(0,C._x)("Most used","blocks")})}),p.map((t=>{const n=e.filter((e=>e.category===t.slug));return n&&n.length?(0,$.jsx)(kS,{title:t.title,icon:t.icon,children:(0,$.jsx)(bS,{items:n,onSelect:o,onHover:r,label:t.title})},t.slug):null})),h&&c.length>0&&(0,$.jsx)(kS,{className:"block-editor-inserter__uncategorized-blocks-panel",title:(0,C.__)("Uncategorized"),children:(0,$.jsx)(bS,{items:c,onSelect:o,onHover:r,label:(0,C.__)("Uncategorized")})}),m.map((([e,t])=>{const n=d[e];return n&&n.length?(0,$.jsx)(kS,{title:t.title,icon:t.icon,children:(0,$.jsx)(bS,{items:n,onSelect:o,onHover:r,label:t.title})},e):null}))]})}const BS=(0,a.forwardRef)((function({rootClientId:e,onInsert:t,onHover:n,showMostUsedBlocks:o},r){const[i,s,l,a]=vS(e,t);if(!i.length)return(0,$.jsx)(xS,{});const c=[],u=[];for(const t of i)"reusable"!==t.category&&(e&&t.rootClientId===e?c.push(t):u.push(t));return(0,$.jsx)(_S,{children:(0,$.jsxs)("div",{ref:r,children:[!!c.length&&(0,$.jsx)($.Fragment,{children:(0,$.jsx)(CS,{items:c,categories:s,collections:l,onSelectItem:a,onHover:n,showMostUsedBlocks:o,className:"block-editor-inserter__insertable-blocks-at-selection"})}),(0,$.jsx)(CS,{items:u,categories:s,collections:l,onSelectItem:a,onHover:n,showMostUsedBlocks:o,className:"block-editor-inserter__all-blocks"})]})})}));function IS({selectedCategory:e,patternCategories:t,onClickCategory:n}){const o="block-editor-block-patterns-explorer__sidebar";return(0,$.jsx)("div",{className:`${o}__categories-list`,children:t.map((({name:t,label:r})=>(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,label:r,className:`${o}__categories-list__item`,isPressed:e===t,onClick:()=>{n(t)},children:r},t)))})}function jS({searchValue:e,setSearchValue:t}){return(0,$.jsx)("div",{className:"block-editor-block-patterns-explorer__search",children:(0,$.jsx)(os.SearchControl,{__nextHasNoMarginBottom:!0,onChange:t,value:e,label:(0,C.__)("Search for patterns"),placeholder:(0,C.__)("Search")})})}const ES=function({selectedCategory:e,patternCategories:t,onClickCategory:n,searchValue:o,setSearchValue:r}){return(0,$.jsxs)("div",{className:"block-editor-block-patterns-explorer__sidebar",children:[(0,$.jsx)(jS,{searchValue:o,setSearchValue:r}),!o&&(0,$.jsx)(IS,{selectedCategory:e,patternCategories:t,onClickCategory:n})]})};function TS({currentPage:e,numPages:t,changePage:n,totalItems:o}){return(0,$.jsxs)(os.__experimentalVStack,{className:"block-editor-patterns__grid-pagination-wrapper",children:[(0,$.jsx)(os.__experimentalText,{variant:"muted",children:(0,C.sprintf)((0,C._n)("%s item","%s items",o),o)}),t>1&&(0,$.jsxs)(os.__experimentalHStack,{expanded:!1,spacing:3,justify:"flex-start",className:"block-editor-patterns__grid-pagination",children:[(0,$.jsxs)(os.__experimentalHStack,{expanded:!1,spacing:1,className:"block-editor-patterns__grid-pagination-previous",children:[(0,$.jsx)(os.Button,{__next40pxDefaultSize:!1,variant:"tertiary",onClick:()=>n(1),disabled:1===e,"aria-label":(0,C.__)("First page"),accessibleWhenDisabled:!0,children:(0,$.jsx)("span",{children:"«"})}),(0,$.jsx)(os.Button,{__next40pxDefaultSize:!1,variant:"tertiary",onClick:()=>n(e-1),disabled:1===e,"aria-label":(0,C.__)("Previous page"),accessibleWhenDisabled:!0,children:(0,$.jsx)("span",{children:"‹"})})]}),(0,$.jsx)(os.__experimentalText,{variant:"muted",children:(0,C.sprintf)((0,C._x)("%1$s of %2$s","paging"),e,t)}),(0,$.jsxs)(os.__experimentalHStack,{expanded:!1,spacing:1,className:"block-editor-patterns__grid-pagination-next",children:[(0,$.jsx)(os.Button,{__next40pxDefaultSize:!1,variant:"tertiary",onClick:()=>n(e+1),disabled:e===t,"aria-label":(0,C.__)("Next page"),accessibleWhenDisabled:!0,children:(0,$.jsx)("span",{children:"›"})}),(0,$.jsx)(os.Button,{variant:"tertiary",onClick:()=>n(t),disabled:e===t,"aria-label":(0,C.__)("Last page"),size:"default",accessibleWhenDisabled:!0,children:(0,$.jsx)("span",{children:"»"})})]})]})]})}const MS=({showTooltip:e,title:t,children:n})=>e?(0,$.jsx)(os.Tooltip,{text:t,children:n}):(0,$.jsx)($.Fragment,{children:n});function PS({id:e,isDraggable:t,pattern:n,onClick:o,onHover:r,showTitle:i=!0,showTooltip:s,category:c}){const[d,p]=(0,a.useState)(!1),{blocks:h,viewportWidth:g}=n,m=`block-editor-block-patterns-list__item-description-${(0,u.useInstanceId)(PS)}`,f=(0,a.useMemo)((()=>c&&t?(null!=h?h:[]).map((e=>{const t=(0,l.cloneBlock)(e);return t.attributes.metadata?.categories?.includes(c)&&(t.attributes.metadata.categories=[c]),t})):h),[h,t,c]);return(0,$.jsx)(pS,{isEnabled:t,blocks:f,pattern:n,children:({draggable:t,onDragStart:l,onDragEnd:a})=>(0,$.jsx)("div",{className:"block-editor-block-patterns-list__list-item",draggable:t,onDragStart:e=>{p(!0),l&&(r?.(null),l(e))},onDragEnd:e=>{p(!1),a&&a(e)},children:(0,$.jsx)(MS,{showTooltip:s&&!n.type!==ge.user,title:n.title,children:(0,$.jsxs)(os.Composite.Item,{render:(0,$.jsx)("div",{role:"option","aria-label":n.title,"aria-describedby":n.description?m:void 0,className:Zi("block-editor-block-patterns-list__item",{"block-editor-block-patterns-list__list-item-synced":n.type===ge.user&&!n.syncStatus})}),id:e,onClick:()=>{o(n,h),r?.(null)},onMouseEnter:()=>{d||r?.(n)},onMouseLeave:()=>r?.(null),children:[(0,$.jsx)(sS,{blocks:h,viewportWidth:g}),i&&(0,$.jsxs)(os.__experimentalHStack,{className:"block-editor-patterns__pattern-details",spacing:2,children:[n.type===ge.user&&!n.syncStatus&&(0,$.jsx)("div",{className:"block-editor-patterns__pattern-icon-wrapper",children:(0,$.jsx)(hl,{className:"block-editor-patterns__pattern-icon",icon:U})}),(!s||n.type===ge.user)&&(0,$.jsx)("div",{className:"block-editor-block-patterns-list__item-title",children:n.title})]}),!!n.description&&(0,$.jsx)(os.VisuallyHidden,{id:m,children:n.description})]})})})})}function RS(){return(0,$.jsx)("div",{className:"block-editor-block-patterns-list__item is-placeholder"})}const NS=(0,a.forwardRef)((function({isDraggable:e,blockPatterns:t,shownPatterns:n,onHover:o,onClickPattern:r,orientation:i,label:s=(0,C.__)("Block patterns"),category:l,showTitle:c=!0,showTitlesAsTooltip:u,pagingProps:d},p){const[h,g]=(0,a.useState)(void 0);return(0,a.useEffect)((()=>{const e=t.find((e=>n.includes(e)))?.name;g(e)}),[n,t]),(0,$.jsxs)(os.Composite,{orientation:i,activeId:h,setActiveId:g,role:"listbox",className:"block-editor-block-patterns-list","aria-label":s,ref:p,children:[t.map((t=>n.includes(t)?(0,$.jsx)(PS,{id:t.name,pattern:t,onClick:r,onHover:o,isDraggable:e,showTitle:c,showTooltip:u,category:l},t.name):(0,$.jsx)(RS,{},t.name))),d&&(0,$.jsx)(TS,{...d})]})}));function LS({destinationRootClientId:e,destinationIndex:t,rootClientId:n,registry:o}){if(n===e)return t;const r=["",...o.select(li).getBlockParents(e),e],i=r.indexOf(n);return-1!==i?o.select(li).getBlockIndex(r[i+1])+1:o.select(li).getBlockOrder(n).length}const AS=function({rootClientId:e="",insertionIndex:t,clientId:n,isAppender:o,onSelect:r,shouldFocusBlock:i=!0,selectBlockOnInsert:s=!0}){const u=(0,c.useRegistry)(),{getSelectedBlock:d}=(0,c.useSelect)(li),{destinationRootClientId:p,destinationIndex:h}=(0,c.useSelect)((r=>{const{getSelectedBlockClientId:i,getBlockRootClientId:s,getBlockIndex:l,getBlockOrder:a,getSectionRootClientId:c,__unstableGetEditorMode:u}=te(r(li)),d=i();let p,h=e;if(void 0!==t)p=t;else if(n)p=l(n);else if(!o&&d){const e=c();"zoom-out"===u()&&e===d?(h=e,p=a(h).length):(h=s(d),p=l(d)+1)}else p=a(h).length;return{destinationRootClientId:h,destinationIndex:p}}),[e,t,n,o]),{replaceBlocks:g,insertBlocks:m,showInsertionPoint:f,hideInsertionPoint:b,setLastFocus:k}=te((0,c.useDispatch)(li)),v=(0,a.useCallback)(((e,t,n=!1,a)=>{(n||i||s)&&k(null);const c=d();!o&&c&&(0,l.isUnmodifiedDefaultBlock)(c)?g(c.clientId,e,null,i||n?0:null,t):m(e,o||void 0===a?h:LS({destinationRootClientId:p,destinationIndex:h,rootClientId:a,registry:u}),o||void 0===a?p:a,s,i||n?0:null,t);const f=Array.isArray(e)?e.length:1,b=(0,C.sprintf)((0,C._n)("%d block added.","%d blocks added.",f),f);(0,$o.speak)(b),r&&r(e)}),[o,d,g,m,p,h,r,i,s]),_=(0,a.useCallback)((e=>{e?.hasOwnProperty("rootClientId")?f(e.rootClientId,LS({destinationRootClientId:p,destinationIndex:h,rootClientId:e.rootClientId,registry:u})):b()}),[f,b,p,h]);return[p,v,_]},DS=(e,t,n)=>{const{patternCategories:o,patterns:r,userPatternCategories:i}=(0,c.useSelect)((e=>{const{__experimentalGetAllowedPatterns:n,getSettings:o}=e(li),{__experimentalUserPatternCategories:r,__experimentalBlockPatternCategories:i}=o();return{patterns:n(t),userPatternCategories:r,patternCategories:i}}),[t]),s=(0,a.useMemo)((()=>{const e=[...o];return i?.forEach((t=>{e.find((e=>e.name===t.name))||e.push(t)})),e}),[o,i]),{createSuccessNotice:u}=(0,c.useDispatch)(Uo.store),d=(0,a.useCallback)(((t,o)=>{const r=t.type===ge.user&&"unsynced"!==t.syncStatus?[(0,l.createBlock)("core/block",{ref:t.id})]:o;e((null!=r?r:[]).map((e=>{const t=(0,l.cloneBlock)(e);return t.attributes.metadata?.categories?.includes(n)&&(t.attributes.metadata.categories=[n]),t})),t.name),u((0,C.sprintf)((0,C.__)('Block pattern "%s" inserted.'),t.title),{type:"snackbar",id:"block-pattern-inserted-notice"})}),[u,e,n]);return[r,s,d]};var OS=n(9681),zS=n.n(OS);function VS(e){return e.toLowerCase()}var FS=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],HS=/[^A-Z0-9]+/gi;function GS(e,t,n){return t instanceof RegExp?e.replace(t,n):t.reduce((function(e,t){return e.replace(t,n)}),e)}const $S=e=>e.name||"",US=e=>e.title,WS=e=>e.description||"",KS=e=>e.keywords||[],ZS=e=>e.category,qS=()=>null,YS=[/([\p{Ll}\p{Lo}\p{N}])([\p{Lu}\p{Lt}])/gu,/([\p{Lu}\p{Lt}])([\p{Lu}\p{Lt}][\p{Ll}\p{Lo}])/gu],XS=/(\p{C}|\p{P}|\p{S})+/giu,QS=new Map,JS=new Map;function ew(e=""){if(QS.has(e))return QS.get(e);const t=function(e,t){void 0===t&&(t={});for(var n=t.splitRegexp,o=void 0===n?FS:n,r=t.stripRegexp,i=void 0===r?HS:r,s=t.transform,l=void 0===s?VS:s,a=t.delimiter,c=void 0===a?" ":a,u=GS(GS(e,o,"$1\0$2"),i,"\0"),d=0,p=u.length;"\0"===u.charAt(d);)d++;for(;"\0"===u.charAt(p-1);)p--;return u.slice(d,p).split("\0").map(l).join(c)}(e,{splitRegexp:YS,stripRegexp:XS}).split(" ").filter(Boolean);return QS.set(e,t),t}function tw(e=""){if(JS.has(e))return JS.get(e);let t=zS()(e);return t=t.replace(/^\//,""),t=t.toLowerCase(),JS.set(e,t),t}const nw=(e="")=>ew(tw(e)),ow=(e,t,n,o)=>{if(0===nw(o).length)return e;return rw(e,o,{getCategory:e=>t.find((({slug:t})=>t===e.category))?.title,getCollection:e=>n[e.name.split("/")[0]]?.title})},rw=(e=[],t="",n={})=>{if(0===nw(t).length)return e;const o=e.map((e=>[e,iw(e,t,n)])).filter((([,e])=>e>0));return o.sort((([,e],[,t])=>t-e)),o.map((([e])=>e))};function iw(e,t,n={}){const{getName:o=$S,getTitle:r=US,getDescription:i=WS,getKeywords:s=KS,getCategory:l=ZS,getCollection:a=qS}=n,c=o(e),u=r(e),d=i(e),p=s(e),h=l(e),g=a(e),m=tw(t),f=tw(u);let b=0;if(m===f)b+=30;else if(f.startsWith(m))b+=20;else{const e=[c,u,d,...p,h,g].join(" ");0===((e,t)=>e.filter((e=>!nw(t).some((t=>t.includes(e))))))(ew(m),e).length&&(b+=10)}if(0!==b&&c.startsWith("core/")){b+=c!==e.id?1:2}return b}const sw=20,lw=5;function aw(e,t,n,o=""){const[r,i]=(0,a.useState)(1),s=(0,u.usePrevious)(t),l=(0,u.usePrevious)(o);s===t&&l===o||1===r||i(1);const c=e.length,d=r-1,p=(0,a.useMemo)((()=>e.slice(d*sw,d*sw+sw)),[d,e]),h=(0,u.useAsyncList)(p,{step:lw}),g=Math.ceil(e.length/sw);return(0,a.useEffect)((function(){const e=(0,ba.getScrollContainer)(n?.current);e?.scrollTo(0,0)}),[t,n]),{totalItems:c,categoryPatterns:p,categoryPatternsAsyncList:h,numPages:g,changePage:e=>{const t=(0,ba.getScrollContainer)(n?.current);t?.scrollTo(0,0),i(e)},currentPage:r}}function cw({filterValue:e,filteredBlockPatternsLength:t}){return e?(0,$.jsx)(os.__experimentalHeading,{level:2,lineHeight:"48px",className:"block-editor-block-patterns-explorer__search-results-count",children:(0,C.sprintf)((0,C._n)("%d pattern found","%d patterns found",t),t)}):null}const uw=function({searchValue:e,selectedCategory:t,patternCategories:n,rootClientId:o}){const r=(0,a.useRef)(),i=(0,u.useDebounce)($o.speak,500),[s,l]=AS({rootClientId:o,shouldFocusBlock:!0}),[c,,d]=DS(l,s,t),p=(0,a.useMemo)((()=>n.map((e=>e.name))),[n]),h=(0,a.useMemo)((()=>{const n=c.filter((e=>{if(t===fe.name)return!0;if(t===be.name&&e.type===ge.user)return!0;if("uncategorized"===t){var n;const t=null!==(n=e.categories?.some((e=>p.includes(e))))&&void 0!==n&&n;return!e.categories?.length||!t}return e.categories?.includes(t)}));return e?rw(n,e):n}),[e,c,t,p]);(0,a.useEffect)((()=>{if(!e)return;const t=h.length,n=(0,C.sprintf)((0,C._n)("%d result found.","%d results found.",t),t);i(n)}),[e,i,h.length]);const g=aw(h,t,r),[m,f]=(0,a.useState)(e);e!==m&&(f(e),g.changePage(1));const b=!!h?.length;return(0,$.jsxs)("div",{className:"block-editor-block-patterns-explorer__list",ref:r,children:[(0,$.jsx)(cw,{filterValue:e,filteredBlockPatternsLength:h.length}),(0,$.jsx)(_S,{children:b&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(NS,{shownPatterns:g.categoryPatternsAsyncList,blockPatterns:g.categoryPatterns,onClickPattern:d,isDraggable:!1}),(0,$.jsx)(TS,{...g})]})})]})};function dw(e,t="all"){const[n,o]=DS(void 0,e),r=(0,a.useMemo)((()=>"all"===t?n:n.filter((e=>!ke(e,t)))),[t,n]),i=(0,a.useMemo)((()=>{const e=o.filter((e=>r.some((t=>t.categories?.includes(e.name))))).sort(((e,t)=>e.label.localeCompare(t.label)));return r.some((e=>!function(e,t){return!(!e.categories||!e.categories.length)&&e.categories.some((e=>t.some((t=>t.name===e))))}(e,o)))&&!e.find((e=>"uncategorized"===e.name))&&e.push({name:"uncategorized",label:(0,C._x)("Uncategorized")}),r.some((e=>e.type===ge.user))&&e.unshift(be),r.length>0&&e.unshift({name:fe.name,label:fe.label}),(0,$o.speak)((0,C.sprintf)((0,C._n)("%d category button displayed.","%d category buttons displayed.",e.length),e.length)),e}),[o,r]);return i}function pw({initialCategory:e,rootClientId:t}){const[n,o]=(0,a.useState)(""),[r,i]=(0,a.useState)(e?.name),s=dw(t);return(0,$.jsxs)("div",{className:"block-editor-block-patterns-explorer",children:[(0,$.jsx)(ES,{selectedCategory:r,patternCategories:s,onClickCategory:i,searchValue:n,setSearchValue:o}),(0,$.jsx)(uw,{searchValue:n,selectedCategory:r,patternCategories:s,rootClientId:t})]})}const hw=function({onModalClose:e,...t}){return(0,$.jsx)(os.Modal,{title:(0,C.__)("Patterns"),onRequestClose:e,isFullScreen:!0,children:(0,$.jsx)(pw,{...t})})};function gw({title:e}){return(0,$.jsx)(os.__experimentalVStack,{spacing:0,children:(0,$.jsx)(os.__experimentalView,{children:(0,$.jsx)(os.__experimentalSpacer,{marginBottom:0,paddingX:4,paddingY:3,children:(0,$.jsxs)(os.__experimentalHStack,{spacing:2,children:[(0,$.jsx)(os.__experimentalNavigatorBackButton,{style:{minWidth:24,padding:0},icon:(0,C.isRTL)()?Hf:Gf,size:"small",label:(0,C.__)("Back")}),(0,$.jsx)(os.__experimentalSpacer,{children:(0,$.jsx)(os.__experimentalHeading,{level:5,children:e})})]})})})})}function mw({categories:e,children:t}){return(0,$.jsxs)(os.__experimentalNavigatorProvider,{initialPath:"/",className:"block-editor-inserter__mobile-tab-navigation",children:[(0,$.jsx)(os.__experimentalNavigatorScreen,{path:"/",children:(0,$.jsx)(os.__experimentalItemGroup,{children:e.map((e=>(0,$.jsx)(os.__experimentalNavigatorButton,{path:`/category/${e.name}`,as:os.__experimentalItem,isAction:!0,children:(0,$.jsxs)(os.__experimentalHStack,{children:[(0,$.jsx)(os.FlexBlock,{children:e.label}),(0,$.jsx)(hl,{icon:(0,C.isRTL)()?Gf:Hf})]})},e.name)))})}),e.map((e=>(0,$.jsxs)(os.__experimentalNavigatorScreen,{path:`/category/${e.name}`,children:[(0,$.jsx)(gw,{title:(0,C.__)("Back")}),t(e)]},e.name)))]})}const fw=e=>"all"!==e&&"user"!==e,bw=e=>e.name===be.name,kw=[{value:"all",label:(0,C._x)("All","patterns")},{value:ge.directory,label:(0,C.__)("Pattern Directory")},{value:ge.theme,label:(0,C.__)("Theme & Plugins")},{value:ge.user,label:(0,C.__)("User")}];function vw({setPatternSyncFilter:e,setPatternSourceFilter:t,patternSyncFilter:n,patternSourceFilter:o,scrollContainerRef:r,category:i}){const s=i.name===be.name?ge.user:o,l=fw(s),c=bw(i),u=(0,a.useMemo)((()=>[{value:"all",label:(0,C._x)("All","patterns")},{value:me.full,label:(0,C._x)("Synced","patterns"),disabled:l},{value:me.unsynced,label:(0,C._x)("Not synced","patterns"),disabled:l}]),[l]);return(0,$.jsx)($.Fragment,{children:(0,$.jsx)(os.DropdownMenu,{popoverProps:{placement:"right-end"},label:(0,C.__)("Filter patterns"),toggleProps:{size:"compact"},icon:(0,$.jsx)(hl,{icon:(0,$.jsx)(os.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,$.jsx)(os.Path,{d:"M10 17.5H14V16H10V17.5ZM6 6V7.5H18V6H6ZM8 12.5H16V11H8V12.5Z",fill:"currentColor"})})}),children:()=>(0,$.jsxs)($.Fragment,{children:[!c&&(0,$.jsx)(os.MenuGroup,{label:(0,C.__)("Source"),children:(0,$.jsx)(os.MenuItemsChoice,{choices:kw,onSelect:n=>{var o;t(o=n),fw(o)&&e("all"),r.current?.scrollTo(0,0)},value:s})}),(0,$.jsx)(os.MenuGroup,{label:(0,C.__)("Type"),children:(0,$.jsx)(os.MenuItemsChoice,{choices:u,onSelect:t=>{e(t),r.current?.scrollTo(0,0)},value:n})}),(0,$.jsx)("div",{className:"block-editor-tool-selector__help",children:(0,a.createInterpolateElement)((0,C.__)("Patterns are available from the <Link>WordPress.org Pattern Directory</Link>, bundled in the active theme, or created by users on this site. Only patterns created on this site can be synced."),{Link:(0,$.jsx)(os.ExternalLink,{href:(0,C.__)("https://wordpress.org/patterns/")})})})]})})})}const _w=()=>{};function xw({rootClientId:e,onInsert:t,onHover:n=_w,category:o,showTitlesAsTooltip:r}){const i=(0,c.useSelect)((e=>"zoom-out"===e(li).__unstableGetEditorMode()),[]),[s,,l]=DS(t,e,o?.name),[u,d]=(0,a.useState)("all"),[p,h]=(0,a.useState)("all"),g=dw(e,p),m=(0,a.useRef)(),f=(0,a.useMemo)((()=>s.filter((e=>!ke(e,p,u)&&(o.name===fe.name||(o.name===be.name&&e.type===ge.user||("uncategorized"===o.name?!e.categories||!e.categories.some((e=>g.some((t=>t.name===e)))):e.categories?.includes(o.name))))))),[s,g,o.name,p,u]),b=aw(f,o,m),{changePage:k}=b;(0,a.useEffect)((()=>()=>n(null)),[]);const v=(0,a.useCallback)((e=>{d(e),k(1)}),[d,k]),_=(0,a.useCallback)((e=>{h(e),k(1)}),[h,k]);return(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(os.__experimentalVStack,{spacing:2,className:"block-editor-inserter__patterns-category-panel-header",children:[(0,$.jsxs)(os.__experimentalHStack,{children:[(0,$.jsx)(os.FlexBlock,{children:(0,$.jsx)(os.__experimentalHeading,{className:"block-editor-inserter__patterns-category-panel-title",size:13,level:4,as:"div",children:o.label})}),(0,$.jsx)(vw,{patternSyncFilter:u,patternSourceFilter:p,setPatternSyncFilter:v,setPatternSourceFilter:_,scrollContainerRef:m,category:o})]}),!f.length&&(0,$.jsx)(os.__experimentalText,{variant:"muted",className:"block-editor-inserter__patterns-category-no-results",children:(0,C.__)("No results found")})]}),f.length>0&&(0,$.jsxs)($.Fragment,{children:[i&&(0,$.jsx)(os.__experimentalText,{size:"12",as:"p",className:"block-editor-inserter__help-text",children:(0,C.__)("Drag and drop patterns into the canvas.")}),(0,$.jsx)(NS,{ref:m,shownPatterns:b.categoryPatternsAsyncList,blockPatterns:b.categoryPatterns,onClickPattern:l,onHover:n,label:o.label,orientation:"vertical",category:o.name,isDraggable:!0,showTitlesAsTooltip:r,patternFilter:p,pagingProps:b})]})]})}const{Tabs:yw}=te(os.privateApis);const Sw=function({categories:e,selectedCategory:t,onSelectCategory:n,children:o}){const r={type:"tween",duration:(0,u.useReducedMotion)()?0:.25,ease:[.6,0,.4,1]},i=(0,u.usePrevious)(t);return(0,$.jsxs)(yw,{className:"block-editor-inserter__category-tabs",selectOnMove:!1,selectedTabId:t?t.name:null,orientation:"vertical",onSelect:t=>{n(e.find((e=>e.name===t)))},children:[(0,$.jsx)(yw.TabList,{className:"block-editor-inserter__category-tablist",children:e.map((e=>(0,$.jsx)(yw.Tab,{tabId:e.name,className:"block-editor-inserter__category-tab","aria-label":e.label,"aria-current":e===t?"true":void 0,children:(0,$.jsxs)(os.__experimentalHStack,{children:[(0,$.jsx)(os.FlexBlock,{children:e.label}),(0,$.jsx)(hl,{icon:(0,C.isRTL)()?Gf:Hf})]})},e.name)))}),e.map((e=>(0,$.jsx)(yw.TabPanel,{tabId:e.name,focusable:!1,children:(0,$.jsx)(os.__unstableMotion.div,{className:"block-editor-inserter__category-panel",initial:i?"open":"closed",animate:"open",variants:{open:{transform:"translateX( 0 )",transitionEnd:{zIndex:"1"}},closed:{transform:"translateX( -100% )",zIndex:"-1"}},transition:r,children:o})},e.name)))]})};const ww=function({onSelectCategory:e,selectedCategory:t,onInsert:n,rootClientId:o,setHasCategories:r,children:i}){const[s,l]=(0,a.useState)(!1),d=dw(o),p=(0,u.useViewportMatch)("medium","<"),h=(0,c.useSelect)((e=>te(e(li)).isResolvingPatterns()),[]);return(0,a.useEffect)((()=>{r(!!d.length)}),[d,r]),h?(0,$.jsx)("div",{className:"block-editor-inserter__patterns-loading",children:(0,$.jsx)(os.Spinner,{})}):d.length?(0,$.jsxs)($.Fragment,{children:[!p&&(0,$.jsxs)("div",{className:"block-editor-inserter__block-patterns-tabs-container",children:[(0,$.jsx)(Sw,{categories:d,selectedCategory:t,onSelectCategory:e,children:i}),(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,className:"block-editor-inserter__patterns-explore-button",onClick:()=>l(!0),variant:"secondary",children:(0,C.__)("Explore all patterns")})]}),p&&(0,$.jsx)(mw,{categories:d,children:e=>(0,$.jsx)("div",{className:"block-editor-inserter__category-panel",children:(0,$.jsx)(xw,{onInsert:n,rootClientId:o,category:e,showTitlesAsTooltip:!1},e.name)})}),s&&(0,$.jsx)(hw,{initialCategory:t||d[0],patternCategories:d,onModalClose:()=>l(!1),rootClientId:o})]}):(0,$.jsx)(xS,{})},Cw=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"})}),Bw={image:"img",video:"video",audio:"audio"};function Iw(e,t){const n={id:e.id||void 0,caption:e.caption||void 0},o=e.url,r=e.alt||void 0;"image"===t?(n.url=o,n.alt=r):["video","audio"].includes(t)&&(n.src=o);const i=Bw[t],s=(0,$.jsx)(i,{src:e.previewUrl||o,alt:r,controls:"audio"===t||void 0,inert:"true",onError:({currentTarget:t})=>{t.src===e.previewUrl&&(t.src=o)}});return[(0,l.createBlock)(`core/${t}`,n),s]}const jw=["image"],Ew=25,Tw={position:"bottom left",className:"block-editor-inserter__media-list__item-preview-options__popover"};function Mw({category:e,media:t}){if(!e.getReportUrl)return null;const n=e.getReportUrl(t);return(0,$.jsx)(os.DropdownMenu,{className:"block-editor-inserter__media-list__item-preview-options",label:(0,C.__)("Options"),popoverProps:Tw,icon:lb,children:()=>(0,$.jsx)(os.MenuGroup,{children:(0,$.jsx)(os.MenuItem,{onClick:()=>window.open(n,"_blank").focus(),icon:Cw,children:(0,C.sprintf)((0,C.__)("Report %s"),e.mediaType)})})})}function Pw({onClose:e,onSubmit:t}){return(0,$.jsxs)(os.Modal,{title:(0,C.__)("Insert external image"),onRequestClose:e,className:"block-editor-inserter-media-tab-media-preview-inserter-external-image-modal",children:[(0,$.jsxs)(os.__experimentalVStack,{spacing:3,children:[(0,$.jsx)("p",{children:(0,C.__)("This image cannot be uploaded to your Media Library, but it can still be inserted as an external image.")}),(0,$.jsx)("p",{children:(0,C.__)("External images can be removed by the external provider without warning and could even have legal compliance issues related to privacy legislation.")})]}),(0,$.jsxs)(os.Flex,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1,children:[(0,$.jsx)(os.FlexItem,{children:(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:e,children:(0,C.__)("Cancel")})}),(0,$.jsx)(os.FlexItem,{children:(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:t,children:(0,C.__)("Insert")})})]})]})}function Rw({media:e,onClick:t,category:n}){const[o,r]=(0,a.useState)(!1),[i,s]=(0,a.useState)(!1),[u,d]=(0,a.useState)(!1),[p,h]=(0,a.useMemo)((()=>Iw(e,n.mediaType)),[e,n.mediaType]),{createErrorNotice:g,createSuccessNotice:m}=(0,c.useDispatch)(Uo.store),{getSettings:f}=(0,c.useSelect)(li),b=(0,a.useCallback)((e=>{if(u)return;const n=f(),o=(0,l.cloneBlock)(e),{id:i,url:s,caption:a}=o.attributes;i||n.mediaUpload?i?t(o):(d(!0),window.fetch(s).then((e=>e.blob())).then((e=>{n.mediaUpload({filesList:[e],additionalData:{caption:a},onFileChange([e]){(0,ka.isBlobURL)(e.url)||(t({...o,attributes:{...o.attributes,id:e.id,url:e.url}}),m((0,C.__)("Image uploaded and inserted."),{type:"snackbar"}),d(!1))},allowedTypes:jw,onError(e){g(e,{type:"snackbar"}),d(!1)}})})).catch((()=>{r(!0),d(!1)}))):r(!0)}),[u,f,t,m,g]),k="string"==typeof e.title?e.title:e.title?.rendered||(0,C.__)("no title");let v;if(k.length>Ew){const e="...";v=k.slice(0,Ew-e.length)+e}const _=(0,a.useCallback)((()=>s(!0)),[]),x=(0,a.useCallback)((()=>s(!1)),[]);return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(pS,{isEnabled:!0,blocks:[p],children:({draggable:t,onDragStart:o,onDragEnd:r})=>(0,$.jsx)("div",{className:Zi("block-editor-inserter__media-list__list-item",{"is-hovered":i}),draggable:t,onDragStart:o,onDragEnd:r,children:(0,$.jsxs)("div",{onMouseEnter:_,onMouseLeave:x,children:[(0,$.jsx)(os.Tooltip,{text:v||k,children:(0,$.jsx)(os.Composite.Item,{render:(0,$.jsx)("div",{"aria-label":k,role:"option",className:"block-editor-inserter__media-list__item"}),onClick:()=>b(p),children:(0,$.jsxs)("div",{className:"block-editor-inserter__media-list__item-preview",children:[h,u&&(0,$.jsx)("div",{className:"block-editor-inserter__media-list__item-preview-spinner",children:(0,$.jsx)(os.Spinner,{})})]})})}),!u&&(0,$.jsx)(Mw,{category:n,media:e})]})})}),o&&(0,$.jsx)(Pw,{onClose:()=>r(!1),onSubmit:()=>{t((0,l.cloneBlock)(p)),m((0,C.__)("Image inserted."),{type:"snackbar"}),r(!1)}})]})}const Nw=function({mediaList:e,category:t,onClick:n,label:o=(0,C.__)("Media List")}){return(0,$.jsx)(os.Composite,{role:"listbox",className:"block-editor-inserter__media-list","aria-label":o,children:e.map(((e,o)=>(0,$.jsx)(Rw,{media:e,category:t,onClick:n},e.id||e.sourceId||o)))})};const Lw=10;function Aw({rootClientId:e,onInsert:t,category:n}){const[o,r,i]=(0,u.useDebouncedInput)(),{mediaList:s,isLoading:l}=function(e,t={}){const[n,o]=(0,a.useState)(),[r,i]=(0,a.useState)(!1),s=(0,a.useRef)();return(0,a.useEffect)((()=>{(async()=>{const n=JSON.stringify({category:e.name,...t});s.current=n,i(!0),o([]);const r=await(e.fetch?.(t));n===s.current&&(o(r),i(!1))})()}),[e.name,...Object.values(t)]),{mediaList:n,isLoading:r}}(n,{per_page:i?20:Lw,search:i}),c="block-editor-inserter__media-panel",d=n.labels.search_items||(0,C.__)("Search");return(0,$.jsxs)("div",{className:c,children:[(0,$.jsx)(os.SearchControl,{__nextHasNoMarginBottom:!0,className:`${c}-search`,onChange:r,value:o,label:d,placeholder:d}),l&&(0,$.jsx)("div",{className:`${c}-spinner`,children:(0,$.jsx)(os.Spinner,{})}),!l&&!s?.length&&(0,$.jsx)(xS,{}),!l&&!!s?.length&&(0,$.jsx)(Nw,{rootClientId:e,onClick:t,mediaList:s,category:n})]})}const Dw=["image","video","audio"];const Ow=function({rootClientId:e,selectedCategory:t,onSelectCategory:n,setHasCategories:o,onInsert:r,children:i}){const s=function(e){const[t,n]=(0,a.useState)([]),o=(0,c.useSelect)((e=>te(e(li)).getInserterMediaCategories()),[]),{canInsertImage:r,canInsertVideo:i,canInsertAudio:s}=(0,c.useSelect)((t=>{const{canInsertBlockType:n}=t(li);return{canInsertImage:n("core/image",e),canInsertVideo:n("core/video",e),canInsertAudio:n("core/audio",e)}}),[e]);return(0,a.useEffect)((()=>{(async()=>{const e=[];if(!o)return;const t=new Map(await Promise.all(o.map((async e=>{if(e.isExternalResource)return[e.name,!0];let t=[];try{t=await e.fetch({per_page:1})}catch(e){}return[e.name,!!t.length]})))),l={image:r,video:i,audio:s};o.forEach((n=>{l[n.mediaType]&&t.get(n.name)&&e.push(n)})),e.length&&n(e)})()}),[r,i,s,o]),t}(e),l=(0,u.useViewportMatch)("medium","<"),d=(0,a.useCallback)((e=>{if(!e?.url)return;const[t]=Iw(e,e.type);r(t)}),[r]),p=(0,a.useMemo)((()=>s.map((e=>({...e,label:e.labels.name})))),[s]);return(0,a.useEffect)((()=>{o(!!p.length)}),[p,o]),p.length?(0,$.jsxs)($.Fragment,{children:[!l&&(0,$.jsxs)("div",{className:"block-editor-inserter__media-tabs-container",children:[(0,$.jsx)(Sw,{categories:p,selectedCategory:t,onSelectCategory:n,children:i}),(0,$.jsx)(wa,{children:(0,$.jsx)(Sa,{multiple:!1,onSelect:d,allowedTypes:Dw,render:({open:e})=>(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,onClick:t=>{t.target.focus(),e()},className:"block-editor-inserter__media-library-button",variant:"secondary","data-unstable-ignore-focus-outside-for-relatedtarget":".media-modal",children:(0,C.__)("Open Media Library")})})})]}),l&&(0,$.jsx)(mw,{categories:p,children:t=>(0,$.jsx)(Aw,{onInsert:r,rootClientId:e,category:t})})]}):(0,$.jsx)(xS,{})},{Fill:zw,Slot:Vw}=(0,os.createSlotFill)("__unstableInserterMenuExtension");zw.Slot=Vw;const Fw=zw,Hw=(e,t)=>t?(e.sort((({id:e},{id:n})=>{let o=t.indexOf(e),r=t.indexOf(n);return o<0&&(o=t.length),r<0&&(r=t.length),o-r})),e):e,Gw=[];const $w=function({filterValue:e,onSelect:t,onHover:n,onHoverPattern:o,rootClientId:r,clientId:i,isAppender:s,__experimentalInsertionIndex:l,maxBlockPatterns:d,maxBlockTypes:p,showBlockDirectory:h=!1,isDraggable:g=!0,shouldFocusBlock:m=!0,prioritizePatterns:f,selectBlockOnInsert:b,isQuick:k}){const v=(0,u.useDebounce)($o.speak,500),{prioritizedBlocks:_}=(0,c.useSelect)((e=>{const t=e(li).getBlockListSettings(r);return{prioritizedBlocks:t?.prioritizedInserterBlocks||Gw}}),[r]),[x,y]=AS({onSelect:t,rootClientId:r,clientId:i,isAppender:s,insertionIndex:l,shouldFocusBlock:m,selectBlockOnInsert:b}),[S,w,B,I]=vS(x,y,k),[j,,E]=DS(y,x),T=(0,a.useMemo)((()=>{if(0===d)return[];const t=rw(j,e);return void 0!==d?t.slice(0,d):t}),[e,j,d]);let M=p;f&&T.length>2&&(M=0);const P=(0,a.useMemo)((()=>{if(0===M)return[];let t=he(S.filter((e=>"core/block"!==e.name)),"frecency","desc");!e&&_.length&&(t=Hw(t,_));const n=ow(t,w,B,e);return void 0!==M?n.slice(0,M):n}),[e,S,w,B,M,_]);(0,a.useEffect)((()=>{if(!e)return;const t=P.length+T.length,n=(0,C.sprintf)((0,C._n)("%d result found.","%d results found.",t),t);v(n)}),[e,v,P,T]);const R=(0,u.useAsyncList)(P,{step:9}),N=(0,u.useAsyncList)(R.length===P.length?T:Gw),L=P.length>0||T.length>0,A=!!P.length&&(0,$.jsx)(kS,{title:(0,$.jsx)(os.VisuallyHidden,{children:(0,C.__)("Blocks")}),children:(0,$.jsx)(bS,{items:R,onSelect:I,onHover:n,label:(0,C.__)("Blocks"),isDraggable:g})}),D=!!T.length&&(0,$.jsx)(kS,{title:(0,$.jsx)(os.VisuallyHidden,{children:(0,C.__)("Block patterns")}),children:(0,$.jsx)("div",{className:"block-editor-inserter__quick-inserter-patterns",children:(0,$.jsx)(NS,{shownPatterns:N,blockPatterns:T,onClickPattern:E,onHover:o,isDraggable:g})})});return(0,$.jsxs)(_S,{children:[!h&&!L&&(0,$.jsx)(xS,{}),f?D:A,!!P.length&&!!T.length&&(0,$.jsx)("div",{className:"block-editor-inserter__quick-inserter-separator"}),f?A:D,h&&(0,$.jsx)(Fw.Slot,{fillProps:{onSelect:I,onHover:n,filterValue:e,hasItems:L,rootClientId:x},children:e=>e.length?e:L?null:(0,$.jsx)(xS,{})})]})},Uw=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.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"})}),{Tabs:Ww}=te(os.privateApis);const Kw=(0,a.forwardRef)((function({defaultTabId:e,onClose:t,onSelect:n,selectedTab:o,tabs:r,closeButtonLabel:i},s){return(0,$.jsx)("div",{className:"block-editor-tabbed-sidebar",children:(0,$.jsxs)(Ww,{selectOnMove:!1,defaultTabId:e,onSelect:n,selectedTabId:o,children:[(0,$.jsxs)("div",{className:"block-editor-tabbed-sidebar__tablist-and-close-button",children:[(0,$.jsx)(os.Button,{className:"block-editor-tabbed-sidebar__close-button",icon:Uw,label:i,onClick:()=>t(),size:"small"}),(0,$.jsx)(Ww.TabList,{className:"block-editor-tabbed-sidebar__tablist",ref:s,children:r.map((e=>(0,$.jsx)(Ww.Tab,{tabId:e.name,className:"block-editor-tabbed-sidebar__tab",children:e.title},e.name)))})]}),r.map((e=>(0,$.jsx)(Ww.TabPanel,{tabId:e.name,focusable:!1,className:"block-editor-tabbed-sidebar__tabpanel",ref:e.panelRef,children:e.panel},e.name)))]})})}));function Zw(e=!0){const{__unstableSetEditorMode:t,setZoomLevel:n}=te((0,c.useDispatch)(li)),{__unstableGetEditorMode:o}=te((0,c.useSelect)(li)),r=(0,a.useRef)(null),i=o();(0,a.useEffect)((()=>(r.current||(r.current=i),()=>{"zoom-out"===o()&&o()!==r.current&&(t(r.current),n(100))})),[]),(0,a.useEffect)((()=>{e&&"zoom-out"!==i?(t("zoom-out"),n(50)):e||"zoom-out"!==o()||r.current===i||(t(r.current),n(100))}),[o,t,e,n])}const qw=()=>{};const Yw=(0,a.forwardRef)((function({rootClientId:e,clientId:t,isAppender:n,__experimentalInsertionIndex:o,onSelect:r,showInserterHelpPanel:i,showMostUsedBlocks:s,__experimentalFilterValue:l="",shouldFocusBlock:d=!0,onPatternCategorySelection:p,onClose:h,__experimentalInitialTab:g,__experimentalInitialCategory:m},f){const b=(0,c.useSelect)((e=>"zoom-out"===e(li).__unstableGetEditorMode()),[]),[k,v,_]=(0,u.useDebouncedInput)(l),[x,y]=(0,a.useState)(null),[S,w]=(0,a.useState)(m),[B,I]=(0,a.useState)("all"),[j,E]=(0,a.useState)(null),T=(0,u.useViewportMatch)("large"),[M,P]=(0,a.useState)(!0),[R,N]=(0,a.useState)(g||(b?"patterns":void 0));Zw(("patterns"===R||"media"===R)&&T);const[L,A,D]=AS({rootClientId:e,clientId:t,isAppender:n,insertionIndex:o,shouldFocusBlock:d}),O=(0,a.useRef)(),z=(0,a.useCallback)(((e,t,n,o)=>{A(e,t,n,o),r(e),window.requestAnimationFrame((()=>{d||O.current?.contains(f.current.ownerDocument.activeElement)||O.current?.querySelector("button").focus()}))}),[A,r,d]),V=(0,a.useCallback)(((e,t)=>{D(!1),A(e,{patternName:t}),r()}),[A,r]),F=(0,a.useCallback)((e=>{D(e),y(e)}),[D,y]),H=(0,a.useCallback)(((e,t)=>{w(e),I(t),p?.()}),[w,p]),G="patterns"===R&&M&&!_&&!!S,U="media"===R&&!!j&&M,W=(0,a.useMemo)((()=>"media"===R?null:(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(os.SearchControl,{__nextHasNoMarginBottom:!0,className:"block-editor-inserter__search",onChange:e=>{x&&y(null),v(e)},value:k,label:(0,C.__)("Search for blocks and patterns"),placeholder:(0,C.__)("Search")}),!!_&&(0,$.jsx)($w,{filterValue:_,onSelect:r,onHover:F,rootClientId:e,clientId:t,isAppender:n,__experimentalInsertionIndex:o,showBlockDirectory:!0,shouldFocusBlock:d,prioritizePatterns:"patterns"===R})]})),[R,x,y,v,k,_,r,F,d,t,e,o,n]),K=(0,a.useMemo)((()=>(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)("div",{className:"block-editor-inserter__block-list",children:(0,$.jsx)(BS,{ref:O,rootClientId:L,onInsert:z,onHover:F,showMostUsedBlocks:s})}),i&&(0,$.jsxs)("div",{className:"block-editor-inserter__tips",children:[(0,$.jsx)(os.VisuallyHidden,{as:"h2",children:(0,C.__)("A tip for using the block editor")}),(0,$.jsx)(Ff,{})]})]})),[L,z,F,s,i]),Z=(0,a.useMemo)((()=>(0,$.jsx)(ww,{rootClientId:L,onInsert:V,onSelectCategory:H,selectedCategory:S,setHasCategories:P,children:G&&(0,$.jsx)(xw,{rootClientId:L,onInsert:V,category:S,patternFilter:B,showTitlesAsTooltip:!0})})),[L,V,H,B,S,G]),q=(0,a.useMemo)((()=>(0,$.jsx)(Ow,{rootClientId:L,selectedCategory:j,onSelectCategory:E,onInsert:z,setHasCategories:P,children:U&&(0,$.jsx)(Aw,{rootClientId:L,onInsert:z,category:j})})),[L,z,j,E,U]),Y=(0,a.useRef)();return(0,a.useLayoutEffect)((()=>{Y.current&&window.requestAnimationFrame((()=>{Y.current.querySelector('[role="tab"][aria-selected="true"]')?.focus()}))}),[]),(0,$.jsxs)("div",{className:Zi("block-editor-inserter__menu",{"show-panel":G||U,"is-zoom-out":b}),ref:f,children:[(0,$.jsx)("div",{className:"block-editor-inserter__main-area",children:(0,$.jsx)(Kw,{ref:Y,onSelect:e=>{"patterns"!==e&&w(null),N(e)},onClose:h,selectedTab:R,closeButtonLabel:(0,C.__)("Close block inserter"),tabs:[{name:"blocks",title:(0,C.__)("Blocks"),panel:(0,$.jsxs)($.Fragment,{children:[W,"blocks"===R&&!_&&K]})},{name:"patterns",title:(0,C.__)("Patterns"),panel:(0,$.jsxs)($.Fragment,{children:[W,"patterns"===R&&!_&&Z]})},{name:"media",title:(0,C.__)("Media"),panel:(0,$.jsxs)($.Fragment,{children:[W,q]})}]})}),i&&x&&(0,$.jsx)(os.Popover,{className:"block-editor-inserter__preview-container__popover",placement:"right-start",offset:16,focusOnMount:!1,animate:!1,children:(0,$.jsx)(aS,{item:x})})]})}));const Xw=(0,a.forwardRef)((function(e,t){return(0,$.jsx)(Yw,{...e,onPatternCategorySelection:qw,ref:t})}));function Qw({onSelect:e,rootClientId:t,clientId:n,isAppender:o,prioritizePatterns:r,selectBlockOnInsert:i,hasSearch:s=!0}){const[l,u]=(0,a.useState)(""),[d,p]=AS({onSelect:e,rootClientId:t,clientId:n,isAppender:o,selectBlockOnInsert:i}),[h]=vS(d,p,!0),[g]=DS(p,d),{setInserterIsOpened:m,insertionIndex:f}=(0,c.useSelect)((e=>{const{getSettings:t,getBlockIndex:o,getBlockCount:r}=e(li),i=t(),s=o(n),l=r();return{setInserterIsOpened:i.__experimentalSetIsInserterOpened,insertionIndex:-1===s?l:s}}),[n]),b=g.length&&(!!l||r),k=s&&(b&&g.length>6||h.length>6);(0,a.useEffect)((()=>{m&&m(!1)}),[m]);let v=0;return b&&(v=r?4:2),(0,$.jsxs)("div",{className:Zi("block-editor-inserter__quick-inserter",{"has-search":k,"has-expand":m}),children:[k&&(0,$.jsx)(os.SearchControl,{__nextHasNoMarginBottom:!0,className:"block-editor-inserter__search",value:l,onChange:e=>{u(e)},label:(0,C.__)("Search for blocks and patterns"),placeholder:(0,C.__)("Search")}),(0,$.jsx)("div",{className:"block-editor-inserter__quick-inserter-results",children:(0,$.jsx)($w,{filterValue:l,onSelect:e,rootClientId:t,clientId:n,isAppender:o,maxBlockPatterns:v,maxBlockTypes:6,isDraggable:!1,prioritizePatterns:r,selectBlockOnInsert:i,isQuick:!0})}),m&&(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,className:"block-editor-inserter__quick-inserter-expand",onClick:()=>{m({rootClientId:t,insertionIndex:f,filterValue:l,onSelect:e})},"aria-label":(0,C.__)("Browse all. This will open the main inserter panel in the editor toolbar."),children:(0,C.__)("Browse all")})]})}const Jw=({onToggle:e,disabled:t,isOpen:n,blockTitle:o,hasSingleBlockType:r,toggleProps:i={},prioritizePatterns:s})=>{const{as:l=os.Button,label:a,onClick:c,...u}=i;let d=a;return!d&&r?d=(0,C.sprintf)((0,C._x)("Add %s","directly add the only allowed block"),o):!d&&s?d=(0,C.__)("Add pattern"):d||(d=(0,C._x)("Add block","Generic label for block inserter button")),(0,$.jsx)(l,{icon:Aa,label:d,tooltipPosition:"bottom",onClick:function(t){e&&e(t),c&&c(t)},className:"block-editor-inserter__toggle","aria-haspopup":!r&&"true","aria-expanded":!r&&n,disabled:t,...u})};class eC 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({onToggle:e,isOpen:t}){const{disabled:n,blockTitle:o,hasSingleBlockType:r,directInsertBlock:i,toggleProps:s,hasItems:l,renderToggle:a=Jw,prioritizePatterns:c}=this.props;return a({onToggle:e,isOpen:t,disabled:n||!l,blockTitle:o,hasSingleBlockType:r,directInsertBlock:i,toggleProps:s,prioritizePatterns:c})}renderContent({onClose:e}){const{rootClientId:t,clientId:n,isAppender:o,showInserterHelpPanel:r,__experimentalIsQuick:i,prioritizePatterns:s,onSelectOrClose:l,selectBlockOnInsert:a}=this.props;return i?(0,$.jsx)(Qw,{onSelect:t=>{const n=Array.isArray(t)&&t?.length?t[0]:t;l&&"function"==typeof l&&l(n),e()},rootClientId:t,clientId:n,isAppender:o,prioritizePatterns:s,selectBlockOnInsert:a}):(0,$.jsx)(Xw,{onSelect:()=>{e()},rootClientId:t,clientId:n,isAppender:o,showInserterHelpPanel:r})}render(){const{position:e,hasSingleBlockType:t,directInsertBlock:n,insertOnlyAllowedBlock:o,__experimentalIsQuick:r,onSelectOrClose:i}=this.props;return t||n?this.renderToggle({onToggle:o}):(0,$.jsx)(os.Dropdown,{className:"block-editor-inserter",contentClassName:Zi("block-editor-inserter__popover",{"is-quick":r}),popoverProps:{position:e,shift:!0},onToggle:this.onToggle,expandOnMobile:!0,headerTitle:(0,C.__)("Add a block"),renderToggle:this.renderToggle,renderContent:this.renderContent,onClose:i})}}const tC=(0,u.compose)([(0,c.withSelect)(((e,{clientId:t,rootClientId:n,shouldDirectInsert:o=!0})=>{const{getBlockRootClientId:r,hasInserterItems:i,getAllowedBlocks:s,getDirectInsertBlock:a,getSettings:c}=e(li),{getBlockVariations:u}=e(l.store),d=s(n=n||r(t)||void 0),p=o&&a(n),h=c(),g=1===d?.length&&0===u(d[0].name,"inserter")?.length;let m=!1;return g&&(m=d[0]),{hasItems:i(n),hasSingleBlockType:g,blockTitle:m?m.title:"",allowedBlockType:m,directInsertBlock:p,rootClientId:n,prioritizePatterns:h.__experimentalPreferPatternsOnRoot&&!n}})),(0,c.withDispatch)(((e,t,{select:n})=>({insertOnlyAllowedBlock(){const{rootClientId:o,clientId:r,isAppender:i,hasSingleBlockType:s,allowedBlockType:a,directInsertBlock:c,onSelectOrClose:u,selectBlockOnInsert:d}=t;if(!s&&!c)return;const{insertBlock:p}=e(li);let h;if(c){const e=function(e){const{getBlock:t,getPreviousBlockClientId:i}=n(li);if(!e||!r&&!o)return{};const s={};let l={};if(r){const e=t(r),n=t(i(r));e?.name===n?.name&&(l=n?.attributes||{})}else{const e=t(o);if(e?.innerBlocks?.length){const t=e.innerBlocks[e.innerBlocks.length-1];c&&c?.name===t.name&&(l=t.attributes)}}return e.forEach((e=>{l.hasOwnProperty(e)&&(s[e]=l[e])})),s}(c.attributesToCopy);h=(0,l.createBlock)(c.name,{...c.attributes||{},...e})}else h=(0,l.createBlock)(a.name);p(h,function(){const{getBlockIndex:e,getBlockSelectionEnd:t,getBlockOrder:s,getBlockRootClientId:l}=n(li);if(r)return e(r);const a=t();return!i&&a&&l(a)===o?e(a)+1:s(o).length}(),o,d),u&&u({clientId:h?.clientId});const g=(0,C.sprintf)((0,C.__)("%s block added"),a.title);(0,$o.speak)(g)}}))),(0,u.ifCondition)((({hasItems:e,isAppender:t,rootClientId:n,clientId:o})=>e||!t&&!n&&!o))])(eC);function nC({rootClientId:e,className:t,onFocus:n,tabIndex:o,onSelect:r},i){const s=(0,a.useRef)(),l=(0,u.useMergeRefs)([s,i]);return(0,$.jsx)(tC,{position:"bottom center",rootClientId:e,__experimentalIsQuick:!0,onSelectOrClose:(...e)=>{r&&"function"==typeof r&&r(...e),s.current?.focus()},renderToggle:({onToggle:e,disabled:r,isOpen:i,blockTitle:s,hasSingleBlockType:a})=>{const c=!a,u=a?(0,C.sprintf)((0,C._x)("Add %s","directly add the only allowed block"),s):(0,C._x)("Add block","Generic label for block inserter button");return(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,ref:l,onFocus:n,tabIndex:o,className:Zi(t,"block-editor-button-block-appender"),onClick:e,"aria-haspopup":c?"true":void 0,"aria-expanded":c?i:void 0,disabled:r,label:u,showTooltip:!0,children:(0,$.jsx)(hl,{icon:Aa})})},isAppender:!0})}const oC=(0,a.forwardRef)(((e,t)=>(y()("wp.blockEditor.ButtonBlockerAppender",{alternative:"wp.blockEditor.ButtonBlockAppender",since:"5.9"}),nC(e,t)))),rC=(0,a.forwardRef)(nC);function iC({clientId:e,contentRef:t,parentLayout:n}){const o=(0,c.useSelect)((e=>e(li).getSettings().isDistractionFree),[]),r=vp(e);if(o||!r)return null;const i=n?.isManualPlacement&&window.__experimentalEnableGridInteractivity;return(0,$.jsx)(sC,{gridClientId:e,gridElement:r,isManualGrid:i,ref:t})}const sC=(0,a.forwardRef)((({gridClientId:e,gridElement:t,isManualGrid:n},o)=>{const[r,i]=(0,a.useState)((()=>zf(t))),[s,l]=(0,a.useState)(!1);return(0,a.useEffect)((()=>{const e=[];for(const n of[t,...t.children]){const o=new window.ResizeObserver((()=>{i(zf(t))}));o.observe(n),e.push(o)}return()=>{for(const t of e)t.disconnect()}}),[t]),(0,a.useEffect)((()=>{function e(){l(!0)}function t(){l(!1)}return document.addEventListener("drag",e),document.addEventListener("dragend",t),()=>{document.removeEventListener("drag",e),document.removeEventListener("dragend",t)}}),[]),(0,$.jsx)(tm,{className:Zi("block-editor-grid-visualizer",{"is-dropping-allowed":s}),clientId:e,__unstablePopoverSlot:"__unstable-block-tools-after",children:(0,$.jsx)("div",{ref:o,className:"block-editor-grid-visualizer__grid",style:r.style,children:n?(0,$.jsx)(lC,{gridClientId:e,gridInfo:r}):Array.from({length:r.numItems},((e,t)=>(0,$.jsx)(aC,{color:r.currentColor},t)))})})}));function lC({gridClientId:e,gridInfo:t}){const[n,o]=(0,a.useState)(null),r=(0,c.useSelect)((t=>{const{getBlockOrder:n,getBlockStyles:o}=te(t(li));return o(n(e))}),[e]),i=(0,a.useMemo)((()=>{const e=[];for(const n of Object.values(r)){var t;const{columnStart:o,rowStart:r,columnSpan:i=1,rowSpan:s=1}=null!==(t=n?.layout)&&void 0!==t?t:{};o&&r&&e.push(new Lf({columnStart:o,rowStart:r,columnSpan:i,rowSpan:s}))}return e}),[r]);return Nf(1,t.numRows).map((r=>Nf(1,t.numColumns).map((s=>{var l;const a=i.some((e=>e.contains(s,r))),c=null!==(l=n?.contains(s,r))&&void 0!==l&&l;return(0,$.jsx)(aC,{color:t.currentColor,className:c&&"is-highlighted",children:a?(0,$.jsx)(uC,{column:s,row:r,gridClientId:e,gridInfo:t,setHighlightedRect:o}):(0,$.jsx)(dC,{column:s,row:r,gridClientId:e,gridInfo:t,setHighlightedRect:o})},`${r}-${s}`)}))))}function aC({color:e,children:t,className:n}){return(0,$.jsx)("div",{className:Zi("block-editor-grid-visualizer__cell",n),style:{boxShadow:`inset 0 0 0 1px color-mix(in srgb, ${e} 20%, #0000)`,color:e},children:t})}function cC(e,t,n,o,r){const{getBlockAttributes:i,getBlockRootClientId:s,canInsertBlockType:l,getBlockName:a}=(0,c.useSelect)(li),{updateBlockAttributes:d,moveBlocksToPosition:p,__unstableMarkNextChangeAsNotPersistent:h}=(0,c.useDispatch)(li),g=bg(n,o.numColumns);return function({validateDrag:e,onDragEnter:t,onDragLeave:n,onDrop:o}){const{getDraggedBlockClientIds:r}=(0,c.useSelect)(li);return(0,u.__experimentalUseDropZone)({onDragEnter(){const[n]=r();n&&e(n)&&t(n)},onDragLeave(){n()},onDrop(){const[t]=r();t&&e(t)&&o(t)}})}({validateDrag(r){const s=a(r);if(!l(s,n))return!1;const c=i(r),u=new Lf({columnStart:e,rowStart:t,columnSpan:c.style?.layout?.columnSpan,rowSpan:c.style?.layout?.rowSpan});return new Lf({columnSpan:o.numColumns,rowSpan:o.numRows}).containsRect(u)},onDragEnter(n){const o=i(n);r(new Lf({columnStart:e,rowStart:t,columnSpan:o.style?.layout?.columnSpan,rowSpan:o.style?.layout?.rowSpan}))},onDragLeave(){r((n=>n?.columnStart===e&&n?.rowStart===t?null:n))},onDrop(o){r(null);const l=i(o);d(o,{style:{...l.style,layout:{...l.style?.layout,columnStart:e,rowStart:t}}}),h(),p([o],s(o),n,g(e,t))}})}function uC({column:e,row:t,gridClientId:n,gridInfo:o,setHighlightedRect:r}){return(0,$.jsx)("div",{className:"block-editor-grid-visualizer__drop-zone",ref:cC(e,t,n,o,r)})}function dC({column:e,row:t,gridClientId:n,gridInfo:o,setHighlightedRect:r}){const{updateBlockAttributes:i,moveBlocksToPosition:s,__unstableMarkNextChangeAsNotPersistent:l}=(0,c.useDispatch)(li),a=bg(n,o.numColumns);return(0,$.jsx)(rC,{rootClientId:n,className:"block-editor-grid-visualizer__appender",ref:cC(e,t,n,o,r),style:{color:o.currentColor},onSelect:o=>{o&&(i(o.clientId,{style:{layout:{columnStart:e,rowStart:t}}}),l(),s([o.clientId],n,n,a(e,t)))}})}function pC({clientId:e,bounds:t,onChange:n,parentLayout:o}){const r=vp(e),i=r?.parentElement,{isManualPlacement:s}=o;return r&&i?(0,$.jsx)(hC,{clientId:e,bounds:t,blockElement:r,rootBlockElement:i,onChange:n,isManualGrid:s&&window.__experimentalEnableGridInteractivity}):null}function hC({clientId:e,bounds:t,blockElement:n,rootBlockElement:o,onChange:r,isManualGrid:i}){const[s,l]=(0,a.useState)(null),[c,u]=(0,a.useState)({top:!1,bottom:!1,left:!1,right:!1});(0,a.useEffect)((()=>{const e=new window.ResizeObserver((()=>{const e=n.getBoundingClientRect(),t=o.getBoundingClientRect();u({top:e.top>t.top,bottom:e.bottom<t.bottom,left:e.left>t.left,right:e.right<t.right})}));return e.observe(n),()=>e.disconnect()}),[n,o]);const d={right:"left",left:"right"},p={top:"flex-end",bottom:"flex-start"},h={display:"flex",justifyContent:"center",alignItems:"center",...d[s]&&{justifyContent:d[s]},...p[s]&&{alignItems:p[s]}};return(0,$.jsx)(tm,{className:"block-editor-grid-item-resizer",clientId:e,__unstablePopoverSlot:"__unstable-block-tools-after",additionalStyles:h,children:(0,$.jsx)(os.ResizableBox,{className:"block-editor-grid-item-resizer__box",size:{width:"100%",height:"100%"},enable:{bottom:c.bottom,bottomLeft:!1,bottomRight:!1,left:c.left,right:c.right,top:c.top,topLeft:!1,topRight:!1},bounds:t,boundsByDirection:!0,onPointerDown:({target:e,pointerId:t})=>{e.setPointerCapture(t)},onResizeStart:(e,t)=>{l(t)},onResizeStop:(e,t,s)=>{const l=parseFloat(Af(o,"column-gap")),a=parseFloat(Af(o,"row-gap")),c=Df(Af(o,"grid-template-columns"),l),u=Df(Af(o,"grid-template-rows"),a),d=new window.DOMRect(n.offsetLeft+s.offsetLeft,n.offsetTop+s.offsetTop,s.offsetWidth,s.offsetHeight),p=Of(c,d.left)+1,h=Of(u,d.top)+1,g=Of(c,d.right,"end")+1,m=Of(u,d.bottom,"end")+1;r({columnSpan:g-p+1,rowSpan:m-h+1,columnStart:i?p:void 0,rowStart:i?h:void 0})}})})}const gC=(0,$.jsx)(G.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,$.jsx)(G.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})}),mC=(0,$.jsx)(G.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,$.jsx)(G.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})});function fC({layout:e,parentLayout:t,onChange:n,gridClientId:o,blockClientId:r}){var i,s,l,a;const{moveBlocksToPosition:u,__unstableMarkNextChangeAsNotPersistent:d}=(0,c.useDispatch)(li),p=null!==(i=e?.columnStart)&&void 0!==i?i:1,h=null!==(s=e?.rowStart)&&void 0!==s?s:1,g=null!==(l=e?.columnSpan)&&void 0!==l?l:1,m=null!==(a=e?.rowSpan)&&void 0!==a?a:1,f=p+g-1,b=h+m-1,k=t?.columnCount,v=t?.rowCount,_=bg(o,k);return(0,$.jsx)(us,{group:"parent",children:(0,$.jsxs)(os.ToolbarGroup,{className:"block-editor-grid-item-mover__move-button-container",children:[(0,$.jsx)("div",{className:"block-editor-grid-item-mover__move-horizontal-button-container is-left",children:(0,$.jsx)(bC,{icon:(0,C.isRTL)()?Hf:Gf,label:(0,C.__)("Move left"),description:(0,C.__)("Move left"),isDisabled:p<=1,onClick:()=>{n({columnStart:p-1}),d(),u([r],o,o,_(p-1,h))}})}),(0,$.jsxs)("div",{className:"block-editor-grid-item-mover__move-vertical-button-container",children:[(0,$.jsx)(bC,{className:"is-up-button",icon:gC,label:(0,C.__)("Move up"),description:(0,C.__)("Move up"),isDisabled:h<=1,onClick:()=>{n({rowStart:h-1}),d(),u([r],o,o,_(p,h-1))}}),(0,$.jsx)(bC,{className:"is-down-button",icon:mC,label:(0,C.__)("Move down"),description:(0,C.__)("Move down"),isDisabled:v&&b>=v,onClick:()=>{n({rowStart:h+1}),d(),u([r],o,o,_(p,h+1))}})]}),(0,$.jsx)("div",{className:"block-editor-grid-item-mover__move-horizontal-button-container is-right",children:(0,$.jsx)(bC,{icon:(0,C.isRTL)()?Gf:Hf,label:(0,C.__)("Move right"),description:(0,C.__)("Move right"),isDisabled:k&&f>=k,onClick:()=>{n({columnStart:p+1}),d(),u([r],o,o,_(p+1,h))}})})]})})}function bC({className:e,icon:t,label:n,isDisabled:o,onClick:r,description:i}){const s=`block-editor-grid-item-mover-button__description-${(0,u.useInstanceId)(bC)}`;return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(os.ToolbarButton,{className:Zi("block-editor-grid-item-mover-button",e),icon:t,label:n,"aria-describedby":s,onClick:o?null:r,disabled:o,accessibleWhenDisabled:!0}),(0,$.jsx)(os.VisuallyHidden,{id:s,children:i})]})}function kC({clientId:e,style:t,setAttributes:n,allowSizingOnChildren:o,isManualPlacement:r,parentLayout:i}){const{rootClientId:s,isVisible:l}=(0,c.useSelect)((t=>{const{getBlockRootClientId:n,getBlockEditingMode:o,getTemplateLock:r}=t(li),i=n(e);return r(i)||"default"!==o(i)?{rootClientId:i,isVisible:!1}:{rootClientId:i,isVisible:!0}}),[e]),[u,d]=(0,a.useState)();if(!l)return null;function p(e){n({style:{...t,layout:{...t?.layout,...e}}})}return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(iC,{clientId:s,contentRef:d,parentLayout:i}),o&&(0,$.jsx)(pC,{clientId:e,bounds:u,onChange:p,parentLayout:i}),r&&window.__experimentalEnableGridInteractivity&&(0,$.jsx)(fC,{layout:t?.layout,parentLayout:i,onChange:p,gridClientId:s,blockClientId:e})]})}const vC={useBlockProps:function e({style:t}){var n;const o=(0,c.useSelect)((e=>!e(li).getSettings().disableLayoutStyles)),r=null!==(n=t?.layout)&&void 0!==n?n:{},{selfStretch:i,flexSize:s,columnStart:l,rowStart:a,columnSpan:d,rowSpan:p}=r,h=Tl()||{},{columnCount:g,minimumColumnWidth:m}=h,f=(0,u.useInstanceId)(e),b=`.wp-container-content-${f}`;let k="";if(o&&("fixed"===i&&s?k=`${b} {\n\t\t\t\tflex-basis: ${s};\n\t\t\t\tbox-sizing: border-box;\n\t\t\t}`:"fill"===i?k=`${b} {\n\t\t\t\tflex-grow: 1;\n\t\t\t}`:l&&d?k=`${b} {\n\t\t\t\tgrid-column: ${l} / span ${d};\n\t\t\t}`:l?k=`${b} {\n\t\t\t\tgrid-column: ${l};\n\t\t\t}`:d&&(k=`${b} {\n\t\t\t\tgrid-column: span ${d};\n\t\t\t}`),a&&p?k+=`${b} {\n\t\t\t\tgrid-row: ${a} / span ${p};\n\t\t\t}`:a?k+=`${b} {\n\t\t\t\tgrid-row: ${a};\n\t\t\t}`:p&&(k+=`${b} {\n\t\t\t\tgrid-row: span ${p};\n\t\t\t}`),(d||l)&&(m||!g))){let e=parseFloat(m);isNaN(e)&&(e=12);let t=m?.replace(e,"");["px","rem","em"].includes(t)||(t="rem");let n=2;n=d&&l?d+l-1:d||l;const o="px"===t?24:1.5,r=n*e+(n-1)*o,i=2*e+o-1,s=d&&d>1?"1/-1":"auto";k+=`@container (max-width: ${Math.max(r,i)}${t}) {\n\t\t\t\t${b} {\n\t\t\t\t\tgrid-column: ${s};\n\t\t\t\t\tgrid-row: auto;\n\t\t\t\t}\n\t\t\t}`}if(Ji({css:k}),k)return{className:`wp-container-content-${f}`}},edit:function({clientId:e,style:t,setAttributes:n}){const o=Tl()||{},{type:r="default",allowSizingOnChildren:i=!1,isManualPlacement:s}=o;return"grid"!==r?null:(0,$.jsx)(kC,{clientId:e,style:t,setAttributes:n,allowSizingOnChildren:i,isManualPlacement:s,parentLayout:o})},attributeKeys:["style"],hasSupport:()=>!0};const _C={edit:function({clientId:e}){const{templateLock:t,isLockedByParent:n,isEditingAsBlocks:o}=(0,c.useSelect)((t=>{const{getContentLockingParent:n,getTemplateLock:o,getTemporarilyEditingAsBlocks:r}=te(t(li));return{templateLock:o(e),isLockedByParent:!!n(e),isEditingAsBlocks:r()===e}}),[e]),{stopEditingAsBlocks:r}=te((0,c.useDispatch)(li)),i=!n&&"contentOnly"===t,s=(0,a.useCallback)((()=>{r(e)}),[e,r]);return i||o?o&&!i&&(0,$.jsx)(us,{group:"other",children:(0,$.jsx)(os.ToolbarButton,{onClick:s,children:(0,C.__)("Done")})}):null},hasSupport:()=>!0},xC="metadata";(0,d.addFilter)("blocks.registerBlockType","core/metadata/addMetaAttribute",(function(e){return e?.attributes?.[xC]?.type||(e.attributes={...e.attributes,[xC]:{type:"object"}}),e}));const yC={};const SC={edit:function({name:e,clientId:t,metadata:{ignoredHookedBlocks:n=[]}={}}){const o=(0,c.useSelect)((e=>e(l.store).getBlockTypes()),[]),r=(0,a.useMemo)((()=>o?.filter((({name:t,blockHooks:o})=>o&&e in o||n.includes(t)))),[o,e,n]),i=(0,c.useSelect)((n=>{const{getBlocks:o,getBlockRootClientId:i,getGlobalBlockCount:s}=n(li),l=i(t),a=r.reduce(((n,r)=>{if(0===s(r.name))return n;const i=r?.blockHooks?.[e];let a;switch(i){case"before":case"after":a=o(l);break;case"first_child":case"last_child":a=o(t);break;case void 0:a=[...o(l),...o(t)]}const c=a?.find((e=>e.name===r.name));return c?{...n,[r.name]:c.clientId}:n}),{});return Object.values(a).length>0?a:yC}),[r,e,t]),{getBlockIndex:s,getBlockCount:u,getBlockRootClientId:d}=(0,c.useSelect)(li),{insertBlock:p,removeBlock:h}=(0,c.useDispatch)(li);if(!r.length)return null;const g=r.reduce(((e,t)=>{const[n]=t.name.split("/");return e[n]||(e[n]=[]),e[n].push(t),e}),{});return(0,$.jsx)(ma,{children:(0,$.jsxs)(os.PanelBody,{className:"block-editor-hooks__block-hooks",title:(0,C.__)("Plugins"),initialOpen:!0,children:[(0,$.jsx)("p",{className:"block-editor-hooks__block-hooks-helptext",children:(0,C.__)("Manage the inclusion of blocks added automatically by plugins.")}),Object.keys(g).map((n=>(0,$.jsxs)(a.Fragment,{children:[(0,$.jsx)("h3",{children:n}),g[n].map((n=>{const o=n.name in i;return(0,$.jsx)(os.ToggleControl,{__nextHasNoMarginBottom:!0,checked:o,label:n.title,onChange:()=>{if(o)h(i[n.name],!1);else{const o=n.blockHooks[e];((e,n)=>{const o=s(t),r=u(t),i=d(t);switch(n){case"before":case"after":p(e,"after"===n?o+1:o,i,!1);break;case"first_child":case"last_child":p(e,"first_child"===n?0:r,t,!1);break;case void 0:p(e,o+1,i,!1)}})((0,l.createBlock)(n.name),o)}}},n.title)}))]},n)))]})})},attributeKeys:["metadata"],hasSupport:()=>!0};function wC(e){return!e||0===Object.keys(e).length}function CC(e){const{clientId:t}=_(),n=e||t,{updateBlockAttributes:o}=(0,c.useDispatch)(li),{getBlockAttributes:r}=(0,c.useRegistry)().select(li);return{updateBlockBindings:e=>{const{metadata:{bindings:t,...i}={}}=r(n),s={...t};Object.entries(e).forEach((([e,t])=>{t||!s[e]?s[e]=t:delete s[e]}));const l={...i,bindings:s};wC(l.bindings)&&delete l.bindings,o(n,{metadata:wC(l)?void 0:l})},removeAllBlockBindings:()=>{const{metadata:{bindings:e,...t}={}}=r(n);o(n,{metadata:wC(t)?void 0:t})}}}const{DropdownMenuV2:BC}=te(os.privateApis),IC={};function jC({fieldsList:e,attribute:t,binding:n}){const{clientId:o}=_(),r=(0,l.getBlockBindingsSources)(),{updateBlockBindings:i}=CC(),s=n?.args?.key,u=(0,c.useSelect)((e=>{const{name:n}=e(li).getBlock(o),r=(0,l.getBlockType)(n).attributes?.[t]?.type;return"rich-text"===r?"string":r}),[o,t]);return(0,$.jsx)($.Fragment,{children:Object.entries(e).map((([n,o],l)=>(0,$.jsxs)(a.Fragment,{children:[(0,$.jsxs)(BC.Group,{children:[Object.keys(e).length>1&&(0,$.jsx)(BC.GroupLabel,{children:r[n].label}),Object.entries(o).filter((([,e])=>e?.type===u)).map((([e,o])=>(0,$.jsxs)(BC.RadioItem,{onChange:()=>i({[t]:{source:n,args:{key:e}}}),name:t+"-binding",value:e,checked:e===s,children:[(0,$.jsx)(BC.ItemLabel,{children:o?.label}),(0,$.jsx)(BC.ItemHelpText,{children:o?.value})]},e)))]}),l!==Object.keys(e).length-1&&(0,$.jsx)(BC.Separator,{})]},n)))})}function EC({attribute:e,binding:t,fieldsList:n}){const{source:o,args:r}=t||{},i=(0,l.getBlockBindingsSource)(o),s=!i;return(0,$.jsxs)(os.__experimentalVStack,{className:"block-editor-bindings__item",spacing:0,children:[(0,$.jsx)(os.__experimentalText,{truncate:!0,children:e}),!!t&&(0,$.jsx)(os.__experimentalText,{truncate:!0,variant:!s&&"muted",isDestructive:s,children:s?(0,C.__)("Invalid source"):n?.[o]?.[r?.key]?.label||i?.label||o})]})}function TC({bindings:e,fieldsList:t}){return(0,$.jsx)($.Fragment,{children:Object.entries(e).map((([e,n])=>(0,$.jsx)(os.__experimentalItem,{children:(0,$.jsx)(EC,{attribute:e,binding:n,fieldsList:t})},e)))})}function MC({attributes:e,bindings:t,fieldsList:n}){const{updateBlockBindings:o}=CC(),r=(0,u.useViewportMatch)("medium","<");return(0,$.jsx)($.Fragment,{children:e.map((e=>{const i=t[e];return(0,$.jsx)(os.__experimentalToolsPanelItem,{hasValue:()=>!!i,label:e,onDeselect:()=>{o({[e]:void 0})},children:(0,$.jsx)(BC,{placement:r?"bottom-start":"left-start",gutter:r?8:36,trigger:(0,$.jsx)(os.__experimentalItem,{children:(0,$.jsx)(EC,{attribute:e,binding:i,fieldsList:n})}),children:(0,$.jsx)(jC,{fieldsList:n,attribute:e,binding:i})})},e)}))})}const PC={edit:({name:e,metadata:t})=>{const n=(0,a.useContext)(ob),{removeAllBlockBindings:o}=CC(),r=function(e){return ox[e]}(e),i=(0,u.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}},s={},{fieldsList:d,canUpdateBlockBindings:p}=(0,c.useSelect)((e=>{if(!r||0===r.length)return IC;const t=(0,l.getBlockBindingsSources)();return Object.entries(t).forEach((([t,{getFieldsList:o,usesContext:r}])=>{if(o){const i={};if(r?.length)for(const e of r)i[e]=n[e];const l=o({select:e,context:i});Object.keys(l||{}).length&&(s[t]={...l})}})),{fieldsList:Object.values(s).length>0?s:IC,canUpdateBlockBindings:e(li).getSettings().canUpdateBlockBindings}}),[n,r]);if(!r||0===r.length)return null;const{bindings:h}=t||{},g={...h};Object.keys(g).forEach((t=>{sx(e,t)&&"core/pattern-overrides"!==g[t].source||delete g[t]}));const m=!p||!Object.keys(d).length;return m&&0===Object.keys(g).length?null:(0,$.jsx)(ma,{group:"bindings",children:(0,$.jsxs)(os.__experimentalToolsPanel,{label:(0,C.__)("Attributes"),resetAll:()=>{o()},dropdownMenuProps:i,className:"block-editor-bindings__panel",children:[(0,$.jsx)(os.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:m?(0,$.jsx)(TC,{bindings:g,fieldsList:d}):(0,$.jsx)(MC,{attributes:r,bindings:g,fieldsList:d})}),(0,$.jsx)(os.__experimentalItemGroup,{children:(0,$.jsx)(os.__experimentalText,{variant:"muted",children:(0,C.__)("Attributes connected to custom fields or other dynamic data.")})})]})})},attributeKeys:["metadata"],hasSupport:()=>!0};function RC(e,t,n,o,r=1,i=1){for(let s=i;;s++)for(let l=s===i?r:1;l<=t;l++){const t=new Lf({columnStart:l,rowStart:s,columnSpan:n,rowSpan:o});if(!e.some((e=>e.intersectsRect(t))))return[l,s]}}function NC(e){!function({clientId:e}){const{gridLayout:t,blockOrder:n,selectedBlockLayout:o}=(0,c.useSelect)((t=>{var n;const{getBlockAttributes:o,getBlockOrder:r}=t(li),i=t(li).getSelectedBlock();return{gridLayout:null!==(n=o(e).layout)&&void 0!==n?n:{},blockOrder:r(e),selectedBlockLayout:i?.attributes.style?.layout}}),[e]),{getBlockAttributes:r,getBlockRootClientId:i}=(0,c.useSelect)(li),{updateBlockAttributes:s,__unstableMarkNextChangeAsNotPersistent:l}=(0,c.useDispatch)(li),d=(0,a.useMemo)((()=>o?new Lf(o):null),[o]),p=(0,u.usePrevious)(d),h=(0,u.usePrevious)(t.isManualPlacement),g=(0,u.usePrevious)(n);(0,a.useEffect)((()=>{const o={};if(t.isManualPlacement){const s=[];for(const e of n){var a;const{columnStart:t,rowStart:n,columnSpan:o=1,rowSpan:i=1}=null!==(a=r(e).style?.layout)&&void 0!==a?a:{};t&&n&&s.push(new Lf({columnStart:t,rowStart:n,columnSpan:o,rowSpan:i}))}for(const e of n){var c;const n=r(e),{columnStart:i,rowStart:l,columnSpan:a=1,rowSpan:u=1}=null!==(c=n.style?.layout)&&void 0!==c?c:{};if(i&&l)continue;const[d,h]=RC(s,t.columnCount,a,u,p?.columnEnd,p?.rowEnd);s.push(new Lf({columnStart:d,rowStart:h,columnSpan:a,rowSpan:u})),o[e]={style:{...n.style,layout:{...n.style?.layout,columnStart:d,rowStart:h}}}}const l=Math.max(...s.map((e=>e.rowEnd)));(!t.rowCount||t.rowCount<l)&&(o[e]={layout:{...t,rowCount:l}});for(const e of null!=g?g:[])if(!n.includes(e)){var u;const t=i(e);if(null===t)continue;const n=r(t);if("grid"===n?.layout?.type)continue;const s=r(e),{columnStart:l,rowStart:a,columnSpan:c,rowSpan:d,...p}=null!==(u=s.style?.layout)&&void 0!==u?u:{};if(l||a||c||d){const t=0===Object.keys(p).length;o[e]=ve(s,["style","layout"],t?void 0:p)}}}else{if(!0===h)for(const e of n){var d;const t=r(e),{columnStart:n,rowStart:i,...s}=null!==(d=t.style?.layout)&&void 0!==d?d:{};if(n||i){const n=0===Object.keys(s).length;o[e]=ve(t,["style","layout"],n?void 0:s)}}t.rowCount&&(o[e]={layout:{...t,rowCount:void 0}})}Object.keys(o).length&&(l(),s(Object.keys(o),o,!0))}),[e,t,g,n,p,h,l,r,i,s])}(e)}function LC({clientId:e,layout:t}){const n=(0,c.useSelect)((t=>{const{isBlockSelected:n,isDraggingBlocks:o,getTemplateLock:r,getBlockEditingMode:i}=t(li);return!(!o()&&!n(e)||r(e)||"default"!==i(e))}),[e]);return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(NC,{clientId:e}),n&&(0,$.jsx)(iC,{clientId:e,parentLayout:t})]})}(0,d.addFilter)("blocks.registerBlockType","core/metadata/addLabelCallback",(function(e){return e.__experimentalLabel||(0,l.hasBlockSupport)(e,"renaming",!0)&&(e.__experimentalLabel=(e,{context:t})=>{const{metadata:n}=e;if("list-view"===t&&n?.name)return n.name}),e}));const AC=(0,u.createHigherOrderComponent)((e=>t=>"grid"!==t.attributes.layout?.type?(0,$.jsx)(e,{...t},"edit"):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(LC,{clientId:t.clientId,layout:t.attributes.layout}),(0,$.jsx)(e,{...t},"edit")]})),"addGridVisualizerToBlockEdit");function DC(e){const t=e.style?.border||{};return{className:zd(e)||void 0,style:mm({border:t})}}function OC(e){const{colors:t}=Zu(),n=DC(e),{borderColor:o}=e;if(o){const e=Td({colors:t,namedColor:o});n.style.borderColor=e.color}return n}function zC(e){return{style:mm({shadow:e.style?.shadow||""})}}function VC(e){const{backgroundColor:t,textColor:n,gradient:o,style:r}=e,i=Ku("background-color",t),s=Ku("color",n),l=Fd(o);return{className:Zi(s,l,{[i]:!(l||r?.color?.gradient)&&!!i,"has-text-color":n||r?.color?.text,"has-background":t||r?.color?.background||o||r?.color?.gradient,"has-link-color":r?.elements?.link?.color})||void 0,style:mm({color:r?.color||{}})}}function FC(e){const{backgroundColor:t,textColor:n,gradient:o}=e,[r,i,s,l,c,u]=ci("color.palette.custom","color.palette.theme","color.palette.default","color.gradients.custom","color.gradients.theme","color.gradients.default"),d=(0,a.useMemo)((()=>[...r||[],...i||[],...s||[]]),[r,i,s]),p=(0,a.useMemo)((()=>[...l||[],...c||[],...u||[]]),[l,c,u]),h=VC(e);if(t){const e=Uu(d,t);h.style.backgroundColor=e.color}if(o&&(h.style.background=Hd(p,o)),n){const e=Uu(d,n);h.style.color=e.color}return h}function HC(e){const{style:t}=e;return{style:mm({spacing:t?.spacing||{}})}}(0,d.addFilter)("editor.BlockEdit","core/editor/grid-visualizer",AC);const{kebabCase:GC}=te(os.privateApis);function $C(e,t){let n=e?.style?.typography||{};n={...n,fontSize:Ci({size:e?.style?.typography?.fontSize},t)};const o=mm({typography:n}),r=e?.fontFamily?`has-${GC(e.fontFamily)}-font-family`:"";return{className:Zi(r,e?.style?.typography?.textAlign?`has-text-align-${e?.style?.typography?.textAlign}`:"",Nh(e?.fontSize)),style:o}}function UC(e){const[t,n]=(0,a.useState)(e);return(0,a.useEffect)((()=>{e&&n(e)}),[e]),t}var WC;!function(e){e=e.map((e=>({...e,Edit:(0,a.memo)(e.edit)})));const t=(0,u.createHigherOrderComponent)((t=>n=>{const o=_();return[...e.map(((e,t)=>{const{Edit:r,hasSupport:i,attributeKeys:s=[],shareWithChildBlocks:l}=e;if(!(o[p]||o[h]&&l)||!i(n.name))return null;const a={};for(const e of s)n.attributes[e]&&(a[e]=n.attributes[e]);return(0,$.jsx)(r,{name:n.name,isSelected:n.isSelected,clientId:n.clientId,setAttributes:n.setAttributes,__unstableParentLayout:n.__unstableParentLayout,...a},t)})),(0,$.jsx)(t,{...n},"edit")]}),"withBlockEditHooks");(0,d.addFilter)("editor.BlockEdit","core/editor/hooks",t)}([Kl,qh,lu,uu,ym,Gm,tf,Tf,_C,SC,PC,vC].filter(Boolean)),function(e){const t=(0,u.createHigherOrderComponent)((t=>n=>{const[o,r]=(0,a.useState)(Array(e.length).fill(void 0));return[...e.map(((e,t)=>{const{hasSupport:o,attributeKeys:i=[],useBlockProps:s,isMatch:l}=e,a={};for(const e of i)n.attributes[e]&&(a[e]=n.attributes[e]);return!Object.keys(a).length||!o(n.name)||l&&!l(a)?null:(0,$.jsx)(ns,{index:t,useBlockProps:s,setAllWrapperProps:r,name:n.name,clientId:n.clientId,...a},t)})),(0,$.jsx)(t,{...n,wrapperProps:o.filter(Boolean).reduce(((e,t)=>({...e,...t,className:Zi(e.className,t.className),style:{...e.style,...t.style}})),n.wrapperProps||{})},"edit")]}),"withBlockListBlockHooks");(0,d.addFilter)("editor.BlockListBlock","core/editor/hooks",t)}([Kl,qh,ru,ym,Rp,dm,Gm,Th,Dh,Vd,tf,Cf,vC]),WC=[Kl,qh,lu,cu,uu,Vd,Rp,ym,Th,Dh],(0,d.addFilter)("blocks.getSaveContent.extraProps","core/editor/hooks",(function(e,t,n){return WC.reduce(((e,o)=>{const{hasSupport:r,attributeKeys:i=[],addSaveProps:s}=o,l={};for(const e of i)n[e]&&(l[e]=n[e]);return Object.keys(l).length&&r(t)?s(e,t,l):e}),e)}),0),(0,d.addFilter)("blocks.getSaveContent.extraProps","core/editor/hooks",(e=>(e.hasOwnProperty("className")&&!e.className&&delete e.className,e)));const{kebabCase:KC}=te(os.privateApis),ZC=([e,...t])=>e.toUpperCase()+t.join(""),qC=e=>(0,u.createHigherOrderComponent)((t=>n=>(0,$.jsx)(t,{...n,colors:e})),"withCustomColorPalette"),YC=()=>(0,u.createHigherOrderComponent)((e=>t=>{const[n,o,r]=ci("color.palette.custom","color.palette.theme","color.palette.default"),i=(0,a.useMemo)((()=>[...n||[],...o||[],...r||[]]),[n,o,r]);return(0,$.jsx)(e,{...t,colors:i})}),"withEditorColorPalette");function XC(e,t){const n=e.reduce(((e,t)=>({...e,..."string"==typeof t?{[t]:KC(t)}:t})),{});return(0,u.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=Du(t),o=({color:e})=>n.contrast(e),r=Math.max(...e.map(o));return e.find((e=>o(e)===r)).color}(t,e)}createSetters(){return Object.keys(n).reduce(((e,t)=>{const n=ZC(t),o=`custom${n}`;return e[`set${n}`]=this.createSetColor(t,o),e}),{})}createSetColor(e,t){return n=>{const o=Wu(this.props.colors,n);this.props.setAttributes({[e]:o&&o.slug?o.slug:void 0,[t]:o&&o.slug?void 0:n})}}static getDerivedStateFromProps({attributes:e,colors:t},o){return Object.entries(n).reduce(((n,[r,i])=>{const s=Uu(t,e[r],e[`custom${ZC(r)}`]),l=o[r],a=l?.color;return a===s.color&&l?n[r]=l:n[r]={...s,class:Ku(i,s.slug)},n}),{})}render(){return(0,$.jsx)(e,{...this.props,colors:void 0,...this.state,...this.setters,colorUtils:this.colorUtils})}}])}function QC(e){return(...t)=>{const n=qC(e);return(0,u.createHigherOrderComponent)(XC(t,n),"withCustomColors")}}function JC(...e){const t=YC();return(0,u.createHigherOrderComponent)(XC(e,t),"withColors")}const eB=function(e){const[t,n]=ci("typography.fontSizes","typography.customFontSize");return(0,$.jsx)(os.FontSizePicker,{...e,fontSizes:t,disableCustomFontSizes:!n})},tB=[],nB=([e,...t])=>e.toUpperCase()+t.join(""),oB=(...e)=>{const t=e.reduce(((e,t)=>(e[t]=`custom${nB(t)}`,e)),{});return(0,u.createHigherOrderComponent)((0,u.compose)([(0,u.createHigherOrderComponent)((e=>t=>{const[n]=ci("typography.fontSizes");return(0,$.jsx)(e,{...t,fontSizes:n||tB})}),"withFontSizes"),e=>class extends a.Component{constructor(e){super(e),this.setters=this.createSetters(),this.state={}}createSetters(){return Object.entries(t).reduce(((e,[t,n])=>(e[`set${nB(t)}`]=this.createSetFontSize(t,n),e)),{})}createSetFontSize(e,t){return n=>{const o=this.props.fontSizes?.find((({size:e})=>e===Number(n)));this.props.setAttributes({[e]:o&&o.slug?o.slug:void 0,[t]:o&&o.slug?void 0:n})}}static getDerivedStateFromProps({attributes:e,fontSizes:n},o){const r=(t,n)=>!o[n]||(e[n]?e[n]!==o[n].slug:o[n].size!==e[t]);if(!Object.values(t).some(r))return null;const i=Object.entries(t).filter((([e,t])=>r(t,e))).reduce(((t,[o,r])=>{const i=e[o],s=Ph(n,i,e[r]);return t[o]={...s,class:Nh(i)},t}),{});return{...o,...i}}render(){return(0,$.jsx)(e,{...this.props,fontSizes:void 0,...this.state,...this.setters})}}]),"withFontSizes")},rB=()=>{};const iB={name:"blocks",className:"block-editor-autocompleters__block",triggerPrefix:"/",useItems(e){const{rootClientId:t,selectedBlockName:n,prioritizedBlocks:o}=(0,c.useSelect)((e=>{const{getSelectedBlockClientId:t,getBlockName:n,getBlockListSettings:o,getBlockRootClientId:r}=e(li),i=t(),s=r(i);return{selectedBlockName:i?n(i):null,rootClientId:s,prioritizedBlocks:o(s)?.prioritizedInserterBlocks}}),[]),[r,i,s]=vS(t,rB,!0),l=(0,a.useMemo)((()=>(e.trim()?ow(r,i,s,e):Hw(he(r,"frecency","desc"),o)).filter((e=>e.name!==n)).slice(0,9)),[e,n,r,i,s,o]);return[(0,a.useMemo)((()=>l.map((e=>{const{title:t,icon:n,isDisabled:o}=e;return{key:`block-${e.id}`,value:e,label:(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Uf,{icon:n,showColors:!0},"icon"),t]}),isDisabled:o}}))),[l])]},allowContext:(e,t)=>!(/\S/.test(e)||/\S/.test(t)),getOptionCompletion(e){const{name:t,initialAttributes:n,innerBlocks:o,syncStatus:r,content:i}=e;return{action:"replace",value:"unsynced"===r?(0,l.parse)(i,{__unstableSkipMigrationLogs:!0}):(0,l.createBlock)(t,n,(0,l.createBlocksFromInnerBlocksTemplate)(o))}}},sB=window.wp.apiFetch;var lB=n.n(sB);const aB=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.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"})});const cB={name:"links",className:"block-editor-autocompleters__link",triggerPrefix:"[[",options:async e=>{let t=await lB()({path:(0,fa.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=>[...e.title.split(/\s+/)],getOptionLabel:e=>(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(hl,{icon:"page"===e.subtype?za:aB},"icon"),e.title]}),getOptionCompletion:e=>(0,$.jsx)("a",{href:e.url,children:e.title})},uB=[];function dB({completers:e=uB}){const{name:t}=_();return(0,a.useMemo)((()=>{let n=[...e,cB];return(t===(0,l.getDefaultBlockName)()||(0,l.getBlockSupport)(t,"__experimentalSlashInserter",!1))&&(n=[...n,iB]),(0,d.hasFilter)("editor.Autocomplete.completers")&&(n===e&&(n=n.map((e=>({...e})))),n=(0,d.applyFilters)("editor.Autocomplete.completers",n,t)),n}),[e,t])}const pB=function(e){return(0,$.jsx)(os.Autocomplete,{...e,completers:dB(e)})},hB=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M6 4a2 2 0 0 0-2 2v3h1.5V6a.5.5 0 0 1 .5-.5h3V4H6Zm3 14.5H6a.5.5 0 0 1-.5-.5v-3H4v3a2 2 0 0 0 2 2h3v-1.5Zm6 1.5v-1.5h3a.5.5 0 0 0 .5-.5v-3H20v3a2 2 0 0 1-2 2h-3Zm3-16a2 2 0 0 1 2 2v3h-1.5V6a.5.5 0 0 0-.5-.5h-3V4h3Z"})});const gB=function({isActive:e,label:t=(0,C.__)("Toggle full height"),onToggle:n,isDisabled:o}){return(0,$.jsx)(os.ToolbarButton,{isActive:e,icon:hB,label:t,onClick:()=>n(!e),disabled:o})},mB=()=>{};const fB=function(e){const{label:t=(0,C.__)("Change matrix alignment"),onChange:n=mB,value:o="center",isDisabled:r}=e,i=(0,$.jsx)(os.AlignmentMatrixControl.Icon,{value:o});return(0,$.jsx)(os.Dropdown,{popoverProps:{placement:"bottom-start"},renderToggle:({onToggle:e,isOpen:n})=>(0,$.jsx)(os.ToolbarButton,{onClick:e,"aria-haspopup":"true","aria-expanded":n,onKeyDown:t=>{n||t.keyCode!==va.DOWN||(t.preventDefault(),e())},label:t,icon:i,showTooltip:!0,disabled:r}),renderContent:()=>(0,$.jsx)(os.AlignmentMatrixControl,{hasFocusBorder:!1,onChange:n,value:o})})};function bB({clientId:e,maximumLength:t,context:n}){const o=(0,c.useSelect)((t=>{if(!e)return null;const{getBlockName:o,getBlockAttributes:r}=t(li),{getBlockType:i,getActiveBlockVariation:s}=t(l.store),a=o(e),c=i(a);if(!c)return null;const u=r(e),d=(0,l.__experimentalGetBlockLabel)(c,u,n);if(d!==c.title)return d;const p=s(a,u);return p?.title||c.title}),[e,n]);if(!o)return null;if(t&&t>0&&o.length>t){const e="...";return o.slice(0,t-e.length)+e}return o}function kB({clientId:e,maximumLength:t,context:n}){return bB({clientId:e,maximumLength:t,context:n})}function vB(e){var t,n;if(!e)return null;const o=null!==(t=Array.from(document.querySelectorAll('iframe[name="editor-canvas"]').values()).find((t=>(t.contentDocument||t.contentWindow.document)===e.ownerDocument)))&&void 0!==t?t:e;return null!==(n=o?.closest('[role="region"]'))&&void 0!==n?n:o}const _B=function({rootLabelText:e}){const{selectBlock:t,clearSelectedBlock:n}=(0,c.useDispatch)(li),{clientId:o,parents:r,hasSelection:i}=(0,c.useSelect)((e=>{const{getSelectionStart:t,getSelectedBlockClientId:n,getEnabledBlockParents:o}=te(e(li)),r=n();return{parents:o(r),clientId:r,hasSelection:!!t().clientId}}),[]),s=e||(0,C.__)("Document"),l=(0,a.useRef)();return kp(o,l),(0,$.jsxs)("ul",{className:"block-editor-block-breadcrumb",role:"list","aria-label":(0,C.__)("Block breadcrumb"),children:[(0,$.jsxs)("li",{className:i?void 0:"block-editor-block-breadcrumb__current","aria-current":i?void 0:"true",children:[i&&(0,$.jsx)(os.Button,{size:"small",className:"block-editor-block-breadcrumb__button",onClick:()=>{const e=l.current?.closest(".editor-styles-wrapper");n(),vB(e)?.focus()},children:s}),!i&&s,!!o&&(0,$.jsx)(hl,{icon:Ta,className:"block-editor-block-breadcrumb__separator"})]}),r.map((e=>(0,$.jsxs)("li",{children:[(0,$.jsx)(os.Button,{size:"small",className:"block-editor-block-breadcrumb__button",onClick:()=>t(e),children:(0,$.jsx)(kB,{clientId:e,maximumLength:35})}),(0,$.jsx)(hl,{icon:Ta,className:"block-editor-block-breadcrumb__separator"})]},e))),!!o&&(0,$.jsx)("li",{className:"block-editor-block-breadcrumb__current","aria-current":"true",children:(0,$.jsx)(kB,{clientId:o,maximumLength:35})})]})};function xB(e){return(0,c.useSelect)((t=>{const{__unstableHasActiveBlockOverlayActive:n}=t(li);return n(e)}),[e])}const yB={placement:"top-start"},SB={...yB,flip:!1,shift:!0},wB={...yB,flip:!0,shift:!1};function CB(e,t,n,o,r){if(!e||!t)return SB;const i=n?.scrollTop||0,s=Yg(t),l=i+e.getBoundingClientRect().top,a=e.ownerDocument.documentElement.clientHeight,c=l+o,u=s.top>c,d=s.height>a-o;return r||!u&&!d?wB:SB}function BB({contentElement:e,clientId:t}){const n=vp(t),[o,r]=(0,a.useState)(0),{blockIndex:i,isSticky:s}=(0,c.useSelect)((e=>{const{getBlockIndex:n,getBlockAttributes:o}=e(li);return{blockIndex:n(t),isSticky:Qm(o(t))}}),[t]),l=(0,a.useMemo)((()=>{if(e)return(0,ba.getScrollContainer)(e)}),[e]),[d,p]=(0,a.useState)((()=>CB(e,n,l,o,s))),h=(0,u.useRefEffect)((e=>{r(e.offsetHeight)}),[]),g=(0,a.useCallback)((()=>p(CB(e,n,l,o,s))),[e,n,l,o]);return(0,a.useLayoutEffect)(g,[i,g]),(0,a.useLayoutEffect)((()=>{if(!e||!n)return;const t=e?.ownerDocument?.defaultView;let o;t?.addEventHandler?.("resize",g);const r=n?.ownerDocument?.defaultView;return r.ResizeObserver&&(o=new r.ResizeObserver(g),o.observe(n)),()=>{t?.removeEventHandler?.("resize",g),o&&o.disconnect()}}),[g,e,n]),{...d,ref:h}}function IB(e){const t=(0,c.useSelect)((t=>{const{getBlockRootClientId:n,getBlockParents:o,__experimentalGetBlockListSettingsForBlocks:r,isBlockInsertionPointVisible:i,getBlockInsertionPoint:s,getBlockOrder:l,hasMultiSelection:a,getLastMultiSelectedBlockClientId:c}=t(li),u=o(e),d=r(u),p=u.find((e=>d[e]?.__experimentalCaptureToolbars));let h=!1;if(i()){const t=s();h=l(t.rootClientId)[t.index]===e}return{capturingClientId:p,isInsertionPointVisible:h,lastClientId:a()?c():null,rootClientId:n(e)}}),[e]);return t}function jB({clientId:e,__unstableContentRef:t}){const{capturingClientId:n,isInsertionPointVisible:o,lastClientId:r,rootClientId:i}=IB(e),s=BB({contentElement:t?.current,clientId:e});return(0,$.jsx)(tm,{clientId:n||e,bottomClientId:r,className:Zi("block-editor-block-list__block-side-inserter-popover",{"is-insertion-point-visible":o}),__unstableContentRef:t,...s,children:(0,$.jsx)("div",{className:"block-editor-block-list__empty-block-inserter",children:(0,$.jsx)(tC,{position:"bottom right",rootClientId:i,clientId:e,__experimentalIsQuick:!0})})})}const EB=({appendToOwnerDocument:e,children:t,clientIds:n,cloneClassname:o,elementId:r,onDragStart:i,onDragEnd:s,fadeWhenDisabled:d=!1,dragComponent:p})=>{const{srcRootClientId:h,isDraggable:g,icon:m,visibleInserter:f,getBlockType:b}=(0,c.useSelect)((e=>{const{canMoveBlocks:t,getBlockRootClientId:o,getBlockName:r,getBlockAttributes:i,isBlockInsertionPointVisible:s}=e(li),{getBlockType:a,getActiveBlockVariation:c}=e(l.store),u=o(n[0]),d=r(n[0]),p=c(d,i(n[0]));return{srcRootClientId:u,isDraggable:t(n),icon:p?.icon||a(d)?.icon,visibleInserter:s(),getBlockType:a}}),[n]),k=(0,a.useRef)(!1),[v,_,x]=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,ba.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,i=e.current-n.current.offsetTop,s=o.clientY-n.current.offsetTop;if(o.clientY>i){const e=Math.max(r-i-50,0),n=Math.max(s-i-50,0),o=0===e||0===n?0:n/e;t.current=25*o}else if(o.clientY<i){const e=Math.max(i-50,0),n=Math.max(i-s-50,0),o=0===e||0===n?0:n/e;t.current=-25*o}else t.current=0}),[]),()=>{e.current=null,n.current=null,o.current&&(clearInterval(o.current),o.current=null)}]}(),{getAllowedBlocks:y,getBlockNamesByClientId:S,getBlockRootClientId:w}=(0,c.useSelect)(li),{startDraggingBlocks:C,stopDraggingBlocks:B}=(0,c.useDispatch)(li);(0,a.useEffect)((()=>()=>{k.current&&B()}),[]);const I=vp(n[0]),j=I?.closest("body");if((0,a.useEffect)((()=>{if(!j||!d)return;const e=(0,u.throttle)((e=>{if(!e.target.closest("[data-block]"))return;const t=S(n),o=e.target.closest("[data-block]").getAttribute("data-block"),r=y(o),i=S([o])[0];let s;if(0===r?.length){const e=w(o),n=S([e])[0],r=y(e);s=Ox(b,r,t,n)}else s=Ox(b,r,t,i);s||f?window?.document?.body?.classList?.remove("block-draggable-invalid-drag-token"):window?.document?.body?.classList?.add("block-draggable-invalid-drag-token")}),200);return j.addEventListener("dragover",e),()=>{j.removeEventListener("dragover",e)}}),[n,j,d,y,S,w,b,f]),!g)return t({draggable:!1});const E={type:"block",srcClientIds:n,srcRootClientId:h};return(0,$.jsx)(os.Draggable,{appendToOwnerDocument:e,cloneClassname:o,__experimentalTransferDataType:"wp-blocks",transferData:E,onDragStart:e=>{window.requestAnimationFrame((()=>{C(n),k.current=!0,v(e),i&&i()}))},onDragOver:_,onDragEnd:()=>{B(),k.current=!1,x(),s&&s()},__experimentalDragComponent:void 0!==p?p:(0,$.jsx)(dS,{count:n.length,icon:m,fadeWhenDisabled:!0}),elementId:r,children:({onDraggableStart:e,onDraggableEnd:n})=>t({draggable:!0,onDragStart:e,onDragEnd:n})})},TB=(e,t)=>"up"===e?"horizontal"===t?(0,C.isRTL)()?"right":"left":"up":"down"===e?"horizontal"===t?(0,C.isRTL)()?"left":"right":"down":null;function MB(e,t,n,o,r,i,s){const l=n+1;if(e>1)return function(e,t,n,o,r,i){const s=t+1;if(n&&o)return(0,C.__)("All blocks are selected, and cannot be moved");if(r>0&&!o){const t=TB("down",i);if("down"===t)return(0,C.sprintf)((0,C.__)("Move %1$d blocks from position %2$d down by one place"),e,s);if("left"===t)return(0,C.sprintf)((0,C.__)("Move %1$d blocks from position %2$d left by one place"),e,s);if("right"===t)return(0,C.sprintf)((0,C.__)("Move %1$d blocks from position %2$d right by one place"),e,s)}if(r>0&&o){const e=TB("down",i);if("down"===e)return(0,C.__)("Blocks cannot be moved down as they are already at the bottom");if("left"===e)return(0,C.__)("Blocks cannot be moved left as they are already are at the leftmost position");if("right"===e)return(0,C.__)("Blocks cannot be moved right as they are already are at the rightmost position")}if(r<0&&!n){const t=TB("up",i);if("up"===t)return(0,C.sprintf)((0,C.__)("Move %1$d blocks from position %2$d up by one place"),e,s);if("left"===t)return(0,C.sprintf)((0,C.__)("Move %1$d blocks from position %2$d left by one place"),e,s);if("right"===t)return(0,C.sprintf)((0,C.__)("Move %1$d blocks from position %2$d right by one place"),e,s)}if(r<0&&n){const e=TB("up",i);if("up"===e)return(0,C.__)("Blocks cannot be moved up as they are already at the top");if("left"===e)return(0,C.__)("Blocks cannot be moved left as they are already are at the leftmost position");if("right"===e)return(0,C.__)("Blocks cannot be moved right as they are already are at the rightmost position")}}(e,n,o,r,i,s);if(o&&r)return(0,C.sprintf)((0,C.__)("Block %s is the only block, and cannot be moved"),t);if(i>0&&!r){const e=TB("down",s);if("down"===e)return(0,C.sprintf)((0,C.__)("Move %1$s block from position %2$d down to position %3$d"),t,l,l+1);if("left"===e)return(0,C.sprintf)((0,C.__)("Move %1$s block from position %2$d left to position %3$d"),t,l,l+1);if("right"===e)return(0,C.sprintf)((0,C.__)("Move %1$s block from position %2$d right to position %3$d"),t,l,l+1)}if(i>0&&r){const e=TB("down",s);if("down"===e)return(0,C.sprintf)((0,C.__)("Block %1$s is at the end of the content and can’t be moved down"),t);if("left"===e)return(0,C.sprintf)((0,C.__)("Block %1$s is at the end of the content and can’t be moved left"),t);if("right"===e)return(0,C.sprintf)((0,C.__)("Block %1$s is at the end of the content and can’t be moved right"),t)}if(i<0&&!o){const e=TB("up",s);if("up"===e)return(0,C.sprintf)((0,C.__)("Move %1$s block from position %2$d up to position %3$d"),t,l,l-1);if("left"===e)return(0,C.sprintf)((0,C.__)("Move %1$s block from position %2$d left to position %3$d"),t,l,l-1);if("right"===e)return(0,C.sprintf)((0,C.__)("Move %1$s block from position %2$d right to position %3$d"),t,l,l-1)}if(i<0&&o){const e=TB("up",s);if("up"===e)return(0,C.sprintf)((0,C.__)("Block %1$s is at the beginning of the content and can’t be moved up"),t);if("left"===e)return(0,C.sprintf)((0,C.__)("Block %1$s is at the beginning of the content and can’t be moved left"),t);if("right"===e)return(0,C.sprintf)((0,C.__)("Block %1$s is at the beginning of the content and can’t be moved right"),t)}}const PB=(e,t)=>"up"===e?"horizontal"===t?(0,C.isRTL)()?Hf:Gf:gC:"down"===e?"horizontal"===t?(0,C.isRTL)()?Gf:Hf:mC:null,RB=(e,t)=>"up"===e?"horizontal"===t?(0,C.isRTL)()?(0,C.__)("Move right"):(0,C.__)("Move left"):(0,C.__)("Move up"):"down"===e?"horizontal"===t?(0,C.isRTL)()?(0,C.__)("Move left"):(0,C.__)("Move right"):(0,C.__)("Move down"):null,NB=(0,a.forwardRef)((({clientIds:e,direction:t,orientation:n,...o},r)=>{const i=(0,u.useInstanceId)(NB),s=Array.isArray(e)?e:[e],a=s.length,{disabled:d}=o,{blockType:p,isDisabled:h,rootClientId:g,isFirst:m,isLast:f,firstIndex:b,orientation:k="vertical"}=(0,c.useSelect)((e=>{const{getBlockIndex:o,getBlockRootClientId:r,getBlockOrder:i,getBlock:a,getBlockListSettings:c}=e(li),u=s[0],p=r(u),h=o(u),g=o(s[s.length-1]),m=i(p),f=a(u),b=0===h,k=g===m.length-1,{orientation:v}=c(p)||{};return{blockType:f?(0,l.getBlockType)(f.name):null,isDisabled:d||("up"===t?b:k),rootClientId:p,firstIndex:h,isFirst:b,isLast:k,orientation:n||v}}),[e,t]),{moveBlocksDown:v,moveBlocksUp:_}=(0,c.useDispatch)(li),x="up"===t?_:v,y=`block-editor-block-mover-button__description-${i}`;return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,ref:r,className:Zi("block-editor-block-mover-button",`is-${t}-button`),icon:PB(t,k),label:RB(t,k),"aria-describedby":y,...o,onClick:h?null:t=>{x(e,g),o.onClick&&o.onClick(t)},disabled:h,accessibleWhenDisabled:!0}),(0,$.jsx)(os.VisuallyHidden,{id:y,children:MB(a,p&&p.title,b,m,f,"up"===t?-1:1,k)})]})})),LB=(0,a.forwardRef)(((e,t)=>(0,$.jsx)(NB,{direction:"up",ref:t,...e}))),AB=(0,a.forwardRef)(((e,t)=>(0,$.jsx)(NB,{direction:"down",ref:t,...e})));const DB=function({clientIds:e,hideDragHandle:t,isBlockMoverUpButtonDisabled:n,isBlockMoverDownButtonDisabled:o}){const{canMove:r,rootClientId:i,isFirst:s,isLast:l,orientation:a,isManualGrid:u}=(0,c.useSelect)((t=>{var n;const{getBlockIndex:o,getBlockListSettings:r,canMoveBlocks:i,getBlockOrder:s,getBlockRootClientId:l,getBlockAttributes:a}=t(li),c=Array.isArray(e)?e:[e],u=c[0],d=l(u),p=o(u),h=o(c[c.length-1]),g=s(d),{layout:m={}}=null!==(n=a(d))&&void 0!==n?n:{};return{canMove:i(e),rootClientId:d,isFirst:0===p,isLast:h===g.length-1,orientation:r(d)?.orientation,isManualGrid:"grid"===m.type&&m.isManualPlacement&&window.__experimentalEnableGridInteractivity}}),[e]);return!r||s&&l&&!i||t&&u?null:(0,$.jsxs)(os.ToolbarGroup,{className:Zi("block-editor-block-mover",{"is-horizontal":"horizontal"===a}),children:[!t&&(0,$.jsx)(EB,{clientIds:e,fadeWhenDisabled:!0,children:e=>(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,icon:uS,className:"block-editor-block-mover__drag-handle",label:(0,C.__)("Drag"),tabIndex:"-1",...e})}),!u&&(0,$.jsxs)("div",{className:"block-editor-block-mover__move-button-container",children:[(0,$.jsx)(os.ToolbarItem,{children:t=>(0,$.jsx)(LB,{disabled:n,clientIds:e,...t})}),(0,$.jsx)(os.ToolbarItem,{children:t=>(0,$.jsx)(AB,{disabled:o,clientIds:e,...t})})]})]})},{clearTimeout:OB,setTimeout:zB}=window,VB=200;function FB({ref:e,isFocused:t,highlightParent:n,debounceTimeout:o=VB}){const{getSelectedBlockClientId:r,getBlockRootClientId:i}=(0,c.useSelect)(li),{toggleBlockHighlight:s}=(0,c.useDispatch)(li),l=(0,a.useRef)(),u=(0,c.useSelect)((e=>e(li).getSettings().isDistractionFree),[]),d=e=>{if(e&&u)return;const t=r(),o=n?i(t):t;s(o,e)},p=()=>{const n=e?.current&&e.current.matches(":hover");return!t&&!n},h=()=>{const e=l.current;e&&OB&&OB(e)};return(0,a.useEffect)((()=>()=>{d(!1),h()}),[]),{debouncedShowGestures:e=>{e&&e.stopPropagation(),h(),d(!0)},debouncedHideGestures:e=>{e&&e.stopPropagation(),h(),l.current=zB((()=>{p()&&d(!1)}),o)}}}function HB({ref:e,highlightParent:t=!1,debounceTimeout:n=VB}){const[o,r]=(0,a.useState)(!1),{debouncedShowGestures:i,debouncedHideGestures:s}=FB({ref:e,debounceTimeout:n,isFocused:o,highlightParent:t}),l=(0,a.useRef)(!1),c=()=>e?.current&&e.current.contains(e.current.ownerDocument.activeElement);return(0,a.useEffect)((()=>{const t=e.current,n=()=>{c()&&(r(!0),i())},o=()=>{c()||(r(!1),s())};return t&&!l.current&&(t.addEventListener("focus",n,!0),t.addEventListener("blur",o,!0),l.current=!0),()=>{t&&(t.removeEventListener("focus",n),t.removeEventListener("blur",o))}}),[e,l,r,i,s]),{onMouseMove:i,onMouseLeave:s}}function GB(){const{selectBlock:e}=(0,c.useDispatch)(li),{firstParentClientId:t,isVisible:n}=(0,c.useSelect)((e=>{const{getBlockName:t,getBlockParents:n,getSelectedBlockClientId:o,getBlockEditingMode:r}=e(li),{hasBlockSupport:i}=e(l.store),s=n(o()),a=s[s.length-1],c=t(a),u=(0,l.getBlockType)(c);return{firstParentClientId:a,isVisible:a&&"default"===r(a)&&i(u,"__experimentalParentSelector",!0)}}),[]),o=Um(t),r=(0,a.useRef)(),i=HB({ref:r,highlightParent:!0});return n?(0,$.jsx)("div",{className:"block-editor-block-parent-selector",ref:r,...i,children:(0,$.jsx)(os.ToolbarButton,{className:"block-editor-block-parent-selector__button",onClick:()=>e(t),label:(0,C.sprintf)((0,C.__)("Select parent block: %s"),o?.title),showTooltip:!0,icon:(0,$.jsx)(Uf,{icon:o?.icon})})},t):null}const $B=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5 4.5h11a.5.5 0 0 1 .5.5v11a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V5a.5.5 0 0 1 .5-.5ZM3 5a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5Zm17 3v10.75c0 .69-.56 1.25-1.25 1.25H6v1.5h12.75a2.75 2.75 0 0 0 2.75-2.75V8H20Z"})});function UB({blocks:e}){return(0,u.useViewportMatch)("medium","<")?null:(0,$.jsx)("div",{className:"block-editor-block-switcher__popover-preview-container",children:(0,$.jsx)(os.Popover,{className:"block-editor-block-switcher__popover-preview",placement:"right-start",focusOnMount:!1,offset:16,children:(0,$.jsxs)("div",{className:"block-editor-block-switcher__preview",children:[(0,$.jsx)("div",{className:"block-editor-block-switcher__preview-title",children:(0,C.__)("Preview")}),(0,$.jsx)(sS,{viewportWidth:500,blocks:e})]})})})}const WB={};function KB({item:e,onSelect:t,setHoveredTransformItemName:n}){const{name:o,icon:r,title:i}=e;return(0,$.jsxs)(os.MenuItem,{className:(0,l.getBlockMenuDefaultClassName)(o),onClick:e=>{e.preventDefault(),t(o)},onMouseLeave:()=>n(null),onMouseEnter:()=>n(o),children:[(0,$.jsx)(Uf,{icon:r,showColors:!0}),i]})}const ZB=({transformations:e,onSelect:t,blocks:n})=>{const[o,r]=(0,a.useState)();return(0,$.jsxs)($.Fragment,{children:[o&&(0,$.jsx)(UB,{blocks:(0,l.cloneBlock)(n[0],e.find((({name:e})=>e===o)).attributes)}),e?.map((e=>(0,$.jsx)(KB,{item:e,onSelect:t,setHoveredTransformItemName:r},e.name)))]})};function qB({restTransformations:e,onSelect:t,setHoveredTransformItemName:n}){return e.map((e=>(0,$.jsx)(YB,{item:e,onSelect:t,setHoveredTransformItemName:n},e.name)))}function YB({item:e,onSelect:t,setHoveredTransformItemName:n}){const{name:o,icon:r,title:i,isDisabled:s}=e;return(0,$.jsxs)(os.MenuItem,{className:(0,l.getBlockMenuDefaultClassName)(o),onClick:e=>{e.preventDefault(),t(o)},disabled:s,onMouseLeave:()=>n(null),onMouseEnter:()=>n(o),children:[(0,$.jsx)(Uf,{icon:r,showColors:!0}),i]})}const XB=({className:e,possibleBlockTransformations:t,possibleBlockVariationTransformations:n,onSelect:o,onSelectVariation:r,blocks:i})=>{const[s,c]=(0,a.useState)(),{priorityTextTransformations:u,restTransformations:d}=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),o=e.reduce(((e,t)=>{const{name:o}=t;return n.includes(o)?e.priorityTextTransformations.push(t):e.restTransformations.push(t),e}),{priorityTextTransformations:[],restTransformations:[]});if(1===o.priorityTextTransformations.length&&"core/quote"===o.priorityTextTransformations[0].name){const e=o.priorityTextTransformations.pop();o.restTransformations.push(e)}return o}),[e]);return n.priorityTextTransformations.sort((({name:e},{name:n})=>t[e]<t[n]?-1:1)),n}(t),p=u.length&&d.length,h=!!d.length&&(0,$.jsx)(qB,{restTransformations:d,onSelect:o,setHoveredTransformItemName:c});return(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(os.MenuGroup,{label:(0,C.__)("Transform to"),className:e,children:[s&&(0,$.jsx)(UB,{blocks:(0,l.switchToBlockType)(i,s)}),!!n?.length&&(0,$.jsx)(ZB,{transformations:n,blocks:i,onSelect:r}),u.map((e=>(0,$.jsx)(YB,{item:e,onSelect:o,setHoveredTransformItemName:c},e.name))),!p&&h]}),!!p&&(0,$.jsx)(os.MenuGroup,{className:e,children:h})]})};function QB(e,t,n){const o=new(Bh())(e);return t&&o.remove("is-style-"+t.name),o.add("is-style-"+n.name),o.value}function JB(e){return e?.find((e=>e.isDefault))}function eI({clientId:e,onSwitch:t}){const{styles:n,block:o,blockType:r,className:i}=(0,c.useSelect)((t=>{const{getBlock:n}=t(li),o=n(e);if(!o)return{};const r=(0,l.getBlockType)(o.name),{getBlockStyles:i}=t(l.store);return{block:o,blockType:r,styles:i(o.name),className:o.attributes.className||""}}),[e]),{updateBlockAttributes:s}=(0,c.useDispatch)(li),u=function(e){return e&&0!==e.length?JB(e)?e:[{name:"default",label:(0,C._x)("Default","block style"),isDefault:!0},...e]:[]}(n),d=function(e,t){for(const n of new(Bh())(t).values()){if(-1===n.indexOf("is-style-"))continue;const t=n.substring(9),o=e?.find((({name:e})=>e===t));if(o)return o}return JB(e)}(u,i),p=function(e,t){return(0,a.useMemo)((()=>{const n=t?.example,o=t?.name;return n&&o?(0,l.getBlockFromExample)(o,{attributes:n.attributes,innerBlocks:n.innerBlocks}):e?(0,l.cloneBlock)(e):void 0}),[t?.example?e?.name:e,t])}(o,r);return{onSelect:n=>{const o=QB(i,d,n);s(e,{className:o}),t()},stylesToRender:u,activeStyle:d,genericPreviewBlock:p,className:i}}const tI=()=>{};function nI({clientId:e,onSwitch:t=tI}){const{onSelect:n,stylesToRender:o,activeStyle:r}=eI({clientId:e,onSwitch:t});return o&&0!==o.length?(0,$.jsx)($.Fragment,{children:o.map((e=>{const t=e.label||e.name;return(0,$.jsx)(os.MenuItem,{icon:r.name===e.name?cd:null,onClick:()=>n(e),children:(0,$.jsx)(os.__experimentalText,{as:"span",limit:18,ellipsizeMode:"tail",truncate:!0,children:t})},e.name)}))}):null}function oI({hoveredBlock:e,onSwitch:t}){const{clientId:n}=e;return(0,$.jsx)(os.MenuGroup,{label:(0,C.__)("Styles"),className:"block-editor-block-switcher__styles__menugroup",children:(0,$.jsx)(nI,{clientId:n,onSwitch:t})})}const rI=(e,t,n=new Set)=>{const{clientId:o,name:r,innerBlocks:i=[]}=e;if(!n.has(o)){if(r===t)return e;for(const e of i){const o=rI(e,t,n);if(o)return o}}},iI=(e,t)=>{const n=((e,t)=>{const n=(0,l.getBlockAttributesNamesByRole)(e,"content");return n?.length?n.reduce(((e,n)=>(t[n]&&(e[n]=t[n]),e)),{}):t})(t.name,t.attributes);e.attributes={...e.attributes,...n}},sI=(e,t)=>(0,a.useMemo)((()=>e.reduce(((e,n)=>{const o=((e,t)=>{const n=t.map((e=>(0,l.cloneBlock)(e))),o=new Set;for(const t of e){let e=!1;for(const r of n){const n=rI(r,t.name,o);if(n){e=!0,o.add(n.clientId),iI(n,t);break}}if(!e)return}return n})(t,n.blocks);return o&&e.push({...n,transformedBlocks:o}),e}),[])),[e,t]);function lI({patterns:e,onSelect:t}){const n=(0,u.useViewportMatch)("medium","<");return(0,$.jsx)("div",{className:"block-editor-block-switcher__popover-preview-container",children:(0,$.jsx)(os.Popover,{className:"block-editor-block-switcher__popover-preview",placement:n?"bottom":"right-start",offset:16,children:(0,$.jsx)("div",{className:"block-editor-block-switcher__preview is-pattern-list-preview",children:(0,$.jsx)(aI,{patterns:e,onSelect:t})})})})}function aI({patterns:e,onSelect:t}){return(0,$.jsx)(os.Composite,{role:"listbox",className:"block-editor-block-switcher__preview-patterns-container","aria-label":(0,C.__)("Patterns list"),children:e.map((e=>(0,$.jsx)(cI,{pattern:e,onSelect:t},e.name)))})}function cI({pattern:e,onSelect:t}){const n="block-editor-block-switcher__preview-patterns-container",o=(0,u.useInstanceId)(cI,`${n}-list__item-description`);return(0,$.jsxs)("div",{className:`${n}-list__list-item`,children:[(0,$.jsxs)(os.Composite.Item,{render:(0,$.jsx)("div",{role:"option","aria-label":e.title,"aria-describedby":e.description?o:void 0,className:`${n}-list__item`}),onClick:()=>t(e.transformedBlocks),children:[(0,$.jsx)(sS,{blocks:e.transformedBlocks,viewportWidth:e.viewportWidth||500}),(0,$.jsx)("div",{className:`${n}-list__item-title`,children:e.title})]}),!!e.description&&(0,$.jsx)(os.VisuallyHidden,{id:o,children:e.description})]})}const uI=function({blocks:e,patterns:t,onSelect:n}){const[o,r]=(0,a.useState)(!1),i=sI(t,e);return i.length?(0,$.jsxs)(os.MenuGroup,{className:"block-editor-block-switcher__pattern__transforms__menugroup",children:[o&&(0,$.jsx)(lI,{patterns:i,onSelect:n}),(0,$.jsx)(os.MenuItem,{onClick:e=>{e.preventDefault(),r(!o)},icon:Hf,children:(0,C.__)("Patterns")})]}):null};function dI({onClose:e,clientIds:t,hasBlockStyles:n,canRemove:o,isUsingBindings:r}){const{replaceBlocks:i,multiSelect:s,updateBlockAttributes:u}=(0,c.useDispatch)(li),{possibleBlockTransformations:d,patterns:p,blocks:h}=(0,c.useSelect)((e=>{const{getBlocksByClientId:n,getBlockRootClientId:o,getBlockTransformItems:r,__experimentalGetPatternTransformItems:i}=e(li),s=o(Array.isArray(t)?t[0]:t),l=n(t);return{blocks:l,possibleBlockTransformations:r(l,s),patterns:i(l,s)}}),[t]),g=function({clientIds:e,blocks:t}){const{activeBlockVariation:n,blockVariationTransformations:o}=(0,c.useSelect)((n=>{const{getBlockAttributes:o,canRemoveBlocks:r}=n(li),{getActiveBlockVariation:i,getBlockVariations:s}=n(l.store),a=r(e);if(1!==t.length||!a)return WB;const[c]=t;return{blockVariationTransformations:s(c.name,"transform"),activeBlockVariation:i(c.name,o(c.clientId))}}),[e,t]);return(0,a.useMemo)((()=>o?.filter((({name:e})=>e!==n?.name))),[o,n])}({clientIds:t,blocks:h});function m(e){e.length>1&&s(e[0].clientId,e[e.length-1].clientId)}const f=1===h.length,b=f&&(0,l.isTemplatePart)(h[0]),k=!!d.length&&o&&!b,v=!!g?.length,_=!!p?.length&&o,x=k||v;if(!(n||x||_))return(0,$.jsx)("p",{className:"block-editor-block-switcher__no-transforms",children:(0,C.__)("No transforms.")});const y=f?(0,C._x)("This block is connected.","block toolbar button label and description"):(0,C._x)("These blocks are connected.","block toolbar button label and description");return(0,$.jsxs)("div",{className:"block-editor-block-switcher__container",children:[_&&(0,$.jsx)(uI,{blocks:h,patterns:p,onSelect:n=>{!function(e){i(t,e),m(e)}(n),e()}}),x&&(0,$.jsx)(XB,{className:"block-editor-block-switcher__transforms__menugroup",possibleBlockTransformations:d,possibleBlockVariationTransformations:g,blocks:h,onSelect:n=>{!function(e){const n=(0,l.switchToBlockType)(h,e);i(t,n),m(n)}(n),e()},onSelectVariation:t=>{!function(e){u(h[0].clientId,{...g.find((({name:t})=>t===e)).attributes})}(t),e()}}),n&&(0,$.jsx)(oI,{hoveredBlock:h[0],onSwitch:e}),r&&(0,$.jsx)(os.MenuGroup,{children:(0,$.jsx)(os.__experimentalText,{className:"block-editor-block-switcher__binding-indicator",children:y})})]})}const pI=({icon:e,showTitle:t,blockTitle:n})=>(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Uf,{className:"block-editor-block-switcher__toggle",icon:e,showColors:!0}),t&&n&&(0,$.jsx)("span",{className:"block-editor-block-switcher__toggle-text",children:n})]}),hI=({clientIds:e,disabled:t,isUsingBindings:n})=>{const{hasContentOnlyLocking:o,canRemove:r,hasBlockStyles:i,icon:s,invalidBlocks:a,isReusable:u,isTemplate:d}=(0,c.useSelect)((t=>{const{getTemplateLock:n,getBlocksByClientId:o,getBlockAttributes:r,canRemoveBlocks:i}=t(li),{getBlockStyles:s,getBlockType:a,getActiveBlockVariation:c}=t(l.store),u=o(e);if(!u.length||u.some((e=>!e)))return{invalidBlocks:!0};const[{name:d}]=u,p=1===u.length,h=a(d);let g,m;if(p){const t=c(d,r(e[0]));g=t?.icon||h.icon,m="contentOnly"===n(e[0])}else{const t=1===new Set(u.map((({name:e})=>e))).size;m=e.some((e=>"contentOnly"===n(e))),g=t?h.icon:$B}return{canRemove:i(e),hasBlockStyles:p&&!!s(d)?.length,icon:g,isReusable:p&&(0,l.isReusableBlock)(u[0]),isTemplate:p&&(0,l.isTemplatePart)(u[0]),hasContentOnlyLocking:m}}),[e]),p=bB({clientId:e?.[0],maximumLength:35});if(a)return null;const h=1===e.length,g=h?p:(0,C.__)("Multiple blocks selected");if(t||!i&&!r||o)return(0,$.jsx)(os.ToolbarGroup,{children:(0,$.jsx)(os.ToolbarButton,{disabled:!0,className:"block-editor-block-switcher__no-switcher-icon",title:g,icon:(0,$.jsx)(pI,{icon:s,showTitle:u||d,blockTitle:p})})});const m=h?(0,C.__)("Change block type or style"):(0,C.sprintf)((0,C._n)("Change type of %d block","Change type of %d blocks",e.length),e.length);return(0,$.jsx)(os.ToolbarGroup,{children:(0,$.jsx)(os.ToolbarItem,{children:t=>(0,$.jsx)(os.DropdownMenu,{className:"block-editor-block-switcher",label:g,popoverProps:{placement:"bottom-start",className:"block-editor-block-switcher__popover"},icon:(0,$.jsx)(pI,{icon:s,showTitle:u||d,blockTitle:p}),toggleProps:{description:m,...t},menuProps:{orientation:"both"},children:({onClose:t})=>(0,$.jsx)(dI,{onClose:t,clientIds:e,hasBlockStyles:i,canRemove:r,isUsingBindings:n})})})})},{Fill:gI,Slot:mI}=(0,os.createSlotFill)("__unstableBlockToolbarLastItem");gI.Slot=mI;const fI=gI,bI="align",kI="__experimentalBorder",vI="color",_I="customClassName",xI="typography.__experimentalFontFamily",yI="typography.fontSize",SI="typography.textAlign",wI="layout",CI=["shadow",...["typography.lineHeight",yI,"typography.__experimentalFontStyle","typography.__experimentalFontWeight",xI,SI,"typography.textColumns","typography.__experimentalTextDecoration","typography.__experimentalTextTransform","typography.__experimentalWritingMode","typography.__experimentalLetterSpacing"],kI,vI,"spacing"];const BI={align:e=>(0,l.hasBlockSupport)(e,bI),borderColor:e=>function(e,t="any"){if("web"!==a.Platform.OS)return!1;const n=(0,l.getBlockSupport)(e,kI);return!0===n||("any"===t?!!(n?.color||n?.radius||n?.width||n?.style):!!n?.[t])}(e,"color"),backgroundColor:e=>{const t=(0,l.getBlockSupport)(e,vI);return t&&!1!==t.background},textAlign:e=>(0,l.hasBlockSupport)(e,SI),textColor:e=>{const t=(0,l.getBlockSupport)(e,vI);return t&&!1!==t.text},gradient:e=>{const t=(0,l.getBlockSupport)(e,vI);return null!==t&&"object"==typeof t&&!!t.gradients},className:e=>(0,l.hasBlockSupport)(e,_I,!0),fontFamily:e=>(0,l.hasBlockSupport)(e,xI),fontSize:e=>(0,l.hasBlockSupport)(e,yI),layout:e=>(0,l.hasBlockSupport)(e,wI),style:e=>CI.some((t=>(0,l.hasBlockSupport)(e,t)))};function II(e,t){return Object.entries(BI).reduce(((n,[o,r])=>(r(e.name)&&r(t.name)&&(n[o]=e.attributes[o]),n)),{})}function jI(e,t,n){for(let o=0;o<Math.min(t.length,e.length);o+=1)n(e[o].clientId,II(t[o],e[o])),jI(e[o].innerBlocks,t[o].innerBlocks,n)}function EI(){const e=(0,c.useRegistry)(),{updateBlockAttributes:t}=(0,c.useDispatch)(li),{createSuccessNotice:n,createWarningNotice:o,createErrorNotice:r}=(0,c.useDispatch)(Uo.store);return(0,a.useCallback)((async i=>{let s="";try{if(!window.navigator.clipboard)return void r((0,C.__)("Unable to paste styles. This feature is only available on secure (https) sites in supporting browsers."),{type:"snackbar"});s=await window.navigator.clipboard.readText()}catch(e){return void r((0,C.__)("Unable to paste styles. Please allow browser clipboard permissions before continuing."),{type:"snackbar"})}if(!s||!function(e){try{const t=(0,l.parse)(e,{__unstableSkipMigrationLogs:!0,__unstableSkipAutop:!0});return 1!==t.length||"core/freeform"!==t[0].name}catch(e){return!1}}(s))return void o((0,C.__)("Unable to paste styles. Block styles couldn't be found within the copied content."),{type:"snackbar"});const a=(0,l.parse)(s);if(1===a.length?e.batch((()=>{jI(i,i.map((()=>a[0])),t)})):e.batch((()=>{jI(i,a,t)})),1===i.length){const e=(0,l.getBlockType)(i[0].name)?.title;n((0,C.sprintf)((0,C.__)("Pasted styles to %s."),e),{type:"snackbar"})}else n((0,C.sprintf)((0,C.__)("Pasted styles to %d blocks."),i.length),{type:"snackbar"})}),[e.batch,t,n,o,r])}function TI({clientIds:e,children:t,__experimentalUpdateSelection:n}){const{getDefaultBlockName:o,getGroupingBlockName:r}=(0,c.useSelect)(l.store),i=(0,c.useSelect)((t=>{const{canInsertBlockType:n,getBlockRootClientId:r,getBlocksByClientId:i,getDirectInsertBlock:s,canMoveBlocks:a,canRemoveBlocks:c}=t(li),u=i(e),d=r(e[0]),p=n(o(),d),h=d?s(d):null;return{canMove:a(e),canRemove:c(e),canInsertBlock:p||!!h,canCopyStyles:u.every((e=>!!e&&((0,l.hasBlockSupport)(e.name,"color")||(0,l.hasBlockSupport)(e.name,"typography")))),canDuplicate:u.every((e=>!!e&&(0,l.hasBlockSupport)(e.name,"multiple",!0)&&n(e.name,d)))}}),[e,o]),{getBlocksByClientId:s,getBlocks:a}=(0,c.useSelect)(li),{canMove:u,canRemove:d,canInsertBlock:p,canCopyStyles:h,canDuplicate:g}=i,{removeBlocks:m,replaceBlocks:f,duplicateBlocks:b,insertAfterBlock:k,insertBeforeBlock:v,flashBlock:_,setBlockMovingClientId:x,setNavigationMode:y,selectBlock:S}=(0,c.useDispatch)(li),w=xy(),C=EI();return t({canCopyStyles:h,canDuplicate:g,canInsertBlock:p,canMove:u,canRemove:d,onDuplicate:()=>b(e,n),onRemove:()=>m(e,n),onInsertBefore(){v(e[0])},onInsertAfter(){k(e[e.length-1])},onMoveTo(){y(!0),S(e[0]),x(e[0])},onGroup(){if(!e.length)return;const t=r(),n=(0,l.switchToBlockType)(s(e),t);n&&f(e,n)},onUngroup(){if(!e.length)return;const t=a(e[0]);t.length&&f(e,t)},onCopy(){1===e.length&&_(e[0]),w("copy",e)},async onPasteStyles(){await C(s(e))}})}const MI=function({clientId:e}){const t=(0,c.useSelect)((t=>t(li).getBlock(e)),[e]),{replaceBlocks:n}=(0,c.useDispatch)(li);return t&&"core/html"===t.name?(0,$.jsx)(os.MenuItem,{onClick:()=>n(e,(0,l.rawHandler)({HTML:(0,l.getBlockContent)(t)})),children:(0,C.__)("Convert to Blocks")}):null},{Fill:PI,Slot:RI}=(0,os.createSlotFill)("__unstableBlockSettingsMenuFirstItem");PI.Slot=RI;const NI=PI;function LI(e){return(0,c.useSelect)((t=>{const{getBlocksByClientId:n,getSelectedBlockClientIds:o,isUngroupable:r,isGroupable:i}=t(li),{getGroupingBlockName:s,getBlockType:a}=t(l.store),c=e?.length?e:o(),u=n(c),[d]=u,p=1===c.length&&r(c[0]);return{clientIds:c,isGroupable:i(c),isUngroupable:p,blocksSelection:u,groupingBlockName:s(),onUngroup:p&&a(d.name)?.transforms?.ungroup}}),[e])}function AI({clientIds:e,isGroupable:t,isUngroupable:n,onUngroup:o,blocksSelection:r,groupingBlockName:i,onClose:s=(()=>{})}){const{getSelectedBlockClientIds:a}=(0,c.useSelect)(li),{replaceBlocks:u}=(0,c.useDispatch)(li);if(!t&&!n)return null;const d=a();return(0,$.jsxs)($.Fragment,{children:[t&&(0,$.jsx)(os.MenuItem,{shortcut:d.length>1?va.displayShortcut.primary("g"):void 0,onClick:()=>{(()=>{const t=(0,l.switchToBlockType)(r,i);t&&u(e,t)})(),s()},children:(0,C._x)("Group","verb")}),n&&(0,$.jsx)(os.MenuItem,{onClick:()=>{(()=>{let t=r[0].innerBlocks;t.length&&(o&&(t=o(r[0].attributes,r[0].innerBlocks)),u(e,t))})(),s()},children:(0,C._x)("Ungroup","Ungrouping blocks from within a grouping block back into individual blocks within the Editor")})]})}function DI(e){return(0,c.useSelect)((t=>{const{canEditBlock:n,canMoveBlock:o,canRemoveBlock:r,canLockBlockType:i,getBlockName:s,getTemplateLock:l}=t(li),a=n(e),c=o(e),u=r(e);return{canEdit:a,canMove:c,canRemove:u,canLock:i(s(e)),isContentLocked:"contentOnly"===l(e),isLocked:!a||!c||!u}}),[e])}const OI=(0,$.jsx)(G.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,$.jsx)(G.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"})}),zI=(0,$.jsx)(G.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,$.jsx)(G.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-1zM9.8 7c0-1.2 1-2.2 2.2-2.2 1.2 0 2.2 1 2.2 2.2v3H9.8V7zm6.7 11.5h-9v-7h9v7z"})}),VI=(0,$.jsx)(G.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,$.jsx)(G.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"})}),FI=["core/block","core/navigation"];function HI(e){return e.remove&&e.move?"all":!(!e.remove||e.move)&&"insert"}function GI({clientId:e,onClose:t}){const[n,o]=(0,a.useState)({move:!1,remove:!1}),{canEdit:r,canMove:i,canRemove:s}=DI(e),{allowsEditLocking:u,templateLock:d,hasTemplateLock:p}=(0,c.useSelect)((t=>{const{getBlockName:n,getBlockAttributes:o}=t(li),r=n(e),i=(0,l.getBlockType)(r);return{allowsEditLocking:FI.includes(r),templateLock:o(e)?.templateLock,hasTemplateLock:!!i?.attributes?.templateLock}}),[e]),[h,g]=(0,a.useState)(!!d),{updateBlockAttributes:m}=(0,c.useDispatch)(li),f=Um(e);(0,a.useEffect)((()=>{o({move:!i,remove:!s,...u?{edit:!r}:{}})}),[r,i,s,u]);const b=Object.values(n).every(Boolean),k=Object.values(n).some(Boolean)&&!b;return(0,$.jsx)(os.Modal,{title:(0,C.sprintf)((0,C.__)("Lock %s"),f.title),overlayClassName:"block-editor-block-lock-modal",onRequestClose:t,children:(0,$.jsxs)("form",{onSubmit:o=>{o.preventDefault(),m([e],{lock:n,templateLock:h?HI(n):void 0}),t()},children:[(0,$.jsxs)("fieldset",{className:"block-editor-block-lock-modal__options",children:[(0,$.jsx)("legend",{children:(0,C.__)("Choose specific attributes to restrict or lock all available options.")}),(0,$.jsx)("ul",{role:"list",className:"block-editor-block-lock-modal__checklist",children:(0,$.jsxs)("li",{children:[(0,$.jsx)(os.CheckboxControl,{__nextHasNoMarginBottom:!0,className:"block-editor-block-lock-modal__options-all",label:(0,C.__)("Lock all"),checked:b,indeterminate:k,onChange:e=>o({move:e,remove:e,...u?{edit:e}:{}})}),(0,$.jsxs)("ul",{role:"list",className:"block-editor-block-lock-modal__checklist",children:[u&&(0,$.jsxs)("li",{className:"block-editor-block-lock-modal__checklist-item",children:[(0,$.jsx)(os.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,C.__)("Restrict editing"),checked:!!n.edit,onChange:e=>o((t=>({...t,edit:e})))}),(0,$.jsx)(os.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:n.edit?VI:OI})]}),(0,$.jsxs)("li",{className:"block-editor-block-lock-modal__checklist-item",children:[(0,$.jsx)(os.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,C.__)("Disable movement"),checked:n.move,onChange:e=>o((t=>({...t,move:e})))}),(0,$.jsx)(os.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:n.move?VI:OI})]}),(0,$.jsxs)("li",{className:"block-editor-block-lock-modal__checklist-item",children:[(0,$.jsx)(os.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,C.__)("Prevent removal"),checked:n.remove,onChange:e=>o((t=>({...t,remove:e})))}),(0,$.jsx)(os.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:n.remove?VI:OI})]})]})]})}),p&&(0,$.jsx)(os.ToggleControl,{__nextHasNoMarginBottom:!0,className:"block-editor-block-lock-modal__template-lock",label:(0,C.__)("Apply to all blocks inside"),checked:h,disabled:n.move&&!n.remove,onChange:()=>g(!h)})]}),(0,$.jsxs)(os.Flex,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1,children:[(0,$.jsx)(os.FlexItem,{children:(0,$.jsx)(os.Button,{variant:"tertiary",onClick:t,__next40pxDefaultSize:!0,children:(0,C.__)("Cancel")})}),(0,$.jsx)(os.FlexItem,{children:(0,$.jsx)(os.Button,{variant:"primary",type:"submit",__next40pxDefaultSize:!0,children:(0,C.__)("Apply")})})]})]})})}function $I({clientId:e}){const{canLock:t,isLocked:n}=DI(e),[o,r]=(0,a.useReducer)((e=>!e),!1);if(!t)return null;const i=n?(0,C.__)("Unlock"):(0,C.__)("Lock");return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(os.MenuItem,{icon:n?OI:zI,onClick:r,"aria-expanded":o,"aria-haspopup":"dialog",children:i}),o&&(0,$.jsx)(GI,{clientId:e,onClose:r})]})}const UI=()=>{};function WI({clientId:e,onToggle:t=UI}){const{blockType:n,mode:o,isCodeEditingEnabled:r}=(0,c.useSelect)((t=>{const{getBlock:n,getBlockMode:o,getSettings:r}=t(li),i=n(e);return{mode:o(e),blockType:i?(0,l.getBlockType)(i.name):null,isCodeEditingEnabled:r().codeEditingEnabled}}),[e]),{toggleBlockMode:i}=(0,c.useDispatch)(li);if(!n||!(0,l.hasBlockSupport)(n,"html",!0)||!r)return null;const s="visual"===o?(0,C.__)("Edit as HTML"):(0,C.__)("Edit visually");return(0,$.jsx)(os.MenuItem,{onClick:()=>{i(e),t()},children:s})}function KI({clientId:e,onClose:t}){const{templateLock:n,isLockedByParent:o,isEditingAsBlocks:r}=(0,c.useSelect)((t=>{const{getContentLockingParent:n,getTemplateLock:o,getTemporarilyEditingAsBlocks:r}=te(t(li));return{templateLock:o(e),isLockedByParent:!!n(e),isEditingAsBlocks:r()===e}}),[e]),i=(0,c.useDispatch)(li),s=!o&&"contentOnly"===n;if(!s&&!r)return null;const{modifyContentLockBlock:l}=te(i);return!r&&s&&(0,$.jsx)(os.MenuItem,{onClick:()=>{l(e),t()},children:(0,C._x)("Modify","Unlock content locked blocks")})}function ZI(e){return 0===e?.trim()?.length}function qI({blockName:e,originalBlockName:t,onClose:n,onSave:o,hasOverridesWarning:r}){const[i,s]=(0,a.useState)(e),l=i!==e,c=i===t,u=ZI(i),d=l||c;return(0,$.jsx)(os.Modal,{title:(0,C.__)("Rename"),onRequestClose:n,overlayClassName:"block-editor-block-rename-modal",focusOnMount:"firstContentElement",size:"small",children:(0,$.jsx)("form",{onSubmit:e=>{e.preventDefault(),d&&(()=>{const e=c||u?(0,C.sprintf)((0,C.__)('Block name reset to: "%s".'),i):(0,C.sprintf)((0,C.__)('Block name changed to: "%s".'),i);(0,$o.speak)(e,"assertive"),o(i),n()})()},children:(0,$.jsxs)(os.__experimentalVStack,{spacing:"3",children:[(0,$.jsx)(os.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:i,label:(0,C.__)("Name"),help:r?(0,C.__)("This block allows overrides. Changing the name can cause problems with content entered into instances of this pattern."):void 0,placeholder:t,onChange:s,onFocus:e=>e.target.select()}),(0,$.jsxs)(os.__experimentalHStack,{justify:"right",children:[(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:n,children:(0,C.__)("Cancel")}),(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,"aria-disabled":!d,variant:"primary",type:"submit",children:(0,C.__)("Save")})]})]})})})}function YI({clientId:e}){const[t,n]=(0,a.useState)(!1),{metadata:o}=(0,c.useSelect)((t=>{const{getBlockAttributes:n}=t(li),o=n(e)?.metadata;return{metadata:o}}),[e]),{updateBlockAttributes:r}=(0,c.useDispatch)(li),i=o?.name,s=!!i&&!!o?.bindings&&Object.values(o.bindings).some((e=>"core/pattern-overrides"===e.source));const l=Um(e);return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(os.MenuItem,{onClick:()=>{n(!0)},"aria-expanded":t,"aria-haspopup":"dialog",children:(0,C.__)("Rename")}),t&&(0,$.jsx)(qI,{blockName:i||"",originalBlockName:l?.title,hasOverridesWarning:s,onClose:()=>n(!1),onSave:t=>{(t===l?.title||ZI(t))&&(t=void 0),function(t){r([e],{metadata:{...o,name:t}})}(t)}})]})}const{Fill:XI,Slot:QI}=(0,os.createSlotFill)("BlockSettingsMenuControls");function JI({...e}){return(0,$.jsx)(os.__experimentalStyleProvider,{document,children:(0,$.jsx)(XI,{...e})})}JI.Slot=({fillProps:e,clientIds:t=null})=>{const{selectedBlocks:n,selectedClientIds:o,isContentOnly:r}=(0,c.useSelect)((e=>{const{getBlockNamesByClientId:n,getSelectedBlockClientIds:o,getBlockEditingMode:r}=e(li),i=null!==t?t:o();return{selectedBlocks:n(i),selectedClientIds:i,isContentOnly:"contentOnly"===r(i[0])}}),[t]),{canLock:i}=DI(o[0]),{canRename:s}=(a=n[0],{canRename:(0,l.getBlockSupport)(a,"renaming",!0)});var a;const d=1===o.length&&i&&!r,p=1===o.length&&s&&!r,h=LI(o),{isGroupable:g,isUngroupable:m}=h,f=(g||m)&&!r;return(0,$.jsx)(QI,{fillProps:{...e,selectedBlocks:n,selectedClientIds:o},children:t=>!t?.length>0&&!f&&!d?null:(0,$.jsxs)(os.MenuGroup,{children:[f&&(0,$.jsx)(AI,{...h,onClose:e?.onClose}),d&&(0,$.jsx)($I,{clientId:o[0]}),p&&(0,$.jsx)(YI,{clientId:o[0]}),t,e?.canMove&&!e?.onlyBlock&&!r&&(0,$.jsx)(os.MenuItem,{onClick:(0,u.pipe)(e?.onClose,e?.onMoveTo),children:(0,C.__)("Move to")}),1===o.length&&(0,$.jsx)(KI,{clientId:o[0],onClose:e?.onClose}),1===e?.count&&!r&&(0,$.jsx)(WI,{clientId:e?.firstBlockClientId,onToggle:e?.onClose})]})})};const ej=JI;function tj({parentClientId:e,parentBlockType:t}){const n=(0,u.useViewportMatch)("medium","<"),{selectBlock:o}=(0,c.useDispatch)(li),r=(0,a.useRef)(),i=HB({ref:r,highlightParent:!0});return n?(0,$.jsx)(os.MenuItem,{...i,ref:r,icon:(0,$.jsx)(Uf,{icon:t.icon}),onClick:()=>o(e),children:(0,C.sprintf)((0,C.__)("Select parent block (%s)"),t.title)}):null}const nj={className:"block-editor-block-settings-menu__popover",placement:"bottom-start"};function oj({clientIds:e,onCopy:t,label:n,shortcut:o}){const{getBlocksByClientId:r}=(0,c.useSelect)(li),i=(0,u.useCopyToClipboard)((()=>(0,l.serialize)(r(e))),t),s=n||(0,C.__)("Copy");return(0,$.jsx)(os.MenuItem,{ref:i,shortcut:o,children:s})}function rj({block:e,clientIds:t,children:n,__experimentalSelectBlock:o,...r}){const i=e?.clientId,s=t.length,d=t[0],p=(0,c.useSelect)((e=>{const{__unstableGetEditorMode:t}=te(e(li));return"zoom-out"===t()})),{firstParentClientId:h,onlyBlock:g,parentBlockType:m,previousBlockClientId:f,selectedBlockClientIds:b,openedBlockSettingsMenu:k,isContentOnly:v}=(0,c.useSelect)((e=>{const{getBlockCount:t,getBlockName:n,getBlockRootClientId:o,getPreviousBlockClientId:r,getSelectedBlockClientIds:i,getBlockAttributes:s,getOpenedBlockSettingsMenu:a,getBlockEditingMode:c}=te(e(li)),{getActiveBlockVariation:u}=e(l.store),p=o(d),h=p&&n(p);return{firstParentClientId:p,onlyBlock:1===t(p),parentBlockType:p&&(u(h,s(p))||(0,l.getBlockType)(h)),previousBlockClientId:r(d),selectedBlockClientIds:i(),openedBlockSettingsMenu:a(),isContentOnly:"contentOnly"===c(d)}}),[d]),{getBlockOrder:_,getSelectedBlockClientIds:x}=(0,c.useSelect)(li),{setOpenedBlockSettingsMenu:y}=te((0,c.useDispatch)(li)),S=(0,c.useSelect)((e=>{const{getShortcutRepresentation:t}=e(Yf.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")}}),[]),w=b.length>0;async function B(e){if(!o)return;const t=await e;t&&t[0]&&o(t[0],!1)}function I(){if(!o)return;let e=f||h;e||(e=_()[0]);const t=w&&0===x().length;o(e,t)}const j=b?.includes(h),E=i?k===i||!1:void 0;function T(e){e&&k!==i?y(i):!e&&k&&k===i&&y(void 0)}return(0,$.jsx)(TI,{clientIds:t,__experimentalUpdateSelection:!o,children:({canCopyStyles:e,canDuplicate:o,canInsertBlock:i,canMove:l,canRemove:c,onDuplicate:f,onInsertAfter:b,onInsertBefore:k,onRemove:_,onCopy:x,onPasteStyles:y,onMoveTo:w})=>(0,$.jsx)(os.DropdownMenu,{icon:lb,label:(0,C.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:nj,open:E,onToggle:T,noIcons:!0,...r,children:({onClose:r})=>(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(os.MenuGroup,{children:[(0,$.jsx)(NI.Slot,{fillProps:{onClose:r}}),!j&&!!h&&(0,$.jsx)(tj,{parentClientId:h,parentBlockType:m}),1===s&&(0,$.jsx)(MI,{clientId:d}),(!v||p)&&(0,$.jsx)(oj,{clientIds:t,onCopy:x,shortcut:va.displayShortcut.primary("c")}),o&&(0,$.jsx)(os.MenuItem,{onClick:(0,u.pipe)(r,f,B),shortcut:S.duplicate,children:(0,C.__)("Duplicate")}),i&&!v&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(os.MenuItem,{onClick:(0,u.pipe)(r,k),shortcut:S.insertBefore,children:(0,C.__)("Add before")}),(0,$.jsx)(os.MenuItem,{onClick:(0,u.pipe)(r,b),shortcut:S.insertAfter,children:(0,C.__)("Add after")})]})]}),e&&!v&&(0,$.jsxs)(os.MenuGroup,{children:[(0,$.jsx)(oj,{clientIds:t,onCopy:x,label:(0,C.__)("Copy styles")}),(0,$.jsx)(os.MenuItem,{onClick:y,children:(0,C.__)("Paste styles")})]}),(0,$.jsx)(ej.Slot,{fillProps:{onClose:r,canMove:l,onMoveTo:w,onlyBlock:g,count:s,firstBlockClientId:d},clientIds:t}),"function"==typeof n?n({onClose:r}):a.Children.map((e=>(0,a.cloneElement)(e,{onClose:r}))),c&&(0,$.jsx)(os.MenuGroup,{children:(0,$.jsx)(os.MenuItem,{onClick:(0,u.pipe)(r,_,I),shortcut:S.remove,children:(0,C.__)("Delete")})})]})})})}const ij=rj;const sj=function({clientIds:e,...t}){return(0,$.jsx)(os.ToolbarGroup,{children:(0,$.jsx)(os.ToolbarItem,{children:n=>(0,$.jsx)(ij,{clientIds:e,toggleProps:n,...t})})})};function lj({clientId:e}){const{canLock:t,isLocked:n}=DI(e),[o,r]=(0,a.useReducer)((e=>!e),!1),i=(0,a.useRef)(!1);if((0,a.useEffect)((()=>{n&&(i.current=!0)}),[n]),!n&&!i.current)return null;let s=n?(0,C.__)("Unlock"):(0,C.__)("Lock");return!t&&n&&(s=(0,C.__)("Locked")),(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(os.ToolbarGroup,{className:"block-editor-block-lock-toolbar",children:(0,$.jsx)(os.ToolbarButton,{disabled:!t,icon:n?VI:OI,label:s,onClick:r,"aria-expanded":o,"aria-haspopup":"dialog"})}),o&&(0,$.jsx)(GI,{clientId:e,onClose:r})]})}const aj=(0,$.jsx)(G.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,$.jsx)(G.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"})}),cj=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M4 6.5h5a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H4V16h5a.5.5 0 0 0 .5-.5v-7A.5.5 0 0 0 9 8H4V6.5Zm16 0h-5a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h5V16h-5a.5.5 0 0 1-.5-.5v-7A.5.5 0 0 1 15 8h5V6.5Z"})}),uj=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M17.5 4v5a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2V4H8v5a.5.5 0 0 0 .5.5h7A.5.5 0 0 0 16 9V4h1.5Zm0 16v-5a2 2 0 0 0-2-2h-7a2 2 0 0 0-2 2v5H8v-5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 .5.5v5h1.5Z"})}),dj=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"m3 5c0-1.10457.89543-2 2-2h13.5c1.1046 0 2 .89543 2 2v13.5c0 1.1046-.8954 2-2 2h-13.5c-1.10457 0-2-.8954-2-2zm2-.5h6v6.5h-6.5v-6c0-.27614.22386-.5.5-.5zm-.5 8v6c0 .2761.22386.5.5.5h6v-6.5zm8 0v6.5h6c.2761 0 .5-.2239.5-.5v-6zm0-8v6.5h6.5v-6c0-.27614-.2239-.5-.5-.5z",fillRule:"evenodd",clipRule:"evenodd"})}),pj={group:{type:"constrained"},row:{type:"flex",flexWrap:"nowrap"},stack:{type:"flex",orientation:"vertical"},grid:{type:"grid"}};const hj=function(){const{blocksSelection:e,clientIds:t,groupingBlockName:n,isGroupable:o}=LI(),{replaceBlocks:r}=(0,c.useDispatch)(li),{canRemove:i,variations:s}=(0,c.useSelect)((e=>{const{canRemoveBlocks:o}=e(li),{getBlockVariations:r}=e(l.store);return{canRemove:o(t),variations:r(n,"transform")}}),[t,n]),a=o=>{const i=(0,l.switchToBlockType)(e,n);"string"!=typeof o&&(o="group"),i&&i.length>0&&(i[0].attributes.layout=pj[o],r(t,i))};if(!o||!i)return null;const u=!!s.find((({name:e})=>"group-row"===e)),d=!!s.find((({name:e})=>"group-stack"===e)),p=!!s.find((({name:e})=>"group-grid"===e));return(0,$.jsxs)(os.ToolbarGroup,{children:[(0,$.jsx)(os.ToolbarButton,{icon:aj,label:(0,C._x)("Group","verb"),onClick:a}),u&&(0,$.jsx)(os.ToolbarButton,{icon:cj,label:(0,C._x)("Row","single horizontal line"),onClick:()=>a("row")}),d&&(0,$.jsx)(os.ToolbarButton,{icon:uj,label:(0,C._x)("Stack","verb"),onClick:()=>a("stack")}),p&&(0,$.jsx)(os.ToolbarButton,{icon:dj,label:(0,C._x)("Grid","verb"),onClick:()=>a("grid")})]})};function gj({clientIds:e}){const t=1===e.length?e[0]:void 0,n=(0,c.useSelect)((e=>!!t&&"html"===e(li).getBlockMode(t)),[t]),{toggleBlockMode:o}=(0,c.useDispatch)(li);return n?(0,$.jsx)(os.ToolbarGroup,{children:(0,$.jsx)(os.ToolbarButton,{onClick:()=>{o(t)},children:(0,C.__)("Edit visually")})}):null}const mj=(0,a.createContext)("");function fj(e){return Array.from(e.querySelectorAll("[data-toolbar-item]:not([disabled])"))}function bj(e){return e.contains(e.ownerDocument.activeElement)}function kj({toolbarRef:e,focusOnMount:t,isAccessibleToolbar:n,defaultIndex:o,onIndexChange:r,shouldUseKeyboardFocusShortcut:i,focusEditorOnEscape:s}){const[l]=(0,a.useState)(t),[u]=(0,a.useState)(o),d=(0,a.useCallback)((()=>{!function(e){const[t]=ba.focus.tabbable.find(e);t&&t.focus({preventScroll:!0})}(e.current)}),[e]);(0,Yf.useShortcut)("core/block-editor/focus-toolbar",(()=>{i&&d()})),(0,a.useEffect)((()=>{l&&d()}),[n,l,d]),(0,a.useEffect)((()=>{const t=e.current;let n=0;return l||bj(t)||(n=window.requestAnimationFrame((()=>{const e=fj(t),n=u||0;e[n]&&bj(t)&&e[n].focus({preventScroll:!0})}))),()=>{if(window.cancelAnimationFrame(n),!r||!t)return;const e=fj(t).findIndex((e=>0===e.tabIndex));r(e)}}),[u,l,r,e]);const{getLastFocus:p}=te((0,c.useSelect)(li));(0,a.useEffect)((()=>{const t=e.current;if(s){const e=e=>{const t=p();e.keyCode===va.ESCAPE&&t?.current&&(e.preventDefault(),t.current.focus())};return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}}}),[s,p,e])}function vj({children:e,focusOnMount:t,focusEditorOnEscape:n=!1,shouldUseKeyboardFocusShortcut:o=!0,__experimentalInitialIndex:r,__experimentalOnIndexChange:i,orientation:s="horizontal",...l}){const c=(0,a.useRef)(),u=function(e){const[t,n]=(0,a.useState)(!0),o=(0,a.useCallback)((()=>{const t=!ba.focus.tabbable.find(e.current).some((e=>!("toolbarItem"in e.dataset)));t||y()("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)}),[e]);return(0,a.useLayoutEffect)((()=>{const t=new window.MutationObserver(o);return t.observe(e.current,{childList:!0,subtree:!0}),()=>t.disconnect()}),[o,t,e]),t}(c);return kj({toolbarRef:c,focusOnMount:t,defaultIndex:r,onIndexChange:i,isAccessibleToolbar:u,shouldUseKeyboardFocusShortcut:o,focusEditorOnEscape:n}),u?(0,$.jsx)(os.Toolbar,{label:l["aria-label"],ref:c,orientation:s,...l,children:e}):(0,$.jsx)(os.NavigableMenu,{orientation:s,role:"toolbar",ref:c,...l,children:e})}function _j(e="default"){const t=rs[e]?.Slot,n=(0,os.__experimentalUseSlotFills)(t?.__unstableName);return t?!!n?.length:null}function xj(){const{isToolbarEnabled:e,isBlockDisabled:t}=(0,c.useSelect)((e=>{const{getBlockEditingMode:t,getBlockName:n,getBlockSelectionStart:o}=e(li),r=o(),i=r&&(0,l.getBlockType)(n(r));return{isToolbarEnabled:i&&(0,l.hasBlockSupport)(i,"__experimentalToolbar",!0),isBlockDisabled:"disabled"===t(r)}}),[]),n=function(){let e=!1;for(const t in rs)_j(t)&&(e=!0);return e}();return!(!e||t&&!n)}const yj=(0,$.jsx)(G.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/SVG",children:(0,$.jsx)(G.Path,{d:"M17.192 6.75L15.47 5.03l1.06-1.06 3.537 3.53-3.537 3.53-1.06-1.06 1.723-1.72h-3.19c-.602 0-.993.202-1.28.498-.309.319-.538.792-.695 1.383-.13.488-.222 1.023-.296 1.508-.034.664-.116 1.413-.303 2.117-.193.721-.513 1.467-1.068 2.04-.575.594-1.359.954-2.357.954H4v-1.5h4.003c.601 0 .993-.202 1.28-.498.308-.319.538-.792.695-1.383.149-.557.216-1.093.288-1.662l.039-.31a9.653 9.653 0 0 1 .272-1.653c.193-.722.513-1.467 1.067-2.04.576-.594 1.36-.954 2.358-.954h3.19zM8.004 6.75c.8 0 1.46.23 1.988.628a6.24 6.24 0 0 0-.684 1.396 1.725 1.725 0 0 0-.024-.026c-.287-.296-.679-.498-1.28-.498H4v-1.5h4.003zM12.699 14.726c-.161.459-.38.94-.684 1.396.527.397 1.188.628 1.988.628h3.19l-1.722 1.72 1.06 1.06L20.067 16l-3.537-3.53-1.06 1.06 1.723 1.72h-3.19c-.602 0-.993-.202-1.28-.498a1.96 1.96 0 0 1-.024-.026z"})}),Sj=[];function wj(e){return(0,$.jsx)(os.ToolbarGroup,{children:(0,$.jsx)(os.ToolbarButton,{...e})})}function Cj({clientId:e,as:t=wj}){const{categories:n,patterns:o,patternName:r}=(0,c.useSelect)((t=>{const{getBlockAttributes:n,getBlockRootClientId:o,__experimentalGetAllowedPatterns:r}=t(li),i=n(e),s=i?.metadata?.categories||Sj,l=i?.metadata?.patternName,a=o(e);return{categories:s,patterns:s.length>0?r(a):Sj,patternName:l}}),[e]),{replaceBlocks:i}=(0,c.useDispatch)(li),s=(0,a.useMemo)((()=>0!==n.length&&o&&0!==o.length?o.filter((e=>{const t="core"===e.source||e.source?.startsWith("pattern-directory")&&"pattern-directory/theme"!==e.source;return 1===e.blocks.length&&!t&&e.categories?.some((e=>n.includes(e)))&&("unsynced"===e.syncStatus||!e.id)})):Sj),[n,o]);if(s.length<2)return null;const l=t;return(0,$.jsx)(l,{label:(0,C.__)("Shuffle"),icon:yj,className:"block-editor-block-toolbar-shuffle",onClick:()=>{const t=function(){const e=s.length,t=s.findIndex((({name:e})=>e===r));return s[t+1<e?t+1:0]}();t.blocks[0].attributes={...t.blocks[0].attributes,metadata:{...t.blocks[0].attributes.metadata,categories:n}},i(e,t.blocks)}})}function Bj({hideDragHandle:e,focusOnMount:t,__experimentalInitialIndex:n,__experimentalOnIndexChange:o,variant:r="unstyled"}){const{blockClientId:i,blockClientIds:s,isDefaultEditingMode:d,blockType:p,toolbarKey:h,shouldShowVisualToolbar:g,showParentSelector:m,isUsingBindings:f,hasParentPattern:b,hasContentOnlyLocking:k,showShuffleButton:v,showSlots:_,showGroupButtons:x,showLockButtons:y}=(0,c.useSelect)((e=>{const{getBlockName:t,getBlockMode:n,getBlockParents:o,getSelectedBlockClientIds:r,isBlockValid:i,getBlockEditingMode:s,getBlockAttributes:a,getBlockParentsByBlockName:c,getTemplateLock:u,isZoomOutMode:d}=te(e(li)),p=r(),h=p[0],g=o(h),m=g[g.length-1],f=t(m),b=(0,l.getBlockType)(f),k="default"===s(h),v=t(h),_=p.every((e=>i(e))),x=p.every((e=>"visual"===n(e))),y=p.every((e=>!!a(e)?.metadata?.bindings)),S=p.every((e=>c(e,"core/block",!0).length>0)),w=p.some((e=>"contentOnly"===u(e)));return{blockClientId:h,blockClientIds:p,isDefaultEditingMode:k,blockType:h&&(0,l.getBlockType)(v),shouldShowVisualToolbar:_&&x,toolbarKey:`${h}${m}`,showParentSelector:!d()&&b&&"default"===s(m)&&(0,l.hasBlockSupport)(b,"__experimentalParentSelector",!0)&&1===p.length&&k,isUsingBindings:y,hasParentPattern:S,hasContentOnlyLocking:w,showShuffleButton:d(),showSlots:!d(),showGroupButtons:!d(),showLockButtons:!d()}}),[]),S=(0,a.useRef)(null),w=(0,a.useRef)(),B=HB({ref:w}),I=!(0,u.useViewportMatch)("medium","<");if(!xj())return null;const j=s.length>1,E=(0,l.isReusableBlock)(p)||(0,l.isTemplatePart)(p),T=Zi("block-editor-block-contextual-toolbar",{"has-parent":m}),M=Zi("block-editor-block-toolbar",{"is-synced":E,"is-connected":f});return(0,$.jsx)(vj,{focusEditorOnEscape:!0,className:T,"aria-label":(0,C.__)("Block tools"),variant:"toolbar"===r?void 0:r,focusOnMount:t,__experimentalInitialIndex:n,__experimentalOnIndexChange:o,children:(0,$.jsxs)("div",{ref:S,className:M,children:[m&&!j&&I&&(0,$.jsx)(GB,{}),(g||j)&&!b&&(0,$.jsx)("div",{ref:w,...B,children:(0,$.jsxs)(os.ToolbarGroup,{className:"block-editor-block-toolbar__block-controls",children:[(0,$.jsx)(hI,{clientIds:s,disabled:!d,isUsingBindings:f}),!j&&y&&(0,$.jsx)(lj,{clientId:i}),(0,$.jsx)(DB,{clientIds:s,hideDragHandle:e})]})}),!k&&g&&j&&x&&(0,$.jsx)(hj,{}),v&&(0,$.jsx)(os.ToolbarGroup,{children:(0,$.jsx)(Cj,{clientId:s[0],as:os.ToolbarButton})}),g&&_&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(us.Slot,{group:"parent",className:"block-editor-block-toolbar__slot"}),(0,$.jsx)(us.Slot,{group:"block",className:"block-editor-block-toolbar__slot"}),(0,$.jsx)(us.Slot,{className:"block-editor-block-toolbar__slot"}),(0,$.jsx)(us.Slot,{group:"inline",className:"block-editor-block-toolbar__slot"}),(0,$.jsx)(us.Slot,{group:"other",className:"block-editor-block-toolbar__slot"}),(0,$.jsx)(mj.Provider,{value:p?.name,children:(0,$.jsx)(fI.Slot,{})})]}),(0,$.jsx)(gj,{clientIds:s}),(0,$.jsx)(sj,{clientIds:s})]})},h)}function Ij({hideDragHandle:e,variant:t}){return(0,$.jsx)(Bj,{hideDragHandle:e,variant:t,focusOnMount:void 0,__experimentalInitialIndex:void 0,__experimentalOnIndexChange:void 0})}function jj({clientId:e,isTyping:t,__unstableContentRef:n}){const{capturingClientId:o,isInsertionPointVisible:r,lastClientId:i}=IB(e),s=(0,a.useRef)();(0,a.useEffect)((()=>{s.current=void 0}),[e]);const{stopTyping:l}=(0,c.useDispatch)(li),u=(0,a.useRef)(!1);(0,Yf.useShortcut)("core/block-editor/focus-toolbar",(()=>{u.current=!0,l(!0)})),(0,a.useEffect)((()=>{u.current=!1}));const d=o||e,p=BB({contentElement:n?.current,clientId:d});return!t&&(0,$.jsx)(Jg,{clientId:d,bottomClientId:i,className:Zi("block-editor-block-list__block-popover",{"is-insertion-point-visible":r}),resize:!1,...p,children:(0,$.jsx)(Bj,{focusOnMount:u.current,__experimentalInitialIndex:s.current,__experimentalOnIndexChange:e=>{s.current=e},variant:"toolbar"})})}const Ej=(0,a.forwardRef)((function({clientId:e,rootClientId:t},n){const o=(0,c.useSelect)((n=>{const{getBlock:o,getBlockIndex:r,hasBlockMovingClientId:i,getBlockListSettings:s,__unstableGetEditorMode:a,getNextBlockClientId:c,getPreviousBlockClientId:u,canMoveBlock:d}=n(li),{getActiveBlockVariation:p,getBlockType:h}=n(l.store),g=r(e),{name:m,attributes:f}=o(e),b=h(m),k=s(t)?.orientation,v=p(m,f);return{blockMovingMode:i(),editorMode:a(),icon:v?.icon||b.icon,label:(0,l.__experimentalGetAccessibleBlockLabel)(b,f,g+1,k),canMove:d(e,t),getNextBlockClientId:c,getPreviousBlockClientId:u}}),[e,t]),{label:r,icon:i,blockMovingMode:s,editorMode:u,canMove:d}=o,{setNavigationMode:p,removeBlock:h}=(0,c.useDispatch)(li);(0,a.useEffect)((()=>{"navigation"===u&&(n.current.focus(),(0,$o.speak)(r))}),[r,u]);const g=vp(e),{hasBlockMovingClientId:m,getBlockIndex:f,getBlockRootClientId:b,getClientIdsOfDescendants:k,getSelectedBlockClientId:v,getMultiSelectedBlocksEndClientId:_,getPreviousBlockClientId:x,getNextBlockClientId:y}=(0,c.useSelect)(li),{selectBlock:S,clearSelectedBlock:w,setBlockMovingClientId:B,moveBlockToPosition:I}=(0,c.useDispatch)(li),j=Zi("block-editor-block-list__block-selection-button",{"is-block-moving-mode":!!s}),E=(0,C.__)("Drag"),T=d&&"navigation"===u;return(0,$.jsx)("div",{className:j,children:(0,$.jsxs)(os.Flex,{justify:"center",className:"block-editor-block-list__block-selection-button__content",children:[(0,$.jsx)(os.FlexItem,{children:(0,$.jsx)(Uf,{icon:i,showColors:!0})}),T&&(0,$.jsx)(os.FlexItem,{children:(0,$.jsx)(EB,{clientIds:[e],children:e=>(0,$.jsx)(os.Button,{__next40pxDefaultSize:!1,icon:uS,className:"block-selection-button_drag-handle",label:E,tabIndex:"-1",...e})})}),"navigation"===u&&(0,$.jsx)(os.FlexItem,{children:(0,$.jsx)(os.Button,{__next40pxDefaultSize:!1,ref:n,onClick:"navigation"===u?()=>p(!1):void 0,onKeyDown:function(t){const{keyCode:n}=t,o=n===va.UP,r=n===va.DOWN,i=n===va.LEFT,s=n===va.RIGHT,l=n===va.TAB,a=n===va.ESCAPE,c=n===va.ENTER,u=n===va.SPACE,d=t.shiftKey;if(n===va.BACKSPACE||n===va.DELETE)return h(e),void t.preventDefault();const p=v(),C=_(),j=x(C||p),E=y(C||p),T=l&&d||o,M=l&&!d||r,P=i,R=s;let N;if(T)N=j;else if(M)N=E;else if(P){var L;N=null!==(L=b(p))&&void 0!==L?L:p}else if(R){var A;N=null!==(A=k(p)[0])&&void 0!==A?A:p}const D=m();if(a&&D&&!t.defaultPrevented&&(B(null),t.preventDefault()),(c||u)&&D){const e=b(D),t=b(p),n=f(D);let o=f(p);n<o&&e===t&&(o-=1),I(D,e,t,o),S(D),B(null)}if((!D||p!==D||!R)&&(M||T||P||R))if(N)t.preventDefault(),S(N);else if(l&&p){let e;if(M){e=g;do{e=ba.focus.tabbable.findNext(e)}while(e&&g.contains(e));e||(e=g.ownerDocument.defaultView.frameElement,e=ba.focus.tabbable.findNext(e))}else e=ba.focus.tabbable.findPrevious(g);e&&(t.preventDefault(),e.focus(),w())}},label:r,showTooltip:!1,className:"block-selection-button_select-button",children:(0,$.jsx)(kB,{clientId:e,maximumLength:35})})})]})})}));const Tj=(0,a.forwardRef)((function({clientId:e,__unstableContentRef:t},n){const{capturingClientId:o,isInsertionPointVisible:r,lastClientId:i,rootClientId:s}=IB(e),l=BB({contentElement:t?.current,clientId:e});return(0,$.jsx)(Qg,{clientId:o||e,bottomClientId:i,className:Zi("block-editor-block-list__block-popover",{"is-insertion-point-visible":r}),resize:!1,...l,children:(0,$.jsx)(Ej,{ref:n,clientId:e,rootClientId:s})})}));const Mj=function({isVisible:e,onClick:t}){const[n,o]=(0,a.useState)(!1);return(0,$.jsx)(os.Button,{variant:"primary",icon:Aa,size:"compact",className:Zi("block-editor-button-pattern-inserter__button","block-editor-block-tools__zoom-out-mode-inserter-button",{"is-visible":e||n}),onClick:t,onMouseOver:()=>{o(!0)},onMouseOut:()=>{o(!1)},label:(0,C._x)("Add pattern","Generic label for pattern inserter button")})};const Pj=function(){const[e,t]=(0,a.useState)(!1),{hasSelection:n,blockOrder:o,setInserterIsOpened:r,sectionRootClientId:i,selectedBlockClientId:s}=(0,c.useSelect)((e=>{const{getSettings:t,getBlockOrder:n,getSelectionStart:o,getSelectedBlockClientId:r,getSectionRootClientId:i}=te(e(li)),s=i();return{hasSelection:!!o().clientId,blockOrder:n(s),sectionRootClientId:s,setInserterIsOpened:t().__experimentalSetIsInserterOpened,selectedBlockClientId:r()}}),[]),{showInsertionPoint:l}=(0,c.useDispatch)(li);if((0,a.useEffect)((()=>{const e=setTimeout((()=>{t(!0)}),500);return()=>{clearTimeout(e)}}),[]),!e||!n)return null;const u=s,d=o.findIndex((e=>s===e)),p=o[d+1];return(0,$.jsx)(_x,{previousClientId:u,nextClientId:p,children:(0,$.jsx)(Mj,{onClick:()=>{const e=document.querySelector('[aria-label="Block Library"]');r({rootClientId:i,insertionIndex:d+1,tab:"patterns",category:"all"}),l(i,d+1,{operation:"insert"}),e&&e.focus()}})})};function Rj(e){const{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:n,getSettings:o,__unstableGetEditorMode:r,isTyping:i}=e(li),s=t()||n(),l=r();return{clientId:s,hasFixedToolbar:o().hasFixedToolbar,isTyping:i(),isZoomOutMode:"zoom-out"===l}}function Nj({children:e,__unstableContentRef:t,...n}){const{clientId:o,hasFixedToolbar:r,isTyping:i,isZoomOutMode:s}=(0,c.useSelect)(Rj,[]),u=(0,Yf.__unstableUseShortcutEventMatch)(),{getBlocksByClientId:d,getSelectedBlockClientIds:p,getBlockRootClientId:h,isGroupable:g}=(0,c.useSelect)(li),{getGroupingBlockName:m}=(0,c.useSelect)(l.store),{showEmptyBlockSideInserter:f,showBreadcrumb:b,showBlockToolbarPopover:k}=(0,c.useSelect)((e=>{const{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:n,getBlock:o,getBlockMode:r,getSettings:i,hasMultiSelection:s,__unstableGetEditorMode:a,isTyping:c}=te(e(li)),u=t()||n(),d=o(u),p=a(),h=!!u&&!!d,g=h&&(0,l.isUnmodifiedDefaultBlock)(d)&&"html"!==r(u),m=u&&!c()&&"edit"===p&&g,f=h&&!s()&&"navigation"===p;return{showEmptyBlockSideInserter:m,showBreadcrumb:!m&&f,showBlockToolbarPopover:!i().hasFixedToolbar&&!m&&h&&!g&&!f}}),[]),{clearSelectedBlock:v,duplicateBlocks:_,removeBlocks:x,replaceBlocks:y,insertAfterBlock:S,insertBeforeBlock:w,selectBlock:B,moveBlocksUp:I,moveBlocksDown:j,expandBlock:E}=te((0,c.useDispatch)(li)),T=(0,a.useRef)();const M=zg(t),P=zg(t);return(0,$.jsx)("div",{...n,onKeyDown:function(e){if(!e.defaultPrevented)if(u("core/block-editor/move-up",e)){const t=p();if(t.length){e.preventDefault();const n=h(t[0]);I(t,n)}}else if(u("core/block-editor/move-down",e)){const t=p();if(t.length){e.preventDefault();const n=h(t[0]);j(t,n)}}else if(u("core/block-editor/duplicate",e)){const t=p();t.length&&(e.preventDefault(),_(t))}else if(u("core/block-editor/remove",e)){const t=p();t.length&&(e.preventDefault(),x(t))}else if(u("core/block-editor/insert-after",e)){const t=p();t.length&&(e.preventDefault(),S(t[t.length-1]))}else if(u("core/block-editor/insert-before",e)){const t=p();t.length&&(e.preventDefault(),w(t[0]))}else if(u("core/block-editor/unselect",e)){if(e.target.closest("[role=toolbar]"))return;const n=p();n.length>1?(e.preventDefault(),B(n[0])):1===n.length&&e.target===T?.current&&(e.preventDefault(),v(),vB(t.current)?.focus())}else if(u("core/block-editor/collapse-list-view",e)){if((0,ba.isTextField)(e.target)||(0,ba.isTextField)(e.target?.contentWindow?.document?.activeElement))return;e.preventDefault(),E(o)}else if(u("core/block-editor/group",e)){const t=p();if(t.length>1&&g(t)){e.preventDefault();const n=d(t),o=m(),r=(0,l.switchToBlockType)(n,o);y(t,r),(0,$o.speak)((0,C.__)("Selected blocks are grouped."))}}},children:(0,$.jsxs)(Sx.Provider,{value:(0,a.useRef)(!1),children:[!i&&!s&&(0,$.jsx)(Cx,{__unstableContentRef:t}),f&&(0,$.jsx)(jB,{__unstableContentRef:t,clientId:o}),k&&(0,$.jsx)(jj,{__unstableContentRef:t,clientId:o,isTyping:i}),b&&(0,$.jsx)(Tj,{ref:T,__unstableContentRef:t,clientId:o}),!s&&!r&&(0,$.jsx)(os.Popover.Slot,{name:"block-toolbar",ref:M}),e,(0,$.jsx)(os.Popover.Slot,{name:"__unstable-block-tools-after",ref:P}),s&&(0,$.jsx)(Pj,{__unstableContentRef:t})]})})}const Lj=window.wp.commands,Aj=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M19.75 9c0-1.257-.565-2.197-1.39-2.858-.797-.64-1.827-1.017-2.815-1.247-1.802-.42-3.703-.403-4.383-.396L11 4.5V6l.177-.001c.696-.006 2.416-.02 4.028.356.887.207 1.67.518 2.216.957.52.416.829.945.829 1.688 0 .592-.167.966-.407 1.23-.255.281-.656.508-1.236.674-1.19.34-2.82.346-4.607.346h-.077c-1.692 0-3.527 0-4.942.404-.732.209-1.424.545-1.935 1.108-.526.579-.796 1.33-.796 2.238 0 1.257.565 2.197 1.39 2.858.797.64 1.827 1.017 2.815 1.247 1.802.42 3.703.403 4.383.396L13 19.5h.714V22L18 18.5 13.714 15v3H13l-.177.001c-.696.006-2.416.02-4.028-.356-.887-.207-1.67-.518-2.216-.957-.52-.416-.829-.945-.829-1.688 0-.592.167-.966.407-1.23.255-.281.656-.508 1.237-.674 1.189-.34 2.819-.346 4.606-.346h.077c1.692 0 3.527 0 4.941-.404.732-.209 1.425-.545 1.936-1.108.526-.579.796-1.33.796-2.238z"})}),Dj=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M18 4h-7c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5h-7c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v7zm-5 5c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h1V9H6c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-1h-1.5v1z"})}),Oj=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z"})}),zj=()=>{const{replaceBlocks:e,multiSelect:t}=(0,c.useDispatch)(li),{blocks:n,clientIds:o,canRemove:r,possibleBlockTransformations:i,invalidSelection:s}=(0,c.useSelect)((e=>{const{getBlockRootClientId:t,getBlockTransformItems:n,getSelectedBlockClientIds:o,getBlocksByClientId:r,canRemoveBlocks:i}=e(li),s=o(),l=r(s);if(l.filter((e=>!e)).length>0)return{invalidSelection:!0};return{blocks:l,clientIds:s,possibleBlockTransformations:n(l,t(s[0])),canRemove:i(s),invalidSelection:!1}}),[]);if(s)return{isLoading:!1,commands:[]};const a=1===n.length&&(0,l.isTemplatePart)(n[0]);function u(r){const i=(0,l.switchToBlockType)(n,r);var s;e(o,i),(s=i).length>1&&t(s[0].clientId,s[s.length-1].clientId)}const d=!!i.length&&r&&!a;if(!o||o.length<1||!d)return{isLoading:!1,commands:[]};return{isLoading:!1,commands:i.map((e=>{const{name:t,title:n,icon:o}=e;return{name:"core/block-editor/transform-to-"+t.replace("/","-"),label:(0,C.sprintf)((0,C.__)("Transform to %s"),n),icon:(0,$.jsx)(Uf,{icon:o}),callback:({close:e})=>{u(t),e()}}}))}},Vj=()=>{const{clientIds:e}=(0,c.useSelect)((e=>{const{getSelectedBlockClientIds:t}=e(li);return{clientIds:t()}}),[]),{getBlockRootClientId:t,canMoveBlocks:n,getBlockCount:o}=(0,c.useSelect)(li),{setBlockMovingClientId:r,setNavigationMode:i,selectBlock:s}=(0,c.useDispatch)(li);if(!e||e.length<1)return{isLoading:!1,commands:[]};const l=t(e[0]),a=[];return n(e)&&1!==o(l)&&a.push({name:"move-to",label:(0,C.__)("Move to"),callback:()=>{i(!0),s(e[0]),r(e[0])},icon:Aj}),{isLoading:!1,commands:a.map((e=>({...e,name:"core/block-editor/action-"+e.name,callback:({close:t})=>{e.callback(),t()}})))}},Fj=()=>{const{clientIds:e,isUngroupable:t,isGroupable:n}=(0,c.useSelect)((e=>{const{getSelectedBlockClientIds:t,isUngroupable:n,isGroupable:o}=e(li);return{clientIds:t(),isUngroupable:n(),isGroupable:o()}}),[]),{canInsertBlockType:o,getBlockRootClientId:r,getBlocksByClientId:i,canRemoveBlocks:s}=(0,c.useSelect)(li),{getDefaultBlockName:a,getGroupingBlockName:u}=(0,c.useSelect)(l.store),d=i(e),{removeBlocks:p,replaceBlocks:h,duplicateBlocks:g,insertAfterBlock:m,insertBeforeBlock:f}=(0,c.useDispatch)(li),b=()=>{if(!d.length)return;const t=u(),n=(0,l.switchToBlockType)(d,t);n&&h(e,n)},k=()=>{if(!d.length)return;const t=d[0].innerBlocks;t.length&&h(e,t)};if(!e||e.length<1)return{isLoading:!1,commands:[]};const v=r(e[0]),_=o(a(),v),x=d.every((e=>!!e&&(0,l.hasBlockSupport)(e.name,"multiple",!0)&&o(e.name,v))),y=s(e),S=[];return x&&S.push({name:"duplicate",label:(0,C.__)("Duplicate"),callback:()=>g(e,!0),icon:$B}),_&&S.push({name:"add-before",label:(0,C.__)("Add before"),callback:()=>{const t=Array.isArray(e)?e[0]:t;f(t)},icon:Aa},{name:"add-after",label:(0,C.__)("Add after"),callback:()=>{const t=Array.isArray(e)?e[e.length-1]:t;m(t)},icon:Aa}),n&&S.push({name:"Group",label:(0,C.__)("Group"),callback:b,icon:aj}),t&&S.push({name:"ungroup",label:(0,C.__)("Ungroup"),callback:k,icon:Dj}),y&&S.push({name:"remove",label:(0,C.__)("Delete"),callback:()=>p(e,!0),icon:Oj}),{isLoading:!1,commands:S.map((e=>({...e,name:"core/block-editor/action-"+e.name,callback:({close:t})=>{e.callback(),t()}})))}},Hj=()=>{(0,Lj.useCommandLoader)({name:"core/block-editor/blockTransforms",hook:zj}),(0,Lj.useCommandLoader)({name:"core/block-editor/blockActions",hook:Vj}),(0,Lj.useCommandLoader)({name:"core/block-editor/blockQuickActions",hook:Fj,context:"block-selection-edit"})},Gj={ignoredSelectors:[/\.editor-styles-wrapper/gi]};function $j({shouldIframe:e=!0,height:t="300px",children:n=(0,$.jsx)(ry,{}),styles:o,contentRef:r,iframeProps:i}){Hj();const s=Yx(),l=Ix(),c=(0,a.useRef)(),d=(0,u.useMergeRefs)([r,l,c]);return e?(0,$.jsx)(Nj,{__unstableContentRef:c,style:{height:t,display:"flex"},children:(0,$.jsxs)(Py,{...i,ref:s,contentRef:d,style:{...i?.style},name:"editor-canvas",children:[(0,$.jsx)(Jy,{styles:o}),n]})}):(0,$.jsxs)(Nj,{__unstableContentRef:c,style:{height:t,display:"flex"},children:[(0,$.jsx)(Jy,{styles:o,scope:":where(.editor-styles-wrapper)",transformOptions:Gj}),(0,$.jsx)(Iy,{ref:d,className:"editor-styles-wrapper",tabIndex:-1,style:{height:"100%",width:"100%"},children:n})]})}const Uj=function({children:e,height:t,styles:n}){return(0,$.jsx)($j,{height:t,styles:n,children:e})},Wj=()=>(0,$.jsx)(os.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:(0,$.jsx)(os.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"})}),Kj=({style:e,className:t})=>(0,$.jsx)("div",{className:"block-library-colors-selector__icon-container",children:(0,$.jsx)("div",{className:`${t} block-library-colors-selector__state-selection`,style:e,children:(0,$.jsx)(Wj,{})})}),Zj=({TextColor:e,BackgroundColor:t})=>({onToggle:n,isOpen:o})=>(0,$.jsx)(os.ToolbarGroup,{children:(0,$.jsx)(os.ToolbarButton,{className:"components-toolbar__control block-library-colors-selector__toggle",label:(0,C.__)("Open Colors Selector"),onClick:n,onKeyDown:e=>{o||e.keyCode!==va.DOWN||(e.preventDefault(),n())},icon:(0,$.jsx)(t,{children:(0,$.jsx)(e,{children:(0,$.jsx)(Kj,{})})})})}),qj=({children:e,...t})=>(y()("wp.blockEditor.BlockColorsStyleSelector",{alternative:"block supports API",since:"6.1",version:"6.3"}),(0,$.jsx)(os.Dropdown,{popoverProps:{placement:"bottom-start"},className:"block-library-colors-selector",contentClassName:"block-library-colors-selector__popover",renderToggle:Zj(t),renderContent:()=>e})),Yj=(0,$.jsx)(G.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,$.jsx)(G.Path,{d:"M3 6h11v1.5H3V6Zm3.5 5.5h11V13h-11v-1.5ZM21 17H10v1.5h11V17Z"})}),Xj=(0,a.createContext)({}),Qj=()=>(0,a.useContext)(Xj);function Jj({children:e,...t}){const n=(0,a.useRef)();return(0,a.useEffect)((()=>{n.current&&(n.current.textContent=n.current.textContent)}),[e]),(0,$.jsx)("div",{hidden:!0,...t,ref:n,children:e})}const eE=(0,a.forwardRef)((({nestingLevel:e,blockCount:t,clientId:n,...o},r)=>{const{insertedBlock:i,setInsertedBlock:s}=Qj(),l=(0,u.useInstanceId)(eE),d=(0,c.useSelect)((e=>{const{getTemplateLock:t,__unstableGetEditorMode:o}=e(li);return!!t(n)||"zoom-out"===o()}),[n]),p=bB({clientId:n,context:"list-view"}),h=bB({clientId:i?.clientId,context:"list-view"});if((0,a.useEffect)((()=>{h?.length&&(0,$o.speak)((0,C.sprintf)((0,C.__)("%s block inserted"),h),"assertive")}),[h]),d)return null;const g=`list-view-appender__${l}`,m=(0,C.sprintf)((0,C.__)("Append to %1$s block at position %2$d, Level %3$d"),p,t+1,e);return(0,$.jsxs)("div",{className:"list-view-appender",children:[(0,$.jsx)(tC,{ref:r,rootClientId:n,position:"bottom right",isAppender:!0,selectBlockOnInsert:!1,shouldDirectInsert:!1,__experimentalIsQuick:!0,...o,toggleProps:{"aria-describedby":g},onSelectOrClose:e=>{e?.clientId&&s(e)}}),(0,$.jsx)(Jj,{id:g,children:m})]})})),tE=U_(os.__experimentalTreeGridRow),nE=(0,a.forwardRef)((({isDragged:e,isSelected:t,position:n,level:o,rowCount:r,children:i,className:s,path:l,...a},c)=>{const d=K_({clientId:a["data-block"],enableAnimation:!0,triggerAnimationOnChange:l}),p=(0,u.useMergeRefs)([c,d]);return(0,$.jsx)(tE,{ref:p,className:Zi("block-editor-list-view-leaf",s),level:o,positionInSet:n,setSize:r,isExpanded:void 0,...a,children:i})})),oE=nE;const rE=(0,$.jsx)(G.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,$.jsx)(G.Path,{d:"M10.97 10.159a3.382 3.382 0 0 0-2.857.955l1.724 1.723-2.836 2.913L7 17h1.25l2.913-2.837 1.723 1.723a3.38 3.38 0 0 0 .606-.825c.33-.63.446-1.343.35-2.032L17 10.695 13.305 7l-2.334 3.159Z"})}),iE=(0,$.jsx)(G.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,$.jsx)(G.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M15 11h-.2V9c0-1.5-1.2-2.8-2.8-2.8S9.2 7.5 9.2 9v2H9c-.6 0-1 .4-1 1v4c0 .6.4 1 1 1h6c.6 0 1-.4 1-1v-4c0-.6-.4-1-1-1zm-1.8 0h-2.5V9c0-.7.6-1.2 1.2-1.2s1.2.6 1.2 1.2v2z"})});function sE({onClick:e}){return(0,$.jsx)("span",{className:"block-editor-list-view__expander",onClick:t=>e(t,{forceToggle:!0}),"aria-hidden":"true","data-testid":"list-view-expander",children:(0,$.jsx)(hl,{icon:(0,C.isRTL)()?Ea:Ta})})}const lE=3;function aE(e){if("core/image"===e.name)return e.attributes?.url?{url:e.attributes.url,alt:e.attributes.alt,clientId:e.clientId}:void 0}function cE(e,t){const n=aE(e);return n?[n]:t?[]:function(e){if("core/gallery"!==e.name||!e.innerBlocks)return[];const t=[];for(const n of e.innerBlocks){const e=aE(n);if(e&&t.push(e),t.length>=lE)return t}return t}(e)}const uE=(0,a.forwardRef)((function({className:e,block:{clientId:t},onClick:n,onContextMenu:o,onMouseDown:r,onToggleExpanded:i,tabIndex:s,onFocus:l,onDragStart:u,onDragEnd:d,draggable:p,isExpanded:h,ariaDescribedBy:g},m){const f=Um(t),b=bB({clientId:t,context:"list-view"}),{isLocked:k}=DI(t),{isContentOnly:v}=(0,c.useSelect)((e=>({isContentOnly:"contentOnly"===e(li).getBlockEditingMode(t)})),[t]),_=k&&!v,x="sticky"===f?.positionType,y=function({clientId:e,isExpanded:t}){const{block:n}=(0,c.useSelect)((t=>({block:t(li).getBlock(e)})),[e]);return(0,a.useMemo)((()=>cE(n,t)),[n,t])}({clientId:t,isExpanded:h});return(0,$.jsxs)("a",{className:Zi("block-editor-list-view-block-select-button",e),onClick:n,onContextMenu:o,onKeyDown:function(e){e.keyCode!==va.ENTER&&e.keyCode!==va.SPACE||n(e)},onMouseDown:r,ref:m,tabIndex:s,onFocus:l,onDragStart:e=>{e.dataTransfer.clearData(),u?.(e)},onDragEnd:d,draggable:p,href:`#block-${t}`,"aria-describedby":g,"aria-expanded":h,children:[(0,$.jsx)(sE,{onClick:i}),(0,$.jsx)(Uf,{icon:f?.icon,showColors:!0,context:"list-view"}),(0,$.jsxs)(os.__experimentalHStack,{alignment:"center",className:"block-editor-list-view-block-select-button__label-wrapper",justify:"flex-start",spacing:1,children:[(0,$.jsx)("span",{className:"block-editor-list-view-block-select-button__title",children:(0,$.jsx)(os.__experimentalTruncate,{ellipsizeMode:"auto",children:b})}),f?.anchor&&(0,$.jsx)("span",{className:"block-editor-list-view-block-select-button__anchor-wrapper",children:(0,$.jsx)(os.__experimentalTruncate,{className:"block-editor-list-view-block-select-button__anchor",ellipsizeMode:"auto",children:f.anchor})}),x&&(0,$.jsx)("span",{className:"block-editor-list-view-block-select-button__sticky",children:(0,$.jsx)(hl,{icon:rE})}),y.length?(0,$.jsx)("span",{className:"block-editor-list-view-block-select-button__images","aria-hidden":!0,children:y.map(((e,t)=>(0,$.jsx)("span",{className:"block-editor-list-view-block-select-button__image",style:{backgroundImage:`url(${e.url})`,zIndex:y.length-t}},e.clientId)))}):null,_&&(0,$.jsx)("span",{className:"block-editor-list-view-block-select-button__lock",children:(0,$.jsx)(hl,{icon:iE})})]})]})})),dE=(0,a.forwardRef)((({onClick:e,onToggleExpanded:t,block:n,isSelected:o,position:r,siblingBlockCount:i,level:s,isExpanded:l,selectedClientIds:a,...u},d)=>{const{clientId:p}=n,{blockMovingClientId:h,selectedBlockInBlockEditor:g}=(0,c.useSelect)((e=>{const{hasBlockMovingClientId:t,getSelectedBlockClientId:n}=e(li);return{blockMovingClientId:t(),selectedBlockInBlockEditor:n()}}),[]),{AdditionalBlockContent:m,insertedBlock:f,setInsertedBlock:b}=Qj(),k=Zi("block-editor-list-view-block-contents",{"is-dropping-before":h&&g===p}),v=a.includes(p)?a:[p];return(0,$.jsxs)($.Fragment,{children:[m&&(0,$.jsx)(m,{block:n,insertedBlock:f,setInsertedBlock:b}),(0,$.jsx)(EB,{appendToOwnerDocument:!0,clientIds:v,cloneClassname:"block-editor-list-view-draggable-chip",children:({draggable:a,onDragStart:c,onDragEnd:p})=>(0,$.jsx)(uE,{ref:d,className:k,block:n,onClick:e,onToggleExpanded:t,isSelected:o,position:r,siblingBlockCount:i,level:s,draggable:a,onDragStart:c,onDragEnd:p,isExpanded:l,...u})})]})})),pE=dE;function hE(e,t){const n=()=>{const n=t?.querySelector(`[role=row][data-block="${e}"]`);return n?ba.focus.focusable.find(n)[0]:null};let o=n();o?o.focus():window.requestAnimationFrame((()=>{o=n(),o&&o.focus()}))}const gE=(0,a.memo)((function e({block:{clientId:t},displacement:n,isAfterDraggedBlocks:o,isDragged:r,isNesting:i,isSelected:s,isBranchSelected:d,selectBlock:p,position:h,level:g,rowCount:m,siblingBlockCount:f,showBlockMovers:b,path:k,isExpanded:v,selectedClientIds:_,isSyncedBranch:x}){const y=(0,a.useRef)(null),S=(0,a.useRef)(null),w=(0,a.useRef)(null),[B,I]=(0,a.useState)(!1),[j,E]=(0,a.useState)(),{isLocked:T,canEdit:M,canMove:P}=DI(t),R=s&&_[0]===t,N=s&&_[_.length-1]===t,{toggleBlockHighlight:L,duplicateBlocks:A,multiSelect:D,replaceBlocks:O,removeBlocks:z,insertAfterBlock:V,insertBeforeBlock:F,setOpenedBlockSettingsMenu:H}=te((0,c.useDispatch)(li)),{canInsertBlockType:G,getSelectedBlockClientIds:U,getPreviousBlockClientId:W,getBlockRootClientId:K,getBlockOrder:Z,getBlockParents:q,getBlocksByClientId:Y,canRemoveBlocks:X,isGroupable:Q}=(0,c.useSelect)(li),{getGroupingBlockName:J}=(0,c.useSelect)(l.store),ee=Um(t),{block:ne,blockName:oe,allowRightClickOverrides:re}=(0,c.useSelect)((e=>{const{getBlock:n,getBlockName:o,getSettings:r}=e(li);return{block:n(t),blockName:o(t),allowRightClickOverrides:r().allowRightClickOverrides}}),[t]),ie=(0,l.hasBlockSupport)(oe,"__experimentalToolbar",!0),se=`list-view-block-select-button__description-${(0,u.useInstanceId)(e)}`,{expand:le,collapse:ae,collapseAll:ce,BlockSettingsMenu:ue,listViewInstanceId:de,expandedState:pe,setInsertedBlock:he,treeGridElementRef:ge,rootClientId:me}=Qj(),fe=(0,Yf.__unstableUseShortcutEventMatch)();function be(){const e=U(),n=e.includes(t),o=n?e[0]:t,r=K(o);return{blocksToUpdate:n?e:[t],firstBlockClientId:o,firstBlockRootClientId:r,selectedBlockClientIds:e}}const ke=(0,a.useCallback)((()=>{I(!0),L(t,!0)}),[t,I,L]),ve=(0,a.useCallback)((()=>{I(!1),L(t,!1)}),[t,I,L]),_e=(0,a.useCallback)((e=>{p(e,t),e.preventDefault()}),[t,p]),xe=(0,a.useCallback)(((e,t)=>{t&&p(void 0,e,null,null),hE(e,ge?.current)}),[p,ge]),ye=(0,a.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),!0===v?ae(t):!1===v&&le(t)}),[t,le,ae,v]),Se=(0,a.useCallback)((e=>{ie&&re&&(w.current?.click(),E(new window.DOMRect(e.clientX,e.clientY,0,0)),e.preventDefault())}),[re,w,ie]),we=(0,a.useCallback)((e=>{re&&2===e.button&&e.preventDefault()}),[re]),Ce=(0,a.useMemo)((()=>{const{ownerDocument:e}=S?.current||{};if(j&&e)return{ownerDocument:e,getBoundingClientRect:()=>j}}),[j]),Be=(0,a.useCallback)((()=>{E(void 0)}),[E]);if(function({isSelected:e,selectedClientIds:t,rowItemRef:n}){const o=1===t.length;(0,a.useLayoutEffect)((()=>{if(!e||!o||!n.current)return;const t=(0,ba.getScrollContainer)(n.current),{ownerDocument:r}=n.current;if(t===r.body||t===r.documentElement||!t)return;const i=n.current.getBoundingClientRect(),s=t.getBoundingClientRect();(i.top<s.top||i.bottom>s.bottom)&&n.current.scrollIntoView()}),[e,o,n])}({isSelected:s,rowItemRef:S,selectedClientIds:_}),!ne)return null;const Ie=((e,t,n)=>(0,C.sprintf)((0,C.__)("Block %1$d of %2$d, Level %3$d."),e,t,n))(h,f,g),je=((e,t)=>[e?.positionLabel?`${(0,C.sprintf)((0,C.__)("Position: %s"),e.positionLabel)}.`:void 0,t?(0,C.__)("This block is locked."):void 0].filter(Boolean).join(" "))(ee,T),Ee=b&&f>0,Te=Zi("block-editor-list-view-block__mover-cell",{"is-visible":B||s}),Me=Zi("block-editor-list-view-block__menu-cell",{"is-visible":B||R});let Pe;Ee?Pe=2:ie||(Pe=3);const Re=Zi({"is-selected":s,"is-first-selected":R,"is-last-selected":N,"is-branch-selected":d,"is-synced-branch":x,"is-dragging":r,"has-single-cell":!ie,"is-synced":ee?.isSynced,"is-draggable":P,"is-displacement-normal":"normal"===n,"is-displacement-up":"up"===n,"is-displacement-down":"down"===n,"is-after-dragged-blocks":o,"is-nesting":i}),Ne=_.includes(t)?_:[t],Le=s&&1===_.length;return(0,$.jsxs)(oE,{className:Re,isDragged:r,onKeyDown:async function(e){if(e.defaultPrevented)return;if(e.target.closest("[role=dialog]"))return;const t=[va.BACKSPACE,va.DELETE].includes(e.keyCode);if(fe("core/block-editor/unselect",e)&&_.length>0)e.stopPropagation(),e.preventDefault(),p(e,void 0);else if(t||fe("core/block-editor/remove",e)){var n;const{blocksToUpdate:e,firstBlockClientId:t,firstBlockRootClientId:o,selectedBlockClientIds:r}=be();if(!X(e))return;let i=null!==(n=W(t))&&void 0!==n?n:o;z(e,!1);const s=r.length>0&&0===U().length;i||(i=Z()[0]),xe(i,s)}else if(fe("core/block-editor/duplicate",e)){e.preventDefault();const{blocksToUpdate:t,firstBlockRootClientId:n}=be();if(Y(t).every((e=>!!e&&(0,l.hasBlockSupport)(e.name,"multiple",!0)&&G(e.name,n)))){const e=await A(t,!1);e?.length&&xe(e[0],!1)}}else if(fe("core/block-editor/insert-before",e)){e.preventDefault();const{blocksToUpdate:t}=be();await F(t[0]);const n=U();H(void 0),xe(n[0],!1)}else if(fe("core/block-editor/insert-after",e)){e.preventDefault();const{blocksToUpdate:t}=be();await V(t.at(-1));const n=U();H(void 0),xe(n[0],!1)}else if(fe("core/block-editor/select-all",e)){e.preventDefault();const{firstBlockRootClientId:t,selectedBlockClientIds:n}=be(),o=Z(t);if(!o.length)return;if(Ba()(n,o)&&t&&t!==me)return void xe(t,!0);D(o[0],o[o.length-1],null)}else if(fe("core/block-editor/collapse-list-view",e)){e.preventDefault();const{firstBlockClientId:t}=be(),n=q(t,!1);ce(),le(n)}else if(fe("core/block-editor/group",e)){const{blocksToUpdate:t}=be();if(t.length>1&&Q(t)){e.preventDefault();const n=Y(t),o=J(),r=(0,l.switchToBlockType)(n,o);O(t,r),(0,$o.speak)((0,C.__)("Selected blocks are grouped."));const i=U();H(void 0),xe(i[0],!1)}}},onMouseEnter:ke,onMouseLeave:ve,onFocus:ke,onBlur:ve,level:g,position:h,rowCount:m,path:k,id:`list-view-${de}-block-${t}`,"data-block":t,"data-expanded":M?v:void 0,ref:S,children:[(0,$.jsx)(os.__experimentalTreeGridCell,{className:"block-editor-list-view-block__contents-cell",colSpan:Pe,ref:y,"aria-selected":!!s,children:({ref:e,tabIndex:t,onFocus:n})=>(0,$.jsxs)("div",{className:"block-editor-list-view-block__contents-container",children:[(0,$.jsx)(pE,{block:ne,onClick:_e,onContextMenu:Se,onMouseDown:we,onToggleExpanded:ye,isSelected:s,position:h,siblingBlockCount:f,level:g,ref:e,tabIndex:Le?0:t,onFocus:n,isExpanded:M?v:void 0,selectedClientIds:_,ariaDescribedBy:se}),(0,$.jsx)(Jj,{id:se,children:[Ie,je].filter(Boolean).join(" ")})]})}),Ee&&(0,$.jsx)($.Fragment,{children:(0,$.jsxs)(os.__experimentalTreeGridCell,{className:Te,withoutGridItem:!0,children:[(0,$.jsx)(os.__experimentalTreeGridItem,{children:({ref:e,tabIndex:n,onFocus:o})=>(0,$.jsx)(LB,{orientation:"vertical",clientIds:[t],ref:e,tabIndex:n,onFocus:o})}),(0,$.jsx)(os.__experimentalTreeGridItem,{children:({ref:e,tabIndex:n,onFocus:o})=>(0,$.jsx)(AB,{orientation:"vertical",clientIds:[t],ref:e,tabIndex:n,onFocus:o})})]})}),ie&&ue&&(0,$.jsx)(os.__experimentalTreeGridCell,{className:Me,"aria-selected":!!s,ref:w,children:({ref:e,tabIndex:t,onFocus:n})=>(0,$.jsx)(ue,{clientIds:Ne,block:ne,icon:lb,label:(0,C.__)("Options"),popoverProps:{anchor:Ce},toggleProps:{ref:e,className:"block-editor-list-view-block__menu",tabIndex:t,onClick:Be,onFocus:n},disableOpenOnArrowDown:!0,expand:le,expandedState:pe,setInsertedBlock:he,__experimentalSelectBlock:xe})})]})}));function mE(e,t,n,o){var r;const i=n?.includes(e.clientId);if(i)return 0;return(null!==(r=t[e.clientId])&&void 0!==r?r:o)?1+e.innerBlocks.reduce(fE(t,n,o),0):1}const fE=(e,t,n)=>(o,r)=>{var i;const s=t?.includes(r.clientId);if(s)return o;return(null!==(i=e[r.clientId])&&void 0!==i?i:n)&&r.innerBlocks.length>0?o+mE(r,e,t,n):o+1},bE=()=>{};const kE=(0,a.memo)((function e(t){const{blocks:n,selectBlock:o=bE,showBlockMovers:r,selectedClientIds:i,level:s=1,path:l="",isBranchSelected:a=!1,listPosition:u=0,fixedListWindow:d,isExpanded:p,parentId:h,shouldShowInnerBlocks:g=!0,isSyncedBranch:m=!1,showAppender:f=!0}=t,b=Um(h),k=m||!!b?.isSynced,v=(0,c.useSelect)((e=>!h||e(li).canEditBlock(h)),[h]),{blockDropPosition:_,blockDropTargetIndex:x,firstDraggedBlockIndex:y,blockIndexes:S,expandedState:w,draggedClientIds:C}=Qj();if(!v)return null;const B=f&&1===s,I=n.filter(Boolean),j=I.length,E=B?j+1:j;let T=u;return(0,$.jsxs)($.Fragment,{children:[I.map(((t,n)=>{var u;const{clientId:h,innerBlocks:m}=t;n>0&&(T+=mE(I[n-1],w,C,p));const f=!!C?.includes(h),{displacement:b,isAfterDraggedBlocks:v,isNesting:B}=function({blockIndexes:e,blockDropTargetIndex:t,blockDropPosition:n,clientId:o,firstDraggedBlockIndex:r,isDragged:i}){let s,l,a;if(!i){l=!1;const i=e[o];a=i>r,null!=t&&void 0!==r?void 0!==i&&(s=i>=r&&i<t?"up":i<r&&i>=t?"down":"normal",l="number"==typeof t&&t-1===i&&"inside"===n):null===t&&void 0!==r?s=void 0!==i&&i>=r?"up":"normal":null!=t&&void 0===r?void 0!==i&&(s=i<t?"normal":"down"):null===t&&(s="normal")}return{displacement:s,isNesting:l,isAfterDraggedBlocks:a}}({blockIndexes:S,blockDropTargetIndex:x,blockDropPosition:_,clientId:h,firstDraggedBlockIndex:y,isDragged:f}),{itemInView:M}=d,P=M(T),R=n+1,N=l.length>0?`${l}_${R}`:`${R}`,L=!!m?.length,A=L&&g?null!==(u=w[h])&&void 0!==u?u:p:void 0,D=((e,t)=>Array.isArray(t)&&t.length?-1!==t.indexOf(e):t===e)(h,i),O=a||D&&L,z=f||P||D&&h===i[0]||0===n||n===j-1;return(0,$.jsxs)(c.AsyncModeProvider,{value:!D,children:[z&&(0,$.jsx)(gE,{block:t,selectBlock:o,isSelected:D,isBranchSelected:O,isDragged:f,level:s,position:R,rowCount:E,siblingBlockCount:j,showBlockMovers:r,path:N,isExpanded:!f&&A,listPosition:T,selectedClientIds:i,isSyncedBranch:k,displacement:b,isAfterDraggedBlocks:v,isNesting:B}),!z&&(0,$.jsx)("tr",{children:(0,$.jsx)("td",{className:"block-editor-list-view-placeholder"})}),L&&A&&!f&&(0,$.jsx)(e,{parentId:h,blocks:m,selectBlock:o,showBlockMovers:r,level:s+1,path:N,listPosition:T+1,fixedListWindow:d,isBranchSelected:O,selectedClientIds:i,isExpanded:p,isSyncedBranch:k})]},h)})),B&&(0,$.jsx)(os.__experimentalTreeGridRow,{level:s,setSize:E,positionInSet:E,isExpanded:!0,children:(0,$.jsx)(os.__experimentalTreeGridCell,{children:e=>(0,$.jsx)(eE,{clientId:h,nestingLevel:s,blockCount:j,...e})})})]})}));function vE({draggedBlockClientId:e,listViewRef:t,blockDropTarget:n}){const o=Um(e),r=bB({clientId:e,context:"list-view"}),{rootClientId:i,clientId:s,dropPosition:l}=n||{},[c,u]=(0,a.useMemo)((()=>{if(!t.current)return[];return[i?t.current.querySelector(`[data-block="${i}"]`):void 0,s?t.current.querySelector(`[data-block="${s}"]`):void 0]}),[t,i,s]),d=u||c,p=(0,C.isRTL)(),h=(0,a.useCallback)(((e,t)=>{if(!d)return 0;let n=d.offsetWidth;const o=(0,ba.getScrollContainer)(d,"horizontal"),r=d.ownerDocument,i=o===r.body||o===r.documentElement;if(o&&!i){const r=o.getBoundingClientRect(),i=(0,C.isRTL)()?r.right-e.right:e.left-r.left,s=o.clientWidth;if(s<n+i&&(n=s-i),!p&&e.left+t<r.left)return n-=r.left-e.left,n;if(p&&e.right-t>r.right)return n-=e.right-r.right,n}return n-t}),[p,d]),g=(0,a.useMemo)((()=>{if(!d)return{};const e=d.getBoundingClientRect();return{width:h(e,0)}}),[h,d]),m=(0,a.useMemo)((()=>{if(!d)return{};const e=(0,ba.getScrollContainer)(d),t=d.ownerDocument,n=e===t.body||e===t.documentElement;if(e&&!n){const t=e.getBoundingClientRect(),n=d.getBoundingClientRect(),o=p?t.right-n.right:n.left-t.left;if(!p&&t.left>n.left)return{transform:`translateX( ${o}px )`};if(p&&t.right<n.right)return{transform:`translateX( ${-1*o}px )`}}return{}}),[p,d]),f=(0,a.useMemo)((()=>{if(!c)return 1;const e=parseInt(c.getAttribute("aria-level"),10);return e?e+1:1}),[c]),b=(0,a.useMemo)((()=>!!d&&d.classList.contains("is-branch-selected")),[d]),k=(0,a.useMemo)((()=>{if(d&&("top"===l||"bottom"===l||"inside"===l))return{contextElement:d,getBoundingClientRect(){const e=d.getBoundingClientRect();let t=e.left,n=0;const o=(0,ba.getScrollContainer)(d,"horizontal"),r=d.ownerDocument,i=o===r.body||o===r.documentElement;if(o&&!i){const e=o.getBoundingClientRect(),n=p?o.offsetWidth-o.clientWidth:0;t<e.left+n&&(t=e.left+n)}n="top"===l?e.top-2*e.height:e.top;const s=h(e,0),a=e.height;return new window.DOMRect(t,n,s,a)}}}),[d,l,h,p]);return d?(0,$.jsx)(os.Popover,{animate:!1,anchor:k,focusOnMount:!1,className:"block-editor-list-view-drop-indicator--preview",variant:"unstyled",flip:!1,resize:!0,children:(0,$.jsx)("div",{style:g,className:Zi("block-editor-list-view-drop-indicator__line",{"block-editor-list-view-drop-indicator__line--darker":b}),children:(0,$.jsxs)("div",{className:"block-editor-list-view-leaf","aria-level":f,children:[(0,$.jsxs)("div",{className:Zi("block-editor-list-view-block-select-button","block-editor-list-view-block-contents"),style:m,children:[(0,$.jsx)(sE,{onClick:()=>{}}),(0,$.jsx)(Uf,{icon:o?.icon,showColors:!0,context:"list-view"}),(0,$.jsx)(os.__experimentalHStack,{alignment:"center",className:"block-editor-list-view-block-select-button__label-wrapper",justify:"flex-start",spacing:1,children:(0,$.jsx)("span",{className:"block-editor-list-view-block-select-button__title",children:(0,$.jsx)(os.__experimentalTruncate,{ellipsizeMode:"auto",children:r})})})]}),(0,$.jsx)("div",{className:"block-editor-list-view-block__menu-cell"})]})})}):null}function _E(){const{clearSelectedBlock:e,multiSelect:t,selectBlock:n}=(0,c.useDispatch)(li),{getBlockName:o,getBlockParents:r,getBlockSelectionStart:i,getSelectedBlockClientIds:s,hasMultiSelection:u,hasSelectedBlock:d}=(0,c.useSelect)(li),{getBlockType:p}=(0,c.useSelect)(l.store);return{updateBlockSelection:(0,a.useCallback)((async(l,a,c,h)=>{if(!l?.shiftKey&&l?.keyCode!==va.ESCAPE)return void n(a,h);l.preventDefault();const g="keydown"===l.type&&l.keyCode===va.ESCAPE,m="keydown"===l.type&&(l.keyCode===va.UP||l.keyCode===va.DOWN||l.keyCode===va.HOME||l.keyCode===va.END);if(!m&&!d()&&!u())return void n(a,null);const f=s(),b=[...r(a),a];if((g||m&&!f.some((e=>b.includes(e))))&&await e(),!g){let e=i(),n=a;m&&(d()||u()||(e=a),c&&(n=c));const o=r(e),s=r(n),{start:l,end:p}=function(e,t,n,o){const r=[...n,e],i=[...o,t],s=Math.min(r.length,i.length)-1;return{start:r[s],end:i[s]}}(e,n,o,s);await t(l,p,null)}const k=s();if((l.keyCode===va.HOME||l.keyCode===va.END)&&k.length>1)return;const v=f.filter((e=>!k.includes(e)));let _;if(1===v.length){const e=p(o(v[0]))?.title;e&&(_=(0,C.sprintf)((0,C.__)("%s deselected."),e))}else v.length>1&&(_=(0,C.sprintf)((0,C.__)("%s blocks deselected."),v.length));_&&(0,$o.speak)(_,"assertive")}),[e,o,p,r,i,s,u,d,t,n])}}const xE=24;function yE(e,t){const n=e[t+1];return n&&n.isDraggedBlock?yE(e,t+1):n}const SE=["top","bottom"];function wE(e,t,n=!1){let o,r,i,s,l;for(let n=0;n<e.length;n++){const a=e[n];if(a.isDraggedBlock)continue;const c=a.element.getBoundingClientRect(),[u,d]=Rx(t,c,SE),p=Nx(t,c);if(void 0===i||u<i||p){i=u;const t=e.indexOf(a),n=e[t-1];if("top"===d&&n&&n.rootClientId===a.rootClientId&&!n.isDraggedBlock?(r=n,o="bottom",s=n.element.getBoundingClientRect(),l=t-1):(r=a,o=d,s=c,l=t),p)break}}if(!r)return;const a=function(e,t){const n=[];let o=e;for(;o;)n.push({...o}),o=t.find((e=>e.clientId===o.rootClientId));return n}(r,e),c="bottom"===o;if(c&&r.canInsertDraggedBlocksAsChild&&(r.innerBlockCount>0&&r.isExpanded||function(e,t,n=1,o=!1){const r=o?t.right-n*xE:t.left+n*xE;return(o?e.x<r-xE:e.x>r+xE)&&e.y<t.bottom}(t,s,a.length,n))){const e=r.isExpanded?0:r.innerBlockCount||0;return{rootClientId:r.clientId,clientId:r.clientId,blockIndex:e,dropPosition:"inside"}}if(c&&r.rootClientId&&function(e,t,n=1,o=!1){const r=o?t.right-n*xE:t.left+n*xE;return o?e.x>r:e.x<r}(t,s,a.length,n)){const i=yE(e,l),c=r.nestingLevel,u=i?i.nestingLevel:1;if(c&&u){const d=function(e,t,n=1,o=!1){const r=o?t.right-n*xE:t.left+n*xE,i=o?r-e.x:e.x-r,s=Math.round(i/xE);return Math.abs(s)}(t,s,a.length,n),p=Math.max(Math.min(d,c-u),0);if(a[p]){let t=r.blockIndex;if(a[p].nestingLevel===i?.nestingLevel)t=i?.blockIndex;else for(let n=l;n>=0;n--){const o=e[n];if(o.rootClientId===a[p].rootClientId){t=o.blockIndex+1;break}}return{rootClientId:a[p].rootClientId,clientId:r.clientId,blockIndex:t,dropPosition:o}}}}if(!r.canInsertDraggedBlocksAsSibling)return;const u=c?1:0;return{rootClientId:r.rootClientId,clientId:r.clientId,blockIndex:r.blockIndex+u,dropPosition:o}}const CE={leading:!1,trailing:!0};function BE({selectBlock:e}){const t=(0,c.useRegistry)(),{getBlockOrder:n,getBlockRootClientId:o,getBlocksByClientId:r,getPreviousBlockClientId:i,getSelectedBlockClientIds:s,getSettings:a,canInsertBlockType:d,canRemoveBlocks:p}=(0,c.useSelect)(li),{flashBlock:h,removeBlocks:g,replaceBlocks:m,insertBlocks:f}=(0,c.useDispatch)(li),b=xy();return(0,u.useRefEffect)((c=>{function u(t,n){n&&e(void 0,t,null,null),hE(t,c)}function k(e){if(e.defaultPrevented)return;if(!c.contains(e.target.ownerDocument.activeElement))return;const k=e.target.ownerDocument.activeElement?.closest("[role=row]"),v=k?.dataset?.block;if(!v)return;const{blocksToUpdate:_,firstBlockClientId:x,firstBlockRootClientId:y,originallySelectedBlockClientIds:S}=function(e){const t=s(),n=t.includes(e),r=n?t[0]:e;return{blocksToUpdate:n?t:[e],firstBlockClientId:r,firstBlockRootClientId:o(r),originallySelectedBlockClientIds:t}}(v);if(0!==_.length){if(e.preventDefault(),"copy"===e.type||"cut"===e.type){1===_.length&&h(_[0]),b(e.type,_);wy(e,r(_),t)}if("cut"===e.type){var w;if(!p(_))return;let e=null!==(w=i(x))&&void 0!==w?w:y;g(_,!1);const t=S.length>0&&0===s().length;e||(e=n()[0]),u(e,t)}else if("paste"===e.type){const{__experimentalCanUserUseUnfilteredHTML:t}=a(),n=function(e,t){const{plainText:n,html:o,files:r}=yy(e);let i=[];if(r.length){const e=(0,l.getBlockTransforms)("from");i=r.reduce(((t,n)=>{const o=(0,l.findTransform)(e,(e=>"files"===e.type&&e.isMatch([n])));return o&&t.push(o.transform([n])),t}),[]).flat()}else i=(0,l.pasteHandler)({HTML:o,plainText:n,mode:"BLOCKS",canUserUseUnfilteredHTML:t});return i}(e,t);if(1===_.length){const[e]=_;if(n.every((t=>d(t.name,e))))return f(n,void 0,e),void u(n[0]?.clientId,!1)}m(_,n,n.length-1,-1),u(n[0]?.clientId,!1)}}}return c.ownerDocument.addEventListener("copy",k),c.ownerDocument.addEventListener("cut",k),c.ownerDocument.addEventListener("paste",k),()=>{c.ownerDocument.removeEventListener("copy",k),c.ownerDocument.removeEventListener("cut",k),c.ownerDocument.removeEventListener("paste",k)}}),[])}const IE=(e,t)=>"clear"===t.type?{}:Array.isArray(t.clientIds)?{...e,...t.clientIds.reduce(((e,n)=>({...e,[n]:"expand"===t.type})),{})}:e;const jE=(0,a.forwardRef)((function e({id:t,blocks:n,dropZoneElement:o,showBlockMovers:r=!1,isExpanded:i=!1,showAppender:s=!1,blockSettingsMenu:l=rj,rootClientId:d,description:p,onSelect:h,additionalBlockContent:g},m){n&&y()("`blocks` property in `wp.blockEditor.__experimentalListView`",{since:"6.3",alternative:"`rootClientId` property"});const f=(0,u.useInstanceId)(e),{clientIdsTree:b,draggedClientIds:k,selectedClientIds:v}=function({blocks:e,rootClientId:t}){return(0,c.useSelect)((n=>{const{getDraggedBlockClientIds:o,getSelectedBlockClientIds:r,getEnabledClientIdsTree:i}=te(n(li));return{selectedClientIds:r(),draggedClientIds:o(),clientIdsTree:null!=e?e:i(t)}}),[e,t])}({blocks:n,rootClientId:d}),_=function(e){const t=(0,a.useMemo)((()=>{const t={};let n=0;const o=e=>{e.forEach((e=>{t[e.clientId]=n,n++,e.innerBlocks.length>0&&o(e.innerBlocks)}))};return o(e),t}),[e]);return t}(b),{getBlock:x}=(0,c.useSelect)(li),{visibleBlockCount:S}=(0,c.useSelect)((e=>{const{getGlobalBlockCount:t,getClientIdsOfDescendants:n}=e(li),o=k?.length>0?n(k).length+1:0;return{visibleBlockCount:t()-o}}),[k]),{updateBlockSelection:w}=_E(),[B,I]=(0,a.useReducer)(IE,{}),[j,E]=(0,a.useState)(null),{setSelectedTreeId:T}=function({firstSelectedBlockClientId:e,setExpandedState:t}){const[n,o]=(0,a.useState)(null),{selectedBlockParentClientIds:r}=(0,c.useSelect)((t=>{const{getBlockParents:n}=t(li);return{selectedBlockParentClientIds:n(e,!1)}}),[e]);return(0,a.useEffect)((()=>{n!==e&&r?.length&&t({type:"expand",clientIds:r})}),[e,r,n,t]),{setSelectedTreeId:o}}({firstSelectedBlockClientId:v[0],setExpandedState:I}),M=(0,a.useCallback)(((e,t,n)=>{w(e,t,null,n),T(t),h&&h(x(t))}),[T,w,h,x]),{ref:P,target:R}=function({dropZoneElement:e,expandedState:t,setExpandedState:n}){const{getBlockRootClientId:o,getBlockIndex:r,getBlockCount:i,getDraggedBlockClientIds:s,canInsertBlocks:l}=(0,c.useSelect)(li),[d,p]=(0,a.useState)(),{rootClientId:h,blockIndex:g}=d||{},m=Px(h,g),f=(0,C.isRTL)(),b=(0,u.usePrevious)(h),k=(0,a.useCallback)(((e,t)=>{const{rootClientId:o}=t||{};o&&("inside"!==t?.dropPosition||e[o]||n({type:"expand",clientIds:[o]}))}),[n]),v=(0,u.useThrottle)(k,500,CE);(0,a.useEffect)((()=>{"inside"===d?.dropPosition&&b===d?.rootClientId?v(t,d):v.cancel()}),[t,b,d,v]);const _=s(),x=(0,u.useThrottle)((0,a.useCallback)(((e,t)=>{const n={x:e.clientX,y:e.clientY},s=!!_?.length,a=wE(Array.from(t.querySelectorAll("[data-block]")).map((e=>{const t=e.dataset.block,n="true"===e.dataset.expanded,a=e.classList.contains("is-dragging"),c=parseInt(e.getAttribute("aria-level"),10),u=o(t);return{clientId:t,isExpanded:n,rootClientId:u,blockIndex:r(t),element:e,nestingLevel:c||void 0,isDraggedBlock:!!s&&a,innerBlockCount:i(t),canInsertDraggedBlocksAsSibling:!s||l(_,u),canInsertDraggedBlocksAsChild:!s||l(_,t)}})),n,f);a&&p(a)}),[l,_,i,r,o,f]),50);return{ref:(0,u.__experimentalUseDropZone)({dropZoneElement:e,onDrop(e){x.cancel(),d&&m(e),p(void 0)},onDragLeave(){x.cancel(),p(null)},onDragOver(e){x(e,e.currentTarget)},onDragEnd(){x.cancel(),p(void 0)}}),target:d}}({dropZoneElement:o,expandedState:B,setExpandedState:I}),N=(0,a.useRef)(),L=BE({selectBlock:M}),A=(0,u.useMergeRefs)([L,N,P,m]);(0,a.useEffect)((()=>{v?.length&&hE(v[0],N?.current)}),[]);const D=(0,a.useCallback)((e=>{if(!e)return;const t=Array.isArray(e)?e:[e];I({type:"expand",clientIds:t})}),[I]),O=(0,a.useCallback)((e=>{e&&I({type:"collapse",clientIds:[e]})}),[I]),z=(0,a.useCallback)((()=>{I({type:"clear"})}),[I]),V=(0,a.useCallback)((e=>{D(e?.dataset?.block)}),[D]),F=(0,a.useCallback)((e=>{O(e?.dataset?.block)}),[O]),H=(0,a.useCallback)(((e,t,n)=>{e.shiftKey&&w(e,t?.dataset?.block,n?.dataset?.block)}),[w]);!function({collapseAll:e,expand:t}){const{expandedBlock:n,getBlockParents:o}=(0,c.useSelect)((e=>{const{getBlockParents:t,getExpandedBlock:n}=te(e(li));return{expandedBlock:n(),getBlockParents:t}}),[]);(0,a.useEffect)((()=>{if(n){const r=o(n,!1);e(),t(r)}}),[e,t,n,o])}({collapseAll:z,expand:D});const G=k?.[0],{blockDropTargetIndex:U,blockDropPosition:W,firstDraggedBlockIndex:K}=(0,a.useMemo)((()=>{let e,t;if(R?.clientId){const t=_[R.clientId];e=void 0===t||"top"===R?.dropPosition?t:t+1}else null===R&&(e=null);if(G){const e=_[G];t=void 0===e||"top"===R?.dropPosition?e:e+1}return{blockDropTargetIndex:e,blockDropPosition:R?.dropPosition,firstDraggedBlockIndex:t}}),[R,_,G]),Z=(0,a.useMemo)((()=>({blockDropPosition:W,blockDropTargetIndex:U,blockIndexes:_,draggedClientIds:k,expandedState:B,expand:D,firstDraggedBlockIndex:K,collapse:O,collapseAll:z,BlockSettingsMenu:l,listViewInstanceId:f,AdditionalBlockContent:g,insertedBlock:j,setInsertedBlock:E,treeGridElementRef:N,rootClientId:d})),[W,U,_,k,B,D,K,O,z,l,f,g,j,E,d]),[q]=(0,u.__experimentalUseFixedWindowList)(N,32,S,{expandedState:B,useWindowing:!0,windowOverscan:40});if(!b.length&&!s)return null;const Y=p&&`block-editor-list-view-description-${f}`;return(0,$.jsxs)(c.AsyncModeProvider,{value:!0,children:[(0,$.jsx)(vE,{draggedBlockClientId:G,listViewRef:N,blockDropTarget:R}),p&&(0,$.jsx)(os.VisuallyHidden,{id:Y,children:p}),(0,$.jsx)(os.__experimentalTreeGrid,{id:t,className:Zi("block-editor-list-view-tree",{"is-dragging":k?.length>0&&void 0!==U}),"aria-label":(0,C.__)("Block navigation structure"),ref:A,onCollapseRow:F,onExpandRow:V,onFocusRow:H,applicationAriaLabel:(0,C.__)("Block navigation structure"),"aria-describedby":Y,style:{"--wp-admin--list-view-dragged-items-height":k?.length?32*(k.length-1)+"px":null},children:(0,$.jsx)(Xj.Provider,{value:Z,children:(0,$.jsx)(kE,{blocks:b,parentId:d,selectBlock:M,showBlockMovers:r,fixedListWindow:q,selectedClientIds:v,isExpanded:i,showAppender:s})})})]})})),EE=(0,a.forwardRef)(((e,t)=>(0,$.jsx)(jE,{ref:t,...e,showAppender:!1,rootClientId:null,onSelect:null,additionalBlockContent:null,blockSettingsMenu:void 0})));function TE({isEnabled:e,onToggle:t,isOpen:n,innerRef:o,...r}){return(0,$.jsx)(os.Button,{__next40pxDefaultSize:!1,...r,ref:o,icon:Yj,"aria-expanded":n,"aria-haspopup":"true",onClick:e?t:void 0,label:(0,C.__)("List view"),className:"block-editor-block-navigation","aria-disabled":!e})}const ME=(0,a.forwardRef)((function({isDisabled:e,...t},n){y()("wp.blockEditor.BlockNavigationDropdown",{since:"6.1",alternative:"wp.components.Dropdown and wp.blockEditor.ListView"});const o=(0,c.useSelect)((e=>!!e(li).getBlockCount()),[])&&!e;return(0,$.jsx)(os.Dropdown,{contentClassName:"block-editor-block-navigation__popover",popoverProps:{placement:"bottom-start"},renderToggle:({isOpen:e,onToggle:r})=>(0,$.jsx)(TE,{...t,innerRef:n,isOpen:e,onToggle:r,isEnabled:o}),renderContent:()=>(0,$.jsxs)("div",{className:"block-editor-block-navigation__container",children:[(0,$.jsx)("p",{className:"block-editor-block-navigation__label",children:(0,C.__)("List view")}),(0,$.jsx)(EE,{})]})})}));function PE({genericPreviewBlock:e,style:t,className:n,activeStyle:o}){const r=(0,l.getBlockType)(e.name)?.example,i=QB(n,o,t),s=(0,a.useMemo)((()=>({...e,title:t.label||t.name,description:t.description,initialAttributes:{...e.attributes,className:i+" block-editor-block-styles__block-preview-container"},example:r})),[e,i]);return(0,$.jsx)(aS,{item:s})}const RE=()=>{};const NE=function({clientId:e,onSwitch:t=RE,onHoverClassName:n=RE}){const{onSelect:o,stylesToRender:r,activeStyle:i,genericPreviewBlock:s,className:l}=eI({clientId:e,onSwitch:t}),[c,d]=(0,a.useState)(null),p=(0,u.useViewportMatch)("medium","<");if(!r||0===r.length)return null;const h=(0,u.debounce)(d,250),g=e=>{var t;c!==e?(h(e),n(null!==(t=e?.name)&&void 0!==t?t:null)):h.cancel()};return(0,$.jsxs)("div",{className:"block-editor-block-styles",children:[(0,$.jsx)("div",{className:"block-editor-block-styles__variants",children:r.map((e=>{const t=e.label||e.name;return(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,className:Zi("block-editor-block-styles__item",{"is-active":i.name===e.name}),variant:"secondary",label:t,onMouseEnter:()=>g(e),onFocus:()=>g(e),onMouseLeave:()=>g(null),onBlur:()=>g(null),onClick:()=>(e=>{o(e),n(null),d(null),h.cancel()})(e),"aria-current":i.name===e.name,children:(0,$.jsx)(os.__experimentalTruncate,{numberOfLines:1,className:"block-editor-block-styles__item-text",children:t})},e.name)}))}),c&&!p&&(0,$.jsx)(os.Popover,{placement:"left-start",offset:34,focusOnMount:!1,children:(0,$.jsx)("div",{className:"block-editor-block-styles__preview-panel",onMouseLeave:()=>g(null),children:(0,$.jsx)(PE,{activeStyle:i,className:l,genericPreviewBlock:s,style:c})})})]})},LE={0:(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"m9.99609 14v-.2251l.00391.0001v6.225h1.5v-14.5h2.5v14.5h1.5v-14.5h3v-1.5h-8.50391c-2.76142 0-5 2.23858-5 5 0 2.7614 2.23858 5 5 5z"})}),1:(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M17.6 7c-.6.9-1.5 1.7-2.6 2v1h2v7h2V7h-1.4zM11 11H7V7H5v10h2v-4h4v4h2V7h-2v4z"})}),2:(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M9 11.1H5v-4H3v10h2v-4h4v4h2v-10H9v4zm8 4c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6v1.5h8v-2H17z"})}),3:(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M9 11H5V7H3v10h2v-4h4v4h2V7H9v4zm11.3 1.7c-.4-.4-1-.7-1.6-.8v-.1c.6-.2 1.1-.5 1.5-.9.3-.4.5-.8.5-1.3 0-.4-.1-.8-.3-1.1-.2-.3-.5-.6-.8-.8-.4-.2-.8-.4-1.2-.5-.6-.1-1.1-.2-1.6-.2-.6 0-1.3.1-1.8.3s-1.1.5-1.6.9l1.2 1.4c.4-.2.7-.4 1.1-.6.3-.2.7-.3 1.1-.3.4 0 .8.1 1.1.3.3.2.4.5.4.8 0 .4-.2.7-.6.9-.7.3-1.5.5-2.2.4v1.6c.5 0 1 0 1.5.1.3.1.7.2 1 .3.2.1.4.2.5.4s.1.4.1.6c0 .3-.2.7-.5.8-.4.2-.9.3-1.4.3s-1-.1-1.4-.3c-.4-.2-.8-.4-1.2-.7L13 15.6c.5.4 1 .8 1.6 1 .7.3 1.5.4 2.3.4.6 0 1.1-.1 1.6-.2.4-.1.9-.2 1.3-.5.4-.2.7-.5.9-.9.2-.4.3-.8.3-1.2 0-.6-.3-1.1-.7-1.5z"})}),4:(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M20 13V7h-3l-4 6v2h5v2h2v-2h1v-2h-1zm-2 0h-2.8L18 9v4zm-9-2H5V7H3v10h2v-4h4v4h2V7H9v4z"})}),5:(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M9 11H5V7H3v10h2v-4h4v4h2V7H9v4zm11.7 1.2c-.2-.3-.5-.7-.8-.9-.3-.3-.7-.5-1.1-.6-.5-.1-.9-.2-1.4-.2-.2 0-.5.1-.7.1-.2.1-.5.1-.7.2l.1-1.9h4.3V7H14l-.3 5 1 .6.5-.2.4-.1c.1-.1.3-.1.4-.1h.5c.5 0 1 .1 1.4.4.4.2.6.7.6 1.1 0 .4-.2.8-.6 1.1-.4.3-.9.4-1.4.4-.4 0-.9-.1-1.3-.3-.4-.2-.7-.4-1.1-.7 0 0-1.1 1.4-1 1.5.5.4 1 .8 1.6 1 .7.3 1.5.4 2.3.4.5 0 1-.1 1.5-.3s.9-.4 1.3-.7c.4-.3.7-.7.9-1.1s.3-.9.3-1.4-.1-1-.3-1.4z"})}),6:(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M20.7 12.4c-.2-.3-.4-.6-.7-.9s-.6-.5-1-.6c-.4-.2-.8-.2-1.2-.2-.5 0-.9.1-1.3.3s-.8.5-1.2.8c0-.5 0-.9.2-1.4l.6-.9c.2-.2.5-.4.8-.5.6-.2 1.3-.2 1.9 0 .3.1.6.3.8.5 0 0 1.3-1.3 1.3-1.4-.4-.3-.9-.6-1.4-.8-.6-.2-1.3-.3-2-.3-.6 0-1.1.1-1.7.4-.5.2-1 .5-1.4.9-.4.4-.8 1-1 1.6-.3.7-.4 1.5-.4 2.3s.1 1.5.3 2.1c.2.6.6 1.1 1 1.5.4.4.9.7 1.4.9 1 .3 2 .3 3 0 .4-.1.8-.3 1.2-.6.3-.3.6-.6.8-1 .2-.5.3-.9.3-1.4s-.1-.9-.3-1.3zm-2 2.1c-.1.2-.3.4-.4.5-.1.1-.3.2-.5.2-.2.1-.4.1-.6.1-.2.1-.5 0-.7-.1-.2 0-.3-.2-.5-.3-.1-.2-.3-.4-.4-.6-.2-.3-.3-.7-.3-1 .3-.3.6-.5 1-.7.3-.1.7-.2 1-.2.4 0 .8.1 1.1.3.3.3.4.7.4 1.1 0 .2 0 .5-.1.7zM9 11H5V7H3v10h2v-4h4v4h2V7H9v4z"})})};function AE({level:e}){return LE[e]?(0,$.jsx)(os.Icon,{icon:LE[e]}):null}const DE=[1,2,3,4,5,6],OE={className:"block-library-heading-level-dropdown"};function zE({options:e=DE,value:t,onChange:n}){const o=e.filter((e=>0===e||DE.includes(e))).sort(((e,t)=>e-t));return(0,$.jsx)(os.ToolbarDropdownMenu,{popoverProps:OE,icon:(0,$.jsx)(AE,{level:t}),label:(0,C.__)("Change level"),controls:o.map((e=>{const o=e===t;return{icon:(0,$.jsx)(AE,{level:e}),title:0===e?(0,C.__)("Paragraph"):(0,C.sprintf)((0,C.__)("Heading %d"),e),isActive:o,onClick(){n(e)},role:"menuitemradio"}}))})}const VE=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.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"})});const FE=function({icon:e=VE,label:t=(0,C.__)("Choose variation"),instructions:n=(0,C.__)("Select a variation to start with:"),variations:o,onSelect:r,allowSkip:i}){const s=Zi("block-editor-block-variation-picker",{"has-many-variations":o.length>4});return(0,$.jsxs)(os.Placeholder,{icon:e,label:t,instructions:n,className:s,children:[(0,$.jsx)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":(0,C.__)("Block variations"),children:o.map((e=>(0,$.jsxs)("li",{children:[(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,variant:"tertiary",icon:e.icon&&e.icon.src?e.icon.src:e.icon,iconSize:48,onClick:()=>r(e),className:"block-editor-block-variation-picker__variation",label:e.description||e.title}),(0,$.jsx)("span",{className:"block-editor-block-variation-picker__variation-label",children:e.title})]},e.name)))}),i&&(0,$.jsx)("div",{className:"block-editor-block-variation-picker__skip",children:(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>r(),children:(0,C.__)("Skip")})})]})},HE="carousel",GE="grid",$E=({onBlockPatternSelect:e})=>(0,$.jsx)("div",{className:"block-editor-block-pattern-setup__actions",children:(0,$.jsx)(os.Button,{__next40pxDefaultSize:!1,variant:"primary",onClick:e,children:(0,C.__)("Choose")})}),UE=({handlePrevious:e,handleNext:t,activeSlide:n,totalSlides:o})=>(0,$.jsxs)("div",{className:"block-editor-block-pattern-setup__navigation",children:[(0,$.jsx)(os.Button,{__next40pxDefaultSize:!1,icon:(0,C.isRTL)()?Hf:Gf,label:(0,C.__)("Previous pattern"),onClick:e,disabled:0===n,accessibleWhenDisabled:!0}),(0,$.jsx)(os.Button,{__next40pxDefaultSize:!1,icon:(0,C.isRTL)()?Gf:Hf,label:(0,C.__)("Next pattern"),onClick:t,disabled:n===o-1,accessibleWhenDisabled:!0})]}),WE=({viewMode:e,setViewMode:t,handlePrevious:n,handleNext:o,activeSlide:r,totalSlides:i,onBlockPatternSelect:s})=>{const l=e===HE,a=(0,$.jsxs)("div",{className:"block-editor-block-pattern-setup__display-controls",children:[(0,$.jsx)(os.Button,{__next40pxDefaultSize:!1,icon:Ol,label:(0,C.__)("Carousel view"),onClick:()=>t(HE),isPressed:l}),(0,$.jsx)(os.Button,{__next40pxDefaultSize:!1,icon:dj,label:(0,C.__)("Grid view"),onClick:()=>t(GE),isPressed:e===GE})]});return(0,$.jsxs)("div",{className:"block-editor-block-pattern-setup__toolbar",children:[l&&(0,$.jsx)(UE,{handlePrevious:n,handleNext:o,activeSlide:r,totalSlides:i}),a,l&&(0,$.jsx)($E,{onBlockPatternSelect:s})]})};const KE=function(e,t,n){return(0,c.useSelect)((o=>{const{getBlockRootClientId:r,getPatternsByBlockTypes:i,__experimentalGetAllowedPatterns:s}=o(li),l=r(e);return n?s(l).filter(n):i(t,l)}),[e,t,n])},ZE=({viewMode:e,activeSlide:t,patterns:n,onBlockPatternSelect:o,showTitles:r})=>{const i="block-editor-block-pattern-setup__container";if(e===HE){const e=new Map([[t,"active-slide"],[t-1,"previous-slide"],[t+1,"next-slide"]]);return(0,$.jsx)("div",{className:"block-editor-block-pattern-setup__carousel",children:(0,$.jsx)("div",{className:i,children:(0,$.jsx)("div",{className:"carousel-container",children:n.map(((n,o)=>(0,$.jsx)(YE,{active:o===t,className:e.get(o)||"",pattern:n},n.name)))})})})}return(0,$.jsx)("div",{className:"block-editor-block-pattern-setup__grid",children:(0,$.jsx)(os.Composite,{role:"listbox",className:i,"aria-label":(0,C.__)("Patterns list"),children:n.map((e=>(0,$.jsx)(qE,{pattern:e,onSelect:o,showTitles:r},e.name)))})})};function qE({pattern:e,onSelect:t,showTitles:n}){const o="block-editor-block-pattern-setup-list",{blocks:r,description:i,viewportWidth:s=700}=e,l=(0,u.useInstanceId)(qE,`${o}__item-description`);return(0,$.jsx)("div",{className:`${o}__list-item`,children:(0,$.jsxs)(os.Composite.Item,{render:(0,$.jsx)("div",{"aria-describedby":i?l:void 0,"aria-label":e.title,className:`${o}__item`}),id:`${o}__pattern__${e.name}`,role:"option",onClick:()=>t(r),children:[(0,$.jsx)(sS,{blocks:r,viewportWidth:s}),n&&(0,$.jsx)("div",{className:`${o}__item-title`,children:e.title}),!!i&&(0,$.jsx)(os.VisuallyHidden,{id:l,children:i})]})})}function YE({active:e,className:t,pattern:n,minHeight:o}){const{blocks:r,title:i,description:s}=n,l=(0,u.useInstanceId)(YE,"block-editor-block-pattern-setup-list__item-description");return(0,$.jsxs)("div",{"aria-hidden":!e,role:"img",className:`pattern-slide ${t}`,"aria-label":i,"aria-describedby":s?l:void 0,children:[(0,$.jsx)(sS,{blocks:r,minHeight:o}),!!s&&(0,$.jsx)(os.VisuallyHidden,{id:l,children:s})]})}const XE=({clientId:e,blockName:t,filterPatternsFn:n,onBlockPatternSelect:o,initialViewMode:r=HE,showTitles:i=!1})=>{const[s,u]=(0,a.useState)(r),[d,p]=(0,a.useState)(0),{replaceBlock:h}=(0,c.useDispatch)(li),g=KE(e,t,n);if(!g?.length)return null;const m=o||(t=>{const n=t.map((e=>(0,l.cloneBlock)(e)));h(e,n)});return(0,$.jsx)($.Fragment,{children:(0,$.jsxs)("div",{className:`block-editor-block-pattern-setup view-mode-${s}`,children:[(0,$.jsx)(ZE,{viewMode:s,activeSlide:d,patterns:g,onBlockPatternSelect:m,showTitles:i}),(0,$.jsx)(WE,{viewMode:s,setViewMode:u,activeSlide:d,totalSlides:g.length,handleNext:()=>{p((e=>Math.min(e+1,g.length-1)))},handlePrevious:()=>{p((e=>Math.max(e-1,0)))},onBlockPatternSelect:()=>{m(g[d].blocks)}})]})})};function QE({className:e,onSelectVariation:t,selectedValue:n,variations:o}){return(0,$.jsxs)("fieldset",{className:e,children:[(0,$.jsx)(os.VisuallyHidden,{as:"legend",children:(0,C.__)("Transform to variation")}),o.map((e=>(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,size:"compact",icon:(0,$.jsx)(Uf,{icon:e.icon,showColors:!0}),isPressed:n===e.name,label:n===e.name?e.title:(0,C.sprintf)((0,C.__)("Transform to %s"),e.title),onClick:()=>t(e.name),"aria-label":e.title,showTooltip:!0},e.name)))]})}function JE({className:e,onSelectVariation:t,selectedValue:n,variations:o}){const r=o.map((({name:e,title:t,description:n})=>({value:e,label:t,info:n})));return(0,$.jsx)(os.DropdownMenu,{className:e,label:(0,C.__)("Transform to variation"),text:(0,C.__)("Transform to variation"),popoverProps:{position:"bottom center",className:`${e}__popover`},icon:mC,toggleProps:{iconPosition:"right"},children:()=>(0,$.jsx)("div",{className:`${e}__container`,children:(0,$.jsx)(os.MenuGroup,{children:(0,$.jsx)(os.MenuItemsChoice,{choices:r,value:n,onSelect:t})})})})}function eT({className:e,onSelectVariation:t,selectedValue:n,variations:o}){return(0,$.jsx)("div",{className:e,children:(0,$.jsx)(os.__experimentalToggleGroupControl,{label:(0,C.__)("Transform to variation"),value:n,hideLabelFromVision:!0,onChange:t,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,children:o.map((e=>(0,$.jsx)(os.__experimentalToggleGroupControlOptionIcon,{icon:(0,$.jsx)(Uf,{icon:e.icon,showColors:!0}),value:e.name,label:n===e.name?e.title:(0,C.sprintf)((0,C.__)("Transform to %s"),e.title)},e.name)))})})}const tT=function({blockClientId:e}){const{updateBlockAttributes:t}=(0,c.useDispatch)(li),{activeBlockVariation:n,variations:o,isContentOnly:r}=(0,c.useSelect)((t=>{const{getActiveBlockVariation:n,getBlockVariations:o}=t(l.store),{getBlockName:r,getBlockAttributes:i,getBlockEditingMode:s}=t(li),a=e&&r(e),{hasContentRoleAttribute:c}=te(t(l.store)),u=c(a);return{activeBlockVariation:n(a,i(e)),variations:a&&o(a,"transform"),isContentOnly:"contentOnly"===s(e)&&!u}}),[e]),i=n?.name,s=(0,a.useMemo)((()=>{const e=new Set;return!!o&&(o.forEach((t=>{t.icon&&e.add(t.icon?.src||t.icon)})),e.size===o.length)}),[o]);if(!o?.length||r)return null;const u=o.length>5,d=s?u?QE:eT:JE;return(0,$.jsx)(d,{className:"block-editor-block-variation-transforms",onSelectVariation:n=>{t(e,{...o.find((({name:e})=>e===n)).attributes})},selectedValue:i,variations:o})},nT=(0,u.createHigherOrderComponent)((e=>t=>{const[n,o]=ci("color.palette","color.custom"),{colors:r=n,disableCustomColors:i=!o}=t,s=r&&r.length>0||!i;return(0,$.jsx)(e,{...t,colors:r,disableCustomColors:i,hasColorsToChoose:s})}),"withColorContext"),oT=nT(os.ColorPalette);function rT({onChange:e,value:t,...n}){return(0,$.jsx)(Xd,{...n,onColorChange:e,colorValue:t,gradients:[],disableCustomGradients:!0})}const iT=window.wp.date,sT=new Date;function lT({format:e,defaultFormat:t,onChange:n}){return(0,$.jsxs)("fieldset",{className:"block-editor-date-format-picker",children:[(0,$.jsx)(os.VisuallyHidden,{as:"legend",children:(0,C.__)("Date format")}),(0,$.jsx)(os.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,C.__)("Default format"),help:`${(0,C.__)("Example:")} ${(0,iT.dateI18n)(t,sT)}`,checked:!e,onChange:e=>n(e?null:t)}),e&&(0,$.jsx)(aT,{format:e,onChange:n})]})}function aT({format:e,onChange:t}){var n;const o=[...[...new Set(["Y-m-d",(0,C._x)("n/j/Y","short date format"),(0,C._x)("n/j/Y g:i A","short date format with time"),(0,C._x)("M j, Y","medium date format"),(0,C._x)("M j, Y g:i A","medium date format with time"),(0,C._x)("F j, Y","long date format"),(0,C._x)("M j","short date format without the year")])].map(((e,t)=>({key:`suggested-${t}`,name:(0,iT.dateI18n)(e,sT),format:e}))),{key:"human-diff",name:(0,iT.humanTimeDiff)(sT),format:"human-diff"}],r={key:"custom",name:(0,C.__)("Custom"),className:"block-editor-date-format-picker__custom-format-select-control__custom-option",hint:(0,C.__)("Enter your own date format")},[i,s]=(0,a.useState)((()=>!!e&&!o.some((t=>t.format===e))));return(0,$.jsxs)(os.__experimentalVStack,{children:[(0,$.jsx)(os.CustomSelectControl,{__next40pxDefaultSize:!0,label:(0,C.__)("Choose a format"),options:[...o,r],value:i?r:null!==(n=o.find((t=>t.format===e)))&&void 0!==n?n:r,onChange:({selectedItem:e})=>{e===r?s(!0):(s(!1),t(e.format))}}),i&&(0,$.jsx)(os.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,C.__)("Custom format"),hideLabelFromVision:!0,help:(0,a.createInterpolateElement)((0,C.__)("Enter a date or time <Link>format string</Link>."),{Link:(0,$.jsx)(os.ExternalLink,{href:(0,C.__)("https://wordpress.org/documentation/article/customize-date-and-time-format/")})}),value:e,onChange:e=>t(e)})]})}sT.setDate(20),sT.setMonth(sT.getMonth()-3),4===sT.getMonth()&&sT.setMonth(3);const cT=({setting:e,children:t,panelId:n,...o})=>(0,$.jsx)(os.__experimentalToolsPanelItem,{hasValue:()=>!!e.colorValue||!!e.gradientValue,label:e.label,onDeselect:()=>{e.colorValue?e.onColorChange():e.gradientValue&&e.onGradientChange()},isShownByDefault:void 0===e.isShownByDefault||e.isShownByDefault,...o,className:"block-editor-tools-panel-color-gradient-settings__item",panelId:n,resetAllFilter:e.resetAllFilter,children:t}),uT=({colorValue:e,label:t})=>(0,$.jsxs)(os.__experimentalHStack,{justify:"flex-start",children:[(0,$.jsx)(os.ColorIndicator,{className:"block-editor-panel-color-gradient-settings__color-indicator",colorValue:e}),(0,$.jsx)(os.FlexItem,{className:"block-editor-panel-color-gradient-settings__color-name",title:t,children:t})]}),dT=e=>({onToggle:t,isOpen:n})=>{const{colorValue:o,label:r}=e,i={onClick:t,className:Zi("block-editor-panel-color-gradient-settings__dropdown",{"is-open":n}),"aria-expanded":n};return(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,...i,children:(0,$.jsx)(uT,{colorValue:o,label:r})})};function pT({colors:e,disableCustomColors:t,disableCustomGradients:n,enableAlpha:o,gradients:r,settings:i,__experimentalIsRenderedInSidebar:s,...l}){let a;return s&&(a={placement:"left-start",offset:36,shift:!0}),(0,$.jsx)($.Fragment,{children:i.map(((i,c)=>{var u;const d={clearable:!1,colorValue:i.colorValue,colors:e,disableCustomColors:t,disableCustomGradients:n,enableAlpha:o,gradientValue:i.gradientValue,gradients:r,label:i.label,onColorChange:i.onColorChange,onGradientChange:i.onGradientChange,showTitle:!1,__experimentalIsRenderedInSidebar:s,...i},p={colorValue:null!==(u=i.gradientValue)&&void 0!==u?u:i.colorValue,label:i.label};return i&&(0,$.jsx)(cT,{setting:i,...l,children:(0,$.jsx)(os.Dropdown,{popoverProps:a,className:"block-editor-tools-panel-color-gradient-settings__dropdown",renderToggle:dT(p),renderContent:()=>(0,$.jsx)(os.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,$.jsx)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content",children:(0,$.jsx)(Xd,{...d})})})})},c)}))})}const hT=["colors","disableCustomColors","gradients","disableCustomGradients"],gT=({className:e,colors:t,gradients:n,disableCustomColors:o,disableCustomGradients:r,children:i,settings:s,title:l,showTitle:a=!0,__experimentalIsRenderedInSidebar:d,enableAlpha:p})=>{const h=(0,u.useInstanceId)(gT),{batch:g}=(0,c.useRegistry)();return t&&0!==t.length||n&&0!==n.length||!o||!r||!s?.every((e=>(!e.colors||0===e.colors.length)&&(!e.gradients||0===e.gradients.length)&&(void 0===e.disableCustomColors||e.disableCustomColors)&&(void 0===e.disableCustomGradients||e.disableCustomGradients)))?(0,$.jsxs)(os.__experimentalToolsPanel,{className:Zi("block-editor-panel-color-gradient-settings",e),label:a?l:void 0,resetAll:()=>{g((()=>{s.forEach((({colorValue:e,gradientValue:t,onColorChange:n,onGradientChange:o})=>{e?n():t&&o()}))}))},panelId:h,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",children:[(0,$.jsx)(pT,{settings:s,panelId:h,colors:t,gradients:n,disableCustomColors:o,disableCustomGradients:r,__experimentalIsRenderedInSidebar:d,enableAlpha:p}),!!i&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(os.__experimentalSpacer,{marginY:4})," ",i]})]}):null},mT=e=>{const t=Zu();return(0,$.jsx)(gT,{...t,...e})},fT=e=>hT.every((t=>e.hasOwnProperty(t)))?(0,$.jsx)(gT,{...e}):(0,$.jsx)(mT,{...e}),bT=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.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"})}),kT=100,vT=300,_T={placement:"bottom-start"};const xT=(0,a.createContext)({}),yT=()=>(0,a.useContext)(xT);function ST({id:e,url:t,naturalWidth:n,naturalHeight:o,onFinishEditing:r,onSaveImage:i,children:s}){const l=function({url:e,naturalWidth:t,naturalHeight:n}){const[o,r]=(0,a.useState)(),[i,s]=(0,a.useState)(),[l,c]=(0,a.useState)({x:0,y:0}),[u,p]=(0,a.useState)(100),[h,g]=(0,a.useState)(0),m=t/n,[f,b]=(0,a.useState)(m),k=(0,a.useCallback)((()=>{const t=(h+90)%360;let n=m;if(h%180==90&&(n=1/m),0===t)return r(),g(t),b(m),void c((e=>({x:-e.y*n,y:e.x*n})));const o=new window.Image;o.src=e,o.onload=function(e){const o=document.createElement("canvas");let i=0,s=0;t%180?(o.width=e.target.height,o.height=e.target.width):(o.width=e.target.width,o.height=e.target.height),90!==t&&180!==t||(i=o.width),270!==t&&180!==t||(s=o.height);const l=o.getContext("2d");l.translate(i,s),l.rotate(t*Math.PI/180),l.drawImage(e.target,0,0),o.toBlob((e=>{r(URL.createObjectURL(e)),g(t),b(o.width/o.height),c((e=>({x:-e.y*n,y:e.x*n})))}))};const i=(0,d.applyFilters)("media.crossOrigin",void 0,e);"string"==typeof i&&(o.crossOrigin=i)}),[h,m,e]);return(0,a.useMemo)((()=>({editedUrl:o,setEditedUrl:r,crop:i,setCrop:s,position:l,setPosition:c,zoom:u,setZoom:p,rotation:h,setRotation:g,rotateClockwise:k,aspect:f,setAspect:b,defaultAspect:m})),[o,i,l,u,h,k,f,m])}({url:t,naturalWidth:n,naturalHeight:o}),u=function({crop:e,rotation:t,url:n,id:o,onSaveImage:r,onFinishEditing:i}){const{createErrorNotice:s}=(0,c.useDispatch)(Uo.store),[l,u]=(0,a.useState)(!1),d=(0,a.useCallback)((()=>{u(!1),i()}),[i]),p=(0,a.useCallback)((()=>{u(!0);const l=[];if(t>0&&l.push({type:"rotate",args:{angle:t}}),(e.width<99.9||e.height<99.9)&&l.push({type:"crop",args:{left:e.x,top:e.y,width:e.width,height:e.height}}),0===l.length)return u(!1),void i();lB()({path:`/wp/v2/media/${o}/edit`,method:"POST",data:{src:n,modifiers:l}}).then((e=>{r({id:e.id,url:e.source_url})})).catch((e=>{s((0,C.sprintf)((0,C.__)("Could not edit image. %s"),(0,ba.__unstableStripHTML)(e.message)),{id:"image-editing-error",type:"snackbar"})})).finally((()=>{u(!1),i()}))}),[e,t,o,n,r,s,i]);return(0,a.useMemo)((()=>({isInProgress:l,apply:p,cancel:d})),[l,p,d])}({id:e,url:t,onSaveImage:i,onFinishEditing:r,...l}),p=(0,a.useMemo)((()=>({...l,...u})),[l,u]);return(0,$.jsx)(xT.Provider,{value:p,children:s})}function wT({aspectRatios:e,isDisabled:t,label:n,onClick:o,value:r}){return(0,$.jsx)(os.MenuGroup,{label:n,children:e.map((({name:e,slug:n,ratio:i})=>(0,$.jsx)(os.MenuItem,{disabled:t,onClick:()=>{o(i)},role:"menuitemradio",isSelected:i===r,icon:i===r?cd:void 0,children:e},n)))})}function CT(e){const[t,n,...o]=e.split("/").map(Number);return t<=0||n<=0||Number.isNaN(t)||Number.isNaN(n)||o.length?NaN:n?t/n:t}function BT({ratio:e,...t}){return{ratio:CT(e),...t}}function IT({toggleProps:e}){const{isInProgress:t,aspect:n,setAspect:o,defaultAspect:r}=yT(),[i,s,l]=ci("dimensions.aspectRatios.default","dimensions.aspectRatios.theme","dimensions.defaultAspectRatios");return(0,$.jsx)(os.DropdownMenu,{icon:bT,label:(0,C.__)("Aspect Ratio"),popoverProps:_T,toggleProps:e,children:({onClose:e})=>(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(wT,{isDisabled:t,onClick:t=>{o(t),e()},value:n,aspectRatios:[{slug:"original",name:(0,C.__)("Original"),aspect:r},...l?i.map(BT).filter((({ratio:e})=>1===e)):[]]}),s?.length>0&&(0,$.jsx)(wT,{label:(0,C.__)("Theme"),isDisabled:t,onClick:t=>{o(t),e()},value:n,aspectRatios:s}),l&&(0,$.jsx)(wT,{label:(0,C.__)("Landscape"),isDisabled:t,onClick:t=>{o(t),e()},value:n,aspectRatios:i.map(BT).filter((({ratio:e})=>e>1))}),l&&(0,$.jsx)(wT,{label:(0,C.__)("Portrait"),isDisabled:t,onClick:t=>{o(t),e()},value:n,aspectRatios:i.map(BT).filter((({ratio:e})=>e<1))})]})})}var jT=function(e,t){return jT=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])},jT(e,t)};function ET(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}jT(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var TT=function(){return TT=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},TT.apply(this,arguments)};Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError;var MT=n(7520),PT=n.n(MT);function RT(e,t,n,o,r){void 0===r&&(r=0);var i=VT(t.width,t.height,r),s=i.width,l=i.height;return{x:NT(e.x,s,n.width,o),y:NT(e.y,l,n.height,o)}}function NT(e,t,n,o){var r=t*o/2-n/2;return FT(e,-r,r)}function LT(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function AT(e,t){return 180*Math.atan2(t.y-e.y,t.x-e.x)/Math.PI}function DT(e,t){return Math.min(e,Math.max(0,t))}function OT(e,t){return t}function zT(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function VT(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 FT(e,t,n){return Math.min(Math.max(e,t),n)}function HT(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter((function(e){return"string"==typeof e&&e.length>0})).join(" ").trim()}var GT=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.imageRef=Pa.createRef(),n.videoRef=Pa.createRef(),n.containerPosition={x:0,y:0},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,mediaObjectFit:void 0},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.currentDoc.removeEventListener("scroll",n.onScroll))},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=function(e,t,n,o,r,i){var s=VT(t.width,t.height,n),l=FT(o.width/s.width*(100/e.width),r,i);return{crop:{x:l*s.width/2-o.width/2-s.width*l*(e.x/100),y:l*s.height/2-o.height/2-s.height*l*(e.y/100)},zoom:l}}(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 i=function(e,t,n,o,r,i){void 0===n&&(n=0);var s=VT(t.naturalWidth,t.naturalHeight,n),l=FT(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,i),a=o.height>o.width?o.height/e.height:o.width/e.width;return{crop:{x:((s.width-e.width)/2-e.x)*a,y:((s.height-e.height)/2-e.y)*a},zoom:l}}(n.props.initialCroppedAreaPixels,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom);o=i.crop,r=i.zoom;n.props.onCropChange(o),n.props.onZoomChange&&n.props.onZoomChange(r)}},n.computeSizes=function(){var e,t,o,r,i,s,l=n.imageRef.current||n.videoRef.current;if(l&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect(),n.saveContainerPosition();var a=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(l.offsetWidth<c||l.offsetHeight<u)switch(n.state.mediaObjectFit){default:case"contain":p=a>d?{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}}else p={width:l.offsetWidth,height:l.offsetHeight};n.mediaSize=TT(TT({},p),{naturalWidth:c,naturalHeight:u}),n.props.setMediaSize&&n.props.setMediaSize(n.mediaSize);var h=n.props.cropSize?n.props.cropSize:function(e,t,n,o,r,i){void 0===i&&(i=0);var s=VT(e,t,i),l=s.width,a=s.height,c=Math.min(l,n),u=Math.min(a,o);return c>u*r?{width:u*r,height:u}:{width:c,height:c/r}}(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)===h.height&&(null===(s=n.state.cropSize)||void 0===s?void 0:s.width)===h.width||n.props.onCropSizeChange&&n.props.onCropSizeChange(h),n.setState({cropSize:h},n.recomputeCropPosition),n.props.setCropSize&&n.props.setCropSize(h),h}},n.saveContainerPosition=function(){if(n.containerRef){var e=n.containerRef.getBoundingClientRect();n.containerPosition={x:e.left,y:e.top}}},n.onMouseDown=function(e){n.currentDoc&&(e.preventDefault(),n.currentDoc.addEventListener("mousemove",n.onMouseMove),n.currentDoc.addEventListener("mouseup",n.onDragStopped),n.saveContainerPosition(),n.onDragStart(t.getMousePoint(e)))},n.onMouseMove=function(e){return n.onDrag(t.getMousePoint(e))},n.onScroll=function(e){n.currentDoc&&(e.preventDefault(),n.saveContainerPosition())},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),n.saveContainerPosition(),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 o=t.getMousePoint(e),r=n.gestureZoomStart-1+e.scale;if(n.setNewZoom(r,o,{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,o,r=e.x,i=e.y;n.dragStartPosition={x:r,y:i},n.dragStartCrop=TT({},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.currentWindow&&(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,i={x:n.dragStartCrop.x+e,y:n.dragStartCrop.y+r},s=n.props.restrictPosition?RT(i,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):i;n.props.onCropChange(s)}})))},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 o=t.getMousePoint(e),r=PT()(e).pixelY,i=n.props.zoom-r*n.props.zoomSpeed/200;n.setNewZoom(i,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,t){var o=e.x,r=e.y;if(!n.containerRect)throw new Error("The Cropper is not mounted");return{x:n.containerRect.width/2-(o-t.x),y:n.containerRect.height/2-(r-t.y)}},n.getPointOnMedia=function(e){var t=e.x,o=e.y,r=n.props,i=r.crop,s=r.zoom;return{x:(t+i.x)/s,y:(o+i.y)/s}},n.setNewZoom=function(e,t,o){var r=(void 0===o?{}:o).shouldUpdatePosition,i=void 0===r||r;if(n.state.cropSize&&n.props.onZoomChange){var s=FT(e,n.props.minZoom,n.props.maxZoom);if(i){var l=n.getPointOnContainer(t,n.containerPosition),a=n.getPointOnMedia(l),c={x:a.x*s-l.x,y:a.y*s-l.y},u=n.props.restrictPosition?RT(c,n.mediaSize,n.state.cropSize,s,n.props.rotation):c;n.props.onCropChange(u)}n.props.onZoomChange(s)}},n.getCropData=function(){return n.state.cropSize?function(e,t,n,o,r,i,s){void 0===i&&(i=0),void 0===s&&(s=!0);var l=s?DT:OT,a=VT(t.width,t.height,i),c=VT(t.naturalWidth,t.naturalHeight,i),u={x:l(100,((a.width-n.width/r)/2-e.x/r)/a.width*100),y:l(100,((a.height-n.height/r)/2-e.y/r)/a.height*100),width:l(100,n.width/a.width*100/r),height:l(100,n.height/a.height*100/r)},d=Math.round(l(c.width,u.width*c.width/100)),p=Math.round(l(c.height,u.height*c.height/100)),h=c.width>=c.height*o?{width:Math.round(p*o),height:p}:{width:d,height:Math.round(d/o)};return{croppedAreaPercentages:u,croppedAreaPixels:TT(TT({},h),{x:Math.round(l(c.width-h.width,u.x*c.width/100)),y:Math.round(l(c.height-h.height,u.y*c.height/100))})}}(n.props.restrictPosition?RT(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?RT(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 ET(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.currentDoc.addEventListener("scroll",this.onScroll),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,o,r,i,s,l,a,c;e.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):e.aspect!==this.props.aspect||e.objectFit!==this.props.objectFit?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===(i=e.crop)||void 0===i?void 0:i.x)===(null===(s=this.props.crop)||void 0===s?void 0:s.x)&&(null===(l=e.crop)||void 0===l?void 0:l.y)===(null===(a=this.props.crop)||void 0===a?void 0:a.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());var u=this.getObjectFit();u!==this.state.mediaObjectFit&&this.setState({mediaObjectFit:u},this.computeSizes)},t.prototype.getAspect=function(){var e=this.props,t=e.cropSize,n=e.aspect;return t?t.width/t.height:n},t.prototype.getObjectFit=function(){var e,t,n,o;if("cover"===this.props.objectFit){if((this.imageRef.current||this.videoRef.current)&&this.containerRef){this.containerRect=this.containerRef.getBoundingClientRect();var r=this.containerRect.width/this.containerRect.height;return((null===(e=this.imageRef.current)||void 0===e?void 0:e.naturalWidth)||(null===(t=this.videoRef.current)||void 0===t?void 0:t.videoWidth)||0)/((null===(n=this.imageRef.current)||void 0===n?void 0:n.naturalHeight)||(null===(o=this.videoRef.current)||void 0===o?void 0:o.videoHeight)||0)<r?"horizontal-cover":"vertical-cover"}return"horizontal-cover"}return this.props.objectFit},t.prototype.onPinchStart=function(e){var n=t.getTouchPoint(e.touches[0]),o=t.getTouchPoint(e.touches[1]);this.lastPinchDistance=LT(n,o),this.lastPinchRotation=AT(n,o),this.onDragStart(zT(n,o))},t.prototype.onPinchMove=function(e){var n=this;if(this.currentDoc&&this.currentWindow){var o=t.getTouchPoint(e.touches[0]),r=t.getTouchPoint(e.touches[1]),i=zT(o,r);this.onDrag(i),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame((function(){var e=LT(o,r),t=n.props.zoom*(e/n.lastPinchDistance);n.setNewZoom(t,i,{shouldUpdatePosition:!1}),n.lastPinchDistance=e;var s=AT(o,r),l=n.props.rotation+(s-n.lastPinchRotation);n.props.onRotationChange&&n.props.onRotationChange(l),n.lastPinchRotation=s}))}},t.prototype.render=function(){var e=this,t=this.props,n=t.image,o=t.video,r=t.mediaProps,i=t.transform,s=t.crop,l=s.x,a=s.y,c=t.rotation,u=t.zoom,d=t.cropShape,p=t.showGrid,h=t.style,g=h.containerStyle,m=h.cropAreaStyle,f=h.mediaStyle,b=t.classes,k=b.containerClassName,v=b.cropAreaClassName,_=b.mediaClassName,x=this.state.mediaObjectFit;return Pa.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(t){return e.containerRef=t},"data-testid":"container",style:g,className:HT("reactEasyCrop_Container",k)},n?Pa.createElement("img",TT({alt:"",className:HT("reactEasyCrop_Image","contain"===x&&"reactEasyCrop_Contain","horizontal-cover"===x&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===x&&"reactEasyCrop_Cover_Vertical",_)},r,{src:n,ref:this.imageRef,style:TT(TT({},f),{transform:i||"translate(".concat(l,"px, ").concat(a,"px) rotate(").concat(c,"deg) scale(").concat(u,")")}),onLoad:this.onMediaLoad})):o&&Pa.createElement("video",TT({autoPlay:!0,loop:!0,muted:!0,className:HT("reactEasyCrop_Video","contain"===x&&"reactEasyCrop_Contain","horizontal-cover"===x&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===x&&"reactEasyCrop_Cover_Vertical",_)},r,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:TT(TT({},f),{transform:i||"translate(".concat(l,"px, ").concat(a,"px) rotate(").concat(c,"deg) scale(").concat(u,")")}),controls:!1}),(Array.isArray(o)?o:[{src:o}]).map((function(e){return Pa.createElement("source",TT({key:e.src},e))}))),this.state.cropSize&&Pa.createElement("div",{style:TT(TT({},m),{width:this.state.cropSize.width,height:this.state.cropSize.height}),"data-testid":"cropper",className:HT("reactEasyCrop_CropArea","round"===d&&"reactEasyCrop_CropAreaRound",p&&"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}(Pa.Component);function $T({url:e,width:t,height:n,naturalHeight:o,naturalWidth:r,borderProps:i}){const{isInProgress:s,editedUrl:l,position:a,zoom:c,aspect:d,setPosition:p,setCrop:h,setZoom:g,rotation:m}=yT(),[f,{width:b}]=(0,u.useResizeObserver)();let k=n||b*o/r;m%180==90&&(k=b*r/o);const v=(0,$.jsxs)("div",{className:Zi("wp-block-image__crop-area",i?.className,{"is-applying":s}),style:{...i?.style,width:t||b,height:k},children:[(0,$.jsx)(GT,{image:l||e,disabled:s,minZoom:kT/100,maxZoom:vT/100,crop:a,zoom:c/100,aspect:d,onCropChange:e=>{p(e)},onCropComplete:e=>{h(e)},onZoomChange:e=>{g(100*e)}}),s&&(0,$.jsx)(os.Spinner,{})]});return(0,$.jsxs)($.Fragment,{children:[f,v]})}const UT=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M13 5c-3.3 0-6 2.7-6 6 0 1.4.5 2.7 1.3 3.7l-3.8 3.8 1.1 1.1 3.8-3.8c1 .8 2.3 1.3 3.7 1.3 3.3 0 6-2.7 6-6S16.3 5 13 5zm0 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z"})});function WT(){const{isInProgress:e,zoom:t,setZoom:n}=yT();return(0,$.jsx)(os.Dropdown,{contentClassName:"wp-block-image__zoom",popoverProps:_T,renderToggle:({isOpen:t,onToggle:n})=>(0,$.jsx)(os.ToolbarButton,{icon:UT,label:(0,C.__)("Zoom"),onClick:n,"aria-expanded":t,disabled:e}),renderContent:()=>(0,$.jsx)(os.__experimentalDropdownContentWrapper,{paddingSize:"medium",children:(0,$.jsx)(os.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,C.__)("Zoom"),min:kT,max:vT,value:Math.round(t),onChange:n})})})}const KT=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.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 ZT(){const{isInProgress:e,rotateClockwise:t}=yT();return(0,$.jsx)(os.ToolbarButton,{icon:KT,label:(0,C.__)("Rotate"),onClick:t,disabled:e})}function qT(){const{isInProgress:e,apply:t,cancel:n}=yT();return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(os.ToolbarButton,{onClick:t,disabled:e,children:(0,C.__)("Apply")}),(0,$.jsx)(os.ToolbarButton,{onClick:n,children:(0,C.__)("Cancel")})]})}function YT({id:e,url:t,width:n,height:o,naturalHeight:r,naturalWidth:i,onSaveImage:s,onFinishEditing:l,borderProps:a}){return(0,$.jsxs)(ST,{id:e,url:t,naturalWidth:i,naturalHeight:r,onSaveImage:s,onFinishEditing:l,children:[(0,$.jsx)($T,{borderProps:a,url:t,width:n,height:o,naturalHeight:r,naturalWidth:i}),(0,$.jsxs)(us,{children:[(0,$.jsxs)(os.ToolbarGroup,{children:[(0,$.jsx)(WT,{}),(0,$.jsx)(os.ToolbarItem,{children:e=>(0,$.jsx)(IT,{toggleProps:e})}),(0,$.jsx)(ZT,{})]}),(0,$.jsx)(os.ToolbarGroup,{children:(0,$.jsx)(qT,{})})]})]})}const XT=[25,50,75,100],QT=()=>{};function JT({imageSizeHelp:e,imageWidth:t,imageHeight:n,imageSizeOptions:o=[],isResizable:r=!0,slug:i,width:s,height:l,onChange:c,onChangeImage:u=QT}){const{currentHeight:d,currentWidth:p,updateDimension:h,updateDimensions:g}=function(e,t,n,o,r){var i,s;const[l,c]=(0,a.useState)(null!==(i=null!=t?t:o)&&void 0!==i?i:""),[u,d]=(0,a.useState)(null!==(s=null!=e?e:n)&&void 0!==s?s:"");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(l)&&c(t),void 0!==e&&Number.parseInt(e)!==Number.parseInt(u)&&d(e)}),[t,e]),{currentHeight:u,currentWidth:l,updateDimension:(e,t)=>{const n=""===t?void 0:parseInt(t,10);"width"===e?c(n):d(n),r({[e]:n})},updateDimensions:(e,t)=>{d(null!=e?e:n),c(null!=t?t:o),r({height:e,width:t})}}}(l,s,n,t,c);return(0,$.jsxs)($.Fragment,{children:[o&&o.length>0&&(0,$.jsx)(os.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,C.__)("Resolution"),value:i,options:o,onChange:u,help:e,size:"__unstable-large"}),r&&(0,$.jsxs)("div",{className:"block-editor-image-size-control",children:[(0,$.jsxs)(os.__experimentalHStack,{align:"baseline",spacing:"3",children:[(0,$.jsx)(os.__experimentalNumberControl,{className:"block-editor-image-size-control__width",label:(0,C.__)("Width"),value:p,min:1,onChange:e=>h("width",e),size:"__unstable-large"}),(0,$.jsx)(os.__experimentalNumberControl,{className:"block-editor-image-size-control__height",label:(0,C.__)("Height"),value:d,min:1,onChange:e=>h("height",e),size:"__unstable-large"})]}),(0,$.jsxs)(os.__experimentalHStack,{children:[(0,$.jsx)(os.ButtonGroup,{"aria-label":(0,C.__)("Image size presets"),children:XT.map((e=>{const o=Math.round(t*(e/100)),r=Math.round(n*(e/100)),i=p===o&&d===r;return(0,$.jsxs)(os.Button,{size:"small",variant:i?"primary":void 0,isPressed:i,onClick:()=>g(r,o),children:[e,"%"]},e)}))}),(0,$.jsx)(os.Button,{size:"small",onClick:()=>g(),children:(0,C.__)("Reset")})]})]})]})}function eM({url:e,urlLabel:t,className:n}){const o=Zi(n,"block-editor-url-popover__link-viewer-url");return e?(0,$.jsx)(os.ExternalLink,{className:o,href:e,children:t||(0,fa.filterURLForDisplay)((0,fa.safeDecodeURI)(e))}):(0,$.jsx)("span",{className:o})}const{__experimentalPopoverLegacyPositionToPlacement:tM}=te(os.privateApis),nM=(0,a.forwardRef)((({additionalControls:e,children:t,renderSettings:n,placement:o,focusOnMount:r="firstElement",position:i,...s},l)=>{let c;void 0!==i&&y()("`position` prop in wp.blockEditor.URLPopover",{since:"6.2",alternative:"`placement` prop"}),void 0!==o?c=o:void 0!==i&&(c=tM(i)),c=c||"bottom";const[u,d]=(0,a.useState)(!1),p=!!n&&u;return(0,$.jsxs)(os.Popover,{ref:l,role:"dialog","aria-modal":"true","aria-label":(0,C.__)("Edit URL"),className:"block-editor-url-popover",focusOnMount:r,placement:c,shift:!0,variant:"toolbar",...s,children:[(0,$.jsx)("div",{className:"block-editor-url-popover__input-container",children:(0,$.jsxs)("div",{className:"block-editor-url-popover__row",children:[t,!!n&&(0,$.jsx)(os.Button,{className:"block-editor-url-popover__settings-toggle",icon:mC,label:(0,C.__)("Link settings"),onClick:()=>{d(!u)},"aria-expanded":u,size:"compact"})]})}),p&&(0,$.jsx)("div",{className:"block-editor-url-popover__settings",children:n()}),e&&!p&&(0,$.jsx)("div",{className:"block-editor-url-popover__additional-controls",children:e})]})}));nM.LinkEditor=function({autocompleteRef:e,className:t,onChangeInputValue:n,value:o,...r}){return(0,$.jsxs)("form",{className:Zi("block-editor-url-popover__link-editor",t),...r,children:[(0,$.jsx)(La,{value:o,onChange:n,autocompleteRef:e}),(0,$.jsx)(os.Button,{icon:ja,label:(0,C.__)("Apply"),type:"submit",size:"compact"})]})},nM.LinkViewer=function({className:e,linkClassName:t,onEditLinkClick:n,url:o,urlLabel:r,...i}){return(0,$.jsxs)("div",{className:Zi("block-editor-url-popover__link-viewer",e),...i,children:[(0,$.jsx)(eM,{url:o,urlLabel:r,className:t}),n&&(0,$.jsx)(os.Button,{icon:gc,label:(0,C.__)("Edit"),onClick:n,size:"compact"})]})};const oM=nM,rM=()=>{},iM=({src:e,onChange:t,onSubmit:n,onClose:o,popoverAnchor:r})=>(0,$.jsx)(oM,{anchor:r,onClose:o,children:(0,$.jsx)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:n,children:(0,$.jsx)(os.__experimentalInputControl,{__next40pxDefaultSize:!0,label:(0,C.__)("URL"),hideLabelFromVision:!0,placeholder:(0,C.__)("Paste or type URL"),onChange:t,value:e,suffix:(0,$.jsx)(os.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,$.jsx)(os.Button,{size:"small",icon:ja,label:(0,C.__)("Apply"),type:"submit"})})})})}),sM=({src:e,onChangeSrc:t,onSelectURL:n})=>{const[o,r]=(0,a.useState)(null),[i,s]=(0,a.useState)(!1),l=()=>{s(!1),o?.focus()};return(0,$.jsxs)("div",{className:"block-editor-media-placeholder__url-input-container",children:[(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,className:"block-editor-media-placeholder__button",onClick:()=>{s(!0)},isPressed:i,variant:"secondary","aria-haspopup":"dialog",ref:r,children:(0,C.__)("Insert from URL")}),i&&(0,$.jsx)(iM,{src:e,onChange:t,onSubmit:t=>{t.preventDefault(),e&&n&&(n(e),l())},onClose:l,popoverAnchor:o})]})};const lM=(0,os.withFilters)("editor.MediaPlaceholder")((function({value:e={},allowedTypes:t,className:n,icon:o,labels:r={},mediaPreview:i,notices:s,isAppender:u,accept:d,addToGallery:p,multiple:h=!1,handleUpload:g=!0,disableDropZone:m,disableMediaButtons:f,onError:b,onSelect:k,onCancel:v,onSelectURL:_,onToggleFeaturedImage:x,onDoubleClick:S,onFilesPreUpload:w=rM,onHTMLDrop:B,children:I,mediaLibraryButton:j,placeholder:E,style:T}){B&&y()("wp.blockEditor.MediaPlaceholder onHTMLDrop prop",{since:"6.2",version:"6.4"});const M=(0,c.useSelect)((e=>{const{getSettings:t}=e(li);return t().mediaUpload}),[]),[P,R]=(0,a.useState)("");(0,a.useEffect)((()=>{var t;R(null!==(t=e?.src)&&void 0!==t?t:"")}),[e?.src]);const N=n=>{if(!g||"function"==typeof g&&!g(n))return k(n);let o;if(w(n),h)if(p){let t=[];o=n=>{const o=(null!=e?e:[]).filter((e=>e.id?!t.some((({id:t})=>Number(t)===Number(e.id))):!t.some((({urlSlug:t})=>e.url.includes(t)))));k(o.concat(n)),t=n.map((e=>{const t=e.url.lastIndexOf("."),n=e.url.slice(0,t);return{id:e.id,urlSlug:n}}))}}else o=k;else o=([e])=>k(e);M({allowedTypes:t,filesList:n,onFileChange:o,onError:b})};async function L(e){const n=(0,l.pasteHandler)({HTML:e});return await async function(e){if(!e||!Array.isArray(e))return;const n=function e(t){return t.flatMap((t=>"core/image"!==t.name&&"core/audio"!==t.name&&"core/video"!==t.name||!t.attributes.url?e(t.innerBlocks):[t]))}(e);if(!n.length)return;const o=await Promise.all(n.map((e=>e.attributes.id?e.attributes:new Promise(((n,o)=>{window.fetch(e.attributes.url).then((e=>e.blob())).then((r=>M({filesList:[r],additionalData:{title:e.attributes.title,alt_text:e.attributes.alt,caption:e.attributes.caption},onFileChange:([e])=>{e.id&&n(e)},allowedTypes:t,onError:o}))).catch((()=>n(e.attributes.url)))}))))).catch((e=>b(e)));k(h?o:o[0])}(n)}const A=e=>{N(e.target.files)},D=null!=E?E:e=>{let{instructions:l,title:a}=r;if(M||_||(l=(0,C.__)("To edit this block, you need permission to upload media.")),void 0===l||void 0===a){const e=null!=t?t:[],[n]=e,o=1===e.length,r=o&&"audio"===n,i=o&&"image"===n,s=o&&"video"===n;void 0===l&&M&&(l=(0,C.__)("Upload a media file or pick one from your media library."),r?l=(0,C.__)("Upload or drag an audio file here, or pick one from your library."):i?l=(0,C.__)("Upload or drag an image file here, or pick one from your library."):s&&(l=(0,C.__)("Upload or drag a video file here, or pick one from your library."))),void 0===a&&(a=(0,C.__)("Media"),r?a=(0,C.__)("Audio"):i?a=(0,C.__)("Image"):s&&(a=(0,C.__)("Video")))}const c=Zi("block-editor-media-placeholder",n,{"is-appender":u});return(0,$.jsxs)(os.Placeholder,{icon:o,label:a,instructions:l,className:c,notices:s,onDoubleClick:S,preview:i,style:T,children:[e,I]})},O=()=>m?null:(0,$.jsx)(os.DropZone,{onFilesDrop:N,onHTMLDrop:L}),z=()=>v&&(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,className:"block-editor-media-placeholder__cancel-button",title:(0,C.__)("Cancel"),variant:"link",onClick:v,children:(0,C.__)("Cancel")}),V=()=>_&&(0,$.jsx)(sM,{src:P,onChangeSrc:R,onSelectURL:_}),F=()=>x&&(0,$.jsx)("div",{className:"block-editor-media-placeholder__url-input-container",children:(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,className:"block-editor-media-placeholder__button",onClick:x,variant:"secondary",children:(0,C.__)("Use featured image")})});return f?(0,$.jsx)(wa,{children:O()}):(0,$.jsx)(wa,{fallback:D(V()),children:(()=>{const n=null!=j?j:({open:e})=>(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{e()},children:(0,C.__)("Media Library")}),o=(0,$.jsx)(Sa,{addToGallery:p,gallery:h&&!(!t||0===t.length)&&t.every((e=>"image"===e||e.startsWith("image/"))),multiple:h,onSelect:k,allowedTypes:t,mode:"browse",value:Array.isArray(e)?e.map((({id:e})=>e)):e.id,render:n});if(M&&u)return(0,$.jsxs)($.Fragment,{children:[O(),(0,$.jsx)(os.FormFileUpload,{onChange:A,accept:d,multiple:!!h,render:({openFileDialog:e})=>{const t=(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,variant:"primary",className:Zi("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onClick:e,children:(0,C.__)("Upload")}),o,V(),F(),z()]});return D(t)}})]});if(M){const e=(0,$.jsxs)($.Fragment,{children:[O(),(0,$.jsx)(os.FormFileUpload,{render:({openFileDialog:e})=>(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,onClick:e,variant:"primary",className:Zi("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),children:(0,C.__)("Upload")}),onChange:A,accept:d,multiple:!!h}),o,V(),F(),z()]});return D(e)}return D(o)})()})})),aM=({colorSettings:e,...t})=>{const n=e.map((e=>{if(!e)return e;const{value:t,onChange:n,...o}=e;return{...o,colorValue:t,onColorChange:n}}));return(0,$.jsx)(fT,{settings:n,gradients:[],disableCustomGradients:!0,...t})},cM={placement:"bottom-start"},uM=()=>(0,$.jsxs)($.Fragment,{children:[["bold","italic","link","unknown"].map((e=>(0,$.jsx)(os.Slot,{name:`RichText.ToolbarControls.${e}`},e))),(0,$.jsx)(os.Slot,{name:"RichText.ToolbarControls",children:e=>{if(!e.length)return null;const t=e.map((([{props:e}])=>e)).some((({isActive:e})=>e));return(0,$.jsx)(os.ToolbarItem,{children:n=>(0,$.jsx)(os.DropdownMenu,{icon:mC,label:(0,C.__)("More"),toggleProps:{...n,className:Zi(n.className,{"is-pressed":t}),description:(0,C.__)("Displays more block tools")},controls:he(e.map((([{props:e}])=>e)),"title"),popoverProps:cM})})}})]});function dM({popoverAnchor:e}){return(0,$.jsx)(os.Popover,{placement:"top",focusOnMount:!1,anchor:e,className:"block-editor-rich-text__inline-format-toolbar",__unstableSlotName:"block-toolbar",children:(0,$.jsx)(vj,{className:"block-editor-rich-text__inline-format-toolbar-group","aria-label":(0,C.__)("Format tools"),children:(0,$.jsx)(os.ToolbarGroup,{children:(0,$.jsx)(uM,{})})})})}const pM=({inline:e,editableContentElement:t})=>e?(0,$.jsx)(dM,{popoverAnchor:t}):(0,$.jsx)(us,{group:"inline",children:(0,$.jsx)(uM,{})});function hM(e){return e(W.store).getFormatTypes()}const gM=new Set(["a","audio","button","details","embed","iframe","input","label","select","textarea","video"]);function mM(e,t){return"object"!=typeof e?{[t]:e}:Object.fromEntries(Object.entries(e).map((([e,n])=>[`${t}.${e}`,n])))}function fM(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)),{})}const bM=["`",'"',"'","“”","‘’"];function kM(e){let t=e.length;for(;t--;){const n=Ko(e[t].attributes);if(n)return e[t].attributes[n]=e[t].attributes[n].toString().replace(Wo,""),[e[t].clientId,n,0,0];const o=kM(e[t].innerBlocks);if(o)return o}return[]}function vM(e){if(!0===e||"p"===e||"li"===e)return!0===e?"p":e}function _M({allowedFormats:e,disableFormats:t}){return t?_M.EMPTY_ARRAY:e}_M.EMPTY_ARRAY=[];const xM=[e=>t=>{function n(n){const{inputType:o,data:r}=n,{value:i,onChange:s,registry:l}=e.current;if("insertText"!==o)return;if((0,W.isCollapsed)(i))return;const a=(0,d.applyFilters)("blockEditor.wrapSelectionSettings",bM).find((([e,t])=>e===r||t===r));if(!a)return;const[c,u=c]=a,p=i.start,h=i.end+c.length;let g=(0,W.insert)(i,c,p,p);g=(0,W.insert)(g,u,h,h);const{__unstableMarkLastChangeAsPersistent:m,__unstableMarkAutomaticChange:f}=l.dispatch(li);m(),s(g),f();const b={};for(const e in n)b[e]=n[e];b.data=u;const{ownerDocument:k}=t,{defaultView:v}=k,_=new v.InputEvent("input",b);window.queueMicrotask((()=>{n.target.dispatchEvent(_)})),n.preventDefault()}return t.addEventListener("beforeinput",n),()=>{t.removeEventListener("beforeinput",n)}},e=>t=>{function n(){const{getValue:t,onReplace:n,selectionChange:o,registry:r}=e.current;if(!n)return;const i=t(),{start:s,text:a}=i;if(" "!==a.slice(s-1,s))return;const c=a.slice(0,s).trim(),u=(0,l.getBlockTransforms)("from").filter((({type:e})=>"prefix"===e)),d=(0,l.findTransform)(u,(({prefix:e})=>c===e));if(!d)return;const p=(0,W.toHTMLString)({value:(0,W.insert)(i,Wo,0,s)}),h=d.transform(p);return o(...kM([h])),n([h]),r.dispatch(li).__unstableMarkAutomaticChange(),!0}function o(t){const{inputType:o,type:r}=t,{getValue:i,onChange:s,__unstableAllowPrefixTransformations:l,formatTypes:a,registry:c}=e.current;if("insertText"!==o&&"compositionend"!==r)return;if(l&&n())return;const u=i(),d=a.reduce(((e,{__unstableInputRule:t})=>(t&&(e=t(e)),e)),function(e){const t="tales of gutenberg",{start:n,text:o}=e;return n<18||o.slice(n-18,n).toLowerCase()!==t?e:(0,W.insert)(e," 🐡🐢🦀🐤🦋🐘🐧🐹🦁🦄🦍🐼🐿🎃🐴🐝🐆🦕🦔🌱🍇π🍌🐉💧🥨🌌🍂🍠🥦🥚🥝🎟🥥🥒🛵🥖🍒🍯🎾🎲🐺🐚🐮⌛️")}(u)),{__unstableMarkLastChangeAsPersistent:p,__unstableMarkAutomaticChange:h}=c.dispatch(li);d!==u&&(p(),s({...d,activeFormats:u.activeFormats}),h())}return t.addEventListener("input",o),t.addEventListener("compositionend",o),()=>{t.removeEventListener("input",o),t.removeEventListener("compositionend",o)}},e=>t=>{function n(t){if("insertReplacementText"!==t.inputType)return;const{registry:n}=e.current;n.dispatch(li).__unstableMarkLastChangeAsPersistent()}return t.addEventListener("beforeinput",n),()=>{t.removeEventListener("beforeinput",n)}},()=>e=>{function t(e){(va.isKeyboardEvent.primary(e,"z")||va.isKeyboardEvent.primary(e,"y")||va.isKeyboardEvent.primaryShift(e,"z"))&&e.preventDefault()}return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}},e=>t=>{const{keyboardShortcuts:n}=e.current;function o(e){for(const t of n.current)t(e)}return t.addEventListener("keydown",o),()=>{t.removeEventListener("keydown",o)}},e=>t=>{const{inputEvents:n}=e.current;function o(e){for(const t of n.current)t(e)}return t.addEventListener("input",o),()=>{t.removeEventListener("input",o)}},e=>t=>{function n(t){const{keyCode:n}=t;if(t.defaultPrevented)return;if(n!==va.BACKSPACE&&n!==va.ESCAPE)return;const{registry:o}=e.current,{didAutomaticChange:r,getSettings:i}=o.select(li),{__experimentalUndo:s}=i();s&&r()&&(t.preventDefault(),s())}return t.addEventListener("keydown",n),()=>{t.removeEventListener("keydown",n)}},e=>t=>{function n(n){const{disableFormats:o,onChange:r,value:i,formatTypes:s,tagName:a,onReplace:c,__unstableEmbedURLOnPaste:u,preserveWhiteSpace:d,pastePlainText:p}=e.current;if(!t.contains(n.target))return;if(n.defaultPrevented)return;const{plainText:h,html:g}=yy(n);if(n.preventDefault(),window.console.log("Received HTML:\n\n",g),window.console.log("Received plain text:\n\n",h),o)return void r((0,W.insert)(i,h));function m(e){const t=s.reduce(((e,{__unstablePasteRule:t})=>(t&&e===i&&(e=t(i,{html:g,plainText:h})),e)),i);if(t!==i)r(t);else{const t=(0,W.create)({html:e});!function(e,t){if(t?.length){let n=e.formats.length;for(;n--;)e.formats[n]=[...t,...e.formats[n]||[]]}}(t,i.activeFormats),r((0,W.insert)(i,t))}}if("true"===n.clipboardData.getData("rich-text"))return void m(g);if(p)return void r((0,W.insert)(i,(0,W.create)({text:h})));let f="INLINE";const b=h.trim();u&&(0,W.isEmpty)(i)&&(0,fa.isURL)(b)&&/^https?:/.test(b)&&(f="BLOCKS");const k=(0,l.pasteHandler)({HTML:g,plainText:h,mode:f,tagName:a,preserveWhiteSpace:d});"string"==typeof k?m(k):k.length>0&&c&&(0,W.isEmpty)(i)&&c(k,k.length-1,-1)}const{defaultView:o}=t.ownerDocument;return o.addEventListener("paste",n),()=>{o.removeEventListener("paste",n)}},e=>t=>{function n(t){const{keyCode:n}=t;if(t.defaultPrevented)return;const{value:o,onMerge:r,onRemove:i}=e.current;if(n===va.DELETE||n===va.BACKSPACE){const{start:e,end:s,text:l}=o,a=n===va.BACKSPACE,c=o.activeFormats&&!!o.activeFormats.length;if(!(0,W.isCollapsed)(o)||c||a&&0!==e||!a&&s!==l.length)return;r?r(!a):i&&(0,W.isEmpty)(o)&&a&&i(!a),t.preventDefault()}}return t.addEventListener("keydown",n),()=>{t.removeEventListener("keydown",n)}},e=>t=>{function n(t){if(t.keyCode!==va.ENTER)return;const{onReplace:n,onSplit:o}=e.current;n&&o&&(t.__deprecatedOnSplit=!0)}function o(n){if(n.defaultPrevented)return;if(n.target!==t)return;if(n.keyCode!==va.ENTER)return;const{value:o,onChange:r,disableLineBreaks:i,onSplitAtEnd:s,onSplitAtDoubleLineEnd:l,registry:a}=e.current;n.preventDefault();const{text:c,start:u,end:d}=o;n.shiftKey?i||r((0,W.insert)(o,"\n")):s&&u===d&&d===c.length?s():l&&u===d&&d===c.length&&"\n\n"===c.slice(-2)?a.batch((()=>{const e={...o};e.start=e.end-2,r((0,W.remove)(e)),l()})):i||r((0,W.insert)(o,"\n"))}const{defaultView:r}=t.ownerDocument;return r.addEventListener("keydown",o),t.addEventListener("keydown",n),()=>{r.removeEventListener("keydown",o),t.removeEventListener("keydown",n)}},e=>t=>{function n(){const{registry:n}=e.current;if(!n.select(li).isMultiSelecting())return;const o=t.parentElement.closest('[contenteditable="true"]');o&&o.focus()}return t.addEventListener("focus",n),()=>{t.removeEventListener("focus",n)}}];function yM(e){const t=(0,a.useRef)(e);t.current=e;const n=(0,a.useMemo)((()=>xM.map((e=>e(t)))),[t]);return(0,u.useRefEffect)((t=>{if(!e.isSelected)return;const o=n.map((e=>e(t)));return()=>{o.forEach((e=>e()))}}),[n,e.isSelected])}const SM={},wM=Symbol("usesContext");function CM({onChange:e,onFocus:t,value:n,forwardedRef:o,settings:r}){const{name:i,edit:s,[wM]:l}=r,c=(0,a.useContext)(ob),u=(0,a.useMemo)((()=>l?Object.fromEntries(Object.entries(c).filter((([e])=>l.includes(e)))):SM),[l,c]);if(!s)return null;const d=(0,W.getActiveFormat)(n,i),p=void 0!==d,h=(0,W.getActiveObject)(n),g=void 0!==h&&h.type===i;return(0,$.jsx)(s,{isActive:p,activeAttributes:p&&d.attributes||{},isObjectActive:g,activeObjectAttributes:g&&h.attributes||{},value:n,onChange:e,onFocus:t,contentRef:o,context:u},i)}function BM({formatTypes:e,...t}){return e.map((e=>(0,Pa.createElement)(CM,{settings:e,...t,key:e.name})))}function IM(e,t){if(OM.isEmpty(e)){const e=vM(t);return e?`<${e}></${e}>`:""}return Array.isArray(e)?(y()("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/"}),l.children.toHTML(e)):"string"==typeof e?e:e.toHTMLString()}function jM({value:e,tagName:t,multiline:n,format:o,...r}){return e=(0,$.jsx)(a.RawHTML,{children:IM(e,n)}),t?(0,$.jsx)(t,{...r,children:e}):e}const EM=(0,a.forwardRef)((function({children:e,identifier:t,tagName:n="div",value:o="",onChange:r,multiline:i,...s},l){y()("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{clientId:a}=_(),{getSelectionStart:u,getSelectionEnd:d}=(0,c.useSelect)(li),{selectionChange:p}=(0,c.useDispatch)(li),h=vM(i),g=`</${h}>${o=o||`<${h}></${h}>`}<${h}>`.split(`</${h}><${h}>`);function m(e){r(`<${h}>${e.join(`</${h}><${h}>`)}</${h}>`)}return g.shift(),g.pop(),(0,$.jsx)(n,{ref:l,children:g.map(((e,n)=>(0,$.jsx)(NM,{identifier:`${t}-${n}`,tagName:h,value:e,onChange:e=>{const t=g.slice();t[n]=e,m(t)},isSelected:void 0,onKeyDown:o=>{if(o.keyCode!==va.ENTER)return;o.preventDefault();const{offset:r}=u(),{offset:i}=d();if("number"!=typeof r||"number"!=typeof i)return;const s=(0,W.create)({html:e});s.start=r,s.end=i;const l=(0,W.split)(s).map((e=>(0,W.toHTMLString)({value:e}))),c=g.slice();c.splice(n,1,...l),m(c),p(a,`${t}-${n+1}`,0,0)},onMerge:e=>{const o=g.slice();let r=0;if(e){if(!o[n+1])return;o.splice(n,2,o[n]+o[n+1]),r=o[n].length-1}else{if(!o[n-1])return;o.splice(n-1,2,o[n-1]+o[n]),r=o[n-1].length-1}m(o),p(a,`${t}-${n-(e?0:1)}`,r,r)},...s},n)))})}));const TM=(0,a.createContext)(),MM=(0,a.createContext)(),PM=Symbol("instanceId");function RM(e){const{__unstableMobileNoFocusOnMount:t,deleteEnter:n,placeholderTextColor:o,textAlign:r,selectionColor:i,tagsToEliminate:s,disableEditingMenu:l,fontSize:a,fontFamily:c,fontWeight:u,fontStyle:d,minWidth:p,maxWidth:h,disableSuggestions:g,disableAutocorrection:m,...f}=e;return f}function NM({children:e,tagName:t="div",value:n="",onChange:o,isSelected:r,multiline:i,inlineToolbar:s,wrapperClassName:d,autocompleters:p,onReplace:h,placeholder:g,allowedFormats:f,withoutInteractiveFormatting:b,onRemove:k,onMerge:v,onSplit:x,__unstableOnSplitAtEnd:S,__unstableOnSplitAtDoubleLineEnd:w,identifier:B,preserveWhiteSpace:I,__unstablePastePlainText:j,__unstableEmbedURLOnPaste:E,__unstableDisableFormats:T,disableLineBreaks:M,__unstableAllowPrefixTransformations:P,readOnly:R,...N},L){N=RM(N),x&&y()("wp.blockEditor.RichText onSplit prop",{since:"6.4",alternative:'block.json support key: "splitting"'});const A=(0,u.useInstanceId)(NM),D=(0,a.useRef)(),O=_(),{clientId:z,isSelected:V,name:F}=O,H=O[m],G=(0,a.useContext)(ob),U=(0,c.useRegistry)(),{selectionStart:K,selectionEnd:Z,isSelected:q}=(0,c.useSelect)((e=>{if(!V)return{isSelected:!1};const{getSelectionStart:t,getSelectionEnd:n}=e(li),o=t(),i=n();let s;return void 0===r?s=o.clientId===z&&i.clientId===z&&(B?o.attributeKey===B:o[PM]===A):r&&(s=o.clientId===z),{selectionStart:s?o.offset:void 0,selectionEnd:s?i.offset:void 0,isSelected:s}}),[z,B,A,r,V]),{disableBoundBlock:Y,bindingsPlaceholder:X,bindingsLabel:Q}=(0,c.useSelect)((e=>{var t;if(!H?.[B]||!ix(F))return{};const o=H[B],r=(0,l.getBlockBindingsSource)(o.source),i={};if(r?.usesContext?.length)for(const e of r.usesContext)i[e]=G[e];const s=!r?.canUserEditValue?.({select:e,context:i,args:o.args});if(n.length>0)return{disableBoundBlock:s,bindingsPlaceholder:null,bindingsLabel:null};const{getBlockAttributes:a}=e(li),c=a(z),u=r?.getFieldsList?.({select:e,context:i}),d=null!==(t=u?.[o?.args?.key]?.label)&&void 0!==t?t:r?.label,p=s?d:(0,C.sprintf)((0,C.__)("Add %s"),d),h=s?o?.args?.key||r?.label:(0,C.sprintf)((0,C.__)("Empty %s; start writing to edit its value"),o?.args?.key||r?.label);return{disableBoundBlock:s,bindingsPlaceholder:c?.placeholder||p,bindingsLabel:h}}),[H,B,F,G,n]),J=R||Y,{getSelectionStart:ee,getSelectionEnd:te,getBlockRootClientId:ne}=(0,c.useSelect)(li),{selectionChange:oe}=(0,c.useDispatch)(li),re=_M({allowedFormats:f,disableFormats:T}),ie=!re||re.length>0,se=(0,a.useCallback)(((e,t)=>{const n={},o=void 0===e&&void 0===t,r={clientId:z,[B?"attributeKey":PM]:B||A};if("number"==typeof e||o){if(void 0===t&&ne(z)!==ne(te().clientId))return;n.start={...r,offset:e}}if("number"==typeof t||o){if(void 0===e&&ne(z)!==ne(ee().clientId))return;n.end={...r,offset:t}}oe(n)}),[z,ne,te,ee,B,A,oe]),{formatTypes:le,prepareHandlers:ae,valueHandlers:ce,changeHandlers:ue,dependencies:de}=function({clientId:e,identifier:t,withoutInteractiveFormatting:n,allowedFormats:o}){const r=(0,c.useSelect)(hM,[]),i=(0,a.useMemo)((()=>r.filter((({name:e,interactive:t,tagName:r})=>!(o&&!o.includes(e)||n&&(t||gM.has(r)))))),[r,o,n]),s=(0,c.useSelect)((n=>i.reduce(((o,r)=>r.__experimentalGetPropsForEditableTreePreparation?{...o,...mM(r.__experimentalGetPropsForEditableTreePreparation(n,{richTextIdentifier:t,blockClientId:e}),r.name)}:o),{})),[i,e,t]),l=(0,c.useDispatch)(),u=[],d=[],p=[],h=[];for(const e in s)h.push(s[e]);return i.forEach((n=>{if(n.__experimentalCreatePrepareEditableTree){const o=n.__experimentalCreatePrepareEditableTree(fM(s,n.name),{richTextIdentifier:t,blockClientId:e});n.__experimentalCreateOnChangeEditableValue?d.push(o):u.push(o)}if(n.__experimentalCreateOnChangeEditableValue){let o={};n.__experimentalGetPropsForEditableTreeChangeHandler&&(o=n.__experimentalGetPropsForEditableTreeChangeHandler(l,{richTextIdentifier:t,blockClientId:e}));const r=fM(s,n.name);p.push(n.__experimentalCreateOnChangeEditableValue({..."object"==typeof r?r:{},...o},{richTextIdentifier:t,blockClientId:e}))}})),{formatTypes:i,prepareHandlers:u,valueHandlers:d,changeHandlers:p,dependencies:h}}({clientId:z,identifier:B,withoutInteractiveFormatting:b,allowedFormats:re});function pe(e){return le.forEach((t=>{t.__experimentalCreatePrepareEditableTree&&(e=(0,W.removeFormat)(e,t.name,0,e.text.length))})),e.formats}const{value:he,getValue:ge,onChange:me,ref:fe}=(0,W.__unstableUseRichText)({value:n,onChange(e,{__unstableFormats:t,__unstableText:n}){o(e),Object.values(ue).forEach((e=>{e(t,n)}))},selectionStart:K,selectionEnd:Z,onSelectionChange:se,placeholder:X||g,__unstableIsSelected:q,__unstableDisableFormats:T,preserveWhiteSpace:I,__unstableDependencies:[...de,t],__unstableAfterParse:function(e){return ce.reduce(((t,n)=>n(t,e.text)),e.formats)},__unstableBeforeSerialize:pe,__unstableAddInvisibleFormats:function(e){return ae.reduce(((t,n)=>n(t,e.text)),e.formats)}}),be=function(e){return(0,os.__unstableUseAutocompleteProps)({...e,completers:dB(e)})}({onReplace:h,completers:p,record:he,onChange:me});!function({html:e,value:t}){const n=(0,a.useRef)(),o=!!t.activeFormats?.length,{__unstableMarkLastChangeAsPersistent:r}=(0,c.useDispatch)(li);(0,a.useLayoutEffect)((()=>{if(n.current){if(n.current!==t.text){const e=window.setTimeout((()=>{r()}),1e3);return n.current=t.text,()=>{window.clearTimeout(e)}}r()}else n.current=t.text}),[e,o])}({html:n,value:he});const ke=(0,a.useRef)(new Set),ve=(0,a.useRef)(new Set);function _e(){D.current?.focus()}const xe=t;return(0,$.jsxs)($.Fragment,{children:[q&&(0,$.jsx)(TM.Provider,{value:ke,children:(0,$.jsx)(MM.Provider,{value:ve,children:(0,$.jsxs)(os.Popover.__unstableSlotNameProvider,{value:"__unstable-block-tools-after",children:[e&&e({value:he,onChange:me,onFocus:_e}),(0,$.jsx)(BM,{value:he,onChange:me,onFocus:_e,formatTypes:le,forwardedRef:D})]})})}),q&&ie&&(0,$.jsx)(pM,{inline:s,editableContentElement:D.current}),(0,$.jsx)(xe,{role:"textbox","aria-multiline":!M,"aria-readonly":J,...N,"aria-label":Q||N["aria-label"]||g,...be,ref:(0,u.useMergeRefs)([fe,L,be.ref,N.ref,yM({registry:U,getValue:ge,onChange:me,__unstableAllowPrefixTransformations:P,formatTypes:le,onReplace:h,selectionChange:oe,isSelected:q,disableFormats:T,value:he,tagName:t,onSplit:x,__unstableEmbedURLOnPaste:E,pastePlainText:j,onMerge:v,onRemove:k,removeEditorOnlyFormats:pe,disableLineBreaks:M,onSplitAtEnd:S,onSplitAtDoubleLineEnd:w,keyboardShortcuts:ke,inputEvents:ve}),D]),contentEditable:!J,suppressContentEditableWarning:!0,className:Zi("block-editor-rich-text__editable",N.className,"rich-text"),tabIndex:0!==N.tabIndex||J?N.tabIndex:null,"data-wp-block-attribute-key":B})]})}const LM=(AM=(0,a.forwardRef)(NM),(0,a.forwardRef)(((e,t)=>{let n=e.value,o=e.onChange;Array.isArray(n)&&(y()("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/"}),n=l.children.toHTML(e.value),o=t=>e.onChange(l.children.fromDOM((0,W.__unstableCreateElement)(document,t).childNodes)));const r=e.multiline?EM:AM;return(0,$.jsx)(r,{...e,value:n,onChange:o,ref:t})})));var AM;LM.Content=jM,LM.isEmpty=e=>!e||0===e.length;const DM=(0,a.forwardRef)(((e,t)=>{if(_()[f]){const{children:t,tagName:n="div",value:o,onChange:r,isSelected:i,multiline:s,inlineToolbar:l,wrapperClassName:a,autocompleters:c,onReplace:u,placeholder:d,allowedFormats:p,withoutInteractiveFormatting:h,onRemove:g,onMerge:m,onSplit:f,__unstableOnSplitAtEnd:b,__unstableOnSplitAtDoubleLineEnd:k,identifier:v,preserveWhiteSpace:_,__unstablePastePlainText:x,__unstableEmbedURLOnPaste:y,__unstableDisableFormats:S,disableLineBreaks:w,__unstableAllowPrefixTransformations:C,readOnly:B,...I}=RM(e);return(0,$.jsx)(n,{...I,dangerouslySetInnerHTML:{__html:IM(o,s)}})}return(0,$.jsx)(LM,{ref:t,...e,readOnly:!1})}));DM.Content=jM,DM.isEmpty=e=>!e||0===e.length;const OM=DM,zM=(0,a.forwardRef)(((e,t)=>(0,$.jsx)(OM,{ref:t,...e,__unstableDisableFormats:!0})));zM.Content=({value:e="",tagName:t="div",...n})=>(0,$.jsx)(t,{...n,children:e});const VM=zM,FM=(0,a.forwardRef)((({__experimentalVersion:e,...t},n)=>{if(2===e)return(0,$.jsx)(VM,{ref:n,...t});const{className:o,onChange:r,...i}=t;return(0,$.jsx)(xb.A,{ref:n,className:Zi("block-editor-plain-text",o),onChange:e=>r(e.target.value),...i})}));function HM({property:e,viewport:t,desc:n}){const o=(0,u.useInstanceId)(HM),r=n||(0,C.sprintf)((0,C._x)("Controls the %1$s property for %2$s viewports.","Text labelling a interface as controlling a given layout property (eg: margin) for a given screen size."),e,t.label);return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)("span",{"aria-describedby":`rbc-desc-${o}`,children:t.label}),(0,$.jsx)(os.VisuallyHidden,{as:"span",id:`rbc-desc-${o}`,children:r})]})}const GM=function(e){const{title:t,property:n,toggleLabel:o,onIsResponsiveChange:r,renderDefaultControl:i,renderResponsiveControls:s,isResponsive:l=!1,defaultLabel:c={id:"all",label:(0,C._x)("All","screen sizes")},viewports:u=[{id:"small",label:(0,C.__)("Small screens")},{id:"medium",label:(0,C.__)("Medium screens")},{id:"large",label:(0,C.__)("Large screens")}]}=e;if(!t||!n||!i)return null;const d=o||(0,C.sprintf)((0,C.__)("Use the same %s on all screen sizes."),n),p=(0,C.__)("Toggle between using the same value for all screen sizes or using a unique value per screen size."),h=i((0,$.jsx)(HM,{property:n,viewport:c}),c);return(0,$.jsxs)("fieldset",{className:"block-editor-responsive-block-control",children:[(0,$.jsx)("legend",{className:"block-editor-responsive-block-control__title",children:t}),(0,$.jsxs)("div",{className:"block-editor-responsive-block-control__inner",children:[(0,$.jsx)(os.ToggleControl,{__nextHasNoMarginBottom:!0,className:"block-editor-responsive-block-control__toggle",label:d,checked:!l,onChange:r,help:p}),(0,$.jsxs)("div",{className:Zi("block-editor-responsive-block-control__group",{"is-responsive":l}),children:[!l&&h,l&&(s?s(u):u.map((e=>(0,$.jsx)(a.Fragment,{children:i((0,$.jsx)(HM,{property:n,viewport:e}),e)},e.id))))]})]})]})};function $M({character:e,type:t,onUse:n}){const o=(0,a.useContext)(TM),r=(0,a.useRef)();return r.current=n,(0,a.useEffect)((()=>{function n(n){va.isKeyboardEvent[t](n,e)&&(r.current(),n.preventDefault())}return o.current.add(n),()=>{o.current.delete(n)}}),[e,t]),null}function UM({name:e,shortcutType:t,shortcutCharacter:n,...o}){let r,i="RichText.ToolbarControls";return e&&(i+=`.${e}`),t&&n&&(r=va.displayShortcut[t](n)),(0,$.jsx)(os.Fill,{name:i,children:(0,$.jsx)(os.ToolbarButton,{...o,shortcut:r})})}function WM({inputType:e,onInput:t}){const n=(0,a.useContext)(MM),o=(0,a.useRef)();return o.current=t,(0,a.useEffect)((()=>{function t(t){t.inputType===e&&(o.current(),t.preventDefault())}return n.current.add(t),()=>{n.current.delete(t)}}),[e]),null}const KM=(0,$.jsx)(os.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:(0,$.jsx)(os.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"})});const ZM=(0,a.forwardRef)((function(e,t){const n=(0,c.useSelect)((e=>e(li).__unstableGetEditorMode()),[]),{resetZoomLevel:o,__unstableSetEditorMode:r}=te((0,c.useDispatch)(li));return(0,$.jsx)(os.Dropdown,{renderToggle:({isOpen:o,onToggle:r})=>(0,$.jsx)(os.Button,{size:"compact",...e,ref:t,icon:"navigation"===n?KM:gc,"aria-expanded":o,"aria-haspopup":"true",onClick:r,label:(0,C.__)("Tools")}),popoverProps:{placement:"bottom-start"},renderContent:()=>(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(os.NavigableMenu,{role:"menu","aria-label":(0,C.__)("Tools"),children:(0,$.jsx)(os.MenuItemsChoice,{value:"navigation"===n?"navigation":"edit",onSelect:e=>{o(),r(e)},choices:[{value:"edit",label:(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(hl,{icon:gc}),(0,C.__)("Edit")]})},{value:"navigation",label:(0,$.jsxs)($.Fragment,{children:[KM,(0,C.__)("Select")]})}]})}),(0,$.jsx)("div",{className:"block-editor-tool-selector__help",children:(0,C.__)("Tools provide different interactions for selecting, navigating, and editing blocks. Toggle between select and edit by pressing Escape and Enter.")})]})})}));function qM({units:e,...t}){const[n]=ci("spacing.units"),o=(0,os.__experimentalUseCustomUnits)({availableUnits:n||["%","px","em","rem","vw"],units:e});return(0,$.jsx)(os.__experimentalUnitControl,{units:o,...t})}const YM=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"})});class XM 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,C.__)("Edit link"):(0,C.__)("Insert link");return(0,$.jsxs)("div",{className:"block-editor-url-input__button",children:[(0,$.jsx)(os.Button,{size:"compact",icon:od,label:o,onClick:this.toggle,className:"components-toolbar__control",isPressed:!!e}),n&&(0,$.jsx)("form",{className:"block-editor-url-input__button-modal",onSubmit:this.submitLink,children:(0,$.jsxs)("div",{className:"block-editor-url-input__button-modal-line",children:[(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,className:"block-editor-url-input__back",icon:YM,label:(0,C.__)("Close"),onClick:this.toggle}),(0,$.jsx)(La,{value:e||"",onChange:t,suffix:(0,$.jsx)(os.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,$.jsx)(os.Button,{size:"small",icon:ja,label:(0,C.__)("Submit"),type:"submit"})})})]})})]})}}const QM=XM,JM=(0,$.jsx)(G.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,$.jsx)(G.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 4.5h14c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V5c-.1-.3.1-.5.4-.5zm14 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z"})}),eP="none",tP="custom",nP="media",oP="attachment",rP=["noreferrer","noopener"],iP=({linkDestination:e,onChangeUrl:t,url:n,mediaType:o="image",mediaUrl:r,mediaLink:i,linkTarget:s,linkClass:l,rel:c,showLightboxSetting:u,lightboxEnabled:d,onSetLightbox:p,resetLightbox:h})=>{const[g,m]=(0,a.useState)(!1),[f,b]=(0,a.useState)(null),[k,v]=(0,a.useState)(!1),[_,x]=(0,a.useState)(null),y=(0,a.useRef)(null),S=(0,a.useRef)();(0,a.useEffect)((()=>{if(!S.current)return;(ba.focus.focusable.find(S.current)[0]||S.current).focus()}),[k,n,d]);const w=()=>{e!==nP&&e!==oP||x(""),v(!0)},B=()=>{v(!1)},I=()=>{const e=[{linkDestination:nP,title:(0,C.__)("Link to image file"),url:"image"===o?r:void 0,icon:JM}];return"image"===o&&i&&e.push({linkDestination:oP,title:(0,C.__)("Link to attachment page"),url:"image"===o?i:void 0,icon:za}),e},j=(0,$.jsxs)(os.__experimentalVStack,{spacing:"3",children:[(0,$.jsx)(os.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,C.__)("Open in new tab"),onChange:e=>{const n=(e=>{const t=e?"_blank":void 0;let n;if(t){const e=(null!=c?c:"").split(" ");rP.forEach((t=>{e.includes(t)||e.push(t)})),n=e.join(" ")}else{const e=(null!=c?c:"").split(" ").filter((e=>!1===rP.includes(e)));n=e.length?e.join(" "):void 0}return{linkTarget:t,rel:n}})(e);t(n)},checked:"_blank"===s}),(0,$.jsx)(os.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,C.__)("Link rel"),value:null!=c?c:"",onChange:e=>{t({rel:e})}}),(0,$.jsx)(os.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,C.__)("Link CSS class"),value:l||"",onChange:e=>{t({linkClass:e})}})]}),E=null!==_?_:n,T=!d||d&&!u,M=!E&&T,P=(I().find((t=>t.linkDestination===e))||{}).title;return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(os.ToolbarButton,{icon:od,className:"components-toolbar__control",label:(0,C.__)("Link"),"aria-expanded":g,onClick:()=>{m(!0)},ref:b,isActive:!!n||d&&u}),g&&(0,$.jsx)(oM,{ref:S,anchor:f,onFocusOutside:e=>{const t=y.current;t&&t.contains(e.target)||(m(!1),x(null),B())},onClose:()=>{x(null),B(),m(!1)},renderSettings:T?()=>j:null,additionalControls:M&&(0,$.jsxs)(os.NavigableMenu,{children:[I().map((e=>(0,$.jsx)(os.MenuItem,{icon:e.icon,iconPosition:"left",onClick:()=>{x(null),(e=>{const n=I();let o;o=e?(n.find((t=>t.url===e))||{linkDestination:tP}).linkDestination:eP,t({linkDestination:o,href:e})})(e.url),B()},children:e.title},e.linkDestination))),u&&(0,$.jsx)(os.MenuItem,{className:"block-editor-url-popover__expand-on-click",icon:hB,info:(0,C.__)("Scale the image with a lightbox effect."),iconPosition:"left",onClick:()=>{x(null),t({linkDestination:eP,href:""}),p?.(!0),B()},children:(0,C.__)("Expand on click")},"expand-on-click")]}),offset:13,children:d&&u&&!n&&!k?(0,$.jsxs)("div",{className:"block-editor-url-popover__expand-on-click",children:[(0,$.jsx)(hl,{icon:hB}),(0,$.jsxs)("div",{className:"text",children:[(0,$.jsx)("p",{children:(0,C.__)("Expand on click")}),(0,$.jsx)("p",{className:"description",children:(0,C.__)("Scales the image with a lightbox effect")})]}),(0,$.jsx)(os.Button,{icon:mc,label:(0,C.__)("Disable expand on click"),onClick:()=>{p?.(!1)},size:"compact"})]}):!n||k?(0,$.jsx)(oM.LinkEditor,{className:"block-editor-format-toolbar__link-container-content",value:E,onChangeInputValue:x,onSubmit:e=>{if(_){const e=I().find((e=>e.url===_))?.linkDestination||tP;t({href:_,linkDestination:e,lightbox:{enabled:!1}})}B(),x(null),e.preventDefault()},autocompleteRef:y}):n&&!k?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(oM.LinkViewer,{className:"block-editor-format-toolbar__link-container-content",url:n,onEditLinkClick:w,urlLabel:P}),(0,$.jsx)(os.Button,{icon:mc,label:(0,C.__)("Remove link"),onClick:()=>{t({linkDestination:eP,href:""}),h?.()},size:"compact"})]}):void 0})]})};function sP(){return y()("wp.blockEditor.PreviewOptions",{version:"6.5"}),null}function lP(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<t?n:t};return(e=>{const t="Mobile"===e?"768px":"1024px",n="40px",r="auto";switch(e){case"Tablet":case"Mobile":return{width:o(e),marginTop:n,marginBottom:n,marginLeft:r,marginRight:r,height:t,overflowY:"auto"};default:return{marginLeft:r,marginRight:r}}})(e)}function aP(){const e=(0,c.useSelect)((e=>e(li).getBlockSelectionStart()),[]),t=(0,a.useRef)();kp(e,t);return e?(0,$.jsx)(os.Button,{__next40pxDefaultSize:!0,variant:"secondary",className:"block-editor-skip-to-selected-block",onClick:()=>{t.current?.focus()},children:(0,C.__)("Skip to the selected block")}):null}const cP=window.wp.wordcount;function uP(){const{blocks:e}=(0,c.useSelect)((e=>{const{getMultiSelectedBlocks:t}=e(li);return{blocks:t()}}),[]),t=(0,cP.count)((0,l.serialize)(e),"words");return(0,$.jsxs)("div",{className:"block-editor-multi-selection-inspector__card",children:[(0,$.jsx)(Uf,{icon:$B,showColors:!0}),(0,$.jsxs)("div",{className:"block-editor-multi-selection-inspector__card-content",children:[(0,$.jsx)("div",{className:"block-editor-multi-selection-inspector__card-title",children:(0,C.sprintf)((0,C._n)("%d Block","%d Blocks",e.length),e.length)}),(0,$.jsx)("div",{className:"block-editor-multi-selection-inspector__card-description",children:(0,C.sprintf)((0,C._n)("%d word selected.","%d words selected.",t),t)})]})]})}const dP=(0,$.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(G.Path,{fillRule:"evenodd",d:"M10.289 4.836A1 1 0 0111.275 4h1.306a1 1 0 01.987.836l.244 1.466c.787.26 1.503.679 2.108 1.218l1.393-.522a1 1 0 011.216.437l.653 1.13a1 1 0 01-.23 1.273l-1.148.944a6.025 6.025 0 010 2.435l1.149.946a1 1 0 01.23 1.272l-.653 1.13a1 1 0 01-1.216.437l-1.394-.522c-.605.54-1.32.958-2.108 1.218l-.244 1.466a1 1 0 01-.987.836h-1.306a1 1 0 01-.986-.836l-.244-1.466a5.995 5.995 0 01-2.108-1.218l-1.394.522a1 1 0 01-1.217-.436l-.653-1.131a1 1 0 01.23-1.272l1.149-.946a6.026 6.026 0 010-2.435l-1.148-.944a1 1 0 01-.23-1.272l.653-1.131a1 1 0 011.217-.437l1.393.522a5.994 5.994 0 012.108-1.218l.244-1.466zM14.929 12a3 3 0 11-6 0 3 3 0 016 0z",clipRule:"evenodd"})}),pP=(0,$.jsx)(G.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,$.jsx)(G.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M20 12a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-1.5 0a6.5 6.5 0 0 1-6.5 6.5v-13a6.5 6.5 0 0 1 6.5 6.5Z"})}),hP={name:"settings",title:(0,C.__)("Settings"),value:"settings",icon:dP,className:"block-editor-block-inspector__tab-item"},gP={name:"styles",title:(0,C.__)("Styles"),value:"styles",icon:pP,className:"block-editor-block-inspector__tab-item"},mP={name:"list",title:(0,C.__)("List View"),value:"list-view",icon:Yj,className:"block-editor-block-inspector__tab-item"},fP=()=>{const e=(0,os.__experimentalUseSlotFills)(ga.slotName);return Boolean(e&&e.length)?(0,$.jsx)(os.PanelBody,{className:"block-editor-block-inspector__advanced",title:(0,C.__)("Advanced"),initialOpen:!1,children:(0,$.jsx)(ma.Slot,{group:"advanced"})}):null},bP=()=>{const[e,t]=(0,a.useState)(),{multiSelectedBlocks:n}=(0,c.useSelect)((e=>{const{getBlocksByClientId:t,getSelectedBlockClientIds:n}=e(li);return{multiSelectedBlocks:t(n())}}),[]);return(0,a.useLayoutEffect)((()=>{void 0===e&&t(n.some((({attributes:e})=>!!e?.style?.position?.type)))}),[e,n,t]),(0,$.jsx)(os.PanelBody,{className:"block-editor-block-inspector__position",title:(0,C.__)("Position"),initialOpen:null!=e&&e,children:(0,$.jsx)(ma.Slot,{group:"position"})})},kP=()=>{const e=(0,os.__experimentalUseSlotFills)(sa.position.Slot.__unstableName);return Boolean(e&&e.length)?(0,$.jsx)(bP,{}):null},vP=({showAdvancedControls:e=!1})=>(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(ma.Slot,{}),(0,$.jsx)(kP,{}),(0,$.jsx)(ma.Slot,{group:"bindings"}),e&&(0,$.jsx)("div",{children:(0,$.jsx)(fP,{})})]}),_P=({blockName:e,clientId:t,hasBlockStyles:n})=>{const o=Dd({blockName:e});return(0,$.jsxs)($.Fragment,{children:[n&&(0,$.jsx)("div",{children:(0,$.jsx)(os.PanelBody,{title:(0,C.__)("Styles"),children:(0,$.jsx)(NE,{clientId:t})})}),(0,$.jsx)(ma.Slot,{group:"color",label:(0,C.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,$.jsx)(ma.Slot,{group:"background",label:(0,C.__)("Background image")}),(0,$.jsx)(ma.Slot,{group:"filter"}),(0,$.jsx)(ma.Slot,{group:"typography",label:(0,C.__)("Typography")}),(0,$.jsx)(ma.Slot,{group:"dimensions",label:(0,C.__)("Dimensions")}),(0,$.jsx)(ma.Slot,{group:"border",label:o}),(0,$.jsx)(ma.Slot,{group:"styles"})]})},xP=["core/navigation"],yP=e=>!xP.includes(e),{Tabs:SP}=te(os.privateApis);function wP({blockName:e,clientId:t,hasBlockStyles:n,tabs:o}){const r=(0,c.useSelect)((e=>e(Ia.store).get("core","showIconLabels")),[]),i=yP(e)?void 0:mP.name;return(0,$.jsx)("div",{className:"block-editor-block-inspector__tabs",children:(0,$.jsxs)(SP,{defaultTabId:i,children:[(0,$.jsx)(SP.TabList,{children:o.map((e=>r?(0,$.jsx)(SP.Tab,{tabId:e.name,className:e.className,children:e.title},e.name):(0,$.jsx)(os.Tooltip,{text:e.title,children:(0,$.jsx)(SP.Tab,{tabId:e.name,className:e.className,"aria-label":e.title,children:(0,$.jsx)(os.Icon,{icon:e.icon})})},e.name)))}),(0,$.jsx)(SP.TabPanel,{tabId:hP.name,focusable:!1,children:(0,$.jsx)(vP,{showAdvancedControls:!!e})}),(0,$.jsx)(SP.TabPanel,{tabId:gP.name,focusable:!1,children:(0,$.jsx)(_P,{blockName:e,clientId:t,hasBlockStyles:n})}),(0,$.jsx)(SP.TabPanel,{tabId:mP.name,focusable:!1,children:(0,$.jsx)(ma.Slot,{group:"list"})})]},t)})}const CP=[];function BP(e){const t=[],{bindings:n,border:o,color:r,default:i,dimensions:s,list:l,position:a,styles:u,typography:d,effects:p}=sa,h=yP(e),g=(0,os.__experimentalUseSlotFills)(l.Slot.__unstableName),m=!h&&!!g&&g.length,f=[...(0,os.__experimentalUseSlotFills)(o.Slot.__unstableName)||[],...(0,os.__experimentalUseSlotFills)(r.Slot.__unstableName)||[],...(0,os.__experimentalUseSlotFills)(s.Slot.__unstableName)||[],...(0,os.__experimentalUseSlotFills)(u.Slot.__unstableName)||[],...(0,os.__experimentalUseSlotFills)(d.Slot.__unstableName)||[],...(0,os.__experimentalUseSlotFills)(p.Slot.__unstableName)||[]].length,b=[...(0,os.__experimentalUseSlotFills)(ga.slotName)||[],...(0,os.__experimentalUseSlotFills)(n.Slot.__unstableName)||[]],k=[...(0,os.__experimentalUseSlotFills)(i.Slot.__unstableName)||[],...(0,os.__experimentalUseSlotFills)(a.Slot.__unstableName)||[],...m&&f>1?b:[]];m&&t.push(mP),k.length&&t.push(hP),f&&t.push(gP);const v=function(e,t={}){return void 0!==t[e]?t[e]:void 0===t.default||t.default}(e,(0,c.useSelect)((e=>e(li).getSettings().blockInspectorTabs),[]));return v?t:CP}const{createPrivateSlotFill:IP}=te(os.privateApis),{Fill:jP,Slot:EP}=IP("BlockInformation"),TP=e=>_()[p]?(0,$.jsx)(jP,{...e}):null;TP.Slot=e=>(0,$.jsx)(EP,{...e});const MP=TP;function PP({clientIds:e,onSelect:t}){return e.length?(0,$.jsx)(os.__experimentalVStack,{spacing:1,children:e.map((e=>(0,$.jsx)(RP,{onSelect:t,clientId:e},e)))}):null}function RP({clientId:e,onSelect:t}){const n=Um(e),o=bB({clientId:e,context:"list-view"}),{isSelected:r}=(0,c.useSelect)((t=>{const{isBlockSelected:n,hasSelectedInnerBlock:o}=t(li);return{isSelected:n(e)||o(e,!0)}}),[e]),{selectBlock:i}=(0,c.useDispatch)(li);return(0,$.jsx)(os.Button,{__next40pxDefaultSize:!1,isPressed:r,onClick:async()=>{await i(e),t&&t(e)},children:(0,$.jsxs)(os.Flex,{children:[(0,$.jsx)(os.FlexItem,{children:(0,$.jsx)(Uf,{icon:n?.icon})}),(0,$.jsx)(os.FlexBlock,{style:{textAlign:"left"},children:(0,$.jsx)(os.__experimentalTruncate,{children:o})})]})})}function NP({clientId:e}){return(0,$.jsx)(os.PanelBody,{title:(0,C.__)("Styles"),children:(0,$.jsx)(NE,{clientId:e})})}function LP({topLevelLockedBlock:e}){const t=(0,c.useSelect)((t=>{const{getClientIdsOfDescendants:n,getBlockName:o,getBlockEditingMode:r}=t(li);return n(e).filter((e=>"core/list-item"!==o(e)&&"contentOnly"===r(e)))}),[e]),n=(0,c.useSelect)((t=>{const{getBlockName:n}=t(li),{getBlockStyles:o}=t(l.store);return!!o(n(e))?.length}),[e]),o=Um(e);return(0,$.jsxs)("div",{className:"block-editor-block-inspector",children:[(0,$.jsx)(Wf,{...o,className:o.isSynced&&"is-synced"}),(0,$.jsx)(MP.Slot,{}),n&&(0,$.jsx)(NP,{clientId:e}),t.length>0&&(0,$.jsx)(os.PanelBody,{title:(0,C.__)("Content"),children:(0,$.jsx)(PP,{clientIds:t})})]})}const AP=({animate:e,wrapper:t,children:n})=>e?t(n):n,DP=({blockInspectorAnimationSettings:e,selectedBlockClientId:t,children:n})=>{const o=e&&"leftToRight"===e.enterDirection?-50:50;return(0,$.jsx)(os.__unstableMotion.div,{animate:{x:0,opacity:1,transition:{ease:"easeInOut",duration:.14}},initial:{x:o,opacity:0},children:n},t)},OP=({clientId:e,blockName:t})=>{const n=BP(t),o=n?.length>1,r=(0,c.useSelect)((e=>{const{getBlockStyles:n}=e(l.store),o=n(t);return o&&o.length>0}),[t]),i=Um(e),s=Dd({blockName:t});return(0,$.jsxs)("div",{className:"block-editor-block-inspector",children:[(0,$.jsx)(Wf,{...i,className:i.isSynced&&"is-synced"}),(0,$.jsx)(tT,{blockClientId:e}),(0,$.jsx)(MP.Slot,{}),o&&(0,$.jsx)(wP,{hasBlockStyles:r,clientId:e,blockName:t,tabs:n}),!o&&(0,$.jsxs)($.Fragment,{children:[r&&(0,$.jsx)(NP,{clientId:e}),(0,$.jsx)(ma.Slot,{}),(0,$.jsx)(ma.Slot,{group:"list"}),(0,$.jsx)(ma.Slot,{group:"color",label:(0,C.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,$.jsx)(ma.Slot,{group:"background",label:(0,C.__)("Background image")}),(0,$.jsx)(ma.Slot,{group:"typography",label:(0,C.__)("Typography")}),(0,$.jsx)(ma.Slot,{group:"dimensions",label:(0,C.__)("Dimensions")}),(0,$.jsx)(ma.Slot,{group:"border",label:s}),(0,$.jsx)(ma.Slot,{group:"styles"}),(0,$.jsx)(kP,{}),(0,$.jsx)(ma.Slot,{group:"bindings"}),(0,$.jsx)("div",{children:(0,$.jsx)(fP,{})})]}),(0,$.jsx)(aP,{},"back")]})},zP=({showNoBlockSelectedMessage:e=!0})=>{const{count:t,selectedBlockName:n,selectedBlockClientId:o,blockType:r,topLevelLockedBlock:i}=(0,c.useSelect)((e=>{const{getSelectedBlockClientId:t,getSelectedBlockCount:n,getBlockName:o,getContentLockingParent:r,getTemplateLock:i}=te(e(li)),s=t(),a=s&&o(s),c=a&&(0,l.getBlockType)(a);return{count:n(),selectedBlockClientId:s,selectedBlockName:a,blockType:c,topLevelLockedBlock:r(s)||("contentOnly"===i(s)||"core/block"===a?s:void 0)}}),[]),s=BP(r?.name),a=s?.length>1,u=function(e){return(0,c.useSelect)((t=>{if(e){const n=t(li).getSettings().blockInspectorAnimation,o=n?.animationParent,{getSelectedBlockClientId:r,getBlockParentsByBlockName:i}=t(li);return i(r(),o,!0)[0]||e.name===o?n?.[e.name]:null}return null}),[e])}(r),d=Dd({blockName:n});if(t>1)return(0,$.jsxs)("div",{className:"block-editor-block-inspector",children:[(0,$.jsx)(uP,{}),a?(0,$.jsx)(wP,{tabs:s}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(ma.Slot,{}),(0,$.jsx)(ma.Slot,{group:"color",label:(0,C.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,$.jsx)(ma.Slot,{group:"background",label:(0,C.__)("Background image")}),(0,$.jsx)(ma.Slot,{group:"typography",label:(0,C.__)("Typography")}),(0,$.jsx)(ma.Slot,{group:"dimensions",label:(0,C.__)("Dimensions")}),(0,$.jsx)(ma.Slot,{group:"border",label:d}),(0,$.jsx)(ma.Slot,{group:"styles"})]})]});const p=n===(0,l.getUnregisteredTypeHandlerName)();return r&&o&&!p?i?(0,$.jsx)(LP,{topLevelLockedBlock:i}):(0,$.jsx)(AP,{animate:u,wrapper:e=>(0,$.jsx)(DP,{blockInspectorAnimationSettings:u,selectedBlockClientId:o,children:e}),children:(0,$.jsx)(OP,{clientId:o,blockName:r.name})}):e?(0,$.jsx)("span",{className:"block-editor-block-inspector__no-blocks",children:(0,C.__)("No block selected.")}):null},VP=()=>(y()("__unstableUseClipboardHandler",{alternative:"BlockCanvas or WritingFlow",since:"6.4",version:"6.7"}),Cy());function FP(e){return y()("CopyHandler",{alternative:"BlockCanvas or WritingFlow",since:"6.4",version:"6.7"}),(0,$.jsx)("div",{...e,ref:Cy()})}const HP=()=>{};const GP=(0,a.forwardRef)((function({rootClientId:e,clientId:t,isAppender:n,showInserterHelpPanel:o,showMostUsedBlocks:r=!1,__experimentalInsertionIndex:i,__experimentalInitialTab:s,__experimentalInitialCategory:l,__experimentalFilterValue:a,onPatternCategorySelection:u,onSelect:d=HP,shouldFocusBlock:p=!1,onClose:h},g){const{destinationRootClientId:m}=(0,c.useSelect)((n=>{const{getBlockRootClientId:o}=n(li);return{destinationRootClientId:e||o(t)||void 0}}),[t,e]);return(0,$.jsx)(Yw,{onSelect:d,rootClientId:m,clientId:t,isAppender:n,showInserterHelpPanel:o,showMostUsedBlocks:r,__experimentalInsertionIndex:i,__experimentalFilterValue:a,onPatternCategorySelection:u,__experimentalInitialTab:s,__experimentalInitialCategory:l,shouldFocusBlock:p,ref:g,onClose:h})}));const $P=(0,a.forwardRef)((function(e,t){return(0,$.jsx)(GP,{...e,onPatternCategorySelection:void 0,ref:t})}));function UP(){return y()("wp.blockEditor.MultiSelectScrollIntoView",{hint:"This behaviour is now built-in.",since:"5.8"}),null}const WP=-1!==window.navigator.userAgent.indexOf("Trident"),KP=new Set([va.UP,va.DOWN,va.LEFT,va.RIGHT]),ZP=.75;function qP(){const e=(0,c.useSelect)((e=>e(li).hasSelectedBlock()),[]);return(0,u.useRefEffect)((t=>{if(!e)return;const{ownerDocument:n}=t,{defaultView:o}=n;let r,i,s;function l(){r||(r=o.requestAnimationFrame((()=>{p(),r=null})))}function a(e){i&&o.cancelAnimationFrame(i),i=o.requestAnimationFrame((()=>{c(e),i=null}))}function c({keyCode:e}){if(!h())return;const r=(0,ba.computeCaretRect)(o);if(!r)return;if(!s)return void(s=r);if(KP.has(e))return void(s=r);const i=r.top-s.top;if(0===i)return;const l=(0,ba.getScrollContainer)(t);if(!l)return;const a=l===n.body||l===n.documentElement,c=a?o.scrollY:l.scrollTop,u=a?0:l.getBoundingClientRect().top,d=a?s.top/o.innerHeight:(s.top-u)/(o.innerHeight-u);if(0===c&&d<ZP&&function(){const e=t.querySelectorAll('[contenteditable="true"]');return e[e.length-1]===n.activeElement}())return void(s=r);const p=a?o.innerHeight:l.clientHeight;s.top+s.height>u+p||s.top<u?s=r:a?o.scrollBy(0,i):l.scrollTop+=i}function u(){n.addEventListener("selectionchange",d)}function d(){n.removeEventListener("selectionchange",d),p()}function p(){h()&&(s=(0,ba.computeCaretRect)(o))}function h(){return t.contains(n.activeElement)&&n.activeElement.isContentEditable}return o.addEventListener("scroll",l,!0),o.addEventListener("resize",l,!0),t.addEventListener("keydown",a),t.addEventListener("keyup",c),t.addEventListener("mousedown",u),t.addEventListener("touchstart",u),()=>{o.removeEventListener("scroll",l,!0),o.removeEventListener("resize",l,!0),t.removeEventListener("keydown",a),t.removeEventListener("keyup",c),t.removeEventListener("mousedown",u),t.removeEventListener("touchstart",u),n.removeEventListener("selectionchange",d),o.cancelAnimationFrame(r),o.cancelAnimationFrame(i)}}),[e])}const YP=WP?e=>e.children:function({children:e}){return(0,$.jsx)("div",{ref:qP(),className:"block-editor__typewriter",children:e})},XP=(0,a.createContext)({});function QP({children:e,uniqueId:t,blockName:n=""}){const o=(0,a.useContext)(XP),{name:r}=_();n=n||r;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}(o,n,t)),[o,n,t]);return(0,$.jsx)(XP.Provider,{value:i,children:e})}function JP(e,t=""){const n=(0,a.useContext)(XP),{name:o}=_();return t=t||o,Boolean(n[t]?.has(e))}const eR=e=>(y()("wp.blockEditor.__experimentalRecursionProvider",{since:"6.5",alternative:"wp.blockEditor.RecursionProvider"}),(0,$.jsx)(QP,{...e})),tR=(...e)=>(y()("wp.blockEditor.__experimentalUseHasRecursion",{since:"6.5",alternative:"wp.blockEditor.useHasRecursion"}),JP(...e));function nR({title:e,help:t,actions:n=[],onClose:o}){return(0,$.jsxs)(os.__experimentalVStack,{className:"block-editor-inspector-popover-header",spacing:4,children:[(0,$.jsxs)(os.__experimentalHStack,{alignment:"center",children:[(0,$.jsx)(os.__experimentalHeading,{className:"block-editor-inspector-popover-header__heading",level:2,size:13,children:e}),(0,$.jsx)(os.__experimentalSpacer,{}),n.map((({label:e,icon:t,onClick:n})=>(0,$.jsx)(os.Button,{size:"small",className:"block-editor-inspector-popover-header__action",label:e,icon:t,variant:!t&&"tertiary",onClick:n,children:!t&&e},e))),o&&(0,$.jsx)(os.Button,{size:"small",className:"block-editor-inspector-popover-header__action",label:(0,C.__)("Close"),icon:Uw,onClick:o})]}),t&&(0,$.jsx)(os.__experimentalText,{children:t})]})}const oR=(0,a.forwardRef)((function({onClose:e,onChange:t,showPopoverHeaderActions:n,isCompact:o,currentDate:r,...i},s){const l={startOfWeek:(0,iT.getSettings)().l10n.startOfWeek,onChange:t,currentDate:o?void 0:r,currentTime:o?r:void 0,...i},a=o?os.TimePicker:os.DateTimePicker;return(0,$.jsxs)("div",{ref:s,className:"block-editor-publish-date-time-picker",children:[(0,$.jsx)(nR,{title:(0,C.__)("Publish"),actions:n?[{label:(0,C.__)("Now"),onClick:()=>t?.(null)}]:void 0,onClose:e}),(0,$.jsx)(a,{...l})]})}));const rR=(0,a.forwardRef)((function(e,t){return(0,$.jsx)(oR,{...e,showPopoverHeaderActions:!0,isCompact:!1,ref:t})})),iR={button:"wp-element-button",caption:"wp-element-caption"},sR=e=>iR[e]?iR[e]:"",lR=()=>"";function aR(e,t,n){return"core/image"===e&&n?.lightbox?.allowEditing||!!t?.lightbox}function cR({onChange:e,value:t,inheritedValue:n,panelId:o}){const r=Pi(),i=()=>{e(void 0)};let s=!1;return n?.lightbox?.enabled&&(s=n.lightbox.enabled),(0,$.jsx)($.Fragment,{children:(0,$.jsx)(os.__experimentalToolsPanel,{label:(0,C._x)("Settings","Image settings"),resetAll:i,panelId:o,dropdownMenuProps:r,children:(0,$.jsx)(os.__experimentalToolsPanelItem,{hasValue:()=>!!t?.lightbox,label:(0,C.__)("Expand on click"),onDeselect:i,isShownByDefault:!0,panelId:o,children:(0,$.jsx)(os.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,C.__)("Expand on click"),checked:s,onChange:t=>{e({enabled:t})}})})})})}function uR({value:e,onChange:t,inheritedValue:n=e}){const[o,r]=(0,a.useState)(null),i=n?.css;return(0,$.jsxs)(os.__experimentalVStack,{spacing:3,children:[o&&(0,$.jsx)(os.Notice,{status:"error",onRemove:()=>r(null),children:o}),(0,$.jsx)(os.TextareaControl,{label:(0,C.__)("Additional CSS"),__nextHasNoMarginBottom:!0,value:i,onChange:n=>function(n){if(t({...e,css:n}),o){const[e]=Xy([{css:n}],".for-validation-only");e&&r(null)}}(n),onBlur:function(e){if(!e?.target?.value)return void r(null);const[t]=Xy([{css:e.target.value}],".for-validation-only");r(null===t?(0,C.__)("There is an error with your CSS structure."):null)},className:"block-editor-global-styles-advanced-panel__custom-css-input",spellCheck:!1})]})}const dR=new Map,pR=[],hR={caption:(0,C.__)("Caption"),link:(0,C.__)("Link"),button:(0,C.__)("Button"),heading:(0,C.__)("Heading"),h1:(0,C.__)("H1"),h2:(0,C.__)("H2"),h3:(0,C.__)("H3"),h4:(0,C.__)("H4"),h5:(0,C.__)("H5"),h6:(0,C.__)("H6"),"settings.color":(0,C.__)("Color"),"settings.typography":(0,C.__)("Typography"),"styles.color":(0,C.__)("Colors"),"styles.spacing":(0,C.__)("Spacing"),"styles.background":(0,C.__)("Background"),"styles.typography":(0,C.__)("Typography")},gR=function(e,t){var n,o,r=0;function i(){var i,s,l=n,a=arguments.length;e:for(;l;){if(l.args.length===arguments.length){for(s=0;s<a;s++)if(l.args[s]!==arguments[s]){l=l.next;continue e}return l!==n&&(l===o&&(o=l.prev),l.prev.next=l.next,l.next&&(l.next.prev=l.prev),l.next=n,l.prev=null,n.prev=l,n=l),l.val}l=l.next}for(i=new Array(a),s=0;s<a;s++)i[s]=arguments[s];return l={args:i,val:e.apply(null,i)},n?(n.prev=l,l.next=n):o=l,r===t.maxSize?(o=o.prev).next=null:r++,n=l,l.val}return t=t||{},i.clear=function(){n=null,o=null,r=0},i}((()=>(0,l.getBlockTypes)().reduce(((e,{name:t,title:n})=>(e[t]=n,e)),{}))),mR=e=>null!==e&&"object"==typeof e;function fR(e,t,n=""){if(!mR(e)&&!mR(t))return e!==t?n.split(".").slice(0,2).join("."):void 0;e=mR(e)?e:{},t=mR(t)?t:{};const o=new Set([...Object.keys(e),...Object.keys(t)]);let r=[];for(const i of o){const o=n?n+"."+i:i,s=fR(e[i],t[i],o);s&&(r=r.concat(s))}return r}function bR(e,t){const n=JSON.stringify({next:e,previous:t});if(dR.has(n))return dR.get(n);const o=fR({styles:{background:e?.styles?.background,color:e?.styles?.color,typography:e?.styles?.typography,spacing:e?.styles?.spacing},blocks:e?.styles?.blocks,elements:e?.styles?.elements,settings:e?.settings},{styles:{background:t?.styles?.background,color:t?.styles?.color,typography:t?.styles?.typography,spacing:t?.styles?.spacing},blocks:t?.styles?.blocks,elements:t?.styles?.elements,settings:t?.settings});if(!o.length)return dR.set(n,pR),pR;const r=[...new Set(o)].reduce(((e,t)=>{const n=function(e){if(hR[e])return hR[e];const t=e.split(".");if("blocks"===t?.[0]){const e=gR()?.[t[1]];return e||t[1]}return"elements"===t?.[0]?hR[t[1]]||t[1]:void 0}(t);return n&&e.push([t.split(".")[0],n]),e}),[]);return dR.set(n,r),r}function kR(e,t,n={}){let o=bR(e,t);const r=o.length,{maxResults:i}=n;return r?(i&&r>i&&(o=o.slice(0,i)),Object.entries(o.reduce(((e,t)=>{const n=e[t[0]]||[];return n.includes(t[1])||(e[t[0]]=[...n,t[1]]),e}),{})).map((([e,t])=>{const n=t.length,o=t.join((0,C.__)(", "));switch(e){case"blocks":return(0,C.sprintf)((0,C._n)("%s block.","%s blocks.",n),o);case"elements":return(0,C.sprintf)((0,C._n)("%s element.","%s elements.",n),o);case"settings":return(0,C.sprintf)((0,C.__)("%s settings."),o);case"styles":return(0,C.sprintf)((0,C.__)("%s styles."),o);default:return(0,C.sprintf)((0,C.__)("%s."),o)}}))):pR}function vR(e,t,n){if(null==e||!1===e)return;if(Array.isArray(e))return _R(e,t,n);switch(typeof e){case"string":case"number":return}const{type:o,props:r}=e;switch(o){case a.StrictMode:case a.Fragment:return _R(r.children,t,n);case a.RawHTML:return;case Zx.Content:return xR(t,n);case jM:return void t.push(r.value)}switch(typeof o){case"string":return void 0!==r.children?_R(r.children,t,n):void 0;case"function":return vR(o.prototype&&"function"==typeof o.prototype.render?new o(r).render():o(r),t,n)}}function _R(e,...t){e=Array.isArray(e)?e:[e];for(let n=0;n<e.length;n++)vR(e[n],...t)}function xR(e,t){for(let n=0;n<t.length;n++){const{name:o,attributes:r,innerBlocks:i}=t[n];vR((0,l.getSaveElement)(o,r,(0,$.jsx)(Zx.Content,{})),e,i)}}const yR=[{value:"fill",label:(0,C._x)("Fill","Scale option for dimensions control"),help:(0,C.__)("Fill the space by stretching the content.")},{value:"contain",label:(0,C._x)("Contain","Scale option for dimensions control"),help:(0,C.__)("Fit the content to the space without clipping.")},{value:"cover",label:(0,C._x)("Cover","Scale option for dimensions control"),help:(0,C.__)("Fill the space by clipping what doesn't fit.")},{value:"none",label:(0,C._x)("None","Scale option for dimensions control"),help:(0,C.__)("Do not adjust the sizing of the content. Content that is too large will be clipped, and content that is too small will have additional padding.")},{value:"scale-down",label:(0,C._x)("Scale down","Scale option for dimensions control"),help:(0,C.__)("Scale down the content to fit the space if it is too big. Content that is too small will have additional padding.")}];function SR({panelId:e,value:t,onChange:n,options:o=yR,defaultValue:r=yR[0].value,isShownByDefault:i=!0}){const s=null!=t?t:"fill",l=(0,a.useMemo)((()=>o.reduce(((e,t)=>(e[t.value]=t.help,e)),{})),[o]);return(0,$.jsx)(os.__experimentalToolsPanelItem,{label:(0,C.__)("Scale"),isShownByDefault:i,hasValue:()=>s!==r,onDeselect:()=>n(r),panelId:e,children:(0,$.jsx)(os.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,label:(0,C.__)("Scale"),isBlock:!0,help:l[s],value:s,onChange:n,size:"__unstable-large",children:o.map((e=>(0,$.jsx)(os.__experimentalToggleGroupControlOption,{...e},e.value)))})})}function wR(){return wR=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},wR.apply(this,arguments)}function CR(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var BR=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,IR=CR((function(e){return BR.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}));var jR=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){0}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}(),ER=Math.abs,TR=String.fromCharCode,MR=Object.assign;function PR(e){return e.trim()}function RR(e,t,n){return e.replace(t,n)}function NR(e,t){return e.indexOf(t)}function LR(e,t){return 0|e.charCodeAt(t)}function AR(e,t,n){return e.slice(t,n)}function DR(e){return e.length}function OR(e){return e.length}function zR(e,t){return t.push(e),e}var VR=1,FR=1,HR=0,GR=0,$R=0,UR="";function WR(e,t,n,o,r,i,s){return{value:e,root:t,parent:n,type:o,props:r,children:i,line:VR,column:FR,length:s,return:""}}function KR(e,t){return MR(WR("",null,null,"",null,null,0),e,{length:-e.length},t)}function ZR(){return $R=GR>0?LR(UR,--GR):0,FR--,10===$R&&(FR=1,VR--),$R}function qR(){return $R=GR<HR?LR(UR,GR++):0,FR++,10===$R&&(FR=1,VR++),$R}function YR(){return LR(UR,GR)}function XR(){return GR}function QR(e,t){return AR(UR,e,t)}function JR(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function eN(e){return VR=FR=1,HR=DR(UR=e),GR=0,[]}function tN(e){return UR="",e}function nN(e){return PR(QR(GR-1,iN(91===e?e+2:40===e?e+1:e)))}function oN(e){for(;($R=YR())&&$R<33;)qR();return JR(e)>2||JR($R)>3?"":" "}function rN(e,t){for(;--t&&qR()&&!($R<48||$R>102||$R>57&&$R<65||$R>70&&$R<97););return QR(e,XR()+(t<6&&32==YR()&&32==qR()))}function iN(e){for(;qR();)switch($R){case e:return GR;case 34:case 39:34!==e&&39!==e&&iN($R);break;case 40:41===e&&iN(e);break;case 92:qR()}return GR}function sN(e,t){for(;qR()&&e+$R!==57&&(e+$R!==84||47!==YR()););return"/*"+QR(t,GR-1)+"*"+TR(47===e?e:qR())}function lN(e){for(;!JR(YR());)qR();return QR(e,GR)}var aN="-ms-",cN="-moz-",uN="-webkit-",dN="comm",pN="rule",hN="decl",gN="@keyframes";function mN(e,t){for(var n="",o=OR(e),r=0;r<o;r++)n+=t(e[r],r,e,t)||"";return n}function fN(e,t,n,o){switch(e.type){case"@import":case hN:return e.return=e.return||e.value;case dN:return"";case gN:return e.return=e.value+"{"+mN(e.children,o)+"}";case pN:e.value=e.props.join(",")}return DR(n=mN(e.children,o))?e.return=e.value+"{"+n+"}":""}function bN(e){return tN(kN("",null,null,null,[""],e=eN(e),0,[0],e))}function kN(e,t,n,o,r,i,s,l,a){for(var c=0,u=0,d=s,p=0,h=0,g=0,m=1,f=1,b=1,k=0,v="",_=r,x=i,y=o,S=v;f;)switch(g=k,k=qR()){case 40:if(108!=g&&58==LR(S,d-1)){-1!=NR(S+=RR(nN(k),"&","&\f"),"&\f")&&(b=-1);break}case 34:case 39:case 91:S+=nN(k);break;case 9:case 10:case 13:case 32:S+=oN(g);break;case 92:S+=rN(XR()-1,7);continue;case 47:switch(YR()){case 42:case 47:zR(_N(sN(qR(),XR()),t,n),a);break;default:S+="/"}break;case 123*m:l[c++]=DR(S)*b;case 125*m:case 59:case 0:switch(k){case 0:case 125:f=0;case 59+u:h>0&&DR(S)-d&&zR(h>32?xN(S+";",o,n,d-1):xN(RR(S," ","")+";",o,n,d-2),a);break;case 59:S+=";";default:if(zR(y=vN(S,t,n,c,u,r,l,v,_=[],x=[],d),i),123===k)if(0===u)kN(S,t,y,y,_,i,d,l,x);else switch(99===p&&110===LR(S,3)?100:p){case 100:case 109:case 115:kN(e,y,y,o&&zR(vN(e,y,y,0,0,r,l,v,r,_=[],d),x),r,x,d,l,o?_:x);break;default:kN(S,y,y,y,[""],x,0,l,x)}}c=u=h=0,m=b=1,v=S="",d=s;break;case 58:d=1+DR(S),h=g;default:if(m<1)if(123==k)--m;else if(125==k&&0==m++&&125==ZR())continue;switch(S+=TR(k),k*m){case 38:b=u>0?1:(S+="\f",-1);break;case 44:l[c++]=(DR(S)-1)*b,b=1;break;case 64:45===YR()&&(S+=nN(qR())),p=YR(),u=d=DR(v=S+=lN(XR())),k++;break;case 45:45===g&&2==DR(S)&&(m=0)}}return i}function vN(e,t,n,o,r,i,s,l,a,c,u){for(var d=r-1,p=0===r?i:[""],h=OR(p),g=0,m=0,f=0;g<o;++g)for(var b=0,k=AR(e,d+1,d=ER(m=s[g])),v=e;b<h;++b)(v=PR(m>0?p[b]+" "+k:RR(k,/&\f/g,p[b])))&&(a[f++]=v);return WR(e,t,n,0===r?pN:l,a,c,u)}function _N(e,t,n){return WR(e,t,n,dN,TR($R),AR(e,2,-2),0)}function xN(e,t,n,o){return WR(e,t,n,hN,AR(e,0,o),AR(e,o+1,-1),o)}var yN=function(e,t,n){for(var o=0,r=0;o=r,r=YR(),38===o&&12===r&&(t[n]=1),!JR(r);)qR();return QR(e,GR)},SN=function(e,t){return tN(function(e,t){var n=-1,o=44;do{switch(JR(o)){case 0:38===o&&12===YR()&&(t[n]=1),e[n]+=yN(GR-1,t,n);break;case 2:e[n]+=nN(o);break;case 4:if(44===o){e[++n]=58===YR()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=TR(o)}}while(o=qR());return e}(eN(e),t))},wN=new WeakMap,CN=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,o=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||wN.get(n))&&!o){wN.set(e,!0);for(var r=[],i=SN(t,r),s=n.props,l=0,a=0;l<i.length;l++)for(var c=0;c<s.length;c++,a++)e.props[a]=r[l]?i[l].replace(/&\f/g,s[c]):s[c]+" "+i[l]}}},BN=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function IN(e,t){switch(function(e,t){return 45^LR(e,0)?(((t<<2^LR(e,0))<<2^LR(e,1))<<2^LR(e,2))<<2^LR(e,3):0}(e,t)){case 5103:return uN+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return uN+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return uN+e+cN+e+aN+e+e;case 6828:case 4268:return uN+e+aN+e+e;case 6165:return uN+e+aN+"flex-"+e+e;case 5187:return uN+e+RR(e,/(\w+).+(:[^]+)/,uN+"box-$1$2"+aN+"flex-$1$2")+e;case 5443:return uN+e+aN+"flex-item-"+RR(e,/flex-|-self/,"")+e;case 4675:return uN+e+aN+"flex-line-pack"+RR(e,/align-content|flex-|-self/,"")+e;case 5548:return uN+e+aN+RR(e,"shrink","negative")+e;case 5292:return uN+e+aN+RR(e,"basis","preferred-size")+e;case 6060:return uN+"box-"+RR(e,"-grow","")+uN+e+aN+RR(e,"grow","positive")+e;case 4554:return uN+RR(e,/([^-])(transform)/g,"$1"+uN+"$2")+e;case 6187:return RR(RR(RR(e,/(zoom-|grab)/,uN+"$1"),/(image-set)/,uN+"$1"),e,"")+e;case 5495:case 3959:return RR(e,/(image-set\([^]*)/,uN+"$1$`$1");case 4968:return RR(RR(e,/(.+:)(flex-)?(.*)/,uN+"box-pack:$3"+aN+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+uN+e+e;case 4095:case 3583:case 4068:case 2532:return RR(e,/(.+)-inline(.+)/,uN+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(DR(e)-1-t>6)switch(LR(e,t+1)){case 109:if(45!==LR(e,t+4))break;case 102:return RR(e,/(.+:)(.+)-([^]+)/,"$1"+uN+"$2-$3$1"+cN+(108==LR(e,t+3)?"$3":"$2-$3"))+e;case 115:return~NR(e,"stretch")?IN(RR(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==LR(e,t+1))break;case 6444:switch(LR(e,DR(e)-3-(~NR(e,"!important")&&10))){case 107:return RR(e,":",":"+uN)+e;case 101:return RR(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+uN+(45===LR(e,14)?"inline-":"")+"box$3$1"+uN+"$2$3$1"+aN+"$2box$3")+e}break;case 5936:switch(LR(e,t+11)){case 114:return uN+e+aN+RR(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return uN+e+aN+RR(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return uN+e+aN+RR(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return uN+e+aN+e+e}return e}var jN=[function(e,t,n,o){if(e.length>-1&&!e.return)switch(e.type){case hN:e.return=IN(e.value,e.length);break;case gN:return mN([KR(e,{value:RR(e.value,"@","@"+uN)})],o);case pN:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return mN([KR(e,{props:[RR(t,/:(read-\w+)/,":-moz-$1")]})],o);case"::placeholder":return mN([KR(e,{props:[RR(t,/:(plac\w+)/,":"+uN+"input-$1")]}),KR(e,{props:[RR(t,/:(plac\w+)/,":-moz-$1")]}),KR(e,{props:[RR(t,/:(plac\w+)/,aN+"input-$1")]})],o)}return""}))}}];const EN=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var o=e.stylisPlugins||jN;var r,i,s={},l=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)s[t[n]]=!0;l.push(e)}));var a,c,u,d,p=[fN,(d=function(e){a.insert(e)},function(e){e.root||(e=e.return)&&d(e)})],h=(c=[CN,BN].concat(o,p),u=OR(c),function(e,t,n,o){for(var r="",i=0;i<u;i++)r+=c[i](e,t,n,o)||"";return r});i=function(e,t,n,o){a=n,function(e){mN(bN(e),h)}(e?e+"{"+t.styles+"}":t.styles),o&&(g.inserted[t.name]=!0)};var g={key:t,sheet:new jR({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:s,registered:{},insert:i};return g.sheet.hydrate(l),g};const TN=function(e){for(var t,n=0,o=0,r=e.length;r>=4;++o,r-=4)t=1540483477*(65535&(t=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(r){case 3:n^=(255&e.charCodeAt(o+2))<<16;case 2:n^=(255&e.charCodeAt(o+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(o)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)};const MN={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var PN=/[A-Z]|^ms/g,RN=/_EMO_([^_]+?)_([^]*?)_EMO_/g,NN=function(e){return 45===e.charCodeAt(1)},LN=function(e){return null!=e&&"boolean"!=typeof e},AN=CR((function(e){return NN(e)?e:e.replace(PN,"-$&").toLowerCase()})),DN=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(RN,(function(e,t,n){return zN={name:t,styles:n,next:zN},t}))}return 1===MN[e]||NN(e)||"number"!=typeof t||0===t?t:t+"px"};function ON(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return zN={name:n.name,styles:n.styles,next:zN},n.name;if(void 0!==n.styles){var o=n.next;if(void 0!==o)for(;void 0!==o;)zN={name:o.name,styles:o.styles,next:zN},o=o.next;return n.styles+";"}return function(e,t,n){var o="";if(Array.isArray(n))for(var r=0;r<n.length;r++)o+=ON(e,t,n[r])+";";else for(var i in n){var s=n[i];if("object"!=typeof s)null!=t&&void 0!==t[s]?o+=i+"{"+t[s]+"}":LN(s)&&(o+=AN(i)+":"+DN(i,s)+";");else if(!Array.isArray(s)||"string"!=typeof s[0]||null!=t&&void 0!==t[s[0]]){var l=ON(e,t,s);switch(i){case"animation":case"animationName":o+=AN(i)+":"+l+";";break;default:o+=i+"{"+l+"}"}}else for(var a=0;a<s.length;a++)LN(s[a])&&(o+=AN(i)+":"+DN(i,s[a])+";")}return o}(e,t,n);case"function":if(void 0!==e){var r=zN,i=n(e);return zN=r,ON(e,t,i)}}if(null==t)return n;var s=t[n];return void 0!==s?s:n}var zN,VN=/label:\s*([^\s;\n{]+)\s*(;|$)/g;var FN=!!Pa.useInsertionEffect&&Pa.useInsertionEffect,HN=FN||function(e){return e()},GN=(0,Pa.createContext)("undefined"!=typeof HTMLElement?EN({key:"css"}):null);GN.Provider;var $N=function(e){return(0,Pa.forwardRef)((function(t,n){var o=(0,Pa.useContext)(GN);return e(t,o,n)}))},UN=(0,Pa.createContext)({});var WN=function(e,t,n){var o=e.key+"-"+t.name;!1===n&&void 0===e.registered[o]&&(e.registered[o]=t.styles)},KN=IR,ZN=function(e){return"theme"!==e},qN=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?KN:ZN},YN=function(e,t,n){var o;if(t){var r=t.shouldForwardProp;o=e.__emotion_forwardProp&&r?function(t){return e.__emotion_forwardProp(t)&&r(t)}:r}return"function"!=typeof o&&n&&(o=e.__emotion_forwardProp),o},XN=function(e){var t=e.cache,n=e.serialized,o=e.isStringTag;WN(t,n,o);HN((function(){return function(e,t,n){WN(e,t,n);var o=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var r=t;do{e.insert(t===r?"."+o:"",r,e.sheet,!0),r=r.next}while(void 0!==r)}}(t,n,o)}));return null};const QN=function e(t,n){var o,r,i=t.__emotion_real===t,s=i&&t.__emotion_base||t;void 0!==n&&(o=n.label,r=n.target);var l=YN(t,n,i),a=l||qN(s),c=!a("as");return function(){var u=arguments,d=i&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==o&&d.push("label:"+o+";"),null==u[0]||void 0===u[0].raw)d.push.apply(d,u);else{0,d.push(u[0][0]);for(var p=u.length,h=1;h<p;h++)d.push(u[h],u[0][h])}var g=$N((function(e,t,n){var o=c&&e.as||s,i="",u=[],p=e;if(null==e.theme){for(var h in p={},e)p[h]=e[h];p.theme=(0,Pa.useContext)(UN)}"string"==typeof e.className?i=function(e,t,n){var o="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):o+=n+" "})),o}(t.registered,u,e.className):null!=e.className&&(i=e.className+" ");var g=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var o=!0,r="";zN=void 0;var i=e[0];null==i||void 0===i.raw?(o=!1,r+=ON(n,t,i)):r+=i[0];for(var s=1;s<e.length;s++)r+=ON(n,t,e[s]),o&&(r+=i[s]);VN.lastIndex=0;for(var l,a="";null!==(l=VN.exec(r));)a+="-"+l[1];return{name:TN(r)+a,styles:r,next:zN}}(d.concat(u),t.registered,p);i+=t.key+"-"+g.name,void 0!==r&&(i+=" "+r);var m=c&&void 0===l?qN(o):a,f={};for(var b in e)c&&"as"===b||m(b)&&(f[b]=e[b]);return f.className=i,f.ref=n,(0,Pa.createElement)(Pa.Fragment,null,(0,Pa.createElement)(XN,{cache:t,serialized:g,isStringTag:"string"==typeof o}),(0,Pa.createElement)(o,f))}));return g.displayName=void 0!==o?o:"Styled("+("string"==typeof s?s:s.displayName||s.name||"Component")+")",g.defaultProps=t.defaultProps,g.__emotion_real=g,g.__emotion_base=s,g.__emotion_styles=d,g.__emotion_forwardProp=l,Object.defineProperty(g,"toString",{value:function(){return"."+r}}),g.withComponent=function(t,o){return e(t,wR({},n,o,{shouldForwardProp:YN(g,o,!0)})).apply(void 0,d)},g}};const JN=QN(os.__experimentalToolsPanelItem,{target:"ef8pe3d0"})({name:"957xgf",styles:"grid-column:span 1"});function eL({panelId:e,value:t={},onChange:n=(()=>{}),units:o,isShownByDefault:r=!0}){var i,s;const l="auto"===t.width?"":null!==(i=t.width)&&void 0!==i?i:"",a="auto"===t.height?"":null!==(s=t.height)&&void 0!==s?s:"",c=e=>o=>{const r={...t};o?r[e]=o:delete r[e],n(r)};return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(JN,{label:(0,C.__)("Width"),isShownByDefault:r,hasValue:()=>""!==l,onDeselect:c("width"),panelId:e,children:(0,$.jsx)(os.__experimentalUnitControl,{label:(0,C.__)("Width"),placeholder:(0,C.__)("Auto"),labelPosition:"top",units:o,min:0,value:l,onChange:c("width"),size:"__unstable-large"})}),(0,$.jsx)(JN,{label:(0,C.__)("Height"),isShownByDefault:r,hasValue:()=>""!==a,onDeselect:c("height"),panelId:e,children:(0,$.jsx)(os.__experimentalUnitControl,{label:(0,C.__)("Height"),placeholder:(0,C.__)("Auto"),labelPosition:"top",units:o,min:0,value:a,onChange:c("height"),size:"__unstable-large"})})]})}const tL=function({panelId:e,value:t={},onChange:n=(()=>{}),aspectRatioOptions:o,defaultAspectRatio:r="auto",scaleOptions:i,defaultScale:s="fill",unitsOptions:l,tools:c=["aspectRatio","widthHeight","scale"]}){const u=void 0===t.width||"auto"===t.width?null:t.width,d=void 0===t.height||"auto"===t.height?null:t.height,p=void 0===t.aspectRatio||"auto"===t.aspectRatio?null:t.aspectRatio,h=void 0===t.scale||"fill"===t.scale?null:t.scale,[g,m]=(0,a.useState)(h),[f,b]=(0,a.useState)(p),k=u&&d?"custom":f,v=p||u&&d;return(0,$.jsxs)($.Fragment,{children:[c.includes("aspectRatio")&&(0,$.jsx)(Sg,{panelId:e,options:o,defaultValue:r,value:k,onChange:e=>{const o={...t};b(e="auto"===e?null:e),e?o.aspectRatio=e:delete o.aspectRatio,e?g?o.scale=g:(o.scale=s,m(s)):delete o.scale,"custom"!==e&&u&&d&&delete o.height,n(o)}}),c.includes("widthHeight")&&(0,$.jsx)(eL,{panelId:e,units:l,value:{width:u,height:d},onChange:({width:e,height:o})=>{const r={...t};o="auto"===o?null:o,(e="auto"===e?null:e)?r.width=e:delete r.width,o?r.height=o:delete r.height,e&&o?delete r.aspectRatio:f&&(r.aspectRatio=f),f||!!e==!!o?g?r.scale=g:(r.scale=s,m(s)):delete r.scale,n(r)}}),c.includes("scale")&&v&&(0,$.jsx)(SR,{panelId:e,options:i,defaultValue:s,value:g,onChange:e=>{const o={...t};m(e="fill"===e?null:e),e?o.scale=e:delete o.scale,n(o)}})]})},nL=[{label:(0,C._x)("Thumbnail","Image size option for resolution control"),value:"thumbnail"},{label:(0,C._x)("Medium","Image size option for resolution control"),value:"medium"},{label:(0,C._x)("Large","Image size option for resolution control"),value:"large"},{label:(0,C._x)("Full Size","Image size option for resolution control"),value:"full"}];const oL={};ee(oL,{...s,ExperimentalBlockCanvas:$j,ExperimentalBlockEditorProvider:Jf,getDuotoneFilter:jm,getRichTextValues:function(e=[]){l.__unstableGetBlockProps.skipFilters=!0;const t=[];return xR(t,e),l.__unstableGetBlockProps.skipFilters=!1,t.map((e=>e instanceof W.RichTextData?e:W.RichTextData.fromHTMLString(e)))},PrivateQuickInserter:Qw,extractWords:ew,getNormalizedSearchTerms:nw,normalizeString:tw,PrivateListView:jE,ResizableBoxPopover:function({clientId:e,resizableBoxProps:t,...n}){return(0,$.jsx)(tm,{clientId:e,__unstablePopoverSlot:"block-toolbar",...n,children:(0,$.jsx)(os.ResizableBox,{...t})})},BlockInfo:MP,useHasBlockToolbar:xj,cleanEmptyObject:qi,BlockQuickNavigation:PP,LayoutStyle:function({layout:e={},css:t,...n}){const o=Bl(e.type),[r]=ci("spacing.blockGap"),i=null!==r;if(o){if(t)return(0,$.jsx)("style",{children:t});const r=o.getLayoutStyle?.({hasBlockGapSupport:i,layout:e,...n});if(r)return(0,$.jsx)("style",{children:r})}return null},BlockRemovalWarningModal:function({rules:e}){const{clientIds:t,selectPrevious:n,message:o}=(0,c.useSelect)((e=>te(e(li)).getRemovalPromptData())),{clearBlockRemovalPrompt:r,setBlockRemovalRules:i,privateRemoveBlocks:s}=te((0,c.useDispatch)(li));if((0,a.useEffect)((()=>(i(e),()=>{i()})),[e,i]),!o)return;return(0,$.jsxs)(os.Modal,{title:(0,C.__)("Be careful!"),onRequestClose:r,size:"medium",children:[(0,$.jsx)("p",{children:o}),(0,$.jsxs)(os.__experimentalHStack,{justify:"right",children:[(0,$.jsx)(os.Button,{variant:"tertiary",onClick:r,__next40pxDefaultSize:!0,children:(0,C.__)("Cancel")}),(0,$.jsx)(os.Button,{variant:"primary",onClick:()=>{s(t,n,!0),r()},__next40pxDefaultSize:!0,children:(0,C.__)("Delete")})]})]})},useLayoutClasses:Ef,useLayoutStyles:function(e={},t,n){const{layout:o={},style:r={}}=e,i=o?.inherit||o?.contentSize||o?.wideSize?{...o,type:"constrained"}:o||{},s=Bl(i?.type||"default"),[l]=ci("spacing.blockGap"),a=null!==l;return s?.getLayoutStyle?.({blockName:t,selector:n,layout:o,style:r,hasBlockGapSupport:a})},DimensionsTool:tL,ResolutionTool:function({panelId:e,value:t,onChange:n,options:o=nL,defaultValue:r=nL[0].value,isShownByDefault:i=!0}){const s=null!=t?t:r;return(0,$.jsx)(os.__experimentalToolsPanelItem,{hasValue:()=>s!==r,label:(0,C.__)("Resolution"),onDeselect:()=>n(r),isShownByDefault:i,panelId:e,children:(0,$.jsx)(os.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,C.__)("Resolution"),value:s,options:o,onChange:n,help:(0,C.__)("Select the size of the source image."),size:"__unstable-large"})})},TabbedSidebar:Kw,TextAlignmentControl:Kp,usesContextKey:wM,useFlashEditableBlocks:nx,useZoomOutModeExit:J_,useZoomOut:Zw,globalStylesDataKey:Z,globalStylesLinksDataKey:q,selectBlockPatternsKey:Y,requiresWrapperOnCopy:Sy,PrivateRichText:LM,PrivateInserterLibrary:GP,reusableBlocksSelectKey:X,PrivateBlockPopover:Qg,PrivatePublishDateTimePicker:oR,useSpacingSizes:hg,useBlockDisplayTitle:bB,__unstableBlockStyleVariationOverridesWithConfig:function({config:e}){const{getBlockStyles:t,overrides:n}=(0,c.useSelect)((e=>({getBlockStyles:e(l.store).getBlockStyles,overrides:te(e(li)).getStyleOverrides()})),[]),{getBlockName:o}=(0,c.useSelect)(li),r=(0,a.useMemo)((()=>{if(!n?.length)return;const r=[],i=[];for(const[,s]of n)if(s?.variation&&s?.clientId&&!i.includes(s.clientId)){const n=o(s.clientId),a=e?.styles?.blocks?.[n]?.variations?.[s.variation];if(a){const o={settings:e?.settings,styles:{blocks:{[n]:{variations:{[`${s.variation}-${s.clientId}`]:a}}}}},c=bf((0,l.getBlockTypes)(),t,s.clientId),u=mf(o,c,!1,!0,!0,!0,{blockGap:!1,blockStyles:!0,layoutStyles:!1,marginReset:!1,presets:!1,rootPadding:!1,variationStyles:!0});r.push({id:`${s.variation}-${s.clientId}`,css:u,__unstableType:"variation",variation:s.variation,clientId:s.clientId}),i.push(s.clientId)}}return r}),[e,n,t,o]);if(r&&r.length)return(0,$.jsx)($.Fragment,{children:r.map((e=>(0,$.jsx)(Sf,{override:e},e.id)))})},setBackgroundStyleDefaults:eu,sectionRootClientIdKey:Q})})(),(window.wp=window.wp||{}).blockEditor=o})();
\ No newline at end of file
diff --git a/wp-includes/js/dist/components.js b/wp-includes/js/dist/components.js
index baafdf7592..77314cb953 100644
--- a/wp-includes/js/dist/components.js
+++ b/wp-includes/js/dist/components.js
@@ -57454,7 +57454,9 @@ function FormFileUpload({
// @todo: Temporary fix a bug that prevents Chromium browsers from selecting ".heic" files
// from the file upload. See https://core.trac.wordpress.org/ticket/62268#comment:4.
// This can be removed once the Chromium fix is in the stable channel.
- const compatAccept = !!accept?.includes('image/*') ? `${accept}, image/heic, image/heif` : accept;
+ // Prevent Safari from adding "image/heic" and "image/heif" to the accept attribute.
+ const isSafari = globalThis.window?.navigator.userAgent.includes('Safari') && !globalThis.window?.navigator.userAgent.includes('Chrome') && !globalThis.window?.navigator.userAgent.includes('Chromium');
+ const compatAccept = !isSafari && !!accept?.includes('image/*') ? `${accept}, image/heic, image/heif` : accept;
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
className: "components-form-file-upload",
children: [ui, /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("input", {
diff --git a/wp-includes/js/dist/components.min.js b/wp-includes/js/dist/components.min.js
index dc1f4cf2be..aa4619496d 100644
--- a/wp-includes/js/dist/components.min.js
+++ b/wp-includes/js/dist/components.min.js
@@ -23,7 +23,7 @@
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/
-function es(e){return"[object Object]"===Object.prototype.toString.call(e)}function ts(e){var t,n;return!1!==es(e)&&(void 0===(t=e.constructor)||!1!==es(n=t.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf"))}const ns=function(e,t){const n=(0,c.useRef)(!1);(0,c.useEffect)((()=>{if(n.current)return e();n.current=!0}),t),(0,c.useEffect)((()=>()=>{n.current=!1}),[])},rs=(0,c.createContext)({}),os=()=>(0,c.useContext)(rs);const is=(0,c.memo)((({children:e,value:t})=>{const n=function({value:e}){const t=os(),n=(0,c.useRef)(e);return ns((()=>{Ji()(n.current,e)&&n.current}),[e]),(0,c.useMemo)((()=>Zi()(null!=t?t:{},null!=e?e:{},{isMergeableObject:ts})),[t,e])}({value:t});return(0,wt.jsx)(rs.Provider,{value:n,children:e})})),ss="data-wp-component",as="data-wp-c16t",ls="__contextSystemKey__";var cs=function(){return cs=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},cs.apply(this,arguments)};Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError;function us(e){return e.toLowerCase()}var ds=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],ps=/[^A-Z0-9]+/gi;function fs(e,t,n){return t instanceof RegExp?e.replace(t,n):t.reduce((function(e,t){return e.replace(t,n)}),e)}function hs(e,t){return void 0===t&&(t={}),function(e,t){void 0===t&&(t={});for(var n=t.splitRegexp,r=void 0===n?ds:n,o=t.stripRegexp,i=void 0===o?ps:o,s=t.transform,a=void 0===s?us:s,l=t.delimiter,c=void 0===l?" ":l,u=fs(fs(e,r,"$1\0$2"),i,"\0"),d=0,p=u.length;"\0"===u.charAt(d);)d++;for(;"\0"===u.charAt(p-1);)p--;return u.slice(d,p).split("\0").map(a).join(c)}(e,cs({delimiter:"."},t))}function ms(e,t){return void 0===t&&(t={}),hs(e,cs({delimiter:"-"},t))}function gs(e,t){var n,r,o=0;function i(){var i,s,a=n,l=arguments.length;e:for(;a;){if(a.args.length===arguments.length){for(s=0;s<l;s++)if(a.args[s]!==arguments[s]){a=a.next;continue e}return a!==n&&(a===r&&(r=a.prev),a.prev.next=a.next,a.next&&(a.next.prev=a.prev),a.next=n,a.prev=null,n.prev=a,n=a),a.val}a=a.next}for(i=new Array(l),s=0;s<l;s++)i[s]=arguments[s];return a={args:i,val:e.apply(null,i)},n?(n.prev=a,a.next=n):r=a,o===t.maxSize?(r=r.prev).next=null:o++,n=a,a.val}return t=t||{},i.clear=function(){n=null,r=null,o=0},i}const vs=gs((function(e){return`components-${ms(e)}`}));var bs=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){0}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}(),xs=Math.abs,ys=String.fromCharCode,ws=Object.assign;function _s(e){return e.trim()}function Ss(e,t,n){return e.replace(t,n)}function Cs(e,t){return e.indexOf(t)}function ks(e,t){return 0|e.charCodeAt(t)}function js(e,t,n){return e.slice(t,n)}function Es(e){return e.length}function Ps(e){return e.length}function Ts(e,t){return t.push(e),e}var Rs=1,Is=1,Ns=0,Ms=0,As=0,Ds="";function Os(e,t,n,r,o,i,s){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:Rs,column:Is,length:s,return:""}}function zs(e,t){return ws(Os("",null,null,"",null,null,0),e,{length:-e.length},t)}function Ls(){return As=Ms>0?ks(Ds,--Ms):0,Is--,10===As&&(Is=1,Rs--),As}function Fs(){return As=Ms<Ns?ks(Ds,Ms++):0,Is++,10===As&&(Is=1,Rs++),As}function Bs(){return ks(Ds,Ms)}function Vs(){return Ms}function $s(e,t){return js(Ds,e,t)}function Hs(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Ws(e){return Rs=Is=1,Ns=Es(Ds=e),Ms=0,[]}function Us(e){return Ds="",e}function Gs(e){return _s($s(Ms-1,Ys(91===e?e+2:40===e?e+1:e)))}function Ks(e){for(;(As=Bs())&&As<33;)Fs();return Hs(e)>2||Hs(As)>3?"":" "}function qs(e,t){for(;--t&&Fs()&&!(As<48||As>102||As>57&&As<65||As>70&&As<97););return $s(e,Vs()+(t<6&&32==Bs()&&32==Fs()))}function Ys(e){for(;Fs();)switch(As){case e:return Ms;case 34:case 39:34!==e&&39!==e&&Ys(As);break;case 40:41===e&&Ys(e);break;case 92:Fs()}return Ms}function Xs(e,t){for(;Fs()&&e+As!==57&&(e+As!==84||47!==Bs()););return"/*"+$s(t,Ms-1)+"*"+ys(47===e?e:Fs())}function Zs(e){for(;!Hs(Bs());)Fs();return $s(e,Ms)}var Qs="-ms-",Js="-moz-",ea="-webkit-",ta="comm",na="rule",ra="decl",oa="@keyframes";function ia(e,t){for(var n="",r=Ps(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function sa(e,t,n,r){switch(e.type){case"@import":case ra:return e.return=e.return||e.value;case ta:return"";case oa:return e.return=e.value+"{"+ia(e.children,r)+"}";case na:e.value=e.props.join(",")}return Es(n=ia(e.children,r))?e.return=e.value+"{"+n+"}":""}function aa(e){return Us(la("",null,null,null,[""],e=Ws(e),0,[0],e))}function la(e,t,n,r,o,i,s,a,l){for(var c=0,u=0,d=s,p=0,f=0,h=0,m=1,g=1,v=1,b=0,x="",y=o,w=i,_=r,S=x;g;)switch(h=b,b=Fs()){case 40:if(108!=h&&58==ks(S,d-1)){-1!=Cs(S+=Ss(Gs(b),"&","&\f"),"&\f")&&(v=-1);break}case 34:case 39:case 91:S+=Gs(b);break;case 9:case 10:case 13:case 32:S+=Ks(h);break;case 92:S+=qs(Vs()-1,7);continue;case 47:switch(Bs()){case 42:case 47:Ts(ua(Xs(Fs(),Vs()),t,n),l);break;default:S+="/"}break;case 123*m:a[c++]=Es(S)*v;case 125*m:case 59:case 0:switch(b){case 0:case 125:g=0;case 59+u:f>0&&Es(S)-d&&Ts(f>32?da(S+";",r,n,d-1):da(Ss(S," ","")+";",r,n,d-2),l);break;case 59:S+=";";default:if(Ts(_=ca(S,t,n,c,u,o,a,x,y=[],w=[],d),i),123===b)if(0===u)la(S,t,_,_,y,i,d,a,w);else switch(99===p&&110===ks(S,3)?100:p){case 100:case 109:case 115:la(e,_,_,r&&Ts(ca(e,_,_,0,0,o,a,x,o,y=[],d),w),o,w,d,a,r?y:w);break;default:la(S,_,_,_,[""],w,0,a,w)}}c=u=f=0,m=v=1,x=S="",d=s;break;case 58:d=1+Es(S),f=h;default:if(m<1)if(123==b)--m;else if(125==b&&0==m++&&125==Ls())continue;switch(S+=ys(b),b*m){case 38:v=u>0?1:(S+="\f",-1);break;case 44:a[c++]=(Es(S)-1)*v,v=1;break;case 64:45===Bs()&&(S+=Gs(Fs())),p=Bs(),u=d=Es(x=S+=Zs(Vs())),b++;break;case 45:45===h&&2==Es(S)&&(m=0)}}return i}function ca(e,t,n,r,o,i,s,a,l,c,u){for(var d=o-1,p=0===o?i:[""],f=Ps(p),h=0,m=0,g=0;h<r;++h)for(var v=0,b=js(e,d+1,d=xs(m=s[h])),x=e;v<f;++v)(x=_s(m>0?p[v]+" "+b:Ss(b,/&\f/g,p[v])))&&(l[g++]=x);return Os(e,t,n,0===o?na:a,l,c,u)}function ua(e,t,n){return Os(e,t,n,ta,ys(As),js(e,2,-2),0)}function da(e,t,n,r){return Os(e,t,n,ra,js(e,0,r),js(e,r+1,-1),r)}var pa=function(e,t,n){for(var r=0,o=0;r=o,o=Bs(),38===r&&12===o&&(t[n]=1),!Hs(o);)Fs();return $s(e,Ms)},fa=function(e,t){return Us(function(e,t){var n=-1,r=44;do{switch(Hs(r)){case 0:38===r&&12===Bs()&&(t[n]=1),e[n]+=pa(Ms-1,t,n);break;case 2:e[n]+=Gs(r);break;case 4:if(44===r){e[++n]=58===Bs()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=ys(r)}}while(r=Fs());return e}(Ws(e),t))},ha=new WeakMap,ma=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||ha.get(n))&&!r){ha.set(e,!0);for(var o=[],i=fa(t,o),s=n.props,a=0,l=0;a<i.length;a++)for(var c=0;c<s.length;c++,l++)e.props[l]=o[a]?i[a].replace(/&\f/g,s[c]):s[c]+" "+i[a]}}},ga=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function va(e,t){switch(function(e,t){return 45^ks(e,0)?(((t<<2^ks(e,0))<<2^ks(e,1))<<2^ks(e,2))<<2^ks(e,3):0}(e,t)){case 5103:return ea+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return ea+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return ea+e+Js+e+Qs+e+e;case 6828:case 4268:return ea+e+Qs+e+e;case 6165:return ea+e+Qs+"flex-"+e+e;case 5187:return ea+e+Ss(e,/(\w+).+(:[^]+)/,ea+"box-$1$2"+Qs+"flex-$1$2")+e;case 5443:return ea+e+Qs+"flex-item-"+Ss(e,/flex-|-self/,"")+e;case 4675:return ea+e+Qs+"flex-line-pack"+Ss(e,/align-content|flex-|-self/,"")+e;case 5548:return ea+e+Qs+Ss(e,"shrink","negative")+e;case 5292:return ea+e+Qs+Ss(e,"basis","preferred-size")+e;case 6060:return ea+"box-"+Ss(e,"-grow","")+ea+e+Qs+Ss(e,"grow","positive")+e;case 4554:return ea+Ss(e,/([^-])(transform)/g,"$1"+ea+"$2")+e;case 6187:return Ss(Ss(Ss(e,/(zoom-|grab)/,ea+"$1"),/(image-set)/,ea+"$1"),e,"")+e;case 5495:case 3959:return Ss(e,/(image-set\([^]*)/,ea+"$1$`$1");case 4968:return Ss(Ss(e,/(.+:)(flex-)?(.*)/,ea+"box-pack:$3"+Qs+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ea+e+e;case 4095:case 3583:case 4068:case 2532:return Ss(e,/(.+)-inline(.+)/,ea+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Es(e)-1-t>6)switch(ks(e,t+1)){case 109:if(45!==ks(e,t+4))break;case 102:return Ss(e,/(.+:)(.+)-([^]+)/,"$1"+ea+"$2-$3$1"+Js+(108==ks(e,t+3)?"$3":"$2-$3"))+e;case 115:return~Cs(e,"stretch")?va(Ss(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==ks(e,t+1))break;case 6444:switch(ks(e,Es(e)-3-(~Cs(e,"!important")&&10))){case 107:return Ss(e,":",":"+ea)+e;case 101:return Ss(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ea+(45===ks(e,14)?"inline-":"")+"box$3$1"+ea+"$2$3$1"+Qs+"$2box$3")+e}break;case 5936:switch(ks(e,t+11)){case 114:return ea+e+Qs+Ss(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ea+e+Qs+Ss(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ea+e+Qs+Ss(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ea+e+Qs+e+e}return e}var ba=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case ra:e.return=va(e.value,e.length);break;case oa:return ia([zs(e,{value:Ss(e.value,"@","@"+ea)})],r);case na:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return ia([zs(e,{props:[Ss(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return ia([zs(e,{props:[Ss(t,/:(plac\w+)/,":"+ea+"input-$1")]}),zs(e,{props:[Ss(t,/:(plac\w+)/,":-moz-$1")]}),zs(e,{props:[Ss(t,/:(plac\w+)/,Qs+"input-$1")]})],r)}return""}))}}];const xa=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r=e.stylisPlugins||ba;var o,i,s={},a=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)s[t[n]]=!0;a.push(e)}));var l,c,u,d,p=[sa,(d=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&d(e)})],f=(c=[ma,ga].concat(r,p),u=Ps(c),function(e,t,n,r){for(var o="",i=0;i<u;i++)o+=c[i](e,t,n,r)||"";return o});i=function(e,t,n,r){l=n,function(e){ia(aa(e),f)}(e?e+"{"+t.styles+"}":t.styles),r&&(h.inserted[t.name]=!0)};var h={key:t,sheet:new bs({key:t,container:o,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:s,registered:{},insert:i};return h.sheet.hydrate(a),h};const ya=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)};const wa={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function _a(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var Sa=/[A-Z]|^ms/g,Ca=/_EMO_([^_]+?)_([^]*?)_EMO_/g,ka=function(e){return 45===e.charCodeAt(1)},ja=function(e){return null!=e&&"boolean"!=typeof e},Ea=_a((function(e){return ka(e)?e:e.replace(Sa,"-$&").toLowerCase()})),Pa=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Ca,(function(e,t,n){return Ra={name:t,styles:n,next:Ra},t}))}return 1===wa[e]||ka(e)||"number"!=typeof t||0===t?t:t+"px"};function Ta(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return Ra={name:n.name,styles:n.styles,next:Ra},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)Ra={name:r.name,styles:r.styles,next:Ra},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Ta(e,t,n[o])+";";else for(var i in n){var s=n[i];if("object"!=typeof s)null!=t&&void 0!==t[s]?r+=i+"{"+t[s]+"}":ja(s)&&(r+=Ea(i)+":"+Pa(i,s)+";");else if(!Array.isArray(s)||"string"!=typeof s[0]||null!=t&&void 0!==t[s[0]]){var a=Ta(e,t,s);switch(i){case"animation":case"animationName":r+=Ea(i)+":"+a+";";break;default:r+=i+"{"+a+"}"}}else for(var l=0;l<s.length;l++)ja(s[l])&&(r+=Ea(i)+":"+Pa(i,s[l])+";")}return r}(e,t,n);case"function":if(void 0!==e){var o=Ra,i=n(e);return Ra=o,Ta(e,t,i)}}if(null==t)return n;var s=t[n];return void 0!==s?s:n}var Ra,Ia=/label:\s*([^\s;\n{]+)\s*(;|$)/g;var Na=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";Ra=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=Ta(n,t,i)):o+=i[0];for(var s=1;s<e.length;s++)o+=Ta(n,t,e[s]),r&&(o+=i[s]);Ia.lastIndex=0;for(var a,l="";null!==(a=Ia.exec(o));)l+="-"+a[1];return{name:ya(o)+l,styles:o,next:Ra}},Ma=!!B.useInsertionEffect&&B.useInsertionEffect,Aa=Ma||function(e){return e()},Da=(0,B.createContext)("undefined"!=typeof HTMLElement?xa({key:"css"}):null);var Oa=Da.Provider,za=function(e){return(0,B.forwardRef)((function(t,n){var r=(0,B.useContext)(Da);return e(t,r,n)}))},La=(0,B.createContext)({});function Fa(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}var Ba=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},Va=function(e,t,n){Ba(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0);o=o.next}while(void 0!==o)}};function $a(e,t){if(void 0===e.inserted[t.name])return e.insert("",t,e.sheet,!0)}function Ha(e,t,n){var r=[],o=Fa(e,r,n);return r.length<2?n:o+t(r)}var Wa=function e(t){for(var n="",r=0;r<t.length;r++){var o=t[r];if(null!=o){var i=void 0;switch(typeof o){case"boolean":break;case"object":if(Array.isArray(o))i=e(o);else for(var s in i="",o)o[s]&&s&&(i&&(i+=" "),i+=s);break;default:i=o}i&&(n&&(n+=" "),n+=i)}}return n};const Ua=function(e){var t=xa(e);t.sheet.speedy=function(e){this.isSpeedy=e},t.compat=!0;var n=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o=Na(n,t.registered,void 0);return Va(t,o,!1),t.key+"-"+o.name};return{css:n,cx:function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return Ha(t.registered,n,Wa(r))},injectGlobal:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o=Na(n,t.registered);$a(t,o)},keyframes:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o=Na(n,t.registered),i="animation-"+o.name;return $a(t,{name:o.name,styles:"@keyframes "+i+"{"+o.styles+"}"}),i},hydrate:function(e){e.forEach((function(e){t.inserted[e]=!0}))},flush:function(){t.registered={},t.inserted={},t.sheet.flush()},sheet:t.sheet,cache:t,getRegisteredStyles:Fa.bind(null,t.registered),merge:Ha.bind(null,t.registered,n)}};var Ga=Ua({key:"css"}),Ka=(Ga.flush,Ga.hydrate,Ga.cx);Ga.merge,Ga.getRegisteredStyles,Ga.injectGlobal,Ga.keyframes,Ga.css,Ga.sheet,Ga.cache;const qa=()=>{const e=(0,B.useContext)(Da),t=(0,c.useCallback)(((...t)=>{if(null===e)throw new Error("The `useCx` hook should be only used within a valid Emotion Cache Context");return Ka(...t.map((t=>(e=>null!=e&&["name","styles"].every((t=>void 0!==e[t])))(t)?(Va(e,t,!1),`${e.key}-${t.name}`):t)))}),[e]);return t};function Ya(e,t){const n=os(),r=n?.[t]||{},o={[as]:!0,...(i=t,{[ss]:i})};var i;const{_overrides:s,...a}=r,l=Object.entries(a).length?Object.assign({},a,e):e,c=qa()(vs(t),e.className),u="function"==typeof l.renderChildren?l.renderChildren(l):l.children;for(const e in l)o[e]=l[e];for(const e in s)o[e]=s[e];return void 0!==u&&(o.children=u),o.className=c,o}function Xa(e,t){return Qa(e,t,{forwardsRef:!0})}function Za(e,t){return Qa(e,t)}function Qa(e,t,n){const r=n?.forwardsRef?(0,c.forwardRef)(e):e;let o=r[ls]||[t];return Array.isArray(t)&&(o=[...o,...t]),"string"==typeof t&&(o=[...o,t]),Object.assign(r,{[ls]:[...new Set(o)],displayName:t,selector:`.${vs(t)}`})}function Ja(e){if(!e)return[];let t=[];return e[ls]&&(t=e[ls]),e.type&&e.type[ls]&&(t=e.type[ls]),t}function el(e,t){return!!e&&("string"==typeof t?Ja(e).includes(t):!!Array.isArray(t)&&t.some((t=>Ja(e).includes(t))))}const tl={border:0,clip:"rect(1px, 1px, 1px, 1px)",WebkitClipPath:"inset( 50% )",clipPath:"inset( 50% )",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",wordWrap:"normal"};function nl(){return nl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nl.apply(this,arguments)}var rl=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,ol=_a((function(e){return rl.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),il=function(e){return"theme"!==e},sl=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?ol:il},al=function(e,t,n){var r;if(t){var o=t.shouldForwardProp;r=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},ll=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;Ba(t,n,r);Aa((function(){return Va(t,n,r)}));return null};const cl=function e(t,n){var r,o,i=t.__emotion_real===t,s=i&&t.__emotion_base||t;void 0!==n&&(r=n.label,o=n.target);var a=al(t,n,i),l=a||sl(s),c=!l("as");return function(){var u=arguments,d=i&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==r&&d.push("label:"+r+";"),null==u[0]||void 0===u[0].raw)d.push.apply(d,u);else{0,d.push(u[0][0]);for(var p=u.length,f=1;f<p;f++)d.push(u[f],u[0][f])}var h=za((function(e,t,n){var r=c&&e.as||s,i="",u=[],p=e;if(null==e.theme){for(var f in p={},e)p[f]=e[f];p.theme=(0,B.useContext)(La)}"string"==typeof e.className?i=Fa(t.registered,u,e.className):null!=e.className&&(i=e.className+" ");var h=Na(d.concat(u),t.registered,p);i+=t.key+"-"+h.name,void 0!==o&&(i+=" "+o);var m=c&&void 0===a?sl(r):l,g={};for(var v in e)c&&"as"===v||m(v)&&(g[v]=e[v]);return g.className=i,g.ref=n,(0,B.createElement)(B.Fragment,null,(0,B.createElement)(ll,{cache:t,serialized:h,isStringTag:"string"==typeof r}),(0,B.createElement)(r,g))}));return h.displayName=void 0!==r?r:"Styled("+("string"==typeof s?s:s.displayName||s.name||"Component")+")",h.defaultProps=t.defaultProps,h.__emotion_real=h,h.__emotion_base=s,h.__emotion_styles=d,h.__emotion_forwardProp=a,Object.defineProperty(h,"toString",{value:function(){return"."+o}}),h.withComponent=function(t,r){return e(t,nl({},n,r,{shouldForwardProp:al(h,r,!0)})).apply(void 0,d)},h}},ul=cl("div",{target:"e19lxcc00"})("");const dl=Object.assign((0,c.forwardRef)((function({as:e,...t},n){return(0,wt.jsx)(ul,{as:e,ref:n,...t})})),{selector:".components-view"});const pl=Xa((function(e,t){const{style:n,...r}=Ya(e,"VisuallyHidden");return(0,wt.jsx)(dl,{ref:t,...r,style:{...tl,...n||{}}})}),"VisuallyHidden"),fl=[["top left","top center","top right"],["center left","center center","center right"],["bottom left","bottom center","bottom right"]],hl={"top left":(0,a.__)("Top Left"),"top center":(0,a.__)("Top Center"),"top right":(0,a.__)("Top Right"),"center left":(0,a.__)("Center Left"),"center center":(0,a.__)("Center"),center:(0,a.__)("Center"),"center right":(0,a.__)("Center Right"),"bottom left":(0,a.__)("Bottom Left"),"bottom center":(0,a.__)("Bottom Center"),"bottom right":(0,a.__)("Bottom Right")},ml=fl.flat();function gl(e){const t="center"===e?"center center":e,n=t?.replace("-"," ");return ml.includes(n)?n:void 0}function vl(e,t){const n=gl(t);if(!n)return;return`${e}-${n.replace(" ","-")}`}o(1880);function bl(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Na(t)}var xl=function(){var e=bl.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}};const yl="4px";function wl(e){if(void 0===e)return;if(!e)return"0";const t="number"==typeof e?e:Number(e);return"undefined"!=typeof window&&window.CSS?.supports?.("margin",e.toString())||Number.isNaN(t)?e.toString():`calc(${yl} * ${e})`}const _l="#fff",Sl={900:"#1e1e1e",800:"#2f2f2f",700:"#757575",600:"#949494",400:"#ccc",300:"#ddd",200:"#e0e0e0",100:"#f0f0f0"},Cl={accent:"var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9))",accentDarker10:"var(--wp-components-color-accent-darker-10, var(--wp-admin-theme-color-darker-10, #2145e6))",accentDarker20:"var(--wp-components-color-accent-darker-20, var(--wp-admin-theme-color-darker-20, #183ad6))",accentInverted:`var(--wp-components-color-accent-inverted, ${_l})`,background:`var(--wp-components-color-background, ${_l})`,foreground:`var(--wp-components-color-foreground, ${Sl[900]})`,foregroundInverted:`var(--wp-components-color-foreground-inverted, ${_l})`,gray:{900:`var(--wp-components-color-foreground, ${Sl[900]})`,800:`var(--wp-components-color-gray-800, ${Sl[800]})`,700:`var(--wp-components-color-gray-700, ${Sl[700]})`,600:`var(--wp-components-color-gray-600, ${Sl[600]})`,400:`var(--wp-components-color-gray-400, ${Sl[400]})`,300:`var(--wp-components-color-gray-300, ${Sl[300]})`,200:`var(--wp-components-color-gray-200, ${Sl[200]})`,100:`var(--wp-components-color-gray-100, ${Sl[100]})`}},kl={background:Cl.background,backgroundDisabled:Cl.gray[100],border:Cl.gray[600],borderHover:Cl.gray[700],borderFocus:Cl.accent,borderDisabled:Cl.gray[400],textDisabled:Cl.gray[600],darkGrayPlaceholder:`color-mix(in srgb, ${Cl.foreground}, transparent 38%)`,lightGrayPlaceholder:`color-mix(in srgb, ${Cl.background}, transparent 35%)`},jl=Object.freeze({gray:Sl,white:_l,alert:{yellow:"#f0b849",red:"#d94f4f",green:"#4ab866"},theme:Cl,ui:kl}),El="36px",Pl={controlPaddingX:12,controlPaddingXSmall:8,controlPaddingXLarge:12*1.3334,controlBackgroundColor:jl.white,controlBoxShadowFocus:`0 0 0 0.5px ${jl.theme.accent}`,controlHeight:El,controlHeightXSmall:`calc( ${El} * 0.6 )`,controlHeightSmall:`calc( ${El} * 0.8 )`,controlHeightLarge:`calc( ${El} * 1.2 )`,controlHeightXLarge:`calc( ${El} * 1.4 )`},Tl=Object.assign({},Pl,{colorDivider:"rgba(0, 0, 0, 0.1)",colorScrollbarThumb:"rgba(0, 0, 0, 0.2)",colorScrollbarThumbHover:"rgba(0, 0, 0, 0.5)",colorScrollbarTrack:"rgba(0, 0, 0, 0.04)",elevationIntensity:1,radiusXSmall:"1px",radiusSmall:"2px",radiusMedium:"4px",radiusLarge:"8px",radiusFull:"9999px",radiusRound:"50%",borderWidth:"1px",borderWidthFocus:"1.5px",borderWidthTab:"4px",spinnerSize:16,fontSize:"13px",fontSizeH1:"calc(2.44 * 13px)",fontSizeH2:"calc(1.95 * 13px)",fontSizeH3:"calc(1.56 * 13px)",fontSizeH4:"calc(1.25 * 13px)",fontSizeH5:"13px",fontSizeH6:"calc(0.8 * 13px)",fontSizeInputMobile:"16px",fontSizeMobile:"15px",fontSizeSmall:"calc(0.92 * 13px)",fontSizeXSmall:"calc(0.75 * 13px)",fontLineHeightBase:"1.4",fontWeight:"normal",fontWeightHeading:"600",gridBase:"4px",cardPaddingXSmall:`${wl(2)}`,cardPaddingSmall:`${wl(4)}`,cardPaddingMedium:`${wl(4)} ${wl(6)}`,cardPaddingLarge:`${wl(6)} ${wl(8)}`,elevationXSmall:"0 1px 1px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.02), 0 3px 3px rgba(0, 0, 0, 0.02), 0 4px 4px rgba(0, 0, 0, 0.01)",elevationSmall:"0 1px 2px rgba(0, 0, 0, 0.05), 0 2px 3px rgba(0, 0, 0, 0.04), 0 6px 6px rgba(0, 0, 0, 0.03), 0 8px 8px rgba(0, 0, 0, 0.02)",elevationMedium:"0 2px 3px rgba(0, 0, 0, 0.05), 0 4px 5px rgba(0, 0, 0, 0.04), 0 12px 12px rgba(0, 0, 0, 0.03), 0 16px 16px rgba(0, 0, 0, 0.02)",elevationLarge:"0 5px 15px rgba(0, 0, 0, 0.08), 0 15px 27px rgba(0, 0, 0, 0.07), 0 30px 36px rgba(0, 0, 0, 0.04), 0 50px 43px rgba(0, 0, 0, 0.02)",surfaceBackgroundColor:jl.white,surfaceBackgroundSubtleColor:"#F3F3F3",surfaceBackgroundTintColor:"#F5F5F5",surfaceBorderColor:"rgba(0, 0, 0, 0.1)",surfaceBorderBoldColor:"rgba(0, 0, 0, 0.15)",surfaceBorderSubtleColor:"rgba(0, 0, 0, 0.05)",surfaceBackgroundTertiaryColor:jl.white,surfaceColor:jl.white,transitionDuration:"200ms",transitionDurationFast:"160ms",transitionDurationFaster:"120ms",transitionDurationFastest:"100ms",transitionTimingFunction:"cubic-bezier(0.08, 0.52, 0.52, 1)",transitionTimingFunctionControl:"cubic-bezier(0.12, 0.8, 0.32, 1)"});const Rl=({size:e=92})=>bl("direction:ltr;display:grid;grid-template-columns:repeat( 3, 1fr );grid-template-rows:repeat( 3, 1fr );box-sizing:border-box;width:",e,"px;aspect-ratio:1;border-radius:",Tl.radiusMedium,";outline:none;","");var Il={name:"e0dnmk",styles:"cursor:pointer"};const Nl=cl("div",{target:"e1r95csn3"})(Rl," border:1px solid transparent;",(e=>e.disablePointerEvents?bl("",""):Il),";"),Ml=cl("div",{target:"e1r95csn2"})({name:"1fbxn64",styles:"grid-column:1/-1;box-sizing:border-box;display:grid;grid-template-columns:repeat( 3, 1fr )"}),Al=cl("span",{target:"e1r95csn1"})({name:"e2kws5",styles:"position:relative;display:flex;align-items:center;justify-content:center;box-sizing:border-box;margin:0;padding:0;appearance:none;border:none;outline:none"}),Dl=cl("span",{target:"e1r95csn0"})("display:block;contain:strict;box-sizing:border-box;width:",6,"px;aspect-ratio:1;margin:auto;color:",jl.theme.gray[400],";border:",3,"px solid currentColor;",Al,"[data-active-item] &{color:",jl.gray[900],";transform:scale( calc( 5 / 3 ) );}",Al,":not([data-active-item]):hover &{color:",jl.theme.accent,";}",Al,"[data-focus-visible] &{outline:1px solid ",jl.theme.accent,";outline-offset:1px;}@media not ( prefers-reduced-motion ){transition-property:color,transform;transition-duration:120ms;transition-timing-function:linear;}");function Ol({id:e,value:t,...n}){return(0,wt.jsx)(Yi,{text:hl[t],children:(0,wt.jsxs)(Dn.Item,{id:e,render:(0,wt.jsx)(Al,{...n,role:"gridcell"}),children:[(0,wt.jsx)(pl,{children:t}),(0,wt.jsx)(Dl,{role:"presentation"})]})})}const zl=function({className:e,disablePointerEvents:t=!0,size:r,width:o,height:i,style:a={},value:l="center",...c}){var u,d;return(0,wt.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:null!==(u=null!=r?r:o)&&void 0!==u?u:24,height:null!==(d=null!=r?r:i)&&void 0!==d?d:24,role:"presentation",className:s("component-alignment-matrix-control-icon",e),style:{pointerEvents:t?"none":void 0,...a},...c,children:ml.map(((e,t)=>{const r=function(e="center"){const t=gl(e);if(!t)return;const n=ml.indexOf(t);return n>-1?n:void 0}(l)===t?4:2;return(0,wt.jsx)(n.Rect,{x:1.5+t%3*7+(7-r)/2,y:1.5+7*Math.floor(t/3)+(7-r)/2,width:r,height:r,fill:"currentColor"},e)}))})};const Ll=Object.assign((function e({className:t,id:n,label:r=(0,a.__)("Alignment Matrix Control"),defaultValue:o="center center",value:i,onChange:u,width:d=92,...p}){const f=(0,l.useInstanceId)(e,"alignment-matrix-control",n),h=(0,c.useCallback)((e=>{const t=function(e,t){const n=t?.replace(e+"-","");return gl(n)}(f,e);t&&u?.(t)}),[f,u]),m=s("component-alignment-matrix-control",t);return(0,wt.jsx)(Dn,{defaultActiveId:vl(f,o),activeId:vl(f,i),setActiveId:h,rtl:(0,a.isRTL)(),render:(0,wt.jsx)(Nl,{...p,"aria-label":r,className:m,id:f,role:"grid",size:d}),children:fl.map(((e,t)=>(0,wt.jsx)(Dn.Row,{render:(0,wt.jsx)(Ml,{role:"row"}),children:e.map((e=>(0,wt.jsx)(Ol,{id:vl(f,e),value:e},e)))},t)))})}),{Icon:Object.assign(zl,{displayName:"AlignmentMatrixControl.Icon"})}),Fl=Ll;function Bl(e){return"appear"===e?"top":"left"}function Vl(e){if("loading"===e.type)return"components-animate__loading";const{type:t,origin:n=Bl(t)}=e;if("appear"===t){const[e,t="center"]=n.split(" ");return s("components-animate__appear",{["is-from-"+t]:"center"!==t,["is-from-"+e]:"middle"!==e})}return"slide-in"===t?s("components-animate__slide-in","is-from-"+n):void 0}const $l=function({type:e,options:t={},children:n}){return n({className:Vl({type:e,...t})})},Hl=(0,B.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Wl=(0,B.createContext)({}),Ul=(0,B.createContext)(null),Gl="undefined"!=typeof document,Kl=Gl?B.useLayoutEffect:B.useEffect,ql=(0,B.createContext)({strict:!1}),Yl=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Xl="data-"+Yl("framerAppearId"),Zl=!1,Ql=!1;class Jl{constructor(){this.order=[],this.scheduled=new Set}add(e){if(!this.scheduled.has(e))return this.scheduled.add(e),this.order.push(e),!0}remove(e){const t=this.order.indexOf(e);-1!==t&&(this.order.splice(t,1),this.scheduled.delete(e))}clear(){this.order.length=0,this.scheduled.clear()}}const ec=["read","resolveKeyframes","update","preRender","render","postRender"];function tc(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=ec.reduce(((e,t)=>(e[t]=function(e){let t=new Jl,n=new Jl,r=0,o=!1,i=!1;const s=new WeakSet,a={schedule:(e,i=!1,a=!1)=>{const l=a&&o,c=l?t:n;return i&&s.add(e),c.add(e)&&l&&o&&(r=t.order.length),e},cancel:e=>{n.remove(e),s.delete(e)},process:l=>{if(o)i=!0;else{if(o=!0,[t,n]=[n,t],n.clear(),r=t.order.length,r)for(let n=0;n<r;n++){const r=t.order[n];s.has(r)&&(a.schedule(r),e()),r(l)}o=!1,i&&(i=!1,a.process(l))}}};return a}((()=>n=!0)),e)),{}),s=e=>{i[e].process(o)},a=()=>{const i=Ql?o.timestamp:performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(i-o.timestamp,40),1),o.timestamp=i,o.isProcessing=!0,ec.forEach(s),o.isProcessing=!1,n&&t&&(r=!1,e(a))};return{schedule:ec.reduce(((t,s)=>{const l=i[s];return t[s]=(t,i=!1,s=!1)=>(n||(n=!0,r=!0,o.isProcessing||e(a)),l.schedule(t,i,s)),t}),{}),cancel:e=>ec.forEach((t=>i[t].cancel(e))),state:o,steps:i}}const{schedule:nc,cancel:rc}=tc(queueMicrotask,!1);function oc(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function ic(e,t,n){return(0,B.useCallback)((r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&("function"==typeof n?n(r):oc(n)&&(n.current=r))}),[t])}function sc(e){return"string"==typeof e||Array.isArray(e)}function ac(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}const lc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],cc=["initial",...lc];function uc(e){return ac(e.animate)||cc.some((t=>sc(e[t])))}function dc(e){return Boolean(uc(e)||e.variants)}function pc(e){const{initial:t,animate:n}=function(e,t){if(uc(e)){const{initial:t,animate:n}=e;return{initial:!1===t||sc(t)?t:void 0,animate:sc(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,(0,B.useContext)(Wl));return(0,B.useMemo)((()=>({initial:t,animate:n})),[fc(t),fc(n)])}function fc(e){return Array.isArray(e)?e.join(" "):e}const hc={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},mc={};for(const e in hc)mc[e]={isEnabled:t=>hc[e].some((e=>!!t[e]))};const gc=(0,B.createContext)({}),vc=(0,B.createContext)({}),bc=Symbol.for("motionComponentSymbol");function xc({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&function(e){for(const t in e)mc[t]={...mc[t],...e[t]}}(e);const i=(0,B.forwardRef)((function(i,s){let a;const l={...(0,B.useContext)(Hl),...i,layoutId:yc(i)},{isStatic:c}=l,u=pc(i),d=r(i,c);if(!c&&Gl){u.visualElement=function(e,t,n,r){const{visualElement:o}=(0,B.useContext)(Wl),i=(0,B.useContext)(ql),s=(0,B.useContext)(Ul),a=(0,B.useContext)(Hl).reducedMotion,l=(0,B.useRef)();r=r||i.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:o,props:n,presenceContext:s,blockInitialAnimation:!!s&&!1===s.initial,reducedMotionConfig:a}));const c=l.current;(0,B.useInsertionEffect)((()=>{c&&c.update(n,s)}));const u=(0,B.useRef)(Boolean(n[Xl]&&!window.HandoffComplete));return Kl((()=>{c&&(nc.render(c.render),u.current&&c.animationState&&c.animationState.animateChanges())})),(0,B.useEffect)((()=>{c&&(c.updateFeatures(),!u.current&&c.animationState&&c.animationState.animateChanges(),u.current&&(u.current=!1,window.HandoffComplete=!0))})),c}(o,d,l,t);const n=(0,B.useContext)(vc),r=(0,B.useContext)(ql).strict;u.visualElement&&(a=u.visualElement.loadFeatures(l,r,e,n))}return(0,wt.jsxs)(Wl.Provider,{value:u,children:[a&&u.visualElement?(0,wt.jsx)(a,{visualElement:u.visualElement,...l}):null,n(o,i,ic(d,u.visualElement,s),d,c,u.visualElement)]})}));return i[bc]=o,i}function yc({layoutId:e}){const t=(0,B.useContext)(gc).id;return t&&void 0!==e?t+"-"+e:e}function wc(e){function t(t,n={}){return xc(e(t,n))}if("undefined"==typeof Proxy)return t;const n=new Map;return new Proxy(t,{get:(e,r)=>(n.has(r)||n.set(r,t(r)),n.get(r))})}const _c=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Sc(e){return"string"==typeof e&&!e.includes("-")&&!!(_c.indexOf(e)>-1||/[A-Z]/u.test(e))}const Cc={};const kc=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],jc=new Set(kc);function Ec(e,{layout:t,layoutId:n}){return jc.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!Cc[e]||"opacity"===e)}const Pc=e=>Boolean(e&&e.getVelocity),Tc={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Rc=kc.length;const Ic=e=>t=>"string"==typeof t&&t.startsWith(e),Nc=Ic("--"),Mc=Ic("var(--"),Ac=e=>!!Mc(e)&&Dc.test(e.split("/*")[0].trim()),Dc=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Oc=(e,t)=>t&&"number"==typeof e?t.transform(e):e,zc=(e,t,n)=>n>t?t:n<e?e:n,Lc={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},Fc={...Lc,transform:e=>zc(0,1,e)},Bc={...Lc,default:1},Vc=e=>Math.round(1e5*e)/1e5,$c=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,Hc=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,Wc=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function Uc(e){return"string"==typeof e}const Gc=e=>({test:t=>Uc(t)&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),Kc=Gc("deg"),qc=Gc("%"),Yc=Gc("px"),Xc=Gc("vh"),Zc=Gc("vw"),Qc={...qc,parse:e=>qc.parse(e)/100,transform:e=>qc.transform(100*e)},Jc={...Lc,transform:Math.round},eu={borderWidth:Yc,borderTopWidth:Yc,borderRightWidth:Yc,borderBottomWidth:Yc,borderLeftWidth:Yc,borderRadius:Yc,radius:Yc,borderTopLeftRadius:Yc,borderTopRightRadius:Yc,borderBottomRightRadius:Yc,borderBottomLeftRadius:Yc,width:Yc,maxWidth:Yc,height:Yc,maxHeight:Yc,size:Yc,top:Yc,right:Yc,bottom:Yc,left:Yc,padding:Yc,paddingTop:Yc,paddingRight:Yc,paddingBottom:Yc,paddingLeft:Yc,margin:Yc,marginTop:Yc,marginRight:Yc,marginBottom:Yc,marginLeft:Yc,rotate:Kc,rotateX:Kc,rotateY:Kc,rotateZ:Kc,scale:Bc,scaleX:Bc,scaleY:Bc,scaleZ:Bc,skew:Kc,skewX:Kc,skewY:Kc,distance:Yc,translateX:Yc,translateY:Yc,translateZ:Yc,x:Yc,y:Yc,z:Yc,perspective:Yc,transformPerspective:Yc,opacity:Fc,originX:Qc,originY:Qc,originZ:Yc,zIndex:Jc,backgroundPositionX:Yc,backgroundPositionY:Yc,fillOpacity:Fc,strokeOpacity:Fc,numOctaves:Jc};function tu(e,t,n,r){const{style:o,vars:i,transform:s,transformOrigin:a}=e;let l=!1,c=!1,u=!0;for(const e in t){const n=t[e];if(Nc(e)){i[e]=n;continue}const r=eu[e],d=Oc(n,r);if(jc.has(e)){if(l=!0,s[e]=d,!u)continue;n!==(r.default||0)&&(u=!1)}else e.startsWith("origin")?(c=!0,a[e]=d):o[e]=d}if(t.transform||(l||r?o.transform=function(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,o){let i="";for(let t=0;t<Rc;t++){const n=kc[t];void 0!==e[n]&&(i+=`${Tc[n]||n}(${e[n]}) `)}return t&&!e.z&&(i+="translateZ(0)"),i=i.trim(),o?i=o(e,r?"":i):n&&r&&(i="none"),i}(e.transform,n,u,r):o.transform&&(o.transform="none")),c){const{originX:e="50%",originY:t="50%",originZ:n=0}=a;o.transformOrigin=`${e} ${t} ${n}`}}const nu=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ru(e,t,n){for(const r in t)Pc(t[r])||Ec(r,n)||(e[r]=t[r])}function ou(e,t,n){const r={};return ru(r,e.style||{},e),Object.assign(r,function({transformTemplate:e},t,n){return(0,B.useMemo)((()=>{const r=nu();return tu(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)}),[t])}(e,t,n)),r}function iu(e,t,n){const r={},o=ou(e,t,n);return e.drag&&!1!==e.dragListener&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=o,r}const su=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function au(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||su.has(e)}let lu=e=>!au(e);try{(cu=require("@emotion/is-prop-valid").default)&&(lu=e=>e.startsWith("on")?!au(e):cu(e))}catch(U){}var cu;function uu(e,t,n){return"string"==typeof e?e:Yc.transform(t+n*e)}const du={offset:"stroke-dashoffset",array:"stroke-dasharray"},pu={offset:"strokeDashoffset",array:"strokeDasharray"};function fu(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...c},u,d,p){if(tu(e,c,u,p),d)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:f,style:h,dimensions:m}=e;f.transform&&(m&&(h.transform=f.transform),delete f.transform),m&&(void 0!==o||void 0!==i||h.transform)&&(h.transformOrigin=function(e,t,n){return`${uu(t,e.x,e.width)} ${uu(n,e.y,e.height)}`}(m,void 0!==o?o:.5,void 0!==i?i:.5)),void 0!==t&&(f.x=t),void 0!==n&&(f.y=n),void 0!==r&&(f.scale=r),void 0!==s&&function(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?du:pu;e[i.offset]=Yc.transform(-r);const s=Yc.transform(t),a=Yc.transform(n);e[i.array]=`${s} ${a}`}(f,s,a,l,!1)}const hu=()=>({...nu(),attrs:{}}),mu=e=>"string"==typeof e&&"svg"===e.toLowerCase();function gu(e,t,n,r){const o=(0,B.useMemo)((()=>{const n=hu();return fu(n,t,{enableHardwareAcceleration:!1},mu(r),e.transformTemplate),{...n.attrs,style:{...n.style}}}),[t]);if(e.style){const t={};ru(t,e.style,e),o.style={...t,...o.style}}return o}function vu(e=!1){return(t,n,r,{latestValues:o},i)=>{const s=(Sc(t)?gu:iu)(n,o,i,t),a=function(e,t,n){const r={};for(const o in e)"values"===o&&"object"==typeof e.values||(lu(o)||!0===n&&au(o)||!t&&!au(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}(n,"string"==typeof t,e),l=t!==B.Fragment?{...a,...s,ref:r}:{},{children:c}=n,u=(0,B.useMemo)((()=>Pc(c)?c.get():c),[c]);return(0,B.createElement)(t,{...l,children:u})}}function bu(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const t in n)e.style.setProperty(t,n[t])}const xu=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function yu(e,t,n,r){bu(e,t,void 0,r);for(const n in t.attrs)e.setAttribute(xu.has(n)?n:Yl(n),t.attrs[n])}function wu(e,t,n){var r;const{style:o}=e,i={};for(const s in o)(Pc(o[s])||t.style&&Pc(t.style[s])||Ec(s,e)||void 0!==(null===(r=null==n?void 0:n.getValue(s))||void 0===r?void 0:r.liveStyle))&&(i[s]=o[s]);return i}function _u(e,t,n){const r=wu(e,t,n);for(const n in e)if(Pc(e[n])||Pc(t[n])){r[-1!==kc.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=e[n]}return r}function Su(e){const t=[{},{}];return null==e||e.values.forEach(((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()})),t}function Cu(e,t,n,r){if("function"==typeof t){const[o,i]=Su(r);t=t(void 0!==n?n:e.custom,o,i)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){const[o,i]=Su(r);t=t(void 0!==n?n:e.custom,o,i)}return t}function ku(e){const t=(0,B.useRef)(null);return null===t.current&&(t.current=e()),t.current}const ju=e=>Array.isArray(e),Eu=e=>Boolean(e&&"object"==typeof e&&e.mix&&e.toValue),Pu=e=>ju(e)?e[e.length-1]||0:e;function Tu(e){const t=Pc(e)?e.get():e;return Eu(t)?t.toValue():t}const Ru=e=>(t,n)=>{const r=(0,B.useContext)(Wl),o=(0,B.useContext)(Ul),i=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,o,i){const s={latestValues:Iu(r,o,i,e),renderState:t()};return n&&(s.mount=e=>n(r,e,s)),s}(e,t,r,o);return n?i():ku(i)};function Iu(e,t,n,r){const o={},i=r(e,{});for(const e in i)o[e]=Tu(i[e]);let{initial:s,animate:a}=e;const l=uc(e),c=dc(e);t&&c&&!l&&!1!==e.inherit&&(void 0===s&&(s=t.initial),void 0===a&&(a=t.animate));let u=!!n&&!1===n.initial;u=u||!1===s;const d=u?a:s;if(d&&"boolean"!=typeof d&&!ac(d)){(Array.isArray(d)?d:[d]).forEach((t=>{const n=Cu(e,t);if(!n)return;const{transitionEnd:r,transition:i,...s}=n;for(const e in s){let t=s[e];if(Array.isArray(t)){t=t[u?t.length-1:0]}null!==t&&(o[e]=t)}for(const e in r)o[e]=r[e]}))}return o}const Nu=e=>e,{schedule:Mu,cancel:Au,state:Du,steps:Ou}=tc("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:Nu,!0),zu={useVisualState:Ru({scrapeMotionValuesFromProps:_u,createRenderState:hu,onMount:(e,t,{renderState:n,latestValues:r})=>{Mu.read((()=>{try{n.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(e){n.dimensions={x:0,y:0,width:0,height:0}}})),Mu.render((()=>{fu(n,r,{enableHardwareAcceleration:!1},mu(t.tagName),e.transformTemplate),yu(t,n)}))}})},Lu={useVisualState:Ru({scrapeMotionValuesFromProps:wu,createRenderState:nu})};function Fu(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Bu=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function Vu(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const $u=e=>t=>Bu(t)&&e(t,Vu(t));function Hu(e,t,n,r){return Fu(e,t,$u(n),r)}const Wu=(e,t)=>n=>t(e(n)),Uu=(...e)=>e.reduce(Wu);function Gu(e){let t=null;return()=>{const n=()=>{t=null};return null===t&&(t=e,n)}}const Ku=Gu("dragHorizontal"),qu=Gu("dragVertical");function Yu(e){let t=!1;if("y"===e)t=qu();else if("x"===e)t=Ku();else{const e=Ku(),n=qu();e&&n?t=()=>{e(),n()}:(e&&e(),n&&n())}return t}function Xu(){const e=Yu(!0);return!e||(e(),!1)}class Zu{constructor(e){this.isMounted=!1,this.node=e}update(){}}function Qu(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd";return Hu(e.current,n,((n,o)=>{if("touch"===n.pointerType||Xu())return;const i=e.getProps();e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",t);const s=i[r];s&&Mu.postRender((()=>s(n,o)))}),{passive:!e.getProps()[r]})}const Ju=(e,t)=>!!t&&(e===t||Ju(e,t.parentElement));function ed(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Vu(n))}const td=new WeakMap,nd=new WeakMap,rd=e=>{const t=td.get(e.target);t&&t(e)},od=e=>{e.forEach(rd)};function id(e,t,n){const r=function({root:e,...t}){const n=e||document;nd.has(n)||nd.set(n,{});const r=nd.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(od,{root:e,...t})),r[o]}(t);return td.set(e,n),r.observe(e),()=>{td.delete(e),r.unobserve(e)}}const sd={some:0,all:1};const ad={inView:{Feature:class extends Zu{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:o}=e,i={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:sd[r]};return id(this.node.current,i,(e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,o&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),i=t?n:r;i&&i(e)}))}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends Zu{constructor(){super(...arguments),this.removeStartListeners=Nu,this.removeEndListeners=Nu,this.removeAccessibleListeners=Nu,this.startPointerPress=(e,t)=>{if(this.isPressing)return;this.removeEndListeners();const n=this.node.getProps(),r=Hu(window,"pointerup",((e,t)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:r,globalTapTarget:o}=this.node.getProps(),i=o||Ju(this.node.current,e.target)?n:r;i&&Mu.update((()=>i(e,t)))}),{passive:!(n.onTap||n.onPointerUp)}),o=Hu(window,"pointercancel",((e,t)=>this.cancelPress(e,t)),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=Uu(r,o),this.startPress(e,t)},this.startAccessiblePress=()=>{const e=Fu(this.node.current,"keydown",(e=>{if("Enter"!==e.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=Fu(this.node.current,"keyup",(e=>{"Enter"===e.key&&this.checkPressEnd()&&ed("up",((e,t)=>{const{onTap:n}=this.node.getProps();n&&Mu.postRender((()=>n(e,t)))}))})),ed("down",((e,t)=>{this.startPress(e,t)}))})),t=Fu(this.node.current,"blur",(()=>{this.isPressing&&ed("cancel",((e,t)=>this.cancelPress(e,t)))}));this.removeAccessibleListeners=Uu(e,t)}}startPress(e,t){this.isPressing=!0;const{onTapStart:n,whileTap:r}=this.node.getProps();r&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&Mu.postRender((()=>n(e,t)))}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;return this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Xu()}cancelPress(e,t){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&Mu.postRender((()=>n(e,t)))}mount(){const e=this.node.getProps(),t=Hu(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),n=Fu(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Uu(t,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends Zu{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Uu(Fu(this.node.current,"focus",(()=>this.onFocus())),Fu(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends Zu{mount(){this.unmount=Uu(Qu(this.node,!0),Qu(this.node,!1))}unmount(){}}}};function ld(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function cd(e,t,n){const r=e.getProps();return Cu(r,t,void 0!==n?n:r.custom,e)}const ud=e=>1e3*e,dd=e=>e/1e3,pd={type:"spring",stiffness:500,damping:25,restSpeed:10},fd={type:"keyframes",duration:.8},hd={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},md=(e,{keyframes:t})=>t.length>2?fd:jc.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:pd:hd;function gd(e,t){return e[t]||e.default||e}const vd=!1,bd=e=>null!==e;function xd(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(bd),i=t&&"loop"!==n&&t%2==1?0:o.length-1;return i&&void 0!==r?r:o[i]}let yd;function wd(){yd=void 0}const _d={now:()=>(void 0===yd&&_d.set(Du.isProcessing||Ql?Du.timestamp:performance.now()),yd),set:e=>{yd=e,queueMicrotask(wd)}},Sd=e=>/^0[^.\s]+$/u.test(e);let Cd=Nu,kd=Nu;const jd=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Ed=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Pd(e,t,n=1){kd(n<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=function(e){const t=Ed.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${null!=n?n:r}`,o]}(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const e=i.trim();return jd(e)?parseFloat(e):e}return Ac(o)?Pd(o,t,n+1):o}const Td=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Rd=e=>e===Lc||e===Yc,Id=(e,t)=>parseFloat(e.split(", ")[t]),Nd=(e,t)=>(n,{transform:r})=>{if("none"===r||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return Id(o[1],t);{const t=r.match(/^matrix\((.+)\)$/u);return t?Id(t[1],e):0}},Md=new Set(["x","y","z"]),Ad=kc.filter((e=>!Md.has(e)));const Dd={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Nd(4,13),y:Nd(5,14)};Dd.translateX=Dd.x,Dd.translateY=Dd.y;const Od=e=>t=>t.test(e),zd=[Lc,Yc,qc,Kc,Zc,Xc,{test:e=>"auto"===e,parse:e=>e}],Ld=e=>zd.find(Od(e)),Fd=new Set;let Bd=!1,Vd=!1;function $d(){if(Vd){const e=Array.from(Fd).filter((e=>e.needsMeasurement)),t=new Set(e.map((e=>e.element))),n=new Map;t.forEach((e=>{const t=function(e){const t=[];return Ad.forEach((n=>{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),t}(e);t.length&&(n.set(e,t),e.render())})),e.forEach((e=>e.measureInitialState())),t.forEach((e=>{e.render();const t=n.get(e);t&&t.forEach((([t,n])=>{var r;null===(r=e.getValue(t))||void 0===r||r.set(n)}))})),e.forEach((e=>e.measureEndState())),e.forEach((e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)}))}Vd=!1,Bd=!1,Fd.forEach((e=>e.complete())),Fd.clear()}function Hd(){Fd.forEach((e=>{e.readKeyframes(),e.needsMeasurement&&(Vd=!0)}))}class Wd{constructor(e,t,n,r,o,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=o,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Fd.add(this),Bd||(Bd=!0,Mu.read(Hd),Mu.resolveKeyframes($d))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;for(let o=0;o<e.length;o++)if(null===e[o])if(0===o){const o=null==r?void 0:r.get(),i=e[e.length-1];if(void 0!==o)e[0]=o;else if(n&&t){const r=n.readValue(t,i);null!=r&&(e[0]=r)}void 0===e[0]&&(e[0]=i),r&&void 0===o&&r.set(e[0])}else e[o]=e[o-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Fd.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Fd.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Ud=(e,t)=>n=>Boolean(Uc(n)&&Wc.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),Gd=(e,t,n)=>r=>{if(!Uc(r))return r;const[o,i,s,a]=r.match($c);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(s),alpha:void 0!==a?parseFloat(a):1}},Kd={...Lc,transform:e=>Math.round((e=>zc(0,255,e))(e))},qd={test:Ud("rgb","red"),parse:Gd("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Kd.transform(e)+", "+Kd.transform(t)+", "+Kd.transform(n)+", "+Vc(Fc.transform(r))+")"};const Yd={test:Ud("#"),parse:function(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:qd.transform},Xd={test:Ud("hsl","hue"),parse:Gd("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+qc.transform(Vc(t))+", "+qc.transform(Vc(n))+", "+Vc(Fc.transform(r))+")"},Zd={test:e=>qd.test(e)||Yd.test(e)||Xd.test(e),parse:e=>qd.test(e)?qd.parse(e):Xd.test(e)?Xd.parse(e):Yd.parse(e),transform:e=>Uc(e)?e:e.hasOwnProperty("red")?qd.transform(e):Xd.transform(e)};const Qd="number",Jd="color",ep="var",tp="var(",np="${}",rp=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function op(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const s=t.replace(rp,(e=>(Zd.test(e)?(r.color.push(i),o.push(Jd),n.push(Zd.parse(e))):e.startsWith(tp)?(r.var.push(i),o.push(ep),n.push(e)):(r.number.push(i),o.push(Qd),n.push(parseFloat(e))),++i,np))).split(np);return{values:n,split:s,indexes:r,types:o}}function ip(e){return op(e).values}function sp(e){const{split:t,types:n}=op(e),r=t.length;return e=>{let o="";for(let i=0;i<r;i++)if(o+=t[i],void 0!==e[i]){const t=n[i];o+=t===Qd?Vc(e[i]):t===Jd?Zd.transform(e[i]):e[i]}return o}}const ap=e=>"number"==typeof e?0:e;const lp={test:function(e){var t,n;return isNaN(e)&&Uc(e)&&((null===(t=e.match($c))||void 0===t?void 0:t.length)||0)+((null===(n=e.match(Hc))||void 0===n?void 0:n.length)||0)>0},parse:ip,createTransformer:sp,getAnimatableNone:function(e){const t=ip(e);return sp(e)(t.map(ap))}},cp=new Set(["brightness","contrast","saturate","opacity"]);function up(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match($c)||[];if(!r)return e;const o=n.replace(r,"");let i=cp.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const dp=/\b([a-z-]*)\(.*?\)/gu,pp={...lp,getAnimatableNone:e=>{const t=e.match(dp);return t?t.map(up).join(" "):e}},fp={...eu,color:Zd,backgroundColor:Zd,outlineColor:Zd,fill:Zd,stroke:Zd,borderColor:Zd,borderTopColor:Zd,borderRightColor:Zd,borderBottomColor:Zd,borderLeftColor:Zd,filter:pp,WebkitFilter:pp},hp=e=>fp[e];function mp(e,t){let n=hp(e);return n!==pp&&(n=lp),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const gp=new Set(["auto","none","0"]);class vp extends Wd{constructor(e,t,n,r){super(e,t,n,r,null==r?void 0:r.owner,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:n}=this;if(!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){const r=e[n];if("string"==typeof r&&Ac(r)){const o=Pd(r,t.current);void 0!==o&&(e[n]=o),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!Td.has(n)||2!==e.length)return;const[r,o]=e,i=Ld(r),s=Ld(o);if(i!==s)if(Rd(i)&&Rd(s))for(let t=0;t<e.length;t++){const n=e[t];"string"==typeof n&&(e[t]=parseFloat(n))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)("number"==typeof(r=e[t])?0===r:null===r||"none"===r||"0"===r||Sd(r))&&n.push(t);var r;n.length&&function(e,t,n){let r,o=0;for(;o<e.length&&!r;){const t=e[o];"string"==typeof t&&!gp.has(t)&&op(t).values.length&&(r=e[o]),o++}if(r&&n)for(const o of t)e[o]=mp(n,r)}(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Dd[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const r=t[t.length-1];void 0!==r&&e.getValue(n,r).jump(r,!1)}measureEndState(){var e;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const i=r.length-1,s=r[i];r[i]=Dd[n](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==s&&void 0===this.finalKeyframe&&(this.finalKeyframe=s),(null===(e=this.removedTransforms)||void 0===e?void 0:e.length)&&this.removedTransforms.forEach((([e,n])=>{t.getValue(e).set(n)})),this.resolveNoneKeyframes()}}const bp=(e,t)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!lp.test(e)&&"0"!==e||e.startsWith("url(")));class xp{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i="loop",...s}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.options={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:o,repeatType:i,...s},this.updateFinishedPromise()}get resolved(){return this._resolved||this.hasAttemptedResolve||(Hd(),$d()),this._resolved}onKeyframesResolved(e,t){this.hasAttemptedResolve=!0;const{name:n,type:r,velocity:o,delay:i,onComplete:s,onUpdate:a,isGenerator:l}=this.options;if(!l&&!function(e,t,n,r){const o=e[0];if(null===o)return!1;if("display"===t||"visibility"===t)return!0;const i=e[e.length-1],s=bp(o,t),a=bp(i,t);return Cd(s===a,`You are trying to animate ${t} from "${o}" to "${i}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${i} via the \`style\` property.`),!(!s||!a)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||"spring"===n&&r)}(e,n,r,o)){if(vd||!i)return null==a||a(xd(e,this.options,t)),null==s||s(),void this.resolveFinishedPromise();this.options.duration=0}const c=this.initPlayback(e,t);!1!==c&&(this._resolved={keyframes:e,finalKeyframe:t,...c},this.onPostResolved())}onPostResolved(){}then(e,t){return this.currentFinishedPromise.then(e,t)}updateFinishedPromise(){this.currentFinishedPromise=new Promise((e=>{this.resolveFinishedPromise=e}))}}function yp(e,t){return t?e*(1e3/t):0}const wp=5;function _p(e,t,n){const r=Math.max(t-wp,0);return yp(n-e(r),t-r)}const Sp=.001,Cp=.01,kp=10,jp=.05,Ep=1;function Pp({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,i;Cd(e<=ud(kp),"Spring duration must be 10 seconds or less");let s=1-t;s=zc(jp,Ep,s),e=zc(Cp,kp,dd(e)),s<1?(o=t=>{const r=t*s,o=r*e,i=r-n,a=Rp(t,s),l=Math.exp(-o);return Sp-i/a*l},i=t=>{const r=t*s*e,i=r*n+n,a=Math.pow(s,2)*Math.pow(t,2)*e,l=Math.exp(-r),c=Rp(Math.pow(t,2),s);return(-o(t)+Sp>0?-1:1)*((i-a)*l)/c}):(o=t=>Math.exp(-t*e)*((t-n)*e+1)-Sp,i=t=>Math.exp(-t*e)*(e*e*(n-t)));const a=function(e,t,n){let r=n;for(let n=1;n<Tp;n++)r-=e(r)/t(r);return r}(o,i,5/e);if(e=ud(e),isNaN(a))return{stiffness:100,damping:10,duration:e};{const t=Math.pow(a,2)*r;return{stiffness:t,damping:2*s*Math.sqrt(r*t),duration:e}}}const Tp=12;function Rp(e,t){return e*Math.sqrt(1-t*t)}const Ip=["duration","bounce"],Np=["stiffness","damping","mass"];function Mp(e,t){return t.some((t=>void 0!==e[t]))}function Ap({keyframes:e,restDelta:t,restSpeed:n,...r}){const o=e[0],i=e[e.length-1],s={done:!1,value:o},{stiffness:a,damping:l,mass:c,duration:u,velocity:d,isResolvedFromDuration:p}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!Mp(e,Np)&&Mp(e,Ip)){const n=Pp(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}({...r,velocity:-dd(r.velocity||0)}),f=d||0,h=l/(2*Math.sqrt(a*c)),m=i-o,g=dd(Math.sqrt(a/c)),v=Math.abs(m)<5;let b;if(n||(n=v?.01:2),t||(t=v?.005:.5),h<1){const e=Rp(g,h);b=t=>{const n=Math.exp(-h*g*t);return i-n*((f+h*g*m)/e*Math.sin(e*t)+m*Math.cos(e*t))}}else if(1===h)b=e=>i-Math.exp(-g*e)*(m+(f+g*m)*e);else{const e=g*Math.sqrt(h*h-1);b=t=>{const n=Math.exp(-h*g*t),r=Math.min(e*t,300);return i-n*((f+h*g*m)*Math.sinh(r)+e*m*Math.cosh(r))/e}}return{calculatedDuration:p&&u||null,next:e=>{const r=b(e);if(p)s.done=e>=u;else{let o=f;0!==e&&(o=h<1?_p(b,e,r):0);const a=Math.abs(o)<=n,l=Math.abs(i-r)<=t;s.done=a&&l}return s.value=s.done?i:r,s}}}function Dp({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:s,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],p={done:!1,value:d},f=e=>void 0===a?l:void 0===l||Math.abs(a-e)<Math.abs(l-e)?a:l;let h=n*t;const m=d+h,g=void 0===s?m:s(m);g!==m&&(h=g-d);const v=e=>-h*Math.exp(-e/r),b=e=>g+v(e),x=e=>{const t=v(e),n=b(e);p.done=Math.abs(t)<=c,p.value=p.done?g:n};let y,w;const _=e=>{(e=>void 0!==a&&e<a||void 0!==l&&e>l)(p.value)&&(y=e,w=Ap({keyframes:[p.value,f(p.value)],velocity:_p(b,e,p.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return _(0),{calculatedDuration:null,next:e=>{let t=!1;return w||void 0!==y||(t=!0,x(e),_(e)),void 0!==y&&e>=y?w.next(e-y):(!t&&x(e),p)}}}const Op=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,zp=1e-7,Lp=12;function Fp(e,t,n,r){if(e===t&&n===r)return Nu;const o=t=>function(e,t,n,r,o){let i,s,a=0;do{s=t+(n-t)/2,i=Op(s,r,o)-e,i>0?n=s:t=s}while(Math.abs(i)>zp&&++a<Lp);return s}(t,0,1,e,n);return e=>0===e||1===e?e:Op(o(e),t,r)}const Bp=Fp(.42,0,1,1),Vp=Fp(0,0,.58,1),$p=Fp(.42,0,.58,1),Hp=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Wp=e=>t=>1-e(1-t),Up=e=>1-Math.sin(Math.acos(e)),Gp=Wp(Up),Kp=Hp(Up),qp=Fp(.33,1.53,.69,.99),Yp=Wp(qp),Xp=Hp(Yp),Zp={linear:Nu,easeIn:Bp,easeInOut:$p,easeOut:Vp,circIn:Up,circInOut:Kp,circOut:Gp,backIn:Yp,backInOut:Xp,backOut:qp,anticipate:e=>(e*=2)<1?.5*Yp(e):.5*(2-Math.pow(2,-10*(e-1)))},Qp=e=>{if(Array.isArray(e)){kd(4===e.length,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return Fp(t,n,r,o)}return"string"==typeof e?(kd(void 0!==Zp[e],`Invalid easing type '${e}'`),Zp[e]):e},Jp=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r},ef=(e,t,n)=>e+(t-e)*n;function tf(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}const nf=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},rf=[Yd,qd,Xd];function of(e){const t=(e=>rf.find((t=>t.test(e))))(e);kd(Boolean(t),`'${e}' is not an animatable color. Use the equivalent color code instead.`);let n=t.parse(e);return t===Xd&&(n=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let o=0,i=0,s=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,a=2*n-r;o=tf(a,r,e+1/3),i=tf(a,r,e),s=tf(a,r,e-1/3)}else o=i=s=n;return{red:Math.round(255*o),green:Math.round(255*i),blue:Math.round(255*s),alpha:r}}(n)),n}const sf=(e,t)=>{const n=of(e),r=of(t),o={...n};return e=>(o.red=nf(n.red,r.red,e),o.green=nf(n.green,r.green,e),o.blue=nf(n.blue,r.blue,e),o.alpha=ef(n.alpha,r.alpha,e),qd.transform(o))},af=new Set(["none","hidden"]);function lf(e,t){return n=>n>0?t:e}function cf(e,t){return n=>ef(e,t,n)}function uf(e){return"number"==typeof e?cf:"string"==typeof e?Ac(e)?lf:Zd.test(e)?sf:ff:Array.isArray(e)?df:"object"==typeof e?Zd.test(e)?sf:pf:lf}function df(e,t){const n=[...e],r=n.length,o=e.map(((e,n)=>uf(e)(e,t[n])));return e=>{for(let t=0;t<r;t++)n[t]=o[t](e);return n}}function pf(e,t){const n={...e,...t},r={};for(const o in n)void 0!==e[o]&&void 0!==t[o]&&(r[o]=uf(e[o])(e[o],t[o]));return e=>{for(const t in r)n[t]=r[t](e);return n}}const ff=(e,t)=>{const n=lp.createTransformer(t),r=op(e),o=op(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?af.has(e)&&!o.values.length||af.has(t)&&!r.values.length?function(e,t){return af.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):Uu(df(function(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const s=t.types[i],a=e.indexes[s][o[s]],l=null!==(n=e.values[a])&&void 0!==n?n:0;r[i]=l,o[s]++}return r}(r,o),o.values),n):(Cd(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),lf(e,t))};function hf(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return ef(e,t,n);return uf(e)(e,t)}function mf(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(kd(i===t.length,"Both input and output ranges must be the same length"),1===i)return()=>t[0];if(2===i&&e[0]===e[1])return()=>t[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=function(e,t,n){const r=[],o=n||hf,i=e.length-1;for(let n=0;n<i;n++){let i=o(e[n],e[n+1]);if(t){const e=Array.isArray(t)?t[n]||Nu:t;i=Uu(e,i)}r.push(i)}return r}(t,r,o),a=s.length,l=t=>{let n=0;if(a>1)for(;n<e.length-2&&!(t<e[n+1]);n++);const r=Jp(e[n],e[n+1],t);return s[n](r)};return n?t=>l(zc(e[0],e[i-1],t)):l}function gf(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Jp(0,t,r);e.push(ef(n,1,o))}}(t,e.length-1),t}function vf({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=(e=>Array.isArray(e)&&"number"!=typeof e[0])(r)?r.map(Qp):Qp(r),i={done:!1,value:t[0]},s=function(e,t){return e.map((e=>e*t))}(n&&n.length===t.length?n:gf(t),e),a=mf(s,t,{ease:Array.isArray(o)?o:(l=t,c=o,l.map((()=>c||$p)).splice(0,l.length-1))});var l,c;return{calculatedDuration:e,next:t=>(i.value=a(t),i.done=t>=e,i)}}const bf=e=>{const t=({timestamp:t})=>e(t);return{start:()=>Mu.update(t,!0),stop:()=>Au(t),now:()=>Du.isProcessing?Du.timestamp:_d.now()}},xf={decay:Dp,inertia:Dp,tween:vf,keyframes:vf,spring:Ap},yf=e=>e/100;class wf extends xp{constructor({KeyframeResolver:e=Wd,...t}){super(t),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();const{onStop:e}=this.options;e&&e()};const{name:n,motionValue:r,keyframes:o}=this.options,i=(e,t)=>this.onKeyframesResolved(e,t);n&&r&&r.owner?this.resolver=r.owner.resolveKeyframes(o,i,n,r):this.resolver=new e(o,i,n,r),this.resolver.scheduleResolve()}initPlayback(e){const{type:t="keyframes",repeat:n=0,repeatDelay:r=0,repeatType:o,velocity:i=0}=this.options,s=xf[t]||vf;let a,l;s!==vf&&"number"!=typeof e[0]&&(a=Uu(yf,hf(e[0],e[1])),e=[0,100]);const c=s({...this.options,keyframes:e});"mirror"===o&&(l=s({...this.options,keyframes:[...e].reverse(),velocity:-i})),null===c.calculatedDuration&&(c.calculatedDuration=function(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}(c));const{calculatedDuration:u}=c,d=u+r;return{generator:c,mirroredGenerator:l,mapPercentToKeyframes:a,calculatedDuration:u,resolvedDuration:d,totalDuration:d*(n+1)-r}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&e?this.state=this.pendingPlayState:this.pause()}tick(e,t=!1){const{resolved:n}=this;if(!n){const{keyframes:e}=this.options;return{done:!0,value:e[e.length-1]}}const{finalKeyframe:r,generator:o,mirroredGenerator:i,mapPercentToKeyframes:s,keyframes:a,calculatedDuration:l,totalDuration:c,resolvedDuration:u}=n;if(null===this.startTime)return o.next(0);const{delay:d,repeat:p,repeatType:f,repeatDelay:h,onUpdate:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-c/this.speed,this.startTime)),t?this.currentTime=e:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const g=this.currentTime-d*(this.speed>=0?1:-1),v=this.speed>=0?g<0:g>c;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=c);let b=this.currentTime,x=o;if(p){const e=Math.min(this.currentTime,c)/u;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,p+1);Boolean(t%2)&&("reverse"===f?(n=1-n,h&&(n-=h/u)):"mirror"===f&&(x=i)),b=zc(0,1,n)*u}const y=v?{done:!1,value:a[0]}:x.next(b);s&&(y.value=s(y.value));let{done:w}=y;v||null===l||(w=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const _=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return _&&void 0!==r&&(y.value=xd(a,this.options,r)),m&&m(y.value),_&&this.finish(),y}get duration(){const{resolved:e}=this;return e?dd(e.calculatedDuration):0}get time(){return dd(this.currentTime)}set time(e){e=ud(e),this.currentTime=e,null!==this.holdTime||0===this.speed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=dd(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:e=bf,onPlay:t}=this.options;this.driver||(this.driver=e((e=>this.tick(e)))),t&&t();const n=this.driver.now();null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime&&"finished"!==this.state||(this.startTime=n),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;this._resolved?(this.state="paused",this.holdTime=null!==(e=this.currentTime)&&void 0!==e?e:0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const _f=e=>Array.isArray(e)&&"number"==typeof e[0];function Sf(e){return Boolean(!e||"string"==typeof e&&e in kf||_f(e)||Array.isArray(e)&&e.every(Sf))}const Cf=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,kf={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Cf([0,.65,.55,1]),circOut:Cf([.55,0,1,.45]),backIn:Cf([.31,.01,.66,-.59]),backOut:Cf([.33,1.53,.69,.99])};function jf(e){return Ef(e)||kf.easeOut}function Ef(e){return e?_f(e)?Cf(e):Array.isArray(e)?e.map(jf):kf[e]:void 0}const Pf=function(e){let t;return()=>(void 0===t&&(t=e()),t)}((()=>Object.hasOwnProperty.call(Element.prototype,"animate"))),Tf=new Set(["opacity","clipPath","filter","transform"]);class Rf extends xp{constructor(e){super(e);const{name:t,motionValue:n,keyframes:r}=this.options;this.resolver=new vp(r,((e,t)=>this.onKeyframesResolved(e,t)),t,n),this.resolver.scheduleResolve()}initPlayback(e,t){var n;let{duration:r=300,times:o,ease:i,type:s,motionValue:a,name:l}=this.options;if(!(null===(n=a.owner)||void 0===n?void 0:n.current))return!1;if(function(e){return"spring"===e.type||"backgroundColor"===e.name||!Sf(e.ease)}(this.options)){const{onComplete:t,onUpdate:n,motionValue:a,...l}=this.options,c=function(e,t){const n=new wf({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let i=0;for(;!r.done&&i<2e4;)r=n.sample(i),o.push(r.value),i+=10;return{times:void 0,keyframes:o,duration:i-10,ease:"linear"}}(e,l);1===(e=c.keyframes).length&&(e[1]=e[0]),r=c.duration,o=c.times,i=c.ease,s="keyframes"}const c=function(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:s="loop",ease:a,times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=Ef(a);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:"reverse"===s?"alternate":"normal"})}(a.owner.current,l,e,{...this.options,duration:r,times:o,ease:i});return c.startTime=_d.now(),this.pendingTimeline?(c.timeline=this.pendingTimeline,this.pendingTimeline=void 0):c.onfinish=()=>{const{onComplete:n}=this.options;a.set(xd(e,this.options,t)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:c,duration:r,times:o,type:s,ease:i,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:t}=e;return dd(t)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:t}=e;return dd(t.currentTime||0)}set time(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.currentTime=ud(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:t}=e;return t.playbackRate}set speed(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:t}=e;return t.playState}attachTimeline(e){if(this._resolved){const{resolved:t}=this;if(!t)return Nu;const{animation:n}=t;n.timeline=e,n.onfinish=null}else this.pendingTimeline=e;return Nu}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:t}=e;"finished"===t.playState&&this.updateFinishedPromise(),t.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:t}=e;t.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;const{resolved:e}=this;if(!e)return;const{animation:t,keyframes:n,duration:r,type:o,ease:i,times:s}=e;if("idle"!==t.playState&&"finished"!==t.playState){if(this.time){const{motionValue:e,onUpdate:t,onComplete:a,...l}=this.options,c=new wf({...l,keyframes:n,duration:r,type:o,ease:i,times:s,isGenerator:!0}),u=ud(this.time);e.setWithVelocity(c.sample(u-10).value,c.sample(u).value,10)}this.cancel()}}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:i,type:s}=e;return Pf()&&n&&Tf.has(n)&&t&&t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate&&!r&&"mirror"!==o&&0!==i&&"inertia"!==s}}const If=(e,t,n,r={},o,i)=>s=>{const a=gd(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c-=ud(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:e=>{t.set(e),a.onUpdate&&a.onUpdate(e)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:i?void 0:o};(function({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:s,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length})(a)||(u={...u,...md(e,u)}),u.duration&&(u.duration=ud(u.duration)),u.repeatDelay&&(u.repeatDelay=ud(u.repeatDelay)),void 0!==u.from&&(u.keyframes[0]=u.from);let d=!1;if((!1===u.type||0===u.duration&&!u.repeatDelay)&&(u.duration=0,0===u.delay&&(d=!0)),(vd||Zl)&&(d=!0,u.duration=0,u.delay=0),d&&!i&&void 0!==t.get()){const e=xd(u.keyframes,a);if(void 0!==e)return void Mu.update((()=>{u.onUpdate(e),u.onComplete()}))}return!i&&Rf.supports(u)?new Rf(u):new wf(u)};function Nf(e){return Boolean(Pc(e)&&e.add)}function Mf(e,t){-1===e.indexOf(t)&&e.push(t)}function Af(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Df{constructor(){this.subscriptions=[]}add(e){return Mf(this.subscriptions,e),()=>Af(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let o=0;o<r;o++){const r=this.subscriptions[o];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Of={current:void 0};class zf{constructor(e,t={}){this.version="11.2.6",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(e,t=!0)=>{const n=_d.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){var t;this.current=e,this.updatedAt=_d.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t))))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new Df);const n=this.events[e].add(t);return"change"===e?()=>{n(),Mu.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return Of.current&&Of.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=_d.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return yp(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise((t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()})).then((()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()}))}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Lf(e,t){return new zf(e,t)}function Ff(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Lf(n))}function Bf({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function Vf(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var i;let{transition:s=e.getDefaultTransition(),transitionEnd:a,...l}=t;const c=e.getValue("willChange");r&&(s=r);const u=[],d=o&&e.animationState&&e.animationState.getState()[o];for(const t in l){const r=e.getValue(t,null!==(i=e.latestValues[t])&&void 0!==i?i:null),o=l[t];if(void 0===o||d&&Bf(d,t))continue;const a={delay:n,elapsed:0,...gd(s||{},t)};let p=!1;if(window.HandoffAppearAnimations){const n=e.getProps()[Xl];if(n){const e=window.HandoffAppearAnimations(n,t,r,Mu);null!==e&&(a.elapsed=e,p=!0)}}r.start(If(t,r,o,e.shouldReduceMotion&&jc.has(t)?{type:!1}:a,e,p));const f=r.animation;f&&(Nf(c)&&(c.add(t),f.then((()=>c.remove(t)))),u.push(f))}return a&&Promise.all(u).then((()=>{Mu.update((()=>{a&&function(e,t){const n=cd(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const t in i)Ff(e,t,Pu(i[t]))}(e,a)}))})),u}function $f(e,t,n={}){var r;const o=cd(e,t,"exit"===n.type?null===(r=e.presenceContext)||void 0===r?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const s=o?()=>Promise.all(Vf(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(r=0)=>{const{delayChildren:o=0,staggerChildren:s,staggerDirection:a}=i;return function(e,t,n=0,r=0,o=1,i){const s=[],a=(e.variantChildren.size-1)*r,l=1===o?(e=0)=>e*r:(e=0)=>a-e*r;return Array.from(e.variantChildren).sort(Hf).forEach(((e,r)=>{e.notify("AnimationStart",t),s.push($f(e,t,{...i,delay:n+l(r)}).then((()=>e.notify("AnimationComplete",t))))})),Promise.all(s)}(e,t,o+r,s,a,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[e,t]="beforeChildren"===l?[s,a]:[a,s];return e().then((()=>t()))}return Promise.all([s(),a(n.delay)])}function Hf(e,t){return e.sortNodePosition(t)}const Wf=[...lc].reverse(),Uf=lc.length;function Gf(e){return t=>Promise.all(t.map((({animation:t,options:n})=>function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){const o=t.map((t=>$f(e,t,n)));r=Promise.all(o)}else if("string"==typeof t)r=$f(e,t,n);else{const o="function"==typeof t?cd(e,t,n.custom):t;r=Promise.all(Vf(e,o,n))}return r.then((()=>{Mu.postRender((()=>{e.notify("AnimationComplete",t)}))}))}(e,t,n))))}function Kf(e){let t=Gf(e);const n={animate:Yf(!0),whileInView:Yf(),whileHover:Yf(),whileTap:Yf(),whileDrag:Yf(),whileFocus:Yf(),exit:Yf()};let r=!0;const o=t=>(n,r)=>{var o;const i=cd(e,r,"exit"===t?null===(o=e.presenceContext)||void 0===o?void 0:o.custom:void 0);if(i){const{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function i(i){const s=e.getProps(),a=e.getVariantContext(!0)||{},l=[],c=new Set;let u={},d=1/0;for(let t=0;t<Uf;t++){const p=Wf[t],f=n[p],h=void 0!==s[p]?s[p]:a[p],m=sc(h),g=p===i?f.isActive:null;!1===g&&(d=t);let v=h===a[p]&&h!==s[p]&&m;if(v&&r&&e.manuallyAnimateOnMount&&(v=!1),f.protectedKeys={...u},!f.isActive&&null===g||!h&&!f.prevProp||ac(h)||"boolean"==typeof h)continue;let b=qf(f.prevProp,h)||p===i&&f.isActive&&!v&&m||t>d&&m,x=!1;const y=Array.isArray(h)?h:[h];let w=y.reduce(o(p),{});!1===g&&(w={});const{prevResolvedValues:_={}}=f,S={..._,...w},C=t=>{b=!0,c.has(t)&&(x=!0,c.delete(t)),f.needsAnimating[t]=!0;const n=e.getValue(t);n&&(n.liveStyle=!1)};for(const e in S){const t=w[e],n=_[e];if(u.hasOwnProperty(e))continue;let r=!1;r=ju(t)&&ju(n)?!ld(t,n):t!==n,r?null!=t?C(e):c.add(e):void 0!==t&&c.has(e)?C(e):f.protectedKeys[e]=!0}f.prevProp=h,f.prevResolvedValues=w,f.isActive&&(u={...u,...w}),r&&e.blockInitialAnimation&&(b=!1),!b||v&&!x||l.push(...y.map((e=>({animation:e,options:{type:p}}))))}if(c.size){const t={};c.forEach((n=>{const r=e.getBaseTarget(n),o=e.getValue(n);o&&(o.liveStyle=!0),t[n]=null!=r?r:null})),l.push({animation:t})}let p=Boolean(l.length);return!r||!1!==s.initial&&s.initial!==s.animate||e.manuallyAnimateOnMount||(p=!1),r=!1,p?t(l):Promise.resolve()}return{animateChanges:i,setActive:function(t,r){var o;if(n[t].isActive===r)return Promise.resolve();null===(o=e.variantChildren)||void 0===o||o.forEach((e=>{var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,r)})),n[t].isActive=r;const s=i(t);for(const e in n)n[e].protectedKeys={};return s},setAnimateFunction:function(n){t=n(e)},getState:()=>n}}function qf(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!ld(t,e)}function Yf(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}let Xf=0;const Zf={animation:{Feature:class extends Zu{constructor(e){super(e),e.animationState||(e.animationState=Kf(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),ac(e)&&(this.unmount=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){}}},exit:{Feature:class extends Zu{constructor(){super(...arguments),this.id=Xf++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;const r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then((()=>t(this.id)))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}}},Qf=(e,t)=>Math.abs(e-t);class Jf{constructor(e,t,{transformPagePoint:n,contextWindow:r,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const e=nh(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=Qf(e.x,t.x),r=Qf(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;const{point:r}=e,{timestamp:o}=Du;this.history.push({...r,timestamp:o});const{onStart:i,onMove:s}=this.handlers;t||(i&&i(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),s&&s(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=eh(t,this.transformPagePoint),Mu.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:r,resumeAnimation:o}=this.handlers;if(this.dragSnapToOrigin&&o&&o(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const i=nh("pointercancel"===e.type?this.lastMoveEventInfo:eh(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,i),r&&r(e,i)},!Bu(e))return;this.dragSnapToOrigin=o,this.handlers=t,this.transformPagePoint=n,this.contextWindow=r||window;const i=eh(Vu(e),this.transformPagePoint),{point:s}=i,{timestamp:a}=Du;this.history=[{...s,timestamp:a}];const{onSessionStart:l}=t;l&&l(e,nh(i,this.history)),this.removeListeners=Uu(Hu(this.contextWindow,"pointermove",this.handlePointerMove),Hu(this.contextWindow,"pointerup",this.handlePointerUp),Hu(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Au(this.updatePoint)}}function eh(e,t){return t?{point:t(e.point)}:e}function th(e,t){return{x:e.x-t.x,y:e.y-t.y}}function nh({point:e},t){return{point:e,delta:th(e,oh(t)),offset:th(e,rh(t)),velocity:ih(t,.1)}}function rh(e){return e[0]}function oh(e){return e[e.length-1]}function ih(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=oh(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>ud(t)));)n--;if(!r)return{x:0,y:0};const i=dd(o.timestamp-r.timestamp);if(0===i)return{x:0,y:0};const s={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function sh(e){return e.max-e.min}function ah(e,t=0,n=.01){return Math.abs(e-t)<=n}function lh(e,t,n,r=.5){e.origin=r,e.originPoint=ef(t.min,t.max,e.origin),e.scale=sh(n)/sh(t),(ah(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=ef(n.min,n.max,e.origin)-e.originPoint,(ah(e.translate)||isNaN(e.translate))&&(e.translate=0)}function ch(e,t,n,r){lh(e.x,t.x,n.x,r?r.originX:void 0),lh(e.y,t.y,n.y,r?r.originY:void 0)}function uh(e,t,n){e.min=n.min+t.min,e.max=e.min+sh(t)}function dh(e,t,n){e.min=t.min-n.min,e.max=e.min+sh(t)}function ph(e,t,n){dh(e.x,t.x,n.x),dh(e.y,t.y,n.y)}function fh(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function hh(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}const mh=.35;function gh(e,t,n){return{min:vh(e,t),max:vh(e,n)}}function vh(e,t){return"number"==typeof e?e:e[t]||0}const bh=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),xh=()=>({x:{min:0,max:0},y:{min:0,max:0}});function yh(e){return[e("x"),e("y")]}function wh({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function _h(e){return void 0===e||1===e}function Sh({scale:e,scaleX:t,scaleY:n}){return!_h(e)||!_h(t)||!_h(n)}function Ch(e){return Sh(e)||kh(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function kh(e){return jh(e.x)||jh(e.y)}function jh(e){return e&&"0%"!==e}function Eh(e,t,n){return n+t*(e-n)}function Ph(e,t,n,r,o){return void 0!==o&&(e=Eh(e,o,r)),Eh(e,n,r)+t}function Th(e,t=0,n=1,r,o){e.min=Ph(e.min,t,n,r,o),e.max=Ph(e.max,t,n,r,o)}function Rh(e,{x:t,y:n}){Th(e.x,t.translate,t.scale,t.originPoint),Th(e.y,n.translate,n.scale,n.originPoint)}function Ih(e){return Number.isInteger(e)||e>1.0000000000001||e<.999999999999?e:1}function Nh(e,t){e.min=e.min+t,e.max=e.max+t}function Mh(e,t,[n,r,o]){const i=void 0!==t[o]?t[o]:.5,s=ef(e.min,e.max,i);Th(e,t[n],t[r],s,t.scale)}const Ah=["x","scaleX","originX"],Dh=["y","scaleY","originY"];function Oh(e,t){Mh(e.x,t,Ah),Mh(e.y,t,Dh)}function zh(e,t){return wh(function(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}const Lh=({current:e})=>e?e.ownerDocument.defaultView:null,Fh=new WeakMap;class Bh{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=xh(),this.visualElement=e}start(e,{snapToCursor:t=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:r}=this.getProps();this.panSession=new Jf(e,{onSessionStart:e=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(Vu(e,"page").point)},onStart:(e,t)=>{const{drag:n,dragPropagation:r,onDragStart:o}=this.getProps();if(n&&!r&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Yu(n),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),yh((e=>{let t=this.getAxisMotionValue(e).get()||0;if(qc.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];if(r){t=sh(r)*(parseFloat(t)/100)}}}this.originPoint[e]=t})),o&&Mu.postRender((()=>o(e,t)));const{animationState:i}=this.visualElement;i&&i.setActive("whileDrag",!0)},onMove:(e,t)=>{const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:o,onDrag:i}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:s}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(s),void(null!==this.currentDirection&&o&&o(this.currentDirection));this.updateAxis("x",t.point,s),this.updateAxis("y",t.point,s),this.visualElement.render(),i&&i(e,t)},onSessionEnd:(e,t)=>this.stop(e,t),resumeAnimation:()=>yh((e=>{var t;return"paused"===this.getAnimationState(e)&&(null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.play())}))},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:r,contextWindow:Lh(this.visualElement)})}stop(e,t){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:r}=t;this.startAnimation(r);const{onDragEnd:o}=this.getProps();o&&Mu.postRender((()=>o(e,t)))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!Vh(e,r,this.currentDirection))return;const o=this.getAxisMotionValue(e);let i=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(i=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?ef(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?ef(n,e,r.max):Math.min(e,n)),e}(i,this.constraints[e],this.elastic[e])),o.set(i)}resolveConstraints(){var e;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(e=this.visualElement.projection)||void 0===e?void 0:e.layout,o=this.constraints;t&&oc(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!r)&&function(e,{top:t,left:n,bottom:r,right:o}){return{x:fh(e.x,n,o),y:fh(e.y,t,r)}}(r.layoutBox,t),this.elastic=function(e=mh){return!1===e?e=0:!0===e&&(e=mh),{x:gh(e,"left","right"),y:gh(e,"top","bottom")}}(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&yh((e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(r.layoutBox[e],this.constraints[e]))}))}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!oc(e))return!1;const n=e.current;kd(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const o=function(e,t,n){const r=zh(e,n),{scroll:o}=t;return o&&(Nh(r.x,o.offset.x),Nh(r.y,o.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let i=function(e,t){return{x:hh(e.x,t.x),y:hh(e.y,t.y)}}(r.layout.layoutBox,o);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(i));this.hasMutatedConstraints=!!e,e&&(i=wh(e))}return i}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:s}=this.getProps(),a=this.constraints||{},l=yh((s=>{if(!Vh(s,t,this.currentDirection))return;let l=a&&a[s]||{};i&&(l={min:0,max:0});const c=r?200:1e6,u=r?40:1e7,d={type:"inertia",velocity:n?e[s]:0,bounceStiffness:c,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...o,...l};return this.startAxisValueAnimation(s,d)}));return Promise.all(l).then(s)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return n.start(If(e,n,0,t,this.visualElement))}stopAnimation(){yh((e=>this.getAxisMotionValue(e).stop()))}pauseAnimation(){yh((e=>{var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.pause()}))}getAnimationState(e){var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.state}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps(),r=n[t];return r||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){yh((t=>{const{drag:n}=this.getProps();if(!Vh(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,o=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:i}=r.layout.layoutBox[t];o.set(e[t]-ef(n,i,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!oc(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};yh((e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const n=t.get();r[e]=function(e,t){let n=.5;const r=sh(e),o=sh(t);return o>r?n=Jp(t.min,t.max-r,e.min):r>o&&(n=Jp(e.min,e.max-o,t.min)),zc(0,1,n)}({min:n,max:n},this.constraints[e])}}));const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),yh((t=>{if(!Vh(t,e,null))return;const n=this.getAxisMotionValue(t),{min:o,max:i}=this.constraints[t];n.set(ef(o,i,r[t]))}))}addListeners(){if(!this.visualElement.current)return;Fh.set(this.visualElement,this);const e=Hu(this.visualElement.current,"pointerdown",(e=>{const{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)})),t=()=>{const{dragConstraints:e}=this.getProps();oc(e)&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,r=n.addEventListener("measure",t);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),t();const o=Fu(window,"resize",(()=>this.scalePositionWithinConstraints())),i=n.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(yh((t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))})),this.visualElement.render())}));return()=>{o(),e(),r(),i&&i()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:o=!1,dragElastic:i=mh,dragMomentum:s=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:o,dragElastic:i,dragMomentum:s}}}function Vh(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const $h=e=>(t,n)=>{e&&Mu.postRender((()=>e(t,n)))};const Hh={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Wh(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Uh={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!Yc.test(e))return e;e=parseFloat(e)}return`${Wh(e,t.target.x)}% ${Wh(e,t.target.y)}%`}},Gh={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=lp.parse(e);if(o.length>5)return r;const i=lp.createTransformer(e),s="number"!=typeof o[0]?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+s]/=a,o[1+s]/=l;const c=ef(a,l,.5);return"number"==typeof o[2+s]&&(o[2+s]/=c),"number"==typeof o[3+s]&&(o[3+s]/=c),i(o)}};class Kh extends B.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:o}=e;var i;i=Yh,Object.assign(Cc,i),o&&(t.group&&t.group.add(o),n&&n.register&&r&&n.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",(()=>{this.safeToRemove()})),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Hh.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:o}=this.props,i=n.projection;return i?(i.isPresent=o,r||e.layoutDependency!==t||void 0===t?i.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?i.promote():i.relegate()||Mu.postRender((()=>{const e=i.getStack();e&&e.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),nc.postRender((()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()})))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function qh(e){const[t,n]=function(){const e=(0,B.useContext)(Ul);if(null===e)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,o=(0,B.useId)();return(0,B.useEffect)((()=>r(o)),[]),!t&&n?[!1,()=>n&&n(o)]:[!0]}(),r=(0,B.useContext)(gc);return(0,wt.jsx)(Kh,{...e,layoutGroup:r,switchLayoutGroup:(0,B.useContext)(vc),isPresent:t,safeToRemove:n})}const Yh={borderRadius:{...Uh,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Uh,borderTopRightRadius:Uh,borderBottomLeftRadius:Uh,borderBottomRightRadius:Uh,boxShadow:Gh},Xh=["TopLeft","TopRight","BottomLeft","BottomRight"],Zh=Xh.length,Qh=e=>"string"==typeof e?parseFloat(e):e,Jh=e=>"number"==typeof e||Yc.test(e);function em(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const tm=rm(0,.5,Gp),nm=rm(.5,.95,Nu);function rm(e,t,n){return r=>r<e?0:r>t?1:n(Jp(e,t,r))}function om(e,t){e.min=t.min,e.max=t.max}function im(e,t){om(e.x,t.x),om(e.y,t.y)}function sm(e,t,n,r,o){return e=Eh(e-=t,1/n,r),void 0!==o&&(e=Eh(e,1/o,r)),e}function am(e,t,[n,r,o],i,s){!function(e,t=0,n=1,r=.5,o,i=e,s=e){qc.test(t)&&(t=parseFloat(t),t=ef(s.min,s.max,t/100)-s.min);if("number"!=typeof t)return;let a=ef(i.min,i.max,r);e===i&&(a-=t),e.min=sm(e.min,t,n,a,o),e.max=sm(e.max,t,n,a,o)}(e,t[n],t[r],t[o],t.scale,i,s)}const lm=["x","scaleX","originX"],cm=["y","scaleY","originY"];function um(e,t,n,r){am(e.x,t,lm,n?n.x:void 0,r?r.x:void 0),am(e.y,t,cm,n?n.y:void 0,r?r.y:void 0)}function dm(e){return 0===e.translate&&1===e.scale}function pm(e){return dm(e.x)&&dm(e.y)}function fm(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function hm(e){return sh(e.x)/sh(e.y)}class mm{constructor(){this.members=[]}add(e){Mf(this.members,e),e.scheduleRender()}remove(e){if(Af(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex((t=>e===t));if(0===t)return!1;let n;for(let e=t;e>=0;e--){const t=this.members[e];if(!1!==t.isPresent){n=t;break}}return!!n&&(this.promote(n),!0)}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:r}=e.options;!1===r&&n.hide()}}exitAnimationComplete(){this.members.forEach((e=>{const{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()}))}scheduleRender(){this.members.forEach((e=>{e.instance&&e.scheduleRender(!1)}))}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function gm(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,s=(null==n?void 0:n.z)||0;if((o||i||s)&&(r=`translate3d(${o}px, ${i}px, ${s}px) `),1===t.x&&1===t.y||(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:e,rotate:t,rotateX:o,rotateY:i,skewX:s,skewY:a}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),o&&(r+=`rotateX(${o}deg) `),i&&(r+=`rotateY(${i}deg) `),s&&(r+=`skewX(${s}deg) `),a&&(r+=`skewY(${a}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return 1===a&&1===l||(r+=`scale(${a}, ${l})`),r||"none"}const vm=(e,t)=>e.depth-t.depth;class bm{constructor(){this.children=[],this.isDirty=!1}add(e){Mf(this.children,e),this.isDirty=!0}remove(e){Af(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(vm),this.isDirty=!1,this.children.forEach(e)}}const xm=["","X","Y","Z"],ym={visibility:"hidden"};let wm=0;const _m={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function Sm(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Cm({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(e={},n=(null==t?void 0:t())){this.id=wm++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{var e;this.projectionUpdateScheduled=!1,_m.totalNodes=_m.resolvedTargetDeltas=_m.recalculatedProjection=0,this.nodes.forEach(Em),this.nodes.forEach(Am),this.nodes.forEach(Dm),this.nodes.forEach(Pm),e=_m,window.MotionDebug&&window.MotionDebug.record(e)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new bm)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new Df),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t,n=this.root.hasTreeAnimated){if(this.instance)return;var r;this.isSVG=(r=t)instanceof SVGElement&&"svg"!==r.tagName,this.instance=t;const{layoutId:o,layout:i,visualElement:s}=this.options;if(s&&!s.current&&s.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(i||o)&&(this.isLayoutDirty=!0),e){let n;const r=()=>this.root.updateBlockedByResize=!1;e(t,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=_d.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(Au(r),e(i-t))};return Mu.read(r,!0),()=>Au(r)}(r,250),Hh.hasAnimatedSinceResize&&(Hh.hasAnimatedSinceResize=!1,this.nodes.forEach(Mm))}))}o&&this.root.registerSharedNode(o,this),!1!==this.options.animate&&s&&(o||i)&&this.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||s.getDefaultTransition()||Vm,{onLayoutAnimationStart:i,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!fm(this.targetLayout,r)||n,c=!t&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||c||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,c);const t={...gd(o,"layout"),onPlay:i,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||Mm(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Au(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,window.HandoffCancelAllAnimations&&window.HandoffCancelAllAnimations(),this.nodes&&this.nodes.forEach(Om),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){const t=this.path[e];t.shouldResetTransform=!0,t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(Rm);this.isUpdating||this.nodes.forEach(Im),this.isUpdating=!1,this.nodes.forEach(Nm),this.nodes.forEach(km),this.nodes.forEach(jm),this.clearAllSnapshots();const e=_d.now();Du.delta=zc(0,1e3/60,e-Du.timestamp),Du.timestamp=e,Du.isProcessing=!0,Ou.update.process(Du),Ou.preRender.process(Du),Ou.render.process(Du),Du.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,nc.read((()=>this.update())))}clearAllSnapshots(){this.nodes.forEach(Tm),this.sharedNodes.forEach(zm)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Mu.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Mu.postRender((()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()}))}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++){this.path[e].updateScroll()}const e=this.layout;this.layout=this.measure(!1),this.layoutCorrected=xh(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&(this.scroll={animationId:this.root.animationId,phase:e,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!o)return;const e=this.isLayoutDirty||this.shouldResetTransform,t=this.projectionDelta&&!pm(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,i=r!==this.prevTransformTemplateValue;e&&(t||Ch(this.latestValues)||i)&&(o(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);var r;return e&&(n=this.removeTransform(n)),Wm((r=n).x),Wm(r.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:e}=this.options;if(!e)return xh();const t=e.measureViewportBox(),{scroll:n}=this.root;return n&&(Nh(t.x,n.offset.x),Nh(t.y,n.offset.y)),t}removeElementScroll(e){const t=xh();im(t,e);for(let n=0;n<this.path.length;n++){const r=this.path[n],{scroll:o,options:i}=r;if(r!==this.root&&o&&i.layoutScroll){if(o.isRoot){im(t,e);const{scroll:n}=this.root;n&&(Nh(t.x,-n.offset.x),Nh(t.y,-n.offset.y))}Nh(t.x,o.offset.x),Nh(t.y,o.offset.y)}}return t}applyTransform(e,t=!1){const n=xh();im(n,e);for(let e=0;e<this.path.length;e++){const r=this.path[e];!t&&r.options.layoutScroll&&r.scroll&&r!==r.root&&Oh(n,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),Ch(r.latestValues)&&Oh(n,r.latestValues)}return Ch(this.latestValues)&&Oh(n,this.latestValues),n}removeTransform(e){const t=xh();im(t,e);for(let e=0;e<this.path.length;e++){const n=this.path[e];if(!n.instance)continue;if(!Ch(n.latestValues))continue;Sh(n.latestValues)&&n.updateSnapshot();const r=xh();im(r,n.measurePageBox()),um(t,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,r)}return Ch(this.latestValues)&&um(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Du.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){var t;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const r=Boolean(this.resumingFrom)||this!==n;if(!(e||r&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty)||this.attemptToResolveRelativeTarget))return;const{layout:o,layoutId:i}=this.options;if(this.layout&&(o||i)){if(this.resolvedRelativeTargetAt=Du.timestamp,!this.targetDelta&&!this.relativeTarget){const e=this.getClosestProjectingParent();e&&e.layout&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=xh(),this.relativeTargetOrigin=xh(),ph(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),im(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var s,a,l;if(this.target||(this.target=xh(),this.targetWithTransforms=xh()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),s=this.target,a=this.relativeTarget,l=this.relativeParent.target,uh(s.x,a.x,l.x),uh(s.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):im(this.target,this.layout.layoutBox),Rh(this.target,this.targetDelta)):im(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const e=this.getClosestProjectingParent();e&&Boolean(e.resumingFrom)===Boolean(this.resumingFrom)&&!e.options.layoutScroll&&e.target&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=xh(),this.relativeTargetOrigin=xh(),ph(this.relativeTargetOrigin,this.target,e.target),im(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}_m.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!Sh(this.parent.latestValues)&&!kh(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var e;const t=this.getLead(),n=Boolean(this.resumingFrom)||this!==t;let r=!0;if((this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty))&&(r=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===Du.timestamp&&(r=!1),r)return;const{layout:o,layoutId:i}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!o&&!i)return;im(this.layoutCorrected,this.layout.layoutBox);const s=this.treeScale.x,a=this.treeScale.y;!function(e,t,n,r=!1){const o=n.length;if(!o)return;let i,s;t.x=t.y=1;for(let a=0;a<o;a++){i=n[a],s=i.projectionDelta;const o=i.instance;o&&o.style&&"contents"===o.style.display||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&Oh(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,Rh(e,s)),r&&Ch(i.latestValues)&&Oh(e,i.latestValues))}t.x=Ih(t.x),t.y=Ih(t.y)}(this.layoutCorrected,this.treeScale,this.path,n),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms=xh());const{target:l}=t;if(!l)return void(this.projectionTransform&&(this.projectionDelta=bh(),this.projectionTransform="none",this.scheduleRender()));this.projectionDelta||(this.projectionDelta=bh(),this.projectionDeltaWithTransform=bh());const c=this.projectionTransform;ch(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.projectionTransform=gm(this.projectionDelta,this.treeScale),this.projectionTransform===c&&this.treeScale.x===s&&this.treeScale.y===a||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),_m.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(e,t=!1){const n=this.snapshot,r=n?n.latestValues:{},o={...this.latestValues},i=bh();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const s=xh(),a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),c=!l||l.members.length<=1,u=Boolean(a&&!c&&!0===this.options.crossfade&&!this.path.some(Bm));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;Lm(i.x,e.x,n),Lm(i.y,e.y,n),this.setTargetDelta(i),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ph(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox),function(e,t,n,r){Fm(e.x,t.x,n.x,r),Fm(e.y,t.y,n.y,r)}(this.relativeTarget,this.relativeTargetOrigin,s,n),d&&function(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||(d=xh()),im(d,this.relativeTarget)),a&&(this.animationValues=o,function(e,t,n,r,o,i){o?(e.opacity=ef(0,void 0!==n.opacity?n.opacity:1,tm(r)),e.opacityExit=ef(void 0!==t.opacity?t.opacity:1,0,nm(r))):i&&(e.opacity=ef(void 0!==t.opacity?t.opacity:1,void 0!==n.opacity?n.opacity:1,r));for(let o=0;o<Zh;o++){const i=`border${Xh[o]}Radius`;let s=em(t,i),a=em(n,i);void 0===s&&void 0===a||(s||(s=0),a||(a=0),0===s||0===a||Jh(s)===Jh(a)?(e[i]=Math.max(ef(Qh(s),Qh(a),r),0),(qc.test(a)||qc.test(s))&&(e[i]+="%")):e[i]=a)}(t.rotate||n.rotate)&&(e.rotate=ef(t.rotate||0,n.rotate||0,r))}(o,r,this.latestValues,n,u,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Au(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Mu.update((()=>{Hh.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,n){const r=Pc(e)?e:Lf(e);return r.start(If("",r,t,n)),r.animation}(0,1e3,{...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0}))}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:o}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&Um(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||xh();const t=sh(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=sh(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}im(t,n),Oh(t,o),ch(this.projectionDeltaWithTransform,this.layoutCorrected,t,o)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new mm);this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){var e;const{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}getPrevLead(){var e;const{layoutId:t}=this.options;return t?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;const r={};n.z&&Sm("z",e,r,this.animationValues);for(let t=0;t<xm.length;t++)Sm(`rotate${xm[t]}`,e,r,this.animationValues),Sm(`skew${xm[t]}`,e,r,this.animationValues);e.render();for(const t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}getProjectionStyles(e){var t,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return ym;const r={visibility:""},o=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,r.opacity="",r.pointerEvents=Tu(null==e?void 0:e.pointerEvents)||"",r.transform=o?o(this.latestValues,""):"none",r;const i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target){const t={};return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=Tu(null==e?void 0:e.pointerEvents)||""),this.hasProjected&&!Ch(this.latestValues)&&(t.transform=o?o({},""):"none",this.hasProjected=!1),t}const s=i.animationValues||i.latestValues;this.applyTransformsToTarget(),r.transform=gm(this.projectionDeltaWithTransform,this.treeScale,s),o&&(r.transform=o(s,r.transform));const{x:a,y:l}=this.projectionDelta;r.transformOrigin=`${100*a.origin}% ${100*l.origin}% 0`,i.animationValues?r.opacity=i===this?null!==(n=null!==(t=s.opacity)&&void 0!==t?t:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:r.opacity=i===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0;for(const e in Cc){if(void 0===s[e])continue;const{correct:t,applyTo:n}=Cc[e],o="none"===r.transform?s[e]:t(s[e],i);if(n){const e=n.length;for(let t=0;t<e;t++)r[n[t]]=o}else r[e]=o}return this.options.layoutId&&(r.pointerEvents=i===this?Tu(null==e?void 0:e.pointerEvents)||"":"none"),r}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach((e=>{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()})),this.root.nodes.forEach(Rm),this.root.sharedNodes.clear()}}}function km(e){e.updateLayout()}function jm(e){var t;const n=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:r}=e.layout,{animationType:o}=e.options,i=n.source!==e.layout.source;"size"===o?yh((e=>{const r=i?n.measuredBox[e]:n.layoutBox[e],o=sh(r);r.min=t[e].min,r.max=r.min+o})):Um(o,n.layoutBox,t)&&yh((r=>{const o=i?n.measuredBox[r]:n.layoutBox[r],s=sh(t[r]);o.max=o.min+s,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+s)}));const s=bh();ch(s,t,n.layoutBox);const a=bh();i?ch(a,e.applyTransform(r,!0),n.measuredBox):ch(a,t,n.layoutBox);const l=!pm(s);let c=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:o,layout:i}=r;if(o&&i){const s=xh();ph(s,n.layoutBox,o.layoutBox);const a=xh();ph(a,t,i.layoutBox),fm(s,a)||(c=!0),r.options.layoutRoot&&(e.relativeTarget=a,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:n,delta:a,layoutDelta:s,hasLayoutChanged:l,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Em(e){_m.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Pm(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Tm(e){e.clearSnapshot()}function Rm(e){e.clearMeasurements()}function Im(e){e.isLayoutDirty=!1}function Nm(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Mm(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Am(e){e.resolveTargetDelta()}function Dm(e){e.calcProjection()}function Om(e){e.resetSkewAndRotation()}function zm(e){e.removeLeadSnapshot()}function Lm(e,t,n){e.translate=ef(t.translate,0,n),e.scale=ef(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Fm(e,t,n,r){e.min=ef(t.min,n.min,r),e.max=ef(t.max,n.max,r)}function Bm(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const Vm={duration:.45,ease:[.4,0,.1,1]},$m=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Hm=$m("applewebkit/")&&!$m("chrome/")?Math.round:Nu;function Wm(e){e.min=Hm(e.min),e.max=Hm(e.max)}function Um(e,t,n){return"position"===e||"preserve-aspect"===e&&!ah(hm(t),hm(n),.2)}const Gm=Cm({attachResizeListener:(e,t)=>Fu(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Km={current:void 0},qm=Cm({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Km.current){const e=new Gm({});e.mount(window),e.setOptions({layoutScroll:!0}),Km.current=e}return Km.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),Ym={pan:{Feature:class extends Zu{constructor(){super(...arguments),this.removePointerDownListener=Nu}onPointerDown(e){this.session=new Jf(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Lh(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:$h(e),onStart:$h(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&Mu.postRender((()=>r(e,t)))}}}mount(){this.removePointerDownListener=Hu(this.node.current,"pointerdown",(e=>this.onPointerDown(e)))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends Zu{constructor(e){super(e),this.removeGroupControls=Nu,this.removeListeners=Nu,this.controls=new Bh(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Nu}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:qm,MeasureLayout:qh}},Xm={current:null},Zm={current:!1};const Qm=new WeakMap,Jm=[...zd,Zd,lp],eg=Object.keys(mc),tg=eg.length,ng=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],rg=cc.length;function og(e){if(e)return!1!==e.options.allowProjection?e.projection:og(e.parent)}class ig{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:o,visualState:i},s={}){this.resolveKeyframes=(e,t,n,r)=>new this.KeyframeResolver(e,t,n,r,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Wd,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Mu.render(this.render,!1,!0);const{latestValues:a,renderState:l}=i;this.latestValues=a,this.baseTarget={...a},this.initialValues=t.initial?{...a}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=s,this.blockInitialAnimation=Boolean(o),this.isControllingVariants=uc(t),this.isVariantNode=dc(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:c,...u}=this.scrapeMotionValuesFromProps(t,{},this);for(const e in u){const t=u[e];void 0!==a[e]&&Pc(t)&&(t.set(a[e],!1),Nf(c)&&c.add(e))}}mount(e){this.current=e,Qm.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach(((e,t)=>this.bindToMotionValue(t,e))),Zm.current||function(){if(Zm.current=!0,Gl)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Xm.current=e.matches;e.addListener(t),t()}else Xm.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Xm.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){var e;Qm.delete(this.current),this.projection&&this.projection.unmount(),Au(this.notifyUpdate),Au(this.render),this.valueSubscriptions.forEach((e=>e())),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const t in this.features)null===(e=this.features[t])||void 0===e||e.unmount();this.current=null}bindToMotionValue(e,t){const n=jc.has(e),r=t.on("change",(t=>{this.latestValues[e]=t,this.props.onUpdate&&Mu.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)})),o=t.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,(()=>{r(),o(),t.owner&&t.stop()}))}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}loadFeatures({children:e,...t},n,r,o){let i,s;for(let e=0;e<tg;e++){const n=eg[e],{isEnabled:r,Feature:o,ProjectionNode:a,MeasureLayout:l}=mc[n];a&&(i=a),r(t)&&(!this.features[n]&&o&&(this.features[n]=new o(this)),l&&(s=l))}if(("html"===this.type||"svg"===this.type)&&!this.projection&&i){const{layoutId:e,layout:n,drag:r,dragConstraints:s,layoutScroll:a,layoutRoot:l}=t;this.projection=new i(this.latestValues,t["data-framer-portal-id"]?void 0:og(this.parent)),this.projection.setOptions({layoutId:e,layout:n,alwaysMeasureLayout:Boolean(r)||s&&oc(s),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:"string"==typeof n?n:"both",initialPromotionConfig:o,layoutScroll:a,layoutRoot:l})}return s}updateFeatures(){for(const e in this.features){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):xh()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<ng.length;t++){const n=ng[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const r=e["on"+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=function(e,t,n){const{willChange:r}=t;for(const o in t){const i=t[o],s=n[o];if(Pc(i))e.addValue(o,i),Nf(r)&&r.add(o);else if(Pc(s))e.addValue(o,Lf(i,{owner:e})),Nf(r)&&r.remove(o);else if(s!==i)if(e.hasValue(o)){const t=e.getValue(o);!0===t.liveStyle?t.jump(i):t.hasAnimated||t.set(i)}else{const t=e.getStaticValue(o);e.addValue(o,Lf(void 0!==t?t:i,{owner:e}))}}for(const r in n)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(e=!1){if(e)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const e=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(e.initial=this.props.initial),e}const t={};for(let e=0;e<rg;e++){const n=cc[e],r=this.props[n];(sc(r)||!1===r)&&(t[n]=r)}return t}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=Lf(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){var n;let r=void 0===this.latestValues[e]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,e))&&void 0!==n?n:this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];return null!=r&&("string"==typeof r&&(jd(r)||Sd(r))?r=parseFloat(r):!(e=>Jm.find(Od(e)))(r)&&lp.test(t)&&(r=mp(e,t)),this.setBaseTarget(e,Pc(r)?r.get():r)),Pc(r)?r.get():r}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:n}=this.props;let r;if("string"==typeof n||"object"==typeof n){const o=Cu(this.props,n,null===(t=this.presenceContext)||void 0===t?void 0:t.custom);o&&(r=o[e])}if(n&&void 0!==r)return r;const o=this.getBaseTargetFromProps(this.props,e);return void 0===o||Pc(o)?void 0!==this.initialValues[e]&&void 0===r?void 0:this.baseTarget[e]:o}on(e,t){return this.events[e]||(this.events[e]=new Df),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class sg extends ig{constructor(){super(...arguments),this.KeyframeResolver=vp}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}}class ag extends sg{constructor(){super(...arguments),this.type="html"}readValueFromInstance(e,t){if(jc.has(t)){const e=hp(t);return e&&e.default||0}{const r=(n=e,window.getComputedStyle(n)),o=(Nc(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof o?o.trim():o}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return zh(e,t)}build(e,t,n,r){tu(e,t,n,r.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return wu(e,t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Pc(e)&&(this.childSubscription=e.on("change",(e=>{this.current&&(this.current.textContent=`${e}`)})))}renderInstance(e,t,n,r){bu(e,t,n,r)}}class lg extends sg{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(jc.has(t)){const e=hp(t);return e&&e.default||0}return t=xu.has(t)?t:Yl(t),e.getAttribute(t)}measureInstanceViewportBox(){return xh()}scrapeMotionValuesFromProps(e,t,n){return _u(e,t,n)}build(e,t,n,r){fu(e,t,n,this.isSVGTag,r.transformTemplate)}renderInstance(e,t,n,r){yu(e,t,0,r)}mount(e){this.isSVGTag=mu(e.tagName),super.mount(e)}}const cg=(e,t)=>Sc(e)?new lg(t,{enableHardwareAcceleration:!1}):new ag(t,{allowProjection:e!==B.Fragment,enableHardwareAcceleration:!0}),ug={...Zf,...ad,...Ym,...{layout:{ProjectionNode:qm,MeasureLayout:qh}}},dg=wc(((e,t)=>function(e,{forwardMotionProps:t=!1},n,r){return{...Sc(e)?zu:Lu,preloadedFeatures:n,useRender:vu(t),createVisualElement:r,Component:e}}(e,t,ug,cg)));function pg(){const e=(0,B.useRef)(!1);return Kl((()=>(e.current=!0,()=>{e.current=!1})),[]),e}function fg(){const e=pg(),[t,n]=(0,B.useState)(0),r=(0,B.useCallback)((()=>{e.current&&n(t+1)}),[t]);return[(0,B.useCallback)((()=>Mu.postRender(r)),[r]),t]}class hg extends B.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){const e=this.props.sizeRef.current;e.height=t.offsetHeight||0,e.width=t.offsetWidth||0,e.top=t.offsetTop,e.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function mg({children:e,isPresent:t}){const n=(0,B.useId)(),r=(0,B.useRef)(null),o=(0,B.useRef)({width:0,height:0,top:0,left:0}),{nonce:i}=(0,B.useContext)(Hl);return(0,B.useInsertionEffect)((()=>{const{width:e,height:s,top:a,left:l}=o.current;if(t||!r.current||!e||!s)return;r.current.dataset.motionPopId=n;const c=document.createElement("style");return i&&(c.nonce=i),document.head.appendChild(c),c.sheet&&c.sheet.insertRule(`\n [data-motion-pop-id="${n}"] {\n position: absolute !important;\n width: ${e}px !important;\n height: ${s}px !important;\n top: ${a}px !important;\n left: ${l}px !important;\n }\n `),()=>{document.head.removeChild(c)}}),[t]),(0,wt.jsx)(hg,{isPresent:t,childRef:r,sizeRef:o,children:B.cloneElement(e,{ref:r})})}const gg=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:s})=>{const a=ku(vg),l=(0,B.useId)(),c=(0,B.useMemo)((()=>({id:l,initial:t,isPresent:n,custom:o,onExitComplete:e=>{a.set(e,!0);for(const e of a.values())if(!e)return;r&&r()},register:e=>(a.set(e,!1),()=>a.delete(e))})),i?[Math.random()]:[n]);return(0,B.useMemo)((()=>{a.forEach(((e,t)=>a.set(t,!1)))}),[n]),B.useEffect((()=>{!n&&!a.size&&r&&r()}),[n]),"popLayout"===s&&(e=(0,wt.jsx)(mg,{isPresent:n,children:e})),(0,wt.jsx)(Ul.Provider,{value:c,children:e})};function vg(){return new Map}const bg=e=>e.key||"";const xg=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:o,presenceAffectsLayout:i=!0,mode:s="sync"})=>{kd(!o,"Replace exitBeforeEnter with mode='wait'");const a=(0,B.useContext)(gc).forceRender||fg()[0],l=pg(),c=function(e){const t=[];return B.Children.forEach(e,(e=>{(0,B.isValidElement)(e)&&t.push(e)})),t}(e);let u=c;const d=(0,B.useRef)(new Map).current,p=(0,B.useRef)(u),f=(0,B.useRef)(new Map).current,h=(0,B.useRef)(!0);var m;if(Kl((()=>{h.current=!1,function(e,t){e.forEach((e=>{const n=bg(e);t.set(n,e)}))}(c,f),p.current=u})),m=()=>{h.current=!0,f.clear(),d.clear()},(0,B.useEffect)((()=>()=>m()),[]),h.current)return(0,wt.jsx)(wt.Fragment,{children:u.map((e=>(0,wt.jsx)(gg,{isPresent:!0,initial:!!n&&void 0,presenceAffectsLayout:i,mode:s,children:e},bg(e))))});u=[...u];const g=p.current.map(bg),v=c.map(bg),b=g.length;for(let e=0;e<b;e++){const t=g[e];-1!==v.indexOf(t)||d.has(t)||d.set(t,void 0)}return"wait"===s&&d.size&&(u=[]),d.forEach(((e,n)=>{if(-1!==v.indexOf(n))return;const o=f.get(n);if(!o)return;const h=g.indexOf(n);let m=e;if(!m){const e=()=>{d.delete(n);const e=Array.from(f.keys()).filter((e=>!v.includes(e)));if(e.forEach((e=>f.delete(e))),p.current=c.filter((t=>{const r=bg(t);return r===n||e.includes(r)})),!d.size){if(!1===l.current)return;a(),r&&r()}};m=(0,wt.jsx)(gg,{isPresent:!1,onExitComplete:e,custom:t,presenceAffectsLayout:i,mode:s,children:o},bg(o)),d.set(n,m)}u.splice(h,0,m)})),u=u.map((e=>{const t=e.key;return d.has(t)?e:(0,wt.jsx)(gg,{isPresent:!0,presenceAffectsLayout:i,mode:s,children:e},bg(e))})),(0,wt.jsx)(wt.Fragment,{children:d.size?u:u.map((e=>(0,B.cloneElement)(e)))})},yg=["40em","52em","64em"],wg=(e={})=>{const{defaultIndex:t=0}=e;if("number"!=typeof t)throw new TypeError(`Default breakpoint index should be a number. Got: ${t}, ${typeof t}`);if(t<0||t>yg.length-1)throw new RangeError(`Default breakpoint index out of range. Theme has ${yg.length} breakpoints, got index ${t}`);const[n,r]=(0,c.useState)(t);return(0,c.useEffect)((()=>{const e=()=>{const e=yg.filter((e=>"undefined"!=typeof window&&window.matchMedia(`screen and (min-width: ${e})`).matches)).length;n!==e&&r(e)};return e(),"undefined"!=typeof window&&window.addEventListener("resize",e),()=>{"undefined"!=typeof window&&window.removeEventListener("resize",e)}}),[n]),n};function _g(e,t={}){const n=wg(t);if(!Array.isArray(e)&&"function"!=typeof e)return e;const r=e||[];return r[n>=r.length?r.length-1:n]}const Sg={name:"zjik7",styles:"display:flex"},Cg={name:"qgaee5",styles:"display:block;max-height:100%;max-width:100%;min-height:0;min-width:0"},kg={name:"82a6rk",styles:"flex:1"},jg={name:"13nosa1",styles:">*{min-height:0;}"},Eg={name:"1pwxzk4",styles:">*{min-width:0;}"};function Pg(e){const{align:t,className:n,direction:r="row",expanded:o=!0,gap:i=2,justify:s="space-between",wrap:a=!1,...l}=Ya(function(e){const{isReversed:t,...n}=e;return void 0!==t?(Fi()("Flex isReversed",{alternative:'Flex direction="row-reverse" or "column-reverse"',since:"5.9"}),{...n,direction:t?"row-reverse":"row"}):n}(e),"Flex"),u=_g(Array.isArray(r)?r:[r]),d="string"==typeof u&&!!u.includes("column"),p=qa();return{...l,className:(0,c.useMemo)((()=>{const e=bl({alignItems:null!=t?t:d?"normal":"center",flexDirection:u,flexWrap:a?"wrap":void 0,gap:wl(i),justifyContent:s,height:d&&o?"100%":void 0,width:!d&&o?"100%":void 0},"","");return p(Sg,e,d?jg:Eg,n)}),[t,n,p,u,o,i,d,s,a]),isColumn:d}}const Tg=(0,c.createContext)({flexItemDisplay:void 0}),Rg=()=>(0,c.useContext)(Tg);const Ig=Xa((function(e,t){const{children:n,isColumn:r,...o}=Pg(e);return(0,wt.jsx)(Tg.Provider,{value:{flexItemDisplay:r?"block":void 0},children:(0,wt.jsx)(dl,{...o,ref:t,children:n})})}),"Flex");function Ng(e){const{className:t,display:n,isBlock:r=!1,...o}=Ya(e,"FlexItem"),i={},s=Rg().flexItemDisplay;i.Base=bl({display:n||s},"","");return{...o,className:qa()(Cg,i.Base,r&&kg,t)}}const Mg=Xa((function(e,t){const n=function(e){return Ng({isBlock:!0,...Ya(e,"FlexBlock")})}(e);return(0,wt.jsx)(dl,{...n,ref:t})}),"FlexBlock"),Ag=new RegExp(/-left/g),Dg=new RegExp(/-right/g),Og=new RegExp(/Left/g),zg=new RegExp(/Right/g);function Lg(e){return"left"===e?"right":"right"===e?"left":Ag.test(e)?e.replace(Ag,"-right"):Dg.test(e)?e.replace(Dg,"-left"):Og.test(e)?e.replace(Og,"Right"):zg.test(e)?e.replace(zg,"Left"):e}const Fg=(e={})=>Object.fromEntries(Object.entries(e).map((([e,t])=>[Lg(e),t])));function Bg(e={},t){return()=>t?(0,a.isRTL)()?bl(t,"",""):bl(e,"",""):(0,a.isRTL)()?bl(Fg(e),"",""):bl(e,"","")}Bg.watch=()=>(0,a.isRTL)();const Vg=e=>null!=e;const $g=Xa((function(e,t){const n=function(e){const{className:t,margin:n,marginBottom:r=2,marginLeft:o,marginRight:i,marginTop:s,marginX:a,marginY:l,padding:c,paddingBottom:u,paddingLeft:d,paddingRight:p,paddingTop:f,paddingX:h,paddingY:m,...g}=Ya(e,"Spacer");return{...g,className:qa()(Vg(n)&&bl("margin:",wl(n),";",""),Vg(l)&&bl("margin-bottom:",wl(l),";margin-top:",wl(l),";",""),Vg(a)&&bl("margin-left:",wl(a),";margin-right:",wl(a),";",""),Vg(s)&&bl("margin-top:",wl(s),";",""),Vg(r)&&bl("margin-bottom:",wl(r),";",""),Vg(o)&&Bg({marginLeft:wl(o)})(),Vg(i)&&Bg({marginRight:wl(i)})(),Vg(c)&&bl("padding:",wl(c),";",""),Vg(m)&&bl("padding-bottom:",wl(m),";padding-top:",wl(m),";",""),Vg(h)&&bl("padding-left:",wl(h),";padding-right:",wl(h),";",""),Vg(f)&&bl("padding-top:",wl(f),";",""),Vg(u)&&bl("padding-bottom:",wl(u),";",""),Vg(d)&&Bg({paddingLeft:wl(d)})(),Vg(p)&&Bg({paddingRight:wl(p)})(),t)}}(e);return(0,wt.jsx)(dl,{...n,ref:t})}),"Spacer"),Hg=$g,Wg=(0,wt.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wt.jsx)(n.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})}),Ug=(0,wt.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wt.jsx)(n.Path,{d:"M7 11.5h10V13H7z"})});const Gg=Xa((function(e,t){const n=Ng(e);return(0,wt.jsx)(dl,{...n,ref:t})}),"FlexItem");const Kg={name:"hdknak",styles:"display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap"};function qg(e){return null!=e}const Yg=e=>"string"==typeof e?(e=>parseFloat(e))(e):e,Xg="…",Zg={auto:"auto",head:"head",middle:"middle",tail:"tail",none:"none"},Qg={ellipsis:Xg,ellipsizeMode:Zg.auto,limit:0,numberOfLines:0};function Jg(e="",t){const n={...Qg,...t},{ellipsis:r,ellipsizeMode:o,limit:i}=n;if(o===Zg.none)return e;let s,a;switch(o){case Zg.head:s=0,a=i;break;case Zg.middle:s=Math.floor(i/2),a=Math.floor(i/2);break;default:s=i,a=0}const l=o!==Zg.auto?function(e,t,n,r){if("string"!=typeof e)return"";const o=e.length,i=~~t,s=~~n,a=qg(r)?r:Xg;return 0===i&&0===s||i>=o||s>=o||i+s>=o?e:0===s?e.slice(0,i)+a:e.slice(0,i)+a+e.slice(o-s)}(e,s,a,r):e;return l}function ev(e){const{className:t,children:n,ellipsis:r=Xg,ellipsizeMode:o=Zg.auto,limit:i=0,numberOfLines:s=0,...a}=Ya(e,"Truncate"),l=qa();let u;"string"==typeof n?u=n:"number"==typeof n&&(u=n.toString());const d=u?Jg(u,{ellipsis:r,ellipsizeMode:o,limit:i,numberOfLines:s}):n,p=!!u&&o===Zg.auto;return{...a,className:(0,c.useMemo)((()=>l(p&&!s&&Kg,p&&!!s&&bl(1===s?"word-break: break-all;":""," -webkit-box-orient:vertical;-webkit-line-clamp:",s,";display:-webkit-box;overflow:hidden;",""),t)),[t,l,s,p]),children:d}}var tv={grad:.9,turn:360,rad:360/(2*Math.PI)},nv=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},rv=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},ov=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},iv=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},sv=function(e){return{r:ov(e.r,0,255),g:ov(e.g,0,255),b:ov(e.b,0,255),a:ov(e.a)}},av=function(e){return{r:rv(e.r),g:rv(e.g),b:rv(e.b),a:rv(e.a,3)}},lv=/^#([0-9a-f]{3,8})$/i,cv=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},uv=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=Math.max(t,n,r),s=i-Math.min(t,n,r),a=s?i===t?(n-r)/s:i===n?2+(r-t)/s:4+(t-n)/s:0;return{h:60*(a<0?a+6:a),s:i?s/i*100:0,v:i/255*100,a:o}},dv=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),s=r*(1-n),a=r*(1-(t-i)*n),l=r*(1-(1-t+i)*n),c=i%6;return{r:255*[r,a,s,s,l,r][c],g:255*[l,r,r,a,s,s][c],b:255*[s,s,l,r,r,a][c],a:o}},pv=function(e){return{h:iv(e.h),s:ov(e.s,0,100),l:ov(e.l,0,100),a:ov(e.a)}},fv=function(e){return{h:rv(e.h),s:rv(e.s),l:rv(e.l),a:rv(e.a,3)}},hv=function(e){return dv((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},mv=function(e){return{h:(t=uv(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},gv=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,vv=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,bv=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,xv=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,yv={string:[[function(e){var t=lv.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?rv(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?rv(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=bv.exec(e)||xv.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:sv({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=gv.exec(e)||vv.exec(e);if(!t)return null;var n,r,o=pv({h:(n=t[1],r=t[2],void 0===r&&(r="deg"),Number(n)*(tv[r]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return hv(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 nv(t)&&nv(n)&&nv(r)?sv({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(!nv(t)||!nv(n)||!nv(r))return null;var s=pv({h:Number(t),s:Number(n),l:Number(r),a:Number(i)});return hv(s)},"hsl"],[function(e){var t=e.h,n=e.s,r=e.v,o=e.a,i=void 0===o?1:o;if(!nv(t)||!nv(n)||!nv(r))return null;var s=function(e){return{h:iv(e.h),s:ov(e.s,0,100),v:ov(e.v,0,100),a:ov(e.a)}}({h:Number(t),s:Number(n),v:Number(r),a:Number(i)});return dv(s)},"hsv"]]},wv=function(e,t){for(var n=0;n<t.length;n++){var r=t[n][0](e);if(r)return[r,t[n][1]]}return[null,void 0]},_v=function(e){return"string"==typeof e?wv(e.trim(),yv.string):"object"==typeof e&&null!==e?wv(e,yv.object):[null,void 0]},Sv=function(e,t){var n=mv(e);return{h:n.h,s:ov(n.s+100*t,0,100),l:n.l,a:n.a}},Cv=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},kv=function(e,t){var n=mv(e);return{h:n.h,s:n.s,l:ov(n.l+100*t,0,100),a:n.a}},jv=function(){function e(e){this.parsed=_v(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return null!==this.parsed},e.prototype.brightness=function(){return rv(Cv(this.rgba),2)},e.prototype.isDark=function(){return Cv(this.rgba)<.5},e.prototype.isLight=function(){return Cv(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=av(this.rgba)).r,n=e.g,r=e.b,i=(o=e.a)<1?cv(rv(255*o)):"","#"+cv(t)+cv(n)+cv(r)+i;var e,t,n,r,o,i},e.prototype.toRgb=function(){return av(this.rgba)},e.prototype.toRgbString=function(){return t=(e=av(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 fv(mv(this.rgba))},e.prototype.toHslString=function(){return t=(e=fv(mv(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=uv(this.rgba),{h:rv(e.h),s:rv(e.s),v:rv(e.v),a:rv(e.a,3)};var e},e.prototype.invert=function(){return Ev({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),Ev(Sv(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),Ev(Sv(this.rgba,-e))},e.prototype.grayscale=function(){return Ev(Sv(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),Ev(kv(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),Ev(kv(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?Ev({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):rv(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=mv(this.rgba);return"number"==typeof e?Ev({h:e,s:t.s,l:t.l,a:t.a}):rv(t.h)},e.prototype.isEqual=function(e){return this.toHex()===Ev(e).toHex()},e}(),Ev=function(e){return e instanceof jv?e:new jv(e)},Pv=[],Tv=function(e){e.forEach((function(e){Pv.indexOf(e)<0&&(e(jv,yv),Pv.push(e))}))};function Rv(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,s,a=r[this.toHex()];if(a)return a;if(null==t?void 0:t.closest){var l=this.toRgb(),c=1/0,u="black";if(!i.length)for(var d in n)i[d]=new e(n[d]).toRgb();for(var p in n){var f=(o=l,s=i[p],Math.pow(o.r-s.r,2)+Math.pow(o.g-s.g,2)+Math.pow(o.b-s.b,2));f<c&&(c=f,u=p)}return u}},t.string.push([function(t){var r=t.toLowerCase(),o="transparent"===r?"#0000":n[r];return o?new e(o).toRgb():null},"name"])}let Iv;Tv([Rv]);const Nv=gs((function(e){if("string"!=typeof e)return"";if("string"==typeof(t=e)&&Ev(t).isValid())return e;var t;if(!e.includes("var("))return"";if("undefined"==typeof document)return"";const n=function(){if("undefined"!=typeof document){if(!Iv){const e=document.createElement("div");e.setAttribute("data-g2-color-computation-node",""),document.body.appendChild(e),Iv=e}return Iv}}();if(!n)return"";n.style.background=e;const r=window?.getComputedStyle(n).background;return n.style.background="",r||""}));function Mv(e){const t=function(e){const t=Nv(e);return Ev(t).isLight()?"#000000":"#ffffff"}(e);return"#000000"===t?"dark":"light"}const Av=bl("color:",jl.gray[900],";line-height:",Tl.fontLineHeightBase,";margin:0;text-wrap:balance;text-wrap:pretty;",""),Dv={name:"4zleql",styles:"display:block"},Ov=bl("color:",jl.alert.green,";",""),zv=bl("color:",jl.alert.red,";",""),Lv=bl("color:",jl.gray[700],";",""),Fv=bl("mark{background:",jl.alert.yellow,";border-radius:",Tl.radiusSmall,";box-shadow:0 0 0 1px rgba( 0, 0, 0, 0.05 ) inset,0 -1px 0 rgba( 0, 0, 0, 0.1 ) inset;}",""),Bv={name:"50zrmy",styles:"text-transform:uppercase"};var Vv=o(9664);const $v=gs((e=>{const t={};for(const n in e)t[n.toLowerCase()]=e[n];return t}));const Hv=13,Wv={body:Hv,caption:10,footnote:11,largeTitle:28,subheadline:12,title:20},Uv=[1,2,3,4,5,6].flatMap((e=>[e,e.toString()]));function Gv(e=Hv){if(e in Wv)return Gv(Wv[e]);if("number"!=typeof e){const t=parseFloat(e);if(Number.isNaN(t))return e;e=t}return`calc(${`(${e} / ${Hv})`} * ${Tl.fontSize})`}function Kv(e=3){if(!Uv.includes(e))return Gv(e);return Tl[`fontSizeH${e}`]}var qv={name:"50zrmy",styles:"text-transform:uppercase"};function Yv(t){const{adjustLineHeightForInnerControls:n,align:r,children:o,className:i,color:s,ellipsizeMode:a,isDestructive:l=!1,display:u,highlightEscape:d=!1,highlightCaseSensitive:p=!1,highlightWords:f,highlightSanitize:h,isBlock:m=!1,letterSpacing:g,lineHeight:v,optimizeReadabilityFor:b,size:x,truncate:y=!1,upperCase:w=!1,variant:_,weight:S=Tl.fontWeight,...C}=Ya(t,"Text");let k=o;const j=Array.isArray(f),E="caption"===x;if(j){if("string"!=typeof o)throw new TypeError("`children` of `Text` must only be `string` types when `highlightWords` is defined");k=function({activeClassName:e="",activeIndex:t=-1,activeStyle:n,autoEscape:r,caseSensitive:o=!1,children:i,findChunks:s,highlightClassName:a="",highlightStyle:l={},highlightTag:u="mark",sanitize:d,searchWords:p=[],unhighlightClassName:f="",unhighlightStyle:h}){if(!i)return null;if("string"!=typeof i)return i;const m=i,g=(0,Vv.findAll)({autoEscape:r,caseSensitive:o,findChunks:s,sanitize:d,searchWords:p,textToHighlight:m}),v=u;let b,x=-1,y="";const w=g.map(((r,i)=>{const s=m.substr(r.start,r.end-r.start);if(r.highlight){let r;x++,r="object"==typeof a?o?a[s]:(a=$v(a))[s.toLowerCase()]:a;const u=x===+t;y=`${r} ${u?e:""}`,b=!0===u&&null!==n?Object.assign({},l,n):l;const d={children:s,className:y,key:i,style:b};return"string"!=typeof v&&(d.highlightIndex=x),(0,c.createElement)(v,d)}return(0,c.createElement)("span",{children:s,className:f,key:i,style:h})}));return w}({autoEscape:d,children:o,caseSensitive:p,searchWords:f,sanitize:h})}const P=qa();let T;!0===y&&(T="auto"),!1===y&&(T="none");const R=ev({...C,className:(0,c.useMemo)((()=>{const t={},o=function(e,t){if(t)return t;if(!e)return;let n=`calc(${Tl.controlHeight} + ${wl(2)})`;switch(e){case"large":n=`calc(${Tl.controlHeightLarge} + ${wl(2)})`;break;case"small":n=`calc(${Tl.controlHeightSmall} + ${wl(2)})`;break;case"xSmall":n=`calc(${Tl.controlHeightXSmall} + ${wl(2)})`}return n}(n,v);if(t.Base=bl({color:s,display:u,fontSize:Gv(x),fontWeight:S,lineHeight:o,letterSpacing:g,textAlign:r},"",""),t.upperCase=qv,t.optimalTextColor=null,b){const e="dark"===Mv(b);t.optimalTextColor=bl(e?{color:jl.gray[900]}:{color:jl.white},"","")}return P(Av,t.Base,t.optimalTextColor,l&&zv,!!j&&Fv,m&&Dv,E&&Lv,_&&e[_],w&&t.upperCase,i)}),[n,r,i,s,P,u,m,E,l,j,g,v,b,x,w,_,S]),children:o,ellipsizeMode:a||T});return!y&&Array.isArray(o)&&(k=c.Children.map(o,(e=>{if("object"!=typeof e||null===e||!("props"in e))return e;return el(e,["Link"])?(0,c.cloneElement)(e,{size:e.props.size||"inherit"}):e}))),{...R,children:y?R.children:k}}const Xv=Xa((function(e,t){const n=Yv(e);return(0,wt.jsx)(dl,{as:"span",...n,ref:t})}),"Text");const Zv={name:"9amh4a",styles:"font-size:11px;font-weight:500;line-height:1.4;text-transform:uppercase"};const Qv=cl("span",{target:"em5sgkm8"})({name:"pvvbxf",styles:"box-sizing:border-box;display:block"}),Jv=cl("span",{target:"em5sgkm7"})({name:"jgf79h",styles:"align-items:center;align-self:stretch;box-sizing:border-box;display:flex"}),eb=({disabled:e,isBorderless:t})=>t?"transparent":e?jl.ui.borderDisabled:jl.ui.border,tb=cl("div",{target:"em5sgkm6"})("&&&{box-sizing:border-box;border-color:",eb,";border-radius:inherit;border-style:solid;border-width:1px;bottom:0;left:0;margin:0;padding:0;pointer-events:none;position:absolute;right:0;top:0;",Bg({paddingLeft:2}),";}"),nb=cl(Ig,{target:"em5sgkm5"})("box-sizing:border-box;position:relative;border-radius:",Tl.radiusSmall,";padding-top:0;&:focus-within:not( :has( :is( ",Qv,", ",Jv," ):focus-within ) ){",tb,"{border-color:",jl.ui.borderFocus,";box-shadow:",Tl.controlBoxShadowFocus,";outline:2px solid transparent;outline-offset:-2px;}}"),rb=({disabled:e})=>bl({backgroundColor:e?jl.ui.backgroundDisabled:jl.ui.background},"","");var ob={name:"1d3w5wq",styles:"width:100%"};const ib=({__unstableInputWidth:e,labelPosition:t})=>e?"side"===t?"":bl("edge"===t?{flex:`0 0 ${e}`}:{width:e},"",""):ob,sb=cl("div",{target:"em5sgkm4"})("align-items:center;box-sizing:border-box;border-radius:inherit;display:flex;flex:1;position:relative;",rb," ",ib,";"),ab=({disabled:e})=>e?bl({color:jl.ui.textDisabled},"",""):"",lb=({inputSize:e})=>{const t={default:"13px",small:"11px",compact:"13px","__unstable-large":"13px"},n=t[e]||t.default;return n?bl("font-size:","16px",";@media ( min-width: 600px ){font-size:",n,";}",""):""},cb=({inputSize:e,__next40pxDefaultSize:t})=>{const n={default:{height:40,lineHeight:1,minHeight:40,paddingLeft:Tl.controlPaddingX,paddingRight:Tl.controlPaddingX},small:{height:24,lineHeight:1,minHeight:24,paddingLeft:Tl.controlPaddingXSmall,paddingRight:Tl.controlPaddingXSmall},compact:{height:32,lineHeight:1,minHeight:32,paddingLeft:Tl.controlPaddingXSmall,paddingRight:Tl.controlPaddingXSmall},"__unstable-large":{height:40,lineHeight:1,minHeight:40,paddingLeft:Tl.controlPaddingX,paddingRight:Tl.controlPaddingX}};return t||(n.default=n.compact),n[e]||n.default},ub=e=>bl(cb(e),"",""),db=({paddingInlineStart:e,paddingInlineEnd:t})=>bl({paddingInlineStart:e,paddingInlineEnd:t},"",""),pb=({isDragging:e,dragCursor:t})=>{let n,r;return e&&(n=bl("cursor:",t,";user-select:none;&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none!important;margin:0!important;}","")),e&&t&&(r=bl("&:active{cursor:",t,";}","")),bl(n," ",r,";","")},fb=cl("input",{target:"em5sgkm3"})("&&&{background-color:transparent;box-sizing:border-box;border:none;box-shadow:none!important;color:",jl.theme.foreground,";display:block;font-family:inherit;margin:0;outline:none;width:100%;",pb," ",ab," ",lb," ",ub," ",db," &::-webkit-input-placeholder{line-height:normal;}}"),hb=cl(Xv,{target:"em5sgkm2"})("&&&{",Zv,";box-sizing:border-box;display:block;padding-top:0;padding-bottom:0;max-width:100%;z-index:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}"),mb=e=>(0,wt.jsx)(hb,{...e,as:"label"}),gb=cl(Gg,{target:"em5sgkm1"})({name:"1b6uupn",styles:"max-width:calc( 100% - 10px )"}),vb=({variant:e="default",size:t,__next40pxDefaultSize:n,isPrefix:r})=>{const{paddingLeft:o}=cb({inputSize:t,__next40pxDefaultSize:n}),i=r?"paddingInlineStart":"paddingInlineEnd";return bl("default"===e?{[i]:o}:{display:"flex",[i]:o-4},"","")},bb=cl("div",{target:"em5sgkm0"})(vb,";");const xb=(0,c.memo)((function({disabled:e=!1,isBorderless:t=!1}){return(0,wt.jsx)(tb,{"aria-hidden":"true",className:"components-input-control__backdrop",disabled:e,isBorderless:t})})),yb=xb;function wb({children:e,hideLabelFromVision:t,htmlFor:n,...r}){return e?t?(0,wt.jsx)(pl,{as:"label",htmlFor:n,children:e}):(0,wt.jsx)(gb,{children:(0,wt.jsx)(mb,{htmlFor:n,...r,children:e})}):null}function _b(e){const{__next36pxDefaultSize:t,__next40pxDefaultSize:n,...r}=e;return{...r,__next40pxDefaultSize:null!=n?n:t}}function Sb(e){const t={};switch(e){case"top":t.direction="column",t.expanded=!1,t.gap=0;break;case"bottom":t.direction="column-reverse",t.expanded=!1,t.gap=0;break;case"edge":t.justify="space-between"}return t}function Cb(e,t){const{__next40pxDefaultSize:n,__unstableInputWidth:r,children:o,className:i,disabled:s=!1,hideLabelFromVision:a=!1,labelPosition:u,id:d,isBorderless:p=!1,label:f,prefix:h,size:m="default",suffix:g,...v}=_b(Ya(e,"InputBase")),b=function(e){const t=(0,l.useInstanceId)(Cb);return e||`input-base-control-${t}`}(d),x=a||!f,y=(0,c.useMemo)((()=>({InputControlPrefixWrapper:{__next40pxDefaultSize:n,size:m},InputControlSuffixWrapper:{__next40pxDefaultSize:n,size:m}})),[n,m]);return(0,wt.jsxs)(nb,{...v,...Sb(u),className:i,gap:2,ref:t,children:[(0,wt.jsx)(wb,{className:"components-input-control__label",hideLabelFromVision:a,labelPosition:u,htmlFor:b,children:f}),(0,wt.jsxs)(sb,{__unstableInputWidth:r,className:"components-input-control__container",disabled:s,hideLabel:x,labelPosition:u,children:[(0,wt.jsxs)(is,{value:y,children:[h&&(0,wt.jsx)(Qv,{className:"components-input-control__prefix",children:h}),o,g&&(0,wt.jsx)(Jv,{className:"components-input-control__suffix",children:g})]}),(0,wt.jsx)(yb,{disabled:s,isBorderless:p})]})]})}const kb=Xa(Cb,"InputBase");const jb={toVector:(e,t)=>(void 0===e&&(e=t),Array.isArray(e)?e:[e,e]),add:(e,t)=>[e[0]+t[0],e[1]+t[1]],sub:(e,t)=>[e[0]-t[0],e[1]-t[1]],addTo(e,t){e[0]+=t[0],e[1]+=t[1]},subTo(e,t){e[0]-=t[0],e[1]-=t[1]}};function Eb(e,t,n){return 0===t||Math.abs(t)===1/0?Math.pow(e,5*n):e*t*n/(t+n*e)}function Pb(e,t,n,r=.15){return 0===r?function(e,t,n){return Math.max(t,Math.min(e,n))}(e,t,n):e<t?-Eb(t-e,n-t,r)+t:e>n?+Eb(e-n,n-t,r)+n:e}function Tb(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function Rb(e,t,n){return(t=Tb(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ib(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Nb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ib(Object(n),!0).forEach((function(t){Rb(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ib(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Mb={pointer:{start:"down",change:"move",end:"up"},mouse:{start:"down",change:"move",end:"up"},touch:{start:"start",change:"move",end:"end"},gesture:{start:"start",change:"change",end:"end"}};function Ab(e){return e?e[0].toUpperCase()+e.slice(1):""}const Db=["enter","leave"];function Ob(e,t="",n=!1){const r=Mb[e],o=r&&r[t]||t;return"on"+Ab(e)+Ab(o)+(function(e=!1,t){return e&&!Db.includes(t)}(n,o)?"Capture":"")}const zb=["gotpointercapture","lostpointercapture"];function Lb(e){let t=e.substring(2).toLowerCase();const n=!!~t.indexOf("passive");n&&(t=t.replace("passive",""));const r=zb.includes(t)?"capturecapture":"capture",o=!!~t.indexOf(r);return o&&(t=t.replace("capture","")),{device:t,capture:o,passive:n}}function Fb(e){return"touches"in e}function Bb(e){return Fb(e)?"touch":"pointerType"in e?e.pointerType:"mouse"}function Vb(e){return Fb(e)?function(e){return"touchend"===e.type||"touchcancel"===e.type?e.changedTouches:e.targetTouches}(e)[0]:e}function $b(e){return function(e){return Array.from(e.touches).filter((t=>{var n,r;return t.target===e.currentTarget||(null===(n=e.currentTarget)||void 0===n||null===(r=n.contains)||void 0===r?void 0:r.call(n,t.target))}))}(e).map((e=>e.identifier))}function Hb(e){const t=Vb(e);return Fb(e)?t.identifier:t.pointerId}function Wb(e){const t=Vb(e);return[t.clientX,t.clientY]}function Ub(e,...t){return"function"==typeof e?e(...t):e}function Gb(){}function Kb(...e){return 0===e.length?Gb:1===e.length?e[0]:function(){let t;for(const n of e)t=n.apply(this,arguments)||t;return t}}function qb(e,t){return Object.assign({},t,e||{})}class Yb{constructor(e,t,n){this.ctrl=e,this.args=t,this.key=n,this.state||(this.state={},this.computeValues([0,0]),this.computeInitial(),this.init&&this.init(),this.reset())}get state(){return this.ctrl.state[this.key]}set state(e){this.ctrl.state[this.key]=e}get shared(){return this.ctrl.state.shared}get eventStore(){return this.ctrl.gestureEventStores[this.key]}get timeoutStore(){return this.ctrl.gestureTimeoutStores[this.key]}get config(){return this.ctrl.config[this.key]}get sharedConfig(){return this.ctrl.config.shared}get handler(){return this.ctrl.handlers[this.key]}reset(){const{state:e,shared:t,ingKey:n,args:r}=this;t[n]=e._active=e.active=e._blocked=e._force=!1,e._step=[!1,!1],e.intentional=!1,e._movement=[0,0],e._distance=[0,0],e._direction=[0,0],e._delta=[0,0],e._bounds=[[-1/0,1/0],[-1/0,1/0]],e.args=r,e.axis=void 0,e.memo=void 0,e.elapsedTime=e.timeDelta=0,e.direction=[0,0],e.distance=[0,0],e.overflow=[0,0],e._movementBound=[!1,!1],e.velocity=[0,0],e.movement=[0,0],e.delta=[0,0],e.timeStamp=0}start(e){const t=this.state,n=this.config;t._active||(this.reset(),this.computeInitial(),t._active=!0,t.target=e.target,t.currentTarget=e.currentTarget,t.lastOffset=n.from?Ub(n.from,t):t.offset,t.offset=t.lastOffset,t.startTime=t.timeStamp=e.timeStamp)}computeValues(e){const t=this.state;t._values=e,t.values=this.config.transform(e)}computeInitial(){const e=this.state;e._initial=e._values,e.initial=e.values}compute(e){const{state:t,config:n,shared:r}=this;t.args=this.args;let o=0;if(e&&(t.event=e,n.preventDefault&&e.cancelable&&t.event.preventDefault(),t.type=e.type,r.touches=this.ctrl.pointerIds.size||this.ctrl.touchIds.size,r.locked=!!document.pointerLockElement,Object.assign(r,function(e){const t={};if("buttons"in e&&(t.buttons=e.buttons),"shiftKey"in e){const{shiftKey:n,altKey:r,metaKey:o,ctrlKey:i}=e;Object.assign(t,{shiftKey:n,altKey:r,metaKey:o,ctrlKey:i})}return t}(e)),r.down=r.pressed=r.buttons%2==1||r.touches>0,o=e.timeStamp-t.timeStamp,t.timeStamp=e.timeStamp,t.elapsedTime=t.timeStamp-t.startTime),t._active){const e=t._delta.map(Math.abs);jb.addTo(t._distance,e)}this.axisIntent&&this.axisIntent(e);const[i,s]=t._movement,[a,l]=n.threshold,{_step:c,values:u}=t;if(n.hasCustomTransform?(!1===c[0]&&(c[0]=Math.abs(i)>=a&&u[0]),!1===c[1]&&(c[1]=Math.abs(s)>=l&&u[1])):(!1===c[0]&&(c[0]=Math.abs(i)>=a&&Math.sign(i)*a),!1===c[1]&&(c[1]=Math.abs(s)>=l&&Math.sign(s)*l)),t.intentional=!1!==c[0]||!1!==c[1],!t.intentional)return;const d=[0,0];if(n.hasCustomTransform){const[e,t]=u;d[0]=!1!==c[0]?e-c[0]:0,d[1]=!1!==c[1]?t-c[1]:0}else d[0]=!1!==c[0]?i-c[0]:0,d[1]=!1!==c[1]?s-c[1]:0;this.restrictToAxis&&!t._blocked&&this.restrictToAxis(d);const p=t.offset,f=t._active&&!t._blocked||t.active;f&&(t.first=t._active&&!t.active,t.last=!t._active&&t.active,t.active=r[this.ingKey]=t._active,e&&(t.first&&("bounds"in n&&(t._bounds=Ub(n.bounds,t)),this.setup&&this.setup()),t.movement=d,this.computeOffset()));const[h,m]=t.offset,[[g,v],[b,x]]=t._bounds;t.overflow=[h<g?-1:h>v?1:0,m<b?-1:m>x?1:0],t._movementBound[0]=!!t.overflow[0]&&(!1===t._movementBound[0]?t._movement[0]:t._movementBound[0]),t._movementBound[1]=!!t.overflow[1]&&(!1===t._movementBound[1]?t._movement[1]:t._movementBound[1]);const y=t._active&&n.rubberband||[0,0];if(t.offset=function(e,[t,n],[r,o]){const[[i,s],[a,l]]=e;return[Pb(t,i,s,r),Pb(n,a,l,o)]}(t._bounds,t.offset,y),t.delta=jb.sub(t.offset,p),this.computeMovement(),f&&(!t.last||o>32)){t.delta=jb.sub(t.offset,p);const e=t.delta.map(Math.abs);jb.addTo(t.distance,e),t.direction=t.delta.map(Math.sign),t._direction=t._delta.map(Math.sign),!t.first&&o>0&&(t.velocity=[e[0]/o,e[1]/o],t.timeDelta=o)}}emit(){const e=this.state,t=this.shared,n=this.config;if(e._active||this.clean(),(e._blocked||!e.intentional)&&!e._force&&!n.triggerAllEvents)return;const r=this.handler(Nb(Nb(Nb({},t),e),{},{[this.aliasKey]:e.values}));void 0!==r&&(e.memo=r)}clean(){this.eventStore.clean(),this.timeoutStore.clean()}}class Xb extends Yb{constructor(...e){super(...e),Rb(this,"aliasKey","xy")}reset(){super.reset(),this.state.axis=void 0}init(){this.state.offset=[0,0],this.state.lastOffset=[0,0]}computeOffset(){this.state.offset=jb.add(this.state.lastOffset,this.state.movement)}computeMovement(){this.state.movement=jb.sub(this.state.offset,this.state.lastOffset)}axisIntent(e){const t=this.state,n=this.config;if(!t.axis&&e){const r="object"==typeof n.axisThreshold?n.axisThreshold[Bb(e)]:n.axisThreshold;t.axis=function([e,t],n){const r=Math.abs(e),o=Math.abs(t);return r>o&&r>n?"x":o>r&&o>n?"y":void 0}(t._movement,r)}t._blocked=(n.lockDirection||!!n.axis)&&!t.axis||!!n.axis&&n.axis!==t.axis}restrictToAxis(e){if(this.config.axis||this.config.lockDirection)switch(this.state.axis){case"x":e[1]=0;break;case"y":e[0]=0}}}const Zb=e=>e,Qb={enabled:(e=!0)=>e,eventOptions:(e,t,n)=>Nb(Nb({},n.shared.eventOptions),e),preventDefault:(e=!1)=>e,triggerAllEvents:(e=!1)=>e,rubberband(e=0){switch(e){case!0:return[.15,.15];case!1:return[0,0];default:return jb.toVector(e)}},from:e=>"function"==typeof e?e:null!=e?jb.toVector(e):void 0,transform(e,t,n){const r=e||n.shared.transform;return this.hasCustomTransform=!!r,r||Zb},threshold:e=>jb.toVector(e,0)};const Jb=Nb(Nb({},Qb),{},{axis(e,t,{axis:n}){if(this.lockDirection="lock"===n,!this.lockDirection)return n},axisThreshold:(e=0)=>e,bounds(e={}){if("function"==typeof e)return t=>Jb.bounds(e(t));if("current"in e)return()=>e.current;if("function"==typeof HTMLElement&&e instanceof HTMLElement)return e;const{left:t=-1/0,right:n=1/0,top:r=-1/0,bottom:o=1/0}=e;return[[t,n],[r,o]]}}),ex={ArrowRight:(e,t=1)=>[e*t,0],ArrowLeft:(e,t=1)=>[-1*e*t,0],ArrowUp:(e,t=1)=>[0,-1*e*t],ArrowDown:(e,t=1)=>[0,e*t]};const tx="undefined"!=typeof window&&window.document&&window.document.createElement;function nx(){return tx&&"ontouchstart"in window}const rx={isBrowser:tx,gesture:function(){try{return"constructor"in GestureEvent}catch(e){return!1}}(),touch:nx(),touchscreen:nx()||tx&&window.navigator.maxTouchPoints>1,pointer:tx&&"onpointerdown"in window,pointerLock:tx&&"exitPointerLock"in window.document},ox={mouse:0,touch:0,pen:8},ix=Nb(Nb({},Jb),{},{device(e,t,{pointer:{touch:n=!1,lock:r=!1,mouse:o=!1}={}}){return this.pointerLock=r&&rx.pointerLock,rx.touch&&n?"touch":this.pointerLock?"mouse":rx.pointer&&!o?"pointer":rx.touch?"touch":"mouse"},preventScrollAxis(e,t,{preventScroll:n}){if(this.preventScrollDelay="number"==typeof n?n:n||void 0===n&&e?250:void 0,rx.touchscreen&&!1!==n)return e||(void 0!==n?"y":void 0)},pointerCapture(e,t,{pointer:{capture:n=!0,buttons:r=1,keys:o=!0}={}}){return this.pointerButtons=r,this.keys=o,!this.pointerLock&&"pointer"===this.device&&n},threshold(e,t,{filterTaps:n=!1,tapsThreshold:r=3,axis:o}){const i=jb.toVector(e,n?r:o?1:0);return this.filterTaps=n,this.tapsThreshold=r,i},swipe({velocity:e=.5,distance:t=50,duration:n=250}={}){return{velocity:this.transform(jb.toVector(e)),distance:this.transform(jb.toVector(t)),duration:n}},delay(e=0){switch(e){case!0:return 180;case!1:return 0;default:return e}},axisThreshold:e=>e?Nb(Nb({},ox),e):ox,keyboardDisplacement:(e=10)=>e});Nb(Nb({},Qb),{},{device(e,t,{shared:n,pointer:{touch:r=!1}={}}){if(n.target&&!rx.touch&&rx.gesture)return"gesture";if(rx.touch&&r)return"touch";if(rx.touchscreen){if(rx.pointer)return"pointer";if(rx.touch)return"touch"}},bounds(e,t,{scaleBounds:n={},angleBounds:r={}}){const o=e=>{const t=qb(Ub(n,e),{min:-1/0,max:1/0});return[t.min,t.max]},i=e=>{const t=qb(Ub(r,e),{min:-1/0,max:1/0});return[t.min,t.max]};return"function"!=typeof n&&"function"!=typeof r?[o(),i()]:e=>[o(e),i(e)]},threshold(e,t,n){this.lockDirection="lock"===n.axis;return jb.toVector(e,this.lockDirection?[.1,3]:0)},modifierKey:e=>void 0===e?"ctrlKey":e,pinchOnWheel:(e=!0)=>e});Nb(Nb({},Jb),{},{mouseOnly:(e=!0)=>e});Nb(Nb({},Jb),{},{mouseOnly:(e=!0)=>e});const sx=new Map,ax=new Map;const lx={key:"drag",engine:class extends Xb{constructor(...e){super(...e),Rb(this,"ingKey","dragging")}reset(){super.reset();const e=this.state;e._pointerId=void 0,e._pointerActive=!1,e._keyboardActive=!1,e._preventScroll=!1,e._delayed=!1,e.swipe=[0,0],e.tap=!1,e.canceled=!1,e.cancel=this.cancel.bind(this)}setup(){const e=this.state;if(e._bounds instanceof HTMLElement){const t=e._bounds.getBoundingClientRect(),n=e.currentTarget.getBoundingClientRect(),r={left:t.left-n.left+e.offset[0],right:t.right-n.right+e.offset[0],top:t.top-n.top+e.offset[1],bottom:t.bottom-n.bottom+e.offset[1]};e._bounds=Jb.bounds(r)}}cancel(){const e=this.state;e.canceled||(e.canceled=!0,e._active=!1,setTimeout((()=>{this.compute(),this.emit()}),0))}setActive(){this.state._active=this.state._pointerActive||this.state._keyboardActive}clean(){this.pointerClean(),this.state._pointerActive=!1,this.state._keyboardActive=!1,super.clean()}pointerDown(e){const t=this.config,n=this.state;if(null!=e.buttons&&(Array.isArray(t.pointerButtons)?!t.pointerButtons.includes(e.buttons):-1!==t.pointerButtons&&t.pointerButtons!==e.buttons))return;const r=this.ctrl.setEventIds(e);t.pointerCapture&&e.target.setPointerCapture(e.pointerId),r&&r.size>1&&n._pointerActive||(this.start(e),this.setupPointer(e),n._pointerId=Hb(e),n._pointerActive=!0,this.computeValues(Wb(e)),this.computeInitial(),t.preventScrollAxis&&"mouse"!==Bb(e)?(n._active=!1,this.setupScrollPrevention(e)):t.delay>0?(this.setupDelayTrigger(e),t.triggerAllEvents&&(this.compute(e),this.emit())):this.startPointerDrag(e))}startPointerDrag(e){const t=this.state;t._active=!0,t._preventScroll=!0,t._delayed=!1,this.compute(e),this.emit()}pointerMove(e){const t=this.state,n=this.config;if(!t._pointerActive)return;const r=Hb(e);if(void 0!==t._pointerId&&r!==t._pointerId)return;const o=Wb(e);return document.pointerLockElement===e.target?t._delta=[e.movementX,e.movementY]:(t._delta=jb.sub(o,t._values),this.computeValues(o)),jb.addTo(t._movement,t._delta),this.compute(e),t._delayed&&t.intentional?(this.timeoutStore.remove("dragDelay"),t.active=!1,void this.startPointerDrag(e)):n.preventScrollAxis&&!t._preventScroll?t.axis?t.axis===n.preventScrollAxis||"xy"===n.preventScrollAxis?(t._active=!1,void this.clean()):(this.timeoutStore.remove("startPointerDrag"),void this.startPointerDrag(e)):void 0:void this.emit()}pointerUp(e){this.ctrl.setEventIds(e);try{this.config.pointerCapture&&e.target.hasPointerCapture(e.pointerId)&&e.target.releasePointerCapture(e.pointerId)}catch(e){0}const t=this.state,n=this.config;if(!t._active||!t._pointerActive)return;const r=Hb(e);if(void 0!==t._pointerId&&r!==t._pointerId)return;this.state._pointerActive=!1,this.setActive(),this.compute(e);const[o,i]=t._distance;if(t.tap=o<=n.tapsThreshold&&i<=n.tapsThreshold,t.tap&&n.filterTaps)t._force=!0;else{const[e,r]=t._delta,[o,i]=t._movement,[s,a]=n.swipe.velocity,[l,c]=n.swipe.distance,u=n.swipe.duration;if(t.elapsedTime<u){const n=Math.abs(e/t.timeDelta),u=Math.abs(r/t.timeDelta);n>s&&Math.abs(o)>l&&(t.swipe[0]=Math.sign(e)),u>a&&Math.abs(i)>c&&(t.swipe[1]=Math.sign(r))}}this.emit()}pointerClick(e){!this.state.tap&&e.detail>0&&(e.preventDefault(),e.stopPropagation())}setupPointer(e){const t=this.config,n=t.device;t.pointerLock&&e.currentTarget.requestPointerLock(),t.pointerCapture||(this.eventStore.add(this.sharedConfig.window,n,"change",this.pointerMove.bind(this)),this.eventStore.add(this.sharedConfig.window,n,"end",this.pointerUp.bind(this)),this.eventStore.add(this.sharedConfig.window,n,"cancel",this.pointerUp.bind(this)))}pointerClean(){this.config.pointerLock&&document.pointerLockElement===this.state.currentTarget&&document.exitPointerLock()}preventScroll(e){this.state._preventScroll&&e.cancelable&&e.preventDefault()}setupScrollPrevention(e){this.state._preventScroll=!1,function(e){"persist"in e&&"function"==typeof e.persist&&e.persist()}(e);const t=this.eventStore.add(this.sharedConfig.window,"touch","change",this.preventScroll.bind(this),{passive:!1});this.eventStore.add(this.sharedConfig.window,"touch","end",t),this.eventStore.add(this.sharedConfig.window,"touch","cancel",t),this.timeoutStore.add("startPointerDrag",this.startPointerDrag.bind(this),this.config.preventScrollDelay,e)}setupDelayTrigger(e){this.state._delayed=!0,this.timeoutStore.add("dragDelay",(()=>{this.state._step=[0,0],this.startPointerDrag(e)}),this.config.delay)}keyDown(e){const t=ex[e.key];if(t){const n=this.state,r=e.shiftKey?10:e.altKey?.1:1;this.start(e),n._delta=t(this.config.keyboardDisplacement,r),n._keyboardActive=!0,jb.addTo(n._movement,n._delta),this.compute(e),this.emit()}}keyUp(e){e.key in ex&&(this.state._keyboardActive=!1,this.setActive(),this.compute(e),this.emit())}bind(e){const t=this.config.device;e(t,"start",this.pointerDown.bind(this)),this.config.pointerCapture&&(e(t,"change",this.pointerMove.bind(this)),e(t,"end",this.pointerUp.bind(this)),e(t,"cancel",this.pointerUp.bind(this)),e("lostPointerCapture","",this.pointerUp.bind(this))),this.config.keys&&(e("key","down",this.keyDown.bind(this)),e("key","up",this.keyUp.bind(this))),this.config.filterTaps&&e("click","",this.pointerClick.bind(this),{capture:!0,passive:!1})}},resolver:ix};function cx(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}const ux={target(e){if(e)return()=>"current"in e?e.current:e},enabled:(e=!0)=>e,window:(e=(rx.isBrowser?window:void 0))=>e,eventOptions:({passive:e=!0,capture:t=!1}={})=>({passive:e,capture:t}),transform:e=>e},dx=["target","eventOptions","window","enabled","transform"];function px(e={},t){const n={};for(const[r,o]of Object.entries(t))switch(typeof o){case"function":n[r]=o.call(n,e[r],r,e);break;case"object":n[r]=px(e[r],o);break;case"boolean":o&&(n[r]=e[r])}return n}class fx{constructor(e,t){Rb(this,"_listeners",new Set),this._ctrl=e,this._gestureKey=t}add(e,t,n,r,o){const i=this._listeners,s=function(e,t=""){const n=Mb[e];return e+(n&&n[t]||t)}(t,n),a=Nb(Nb({},this._gestureKey?this._ctrl.config[this._gestureKey].eventOptions:{}),o);e.addEventListener(s,r,a);const l=()=>{e.removeEventListener(s,r,a),i.delete(l)};return i.add(l),l}clean(){this._listeners.forEach((e=>e())),this._listeners.clear()}}class hx{constructor(){Rb(this,"_timeouts",new Map)}add(e,t,n=140,...r){this.remove(e),this._timeouts.set(e,window.setTimeout(t,n,...r))}remove(e){const t=this._timeouts.get(e);t&&window.clearTimeout(t)}clean(){this._timeouts.forEach((e=>{window.clearTimeout(e)})),this._timeouts.clear()}}class mx{constructor(e){Rb(this,"gestures",new Set),Rb(this,"_targetEventStore",new fx(this)),Rb(this,"gestureEventStores",{}),Rb(this,"gestureTimeoutStores",{}),Rb(this,"handlers",{}),Rb(this,"config",{}),Rb(this,"pointerIds",new Set),Rb(this,"touchIds",new Set),Rb(this,"state",{shared:{shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1}}),function(e,t){t.drag&&gx(e,"drag");t.wheel&&gx(e,"wheel");t.scroll&&gx(e,"scroll");t.move&&gx(e,"move");t.pinch&&gx(e,"pinch");t.hover&&gx(e,"hover")}(this,e)}setEventIds(e){return Fb(e)?(this.touchIds=new Set($b(e)),this.touchIds):"pointerId"in e?("pointerup"===e.type||"pointercancel"===e.type?this.pointerIds.delete(e.pointerId):"pointerdown"===e.type&&this.pointerIds.add(e.pointerId),this.pointerIds):void 0}applyHandlers(e,t){this.handlers=e,this.nativeHandlers=t}applyConfig(e,t){this.config=function(e,t,n={}){const r=e,{target:o,eventOptions:i,window:s,enabled:a,transform:l}=r,c=cx(r,dx);if(n.shared=px({target:o,eventOptions:i,window:s,enabled:a,transform:l},ux),t){const e=ax.get(t);n[t]=px(Nb({shared:n.shared},c),e)}else for(const e in c){const t=ax.get(e);t&&(n[e]=px(Nb({shared:n.shared},c[e]),t))}return n}(e,t,this.config)}clean(){this._targetEventStore.clean();for(const e of this.gestures)this.gestureEventStores[e].clean(),this.gestureTimeoutStores[e].clean()}effect(){return this.config.shared.target&&this.bind(),()=>this._targetEventStore.clean()}bind(...e){const t=this.config.shared,n={};let r;if(!t.target||(r=t.target(),r)){if(t.enabled){for(const t of this.gestures){const o=this.config[t],i=vx(n,o.eventOptions,!!r);if(o.enabled){new(sx.get(t))(this,e,t).bind(i)}}const o=vx(n,t.eventOptions,!!r);for(const t in this.nativeHandlers)o(t,"",(n=>this.nativeHandlers[t](Nb(Nb({},this.state.shared),{},{event:n,args:e}))),void 0,!0)}for(const e in n)n[e]=Kb(...n[e]);if(!r)return n;for(const e in n){const{device:t,capture:o,passive:i}=Lb(e);this._targetEventStore.add(r,t,"",n[e],{capture:o,passive:i})}}}}function gx(e,t){e.gestures.add(t),e.gestureEventStores[t]=new fx(e,t),e.gestureTimeoutStores[t]=new hx}const vx=(e,t,n)=>(r,o,i,s={},a=!1)=>{var l,c;const u=null!==(l=s.capture)&&void 0!==l?l:t.capture,d=null!==(c=s.passive)&&void 0!==c?c:t.passive;let p=a?r:Ob(r,o,u);n&&d&&(p+="Passive"),e[p]=e[p]||[],e[p].push(i)};function bx(e,t={},n,r){const o=$().useMemo((()=>new mx(e)),[]);if(o.applyHandlers(e,r),o.applyConfig(t,n),$().useEffect(o.effect.bind(o)),$().useEffect((()=>o.clean.bind(o)),[]),void 0===t.target)return o.bind.bind(o)}function xx(e,t){var n;return n=lx,sx.set(n.key,n.engine),ax.set(n.key,n.resolver),bx({drag:e},t||{},"drag")}const yx=e=>e,wx={error:null,initialValue:"",isDirty:!1,isDragEnabled:!1,isDragging:!1,isPressEnterToChange:!1,value:""},_x="CHANGE",Sx="COMMIT",Cx="CONTROL",kx="DRAG_END",jx="DRAG_START",Ex="DRAG",Px="INVALIDATE",Tx="PRESS_DOWN",Rx="PRESS_ENTER",Ix="PRESS_UP",Nx="RESET";function Mx(e=yx,t=wx,n){const[r,o]=(0,c.useReducer)((i=e,(e,t)=>{const n={...e};switch(t.type){case Cx:return n.value=t.payload.value,n.isDirty=!1,n._event=void 0,n;case Ix:case Tx:n.isDirty=!1;break;case jx:n.isDragging=!0;break;case kx:n.isDragging=!1;break;case _x:n.error=null,n.value=t.payload.value,e.isPressEnterToChange&&(n.isDirty=!0);break;case Sx:n.value=t.payload.value,n.isDirty=!1;break;case Nx:n.error=null,n.isDirty=!1,n.value=t.payload.value||e.initialValue;break;case Px:n.error=t.payload.error}return n._event=t.payload.event,i(n,t)}),function(e=wx){const{value:t}=e;return{...wx,...e,initialValue:t}}(t));var i;const s=e=>(t,n)=>{o({type:e,payload:{value:t,event:n}})},a=e=>t=>{o({type:e,payload:{event:t}})},l=e=>t=>{o({type:e,payload:t})},u=s(_x),d=s(Nx),p=s(Sx),f=l(jx),h=l(Ex),m=l(kx),g=a(Ix),v=a(Tx),b=a(Rx),x=(0,c.useRef)(r),y=(0,c.useRef)({value:t.value,onChangeHandler:n});return(0,c.useLayoutEffect)((()=>{x.current=r,y.current={value:t.value,onChangeHandler:n}})),(0,c.useLayoutEffect)((()=>{var e;void 0===x.current._event||r.value===y.current.value||r.isDirty||y.current.onChangeHandler(null!==(e=r.value)&&void 0!==e?e:"",{event:x.current._event})}),[r.value,r.isDirty]),(0,c.useLayoutEffect)((()=>{var e;t.value===x.current.value||x.current.isDirty||o({type:Cx,payload:{value:null!==(e=t.value)&&void 0!==e?e:""}})}),[t.value]),{change:u,commit:p,dispatch:o,drag:h,dragEnd:m,dragStart:f,invalidate:(e,t)=>o({type:Px,payload:{error:e,event:t}}),pressDown:v,pressEnter:b,pressUp:g,reset:d,state:r}}function Ax(e){return t=>{const{isComposing:n}="nativeEvent"in t?t.nativeEvent:t;n||229===t.keyCode||e(t)}}const Dx=()=>{};const Ox=(0,c.forwardRef)((function({disabled:e=!1,dragDirection:t="n",dragThreshold:n=10,id:r,isDragEnabled:o=!1,isPressEnterToChange:i=!1,onBlur:s=Dx,onChange:a=Dx,onDrag:l=Dx,onDragEnd:u=Dx,onDragStart:d=Dx,onKeyDown:p=Dx,onValidate:f=Dx,size:h="default",stateReducer:m=(e=>e),value:g,type:v,...b},x){const{state:y,change:w,commit:_,drag:S,dragEnd:C,dragStart:k,invalidate:j,pressDown:E,pressEnter:P,pressUp:T,reset:R}=Mx(m,{isDragEnabled:o,value:g,isPressEnterToChange:i},a),{value:I,isDragging:N,isDirty:M}=y,A=(0,c.useRef)(!1),D=function(e,t){const n=function(e){let t="ns-resize";switch(e){case"n":case"s":t="ns-resize";break;case"e":case"w":t="ew-resize"}return t}(t);return(0,c.useEffect)((()=>{document.documentElement.style.cursor=e?n:null}),[e,n]),n}(N,t),O=e=>{const t=e.currentTarget.value;try{f(t),_(t,e)}catch(t){j(t,e)}},z=xx((e=>{const{distance:t,dragging:n,event:r,target:o}=e;if(e.event={...e.event,target:o},t){if(r.stopPropagation(),!n)return u(e),void C(e);l(e),S(e),N||(d(e),k(e))}}),{axis:"e"===t||"w"===t?"x":"y",threshold:n,enabled:o,pointer:{capture:!1}}),L=o?z():{};let F;return"number"===v&&(F=e=>{b.onMouseDown?.(e),e.currentTarget!==e.currentTarget.ownerDocument.activeElement&&e.currentTarget.focus()}),(0,wt.jsx)(fb,{...b,...L,className:"components-input-control__input",disabled:e,dragCursor:D,isDragging:N,id:r,onBlur:e=>{s(e),!M&&e.target.validity.valid||(A.current=!0,O(e))},onChange:e=>{const t=e.target.value;w(t,e)},onKeyDown:Ax((e=>{const{key:t}=e;switch(p(e),t){case"ArrowUp":T(e);break;case"ArrowDown":E(e);break;case"Enter":P(e),i&&(e.preventDefault(),O(e));break;case"Escape":i&&M&&(e.preventDefault(),R(g,e))}})),onMouseDown:F,ref:x,inputSize:h,value:null!=I?I:"",type:v})})),zx=Ox,Lx={"default.fontFamily":"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif","default.fontSize":"13px","helpText.fontSize":"12px",mobileTextMinFontSize:"16px"};function Fx(e){var t;return null!==(t=Lx[e])&&void 0!==t?t:""}const Bx={name:"kv6lnz",styles:"box-sizing:border-box;*,*::before,*::after{box-sizing:inherit;}"};const Vx=cl("div",{target:"ej5x27r4"})("font-family:",Fx("default.fontFamily"),";font-size:",Fx("default.fontSize"),";",Bx,";"),$x=({__nextHasNoMarginBottom:e=!1})=>!e&&bl("margin-bottom:",wl(2),";",""),Hx=cl("div",{target:"ej5x27r3"})($x," .components-panel__row &{margin-bottom:inherit;}"),Wx=bl(Zv,";display:block;margin-bottom:",wl(2),";padding:0;",""),Ux=cl("label",{target:"ej5x27r2"})(Wx,";");var Gx={name:"11yad0w",styles:"margin-bottom:revert"};const Kx=({__nextHasNoMarginBottom:e=!1})=>!e&&Gx,qx=cl("p",{target:"ej5x27r1"})("margin-top:",wl(2),";margin-bottom:0;font-size:",Fx("helpText.fontSize"),";font-style:normal;color:",jl.gray[700],";",Kx,";"),Yx=cl("span",{target:"ej5x27r0"})(Wx,";"),Xx=(0,c.forwardRef)(((e,t)=>{const{className:n,children:r,...o}=e;return(0,wt.jsx)(Yx,{ref:t,...o,className:s("components-base-control__label",n),children:r})})),Zx=Object.assign(Za((e=>{const{__nextHasNoMarginBottom:t=!1,__associatedWPComponentName:n="BaseControl",id:r,label:o,hideLabelFromVision:i=!1,help:s,className:a,children:l}=Ya(e,"BaseControl");return t||Fi()(`Bottom margin styles for wp.components.${n}`,{since:"6.7",version:"7.0",hint:"Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version."}),(0,wt.jsxs)(Vx,{className:a,children:[(0,wt.jsxs)(Hx,{className:"components-base-control__field",__nextHasNoMarginBottom:t,children:[o&&r&&(i?(0,wt.jsx)(pl,{as:"label",htmlFor:r,children:o}):(0,wt.jsx)(Ux,{className:"components-base-control__label",htmlFor:r,children:o})),o&&!r&&(i?(0,wt.jsx)(pl,{as:"label",children:o}):(0,wt.jsx)(Xx,{children:o})),l]}),!!s&&(0,wt.jsx)(qx,{id:r?r+"__help":void 0,className:"components-base-control__help",__nextHasNoMarginBottom:t,children:s})]})}),"BaseControl"),{VisualLabel:Xx}),Qx=Zx,Jx=()=>{};const ey=(0,c.forwardRef)((function(e,t){const{__next40pxDefaultSize:n,__unstableStateReducer:r=(e=>e),__unstableInputWidth:o,className:i,disabled:a=!1,help:u,hideLabelFromVision:d=!1,id:p,isPressEnterToChange:f=!1,label:h,labelPosition:m="top",onChange:g=Jx,onValidate:v=Jx,onKeyDown:b=Jx,prefix:x,size:y="default",style:w,suffix:_,value:S,...C}=_b(e),k=function(e){const t=(0,l.useInstanceId)(ey);return e||`inspector-input-control-${t}`}(p),j=s("components-input-control",i),E=function(e){const t=(0,c.useRef)(e.value),[n,r]=(0,c.useState)({}),o=void 0!==n.value?n.value:e.value;return(0,c.useLayoutEffect)((()=>{const{current:o}=t;t.current=e.value,void 0===n.value||n.isStale?n.isStale&&e.value!==o&&r({}):r({...n,isStale:!0})}),[e.value,n]),{value:o,onBlur:t=>{r({}),e.onBlur?.(t)},onChange:(t,n)=>{r((e=>Object.assign(e,{value:t,isStale:!1}))),e.onChange(t,n)}}}({value:S,onBlur:C.onBlur,onChange:g}),P=u?{"aria-describedby":`${k}__help`}:{};return(0,wt.jsx)(Qx,{className:j,help:u,id:k,__nextHasNoMarginBottom:!0,children:(0,wt.jsx)(kb,{__next40pxDefaultSize:n,__unstableInputWidth:o,disabled:a,gap:3,hideLabelFromVision:d,id:k,justify:"left",label:h,labelPosition:m,prefix:x,size:y,style:w,suffix:_,children:(0,wt.jsx)(zx,{...C,...P,__next40pxDefaultSize:n,className:"components-input-control__input",disabled:a,id:k,isPressEnterToChange:f,onKeyDown:b,onValidate:v,paddingInlineStart:x?wl(1):void 0,paddingInlineEnd:_?wl(1):void 0,ref:t,size:y,stateReducer:r,...E})})})})),ty=ey;const ny=function({icon:e,className:t,size:n=20,style:r={},...o}){const i=["dashicon","dashicons","dashicons-"+e,t].filter(Boolean).join(" "),s={...20!=n?{fontSize:`${n}px`,width:`${n}px`,height:`${n}px`}:{},...r};return(0,wt.jsx)("span",{className:i,style:s,...o})};const ry=function({icon:e=null,size:t=("string"==typeof e?20:24),...r}){if("string"==typeof e)return(0,wt.jsx)(ny,{icon:e,size:t,...r});if((0,c.isValidElement)(e)&&ny===e.type)return(0,c.cloneElement)(e,{...r});if("function"==typeof e)return(0,c.createElement)(e,{size:t,...r});if(e&&("svg"===e.type||e.type===n.SVG)){const o={...e.props,width:t,height:t,...r};return(0,wt.jsx)(n.SVG,{...o})}return(0,c.isValidElement)(e)?(0,c.cloneElement)(e,{size:t,...r}):e},oy=["onMouseDown","onClick"];const iy=(0,c.forwardRef)((function(e,t){const{__next40pxDefaultSize:n,accessibleWhenDisabled:r,isBusy:o,isDestructive:i,className:a,disabled:c,icon:u,iconPosition:d="left",iconSize:p,showTooltip:f,tooltipPosition:h,shortcut:m,label:g,children:v,size:b="default",text:x,variant:y,description:w,..._}=function({__experimentalIsFocusable:e,isDefault:t,isPrimary:n,isSecondary:r,isTertiary:o,isLink:i,isPressed:s,isSmall:a,size:l,variant:c,describedBy:u,...d}){let p=l,f=c;const h={accessibleWhenDisabled:e,"aria-pressed":s,description:u};var m,g,v,b,x,y;return a&&(null!==(m=p)&&void 0!==m||(p="small")),n&&(null!==(g=f)&&void 0!==g||(f="primary")),o&&(null!==(v=f)&&void 0!==v||(f="tertiary")),r&&(null!==(b=f)&&void 0!==b||(f="secondary")),t&&(Fi()("wp.components.Button `isDefault` prop",{since:"5.4",alternative:'variant="secondary"'}),null!==(x=f)&&void 0!==x||(f="secondary")),i&&(null!==(y=f)&&void 0!==y||(f="link")),{...h,...d,size:p,variant:f}}(e),{href:S,target:C,"aria-checked":k,"aria-pressed":j,"aria-selected":E,...P}="href"in _?_:{href:void 0,target:void 0,..._},T=(0,l.useInstanceId)(iy,"components-button__description"),R="string"==typeof v&&!!v||Array.isArray(v)&&v?.[0]&&null!==v[0]&&"components-tooltip"!==v?.[0]?.props?.className,I=s("components-button",a,{"is-next-40px-default-size":n,"is-secondary":"secondary"===y,"is-primary":"primary"===y,"is-small":"small"===b,"is-compact":"compact"===b,"is-tertiary":"tertiary"===y,"is-pressed":[!0,"true","mixed"].includes(j),"is-pressed-mixed":"mixed"===j,"is-busy":o,"is-link":"link"===y,"is-destructive":i,"has-text":!!u&&(R||x),"has-icon":!!u}),N=c&&!r,M=void 0===S||c?"button":"a",A="button"===M?{type:"button",disabled:N,"aria-checked":k,"aria-pressed":j,"aria-selected":E}:{},D="a"===M?{href:S,target:C}:{},O={};if(c&&r){A["aria-disabled"]=!0,D["aria-disabled"]=!0;for(const e of oy)O[e]=e=>{e&&(e.stopPropagation(),e.preventDefault())}}const z=!N&&(f&&!!g||!!m||!!g&&!v?.length&&!1!==f),L=w?T:void 0,F=P["aria-describedby"]||L,B={className:I,"aria-label":P["aria-label"]||g,"aria-describedby":F,ref:t},V=(0,wt.jsxs)(wt.Fragment,{children:[u&&"left"===d&&(0,wt.jsx)(ry,{icon:u,size:p}),x&&(0,wt.jsx)(wt.Fragment,{children:x}),v,u&&"right"===d&&(0,wt.jsx)(ry,{icon:u,size:p})]}),$="a"===M?(0,wt.jsx)("a",{...D,...P,...O,...B,children:V}):(0,wt.jsx)("button",{...A,...P,...O,...B,children:V}),H=z?{text:v?.length&&w?w:g,shortcut:m,placement:h&&$i(h)}:{};return(0,wt.jsxs)(wt.Fragment,{children:[(0,wt.jsx)(Yi,{...H,children:$}),w&&(0,wt.jsx)(pl,{children:(0,wt.jsx)("span",{id:L,children:w})})]})})),sy=iy;var ay={name:"euqsgg",styles:"input[type='number']::-webkit-outer-spin-button,input[type='number']::-webkit-inner-spin-button{-webkit-appearance:none!important;margin:0!important;}input[type='number']{-moz-appearance:textfield;}"};const ly=({hideHTMLArrows:e})=>e?ay:"",cy=cl(ty,{target:"ep09it41"})(ly,";"),uy=cl(sy,{target:"ep09it40"})("&&&&&{color:",jl.theme.accent,";}"),dy={smallSpinButtons:bl("width:",wl(5),";min-width:",wl(5),";height:",wl(5),";","")};function py(e){const t=Number(e);return isNaN(t)?0:t}function fy(...e){return e.reduce(((e,t)=>e+py(t)),0)}function hy(e,t,n){const r=py(e);return Math.max(t,Math.min(r,n))}function my(e=0,t=1/0,n=1/0,r=1){const o=py(e),i=py(r),s=function(e){const t=(e+"").split(".");return void 0!==t[1]?t[1].length:0}(r),a=hy(Math.round(o/i)*i,t,n);return s?py(a.toFixed(s)):a}const gy={bottom:{align:"flex-end",justify:"center"},bottomLeft:{align:"flex-end",justify:"flex-start"},bottomRight:{align:"flex-end",justify:"flex-end"},center:{align:"center",justify:"center"},edge:{align:"center",justify:"space-between"},left:{align:"center",justify:"flex-start"},right:{align:"center",justify:"flex-end"},stretch:{align:"stretch"},top:{align:"flex-start",justify:"center"},topLeft:{align:"flex-start",justify:"flex-start"},topRight:{align:"flex-start",justify:"flex-end"}},vy={bottom:{justify:"flex-end",align:"center"},bottomLeft:{justify:"flex-end",align:"flex-start"},bottomRight:{justify:"flex-end",align:"flex-end"},center:{justify:"center",align:"center"},edge:{justify:"space-between",align:"center"},left:{justify:"center",align:"flex-start"},right:{justify:"center",align:"flex-end"},stretch:{align:"stretch"},top:{justify:"flex-start",align:"center"},topLeft:{justify:"flex-start",align:"flex-start"},topRight:{justify:"flex-start",align:"flex-end"}};function by(e){return"string"==typeof e?[e]:c.Children.toArray(e).filter((e=>(0,c.isValidElement)(e)))}function xy(e){const{alignment:t="edge",children:n,direction:r,spacing:o=2,...i}=Ya(e,"HStack"),s=function(e,t="row"){if(!qg(e))return{};const n="column"===t?vy:gy;return e in n?n[e]:{align:e}}(t,r),a=by(n).map(((e,t)=>{if(el(e,["Spacer"])){const n=e,r=n.key||`hstack-${t}`;return(0,wt.jsx)(Gg,{isBlock:!0,...n.props},r)}return e})),l={children:a,direction:r,justify:"center",...s,...i,gap:o},{isColumn:c,...u}=Pg(l);return u}const yy=Xa((function(e,t){const n=xy(e);return(0,wt.jsx)(dl,{...n,ref:t})}),"HStack"),wy=()=>{};const _y=(0,c.forwardRef)((function(e,t){const{__unstableStateReducer:n,className:r,dragDirection:o="n",hideHTMLArrows:i=!1,spinControls:u=(i?"none":"native"),isDragEnabled:d=!0,isShiftStepEnabled:p=!0,label:f,max:h=1/0,min:m=-1/0,required:g=!1,shiftStep:v=10,step:b=1,spinFactor:x=1,type:y="number",value:w,size:_="default",suffix:S,onChange:C=wy,...k}=_b(e);i&&Fi()("wp.components.NumberControl hideHTMLArrows prop ",{alternative:'spinControls="none"',since:"6.2",version:"6.3"});const j=(0,c.useRef)(),E=(0,l.useMergeRefs)([j,t]),P="any"===b,T=P?1:Yg(b),R=Yg(x)*T,I=my(0,m,h,T),N=(e,t)=>P?""+Math.min(h,Math.max(m,Yg(e))):""+my(e,m,h,null!=t?t:T),M="number"===y?"off":void 0,A=s("components-number-control",r),D=qa()("small"===_&&dy.smallSpinButtons),O=(e,t,n)=>{n?.preventDefault();const r=n?.shiftKey&&p,o=r?Yg(v)*R:R;let i=function(e){const t=""===e;return!qg(e)||t}(e)?I:e;return"up"===t?i=fy(i,o):"down"===t&&(i=function(...e){return e.reduce(((e,t,n)=>{const r=py(t);return 0===n?r:e-r}),0)}(i,o)),N(i,r?o:void 0)},z=e=>t=>C(String(O(w,e,t)),{event:{...t,target:j.current}});return(0,wt.jsx)(cy,{autoComplete:M,inputMode:"numeric",...k,className:A,dragDirection:o,hideHTMLArrows:"native"!==u,isDragEnabled:d,label:f,max:h,min:m,ref:E,required:g,step:b,type:y,value:w,__unstableStateReducer:(e,t)=>{var r;const i=((e,t)=>{const n={...e},{type:r,payload:i}=t,s=i.event,l=n.value;if(r!==Ix&&r!==Tx||(n.value=O(l,r===Ix?"up":"down",s)),r===Ex&&d){const[e,t]=i.delta,r=i.shiftKey&&p,s=r?Yg(v)*R:R;let c,u;switch(o){case"n":u=t,c=-1;break;case"e":u=e,c=(0,a.isRTL)()?-1:1;break;case"s":u=t,c=1;break;case"w":u=e,c=(0,a.isRTL)()?1:-1}if(0!==u){u=Math.ceil(Math.abs(u))*Math.sign(u);const e=u*s*c;n.value=N(fy(l,e),r?s:void 0)}}if(r===Rx||r===Sx){const e=!1===g&&""===l;n.value=e?l:N(l)}return n})(e,t);return null!==(r=n?.(i,t))&&void 0!==r?r:i},size:_,suffix:"custom"===u?(0,wt.jsxs)(wt.Fragment,{children:[S,(0,wt.jsx)(Hg,{marginBottom:0,marginRight:2,children:(0,wt.jsxs)(yy,{spacing:1,children:[(0,wt.jsx)(uy,{className:D,icon:Wg,size:"small",label:(0,a.__)("Increment"),onClick:z("up")}),(0,wt.jsx)(uy,{className:D,icon:Ug,size:"small",label:(0,a.__)("Decrement"),onClick:z("down")})]})})]}):S,onChange:C})})),Sy=_y;const Cy=cl("div",{target:"eln3bjz3"})("border-radius:",Tl.radiusRound,";border:",Tl.borderWidth," solid ",jl.ui.border,";box-sizing:border-box;cursor:grab;height:",32,"px;overflow:hidden;width:",32,"px;:active{cursor:grabbing;}"),ky=cl("div",{target:"eln3bjz2"})({name:"1r307gh",styles:"box-sizing:border-box;position:relative;width:100%;height:100%;:focus-visible{outline:none;}"}),jy=cl("div",{target:"eln3bjz1"})("background:",jl.theme.accent,";border-radius:",Tl.radiusRound,";box-sizing:border-box;display:block;left:50%;top:4px;transform:translateX( -50% );position:absolute;width:",6,"px;height:",6,"px;"),Ey=cl(Xv,{target:"eln3bjz0"})("color:",jl.theme.accent,";margin-right:",wl(3),";");const Py=function({value:e,onChange:t,...n}){const r=(0,c.useRef)(null),o=(0,c.useRef)(),i=(0,c.useRef)(),s=e=>{if(void 0!==e&&(e.preventDefault(),e.target?.focus(),void 0!==o.current&&void 0!==t)){const{x:n,y:r}=o.current;t(function(e,t,n,r){const o=r-t,i=n-e,s=Math.atan2(o,i),a=Math.round(s*(180/Math.PI))+90;if(a<0)return 360+a;return a}(n,r,e.clientX,e.clientY))}},{startDrag:a,isDragging:u}=(0,l.__experimentalUseDragging)({onDragStart:e=>{(()=>{if(null===r.current)return;const e=r.current.getBoundingClientRect();o.current={x:e.x+e.width/2,y:e.y+e.height/2}})(),s(e)},onDragMove:s,onDragEnd:s});return(0,c.useEffect)((()=>{u?(void 0===i.current&&(i.current=document.body.style.cursor),document.body.style.cursor="grabbing"):(document.body.style.cursor=i.current||"",i.current=void 0)}),[u]),(0,wt.jsx)(Cy,{ref:r,onMouseDown:a,className:"components-angle-picker-control__angle-circle",...n,children:(0,wt.jsx)(ky,{style:e?{transform:`rotate(${e}deg)`}:void 0,className:"components-angle-picker-control__angle-circle-indicator-wrapper",tabIndex:-1,children:(0,wt.jsx)(jy,{className:"components-angle-picker-control__angle-circle-indicator"})})})};const Ty=(0,c.forwardRef)((function(e,t){const{className:n,label:r=(0,a.__)("Angle"),onChange:o,value:i,...l}=e,c=s("components-angle-picker-control",n),u=(0,wt.jsx)(Ey,{children:"°"}),[d,p]=(0,a.isRTL)()?[u,null]:[null,u];return(0,wt.jsxs)(Ig,{...l,ref:t,className:c,gap:2,children:[(0,wt.jsx)(Mg,{children:(0,wt.jsx)(Sy,{label:r,className:"components-angle-picker-control__input-field",max:360,min:0,onChange:e=>{if(void 0===o)return;const t=void 0!==e&&""!==e?parseInt(e,10):0;o(t)},size:"__unstable-large",step:"1",value:i,spinControls:"none",prefix:d,suffix:p})}),(0,wt.jsx)(Hg,{marginBottom:"1",marginTop:"auto",children:(0,wt.jsx)(Py,{"aria-hidden":"true",value:i,onChange:o})})]})}));var Ry=o(9681),Iy=o.n(Ry);const Ny=window.wp.richText,My=window.wp.a11y,Ay=window.wp.keycodes,Dy=new RegExp(/[\u007e\u00ad\u2053\u207b\u208b\u2212\p{Pd}]/gu),Oy=e=>Iy()(e).toLocaleLowerCase().replace(Dy,"-");function zy(e){var t;let n=null!==(t=e?.toString?.())&&void 0!==t?t:"";return n=n.replace(/['\u2019]/,""),ms(n,{splitRegexp:[/(?!(?:1ST|2ND|3RD|[4-9]TH)(?![a-z]))([a-z0-9])([A-Z])/g,/(?!(?:1st|2nd|3rd|[4-9]th)(?![a-z]))([0-9])([a-z])/g,/([A-Za-z])([0-9])/g,/([A-Z])([A-Z][a-z])/g]})}function Ly(e){return e.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&")}function Fy(e){return t=>{const[n,r]=(0,c.useState)([]);return(0,c.useLayoutEffect)((()=>{const{options:n,isDebounced:o}=e,i=(0,l.debounce)((()=>{const o=Promise.resolve("function"==typeof n?n(t):n).then((n=>{if(o.canceled)return;const i=n.map(((t,n)=>({key:`${e.name}-${n}`,value:t,label:e.getOptionLabel(t),keywords:e.getOptionKeywords?e.getOptionKeywords(t):[],isDisabled:!!e.isOptionDisabled&&e.isOptionDisabled(t)}))),s=new RegExp("(?:\\b|\\s|^)"+Ly(t),"i");r(function(e,t=[],n=10){const r=[];for(let o=0;o<t.length;o++){const i=t[o];let{keywords:s=[]}=i;if("string"==typeof i.label&&(s=[...s,i.label]),s.some((t=>e.test(Iy()(t))))&&(r.push(i),r.length===n))break}return r}(s,i))}));return o}),o?250:0),s=i();return()=>{i.cancel(),s&&(s.canceled=!0)}}),[t]),[n]}}const By=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?yi({element:n.current,padding:r}).fn(t):{}:n?yi({element:n,padding:r}).fn(t):{};var o}});var Vy="undefined"!=typeof document?B.useLayoutEffect:B.useEffect;function $y(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!$y(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!$y(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Hy(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Wy(e,t){const n=Hy(e);return Math.round(t*n)/n}function Uy(e){const t=B.useRef(e);return Vy((()=>{t.current=e})),t}const Gy=(0,wt.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wt.jsx)(n.Path,{d:"m13.06 12 6.47-6.47-1.06-1.06L12 10.94 5.53 4.47 4.47 5.53 10.94 12l-6.47 6.47 1.06 1.06L12 13.06l6.47 6.47 1.06-1.06L13.06 12Z"})});let Ky=0;function qy(e){const t=document.scrollingElement||document.body;e&&(Ky=t.scrollTop);const n=e?"add":"remove";t.classList[n]("lockscroll"),document.documentElement.classList[n]("lockscroll"),e||(t.scrollTop=Ky)}let Yy=0;const Xy=function(){return(0,c.useEffect)((()=>(0===Yy&&qy(!0),++Yy,()=>{1===Yy&&qy(!1),--Yy})),[]),null},Zy={slots:(0,l.observableMap)(),fills:(0,l.observableMap)(),registerSlot:()=>{},updateSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{},isDefault:!0},Qy=(0,c.createContext)(Zy);function Jy(e){const t=(0,c.useContext)(Qy);return{...(0,l.useObservableValue)(t.slots,e),...(0,c.useMemo)((()=>({updateSlot:n=>t.updateSlot(e,n),unregisterSlot:n=>t.unregisterSlot(e,n),registerFill:n=>t.registerFill(e,n),unregisterFill:n=>t.unregisterFill(e,n)})),[e,t])}}const ew={registerSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{},getSlot:()=>{},getFills:()=>[],subscribe:()=>()=>{}},tw=(0,c.createContext)(ew),nw=e=>{const{getSlot:t,subscribe:n}=(0,c.useContext)(tw);return(0,c.useSyncExternalStore)(n,(()=>t(e)),(()=>t(e)))};function rw({name:e,children:t}){const{registerFill:n,unregisterFill:r}=(0,c.useContext)(tw),o=nw(e),i=(0,c.useRef)({name:e,children:t});return(0,c.useLayoutEffect)((()=>{const t=i.current;return n(e,t),()=>r(e,t)}),[]),(0,c.useLayoutEffect)((()=>{i.current.children=t,o&&o.forceUpdate()}),[t]),(0,c.useLayoutEffect)((()=>{e!==i.current.name&&(r(i.current.name,i.current),i.current.name=e,n(e,i.current))}),[e]),null}function ow(e){return"function"==typeof e}class iw extends c.Component{constructor(e){super(e),this.isUnmounted=!1}componentDidMount(){const{registerSlot:e}=this.props;this.isUnmounted=!1,e(this.props.name,this)}componentWillUnmount(){const{unregisterSlot:e}=this.props;this.isUnmounted=!0,e(this.props.name,this)}componentDidUpdate(e){const{name:t,unregisterSlot:n,registerSlot:r}=this.props;e.name!==t&&(n(e.name,this),r(t,this))}forceUpdate(){this.isUnmounted||super.forceUpdate()}render(){var e;const{children:t,name:n,fillProps:r={},getFills:o}=this.props,i=(null!==(e=o(n,this))&&void 0!==e?e:[]).map((e=>{const t=ow(e.children)?e.children(r):e.children;return c.Children.map(t,((e,t)=>{if(!e||"string"==typeof e)return e;let n=t;return"object"==typeof e&&"key"in e&&e?.key&&(n=e.key),(0,c.cloneElement)(e,{key:n})}))})).filter((e=>!(0,c.isEmptyElement)(e)));return(0,wt.jsx)(wt.Fragment,{children:ow(t)?t(i):i})}}const sw=e=>(0,wt.jsx)(tw.Consumer,{children:({registerSlot:t,unregisterSlot:n,getFills:r})=>(0,wt.jsx)(iw,{...e,registerSlot:t,unregisterSlot:n,getFills:r})}),aw={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let lw;const cw=new Uint8Array(16);function uw(){if(!lw&&(lw="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!lw))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return lw(cw)}const dw=[];for(let e=0;e<256;++e)dw.push((e+256).toString(16).slice(1));function pw(e,t=0){return dw[e[t+0]]+dw[e[t+1]]+dw[e[t+2]]+dw[e[t+3]]+"-"+dw[e[t+4]]+dw[e[t+5]]+"-"+dw[e[t+6]]+dw[e[t+7]]+"-"+dw[e[t+8]]+dw[e[t+9]]+"-"+dw[e[t+10]]+dw[e[t+11]]+dw[e[t+12]]+dw[e[t+13]]+dw[e[t+14]]+dw[e[t+15]]}const fw=function(e,t,n){if(aw.randomUUID&&!t&&!e)return aw.randomUUID();const r=(e=e||{}).random||(e.rng||uw)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return pw(r)},hw=new Set,mw=new WeakMap;function gw(e){const{children:t,document:n}=e;if(!n)return null;const r=(e=>{if(mw.has(e))return mw.get(e);let t=fw().replace(/[0-9]/g,"");for(;hw.has(t);)t=fw().replace(/[0-9]/g,"");hw.add(t);const n=xa({container:e,key:t});return mw.set(e,n),n})(n.head);return(0,wt.jsx)(Oa,{value:r,children:t})}const vw=gw;function bw(e){var t;const{name:n,children:r}=e,{registerFill:o,unregisterFill:i,...s}=Jy(n),a=function(){const[,e]=(0,c.useState)({}),t=(0,c.useRef)(!0);return(0,c.useEffect)((()=>(t.current=!0,()=>{t.current=!1})),[]),()=>{t.current&&e({})}}(),l=(0,c.useRef)({rerender:a});if((0,c.useEffect)((()=>(o(l),()=>{i(l)})),[o,i]),!s.ref||!s.ref.current)return null;const u=(0,wt.jsx)(vw,{document:s.ref.current.ownerDocument,children:"function"==typeof r?r(null!==(t=s.fillProps)&&void 0!==t?t:{}):r});return(0,c.createPortal)(u,s.ref.current)}const xw=(0,c.forwardRef)((function(e,t){const{name:n,fillProps:r={},as:o,children:i,...s}=e,{registerSlot:a,unregisterSlot:u,...d}=(0,c.useContext)(Qy),p=(0,c.useRef)(null);return(0,c.useLayoutEffect)((()=>(a(n,p,r),()=>{u(n,p)})),[a,u,n]),(0,c.useLayoutEffect)((()=>{d.updateSlot(n,r)})),(0,wt.jsx)(dl,{as:o,ref:(0,l.useMergeRefs)([t,p]),...s})})),yw=window.wp.isShallowEqual;var ww=o.n(yw);function _w(){const e=(0,l.observableMap)(),t=(0,l.observableMap)();return{slots:e,fills:t,registerSlot:(t,n,r)=>{const o=e.get(t);e.set(t,{...o,ref:n||o?.ref,fillProps:r||o?.fillProps||{}})},updateSlot:(n,r)=>{const o=e.get(n);if(!o)return;if(ww()(o.fillProps,r))return;o.fillProps=r;const i=t.get(n);i&&i.forEach((e=>e.current.rerender()))},unregisterSlot:(t,n)=>{e.get(t)?.ref===n&&e.delete(t)},registerFill:(e,n)=>{t.set(e,[...t.get(e)||[],n])},unregisterFill:(e,n)=>{const r=t.get(e);r&&t.set(e,r.filter((e=>e!==n)))}}}function Sw({children:e}){const[t]=(0,c.useState)(_w);return(0,wt.jsx)(Qy.Provider,{value:t,children:e})}function Cw(){const e={},t={};let n=[];function r(t){return e[t]}function o(e){const t=r(e);t&&t.forceUpdate()}function i(){n.forEach((e=>e()))}return{registerSlot:function(t,n){const r=e[t];e[t]=n,i(),o(t),r&&r.forceUpdate()},unregisterSlot:function(t,n){e[t]===n&&(delete e[t],i())},registerFill:function(e,n){t[e]=[...t[e]||[],n],o(e)},unregisterFill:function(e,n){var r;t[e]=null!==(r=t[e]?.filter((e=>e!==n)))&&void 0!==r?r:[],o(e)},getSlot:r,getFills:function(n,r){return e[n]!==r?[]:t[n]},subscribe:function(e){return n.push(e),()=>{n=n.filter((t=>t!==e))}}}}const kw=function({children:e}){const[t]=(0,c.useState)(Cw);return(0,wt.jsx)(tw.Provider,{value:t,children:e})};function jw(e){return(0,wt.jsxs)(wt.Fragment,{children:[(0,wt.jsx)(rw,{...e}),(0,wt.jsx)(bw,{...e})]})}const Ew=(0,c.forwardRef)((function(e,t){const{bubblesVirtually:n,...r}=e;return n?(0,wt.jsx)(xw,{...r,ref:t}):(0,wt.jsx)(sw,{...r})}));function Pw({children:e,passthrough:t=!1}){return!(0,c.useContext)(Qy).isDefault&&t?(0,wt.jsx)(wt.Fragment,{children:e}):(0,wt.jsx)(kw,{children:(0,wt.jsx)(Sw,{children:e})})}function Tw(e){const t="symbol"==typeof e?e.description:e,n=t=>(0,wt.jsx)(jw,{name:e,...t});n.displayName=`${t}Fill`;const r=t=>(0,wt.jsx)(Ew,{name:e,...t});return r.displayName=`${t}Slot`,r.__unstableName=e,{Fill:n,Slot:r}}Pw.displayName="SlotFillProvider";const Rw="Popover",Iw=()=>(0,wt.jsxs)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",className:"components-popover__triangle",role:"presentation",children:[(0,wt.jsx)(n.Path,{className:"components-popover__triangle-bg",d:"M 0 0 L 50 50 L 100 0"}),(0,wt.jsx)(n.Path,{className:"components-popover__triangle-border",d:"M 0 0 L 50 50 L 100 0",vectorEffect:"non-scaling-stroke"})]}),Nw=(0,c.createContext)(void 0),Mw="components-popover__fallback-container",Aw=Xa(((e,t)=>{const{animate:n=!0,headerTitle:r,constrainTabbing:o,onClose:i,children:a,className:u,noArrow:d=!0,position:p,placement:f="bottom-start",offset:h=0,focusOnMount:m="firstElement",anchor:g,expandOnMobile:v,onFocusOutside:b,__unstableSlotName:x=Rw,flip:y=!0,resize:w=!0,shift:_=!1,inline:S=!1,variant:C,style:k,__unstableForcePosition:j,anchorRef:E,anchorRect:P,getAnchorRect:T,isAlternate:R,...I}=Ya(e,"Popover");let N=y,M=w;void 0!==j&&(Fi()("`__unstableForcePosition` prop in wp.components.Popover",{since:"6.1",version:"6.3",alternative:"`flip={ false }` and `resize={ false }`"}),N=!j,M=!j),void 0!==E&&Fi()("`anchorRef` prop in wp.components.Popover",{since:"6.1",alternative:"`anchor` prop"}),void 0!==P&&Fi()("`anchorRect` prop in wp.components.Popover",{since:"6.1",alternative:"`anchor` prop"}),void 0!==T&&Fi()("`getAnchorRect` prop in wp.components.Popover",{since:"6.1",alternative:"`anchor` prop"});const A=R?"toolbar":C;void 0!==R&&Fi()("`isAlternate` prop in wp.components.Popover",{since:"6.2",alternative:"`variant` prop with the `'toolbar'` value"});const D=(0,c.useRef)(null),[O,z]=(0,c.useState)(null),L=(0,c.useCallback)((e=>{z(e)}),[]),F=(0,l.useViewportMatch)("medium","<"),V=v&&F,$=!V&&!d,H=p?$i(p):f,W=[..."overlay"===f?[{name:"overlay",fn:({rects:e})=>e.reference},xi({apply({rects:e,elements:t}){var n;const{firstElementChild:r}=null!==(n=t.floating)&&void 0!==n?n:{};r instanceof HTMLElement&&Object.assign(r.style,{width:`${e.reference.width}px`,height:`${e.reference.height}px`})}})]:[],Ro(h),N&&bi(),M&&xi({apply(e){var t;const{firstElementChild:n}=null!==(t=Q.floating.current)&&void 0!==t?t:{};n instanceof HTMLElement&&Object.assign(n.style,{maxHeight:`${e.availableHeight}px`,overflow:"auto"})}}),_&&vi({crossAxis:!0,limiter:wi(),padding:1}),By({element:D})],U=(0,c.useContext)(Nw)||x,G=Jy(U);let K;(i||b)&&(K=(e,t)=>{"focus-outside"===e&&b?b(t):i&&i()});const[q,Y]=(0,l.__experimentalUseDialog)({constrainTabbing:o,focusOnMount:m,__unstableOnClose:K,onClose:K}),{x:X,y:Z,refs:Q,strategy:J,update:ee,placement:te,middlewareData:{arrow:ne}}=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,d]=B.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=B.useState(r);$y(p,r)||f(r);const[h,m]=B.useState(null),[g,v]=B.useState(null),b=B.useCallback((e=>{e!==_.current&&(_.current=e,m(e))}),[]),x=B.useCallback((e=>{e!==S.current&&(S.current=e,v(e))}),[]),y=i||h,w=s||g,_=B.useRef(null),S=B.useRef(null),C=B.useRef(u),k=null!=l,j=Uy(l),E=Uy(o),P=B.useCallback((()=>{if(!_.current||!S.current)return;const e={placement:t,strategy:n,middleware:p};E.current&&(e.platform=E.current),_i(_.current,S.current,e).then((e=>{const t={...e,isPositioned:!0};T.current&&!$y(C.current,t)&&(C.current=t,Or.flushSync((()=>{d(t)})))}))}),[p,t,n,E]);Vy((()=>{!1===c&&C.current.isPositioned&&(C.current.isPositioned=!1,d((e=>({...e,isPositioned:!1}))))}),[c]);const T=B.useRef(!1);Vy((()=>(T.current=!0,()=>{T.current=!1})),[]),Vy((()=>{if(y&&(_.current=y),w&&(S.current=w),y&&w){if(j.current)return j.current(y,w,P);P()}}),[y,w,P,j,k]);const R=B.useMemo((()=>({reference:_,floating:S,setReference:b,setFloating:x})),[b,x]),I=B.useMemo((()=>({reference:y,floating:w})),[y,w]),N=B.useMemo((()=>{const e={position:n,left:0,top:0};if(!I.floating)return e;const t=Wy(I.floating,u.x),r=Wy(I.floating,u.y);return a?{...e,transform:"translate("+t+"px, "+r+"px)",...Hy(I.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,a,I.floating,u.x,u.y]);return B.useMemo((()=>({...u,update:P,refs:R,elements:I,floatingStyles:N})),[u,P,R,I,N])}({placement:"overlay"===H?void 0:H,middleware:W,whileElementsMounted:(e,t,n)=>gi(e,t,n,{layoutShift:!1,animationFrame:!0})}),re=(0,c.useCallback)((e=>{D.current=e,ee()}),[ee]),oe=E?.top,ie=E?.bottom,se=E?.startContainer,ae=E?.current;(0,c.useLayoutEffect)((()=>{const e=(({anchor:e,anchorRef:t,anchorRect:n,getAnchorRect:r,fallbackReferenceElement:o})=>{var i;let s=null;return e?s=e:function(e){return!!e?.top}(t)?s={getBoundingClientRect(){const e=t.top.getBoundingClientRect(),n=t.bottom.getBoundingClientRect();return new window.DOMRect(e.x,e.y,e.width,n.bottom-e.top)}}:function(e){return!!e?.current}(t)?s=t.current:t?s=t:n?s={getBoundingClientRect:()=>n}:r?s={getBoundingClientRect(){var e,t,n,i;const s=r(o);return new window.DOMRect(null!==(e=s.x)&&void 0!==e?e:s.left,null!==(t=s.y)&&void 0!==t?t:s.top,null!==(n=s.width)&&void 0!==n?n:s.right-s.left,null!==(i=s.height)&&void 0!==i?i:s.bottom-s.top)}}:o&&(s=o.parentElement),null!==(i=s)&&void 0!==i?i:null})({anchor:g,anchorRef:E,anchorRect:P,getAnchorRect:T,fallbackReferenceElement:O});Q.setReference(e)}),[g,E,oe,ie,se,ae,P,T,O,Q]);const le=(0,l.useMergeRefs)([Q.setFloating,q,t]),ce=V?void 0:{position:J,top:0,left:0,x:Wi(X),y:Wi(Z)},ue=(0,l.useReducedMotion)(),de=n&&!V&&!ue,[pe,fe]=(0,c.useState)(!1),{style:he,...me}=(0,c.useMemo)((()=>(e=>{const t=e.startsWith("top")||e.startsWith("bottom")?"translateY":"translateX",n=e.startsWith("top")||e.startsWith("left")?1:-1;return{style:Hi[e],initial:{opacity:0,scale:0,[t]:2*n+"em"},animate:{opacity:1,scale:1,[t]:0},transition:{duration:.1,ease:[0,0,.2,1]}}})(te)),[te]),ge=de?{style:{...k,...he,...ce},onAnimationComplete:()=>fe(!0),...me}:{animate:!1,style:{...k,...ce}},ve=(!de||pe)&&null!==X&&null!==Z;let be=(0,wt.jsxs)(dg.div,{className:s(u,{"is-expanded":V,"is-positioned":ve,[`is-${"toolbar"===A?"alternate":A}`]:A}),...ge,...I,ref:le,...Y,tabIndex:-1,children:[V&&(0,wt.jsx)(Xy,{}),V&&(0,wt.jsxs)("div",{className:"components-popover__header",children:[(0,wt.jsx)("span",{className:"components-popover__header-title",children:r}),(0,wt.jsx)(sy,{className:"components-popover__close",icon:Gy,onClick:i})]}),(0,wt.jsx)("div",{className:"components-popover__content",children:a}),$&&(0,wt.jsx)("div",{ref:re,className:["components-popover__arrow",`is-${te.split("-")[0]}`].join(" "),style:{left:void 0!==ne?.x&&Number.isFinite(ne.x)?`${ne.x}px`:"",top:void 0!==ne?.y&&Number.isFinite(ne.y)?`${ne.y}px`:""},children:(0,wt.jsx)(Iw,{})})]});const xe=G.ref&&!S,ye=E||P||g;return xe?be=(0,wt.jsx)(jw,{name:U,children:be}):S||(be=(0,c.createPortal)((0,wt.jsx)(gw,{document,children:be}),(()=>{let e=document.body.querySelector("."+Mw);return e||(e=document.createElement("div"),e.className=Mw,document.body.append(e)),e})())),ye?be:(0,wt.jsxs)(wt.Fragment,{children:[(0,wt.jsx)("span",{ref:L}),be]})}),"Popover");Aw.Slot=(0,c.forwardRef)((function({name:e=Rw},t){return(0,wt.jsx)(Ew,{bubblesVirtually:!0,name:e,className:"popover-slot",ref:t})})),Aw.__unstableSlotNameProvider=Nw.Provider;const Dw=Aw;function Ow({items:e,onSelect:t,selectedIndex:n,instanceId:r,listBoxId:o,className:i,Component:a="div"}){return(0,wt.jsx)(a,{id:o,role:"listbox",className:"components-autocomplete__results",children:e.map(((e,o)=>(0,wt.jsx)(sy,{id:`components-autocomplete-item-${r}-${e.key}`,role:"option","aria-selected":o===n,accessibleWhenDisabled:!0,disabled:e.isDisabled,className:s("components-autocomplete__result",i,{"is-selected":o===n}),variant:o===n?"primary":void 0,onClick:()=>t(e),children:e.label},e.key)))})}function zw(e){var t;const n=null!==(t=e.useItems)&&void 0!==t?t:Fy(e);return function({filterValue:e,instanceId:t,listBoxId:r,className:o,selectedIndex:i,onChangeOptions:s,onSelect:u,onReset:d,reset:p,contentRef:f}){const[h]=n(e),m=(0,Ny.useAnchor)({editableContentElement:f.current}),[g,v]=(0,c.useState)(!1),b=(0,c.useRef)(null),x=(0,l.useMergeRefs)([b,(0,l.useRefEffect)((e=>{f.current&&v(e.ownerDocument!==f.current.ownerDocument)}),[f])]);var y,w;y=b,w=p,(0,c.useEffect)((()=>{const e=e=>{y.current&&!y.current.contains(e.target)&&w(e)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e)}}),[w]);const _=(0,l.useDebounce)(My.speak,500);return(0,c.useLayoutEffect)((()=>{s(h),function(t){_&&(t.length?_(e?(0,a.sprintf)((0,a._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",t.length),t.length):(0,a.sprintf)((0,a._n)("Initial %d result loaded. Type to filter all available results. Use up and down arrow keys to navigate.","Initial %d results loaded. Type to filter all available results. Use up and down arrow keys to navigate.",t.length),t.length),"assertive"):_((0,a.__)("No results."),"assertive"))}(h)}),[h]),0===h.length?null:(0,wt.jsxs)(wt.Fragment,{children:[(0,wt.jsx)(Dw,{focusOnMount:!1,onClose:d,placement:"top-start",className:"components-autocomplete__popover",anchor:m,ref:x,children:(0,wt.jsx)(Ow,{items:h,onSelect:u,selectedIndex:i,instanceId:t,listBoxId:r,className:o})}),f.current&&g&&(0,Or.createPortal)((0,wt.jsx)(Ow,{items:h,onSelect:u,selectedIndex:i,instanceId:t,listBoxId:r,className:o,Component:pl}),f.current.ownerDocument.body)]})}}const Lw=e=>{if(null===e)return"";switch(typeof e){case"string":case"number":return e.toString();case"boolean":default:return"";case"object":if(e instanceof Array)return e.map(Lw).join("");if("props"in e)return Lw(e.props.children)}return""},Fw=[];function Bw({record:e,onChange:t,onReplace:n,completers:r,contentRef:o}){const i=(0,l.useInstanceId)(Bw),[s,a]=(0,c.useState)(0),[u,d]=(0,c.useState)(Fw),[p,f]=(0,c.useState)(""),[h,m]=(0,c.useState)(null),[g,v]=(0,c.useState)(null),b=(0,c.useRef)(!1);function x(r){const{getOptionCompletion:o}=h||{};if(!r.isDisabled){if(o){const i=o(r.value,p),s=(e=>null!==e&&"object"==typeof e&&"action"in e&&void 0!==e.action&&"value"in e&&void 0!==e.value)(i)?i:{action:"insert-at-caret",value:i};if("replace"===s.action)return void n([s.value]);"insert-at-caret"===s.action&&function(n){if(null===h)return;const r=e.start,o=r-h.triggerPrefix.length-p.length,i=(0,Ny.create)({html:(0,c.renderToString)(n)});t((0,Ny.insert)(e,i,o,r))}(s.value)}y()}}function y(){a(0),d(Fw),f(""),m(null),v(null)}const w=(0,c.useMemo)((()=>(0,Ny.isCollapsed)(e)?(0,Ny.getTextContent)((0,Ny.slice)(e,0)):""),[e]);(0,c.useEffect)((()=>{if(!w)return void(h&&y());const t=r.reduce(((e,t)=>w.lastIndexOf(t.triggerPrefix)>(null!==e?w.lastIndexOf(e.triggerPrefix):-1)?t:e),null);if(!t)return void(h&&y());const{allowContext:n,triggerPrefix:o}=t,i=w.lastIndexOf(o),s=w.slice(i+o.length);if(s.length>50)return;const a=0===u.length,l=s.split(/\s/),c=1===l.length,d=b.current&&l.length<=3;if(a&&!d&&!c)return void(h&&y());const p=(0,Ny.getTextContent)((0,Ny.slice)(e,void 0,(0,Ny.getTextContent)(e).length));if(n&&!n(w.slice(0,i),p))return void(h&&y());if(/^\s/.test(s)||/\s\s+$/.test(s))return void(h&&y());if(!/[\u0000-\uFFFF]*$/.test(s))return void(h&&y());const x=Ly(t.triggerPrefix),_=Iy()(w),S=_.slice(_.lastIndexOf(t.triggerPrefix)).match(new RegExp(`${x}([\0-]*)$`)),C=S&&S[1];m(t),v((()=>t!==h?zw(t):g)),f(null===C?"":C)}),[w]);const{key:_=""}=u[s]||{},{className:S}=h||{},C=!!h&&u.length>0,k=C?`components-autocomplete-listbox-${i}`:void 0,j=C?`components-autocomplete-item-${i}-${_}`:null,E=void 0!==e.start;return{listBoxId:k,activeId:j,onKeyDown:Ax((function(e){if(b.current="Backspace"===e.key,h&&0!==u.length&&!e.defaultPrevented){switch(e.key){case"ArrowUp":{const e=(0===s?u.length:s)-1;a(e),(0,Ay.isAppleOS)()&&(0,My.speak)(Lw(u[e].label),"assertive");break}case"ArrowDown":{const e=(s+1)%u.length;a(e),(0,Ay.isAppleOS)()&&(0,My.speak)(Lw(u[e].label),"assertive");break}case"Escape":m(null),v(null),e.preventDefault();break;case"Enter":x(u[s]);break;case"ArrowLeft":case"ArrowRight":return void y();default:return}e.preventDefault()}})),popover:E&&g&&(0,wt.jsx)(g,{className:S,filterValue:p,instanceId:i,listBoxId:k,selectedIndex:s,onChangeOptions:function(e){a(e.length===u.length?s:0),d(e)},onSelect:x,value:e,contentRef:o,reset:y})}}function Vw(e){const t=(0,c.useRef)(null),n=(0,c.useRef)(),{record:r}=e,o=function(e){const t=(0,c.useRef)(new Set);return t.current.add(e),t.current.size>2&&t.current.delete(Array.from(t.current)[0]),Array.from(t.current)[0]}(r),{popover:i,listBoxId:s,activeId:a,onKeyDown:u}=Bw({...e,contentRef:t});n.current=u;const d=(0,l.useMergeRefs)([t,(0,l.useRefEffect)((e=>{function t(e){n.current?.(e)}return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}}),[])]);return r.text!==o?.text?{ref:d,children:i,"aria-autocomplete":s?"list":void 0,"aria-owns":s,"aria-activedescendant":a}:{ref:d}}function $w({children:e,isSelected:t,...n}){const{popover:r,...o}=Bw(n);return(0,wt.jsxs)(wt.Fragment,{children:[e(o),t&&r]})}function Hw(e){const{help:t,id:n,...r}=e,o=(0,l.useInstanceId)(Qx,"wp-components-base-control",n);return{baseControlProps:{id:o,help:t,...r},controlProps:{id:o,...t?{"aria-describedby":`${o}__help`}:{}}}}const Ww=(0,wt.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wt.jsx)(n.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})}),Uw=(0,wt.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wt.jsx)(n.Path,{d:"M17.031 4.703 15.576 4l-1.56 3H14v.03l-2.324 4.47H9.5V13h1.396l-1.502 2.889h-.95a3.694 3.694 0 0 1 0-7.389H10V7H8.444a5.194 5.194 0 1 0 0 10.389h.17L7.5 19.53l1.416.719L15.049 8.5h.507a3.694 3.694 0 0 1 0 7.39H14v1.5h1.556a5.194 5.194 0 0 0 .273-10.383l1.202-2.304Z"})});const Gw=bl("",""),Kw={name:"bjn8wh",styles:"position:relative"},qw=e=>{const{color:t=jl.gray[200],style:n="solid",width:r=Tl.borderWidth}=e||{};return`${t} ${!!r&&"0"!==r||!!t?n||"solid":n} ${r!==Tl.borderWidth?`clamp(1px, ${r}, 10px)`:r}`},Yw={name:"1nwbfnf",styles:"grid-column:span 2;margin:0 auto"};function Xw(e){const{className:t,size:n="default",...r}=Ya(e,"BorderBoxControlLinkedButton"),o=qa();return{...r,className:(0,c.useMemo)((()=>o((e=>bl("position:absolute;top:","__unstable-large"===e?"8px":"3px",";",Bg({right:0})()," line-height:0;",""))(n),t)),[t,o,n])}}const Zw=Xa(((e,t)=>{const{className:n,isLinked:r,...o}=Xw(e),i=r?(0,a.__)("Unlink sides"):(0,a.__)("Link sides");return(0,wt.jsx)(Yi,{text:i,children:(0,wt.jsx)(dl,{className:n,children:(0,wt.jsx)(sy,{...o,size:"small",icon:r?Ww:Uw,iconSize:24,"aria-label":i,ref:t})})})}),"BorderBoxControlLinkedButton");function Qw(e){const{className:t,value:n,size:r="default",...o}=Ya(e,"BorderBoxControlVisualizer"),i=qa(),s=(0,c.useMemo)((()=>i(((e,t)=>bl("position:absolute;top:","__unstable-large"===t?"20px":"15px",";right:","__unstable-large"===t?"39px":"29px",";bottom:","__unstable-large"===t?"20px":"15px",";left:","__unstable-large"===t?"39px":"29px",";border-top:",qw(e?.top),";border-bottom:",qw(e?.bottom),";",Bg({borderLeft:qw(e?.left)})()," ",Bg({borderRight:qw(e?.right)})(),";",""))(n,r),t)),[i,t,n,r]);return{...o,className:s,value:n}}const Jw=Xa(((e,t)=>{const{value:n,...r}=Qw(e);return(0,wt.jsx)(dl,{...r,ref:t})}),"BorderBoxControlVisualizer"),e_=(0,wt.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wt.jsx)(n.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"})}),t_=(0,wt.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wt.jsx)(n.Path,{d:"M5 11.25h14v1.5H5z"})}),n_=(0,wt.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wt.jsx)(n.Path,{fillRule:"evenodd",d:"M5 11.25h3v1.5H5v-1.5zm5.5 0h3v1.5h-3v-1.5zm8.5 0h-3v1.5h3v-1.5z",clipRule:"evenodd"})}),r_=(0,wt.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wt.jsx)(n.Path,{fillRule:"evenodd",d:"M5.25 11.25h1.5v1.5h-1.5v-1.5zm3 0h1.5v1.5h-1.5v-1.5zm4.5 0h-1.5v1.5h1.5v-1.5zm1.5 0h1.5v1.5h-1.5v-1.5zm4.5 0h-1.5v1.5h1.5v-1.5z",clipRule:"evenodd"})}),o_=(0,B.createContext)(null),i_=e=>!e.isLayoutDirty&&e.willUpdate(!1);function s_(){const e=new Set,t=new WeakMap,n=()=>e.forEach(i_);return{add:r=>{e.add(r),t.set(r,r.addEventListener("willUpdate",n))},remove:r=>{e.delete(r);const o=t.get(r);o&&(o(),t.delete(r)),n()},dirty:n}}const a_=e=>!0===e,l_=({children:e,id:t,inherit:n=!0})=>{const r=(0,B.useContext)(gc),o=(0,B.useContext)(o_),[i,s]=fg(),a=(0,B.useRef)(null),l=r.id||o;null===a.current&&((e=>a_(!0===e)||"id"===e)(n)&&l&&(t=t?l+"-"+t:l),a.current={id:t,group:a_(n)&&r.group||s_()});const c=(0,B.useMemo)((()=>({...a.current,forceRender:i})),[s]);return(0,wt.jsx)(gc.Provider,{value:c,children:e})};const c_=e=>{const t=bl("border-color:",jl.ui.border,";","");return bl(e&&t," &:hover{border-color:",jl.ui.borderHover,";}&:focus-within{border-color:",jl.ui.borderFocus,";box-shadow:",Tl.controlBoxShadowFocus,";z-index:1;outline:2px solid transparent;outline-offset:-2px;}","")};var u_={name:"1aqh2c7",styles:"min-height:40px;padding:3px"},d_={name:"1ndywgm",styles:"min-height:36px;padding:2px"};const p_=e=>({default:d_,"__unstable-large":u_}[e]),f_={name:"7whenc",styles:"display:flex;width:100%"},h_=cl("div",{target:"eakva830"})({name:"zjik7",styles:"display:flex"});function m_(e={}){var t,n=T(e,[]);const r=null==(t=n.store)?void 0:t.getState(),o=ht(P(E({},n),{focusLoop:F(n.focusLoop,null==r?void 0:r.focusLoop,!0)})),i=Ve(P(E({},o.getState()),{value:F(n.value,null==r?void 0:r.value,n.defaultValue,null)}),o,n.store);return P(E(E({},o),i),{setValue:e=>i.setState("value",e)})}function g_(e={}){const[t,n]=et(m_,e);return function(e,t,n){return Je(e=mt(e,t,n),n,"value","setValue"),e}(t,n,e)}var v_=jt([Nt],[Mt]),b_=v_.useContext,x_=(v_.useScopedContext,v_.useProviderContext),y_=(v_.ContextProvider,v_.ScopedContextProvider),w_=kt((function(e){var t=e,{store:n}=t,r=x(t,["store"]);const o=x_();return D(n=n||o,!1),r=Ie(r,(e=>(0,wt.jsx)(y_,{value:n,children:e})),[n]),r=v({role:"radiogroup"},r),r=ln(v({store:n},r))})),__=_t((function(e){return Ct("div",w_(e))}));const S_=(0,c.createContext)({}),C_=S_;function k_(e){const t=(0,c.useRef)(!0),n=(0,l.usePrevious)(e),r=(0,c.useRef)(!1);(0,c.useEffect)((()=>{t.current&&(t.current=!1)}),[]);const o=r.current||!t.current&&n!==e;return(0,c.useEffect)((()=>{r.current=o}),[o]),o?{value:null!=e?e:"",defaultValue:void 0}:{value:void 0,defaultValue:e}}const j_=(0,c.forwardRef)((function({children:e,isAdaptiveWidth:t,label:n,onChange:r,size:o,value:i,id:s,...u},d){const p=(0,l.useInstanceId)(j_,"toggle-group-control-as-radio-group"),f=s||p,{value:h,defaultValue:m}=k_(i),g=r?e=>{r(null!=e?e:void 0)}:void 0,v=g_({defaultValue:m,value:h,setValue:g,rtl:(0,a.isRTL)()}),b=Qe(v,"value"),x=v.setValue;(0,c.useEffect)((()=>{""===b&&v.setActiveId(void 0)}),[v,b]);const y=(0,c.useMemo)((()=>({activeItemIsNotFirstItem:()=>v.getState().activeId!==v.first(),baseId:f,isBlock:!t,size:o,value:b,setValue:x})),[f,t,v,o,b,x]);return(0,wt.jsx)(C_.Provider,{value:y,children:(0,wt.jsx)(__,{store:v,"aria-label":n,render:(0,wt.jsx)(dl,{}),...u,id:f,ref:d,children:e})})}));function E_({defaultValue:e,onChange:t,value:n}){const r=void 0!==n,o=r?n:e,[i,s]=(0,c.useState)(o);let a;return a=r&&"function"==typeof t?t:r||"function"!=typeof t?s:e=>{t(e),s(e)},[r?n:i,a]}const P_=(0,c.forwardRef)((function({children:e,isAdaptiveWidth:t,label:n,onChange:r,size:o,value:i,id:s,...a},u){const d=(0,l.useInstanceId)(P_,"toggle-group-control-as-button-group"),p=s||d,{value:f,defaultValue:h}=k_(i),[m,g]=E_({defaultValue:h,value:f,onChange:r}),v=(0,c.useMemo)((()=>({baseId:p,value:m,setValue:g,isBlock:!t,isDeselectable:!0,size:o})),[p,m,g,t,o]);return(0,wt.jsx)(C_.Provider,{value:v,children:(0,wt.jsx)(dl,{"aria-label":n,...a,ref:u,role:"group",children:e})})}));const T_=Xa((function(e,t){const{__nextHasNoMarginBottom:n=!1,__next40pxDefaultSize:r=!1,className:o,isAdaptiveWidth:i=!1,isBlock:s=!1,isDeselectable:a=!1,label:u,hideLabelFromVision:d=!1,help:p,onChange:f,size:h="default",value:m,children:g,...v}=Ya(e,"ToggleGroupControl"),b=(0,l.useInstanceId)(T_,"toggle-group-control"),x=r&&"default"===h?"__unstable-large":h,y=qa(),w=(0,c.useMemo)((()=>y((({isBlock:e,isDeselectable:t,size:n})=>bl("background:",jl.ui.background,";border:1px solid transparent;border-radius:",Tl.radiusSmall,";display:inline-flex;min-width:0;position:relative;",p_(n)," ",!t&&c_(e),";",""))({isBlock:s,isDeselectable:a,size:x}),s&&f_,o)),[o,y,s,a,x]),_=a?P_:j_;return(0,wt.jsxs)(Qx,{help:p,__nextHasNoMarginBottom:n,__associatedWPComponentName:"ToggleGroupControl",children:[!d&&(0,wt.jsx)(h_,{children:(0,wt.jsx)(Qx.VisualLabel,{children:u})}),(0,wt.jsx)(_,{...v,className:w,isAdaptiveWidth:i,label:u,onChange:f,ref:t,size:x,value:m,children:(0,wt.jsx)(l_,{id:b,children:g})})]})}),"ToggleGroupControl"),R_=T_;var I_="input";var N_=kt((function(e){var t=e,{store:n,name:r,value:o,checked:i}=t,s=x(t,["store","name","value","checked"]);const a=b_();n=n||a;const l=je(s.id),c=(0,B.useRef)(null),u=Qe(n,(e=>null!=i?i:function(e,t){if(void 0!==t)return null!=e&&null!=t?t===e:!!t}(o,null==e?void 0:e.value)));(0,B.useEffect)((()=>{if(!l)return;if(!u)return;(null==n?void 0:n.getState().activeId)===l||null==n||n.setActiveId(l)}),[n,u,l]);const d=s.onChange,p=function(e,t){return"input"===e&&(!t||"radio"===t)}(Ee(c,I_),s.type),f=z(s),[h,m]=Te();(0,B.useEffect)((()=>{const e=c.current;e&&(p||(void 0!==u&&(e.checked=u),void 0!==r&&(e.name=r),void 0!==o&&(e.value=`${o}`)))}),[h,p,u,r,o]);const g=Se((e=>{if(f)return e.preventDefault(),void e.stopPropagation();p||(e.currentTarget.checked=!0,m()),null==d||d(e),e.defaultPrevented||null==n||n.setValue(o)})),y=s.onClick,w=Se((e=>{null==y||y(e),e.defaultPrevented||p||g(e)})),_=s.onFocus,S=Se((e=>{if(null==_||_(e),e.defaultPrevented)return;if(!p)return;if(!n)return;const{moves:t,activeId:r}=n.getState();t&&(l&&r!==l||g(e))}));return s=b(v({id:l,role:p?void 0:"radio",type:p?"radio":void 0,"aria-checked":u},s),{ref:ke(c,s.ref),onChange:g,onClick:w,onFocus:S}),s=Pn(v({store:n,clickOnEnter:!p},s)),L(v({name:p?r:void 0,value:p?o:void 0,checked:u},s))})),M_=St(_t((function(e){const t=N_(e);return Ct(I_,t)})));const A_=cl("div",{target:"et6ln9s1"})({name:"sln1fl",styles:"display:inline-flex;max-width:100%;min-width:0;position:relative"}),D_={name:"82a6rk",styles:"flex:1"},O_=({isDeselectable:e,isIcon:t,isPressed:n,size:r})=>bl("align-items:center;appearance:none;background:transparent;border:none;border-radius:",Tl.radiusXSmall,";color:",jl.gray[700],";fill:currentColor;cursor:pointer;display:flex;font-family:inherit;height:100%;justify-content:center;line-height:100%;outline:none;padding:0 12px;position:relative;text-align:center;@media not ( prefers-reduced-motion ){transition:background ",Tl.transitionDurationFast," linear,color ",Tl.transitionDurationFast," linear,font-weight 60ms linear;}user-select:none;width:100%;z-index:2;&::-moz-focus-inner{border:0;}&[disabled]{opacity:0.4;cursor:default;}&:active{background:",Tl.controlBackgroundColor,";}",e&&L_," ",t&&B_({size:r})," ",n&&z_,";",""),z_=bl("color:",jl.white,";&:active{background:transparent;}",""),L_=bl("color:",jl.gray[900],";&:focus{box-shadow:inset 0 0 0 1px ",jl.white,",0 0 0 ",Tl.borderWidthFocus," ",jl.theme.accent,";outline:2px solid transparent;}",""),F_=cl("div",{target:"et6ln9s0"})("display:flex;font-size:",Tl.fontSize,";line-height:1;"),B_=({size:e="default"})=>bl("color:",jl.gray[900],";height:",{default:"30px","__unstable-large":"32px"}[e],";aspect-ratio:1;padding-left:0;padding-right:0;",""),V_=bl("background:",jl.gray[900],";border-radius:",Tl.radiusXSmall,";position:absolute;inset:0;z-index:1;outline:2px solid transparent;outline-offset:-3px;",""),{ButtonContentView:$_,LabelView:H_}=t,W_={duration:0},U_=({showTooltip:e,text:t,children:n})=>e&&t?(0,wt.jsx)(Yi,{text:t,placement:"top",children:n}):(0,wt.jsx)(wt.Fragment,{children:n});const G_=Xa((function e(t,n){const r=(0,l.useReducedMotion)(),o=(0,c.useContext)(S_),i=Ya({...t,id:(0,l.useInstanceId)(e,o.baseId||"toggle-group-control-option-base")},"ToggleGroupControlOptionBase"),{isBlock:s=!1,isDeselectable:a=!1,size:u="default"}=o,{className:d,isIcon:p=!1,value:f,children:h,showTooltip:m=!1,disabled:g,...v}=i,b=o.value===f,x=qa(),y=(0,c.useMemo)((()=>x(s&&D_)),[x,s]),w=(0,c.useMemo)((()=>x(O_({isDeselectable:a,isIcon:p,isPressed:b,size:u}),d)),[x,a,p,b,u,d]),_=(0,c.useMemo)((()=>x(V_)),[x]),S={...v,className:w,"data-value":f,ref:n};return(0,wt.jsxs)(H_,{className:y,children:[(0,wt.jsx)(U_,{showTooltip:m,text:v["aria-label"],children:a?(0,wt.jsx)("button",{...S,disabled:g,"aria-pressed":b,type:"button",onClick:()=>{a&&b?o.setValue(void 0):o.setValue(f)},children:(0,wt.jsx)($_,{children:h})}):(0,wt.jsx)(M_,{disabled:g,onFocusVisible:()=>{(null===o.value||""===o.value)&&!o.activeItemIsNotFirstItem?.()||o.setValue(f)},render:(0,wt.jsx)("button",{type:"button",...S}),value:f,children:(0,wt.jsx)($_,{children:h})})}),b?(0,wt.jsx)(dg.div,{layout:!0,layoutRoot:!0,children:(0,wt.jsx)(dg.div,{className:_,transition:r?W_:void 0,role:"presentation",layoutId:"toggle-group-backdrop-shared-layout-id"})}):null]})}),"ToggleGroupControlOptionBase"),K_=G_;const q_=(0,c.forwardRef)((function(e,t){const{icon:n,label:r,...o}=e;return(0,wt.jsx)(K_,{...o,isIcon:!0,"aria-label":r,showTooltip:!0,ref:t,children:(0,wt.jsx)(ry,{icon:n})})})),Y_=q_,X_=[{label:(0,a.__)("Solid"),icon:t_,value:"solid"},{label:(0,a.__)("Dashed"),icon:n_,value:"dashed"},{label:(0,a.__)("Dotted"),icon:r_,value:"dotted"}];const Z_=Xa((function({onChange:e,...t},n){return(0,wt.jsx)(R_,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,ref:n,isDeselectable:!0,onChange:t=>{e?.(t)},...t,children:X_.map((e=>(0,wt.jsx)(Y_,{value:e.value,icon:e.icon,label:e.label},e.value)))})}),"BorderControlStylePicker");const Q_=(0,c.forwardRef)((function(e,t){const{className:n,colorValue:r,...o}=e;return(0,wt.jsx)("span",{className:s("component-color-indicator",n),style:{background:r},ref:t,...o})}));var J_=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},eS=function(e){return.2126*J_(e.r)+.7152*J_(e.g)+.0722*J_(e.b)};function tS(e){e.prototype.luminance=function(){return e=eS(this.rgba),void 0===(t=2)&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0;var e,t,n},e.prototype.contrast=function(t){void 0===t&&(t="#FFF");var n,r,o,i,s,a,l,c=t instanceof e?t:new e(t);return i=this.rgba,s=c.toRgb(),n=(a=eS(i))>(l=eS(s))?(a+.05)/(l+.05):(l+.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)>=(s=void 0===(i=(n=t).size)?"normal":i,"AAA"===(o=void 0===(r=n.level)?"AA":r)&&"normal"===s?7:"AA"===o&&"large"===s?3:4.5);var n,r,o,i,s}}const nS=Xa(((e,t)=>{const{renderContent:n,renderToggle:r,className:o,contentClassName:i,expandOnMobile:a,headerTitle:u,focusOnMount:d,popoverProps:p,onClose:f,onToggle:h,style:m,open:g,defaultOpen:v,position:b,variant:x}=Ya(e,"Dropdown");void 0!==b&&Fi()("`position` prop in wp.components.Dropdown",{since:"6.2",alternative:"`popoverProps.placement` prop",hint:"Note that the `position` prop will override any values passed through the `popoverProps.placement` prop."});const[y,w]=(0,c.useState)(null),_=(0,c.useRef)(),[S,C]=E_({defaultValue:v,value:g,onChange:h});function k(){f?.(),C(!1)}const j={isOpen:!!S,onToggle:()=>C(!S),onClose:k},E=!!(p?.anchor||p?.anchorRef||p?.getAnchorRect||p?.anchorRect);return(0,wt.jsxs)("div",{className:o,ref:(0,l.useMergeRefs)([_,t,w]),tabIndex:-1,style:m,children:[r(j),S&&(0,wt.jsx)(Dw,{position:b,onClose:k,onFocusOutside:function(){if(!_.current)return;const{ownerDocument:e}=_.current,t=e?.activeElement?.closest('[role="dialog"]');_.current.contains(e.activeElement)||t&&!t.contains(_.current)||k()},expandOnMobile:a,headerTitle:u,focusOnMount:d,offset:13,anchor:E?void 0:y,variant:x,...p,className:s("components-dropdown__content",p?.className,i),children:n(j)})]})}),"Dropdown"),rS=nS;const oS=Xa((function(e,t){const n=Ya(e,"InputControlSuffixWrapper");return(0,wt.jsx)(bb,{...n,ref:t})}),"InputControlSuffixWrapper");const iS=({disabled:e})=>e?bl("color:",jl.ui.textDisabled,";cursor:default;",""):"";var sS={name:"1lv1yo7",styles:"display:inline-flex"};const aS=({variant:e})=>"minimal"===e?sS:"",lS=cl(kb,{target:"e1mv6sxx3"})("color:",jl.theme.foreground,";cursor:pointer;",iS," ",aS,";"),cS=({__next40pxDefaultSize:e,multiple:t,selectSize:n="default"})=>{if(t)return;const r={default:{height:40,minHeight:40,paddingTop:0,paddingBottom:0},small:{height:24,minHeight:24,paddingTop:0,paddingBottom:0},compact:{height:32,minHeight:32,paddingTop:0,paddingBottom:0},"__unstable-large":{height:40,minHeight:40,paddingTop:0,paddingBottom:0}};e||(r.default=r.compact);return bl(r[n]||r.default,"","")},uS=({__next40pxDefaultSize:e,multiple:t,selectSize:n="default"})=>{const r={default:Tl.controlPaddingX,small:Tl.controlPaddingXSmall,compact:Tl.controlPaddingXSmall,"__unstable-large":Tl.controlPaddingX};e||(r.default=r.compact);const o=r[n]||r.default;return Bg({paddingLeft:o,paddingRight:o+18,...t?{paddingTop:o,paddingBottom:o}:{}})},dS=({multiple:e})=>({overflow:e?"auto":"hidden"});var pS={name:"n1jncc",styles:"field-sizing:content"};const fS=({variant:e})=>"minimal"===e?pS:"",hS=cl("select",{target:"e1mv6sxx2"})("&&&{appearance:none;background:transparent;box-sizing:border-box;border:none;box-shadow:none!important;color:currentColor;cursor:inherit;display:block;font-family:inherit;margin:0;width:100%;max-width:none;white-space:nowrap;text-overflow:ellipsis;",lb,";",cS,";",uS,";",dS," ",fS,";}"),mS=cl("div",{target:"e1mv6sxx1"})("margin-inline-end:",wl(-1),";line-height:0;path{fill:currentColor;}"),gS=cl(oS,{target:"e1mv6sxx0"})("position:absolute;pointer-events:none;",Bg({right:0}),";");const vS=(0,c.forwardRef)((function({icon:e,size:t=24,...n},r){return(0,c.cloneElement)(e,{width:t,height:t,...n,ref:r})})),bS=(0,wt.jsx)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,wt.jsx)(n.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})}),xS=()=>(0,wt.jsx)(gS,{children:(0,wt.jsx)(mS,{children:(0,wt.jsx)(vS,{icon:bS,size:18})})});function yS({options:e}){return e.map((({id:e,label:t,value:n,...r},o)=>{const i=e||`${t}-${n}-${o}`;return(0,wt.jsx)("option",{value:n,...r,children:t},i)}))}const wS=(0,c.forwardRef)((function(e,t){const{className:n,disabled:r=!1,help:o,hideLabelFromVision:i,id:a,label:c,multiple:u=!1,onChange:d,options:p=[],size:f="default",value:h,labelPosition:m="top",children:g,prefix:v,suffix:b,variant:x="default",__next40pxDefaultSize:y=!1,__nextHasNoMarginBottom:w=!1,..._}=_b(e),S=function(e){const t=(0,l.useInstanceId)(wS);return e||`inspector-select-control-${t}`}(a),C=o?`${S}__help`:void 0;if(!p?.length&&!g)return null;const k=s("components-select-control",n);return(0,wt.jsx)(Qx,{help:o,id:S,__nextHasNoMarginBottom:w,__associatedWPComponentName:"SelectControl",children:(0,wt.jsx)(lS,{className:k,disabled:r,hideLabelFromVision:i,id:S,isBorderless:"minimal"===x,label:c,size:f,suffix:b||!u&&(0,wt.jsx)(xS,{}),prefix:v,labelPosition:m,__unstableInputWidth:"minimal"===x?"auto":void 0,variant:x,__next40pxDefaultSize:y,children:(0,wt.jsx)(hS,{..._,__next40pxDefaultSize:y,"aria-describedby":C,className:"components-select-control__input",disabled:r,id:S,multiple:u,onChange:t=>{if(e.multiple){const n=Array.from(t.target.options).filter((({selected:e})=>e)).map((({value:e})=>e));e.onChange?.(n,{event:t})}else e.onChange?.(t.target.value,{event:t})},ref:t,selectSize:f,value:h,variant:x,children:g||(0,wt.jsx)(yS,{options:p})})})})})),_S=wS,SS={initial:void 0,fallback:""};const CS=function(e,t=SS){const{initial:n,fallback:r}={...SS,...t},[o,i]=(0,c.useState)(e),s=qg(e);return(0,c.useEffect)((()=>{s&&o&&i(void 0)}),[s,o]),[function(e=[],t){var n;return null!==(n=e.find(qg))&&void 0!==n?n:t}([e,o,n],r),(0,c.useCallback)((e=>{s||i(e)}),[s])]};function kS(e,t,n){return"number"!=typeof e?null:parseFloat(`${hy(e,t,n)}`)}const jS=30,ES=()=>bl({height:jS,minHeight:jS},"",""),PS=12,TS=({__next40pxDefaultSize:e})=>!e&&bl({minHeight:jS},"",""),RS=cl("div",{target:"e1epgpqk14"})("-webkit-tap-highlight-color:transparent;align-items:center;display:flex;justify-content:flex-start;padding:0;position:relative;touch-action:none;width:100%;min-height:40px;",TS,";"),IS=({color:e=jl.ui.borderFocus})=>bl({color:e},"",""),NS=({marks:e,__nextHasNoMarginBottom:t})=>t?"":bl({marginBottom:e?16:void 0},"",""),MS=cl("div",{target:"e1epgpqk13"})("display:block;flex:1;position:relative;width:100%;",IS,";",ES,";",NS,";"),AS=cl("span",{target:"e1epgpqk12"})("display:flex;margin-top:",4,"px;",Bg({marginRight:6}),";"),DS=cl("span",{target:"e1epgpqk11"})("display:flex;margin-top:",4,"px;",Bg({marginLeft:6}),";"),OS=({disabled:e,railColor:t})=>{let n=t||"";return e&&(n=jl.ui.backgroundDisabled),bl({background:n},"","")},zS=cl("span",{target:"e1epgpqk10"})("background-color:",jl.gray[300],";left:0;pointer-events:none;right:0;display:block;height:",4,"px;position:absolute;margin-top:",13,"px;top:0;border-radius:",Tl.radiusFull,";",OS,";"),LS=({disabled:e,trackColor:t})=>{let n=t||"currentColor";return e&&(n=jl.gray[400]),bl({background:n},"","")},FS=cl("span",{target:"e1epgpqk9"})("background-color:currentColor;border-radius:",Tl.radiusFull,";height:",4,"px;pointer-events:none;display:block;position:absolute;margin-top:",13,"px;top:0;",LS,";"),BS=cl("span",{target:"e1epgpqk8"})({name:"l7tjj5",styles:"display:block;pointer-events:none;position:relative;width:100%;user-select:none"}),VS=({disabled:e,isFilled:t})=>{let n=t?"currentColor":jl.gray[300];return e&&(n=jl.gray[400]),bl({backgroundColor:n},"","")},$S=cl("span",{target:"e1epgpqk7"})("height:",PS,"px;left:0;position:absolute;top:9px;width:1px;",VS,";"),HS=({isFilled:e})=>bl({color:e?jl.gray[700]:jl.gray[300]},"",""),WS=cl("span",{target:"e1epgpqk6"})("color:",jl.gray[300],";font-size:11px;position:absolute;top:22px;white-space:nowrap;",Bg({left:0}),";",Bg({transform:"translateX( -50% )"},{transform:"translateX( 50% )"}),";",HS,";"),US=({disabled:e})=>bl("background-color:",e?jl.gray[400]:jl.theme.accent,";",""),GS=cl("span",{target:"e1epgpqk5"})("align-items:center;display:flex;height:",PS,"px;justify-content:center;margin-top:",9,"px;outline:0;pointer-events:none;position:absolute;top:0;user-select:none;width:",PS,"px;border-radius:",Tl.radiusRound,";",US,";",Bg({marginLeft:-10}),";",Bg({transform:"translateX( 4.5px )"},{transform:"translateX( -4.5px )"}),";"),KS=({isFocused:e})=>e?bl("&::before{content:' ';position:absolute;background-color:",jl.theme.accent,";opacity:0.4;border-radius:",Tl.radiusRound,";height:",20,"px;width:",20,"px;top:-4px;left:-4px;}",""):"",qS=cl("span",{target:"e1epgpqk4"})("align-items:center;border-radius:",Tl.radiusRound,";height:100%;outline:0;position:absolute;user-select:none;width:100%;box-shadow:",Tl.elevationXSmall,";",US,";",KS,";"),YS=cl("input",{target:"e1epgpqk3"})("box-sizing:border-box;cursor:pointer;display:block;height:100%;left:0;margin:0 -",6,"px;opacity:0;outline:none;position:absolute;right:0;top:0;width:calc( 100% + ",PS,"px );"),XS=({show:e})=>bl({opacity:e?1:0},"","");var ZS={name:"1cypxip",styles:"top:-80%"},QS={name:"1lr98c4",styles:"bottom:-80%"};const JS=({position:e})=>"bottom"===e?QS:ZS,eC=cl("span",{target:"e1epgpqk2"})("background:rgba( 0, 0, 0, 0.8 );border-radius:",Tl.radiusSmall,";color:white;display:inline-block;font-size:12px;min-width:32px;opacity:0;padding:4px 8px;pointer-events:none;position:absolute;text-align:center;user-select:none;line-height:1.4;@media not ( prefers-reduced-motion ){transition:opacity 120ms ease;}",XS,";",JS,";",Bg({transform:"translateX(-50%)"},{transform:"translateX(50%)"}),";"),tC=cl(Sy,{target:"e1epgpqk1"})("display:inline-block;font-size:13px;margin-top:0;input[type='number']&{",ES,";}",Bg({marginLeft:`${wl(4)} !important`}),";"),nC=cl("span",{target:"e1epgpqk0"})("display:block;margin-top:0;button,button.is-small{margin-left:0;",ES,";}",Bg({marginLeft:8}),";");const rC=(0,c.forwardRef)((function(e,t){const{describedBy:n,label:r,value:o,...i}=e;return(0,wt.jsx)(YS,{...i,"aria-describedby":n,"aria-label":r,"aria-hidden":!1,ref:t,tabIndex:0,type:"range",value:o})}));function oC(e){const{className:t,isFilled:n=!1,label:r,style:o={},...i}=e,a=s("components-range-control__mark",n&&"is-filled",t),l=s("components-range-control__mark-label",n&&"is-filled");return(0,wt.jsxs)(wt.Fragment,{children:[(0,wt.jsx)($S,{...i,"aria-hidden":"true",className:a,isFilled:n,style:o}),r&&(0,wt.jsx)(WS,{"aria-hidden":"true",className:l,isFilled:n,style:o,children:r})]})}function iC(e){const{disabled:t=!1,marks:n=!1,min:r=0,max:o=100,step:i=1,value:s=0,...a}=e;return(0,wt.jsxs)(wt.Fragment,{children:[(0,wt.jsx)(zS,{disabled:t,...a}),n&&(0,wt.jsx)(sC,{disabled:t,marks:n,min:r,max:o,step:i,value:s})]})}function sC(e){const{disabled:t=!1,marks:n=!1,min:r=0,max:o=100,step:i=1,value:s=0}=e,l=function({marks:e,min:t=0,max:n=100,step:r=1,value:o=0}){if(!e)return[];const i=n-t;if(!Array.isArray(e)){e=[];const n=1+Math.round(i/r);for(;n>e.push({value:r*e.length+t}););}const s=[];return e.forEach(((e,r)=>{if(e.value<t||e.value>n)return;const l=`mark-${r}`,c=e.value<=o,u=(e.value-t)/i*100+"%",d={[(0,a.isRTL)()?"right":"left"]:u};s.push({...e,isFilled:c,key:l,style:d})})),s}({marks:n,min:r,max:o,step:"any"===i?1:i,value:s});return(0,wt.jsx)(BS,{"aria-hidden":"true",className:"components-range-control__marks",children:l.map((e=>(0,B.createElement)(oC,{...e,key:e.key,"aria-hidden":"true",disabled:t})))})}function aC(e){const{className:t,inputRef:n,tooltipPosition:r,show:o=!1,style:i={},value:a=0,renderTooltipContent:l=(e=>e),zIndex:u=100,...d}=e,p=function({inputRef:e,tooltipPosition:t}){const[n,r]=(0,c.useState)(),o=(0,c.useCallback)((()=>{e&&e.current&&r(t)}),[t,e]);return(0,c.useEffect)((()=>{o()}),[o]),(0,c.useEffect)((()=>(window.addEventListener("resize",o),()=>{window.removeEventListener("resize",o)}))),n}({inputRef:n,tooltipPosition:r}),f=s("components-simple-tooltip",t),h={...i,zIndex:u};return(0,wt.jsx)(eC,{...d,"aria-hidden":o,className:f,position:p,show:o,role:"tooltip",style:h,children:l(a)})}const lC=()=>{};function cC({resetFallbackValue:e,initialPosition:t}){return void 0!==e?Number.isNaN(e)?null:e:void 0!==t?Number.isNaN(t)?null:t:null}const uC=(0,c.forwardRef)((function e(t,n){const{__nextHasNoMarginBottom:r=!1,afterIcon:o,allowReset:i=!1,beforeIcon:u,className:d,color:p=jl.theme.accent,currentInput:f,disabled:h=!1,help:m,hideLabelFromVision:g=!1,initialPosition:v,isShiftStepEnabled:b=!0,label:x,marks:y=!1,max:w=100,min:_=0,onBlur:S=lC,onChange:C=lC,onFocus:k=lC,onMouseLeave:j=lC,onMouseMove:E=lC,railColor:P,renderTooltipContent:T=(e=>e),resetFallbackValue:R,__next40pxDefaultSize:I=!1,shiftStep:N=10,showTooltip:M,step:A=1,trackColor:D,value:O,withInputField:z=!0,...L}=t,[F,B]=function(e){const{min:t,max:n,value:r,initial:o}=e,[i,s]=CS(kS(r,t,n),{initial:kS(null!=o?o:null,t,n),fallback:null});return[i,(0,c.useCallback)((e=>{s(null===e?null:kS(e,t,n))}),[t,n,s])]}({min:_,max:w,value:null!=O?O:null,initial:v}),V=(0,c.useRef)(!1);let $=M,H=z;"any"===A&&($=!1,H=!1);const[W,U]=(0,c.useState)($),[G,K]=(0,c.useState)(!1),q=(0,c.useRef)(),Y=q.current?.matches(":focus"),X=!h&&G,Z=null===F,Q=Z?"":void 0!==F?F:f,J=Z?(w-_)/2+_:F,ee=`${hy(Z?50:(F-_)/(w-_)*100,0,100)}%`,te=s("components-range-control",d),ne=s("components-range-control__wrapper",!!y&&"is-marked"),re=(0,l.useInstanceId)(e,"inspector-range-control"),oe=m?`${re}__help`:void 0,ie=!1!==$&&Number.isFinite(F),se=()=>{const e=Number.isNaN(R)?null:null!=R?R:null;B(e),C(null!=e?e:void 0)},ae={[(0,a.isRTL)()?"right":"left"]:ee};return(0,wt.jsx)(Qx,{__nextHasNoMarginBottom:r,__associatedWPComponentName:"RangeControl",className:te,label:x,hideLabelFromVision:g,id:`${re}`,help:m,children:(0,wt.jsxs)(RS,{className:"components-range-control__root",__next40pxDefaultSize:I,children:[u&&(0,wt.jsx)(AS,{children:(0,wt.jsx)(ry,{icon:u})}),(0,wt.jsxs)(MS,{__nextHasNoMarginBottom:r,className:ne,color:p,marks:!!y,children:[(0,wt.jsx)(rC,{...L,className:"components-range-control__slider",describedBy:oe,disabled:h,id:`${re}`,label:x,max:w,min:_,onBlur:e=>{S(e),K(!1),U(!1)},onChange:e=>{const t=parseFloat(e.target.value);B(t),C(t)},onFocus:e=>{k(e),K(!0),U(!0)},onMouseMove:E,onMouseLeave:j,ref:(0,l.useMergeRefs)([q,n]),step:A,value:null!=Q?Q:void 0}),(0,wt.jsx)(iC,{"aria-hidden":!0,disabled:h,marks:y,max:w,min:_,railColor:P,step:A,value:J}),(0,wt.jsx)(FS,{"aria-hidden":!0,className:"components-range-control__track",disabled:h,style:{width:ee},trackColor:D}),(0,wt.jsx)(GS,{className:"components-range-control__thumb-wrapper",style:ae,disabled:h,children:(0,wt.jsx)(qS,{"aria-hidden":!0,isFocused:X,disabled:h})}),ie&&(0,wt.jsx)(aC,{className:"components-range-control__tooltip",inputRef:q,tooltipPosition:"bottom",renderTooltipContent:T,show:Y||W,style:ae,value:F})]}),o&&(0,wt.jsx)(DS,{children:(0,wt.jsx)(ry,{icon:o})}),H&&(0,wt.jsx)(tC,{"aria-label":x,className:"components-range-control__number",disabled:h,inputMode:"decimal",isShiftStepEnabled:b,max:w,min:_,onBlur:()=>{V.current&&(se(),V.current=!1)},onChange:e=>{let t=parseFloat(e);B(t),isNaN(t)?i&&(V.current=!0):((t<_||t>w)&&(t=kS(t,_,w)),C(t),V.current=!1)},shiftStep:N,size:I?"__unstable-large":"default",__unstableInputWidth:wl(I?20:16),step:A,value:Q}),i&&(0,wt.jsx)(nC,{children:(0,wt.jsx)(sy,{className:"components-range-control__reset",accessibleWhenDisabled:!h,disabled:h||F===cC({resetFallbackValue:R,initialPosition:v}),variant:"secondary",size:"small",onClick:se,children:(0,a.__)("Reset")})})]})})})),dC=uC,pC=cl(Sy,{target:"ez9hsf47"})("width:",wl(24),";"),fC=cl(_S,{target:"ez9hsf46"})("margin-left:",wl(-2),";width:5em;"),hC=cl(dC,{target:"ez9hsf45"})("flex:1;margin-right:",wl(2),";"),mC=`\n.react-colorful__interactive {\n\twidth: calc( 100% - ${wl(2)} );\n\tmargin-left: ${wl(1)};\n}`,gC=cl("div",{target:"ez9hsf44"})("padding-top:",wl(2),";padding-right:0;padding-left:0;padding-bottom:0;"),vC=cl(yy,{target:"ez9hsf43"})("padding-left:",wl(4),";padding-right:",wl(4),";"),bC=cl(Ig,{target:"ez9hsf42"})("padding-top:",wl(4),";padding-left:",wl(4),";padding-right:",wl(3),";padding-bottom:",wl(5),";"),xC=cl("div",{target:"ez9hsf41"})(Bx,";width:216px;.react-colorful{display:flex;flex-direction:column;align-items:center;width:216px;height:auto;}.react-colorful__saturation{width:100%;border-radius:0;height:216px;margin-bottom:",wl(4),";border-bottom:none;}.react-colorful__hue,.react-colorful__alpha{width:184px;height:16px;border-radius:",Tl.radiusFull,";margin-bottom:",wl(2),";}.react-colorful__pointer{height:16px;width:16px;border:none;box-shadow:0 0 2px 0 rgba( 0, 0, 0, 0.25 );outline:2px solid transparent;}.react-colorful__pointer-fill{box-shadow:inset 0 0 0 ",Tl.borderWidthFocus," #fff;}",mC,";"),yC=cl(sy,{target:"ez9hsf40"})("&&&&&{min-width:",wl(6),";padding:0;>svg{margin-right:0;}}"),wC=(0,wt.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wt.jsx)(n.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5 4.5h11a.5.5 0 0 1 .5.5v11a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V5a.5.5 0 0 1 .5-.5ZM3 5a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5Zm17 3v10.75c0 .69-.56 1.25-1.25 1.25H6v1.5h12.75a2.75 2.75 0 0 0 2.75-2.75V8H20Z"})}),_C=e=>{const{color:t,colorType:n}=e,[r,o]=(0,c.useState)(null),i=(0,c.useRef)(),s=(0,l.useCopyToClipboard)((()=>{switch(n){case"hsl":return t.toHslString();case"rgb":return t.toRgbString();default:return t.toHex()}}),(()=>{i.current&&clearTimeout(i.current),o(t.toHex()),i.current=setTimeout((()=>{o(null),i.current=void 0}),3e3)}));return(0,c.useEffect)((()=>()=>{i.current&&clearTimeout(i.current)}),[]),(0,wt.jsx)(Yi,{delay:0,hideOnClick:!1,text:r===t.toHex()?(0,a.__)("Copied!"):(0,a.__)("Copy"),children:(0,wt.jsx)(yC,{size:"small",ref:s,icon:wC,showTooltip:!1})})};const SC=Xa((function(e,t){const n=Ya(e,"InputControlPrefixWrapper");return(0,wt.jsx)(bb,{...n,isPrefix:!0,ref:t})}),"InputControlPrefixWrapper"),CC=({min:e,max:t,label:n,abbreviation:r,onChange:o,value:i})=>(0,wt.jsxs)(yy,{spacing:4,children:[(0,wt.jsx)(pC,{min:e,max:t,label:n,hideLabelFromVision:!0,value:i,onChange:e=>{o(e?"string"!=typeof e?e:parseInt(e,10):0)},prefix:(0,wt.jsx)(SC,{children:(0,wt.jsx)(Xv,{color:jl.theme.accent,lineHeight:1,children:r})}),spinControls:"none",size:"__unstable-large"}),(0,wt.jsx)(hC,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:n,hideLabelFromVision:!0,min:e,max:t,value:i,onChange:o,withInputField:!1})]}),kC=({color:e,onChange:t,enableAlpha:n})=>{const{r,g:o,b:i,a:s}=e.toRgb();return(0,wt.jsxs)(wt.Fragment,{children:[(0,wt.jsx)(CC,{min:0,max:255,label:"Red",abbreviation:"R",value:r,onChange:e=>t(Ev({r:e,g:o,b:i,a:s}))}),(0,wt.jsx)(CC,{min:0,max:255,label:"Green",abbreviation:"G",value:o,onChange:e=>t(Ev({r,g:e,b:i,a:s}))}),(0,wt.jsx)(CC,{min:0,max:255,label:"Blue",abbreviation:"B",value:i,onChange:e=>t(Ev({r,g:o,b:e,a:s}))}),n&&(0,wt.jsx)(CC,{min:0,max:100,label:"Alpha",abbreviation:"A",value:Math.trunc(100*s),onChange:e=>t(Ev({r,g:o,b:i,a:e/100}))})]})},jC=({color:e,onChange:t,enableAlpha:n})=>{const r=(0,c.useMemo)((()=>e.toHsl()),[e]),[o,i]=(0,c.useState)({...r}),s=e.isEqual(Ev(o));(0,c.useEffect)((()=>{s||i(r)}),[r,s]);const a=s?o:r,l=n=>{const r=Ev({...a,...n});e.isEqual(r)?i((e=>({...e,...n}))):t(r)};return(0,wt.jsxs)(wt.Fragment,{children:[(0,wt.jsx)(CC,{min:0,max:359,label:"Hue",abbreviation:"H",value:a.h,onChange:e=>{l({h:e})}}),(0,wt.jsx)(CC,{min:0,max:100,label:"Saturation",abbreviation:"S",value:a.s,onChange:e=>{l({s:e})}}),(0,wt.jsx)(CC,{min:0,max:100,label:"Lightness",abbreviation:"L",value:a.l,onChange:e=>{l({l:e})}}),n&&(0,wt.jsx)(CC,{min:0,max:100,label:"Alpha",abbreviation:"A",value:Math.trunc(100*a.a),onChange:e=>{l({a:e/100})}})]})},EC=({color:e,onChange:t,enableAlpha:n})=>(0,wt.jsx)(ey,{prefix:(0,wt.jsx)(SC,{children:(0,wt.jsx)(Xv,{color:jl.theme.accent,lineHeight:1,children:"#"})}),value:e.toHex().slice(1).toUpperCase(),onChange:e=>{if(!e)return;const n=e.startsWith("#")?e:"#"+e;t(Ev(n))},maxLength:n?9:7,label:(0,a.__)("Hex color"),hideLabelFromVision:!0,size:"__unstable-large",__unstableStateReducer:(e,t)=>{const n=t.payload?.event?.nativeEvent;if("insertFromPaste"!==n?.inputType)return{...e};const r=e.value?.startsWith("#")?e.value.slice(1).toUpperCase():e.value?.toUpperCase();return{...e,value:r}},__unstableInputWidth:"9em"}),PC=({colorType:e,color:t,onChange:n,enableAlpha:r})=>{const o={color:t,onChange:n,enableAlpha:r};switch(e){case"hsl":return(0,wt.jsx)(jC,{...o});case"rgb":return(0,wt.jsx)(kC,{...o});default:return(0,wt.jsx)(EC,{...o})}};function TC(){return(TC=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function RC(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(o[n]=e[n]);return o}function IC(e){var t=(0,B.useRef)(e),n=(0,B.useRef)((function(e){t.current&&t.current(e)}));return t.current=e,n.current}var NC=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e<t?t:e},MC=function(e){return"touches"in e},AC=function(e){return e&&e.ownerDocument.defaultView||self},DC=function(e,t,n){var r=e.getBoundingClientRect(),o=MC(t)?function(e,t){for(var n=0;n<e.length;n++)if(e[n].identifier===t)return e[n];return e[0]}(t.touches,n):t;return{left:NC((o.pageX-(r.left+AC(e).pageXOffset))/r.width),top:NC((o.pageY-(r.top+AC(e).pageYOffset))/r.height)}},OC=function(e){!MC(e)&&e.preventDefault()},zC=B.memo((function(e){var t=e.onMove,n=e.onKey,r=RC(e,["onMove","onKey"]),o=(0,B.useRef)(null),i=IC(t),s=IC(n),a=(0,B.useRef)(null),l=(0,B.useRef)(!1),c=(0,B.useMemo)((function(){var e=function(e){OC(e),(MC(e)?e.touches.length>0:e.buttons>0)&&o.current?i(DC(o.current,e,a.current)):n(!1)},t=function(){return n(!1)};function n(n){var r=l.current,i=AC(o.current),s=n?i.addEventListener:i.removeEventListener;s(r?"touchmove":"mousemove",e),s(r?"touchend":"mouseup",t)}return[function(e){var t=e.nativeEvent,r=o.current;if(r&&(OC(t),!function(e,t){return t&&!MC(e)}(t,l.current)&&r)){if(MC(t)){l.current=!0;var s=t.changedTouches||[];s.length&&(a.current=s[0].identifier)}r.focus(),i(DC(r,t,a.current)),n(!0)}},function(e){var t=e.which||e.keyCode;t<37||t>40||(e.preventDefault(),s({left:39===t?.05:37===t?-.05:0,top:40===t?.05:38===t?-.05:0}))},n]}),[s,i]),u=c[0],d=c[1],p=c[2];return(0,B.useEffect)((function(){return p}),[p]),B.createElement("div",TC({},r,{onTouchStart:u,onMouseDown:u,className:"react-colorful__interactive",ref:o,onKeyDown:d,tabIndex:0,role:"slider"}))})),LC=function(e){return e.filter(Boolean).join(" ")},FC=function(e){var t=e.color,n=e.left,r=e.top,o=void 0===r?.5:r,i=LC(["react-colorful__pointer",e.className]);return B.createElement("div",{className:i,style:{top:100*o+"%",left:100*n+"%"}},B.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},BC=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n},VC=(Math.PI,function(e){var t=e.s,n=e.v,r=e.a,o=(200-t)*n/100;return{h:BC(e.h),s:BC(o>0&&o<200?t*n/100/(o<=100?o:200-o)*100:0),l:BC(o/2),a:BC(r,2)}}),$C=function(e){var t=VC(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},HC=function(e){var t=VC(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},WC=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),s=r*(1-n),a=r*(1-(t-i)*n),l=r*(1-(1-t+i)*n),c=i%6;return{r:BC(255*[r,a,s,s,l,r][c]),g:BC(255*[l,r,r,a,s,s][c]),b:BC(255*[s,s,l,r,r,a][c]),a:BC(o,2)}},UC=function(e){var t=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?KC({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)}):{h:0,s:0,v:0,a:1}},GC=UC,KC=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=Math.max(t,n,r),s=i-Math.min(t,n,r),a=s?i===t?(n-r)/s:i===n?2+(r-t)/s:4+(t-n)/s:0;return{h:BC(60*(a<0?a+6:a)),s:BC(i?s/i*100:0),v:BC(i/255*100),a:o}},qC=B.memo((function(e){var t=e.hue,n=e.onChange,r=LC(["react-colorful__hue",e.className]);return B.createElement("div",{className:r},B.createElement(zC,{onMove:function(e){n({h:360*e.left})},onKey:function(e){n({h:NC(t+360*e.left,0,360)})},"aria-label":"Hue","aria-valuenow":BC(t),"aria-valuemax":"360","aria-valuemin":"0"},B.createElement(FC,{className:"react-colorful__hue-pointer",left:t/360,color:$C({h:t,s:100,v:100,a:1})})))})),YC=B.memo((function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:$C({h:t.h,s:100,v:100,a:1})};return B.createElement("div",{className:"react-colorful__saturation",style:r},B.createElement(zC,{onMove:function(e){n({s:100*e.left,v:100-100*e.top})},onKey:function(e){n({s:NC(t.s+100*e.left,0,100),v:NC(t.v-100*e.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+BC(t.s)+"%, Brightness "+BC(t.v)+"%"},B.createElement(FC,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:$C(t)})))})),XC=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},ZC=function(e,t){return e.replace(/\s/g,"")===t.replace(/\s/g,"")};function QC(e,t,n){var r=IC(n),o=(0,B.useState)((function(){return e.toHsva(t)})),i=o[0],s=o[1],a=(0,B.useRef)({color:t,hsva:i});(0,B.useEffect)((function(){if(!e.equal(t,a.current.color)){var n=e.toHsva(t);a.current={hsva:n,color:t},s(n)}}),[t,e]),(0,B.useEffect)((function(){var t;XC(i,a.current.hsva)||e.equal(t=e.fromHsva(i),a.current.color)||(a.current={hsva:i,color:t},r(t))}),[i,e,r]);var l=(0,B.useCallback)((function(e){s((function(t){return Object.assign({},t,e)}))}),[]);return[i,l]}var JC,ek="undefined"!=typeof window?B.useLayoutEffect:B.useEffect,tk=new Map,nk=function(e){ek((function(){var t=e.current?e.current.ownerDocument:document;if(void 0!==t&&!tk.has(t)){var n=t.createElement("style");n.innerHTML='.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url(\'data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>\')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}',tk.set(t,n);var r=JC||o.nc;r&&n.setAttribute("nonce",r),t.head.appendChild(n)}}),[])},rk=function(e){var t=e.className,n=e.colorModel,r=e.color,o=void 0===r?n.defaultColor:r,i=e.onChange,s=RC(e,["className","colorModel","color","onChange"]),a=(0,B.useRef)(null);nk(a);var l=QC(n,o,i),c=l[0],u=l[1],d=LC(["react-colorful",t]);return B.createElement("div",TC({},s,{ref:a,className:d}),B.createElement(YC,{hsva:c,onChange:u}),B.createElement(qC,{hue:c.h,onChange:u,className:"react-colorful__last-control"}))},ok=function(e){var t=e.className,n=e.hsva,r=e.onChange,o={backgroundImage:"linear-gradient(90deg, "+HC(Object.assign({},n,{a:0}))+", "+HC(Object.assign({},n,{a:1}))+")"},i=LC(["react-colorful__alpha",t]),s=BC(100*n.a);return B.createElement("div",{className:i},B.createElement("div",{className:"react-colorful__alpha-gradient",style:o}),B.createElement(zC,{onMove:function(e){r({a:e.left})},onKey:function(e){r({a:NC(n.a+e.left)})},"aria-label":"Alpha","aria-valuetext":s+"%","aria-valuenow":s,"aria-valuemin":"0","aria-valuemax":"100"},B.createElement(FC,{className:"react-colorful__alpha-pointer",left:n.a,color:HC(n)})))},ik=function(e){var t=e.className,n=e.colorModel,r=e.color,o=void 0===r?n.defaultColor:r,i=e.onChange,s=RC(e,["className","colorModel","color","onChange"]),a=(0,B.useRef)(null);nk(a);var l=QC(n,o,i),c=l[0],u=l[1],d=LC(["react-colorful",t]);return B.createElement("div",TC({},s,{ref:a,className:d}),B.createElement(YC,{hsva:c,onChange:u}),B.createElement(qC,{hue:c.h,onChange:u}),B.createElement(ok,{hsva:c,onChange:u,className:"react-colorful__last-control"}))},sk={defaultColor:"rgba(0, 0, 0, 1)",toHsva:UC,fromHsva:function(e){var t=WC(e);return"rgba("+t.r+", "+t.g+", "+t.b+", "+t.a+")"},equal:ZC},ak=function(e){return B.createElement(ik,TC({},e,{colorModel:sk}))},lk={defaultColor:"rgb(0, 0, 0)",toHsva:GC,fromHsva:function(e){var t=WC(e);return"rgb("+t.r+", "+t.g+", "+t.b+")"},equal:ZC},ck=function(e){return B.createElement(rk,TC({},e,{colorModel:lk}))};const uk=({color:e,enableAlpha:t,onChange:n})=>{const r=t?ak:ck,o=(0,c.useMemo)((()=>e.toRgbString()),[e]);return(0,wt.jsx)(r,{color:o,onChange:e=>{n(Ev(e))},onPointerDown:({currentTarget:e,pointerId:t})=>{e.setPointerCapture(t)},onPointerUp:({currentTarget:e,pointerId:t})=>{e.releasePointerCapture(t)}})};Tv([Rv]);const dk=[{label:"RGB",value:"rgb"},{label:"HSL",value:"hsl"},{label:"Hex",value:"hex"}],pk=Xa(((e,t)=>{const{enableAlpha:n=!1,color:r,onChange:o,defaultValue:i="#fff",copyFormat:s,...u}=Ya(e,"ColorPicker"),[d,p]=E_({onChange:o,value:r,defaultValue:i}),f=(0,c.useMemo)((()=>Ev(d||"")),[d]),h=(0,l.useDebounce)(p),m=(0,c.useCallback)((e=>{h(e.toHex())}),[h]),[g,v]=(0,c.useState)(s||"hex");return(0,wt.jsxs)(xC,{ref:t,...u,children:[(0,wt.jsx)(uk,{onChange:m,color:f,enableAlpha:n}),(0,wt.jsxs)(gC,{children:[(0,wt.jsxs)(vC,{justify:"space-between",children:[(0,wt.jsx)(fC,{__nextHasNoMarginBottom:!0,options:dk,value:g,onChange:e=>v(e),label:(0,a.__)("Color format"),hideLabelFromVision:!0,variant:"minimal"}),(0,wt.jsx)(_C,{color:f,colorType:s||g})]}),(0,wt.jsx)(bC,{direction:"column",gap:2,children:(0,wt.jsx)(PC,{colorType:g,color:f,onChange:m,enableAlpha:n})})]})]})}),"ColorPicker"),fk=pk;function hk(e){if(void 0!==e)return"string"==typeof e?e:e.hex?e.hex:void 0}const mk=gs((e=>{const t=Ev(e),n=t.toHex(),r=t.toRgb(),o=t.toHsv(),i=t.toHsl();return{hex:n,rgb:r,hsv:o,hsl:i,source:"hex",oldHue:i.h}}));function gk(e){const{onChangeComplete:t}=e,n=(0,c.useCallback)((e=>{t(mk(e))}),[t]);return function(e){return void 0!==e.onChangeComplete||void 0!==e.disableAlpha||"string"==typeof e.color?.hex}(e)?{color:hk(e.color),enableAlpha:!e.disableAlpha,onChange:n}:{...e,color:e.color,enableAlpha:e.enableAlpha,onChange:e.onChange}}const vk=e=>(0,wt.jsx)(fk,{...gk(e)}),bk=(0,c.createContext)({}),xk=(0,wt.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wt.jsx)(n.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})});const yk=(0,c.forwardRef)((function(e,t){const{isPressed:n,...r}=e;return(0,wt.jsx)(sy,{...r,"aria-pressed":n,ref:t})}));const wk=(0,c.forwardRef)((function(e,t){const{id:n,isSelected:r,...o}=e,{setActiveId:i,activeId:s}=(0,c.useContext)(bk);return(0,c.useEffect)((()=>{r&&!s&&window.setTimeout((()=>i?.(n)),0)}),[r,i,s,n]),(0,wt.jsx)(Dn.Item,{render:(0,wt.jsx)(sy,{...o,role:"option","aria-selected":!!r,ref:t}),id:n})}));function _k(e){const{actions:t,options:n,baseId:r,className:o,loop:i=!0,children:s,...l}=e,[u,d]=(0,c.useState)(void 0),p=(0,c.useMemo)((()=>({baseId:r,activeId:u,setActiveId:d})),[r,u,d]);return(0,wt.jsx)("div",{className:o,children:(0,wt.jsxs)(bk.Provider,{value:p,children:[(0,wt.jsx)(Dn,{...l,id:r,focusLoop:i,rtl:(0,a.isRTL)(),role:"listbox",activeId:u,setActiveId:d,children:n}),s,t]})})}function Sk(e){const{actions:t,options:n,children:r,baseId:o,...i}=e,s=(0,c.useMemo)((()=>({baseId:o})),[o]);return(0,wt.jsx)("div",{...i,id:o,children:(0,wt.jsxs)(bk.Provider,{value:s,children:[n,r,t]})})}function Ck(e){const{asButtons:t,actions:n,options:r,children:o,className:i,...a}=e,c=(0,l.useInstanceId)(Ck,"components-circular-option-picker",a.id),u=t?Sk:_k,d=n?(0,wt.jsx)("div",{className:"components-circular-option-picker__custom-clear-wrapper",children:n}):void 0,p=(0,wt.jsx)("div",{className:"components-circular-option-picker__swatches",children:r});return(0,wt.jsx)(u,{...a,baseId:c,className:s("components-circular-option-picker",i),actions:d,options:p,children:o})}Ck.Option=function e({className:t,isSelected:n,selectedIconProps:r={},tooltipText:o,...i}){const{baseId:a,setActiveId:u}=(0,c.useContext)(bk),d={id:(0,l.useInstanceId)(e,a||"components-circular-option-picker__option"),className:"components-circular-option-picker__option",...i},p=void 0!==u?(0,wt.jsx)(wk,{...d,isSelected:n}):(0,wt.jsx)(yk,{...d,isPressed:n});return(0,wt.jsxs)("div",{className:s(t,"components-circular-option-picker__option-wrapper"),children:[o?(0,wt.jsx)(Yi,{text:o,children:p}):p,n&&(0,wt.jsx)(vS,{icon:xk,...r})]})},Ck.OptionGroup=function({className:e,options:t,...n}){const r="aria-label"in n||"aria-labelledby"in n?"group":void 0;return(0,wt.jsx)("div",{...n,role:r,className:s("components-circular-option-picker__option-group","components-circular-option-picker__swatches",e),children:t})},Ck.ButtonAction=function({className:e,children:t,...n}){return(0,wt.jsx)(sy,{className:s("components-circular-option-picker__clear",e),variant:"tertiary",...n,children:t})},Ck.DropdownLinkAction=function({buttonProps:e,className:t,dropdownProps:n,linkText:r}){return(0,wt.jsx)(rS,{className:s("components-circular-option-picker__dropdown-link-action",t),renderToggle:({isOpen:t,onToggle:n})=>(0,wt.jsx)(sy,{"aria-expanded":t,"aria-haspopup":"true",onClick:n,variant:"link",...e,children:r}),...n})};const kk=Ck;const jk=Xa((function(e,t){const n=function(e){const{expanded:t=!1,alignment:n="stretch",...r}=Ya(e,"VStack");return xy({direction:"column",expanded:t,alignment:n,...r})}(e);return(0,wt.jsx)(dl,{...n,ref:t})}),"VStack");const Ek=Xa((function(e,t){const n=ev(e);return(0,wt.jsx)(dl,{as:"span",...n,ref:t})}),"Truncate");const Pk=Xa((function(e,t){const n=function(e){const{as:t,level:n=2,color:r=jl.gray[900],isBlock:o=!0,weight:i=Tl.fontWeightHeading,...s}=Ya(e,"Heading"),a=t||`h${n}`,l={};return"string"==typeof a&&"h"!==a[0]&&(l.role="heading",l["aria-level"]="string"==typeof n?parseInt(n):n),{...Yv({color:r,isBlock:o,weight:i,size:Kv(n),...s}),...l,as:a}}(e);return(0,wt.jsx)(dl,{...n,ref:t})}),"Heading"),Tk=Pk;const Rk=cl(Tk,{target:"ev9wop70"})({name:"13lxv2o",styles:"text-transform:uppercase;line-height:24px;font-weight:500;&&&{font-size:11px;margin-bottom:0;}"}),Ik=({paddingSize:e="small"})=>{if("none"===e)return;const t={small:wl(2),medium:wl(4)};return bl("padding:",t[e]||t.small,";","")},Nk=cl("div",{target:"eovvns30"})("margin-left:",wl(-2),";margin-right:",wl(-2),";&:first-of-type{margin-top:",wl(-2),";}&:last-of-type{margin-bottom:",wl(-2),";}",Ik,";");const Mk=Xa((function(e,t){const{paddingSize:n="small",...r}=Ya(e,"DropdownContentWrapper");return(0,wt.jsx)(Nk,{...r,paddingSize:n,ref:t})}),"DropdownContentWrapper");Tv([Rv,tS]);const Ak=e=>{const t=/var\(/.test(null!=e?e:""),n=/color-mix\(/.test(null!=e?e:"");return!t&&!n},Dk=e=>e.length>0&&e.every((e=>{return t=e,Array.isArray(t.colors)&&!("color"in t);var t}));function Ok({className:e,clearColor:t,colors:n,onChange:r,value:o,...i}){const s=(0,c.useMemo)((()=>n.map((({color:e,name:n},i)=>{const s=Ev(e),l=o===e;return(0,wt.jsx)(kk.Option,{isSelected:l,selectedIconProps:l?{fill:s.contrast()>s.contrast("#000")?"#fff":"#000"}:{},tooltipText:n||(0,a.sprintf)((0,a.__)("Color code: %s"),e),style:{backgroundColor:e,color:e},onClick:l?t:()=>r(e,i),"aria-label":n?(0,a.sprintf)((0,a.__)("Color: %s"),n):(0,a.sprintf)((0,a.__)("Color code: %s"),e)},`${e}-${i}`)}))),[n,o,r,t]);return(0,wt.jsx)(kk.OptionGroup,{className:e,options:s,...i})}function zk({className:e,clearColor:t,colors:n,onChange:r,value:o,headingLevel:i}){const s=(0,l.useInstanceId)(zk,"color-palette");return 0===n.length?null:(0,wt.jsx)(jk,{spacing:3,className:e,children:n.map((({name:e,colors:n},a)=>{const l=`${s}-${a}`;return(0,wt.jsxs)(jk,{spacing:2,children:[(0,wt.jsx)(Rk,{id:l,level:i,children:e}),(0,wt.jsx)(Ok,{clearColor:t,colors:n,onChange:e=>r(e,a),value:o,"aria-labelledby":l})]},a)}))})}function Lk({isRenderedInSidebar:e,popoverProps:t,...n}){const r=(0,c.useMemo)((()=>({shift:!0,resize:!1,...e?{placement:"left-start",offset:34}:{placement:"bottom",offset:8},...t})),[e,t]);return(0,wt.jsx)(rS,{contentClassName:"components-color-palette__custom-color-dropdown-content",popoverProps:r,...n})}Tv([Rv,tS]);const Fk=(0,c.forwardRef)((function(e,t){const{asButtons:n,loop:r,clearable:o=!0,colors:i=[],disableCustomColors:l=!1,enableAlpha:u=!1,onChange:d,value:p,__experimentalIsRenderedInSidebar:f=!1,headingLevel:h=2,"aria-label":m,"aria-labelledby":g,...v}=e,[b,x]=(0,c.useState)(p),y=(0,c.useCallback)((()=>d(void 0)),[d]),w=(0,c.useCallback)((e=>{x(((e,t)=>{if(!e||!t||Ak(e))return e;const{ownerDocument:n}=t,{defaultView:r}=n,o=r?.getComputedStyle(t).backgroundColor;return o?Ev(o).toHex():e})(p,e))}),[p]),_=Dk(i),S=(0,c.useMemo)((()=>((e,t=[],n=!1)=>{if(!e)return"";const r=!!e&&Ak(e),o=r?Ev(e).toHex():e,i=n?t:[{colors:t}];for(const{colors:e}of i)for(const{name:t,color:n}of e)if(o===(r?Ev(n).toHex():n))return t;return(0,a.__)("Custom")})(p,i,_)),[p,i,_]),C=p?.startsWith("#"),k=p?.replace(/^var\((.+)\)$/,"$1"),j=k?(0,a.sprintf)((0,a.__)('Custom color picker. The currently selected color is called "%1$s" and has a value of "%2$s".'),S,k):(0,a.__)("Custom color picker."),E={clearColor:y,onChange:d,value:p},P=!!o&&(0,wt.jsx)(kk.ButtonAction,{onClick:y,children:(0,a.__)("Clear")});let T;if(n)T={asButtons:!0};else{const e={asButtons:!1,loop:r};T=m?{...e,"aria-label":m}:g?{...e,"aria-labelledby":g}:{...e,"aria-label":(0,a.__)("Custom color picker.")}}return(0,wt.jsxs)(jk,{spacing:3,ref:t,...v,children:[!l&&(0,wt.jsx)(Lk,{isRenderedInSidebar:f,renderContent:()=>(0,wt.jsx)(Mk,{paddingSize:"none",children:(0,wt.jsx)(vk,{color:b,onChange:e=>d(e),enableAlpha:u})}),renderToggle:({isOpen:e,onToggle:t})=>(0,wt.jsxs)(jk,{className:"components-color-palette__custom-color-wrapper",spacing:0,children:[(0,wt.jsx)("button",{ref:w,className:"components-color-palette__custom-color-button","aria-expanded":e,"aria-haspopup":"true",onClick:t,"aria-label":j,style:{background:p},type:"button"}),(0,wt.jsxs)(jk,{className:"components-color-palette__custom-color-text-wrapper",spacing:.5,children:[(0,wt.jsx)(Ek,{className:"components-color-palette__custom-color-name",children:p?S:(0,a.__)("No color selected")}),(0,wt.jsx)(Ek,{className:s("components-color-palette__custom-color-value",{"components-color-palette__custom-color-value--is-hex":C}),children:k})]})]})}),(i.length>0||P)&&(0,wt.jsx)(kk,{...T,actions:P,options:_?(0,wt.jsx)(zk,{...E,headingLevel:h,colors:i,value:p}):(0,wt.jsx)(Ok,{...E,colors:i,value:p})})]})})),Bk=Fk,Vk=cl(Sy,{target:"e1bagdl32"})("&&&{input{display:block;width:100%;}",tb,"{transition:box-shadow 0.1s linear;}}"),$k=({selectSize:e})=>({small:bl("box-sizing:border-box;padding:2px 1px;width:20px;font-size:8px;line-height:1;letter-spacing:-0.5px;text-transform:uppercase;text-align-last:center;&:not( :disabled ){color:",jl.gray[800],";}",""),default:bl("box-sizing:border-box;min-width:24px;max-width:48px;height:24px;margin-inline-end:",wl(2),";padding:",wl(1),";font-size:13px;line-height:1;text-align-last:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;field-sizing:content;&:not( :disabled ){color:",jl.theme.accent,";}","")}[e]),Hk=cl("div",{target:"e1bagdl31"})("&&&{pointer-events:none;",$k,";color:",jl.gray[900],";}"),Wk=({selectSize:e="default"})=>({small:bl("height:100%;border:1px solid transparent;transition:box-shadow 0.1s linear,border 0.1s linear;",Bg({borderTopLeftRadius:0,borderBottomLeftRadius:0})()," &:not(:disabled):hover{background-color:",jl.gray[100],";}&:focus{border:1px solid ",jl.ui.borderFocus,";box-shadow:inset 0 0 0 ",Tl.borderWidth+" "+jl.ui.borderFocus,";outline-offset:0;outline:2px solid transparent;z-index:1;}",""),default:bl("display:flex;justify-content:center;align-items:center;&:where( :not( :disabled ) ):hover{box-shadow:0 0 0 ",Tl.borderWidth+" "+jl.ui.borderFocus,";outline:",Tl.borderWidth," solid transparent;}&:focus{box-shadow:0 0 0 ",Tl.borderWidthFocus+" "+jl.ui.borderFocus,";outline:",Tl.borderWidthFocus," solid transparent;}","")}[e]),Uk=cl("select",{target:"e1bagdl30"})("&&&{appearance:none;background:transparent;border-radius:",Tl.radiusXSmall,";border:none;display:block;outline:none;margin:0;min-height:auto;font-family:inherit;",$k,";",Wk,";&:not( :disabled ){cursor:pointer;}}"),Gk=bl("box-shadow:inset ",Tl.controlBoxShadowFocus,";",""),Kk=bl("border:0;padding:0;margin:0;",Bx,";",""),qk=bl(Vk,"{flex:0 0 auto;}",""),Yk=bl("background:#fff;&&>button{aspect-ratio:1;padding:0;display:flex;align-items:center;justify-content:center;",Bg({borderRadius:"2px 0 0 2px"},{borderRadius:"0 2px 2px 0"})()," border:",Tl.borderWidth," solid ",jl.ui.border,";&:focus,&:hover:not( :disabled ){",Gk," border-color:",jl.ui.borderFocus,";z-index:1;position:relative;}}",""),Xk=(e,t)=>{const{style:n}=e||{};return bl("border-radius:",Tl.radiusFull,";border:2px solid transparent;",n?(e=>{const{color:t,style:n}=e||{},r=n&&"none"!==n?jl.gray[300]:void 0;return bl("border-style:","none"===n?"solid":n,";border-color:",t||r,";","")})(e):void 0," width:","__unstable-large"===t?"24px":"22px",";height:","__unstable-large"===t?"24px":"22px",";padding:","__unstable-large"===t?"2px":"1px",";&>span{height:",wl(4),";width:",wl(4),";background:linear-gradient(\n\t\t\t\t-45deg,\n\t\t\t\ttransparent 48%,\n\t\t\t\trgb( 0 0 0 / 20% ) 48%,\n\t\t\t\trgb( 0 0 0 / 20% ) 52%,\n\t\t\t\ttransparent 52%\n\t\t\t);}","")},Zk=bl("width:",228,"px;>div:first-of-type>",Ux,"{margin-bottom:0;}&& ",Ux,"+button:not( .has-text ){min-width:24px;padding:0;}",""),Qk=bl("",""),Jk=bl("",""),ej=bl("justify-content:center;width:100%;&&{border-top:",Tl.borderWidth," solid ",jl.gray[400],";border-top-left-radius:0;border-top-right-radius:0;height:40px;}",""),tj="web"===c.Platform.OS,nj={px:{value:"px",label:tj?"px":(0,a.__)("Pixels (px)"),a11yLabel:(0,a.__)("Pixels (px)"),step:1},"%":{value:"%",label:tj?"%":(0,a.__)("Percentage (%)"),a11yLabel:(0,a.__)("Percent (%)"),step:.1},em:{value:"em",label:tj?"em":(0,a.__)("Relative to parent font size (em)"),a11yLabel:(0,a._x)("ems","Relative to parent font size (em)"),step:.01},rem:{value:"rem",label:tj?"rem":(0,a.__)("Relative to root font size (rem)"),a11yLabel:(0,a._x)("rems","Relative to root font size (rem)"),step:.01},vw:{value:"vw",label:tj?"vw":(0,a.__)("Viewport width (vw)"),a11yLabel:(0,a.__)("Viewport width (vw)"),step:.1},vh:{value:"vh",label:tj?"vh":(0,a.__)("Viewport height (vh)"),a11yLabel:(0,a.__)("Viewport height (vh)"),step:.1},vmin:{value:"vmin",label:tj?"vmin":(0,a.__)("Viewport smallest dimension (vmin)"),a11yLabel:(0,a.__)("Viewport smallest dimension (vmin)"),step:.1},vmax:{value:"vmax",label:tj?"vmax":(0,a.__)("Viewport largest dimension (vmax)"),a11yLabel:(0,a.__)("Viewport largest dimension (vmax)"),step:.1},ch:{value:"ch",label:tj?"ch":(0,a.__)("Width of the zero (0) character (ch)"),a11yLabel:(0,a.__)("Width of the zero (0) character (ch)"),step:.01},ex:{value:"ex",label:tj?"ex":(0,a.__)("x-height of the font (ex)"),a11yLabel:(0,a.__)("x-height of the font (ex)"),step:.01},cm:{value:"cm",label:tj?"cm":(0,a.__)("Centimeters (cm)"),a11yLabel:(0,a.__)("Centimeters (cm)"),step:.001},mm:{value:"mm",label:tj?"mm":(0,a.__)("Millimeters (mm)"),a11yLabel:(0,a.__)("Millimeters (mm)"),step:.1},in:{value:"in",label:tj?"in":(0,a.__)("Inches (in)"),a11yLabel:(0,a.__)("Inches (in)"),step:.001},pc:{value:"pc",label:tj?"pc":(0,a.__)("Picas (pc)"),a11yLabel:(0,a.__)("Picas (pc)"),step:1},pt:{value:"pt",label:tj?"pt":(0,a.__)("Points (pt)"),a11yLabel:(0,a.__)("Points (pt)"),step:1},svw:{value:"svw",label:tj?"svw":(0,a.__)("Small viewport width (svw)"),a11yLabel:(0,a.__)("Small viewport width (svw)"),step:.1},svh:{value:"svh",label:tj?"svh":(0,a.__)("Small viewport height (svh)"),a11yLabel:(0,a.__)("Small viewport height (svh)"),step:.1},svi:{value:"svi",label:tj?"svi":(0,a.__)("Viewport smallest size in the inline direction (svi)"),a11yLabel:(0,a.__)("Small viewport width or height (svi)"),step:.1},svb:{value:"svb",label:tj?"svb":(0,a.__)("Viewport smallest size in the block direction (svb)"),a11yLabel:(0,a.__)("Small viewport width or height (svb)"),step:.1},svmin:{value:"svmin",label:tj?"svmin":(0,a.__)("Small viewport smallest dimension (svmin)"),a11yLabel:(0,a.__)("Small viewport smallest dimension (svmin)"),step:.1},lvw:{value:"lvw",label:tj?"lvw":(0,a.__)("Large viewport width (lvw)"),a11yLabel:(0,a.__)("Large viewport width (lvw)"),step:.1},lvh:{value:"lvh",label:tj?"lvh":(0,a.__)("Large viewport height (lvh)"),a11yLabel:(0,a.__)("Large viewport height (lvh)"),step:.1},lvi:{value:"lvi",label:tj?"lvi":(0,a.__)("Large viewport width or height (lvi)"),a11yLabel:(0,a.__)("Large viewport width or height (lvi)"),step:.1},lvb:{value:"lvb",label:tj?"lvb":(0,a.__)("Large viewport width or height (lvb)"),a11yLabel:(0,a.__)("Large viewport width or height (lvb)"),step:.1},lvmin:{value:"lvmin",label:tj?"lvmin":(0,a.__)("Large viewport smallest dimension (lvmin)"),a11yLabel:(0,a.__)("Large viewport smallest dimension (lvmin)"),step:.1},dvw:{value:"dvw",label:tj?"dvw":(0,a.__)("Dynamic viewport width (dvw)"),a11yLabel:(0,a.__)("Dynamic viewport width (dvw)"),step:.1},dvh:{value:"dvh",label:tj?"dvh":(0,a.__)("Dynamic viewport height (dvh)"),a11yLabel:(0,a.__)("Dynamic viewport height (dvh)"),step:.1},dvi:{value:"dvi",label:tj?"dvi":(0,a.__)("Dynamic viewport width or height (dvi)"),a11yLabel:(0,a.__)("Dynamic viewport width or height (dvi)"),step:.1},dvb:{value:"dvb",label:tj?"dvb":(0,a.__)("Dynamic viewport width or height (dvb)"),a11yLabel:(0,a.__)("Dynamic viewport width or height (dvb)"),step:.1},dvmin:{value:"dvmin",label:tj?"dvmin":(0,a.__)("Dynamic viewport smallest dimension (dvmin)"),a11yLabel:(0,a.__)("Dynamic viewport smallest dimension (dvmin)"),step:.1},dvmax:{value:"dvmax",label:tj?"dvmax":(0,a.__)("Dynamic viewport largest dimension (dvmax)"),a11yLabel:(0,a.__)("Dynamic viewport largest dimension (dvmax)"),step:.1},svmax:{value:"svmax",label:tj?"svmax":(0,a.__)("Small viewport largest dimension (svmax)"),a11yLabel:(0,a.__)("Small viewport largest dimension (svmax)"),step:.1},lvmax:{value:"lvmax",label:tj?"lvmax":(0,a.__)("Large viewport largest dimension (lvmax)"),a11yLabel:(0,a.__)("Large viewport largest dimension (lvmax)"),step:.1}},rj=Object.values(nj),oj=[nj.px,nj["%"],nj.em,nj.rem,nj.vw,nj.vh],ij=nj.px;function sj(e,t,n){return lj(t?`${null!=e?e:""}${t}`:e,n)}function aj(e){return Array.isArray(e)&&!!e.length}function lj(e,t=rj){let n,r;if(void 0!==e||null===e){n=`${e}`.trim();const t=parseFloat(n);r=isFinite(t)?t:void 0}const o=n?.match(/[\d.\-\+]*\s*(.*)/),i=o?.[1]?.toLowerCase();let s;if(aj(t)){const e=t.find((e=>e.value===i));s=e?.value}else s=ij.value;return[r,s]}const cj=({units:e=rj,availableUnits:t=[],defaultValues:n})=>{const r=function(e=[],t){return Array.isArray(t)?t.filter((t=>e.includes(t.value))):[]}(t,e);return n&&r.forEach(((e,t)=>{if(n[e.value]){const[o]=lj(n[e.value]);r[t].default=o}})),r};const uj=e=>e.replace(/^var\((.+)\)$/,"$1"),dj=Xa(((e,t)=>{const{__experimentalIsRenderedInSidebar:n,border:r,colors:o,disableCustomColors:i,enableAlpha:s,enableStyle:l,indicatorClassName:u,indicatorWrapperClassName:d,isStyleSettable:p,onReset:f,onColorChange:h,onStyleChange:m,popoverContentClassName:g,popoverControlsClassName:v,resetButtonClassName:b,showDropdownHeader:x,size:y,__unstablePopoverProps:w,..._}=function(e){const{border:t,className:n,colors:r=[],enableAlpha:o=!1,enableStyle:i=!0,onChange:s,previousStyleSelection:a,size:l="default",__experimentalIsRenderedInSidebar:u=!1,...d}=Ya(e,"BorderControlDropdown"),[p]=lj(t?.width),f=0===p,h=qa(),m=(0,c.useMemo)((()=>h(Yk,n)),[n,h]),g=(0,c.useMemo)((()=>h(Jk)),[h]),v=(0,c.useMemo)((()=>h(Xk(t,l))),[t,h,l]),b=(0,c.useMemo)((()=>h(Zk)),[h]),x=(0,c.useMemo)((()=>h(Qk)),[h]),y=(0,c.useMemo)((()=>h(ej)),[h]);return{...d,border:t,className:m,colors:r,enableAlpha:o,enableStyle:i,indicatorClassName:g,indicatorWrapperClassName:v,onColorChange:e=>{s({color:e,style:"none"===t?.style?a:t?.style,width:f&&e?"1px":t?.width})},onStyleChange:e=>{const n=f&&e?"1px":t?.width;s({...t,style:e,width:n})},onReset:()=>{s({...t,color:void 0,style:void 0})},popoverContentClassName:x,popoverControlsClassName:b,resetButtonClassName:y,size:l,__experimentalIsRenderedInSidebar:u}}(e),{color:S,style:C}=r||{},k=((e,t)=>{if(e&&t){if(Dk(t)){let n;return t.some((t=>t.colors.some((t=>t.color===e&&(n=t,!0))))),n}return t.find((t=>t.color===e))}})(S,o),j=((e,t,n,r)=>{if(r){if(t){const e=uj(t.color);return n?(0,a.sprintf)((0,a.__)('Border color and style picker. The currently selected color is called "%1$s" and has a value of "%2$s". The currently selected style is "%3$s".'),t.name,e,n):(0,a.sprintf)((0,a.__)('Border color and style picker. The currently selected color is called "%1$s" and has a value of "%2$s".'),t.name,e)}if(e){const t=uj(e);return n?(0,a.sprintf)((0,a.__)('Border color and style picker. The currently selected color has a value of "%1$s". The currently selected style is "%2$s".'),t,n):(0,a.sprintf)((0,a.__)('Border color and style picker. The currently selected color has a value of "%s".'),t)}return(0,a.__)("Border color and style picker.")}return t?(0,a.sprintf)((0,a.__)('Border color picker. The currently selected color is called "%1$s" and has a value of "%2$s".'),t.name,uj(t.color)):e?(0,a.sprintf)((0,a.__)('Border color picker. The currently selected color has a value of "%s".'),uj(e)):(0,a.__)("Border color picker.")})(S,k,C,l),E=S||C&&"none"!==C,P=n?"bottom left":void 0;return(0,wt.jsx)(rS,{renderToggle:({onToggle:e})=>(0,wt.jsx)(sy,{onClick:e,variant:"tertiary","aria-label":j,tooltipPosition:P,label:(0,a.__)("Border color and style picker"),showTooltip:!0,__next40pxDefaultSize:"__unstable-large"===y,children:(0,wt.jsx)("span",{className:d,children:(0,wt.jsx)(Q_,{className:u,colorValue:S})})}),renderContent:({onClose:e})=>(0,wt.jsxs)(wt.Fragment,{children:[(0,wt.jsx)(Mk,{paddingSize:"medium",children:(0,wt.jsxs)(jk,{className:v,spacing:6,children:[x?(0,wt.jsxs)(yy,{children:[(0,wt.jsx)(Ux,{children:(0,a.__)("Border color")}),(0,wt.jsx)(sy,{size:"small",label:(0,a.__)("Close border color"),icon:e_,onClick:e})]}):void 0,(0,wt.jsx)(Bk,{className:g,value:S,onChange:h,colors:o,disableCustomColors:i,__experimentalIsRenderedInSidebar:n,clearable:!1,enableAlpha:s}),l&&p&&(0,wt.jsx)(Z_,{label:(0,a.__)("Style"),value:C,onChange:m})]})}),E&&(0,wt.jsx)(Mk,{paddingSize:"none",children:(0,wt.jsx)(sy,{className:b,variant:"tertiary",onClick:()=>{f(),e()},children:(0,a.__)("Reset")})})]}),popoverProps:{...w},..._,ref:t})}),"BorderControlDropdown"),pj=dj;const fj=(0,c.forwardRef)((function({className:e,isUnitSelectTabbable:t=!0,onChange:n,size:r="default",unit:o="px",units:i=oj,...a},l){if(!aj(i)||1===i?.length)return(0,wt.jsx)(Hk,{className:"components-unit-control__unit-label",selectSize:r,children:o});const c=s("components-unit-control__select",e);return(0,wt.jsx)(Uk,{ref:l,className:c,onChange:e=>{const{value:t}=e.target,r=i.find((e=>e.value===t));n?.(t,{event:e,data:r})},selectSize:r,tabIndex:t?void 0:-1,value:o,...a,children:i.map((e=>(0,wt.jsx)("option",{value:e.value,children:e.label},e.value)))})}));const hj=(0,c.forwardRef)((function(e,t){const{__unstableStateReducer:n,autoComplete:r="off",children:o,className:i,disabled:l=!1,disableUnits:u=!1,isPressEnterToChange:d=!1,isResetValueOnUnitChange:p=!1,isUnitSelectTabbable:f=!0,label:h,onChange:m,onUnitChange:g,size:v="default",unit:b,units:x=oj,value:y,onFocus:w,..._}=_b(e);"unit"in e&&Fi()("UnitControl unit prop",{since:"5.6",hint:"The unit should be provided within the `value` prop.",version:"6.2"});const S=null!=y?y:void 0,[C,k]=(0,c.useMemo)((()=>{const e=function(e,t,n=rj){const r=Array.isArray(n)?[...n]:[],[,o]=sj(e,t,rj);return o&&!r.some((e=>e.value===o))&&nj[o]&&r.unshift(nj[o]),r}(S,b,x),[{value:t=""}={},...n]=e,r=n.reduce(((e,{value:t})=>{const n=Ly(t?.substring(0,1)||"");return e.includes(n)?e:`${e}|${n}`}),Ly(t.substring(0,1)));return[e,new RegExp(`^(?:${r})$`,"i")]}),[S,b,x]),[j,E]=sj(S,b,C),[P,T]=CS(1===C.length?C[0].value:b,{initial:E,fallback:""});(0,c.useEffect)((()=>{void 0!==E&&T(E)}),[E,T]);const R=s("components-unit-control","components-unit-control-wrapper",i);let I;!u&&f&&C.length&&(I=e=>{_.onKeyDown?.(e),e.metaKey||e.ctrlKey||!k.test(e.key)||N.current?.focus()});const N=(0,c.useRef)(null),M=u?null:(0,wt.jsx)(fj,{ref:N,"aria-label":(0,a.__)("Select unit"),disabled:l,isUnitSelectTabbable:f,onChange:(e,t)=>{const{data:n}=t;let r=`${null!=j?j:""}${e}`;p&&void 0!==n?.default&&(r=`${n.default}${e}`),m?.(r,t),g?.(e,t),T(e)},size:["small","compact"].includes(v)||"default"===v&&!_.__next40pxDefaultSize?"small":"default",unit:P,units:C,onFocus:w,onBlur:e.onBlur});let A=_.step;if(!A&&C){var D;const e=C.find((e=>e.value===P));A=null!==(D=e?.step)&&void 0!==D?D:1}return(0,wt.jsx)(Vk,{..._,autoComplete:r,className:R,disabled:l,spinControls:"none",isPressEnterToChange:d,label:h,onKeyDown:I,onChange:(e,t)=>{if(""===e||null==e)return void m?.("",t);const n=function(e,t,n,r){const[o,i]=lj(e,t),s=null!=o?o:n;let a=i||r;return!a&&aj(t)&&(a=t[0].value),[s,a]}(e,C,j,P).join("");m?.(n,t)},ref:t,size:v,suffix:M,type:d?"text":"number",value:null!=j?j:"",step:A,onFocus:w,__unstableStateReducer:n})})),mj=hj,gj=e=>void 0!==e?.width&&""!==e.width||void 0!==e?.color;function vj(e){const{className:t,colors:n=[],isCompact:r,onChange:o,enableAlpha:i=!0,enableStyle:s=!0,shouldSanitizeBorder:a=!0,size:l="default",value:u,width:d,__experimentalIsRenderedInSidebar:p=!1,__next40pxDefaultSize:f,...h}=Ya(e,"BorderControl"),m="default"===l&&f?"__unstable-large":l,[g,v]=lj(u?.width),b=v||"px",x=0===g,[y,w]=(0,c.useState)(),[_,S]=(0,c.useState)(),C=!a||gj(u),k=(0,c.useCallback)((e=>{!a||gj(e)?o(e):o(void 0)}),[o,a]),j=(0,c.useCallback)((e=>{const t=""===e?void 0:e,[n]=lj(e),r=0===n,o={...u,width:t};r&&!x&&(w(u?.color),S(u?.style),o.color=void 0,o.style="none"),!r&&x&&(void 0===o.color&&(o.color=y),"none"===o.style&&(o.style=_)),k(o)}),[u,x,y,_,k]),E=(0,c.useCallback)((e=>{j(`${e}${b}`)}),[j,b]),P=qa(),T=(0,c.useMemo)((()=>P(Kk,t)),[t,P]);let R=d;r&&(R="__unstable-large"===l?"116px":"90px");const I=(0,c.useMemo)((()=>{const e=!!R&&qk,t=(e=>bl("height:","__unstable-large"===e?"40px":"30px",";",""))(m);return P(bl(Vk,"{flex:1 1 40%;}&& ",Uk,"{min-height:0;}",""),e,t)}),[R,P,m]),N=(0,c.useMemo)((()=>P(bl("flex:1 1 60%;",Bg({marginRight:wl(3)})(),";",""))),[P]);return{...h,className:T,colors:n,enableAlpha:i,enableStyle:s,innerWrapperClassName:I,inputWidth:R,isStyleSettable:C,onBorderChange:k,onSliderChange:E,onWidthChange:j,previousStyleSelection:_,sliderClassName:N,value:u,widthUnit:b,widthValue:g,size:m,__experimentalIsRenderedInSidebar:p,__next40pxDefaultSize:f}}const bj=e=>{const{label:t,hideLabelFromVision:n}=e;return t?n?(0,wt.jsx)(pl,{as:"legend",children:t}):(0,wt.jsx)(Ux,{as:"legend",children:t}):null},xj=Xa(((e,t)=>{const{__next40pxDefaultSize:n=!1,colors:r,disableCustomColors:o,disableUnits:i,enableAlpha:s,enableStyle:l,hideLabelFromVision:c,innerWrapperClassName:u,inputWidth:d,isStyleSettable:p,label:f,onBorderChange:h,onSliderChange:m,onWidthChange:g,placeholder:v,__unstablePopoverProps:b,previousStyleSelection:x,showDropdownHeader:y,size:w,sliderClassName:_,value:S,widthUnit:C,widthValue:k,withSlider:j,__experimentalIsRenderedInSidebar:E,...P}=vj(e);return(0,wt.jsxs)(dl,{as:"fieldset",...P,ref:t,children:[(0,wt.jsx)(bj,{label:f,hideLabelFromVision:c}),(0,wt.jsxs)(yy,{spacing:4,className:u,children:[(0,wt.jsx)(mj,{prefix:(0,wt.jsx)(Hg,{marginRight:1,marginBottom:0,children:(0,wt.jsx)(pj,{border:S,colors:r,__unstablePopoverProps:b,disableCustomColors:o,enableAlpha:s,enableStyle:l,isStyleSettable:p,onChange:h,previousStyleSelection:x,showDropdownHeader:y,__experimentalIsRenderedInSidebar:E,size:w})}),label:(0,a.__)("Border width"),hideLabelFromVision:!0,min:0,onChange:g,value:S?.width||"",placeholder:v,disableUnits:i,__unstableInputWidth:d,size:w}),j&&(0,wt.jsx)(dC,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Border width"),hideLabelFromVision:!0,className:_,initialPosition:0,max:100,min:0,onChange:m,step:["px","%"].includes(C)?1:.1,value:k||void 0,withInputField:!1,__next40pxDefaultSize:n})]})]})}),"BorderControl"),yj=xj,wj={bottom:{alignItems:"flex-end",justifyContent:"center"},bottomLeft:{alignItems:"flex-start",justifyContent:"flex-end"},bottomRight:{alignItems:"flex-end",justifyContent:"flex-end"},center:{alignItems:"center",justifyContent:"center"},spaced:{alignItems:"center",justifyContent:"space-between"},left:{alignItems:"center",justifyContent:"flex-start"},right:{alignItems:"center",justifyContent:"flex-end"},stretch:{alignItems:"stretch"},top:{alignItems:"flex-start",justifyContent:"center"},topLeft:{alignItems:"flex-start",justifyContent:"flex-start"},topRight:{alignItems:"flex-start",justifyContent:"flex-end"}};function _j(e){const{align:t,alignment:n,className:r,columnGap:o,columns:i=2,gap:s=3,isInline:a=!1,justify:l,rowGap:u,rows:d,templateColumns:p,templateRows:f,...h}=Ya(e,"Grid"),m=_g(Array.isArray(i)?i:[i]),g=_g(Array.isArray(d)?d:[d]),v=p||!!i&&`repeat( ${m}, 1fr )`,b=f||!!d&&`repeat( ${g}, 1fr )`,x=qa();return{...h,className:(0,c.useMemo)((()=>{const e=function(e){return e?wj[e]:{}}(n),i=bl({alignItems:t,display:a?"inline-grid":"grid",gap:`calc( ${Tl.gridBase} * ${s} )`,gridTemplateColumns:v||void 0,gridTemplateRows:b||void 0,gridRowGap:u,gridColumnGap:o,justifyContent:l,verticalAlign:a?"middle":void 0,...e},"","");return x(i,r)}),[t,n,r,o,x,s,v,b,a,l,u])}}const Sj=Xa((function(e,t){const n=_j(e);return(0,wt.jsx)(dl,{...n,ref:t})}),"Grid");function Cj(e){const{className:t,colors:n=[],enableAlpha:r=!1,enableStyle:o=!0,size:i="default",__experimentalIsRenderedInSidebar:s=!1,...a}=Ya(e,"BorderBoxControlSplitControls"),l=qa(),u=(0,c.useMemo)((()=>l((e=>bl("position:relative;flex:1;width:","__unstable-large"===e?void 0:"80%",";",""))(i),t)),[l,t,i]);return{...a,centeredClassName:(0,c.useMemo)((()=>l(Yw,t)),[l,t]),className:u,colors:n,enableAlpha:r,enableStyle:o,rightAlignedClassName:(0,c.useMemo)((()=>l(bl(Bg({marginLeft:"auto"})(),";",""),t)),[l,t]),size:i,__experimentalIsRenderedInSidebar:s}}const kj=Xa(((e,t)=>{const{centeredClassName:n,colors:r,disableCustomColors:o,enableAlpha:i,enableStyle:s,onChange:u,popoverPlacement:d,popoverOffset:p,rightAlignedClassName:f,size:h="default",value:m,__experimentalIsRenderedInSidebar:g,...v}=Cj(e),[b,x]=(0,c.useState)(null),y=(0,c.useMemo)((()=>d?{placement:d,offset:p,anchor:b,shift:!0}:void 0),[d,p,b]),w={colors:r,disableCustomColors:o,enableAlpha:i,enableStyle:s,isCompact:!0,__experimentalIsRenderedInSidebar:g,size:h},_=(0,l.useMergeRefs)([x,t]);return(0,wt.jsxs)(Sj,{...v,ref:_,gap:4,children:[(0,wt.jsx)(Jw,{value:m,size:h}),(0,wt.jsx)(yj,{className:n,hideLabelFromVision:!0,label:(0,a.__)("Top border"),onChange:e=>u(e,"top"),__unstablePopoverProps:y,value:m?.top,...w}),(0,wt.jsx)(yj,{hideLabelFromVision:!0,label:(0,a.__)("Left border"),onChange:e=>u(e,"left"),__unstablePopoverProps:y,value:m?.left,...w}),(0,wt.jsx)(yj,{className:f,hideLabelFromVision:!0,label:(0,a.__)("Right border"),onChange:e=>u(e,"right"),__unstablePopoverProps:y,value:m?.right,...w}),(0,wt.jsx)(yj,{className:n,hideLabelFromVision:!0,label:(0,a.__)("Bottom border"),onChange:e=>u(e,"bottom"),__unstablePopoverProps:y,value:m?.bottom,...w})]})}),"BorderBoxControlSplitControls"),jj=kj,Ej=/^([\d.\-+]*)\s*(fr|cm|mm|Q|in|pc|pt|px|em|ex|ch|rem|lh|vw|vh|vmin|vmax|%|cap|ic|rlh|vi|vb|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx|svw|lvw|dvw|svh|lvh|dvh|svi|lvi|dvi|svb|lvb|dvb|svmin|lvmin|dvmin|svmax|lvmax|dvmax)?$/;const Pj=["top","right","bottom","left"],Tj=["color","style","width"],Rj=e=>!e||!Tj.some((t=>void 0!==e[t])),Ij=e=>{if(!e)return!1;if(Nj(e)){return!Pj.every((t=>Rj(e[t])))}return!Rj(e)},Nj=(e={})=>Object.keys(e).some((e=>-1!==Pj.indexOf(e))),Mj=e=>{if(!Nj(e))return!1;const t=Pj.map((t=>Aj(e?.[t])));return!t.every((e=>e===t[0]))},Aj=(e,t)=>{if(Rj(e))return t;const{color:n,style:r,width:o}=t||{},{color:i=n,style:s=r,width:a=o}=e;return[a,!!a&&"0"!==a||!!i?s||"solid":s,i].filter(Boolean).join(" ")},Dj=e=>function(e){if(0===e.length)return;const t={};let n,r=0;return e.forEach((e=>{t[e]=void 0===t[e]?1:t[e]+1,t[e]>r&&(n=e,r=t[e])})),n}(e.map((e=>void 0===e?void 0:function(e){const t=e.trim().match(Ej);if(!t)return[void 0,void 0];const[,n,r]=t;let o=parseFloat(n);return o=Number.isNaN(o)?void 0:o,[o,r]}(`${e}`)[1])).filter((e=>void 0!==e)));function Oj(e){const{className:t,colors:n=[],onChange:r,enableAlpha:o=!1,enableStyle:i=!0,size:s="default",value:a,__experimentalIsRenderedInSidebar:l=!1,__next40pxDefaultSize:u,...d}=Ya(e,"BorderBoxControl"),p="default"===s&&u?"__unstable-large":s,f=Mj(a),h=Nj(a),m=h?(e=>{if(!e)return;const t=[],n=[],r=[];Pj.forEach((o=>{t.push(e[o]?.color),n.push(e[o]?.style),r.push(e[o]?.width)}));const o=t.every((e=>e===t[0])),i=n.every((e=>e===n[0])),s=r.every((e=>e===r[0]));return{color:o?t[0]:void 0,style:i?n[0]:void 0,width:s?r[0]:Dj(r)}})(a):a,g=h?a:(e=>{if(e&&!Rj(e))return{top:e,right:e,bottom:e,left:e}})(a),v=!isNaN(parseFloat(`${m?.width}`)),[b,x]=(0,c.useState)(!f),y=qa(),w=(0,c.useMemo)((()=>y(Gw,t)),[y,t]),_=(0,c.useMemo)((()=>y(bl("flex:1;",Bg({marginRight:"24px"})(),";",""))),[y]),S=(0,c.useMemo)((()=>y(Kw)),[y]);return{...d,className:w,colors:n,disableUnits:f&&!v,enableAlpha:o,enableStyle:i,hasMixedBorders:f,isLinked:b,linkedControlClassName:_,onLinkedChange:e=>{if(!e)return r(void 0);if(!f||(t=e)&&Tj.every((e=>void 0!==t[e])))return r(Rj(e)?void 0:e);var t;const n=((e,t)=>{const n={};return e.color!==t.color&&(n.color=t.color),e.style!==t.style&&(n.style=t.style),e.width!==t.width&&(n.width=t.width),n})(m,e),o={top:{...a?.top,...n},right:{...a?.right,...n},bottom:{...a?.bottom,...n},left:{...a?.left,...n}};if(Mj(o))return r(o);const i=Rj(o.top)?void 0:o.top;r(i)},onSplitChange:(e,t)=>{const n={...g,[t]:e};Mj(n)?r(n):r(e)},toggleLinked:()=>x(!b),linkedValue:m,size:p,splitValue:g,wrapperClassName:S,__experimentalIsRenderedInSidebar:l}}const zj=e=>{const{label:t,hideLabelFromVision:n}=e;return t?n?(0,wt.jsx)(pl,{as:"label",children:t}):(0,wt.jsx)(Ux,{children:t}):null},Lj=Xa(((e,t)=>{const{className:n,colors:r,disableCustomColors:o,disableUnits:i,enableAlpha:s,enableStyle:u,hasMixedBorders:d,hideLabelFromVision:p,isLinked:f,label:h,linkedControlClassName:m,linkedValue:g,onLinkedChange:v,onSplitChange:b,popoverPlacement:x,popoverOffset:y,size:w,splitValue:_,toggleLinked:S,wrapperClassName:C,__experimentalIsRenderedInSidebar:k,...j}=Oj(e),[E,P]=(0,c.useState)(null),T=(0,c.useMemo)((()=>x?{placement:x,offset:y,anchor:E,shift:!0}:void 0),[x,y,E]),R=(0,l.useMergeRefs)([P,t]);return(0,wt.jsxs)(dl,{className:n,...j,ref:R,children:[(0,wt.jsx)(zj,{label:h,hideLabelFromVision:p}),(0,wt.jsxs)(dl,{className:C,children:[f?(0,wt.jsx)(yj,{className:m,colors:r,disableUnits:i,disableCustomColors:o,enableAlpha:s,enableStyle:u,onChange:v,placeholder:d?(0,a.__)("Mixed"):void 0,__unstablePopoverProps:T,shouldSanitizeBorder:!1,value:g,withSlider:!0,width:"__unstable-large"===w?"116px":"110px",__experimentalIsRenderedInSidebar:k,size:w}):(0,wt.jsx)(jj,{colors:r,disableCustomColors:o,enableAlpha:s,enableStyle:u,onChange:b,popoverPlacement:x,popoverOffset:y,value:_,__experimentalIsRenderedInSidebar:k,size:w}),(0,wt.jsx)(Zw,{onClick:S,isLinked:f,size:w})]})]})}),"BorderBoxControl"),Fj=Lj;const Bj=cl("span",{target:"e1j5nr4z8"})({name:"1w884gc",styles:"box-sizing:border-box;display:block;width:24px;height:24px;position:relative;padding:4px"}),Vj=cl("span",{target:"e1j5nr4z7"})({name:"i6vjox",styles:"box-sizing:border-box;display:block;position:relative;width:100%;height:100%"}),$j=({isFocused:e})=>bl({backgroundColor:"currentColor",opacity:e?1:.3},"",""),Hj=cl("span",{target:"e1j5nr4z6"})("box-sizing:border-box;display:block;pointer-events:none;position:absolute;",$j,";"),Wj=cl(Hj,{target:"e1j5nr4z5"})({name:"1k2w39q",styles:"bottom:3px;top:3px;width:2px"}),Uj=cl(Hj,{target:"e1j5nr4z4"})({name:"1q9b07k",styles:"height:2px;left:3px;right:3px"}),Gj=cl(Uj,{target:"e1j5nr4z3"})({name:"abcix4",styles:"top:0"}),Kj=cl(Wj,{target:"e1j5nr4z2"})({name:"1wf8jf",styles:"right:0"}),qj=cl(Uj,{target:"e1j5nr4z1"})({name:"8tapst",styles:"bottom:0"}),Yj=cl(Wj,{target:"e1j5nr4z0"})({name:"1ode3cm",styles:"left:0"});function Xj({size:e=24,side:t="all",sides:n,...r}){const o=e=>!(e=>n?.length&&!n.includes(e))(e)&&("all"===t||t===e),i=o("top")||o("vertical"),s=o("right")||o("horizontal"),a=o("bottom")||o("vertical"),l=o("left")||o("horizontal"),c=e/24;return(0,wt.jsx)(Bj,{style:{transform:`scale(${c})`},...r,children:(0,wt.jsxs)(Vj,{children:[(0,wt.jsx)(Gj,{isFocused:i}),(0,wt.jsx)(Kj,{isFocused:s}),(0,wt.jsx)(qj,{isFocused:a}),(0,wt.jsx)(Yj,{isFocused:l})]})})}const Zj=cl(mj,{target:"e1jovhle5"})({name:"1ejyr19",styles:"max-width:90px"}),Qj=cl(yy,{target:"e1jovhle4"})({name:"1j1lmoi",styles:"grid-column:1/span 3"}),Jj=cl(sy,{target:"e1jovhle3"})({name:"tkya7b",styles:"grid-area:1/2;justify-self:end"}),eE=cl("div",{target:"e1jovhle2"})({name:"1dfa8al",styles:"grid-area:1/3;justify-self:end"}),tE=cl(Xj,{target:"e1jovhle1"})({name:"ou8xsw",styles:"flex:0 0 auto"}),nE=cl(dC,{target:"e1jovhle0"})("width:100%;margin-inline-end:",wl(2),";"),rE={px:{max:300,step:1},"%":{max:100,step:1},vw:{max:100,step:1},vh:{max:100,step:1},em:{max:10,step:.1},rm:{max:10,step:.1},svw:{max:100,step:1},lvw:{max:100,step:1},dvw:{max:100,step:1},svh:{max:100,step:1},lvh:{max:100,step:1},dvh:{max:100,step:1},vi:{max:100,step:1},svi:{max:100,step:1},lvi:{max:100,step:1},dvi:{max:100,step:1},vb:{max:100,step:1},svb:{max:100,step:1},lvb:{max:100,step:1},dvb:{max:100,step:1},vmin:{max:100,step:1},svmin:{max:100,step:1},lvmin:{max:100,step:1},dvmin:{max:100,step:1},vmax:{max:100,step:1},svmax:{max:100,step:1},lvmax:{max:100,step:1},dvmax:{max:100,step:1}},oE={all:(0,a.__)("All sides"),top:(0,a.__)("Top side"),bottom:(0,a.__)("Bottom side"),left:(0,a.__)("Left side"),right:(0,a.__)("Right side"),mixed:(0,a.__)("Mixed"),vertical:(0,a.__)("Top and bottom sides"),horizontal:(0,a.__)("Left and right sides")},iE={top:void 0,right:void 0,bottom:void 0,left:void 0},sE=["top","right","bottom","left"];function aE(e){return e.sort(((t,n)=>e.filter((e=>e===t)).length-e.filter((e=>e===n)).length)).pop()}function lE(e={},t,n=sE){const r=function(e){const t=[];if(!e?.length)return sE;if(e.includes("vertical"))t.push("top","bottom");else if(e.includes("horizontal"))t.push("left","right");else{const n=sE.filter((t=>e.includes(t)));t.push(...n)}return t}(n).map((t=>lj(e[t]))),o=r.map((e=>{var t;return null!==(t=e[0])&&void 0!==t?t:""})),i=r.map((e=>e[1])),s=o.every((e=>e===o[0]))?o[0]:"";let a;var l;"number"==typeof s?a=aE(i):a=null!==(l=function(e){if(!e||"object"!=typeof e)return;const t=Object.values(e).filter(Boolean);return aE(t)}(t))&&void 0!==l?l:aE(i);return[s,a].join("")}function cE(e={},t,n=sE){const r=lE(e,t,n);return isNaN(parseFloat(r))}function uE(e){return e&&Object.values(e).filter((e=>!!e&&/\d/.test(e))).length>0}function dE(e,t){let n="all";return e||(n=t?"vertical":"top"),n}function pE(e,t,n){const r={...e};return n?.length?n.forEach((e=>{"vertical"===e?(r.top=t,r.bottom=t):"horizontal"===e?(r.left=t,r.right=t):r[e]=t})):sE.forEach((e=>r[e]=t)),r}const fE=()=>{};function hE({__next40pxDefaultSize:e,onChange:t=fE,onFocus:n=fE,values:r,sides:o,selectedUnits:i,setSelectedUnits:s,...a}){var c,u;const d=(0,l.useInstanceId)(hE,"box-control-input-all"),p=lE(r,i,o),f=uE(r)&&cE(r,i,o),h=f?oE.mixed:void 0,[m,g]=lj(p),v=e=>{const n=void 0!==e&&!isNaN(parseFloat(e)),i=pE(r,n?e:void 0,o);t(i)};return(0,wt.jsxs)(wt.Fragment,{children:[(0,wt.jsx)(Zj,{...a,__next40pxDefaultSize:e,className:"component-box-control__unit-control",disableUnits:f,id:d,isPressEnterToChange:!0,value:p,onChange:v,onUnitChange:e=>{const t=pE(i,e,o);s(t)},onFocus:e=>{n(e,{side:"all"})},placeholder:h,label:oE.all,hideLabelFromVision:!0}),(0,wt.jsx)(nE,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:e,"aria-controls":d,label:oE.all,hideLabelFromVision:!0,onChange:e=>{v(void 0!==e?[e,g].join(""):void 0)},min:0,max:null!==(c=rE[null!=g?g:"px"]?.max)&&void 0!==c?c:10,step:null!==(u=rE[null!=g?g:"px"]?.step)&&void 0!==u?u:.1,value:null!=m?m:0,withInputField:!1})]})}const mE=()=>{};function gE({__next40pxDefaultSize:e,onChange:t=mE,onFocus:n=mE,values:r,selectedUnits:o,setSelectedUnits:i,sides:s,...a}){const c=(0,l.useInstanceId)(gE,"box-control-input"),u=e=>t=>{n(t,{side:e})},d=(e,n,o)=>{const i={...r},s=void 0!==n&&!isNaN(parseFloat(n))?n:void 0;if(i[e]=s,o?.event.altKey)switch(e){case"top":i.bottom=s;break;case"bottom":i.top=s;break;case"left":i.right=s;break;case"right":i.left=s}(e=>{t(e)})(i)},p=e=>t=>{const n={...o};n[e]=t,i(n)},f=s?.length?sE.filter((e=>s.includes(e))):sE;return(0,wt.jsx)(wt.Fragment,{children:f.map((t=>{var n,i;const[l,f]=lj(r[t]),h=r[t]?f:o[t],m=[c,t].join("-");return(0,wt.jsxs)(Qj,{expanded:!0,children:[(0,wt.jsx)(tE,{side:t,sides:s}),(0,wt.jsx)(Yi,{placement:"top-end",text:oE[t],children:(0,wt.jsx)(Zj,{...a,__next40pxDefaultSize:e,className:"component-box-control__unit-control",id:m,isPressEnterToChange:!0,value:[l,h].join(""),onChange:(e,n)=>d(t,e,n),onUnitChange:p(t),onFocus:u(t),label:oE[t],hideLabelFromVision:!0})}),(0,wt.jsx)(nE,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:e,"aria-controls":m,label:oE[t],hideLabelFromVision:!0,onChange:e=>{d(t,void 0!==e?[e,h].join(""):void 0)},min:0,max:null!==(n=rE[null!=h?h:"px"]?.max)&&void 0!==n?n:10,step:null!==(i=rE[null!=h?h:"px"]?.step)&&void 0!==i?i:.1,value:null!=l?l:0,withInputField:!1})]},`box-control-${t}`)}))})}const vE=["vertical","horizontal"];function bE({__next40pxDefaultSize:e,onChange:t,onFocus:n,values:r,selectedUnits:o,setSelectedUnits:i,sides:s,...a}){const c=(0,l.useInstanceId)(bE,"box-control-input"),u=e=>t=>{n&&n(t,{side:e})},d=(e,n)=>{if(!t)return;const o={...r},i=void 0!==n&&!isNaN(parseFloat(n))?n:void 0;"vertical"===e&&(o.top=i,o.bottom=i),"horizontal"===e&&(o.left=i,o.right=i),t(o)},p=e=>t=>{const n={...o};"vertical"===e&&(n.top=t,n.bottom=t),"horizontal"===e&&(n.left=t,n.right=t),i(n)},f=s?.length?vE.filter((e=>s.includes(e))):vE;return(0,wt.jsx)(wt.Fragment,{children:f.map((t=>{var n,i;const[l,f]=lj("vertical"===t?r.top:r.left),h="vertical"===t?o.top:o.left,m=[c,t].join("-");return(0,wt.jsxs)(Qj,{children:[(0,wt.jsx)(tE,{side:t,sides:s}),(0,wt.jsx)(Yi,{placement:"top-end",text:oE[t],children:(0,B.createElement)(Zj,{...a,__next40pxDefaultSize:e,className:"component-box-control__unit-control",id:m,isPressEnterToChange:!0,value:[l,null!=h?h:f].join(""),onChange:e=>d(t,e),onUnitChange:p(t),onFocus:u(t),label:oE[t],hideLabelFromVision:!0,key:t})}),(0,wt.jsx)(nE,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:e,"aria-controls":m,label:oE[t],hideLabelFromVision:!0,onChange:e=>d(t,void 0!==e?[e,null!=h?h:f].join(""):void 0),min:0,max:null!==(n=rE[null!=h?h:"px"]?.max)&&void 0!==n?n:10,step:null!==(i=rE[null!=h?h:"px"]?.step)&&void 0!==i?i:.1,value:null!=l?l:0,withInputField:!1})]},t)}))})}function xE({isLinked:e,...t}){const n=e?(0,a.__)("Unlink sides"):(0,a.__)("Link sides");return(0,wt.jsx)(Yi,{text:n,children:(0,wt.jsx)(sy,{...t,className:"component-box-control__linked-button",size:"small",icon:e?Ww:Uw,iconSize:24,"aria-label":n})})}const yE={min:0},wE=()=>{};function _E({__next40pxDefaultSize:e=!1,id:t,inputProps:n=yE,onChange:r=wE,label:o=(0,a.__)("Box Control"),values:i,units:s,sides:u,splitOnAxis:d=!1,allowReset:p=!0,resetValues:f=iE,onMouseOver:h,onMouseOut:m}){const[g,v]=CS(i,{fallback:iE}),b=g||iE,x=uE(i),y=1===u?.length,[w,_]=(0,c.useState)(x),[S,C]=(0,c.useState)(!x||!cE(b)||y),[k,j]=(0,c.useState)(dE(S,d)),[E,P]=(0,c.useState)({top:lj(i?.top)[1],right:lj(i?.right)[1],bottom:lj(i?.bottom)[1],left:lj(i?.left)[1]}),T=function(e){const t=(0,l.useInstanceId)(_E,"inspector-box-control");return e||t}(t),R=`${T}-heading`,I={...n,onChange:e=>{r(e),v(e),_(!0)},onFocus:(e,{side:t})=>{j(t)},isLinked:S,units:s,selectedUnits:E,setSelectedUnits:P,sides:u,values:b,onMouseOver:h,onMouseOut:m,__next40pxDefaultSize:e};return(0,wt.jsxs)(Sj,{id:T,columns:3,templateColumns:"1fr min-content min-content",role:"group","aria-labelledby":R,children:[(0,wt.jsx)(Zx.VisualLabel,{id:R,children:o}),S&&(0,wt.jsxs)(Qj,{children:[(0,wt.jsx)(tE,{side:k,sides:u}),(0,wt.jsx)(hE,{...I})]}),!y&&(0,wt.jsx)(eE,{children:(0,wt.jsx)(xE,{onClick:()=>{C(!S),j(dE(!S,d))},isLinked:S})}),!S&&d&&(0,wt.jsx)(bE,{...I}),!S&&!d&&(0,wt.jsx)(gE,{...I}),p&&(0,wt.jsx)(Jj,{className:"component-box-control__reset-button",variant:"secondary",size:"small",onClick:()=>{r(f),v(f),P(f),_(!1)},disabled:!w,children:(0,a.__)("Reset")})]})}const SE=_E;const CE=(0,c.forwardRef)((function(e,t){const{className:n,...r}=e,o=s("components-button-group",n);return(0,wt.jsx)("div",{ref:t,role:"group",className:o,...r})}));const kE={name:"12ip69d",styles:"background:transparent;display:block;margin:0!important;pointer-events:none;position:absolute;will-change:box-shadow"};function jE(e){return`0 ${e}px ${2*e}px 0\n\t${`rgba(0, 0, 0, ${e/20})`}`}const EE=Xa((function(e,t){const n=function(e){const{active:t,borderRadius:n="inherit",className:r,focus:o,hover:i,isInteractive:s=!1,offset:a=0,value:l=0,...u}=Ya(e,"Elevation"),d=qa();return{...u,className:(0,c.useMemo)((()=>{let e=qg(i)?i:2*l,c=qg(t)?t:l/2;s||(e=qg(i)?i:void 0,c=qg(t)?t:void 0);const u=`box-shadow ${Tl.transitionDuration} ${Tl.transitionTimingFunction}`,p={};return p.Base=bl({borderRadius:n,bottom:a,boxShadow:jE(l),opacity:Tl.elevationIntensity,left:a,right:a,top:a},bl("@media not ( prefers-reduced-motion ){transition:",u,";}",""),"",""),qg(e)&&(p.hover=bl("*:hover>&{box-shadow:",jE(e),";}","")),qg(c)&&(p.active=bl("*:active>&{box-shadow:",jE(c),";}","")),qg(o)&&(p.focus=bl("*:focus>&{box-shadow:",jE(o),";}","")),d(kE,p.Base,p.hover,p.focus,p.active,r)}),[t,n,r,d,o,i,s,a,l]),"aria-hidden":!0}}(e);return(0,wt.jsx)(dl,{...n,ref:t})}),"Elevation"),PE=EE;const TE=`calc(${Tl.radiusLarge} - 1px)`,RE=bl("box-shadow:0 0 0 1px ",Tl.surfaceBorderColor,";outline:none;",""),IE={name:"1showjb",styles:"border-bottom:1px solid;box-sizing:border-box;&:last-child{border-bottom:none;}"},NE={name:"14n5oej",styles:"border-top:1px solid;box-sizing:border-box;&:first-of-type{border-top:none;}"},ME={name:"13udsys",styles:"height:100%"},AE={name:"6ywzd",styles:"box-sizing:border-box;height:auto;max-height:100%"},DE={name:"dq805e",styles:"box-sizing:border-box;overflow:hidden;&>img,&>iframe{display:block;height:auto;max-width:100%;width:100%;}"},OE={name:"c990dr",styles:"box-sizing:border-box;display:block;width:100%"},zE=bl("&:first-of-type{border-top-left-radius:",TE,";border-top-right-radius:",TE,";}&:last-of-type{border-bottom-left-radius:",TE,";border-bottom-right-radius:",TE,";}",""),LE=bl("border-color:",Tl.colorDivider,";",""),FE={name:"1t90u8d",styles:"box-shadow:none"},BE={name:"1e1ncky",styles:"border:none"},VE=bl("border-radius:",TE,";",""),$E=bl("padding:",Tl.cardPaddingXSmall,";",""),HE={large:bl("padding:",Tl.cardPaddingLarge,";",""),medium:bl("padding:",Tl.cardPaddingMedium,";",""),small:bl("padding:",Tl.cardPaddingSmall,";",""),xSmall:$E,extraSmall:$E},WE=bl("background-color:",jl.ui.backgroundDisabled,";",""),UE=bl("background-color:",Tl.surfaceColor,";color:",jl.gray[900],";position:relative;","");Tl.surfaceBackgroundColor;function GE({borderBottom:e,borderLeft:t,borderRight:n,borderTop:r}){const o=`1px solid ${Tl.surfaceBorderColor}`;return bl({borderBottom:e?o:void 0,borderLeft:t?o:void 0,borderRight:n?o:void 0,borderTop:r?o:void 0},"","")}const KE=bl("",""),qE=bl("background:",Tl.surfaceBackgroundTintColor,";",""),YE=bl("background:",Tl.surfaceBackgroundTertiaryColor,";",""),XE=e=>[e,e].join(" "),ZE=e=>["90deg",[Tl.surfaceBackgroundColor,e].join(" "),"transparent 1%"].join(","),QE=e=>[[Tl.surfaceBackgroundColor,e].join(" "),"transparent 1%"].join(","),JE=(e,t)=>bl("background:",(e=>[`linear-gradient( ${ZE(e)} ) center`,`linear-gradient( ${QE(e)} ) center`,Tl.surfaceBorderBoldColor].join(","))(t),";background-size:",XE(e),";",""),eP=[`linear-gradient( ${[`${Tl.surfaceBorderSubtleColor} 1px`,"transparent 1px"].join(",")} )`,`linear-gradient( ${["90deg",`${Tl.surfaceBorderSubtleColor} 1px`,"transparent 1px"].join(",")} )`].join(","),tP=(e,t,n)=>{switch(e){case"dotted":return JE(t,n);case"grid":return(e=>bl("background:",Tl.surfaceBackgroundColor,";background-image:",eP,";background-size:",XE(e),";",""))(t);case"primary":return KE;case"secondary":return qE;case"tertiary":return YE}};function nP(e){const{backgroundSize:t=12,borderBottom:n=!1,borderLeft:r=!1,borderRight:o=!1,borderTop:i=!1,className:s,variant:a="primary",...l}=Ya(e,"Surface"),u=qa();return{...l,className:(0,c.useMemo)((()=>{const e={borders:GE({borderBottom:n,borderLeft:r,borderRight:o,borderTop:i})};return u(UE,e.borders,tP(a,`${t}px`,t-1+"px"),s)}),[t,n,r,o,i,s,u,a])}}function rP(e){const{className:t,elevation:n=0,isBorderless:r=!1,isRounded:o=!0,size:i="medium",...s}=Ya(function({elevation:e,isElevated:t,...n}){const r={...n};let o=e;var i;return t&&(Fi()("Card isElevated prop",{since:"5.9",alternative:"elevation"}),null!==(i=o)&&void 0!==i||(o=2)),void 0!==o&&(r.elevation=o),r}(e),"Card"),a=qa();return{...nP({...s,className:(0,c.useMemo)((()=>a(RE,r&&FE,o&&VE,t)),[t,a,r,o])}),elevation:n,isBorderless:r,isRounded:o,size:i}}const oP=Xa((function(e,t){const{children:n,elevation:r,isBorderless:o,isRounded:i,size:s,...a}=rP(e),l=i?Tl.radiusLarge:0,u=qa(),d=(0,c.useMemo)((()=>u(bl({borderRadius:l},"",""))),[u,l]),p=(0,c.useMemo)((()=>{const e={size:s,isBorderless:o};return{CardBody:e,CardHeader:e,CardFooter:e}}),[o,s]);return(0,wt.jsx)(is,{value:p,children:(0,wt.jsxs)(dl,{...a,ref:t,children:[(0,wt.jsx)(dl,{className:u(ME),children:n}),(0,wt.jsx)(PE,{className:d,isInteractive:!1,value:r?1:0}),(0,wt.jsx)(PE,{className:d,isInteractive:!1,value:r})]})})}),"Card"),iP=oP;const sP=bl("@media only screen and ( min-device-width: 40em ){&::-webkit-scrollbar{height:12px;width:12px;}&::-webkit-scrollbar-track{background-color:transparent;}&::-webkit-scrollbar-track{background:",Tl.colorScrollbarTrack,";border-radius:8px;}&::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:",Tl.colorScrollbarThumb,";border:2px solid rgba( 0, 0, 0, 0 );border-radius:7px;}&:hover::-webkit-scrollbar-thumb{background-color:",Tl.colorScrollbarThumbHover,";}}",""),aP={name:"13udsys",styles:"height:100%"},lP={name:"7zq9w",styles:"scroll-behavior:smooth"},cP={name:"q33xhg",styles:"overflow-x:auto;overflow-y:hidden"},uP={name:"103x71s",styles:"overflow-x:hidden;overflow-y:auto"},dP={name:"umwchj",styles:"overflow-y:auto"};const pP=Xa((function(e,t){const n=function(e){const{className:t,scrollDirection:n="y",smoothScroll:r=!1,...o}=Ya(e,"Scrollable"),i=qa();return{...o,className:(0,c.useMemo)((()=>i(aP,sP,r&&lP,"x"===n&&cP,"y"===n&&uP,"auto"===n&&dP,t)),[t,i,n,r])}}(e);return(0,wt.jsx)(dl,{...n,ref:t})}),"Scrollable"),fP=pP;const hP=Xa((function(e,t){const{isScrollable:n,...r}=function(e){const{className:t,isScrollable:n=!1,isShady:r=!1,size:o="medium",...i}=Ya(e,"CardBody"),s=qa();return{...i,className:(0,c.useMemo)((()=>s(AE,zE,HE[o],r&&WE,"components-card__body",t)),[t,s,r,o]),isScrollable:n}}(e);return n?(0,wt.jsx)(fP,{...r,ref:t}):(0,wt.jsx)(dl,{...r,ref:t})}),"CardBody"),mP=hP;var gP=kt((function(e){var t=e,{orientation:n="horizontal"}=t,r=x(t,["orientation"]);return r=v({role:"separator","aria-orientation":n},r)})),vP=_t((function(e){return Ct("hr",gP(e))}));const bP={vertical:{start:"marginLeft",end:"marginRight"},horizontal:{start:"marginTop",end:"marginBottom"}},xP=({"aria-orientation":e="horizontal",margin:t,marginStart:n,marginEnd:r})=>bl(Bg({[bP[e].start]:wl(null!=n?n:t),[bP[e].end]:wl(null!=r?r:t)})(),"","");var yP={name:"1u4hpl4",styles:"display:inline"};const wP=({"aria-orientation":e="horizontal"})=>"vertical"===e?yP:void 0,_P=({"aria-orientation":e="horizontal"})=>bl({["vertical"===e?"borderRight":"borderBottom"]:"1px solid currentColor"},"",""),SP=({"aria-orientation":e="horizontal"})=>bl({height:"vertical"===e?"auto":0,width:"vertical"===e?0:"auto"},"",""),CP=cl("hr",{target:"e19on6iw0"})("border:0;margin:0;",wP," ",_P," ",SP," ",xP,";");const kP=Xa((function(e,t){const n=Ya(e,"Divider");return(0,wt.jsx)(vP,{render:(0,wt.jsx)(CP,{}),...n,ref:t})}),"Divider");const jP=Xa((function(e,t){const n=function(e){const{className:t,...n}=Ya(e,"CardDivider"),r=qa();return{...n,className:(0,c.useMemo)((()=>r(OE,LE,"components-card__divider",t)),[t,r])}}(e);return(0,wt.jsx)(kP,{...n,ref:t})}),"CardDivider"),EP=jP;const PP=Xa((function(e,t){const n=function(e){const{className:t,justify:n,isBorderless:r=!1,isShady:o=!1,size:i="medium",...s}=Ya(e,"CardFooter"),a=qa();return{...s,className:(0,c.useMemo)((()=>a(NE,zE,LE,HE[i],r&&BE,o&&WE,"components-card__footer",t)),[t,a,r,o,i]),justify:n}}(e);return(0,wt.jsx)(Ig,{...n,ref:t})}),"CardFooter"),TP=PP;const RP=Xa((function(e,t){const n=function(e){const{className:t,isBorderless:n=!1,isShady:r=!1,size:o="medium",...i}=Ya(e,"CardHeader"),s=qa();return{...i,className:(0,c.useMemo)((()=>s(IE,zE,LE,HE[o],n&&BE,r&&WE,"components-card__header",t)),[t,s,n,r,o])}}(e);return(0,wt.jsx)(Ig,{...n,ref:t})}),"CardHeader"),IP=RP;const NP=Xa((function(e,t){const n=function(e){const{className:t,...n}=Ya(e,"CardMedia"),r=qa();return{...n,className:(0,c.useMemo)((()=>r(DE,zE,"components-card__media",t)),[t,r])}}(e);return(0,wt.jsx)(dl,{...n,ref:t})}),"CardMedia"),MP=NP;const AP=function e(t){const{__nextHasNoMarginBottom:n,label:r,className:o,heading:i,checked:a,indeterminate:u,help:d,id:p,onChange:f,...h}=t;i&&Fi()("`heading` prop in `CheckboxControl`",{alternative:"a separate element to implement a heading",since:"5.8"});const[m,g]=(0,c.useState)(!1),[v,b]=(0,c.useState)(!1),x=(0,l.useRefEffect)((e=>{e&&(e.indeterminate=!!u,g(e.matches(":checked")),b(e.matches(":indeterminate")))}),[a,u]),y=(0,l.useInstanceId)(e,"inspector-checkbox-control",p);return(0,wt.jsx)(Qx,{__nextHasNoMarginBottom:n,__associatedWPComponentName:"CheckboxControl",label:i,id:y,help:d&&(0,wt.jsx)("span",{className:"components-checkbox-control__help",children:d}),className:s("components-checkbox-control",o),children:(0,wt.jsxs)(yy,{spacing:0,justify:"start",alignment:"top",children:[(0,wt.jsxs)("span",{className:"components-checkbox-control__input-container",children:[(0,wt.jsx)("input",{ref:x,id:y,className:"components-checkbox-control__input",type:"checkbox",value:"1",onChange:e=>f(e.target.checked),checked:a,"aria-describedby":d?y+"__help":void 0,...h}),v?(0,wt.jsx)(vS,{icon:Ug,className:"components-checkbox-control__indeterminate",role:"presentation"}):null,m?(0,wt.jsx)(vS,{icon:xk,className:"components-checkbox-control__checked",role:"presentation"}):null]}),r&&(0,wt.jsx)("label",{className:"components-checkbox-control__label",htmlFor:y,children:r})]})})},DP=4e3;function OP({className:e,children:t,onCopy:n,onFinishCopy:r,text:o,...i}){Fi()("wp.components.ClipboardButton",{since:"5.8",alternative:"wp.compose.useCopyToClipboard"});const a=(0,c.useRef)(),u=(0,l.useCopyToClipboard)(o,(()=>{n(),a.current&&clearTimeout(a.current),r&&(a.current=setTimeout((()=>r()),DP))}));(0,c.useEffect)((()=>{a.current&&clearTimeout(a.current)}),[]);const d=s("components-clipboard-button",e);return(0,wt.jsx)(sy,{...i,className:d,ref:u,onCopy:e=>{e.target.focus()},children:t})}const zP=(0,wt.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wt.jsx)(n.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})});const LP=e=>bl("font-size:",Fx("default.fontSize"),";font-family:inherit;appearance:none;border:1px solid transparent;cursor:pointer;background:none;text-align:start;text-decoration:","a"===e?"none":void 0,";svg,path{fill:currentColor;}&:hover{color:",jl.theme.accent,";}&:focus{box-shadow:none;outline:none;}&:focus-visible{box-shadow:0 0 0 var( --wp-admin-border-width-focus ) ",jl.theme.accent,";outline:2px solid transparent;outline-offset:0;}",""),FP={name:"1bcj5ek",styles:"width:100%;display:block"},BP={name:"150ruhm",styles:"box-sizing:border-box;width:100%;display:block;margin:0;color:inherit"},VP=bl("border:1px solid ",Tl.surfaceBorderColor,";",""),$P=bl(">*:not( marquee )>*{border-bottom:1px solid ",Tl.surfaceBorderColor,";}>*:last-of-type>*:not( :focus ){border-bottom-color:transparent;}",""),HP=Tl.radiusSmall,WP=bl("border-radius:",HP,";",""),UP=bl("border-radius:",HP,";>*:first-of-type>*{border-top-left-radius:",HP,";border-top-right-radius:",HP,";}>*:last-of-type>*{border-bottom-left-radius:",HP,";border-bottom-right-radius:",HP,";}",""),GP=`calc(${Tl.fontSize} * ${Tl.fontLineHeightBase})`,KP=`calc((${Tl.controlHeight} - ${GP} - 2px) / 2)`,qP=`calc((${Tl.controlHeightSmall} - ${GP} - 2px) / 2)`,YP=`calc((${Tl.controlHeightLarge} - ${GP} - 2px) / 2)`,XP={small:bl("padding:",qP," ",Tl.controlPaddingXSmall,"px;",""),medium:bl("padding:",KP," ",Tl.controlPaddingX,"px;",""),large:bl("padding:",YP," ",Tl.controlPaddingXLarge,"px;","")};const ZP=(0,c.createContext)({size:"medium"}),QP=()=>(0,c.useContext)(ZP);const JP=Xa((function(e,t){const{isBordered:n,isSeparated:r,size:o,...i}=function(e){const{className:t,isBordered:n=!1,isRounded:r=!0,isSeparated:o=!1,role:i="list",...s}=Ya(e,"ItemGroup");return{isBordered:n,className:qa()(n&&VP,o&&$P,r&&UP,t),role:i,isSeparated:o,...s}}(e),{size:s}=QP(),a={spacedAround:!n&&!r,size:o||s};return(0,wt.jsx)(ZP.Provider,{value:a,children:(0,wt.jsx)(dl,{...i,ref:t})})}),"ItemGroup"),eT=10,tT=0,nT=eT;function rT(e){return Math.max(0,Math.min(100,e))}function oT(e,t,n){const r=e.slice();return r[t]=n,r}function iT(e,t,n){if(function(e,t,n,r=tT){const o=e[t].position,i=Math.min(o,n),s=Math.max(o,n);return e.some((({position:e},o)=>o!==t&&(Math.abs(e-n)<r||i<e&&e<s)))}(e,t,n))return e;return oT(e,t,{...e[t],position:n})}function sT(e,t,n){return oT(e,t,{...e[t],color:n})}function aT(e,t){if(!t)return;const{x:n,width:r}=t.getBoundingClientRect(),o=e-n;return Math.round(rT(100*o/r))}function lT({isOpen:e,position:t,color:n,...r}){const o=`components-custom-gradient-picker__control-point-button-description-${(0,l.useInstanceId)(lT)}`;return(0,wt.jsxs)(wt.Fragment,{children:[(0,wt.jsx)(sy,{"aria-label":(0,a.sprintf)((0,a.__)("Gradient control point at position %1$s%% with color code %2$s."),t,n),"aria-describedby":o,"aria-haspopup":"true","aria-expanded":e,className:s("components-custom-gradient-picker__control-point-button",{"is-active":e}),...r}),(0,wt.jsx)(pl,{id:o,children:(0,a.__)("Use your left or right arrow keys or drag and drop with the mouse to change the gradient position. Press the button to change the color or remove the control point.")})]})}function cT({isRenderedInSidebar:e,className:t,...n}){const r=(0,c.useMemo)((()=>({placement:"bottom",offset:8,resize:!1})),[]),o=s("components-custom-gradient-picker__control-point-dropdown",t);return(0,wt.jsx)(Lk,{isRenderedInSidebar:e,popoverProps:r,className:o,...n})}function uT({disableRemove:e,disableAlpha:t,gradientPickerDomRef:n,ignoreMarkerPosition:r,value:o,onChange:i,onStartControlPointChange:s,onStopControlPointChange:l,__experimentalIsRenderedInSidebar:u}){const d=(0,c.useRef)(),p=e=>{if(void 0===d.current||null===n.current)return;const t=aT(e.clientX,n.current),{initialPosition:r,index:s,significantMoveHappened:a}=d.current;!a&&Math.abs(r-t)>=5&&(d.current.significantMoveHappened=!0),i(iT(o,s,t))},f=()=>{window&&window.removeEventListener&&d.current&&d.current.listenersActivated&&(window.removeEventListener("mousemove",p),window.removeEventListener("mouseup",f),l(),d.current.listenersActivated=!1)},h=(0,c.useRef)();return h.current=f,(0,c.useEffect)((()=>()=>{h.current?.()}),[]),(0,wt.jsx)(wt.Fragment,{children:o.map(((n,c)=>{const h=n?.position;return r!==h&&(0,wt.jsx)(cT,{isRenderedInSidebar:u,onClose:l,renderToggle:({isOpen:e,onToggle:t})=>(0,wt.jsx)(lT,{onClick:()=>{d.current&&d.current.significantMoveHappened||(e?l():s(),t())},onMouseDown:()=>{window&&window.addEventListener&&(d.current={initialPosition:h,index:c,significantMoveHappened:!1,listenersActivated:!0},s(),window.addEventListener("mousemove",p),window.addEventListener("mouseup",f))},onKeyDown:e=>{"ArrowLeft"===e.code?(e.stopPropagation(),i(iT(o,c,rT(n.position-nT)))):"ArrowRight"===e.code&&(e.stopPropagation(),i(iT(o,c,rT(n.position+nT))))},isOpen:e,position:n.position,color:n.color},c),renderContent:({onClose:r})=>(0,wt.jsxs)(Mk,{paddingSize:"none",children:[(0,wt.jsx)(vk,{enableAlpha:!t,color:n.color,onChange:e=>{i(sT(o,c,Ev(e).toRgbString()))}}),!e&&o.length>2&&(0,wt.jsx)(yy,{className:"components-custom-gradient-picker__remove-control-point-wrapper",alignment:"center",children:(0,wt.jsx)(sy,{onClick:()=>{i(function(e,t){return e.filter(((e,n)=>n!==t))}(o,c)),r()},variant:"link",children:(0,a.__)("Remove Control Point")})})]}),style:{left:`${n.position}%`,transform:"translateX( -50% )"}},c)}))})}uT.InsertPoint=function({value:e,onChange:t,onOpenInserter:n,onCloseInserter:r,insertPosition:o,disableAlpha:i,__experimentalIsRenderedInSidebar:s}){const[a,l]=(0,c.useState)(!1);return(0,wt.jsx)(cT,{isRenderedInSidebar:s,className:"components-custom-gradient-picker__inserter",onClose:()=>{r()},renderToggle:({isOpen:e,onToggle:t})=>(0,wt.jsx)(sy,{"aria-expanded":e,"aria-haspopup":"true",onClick:()=>{e?r():(l(!1),n()),t()},className:"components-custom-gradient-picker__insert-point-dropdown",icon:Wg}),renderContent:()=>(0,wt.jsx)(Mk,{paddingSize:"none",children:(0,wt.jsx)(vk,{enableAlpha:!i,onChange:n=>{a?t(function(e,t,n){const r=e.findIndex((e=>e.position===t));return sT(e,r,n)}(e,o,Ev(n).toRgbString())):(t(function(e,t,n){const r=e.findIndex((e=>e.position>t)),o={color:n,position:t},i=e.slice();return i.splice(r-1,0,o),i}(e,o,Ev(n).toRgbString())),l(!0))}})}),style:null!==o?{left:`${o}%`,transform:"translateX( -50% )"}:void 0})};const dT=uT,pT=(e,t)=>{switch(t.type){case"MOVE_INSERTER":if("IDLE"===e.id||"MOVING_INSERTER"===e.id)return{id:"MOVING_INSERTER",insertPosition:t.insertPosition};break;case"STOP_INSERTER_MOVE":if("MOVING_INSERTER"===e.id)return{id:"IDLE"};break;case"OPEN_INSERTER":if("MOVING_INSERTER"===e.id)return{id:"INSERTING_CONTROL_POINT",insertPosition:e.insertPosition};break;case"CLOSE_INSERTER":if("INSERTING_CONTROL_POINT"===e.id)return{id:"IDLE"};break;case"START_CONTROL_CHANGE":if("IDLE"===e.id)return{id:"MOVING_CONTROL_POINT"};break;case"STOP_CONTROL_CHANGE":if("MOVING_CONTROL_POINT"===e.id)return{id:"IDLE"}}return e},fT={id:"IDLE"};function hT({background:e,hasGradient:t,value:n,onChange:r,disableInserter:o=!1,disableAlpha:i=!1,__experimentalIsRenderedInSidebar:a=!1}){const l=(0,c.useRef)(null),[u,d]=(0,c.useReducer)(pT,fT),p=e=>{if(!l.current)return;const t=aT(e.clientX,l.current);n.some((({position:e})=>Math.abs(t-e)<eT))?"MOVING_INSERTER"===u.id&&d({type:"STOP_INSERTER_MOVE"}):d({type:"MOVE_INSERTER",insertPosition:t})},f="MOVING_INSERTER"===u.id,h="INSERTING_CONTROL_POINT"===u.id;return(0,wt.jsxs)("div",{className:s("components-custom-gradient-picker__gradient-bar",{"has-gradient":t}),onMouseEnter:p,onMouseMove:p,onMouseLeave:()=>{d({type:"STOP_INSERTER_MOVE"})},children:[(0,wt.jsx)("div",{className:"components-custom-gradient-picker__gradient-bar-background",style:{background:e,opacity:t?1:.4}}),(0,wt.jsxs)("div",{ref:l,className:"components-custom-gradient-picker__markers-container",children:[!o&&(f||h)&&(0,wt.jsx)(dT.InsertPoint,{__experimentalIsRenderedInSidebar:a,disableAlpha:i,insertPosition:u.insertPosition,value:n,onChange:r,onOpenInserter:()=>{d({type:"OPEN_INSERTER"})},onCloseInserter:()=>{d({type:"CLOSE_INSERTER"})}}),(0,wt.jsx)(dT,{__experimentalIsRenderedInSidebar:a,disableAlpha:i,disableRemove:o,gradientPickerDomRef:l,ignoreMarkerPosition:h?u.insertPosition:void 0,value:n,onChange:r,onStartControlPointChange:()=>{d({type:"START_CONTROL_CHANGE"})},onStopControlPointChange:()=>{d({type:"STOP_CONTROL_CHANGE"})}})]})]})}var mT=o(8924);const gT="linear-gradient(135deg, rgba(6, 147, 227, 1) 0%, rgb(155, 81, 224) 100%)",vT={type:"angular",value:"90"},bT=[{value:"linear-gradient",label:(0,a.__)("Linear")},{value:"radial-gradient",label:(0,a.__)("Radial")}],xT={top:0,"top right":45,"right top":45,right:90,"right bottom":135,"bottom right":135,bottom:180,"bottom left":225,"left bottom":225,left:270,"top left":315,"left top":315};function yT({type:e,value:t,length:n}){return`${function({type:e,value:t}){return"literal"===e?t:"hex"===e?`#${t}`:`${e}(${t.join(",")})`}({type:e,value:t})} ${function(e){if(!e)return"";const{value:t,type:n}=e;return`${t}${n}`}(n)}`}function wT({type:e,orientation:t,colorStops:n}){const r=function(e){if(!Array.isArray(e)&&e&&"angular"===e.type)return`${e.value}deg`}(t);return`${e}(${[r,...n.sort(((e,t)=>{const n=e=>void 0===e?.length?.value?0:parseInt(e.length.value);return n(e)-n(t)})).map(yT)].filter(Boolean).join(",")})`}function _T(e){return void 0===e.length||"%"!==e.length.type}function ST(e){switch(e.type){case"hex":return`#${e.value}`;case"literal":return e.value;case"rgb":case"rgba":return`${e.type}(${e.value.join(",")})`;default:return"transparent"}}Tv([Rv]);const CT=cl(Mg,{target:"e10bzpgi1"})({name:"1gvx10y",styles:"flex-grow:5"}),kT=cl(Mg,{target:"e10bzpgi0"})({name:"1gvx10y",styles:"flex-grow:5"}),jT=({gradientAST:e,hasGradient:t,onChange:n})=>{var r;const o=null!==(r=e?.orientation?.value)&&void 0!==r?r:180;return(0,wt.jsx)(Ty,{onChange:t=>{n(wT({...e,orientation:{type:"angular",value:`${t}`}}))},value:t?o:""})},ET=({gradientAST:e,hasGradient:t,onChange:n})=>{const{type:r}=e;return(0,wt.jsx)(_S,{__nextHasNoMarginBottom:!0,className:"components-custom-gradient-picker__type-picker",label:(0,a.__)("Type"),labelPosition:"top",onChange:t=>{"linear-gradient"===t&&n(wT({...e,orientation:e.orientation?void 0:vT,type:"linear-gradient"})),"radial-gradient"===t&&(()=>{const{orientation:t,...r}=e;n(wT({...r,type:"radial-gradient"}))})()},options:bT,size:"__unstable-large",value:t?r:void 0})};const PT=function({value:e,onChange:t,__experimentalIsRenderedInSidebar:n=!1}){const{gradientAST:r,hasGradient:o}=function(e){let t,n=!!e;const r=null!=e?e:gT;try{t=mT.parse(r)[0]}catch(e){console.warn("wp.components.CustomGradientPicker failed to parse the gradient with error",e),t=mT.parse(gT)[0],n=!1}if(Array.isArray(t.orientation)||"directional"!==t.orientation?.type||(t.orientation={type:"angular",value:xT[t.orientation.value].toString()}),t.colorStops.some(_T)){const{colorStops:e}=t,n=100/(e.length-1);e.forEach(((e,t)=>{e.length={value:""+n*t,type:"%"}}))}return{gradientAST:t,hasGradient:n}}(e),i=function(e){return wT({type:"linear-gradient",orientation:vT,colorStops:e.colorStops})}(r),s=r.colorStops.map((e=>({color:ST(e),position:parseInt(e.length.value)})));return(0,wt.jsxs)(jk,{spacing:4,className:"components-custom-gradient-picker",children:[(0,wt.jsx)(hT,{__experimentalIsRenderedInSidebar:n,background:i,hasGradient:o,value:s,onChange:e=>{t(wT(function(e,t){return{...e,colorStops:t.map((({position:e,color:t})=>{const{r:n,g:r,b:o,a:i}=Ev(t).toRgb();return{length:{type:"%",value:e?.toString()},type:i<1?"rgba":"rgb",value:i<1?[`${n}`,`${r}`,`${o}`,`${i}`]:[`${n}`,`${r}`,`${o}`]}}))}}(r,e)))}}),(0,wt.jsxs)(Ig,{gap:3,className:"components-custom-gradient-picker__ui-line",children:[(0,wt.jsx)(CT,{children:(0,wt.jsx)(ET,{gradientAST:r,hasGradient:o,onChange:t})}),(0,wt.jsx)(kT,{children:"linear-gradient"===r.type&&(0,wt.jsx)(jT,{gradientAST:r,hasGradient:o,onChange:t})})]})]})},TT=e=>e.length>0&&e.every((e=>{return t=e,Array.isArray(t.gradients)&&!("gradient"in t);var t}));function RT({className:e,clearGradient:t,gradients:n,onChange:r,value:o,...i}){const s=(0,c.useMemo)((()=>n.map((({gradient:e,name:n,slug:i},s)=>(0,wt.jsx)(kk.Option,{value:e,isSelected:o===e,tooltipText:n||(0,a.sprintf)((0,a.__)("Gradient code: %s"),e),style:{color:"rgba( 0,0,0,0 )",background:e},onClick:o===e?t:()=>r(e,s),"aria-label":n?(0,a.sprintf)((0,a.__)("Gradient: %s"),n):(0,a.sprintf)((0,a.__)("Gradient code: %s"),e)},i)))),[n,o,r,t]);return(0,wt.jsx)(kk.OptionGroup,{className:e,options:s,...i})}function IT({className:e,clearGradient:t,gradients:n,onChange:r,value:o,headingLevel:i}){const s=(0,l.useInstanceId)(IT);return(0,wt.jsx)(jk,{spacing:3,className:e,children:n.map((({name:e,gradients:n},a)=>{const l=`color-palette-${s}-${a}`;return(0,wt.jsxs)(jk,{spacing:2,children:[(0,wt.jsx)(Rk,{level:i,id:l,children:e}),(0,wt.jsx)(RT,{clearGradient:t,gradients:n,onChange:e=>r(e,a),value:o,"aria-labelledby":l})]},a)}))})}function NT(e){const{asButtons:t,loop:n,actions:r,headingLevel:o,"aria-label":i,"aria-labelledby":s,...l}=e,c=TT(e.gradients)?(0,wt.jsx)(IT,{headingLevel:o,...l}):(0,wt.jsx)(RT,{...l});let u;if(t)u={asButtons:!0};else{const e={asButtons:!1,loop:n};u=i?{...e,"aria-label":i}:s?{...e,"aria-labelledby":s}:{...e,"aria-label":(0,a.__)("Custom color picker.")}}return(0,wt.jsx)(kk,{...u,actions:r,options:c})}const MT=function({className:e,gradients:t=[],onChange:n,value:r,clearable:o=!0,disableCustomGradients:i=!1,__experimentalIsRenderedInSidebar:s,headingLevel:l=2,...u}){const d=(0,c.useCallback)((()=>n(void 0)),[n]);return(0,wt.jsxs)(jk,{spacing:t.length?4:0,children:[!i&&(0,wt.jsx)(PT,{__experimentalIsRenderedInSidebar:s,value:r,onChange:n}),(t.length>0||o)&&(0,wt.jsx)(NT,{...u,className:e,clearGradient:d,gradients:t,onChange:n,value:r,actions:o&&!i&&(0,wt.jsx)(kk.ButtonAction,{onClick:d,children:(0,a.__)("Clear")}),headingLevel:l})]})},AT=(0,wt.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wt.jsx)(n.Path,{d:"M5 5v1.5h14V5H5zm0 7.8h14v-1.5H5v1.5zM5 19h14v-1.5H5V19z"})}),DT=window.wp.dom,OT=()=>{},zT=["menuitem","menuitemradio","menuitemcheckbox"];class LT extends c.Component{constructor(e){super(e),this.onKeyDown=this.onKeyDown.bind(this),this.bindContainer=this.bindContainer.bind(this),this.getFocusableContext=this.getFocusableContext.bind(this),this.getFocusableIndex=this.getFocusableIndex.bind(this)}componentDidMount(){this.container&&this.container.addEventListener("keydown",this.onKeyDown)}componentWillUnmount(){this.container&&this.container.removeEventListener("keydown",this.onKeyDown)}bindContainer(e){const{forwardedRef:t}=this.props;this.container=e,"function"==typeof t?t(e):t&&"current"in t&&(t.current=e)}getFocusableContext(e){if(!this.container)return null;const{onlyBrowserTabstops:t}=this.props,n=(t?DT.focus.tabbable:DT.focus.focusable).find(this.container),r=this.getFocusableIndex(n,e);return r>-1&&e?{index:r,target:e,focusables:n}:null}getFocusableIndex(e,t){return e.indexOf(t)}onKeyDown(e){this.props.onKeyDown&&this.props.onKeyDown(e);const{getFocusableContext:t}=this,{cycle:n=!0,eventToOffset:r,onNavigate:o=OT,stopNavigationEvents:i}=this.props,s=r(e);if(void 0!==s&&i){e.stopImmediatePropagation();const t=e.target?.getAttribute("role");!!t&&zT.includes(t)&&e.preventDefault()}if(!s)return;const a=e.target?.ownerDocument?.activeElement;if(!a)return;const l=t(a);if(!l)return;const{index:c,focusables:u}=l,d=n?function(e,t,n){const r=e+n;return r<0?t+r:r>=t?r-t:r}(c,u.length,s):c+s;d>=0&&d<u.length&&(u[d].focus(),o(d,u[d]),"Tab"===e.code&&e.preventDefault())}render(){const{children:e,stopNavigationEvents:t,eventToOffset:n,onNavigate:r,onKeyDown:o,cycle:i,onlyBrowserTabstops:s,forwardedRef:a,...l}=this.props;return(0,wt.jsx)("div",{ref:this.bindContainer,...l,children:e})}}const FT=(e,t)=>(0,wt.jsx)(LT,{...e,forwardedRef:t});FT.displayName="NavigableContainer";const BT=(0,c.forwardRef)(FT);const VT=(0,c.forwardRef)((function({role:e="menu",orientation:t="vertical",...n},r){return(0,wt.jsx)(BT,{ref:r,stopNavigationEvents:!0,onlyBrowserTabstops:!1,role:e,"aria-orientation":"presentation"===e||"vertical"!==t&&"horizontal"!==t?void 0:t,eventToOffset:e=>{const{code:n}=e;let r=["ArrowDown"],o=["ArrowUp"];return"horizontal"===t&&(r=["ArrowRight"],o=["ArrowLeft"]),"both"===t&&(r=["ArrowRight","ArrowDown"],o=["ArrowLeft","ArrowUp"]),r.includes(n)?1:o.includes(n)?-1:["ArrowDown","ArrowUp","ArrowLeft","ArrowRight"].includes(n)?0:void 0},...n})})),$T=VT;function HT(e={},t={}){const n={...e,...t};return t.className&&e.className&&(n.className=s(t.className,e.className)),n}function WT(e){return"function"==typeof e}const UT=Za((function(e){const{children:t,className:n,controls:r,icon:o=AT,label:i,popoverProps:a,toggleProps:l,menuProps:c,disableOpenOnArrowDown:u=!1,text:d,noIcons:p,open:f,defaultOpen:h,onToggle:m,variant:g}=Ya(e,"DropdownMenu");if(!r?.length&&!WT(t))return null;let v;r?.length&&(v=r,Array.isArray(v[0])||(v=[r]));const b=HT({className:"components-dropdown-menu__popover",variant:g},a);return(0,wt.jsx)(rS,{className:n,popoverProps:b,renderToggle:({isOpen:e,onToggle:t})=>{var n;const{as:r=sy,...a}=null!=l?l:{},c=HT({className:s("components-dropdown-menu__toggle",{"is-opened":e})},a);return(0,wt.jsx)(r,{...c,icon:o,onClick:e=>{t(),c.onClick&&c.onClick(e)},onKeyDown:n=>{(n=>{u||e||"ArrowDown"!==n.code||(n.preventDefault(),t())})(n),c.onKeyDown&&c.onKeyDown(n)},"aria-haspopup":"true","aria-expanded":e,label:i,text:d,showTooltip:null===(n=l?.showTooltip)||void 0===n||n,children:c.children})},renderContent:e=>{const n=HT({"aria-label":i,className:s("components-dropdown-menu__menu",{"no-icons":p})},c);return(0,wt.jsxs)($T,{...n,role:"menu",children:[WT(t)?t(e):null,v?.flatMap(((t,n)=>t.map(((t,r)=>(0,wt.jsx)(sy,{onClick:n=>{n.stopPropagation(),e.onClose(),t.onClick&&t.onClick()},className:s("components-dropdown-menu__menu-item",{"has-separator":n>0&&0===r,"is-active":t.isActive,"is-icon-only":!t.title}),icon:t.icon,label:t.label,"aria-checked":"menuitemcheckbox"===t.role||"menuitemradio"===t.role?t.isActive:void 0,role:"menuitemcheckbox"===t.role||"menuitemradio"===t.role?t.role:"menuitem",accessibleWhenDisabled:!0,disabled:t.isDisabled,children:t.title},[n,r].join())))))]})},open:f,defaultOpen:h,onToggle:m})}),"DropdownMenu"),GT=UT;const KT=cl(Q_,{target:"e1lpqc909"})("&&{flex-shrink:0;width:",wl(6),";height:",wl(6),";}"),qT=cl(ty,{target:"e1lpqc908"})(sb,"{background:",jl.gray[100],";border-radius:",Tl.radiusXSmall,";",fb,fb,fb,fb,"{height:",wl(8),";}",tb,tb,tb,"{border-color:transparent;box-shadow:none;}}"),YT=({as:e})=>"button"===e?bl("display:flex;align-items:center;width:100%;appearance:none;background:transparent;border:none;border-radius:0;padding:0;cursor:pointer;&:hover{color:",jl.theme.accent,";}",""):null,XT=cl(dl,{target:"e1lpqc907"})(YT," padding-block:3px;padding-inline-start:",wl(3),";border:1px solid ",Tl.surfaceBorderColor,";border-bottom-color:transparent;font-size:",Fx("default.fontSize"),";&:focus-visible{border-color:transparent;box-shadow:0 0 0 var( --wp-admin-border-width-focus ) ",jl.theme.accent,";outline:2px solid transparent;outline-offset:0;}border-top-left-radius:",Tl.radiusSmall,";border-top-right-radius:",Tl.radiusSmall,";&+&{border-top-left-radius:0;border-top-right-radius:0;}&:last-child{border-bottom-left-radius:",Tl.radiusSmall,";border-bottom-right-radius:",Tl.radiusSmall,";border-bottom-color:",Tl.surfaceBorderColor,";}&.is-selected+&{border-top-color:transparent;}&.is-selected{border-color:",jl.theme.accent,";}"),ZT=cl("div",{target:"e1lpqc906"})("line-height:",wl(8),";margin-left:",wl(2),";margin-right:",wl(2),";white-space:nowrap;overflow:hidden;"),QT=cl(Tk,{target:"e1lpqc905"})("text-transform:uppercase;line-height:",wl(6),";font-weight:500;&&&{font-size:11px;margin-bottom:0;}"),JT=cl(dl,{target:"e1lpqc904"})("height:",wl(6),";display:flex;"),eR=cl(dl,{target:"e1lpqc903"})("margin-top:",wl(2),";"),tR=cl(dl,{target:"e1lpqc902"})({name:"u6wnko",styles:"&&&{.components-button.has-icon{min-width:0;padding:0;}}"}),nR=cl(sy,{target:"e1lpqc901"})("&&{color:",jl.theme.accent,";}"),rR=cl(sy,{target:"e1lpqc900"})("&&{margin-top:",wl(1),";}");function oR({value:e,onChange:t,label:n}){return(0,wt.jsx)(qT,{label:n,hideLabelFromVision:!0,value:e,onChange:t})}function iR({isGradient:e,element:t,onChange:n,popoverProps:r,onClose:o=(()=>{})}){const i=(0,c.useMemo)((()=>({shift:!0,offset:20,resize:!1,placement:"left-start",...r,className:s("components-palette-edit__popover",r?.className)})),[r]);return(0,wt.jsxs)(Dw,{...i,onClose:o,children:[!e&&(0,wt.jsx)(vk,{color:t.color,enableAlpha:!0,onChange:e=>{n({...t,color:e})}}),e&&(0,wt.jsx)("div",{className:"components-palette-edit__popover-gradient-picker",children:(0,wt.jsx)(PT,{__experimentalIsRenderedInSidebar:!0,value:t.gradient,onChange:e=>{n({...t,gradient:e})}})})]})}function sR({canOnlyChangeValues:e,element:t,onChange:n,onRemove:r,popoverProps:o,slugPrefix:i,isGradient:s}){const l=s?t.gradient:t.color,[u,d]=(0,c.useState)(!1),[p,f]=(0,c.useState)(null),h=(0,c.useMemo)((()=>({...o,anchor:p})),[p,o]);return(0,wt.jsxs)(XT,{ref:f,as:"div",children:[(0,wt.jsxs)(yy,{justify:"flex-start",children:[(0,wt.jsx)(sy,{onClick:()=>{d(!0)},"aria-label":(0,a.sprintf)((0,a.__)("Edit: %s"),t.name.trim().length?t.name:l),style:{padding:0},children:(0,wt.jsx)(KT,{colorValue:l})}),(0,wt.jsx)(Gg,{children:e?(0,wt.jsx)(ZT,{children:t.name.trim().length?t.name:" "}):(0,wt.jsx)(oR,{label:s?(0,a.__)("Gradient name"):(0,a.__)("Color name"),value:t.name,onChange:e=>n({...t,name:e,slug:i+zy(null!=e?e:"")})})}),!e&&(0,wt.jsx)(Gg,{children:(0,wt.jsx)(rR,{size:"small",icon:t_,label:(0,a.sprintf)((0,a.__)("Remove color: %s"),t.name.trim().length?t.name:l),onClick:r})})]}),u&&(0,wt.jsx)(iR,{isGradient:s,onChange:n,element:t,popoverProps:h,onClose:()=>d(!1)})]})}function aR({elements:e,onChange:t,canOnlyChangeValues:n,slugPrefix:r,isGradient:o,popoverProps:i,addColorRef:s}){const a=(0,c.useRef)();(0,c.useEffect)((()=>{a.current=e}),[e]);const u=(0,l.useDebounce)((e=>t(function(e){const t={};return e.map((e=>{var n;let r;const{slug:o}=e;return t[o]=(t[o]||0)+1,t[o]>1&&(r=`${o}-${t[o]-1}`),{...e,slug:null!==(n=r)&&void 0!==n?n:o}}))}(e))),100);return(0,wt.jsx)(jk,{spacing:3,children:(0,wt.jsx)(JP,{isRounded:!0,children:e.map(((a,l)=>(0,wt.jsx)(sR,{isGradient:o,canOnlyChangeValues:n,element:a,onChange:t=>{u(e.map(((e,n)=>n===l?t:e)))},onRemove:()=>{const n=e.filter(((e,t)=>t!==l));t(n.length?n:void 0),s.current?.focus()},slugPrefix:r,popoverProps:i},l)))})})}const lR=[];const cR=function({gradients:e,colors:t=lR,onChange:n,paletteLabel:r,paletteLabelHeadingLevel:o=2,emptyMessage:i,canOnlyChangeValues:s,canReset:u,slugPrefix:d="",popoverProps:p}){const f=!!e,h=f?e:t,[m,g]=(0,c.useState)(!1),[v,b]=(0,c.useState)(null),x=m&&!!v&&h[v]&&!h[v].slug,y=h.length>0,w=(0,l.useDebounce)(n,100),_=(0,c.useCallback)(((e,t)=>{const n=void 0===t?void 0:h[t];n&&n[f?"gradient":"color"]===e?b(t):g(!0)}),[f,h]),S=(0,c.useRef)(null);return(0,wt.jsxs)(tR,{children:[(0,wt.jsxs)(yy,{children:[(0,wt.jsx)(QT,{level:o,children:r}),(0,wt.jsxs)(JT,{children:[y&&m&&(0,wt.jsx)(nR,{size:"small",onClick:()=>{g(!1),b(null)},children:(0,a.__)("Done")}),!s&&(0,wt.jsx)(sy,{ref:S,size:"small",isPressed:x,icon:Wg,label:f?(0,a.__)("Add gradient"):(0,a.__)("Add color"),onClick:()=>{const{name:r,slug:o}=function(e,t){const n=new RegExp(`^${t}color-([\\d]+)$`),r=e.reduce(((e,t)=>{if("string"==typeof t?.slug){const r=t?.slug.match(n);if(r){const t=parseInt(r[1],10);if(t>=e)return t+1}}return e}),1);return{name:(0,a.sprintf)((0,a.__)("Color %s"),r),slug:`${t}color-${r}`}}(h,d);n(e?[...e,{gradient:gT,name:r,slug:o}]:[...t,{color:"#000",name:r,slug:o}]),g(!0),b(h.length)}}),y&&(!m||!s||u)&&(0,wt.jsx)(GT,{icon:zP,label:f?(0,a.__)("Gradient options"):(0,a.__)("Color options"),toggleProps:{size:"small"},children:({onClose:e})=>(0,wt.jsx)(wt.Fragment,{children:(0,wt.jsxs)($T,{role:"menu",children:[!m&&(0,wt.jsx)(sy,{variant:"tertiary",onClick:()=>{g(!0),e()},className:"components-palette-edit__menu-button",children:(0,a.__)("Show details")}),!s&&(0,wt.jsx)(sy,{variant:"tertiary",onClick:()=>{b(null),g(!1),n(),e()},className:"components-palette-edit__menu-button",children:f?(0,a.__)("Remove all gradients"):(0,a.__)("Remove all colors")}),u&&(0,wt.jsx)(sy,{variant:"tertiary",onClick:()=>{b(null),n(),e()},children:f?(0,a.__)("Reset gradient"):(0,a.__)("Reset colors")})]})})})]})]}),y&&(0,wt.jsxs)(eR,{children:[m&&(0,wt.jsx)(aR,{canOnlyChangeValues:s,elements:h,onChange:n,slugPrefix:d,isGradient:f,popoverProps:p,addColorRef:S}),!m&&null!==v&&(0,wt.jsx)(iR,{isGradient:f,onClose:()=>b(null),onChange:e=>{w(h.map(((t,n)=>n===v?e:t)))},element:h[null!=v?v:-1],popoverProps:p}),!m&&(f?(0,wt.jsx)(MT,{gradients:e,onChange:_,clearable:!1,disableCustomGradients:!0}):(0,wt.jsx)(Bk,{colors:t,onChange:_,clearable:!1,disableCustomColors:!0}))]}),!y&&i&&(0,wt.jsx)(eR,{children:i})]})},uR=({__next40pxDefaultSize:e})=>!e&&bl("height:28px;padding-left:",wl(1),";padding-right:",wl(1),";",""),dR=cl(Ig,{target:"evuatpg0"})("height:38px;padding-left:",wl(2),";padding-right:",wl(2),";",uR,";");const pR=(0,c.forwardRef)((function(e,t){const{value:n,isExpanded:r,instanceId:o,selectedSuggestionIndex:i,className:a,onChange:l,onFocus:u,onBlur:d,...p}=e,[f,h]=(0,c.useState)(!1),m=n?n.length+1:0;return(0,wt.jsx)("input",{ref:t,id:`components-form-token-input-${o}`,type:"text",...p,value:n||"",onChange:e=>{l&&l({value:e.target.value})},onFocus:e=>{h(!0),u?.(e)},onBlur:e=>{h(!1),d?.(e)},size:m,className:s(a,"components-form-token-field__input"),autoComplete:"off",role:"combobox","aria-expanded":r,"aria-autocomplete":"list","aria-owns":r?`components-form-token-suggestions-${o}`:void 0,"aria-activedescendant":f&&-1!==i&&r?`components-form-token-suggestions-${o}-${i}`:void 0,"aria-describedby":`components-form-token-suggestions-howto-${o}`})})),fR=pR,hR=e=>{e.preventDefault()};const mR=function({selectedIndex:e,scrollIntoView:t,match:n,onHover:r,onSelect:o,suggestions:i=[],displayTransform:a,instanceId:c,__experimentalRenderItem:u}){const d=(0,l.useRefEffect)((n=>(e>-1&&t&&n.children[e]&&n.children[e].scrollIntoView({behavior:"instant",block:"nearest",inline:"nearest"}),()=>{0})),[e,t]),p=e=>()=>{r?.(e)},f=e=>()=>{o?.(e)};return(0,wt.jsx)("ul",{ref:d,className:"components-form-token-field__suggestions-list",id:`components-form-token-suggestions-${c}`,role:"listbox",children:i.map(((t,r)=>{const o=(e=>{const t=a(n).toLocaleLowerCase();if(0===t.length)return null;const r=a(e),o=r.toLocaleLowerCase().indexOf(t);return{suggestionBeforeMatch:r.substring(0,o),suggestionMatch:r.substring(o,o+t.length),suggestionAfterMatch:r.substring(o+t.length)}})(t),i=r===e,l="object"==typeof t&&t?.disabled,d="object"==typeof t&&"value"in t?t?.value:a(t),h=s("components-form-token-field__suggestion",{"is-selected":i});let m;return m="function"==typeof u?u({item:t}):o?(0,wt.jsxs)("span",{"aria-label":a(t),children:[o.suggestionBeforeMatch,(0,wt.jsx)("strong",{className:"components-form-token-field__suggestion-match",children:o.suggestionMatch}),o.suggestionAfterMatch]}):a(t),(0,wt.jsx)("li",{id:`components-form-token-suggestions-${c}-${r}`,role:"option",className:h,onMouseDown:hR,onClick:f(t),onMouseEnter:p(t),"aria-selected":r===e,"aria-disabled":l,children:m},d)}))})},gR=(0,l.createHigherOrderComponent)((e=>t=>{const[n,r]=(0,c.useState)(void 0),o=(0,c.useCallback)((e=>r((()=>e?.handleFocusOutside?e.handleFocusOutside.bind(e):void 0))),[]);return(0,wt.jsx)("div",{...(0,l.__experimentalUseFocusOutside)(n),children:(0,wt.jsx)(e,{ref:o,...t})})}),"withFocusOutside"),vR=()=>{},bR=gR(class extends c.Component{handleFocusOutside(e){this.props.onFocusOutside(e)}render(){return this.props.children}}),xR=(e,t)=>null===e?-1:t.indexOf(e);const yR=function e(t){var n;const{__nextHasNoMarginBottom:r=!1,__next40pxDefaultSize:o=!1,value:i,label:u,options:d,onChange:p,onFilterValueChange:f=vR,hideLabelFromVision:h,help:m,allowReset:g=!0,className:v,messages:b={selected:(0,a.__)("Item selected.")},__experimentalRenderItem:x,expandOnFocus:y=!0,placeholder:w}=_b(t),[_,S]=E_({value:i,onChange:p}),C=d.find((e=>e.value===_)),k=null!==(n=C?.label)&&void 0!==n?n:"",j=(0,l.useInstanceId)(e,"combobox-control"),[E,P]=(0,c.useState)(C||null),[T,R]=(0,c.useState)(!1),[I,N]=(0,c.useState)(!1),[M,A]=(0,c.useState)(""),D=(0,c.useRef)(null),O=(0,c.useMemo)((()=>{const e=[],t=[],n=Oy(M);return d.forEach((r=>{const o=Oy(r.label).indexOf(n);0===o?e.push(r):o>0&&t.push(r)})),e.concat(t)}),[M,d]),z=e=>{e.disabled||(S(e.value),(0,My.speak)(b.selected,"assertive"),P(e),A(""),R(!1))},L=(e=1)=>{let t=xR(E,O)+e;t<0?t=O.length-1:t>=O.length&&(t=0),P(O[t]),R(!0)},F=Ax((e=>{let t=!1;if(!e.defaultPrevented){switch(e.code){case"Enter":E&&(z(E),t=!0);break;case"ArrowUp":L(-1),t=!0;break;case"ArrowDown":L(1),t=!0;break;case"Escape":R(!1),P(null),t=!0}t&&e.preventDefault()}}));return(0,c.useEffect)((()=>{const e=O.length>0,t=xR(E,O)>0;e&&!t&&P(O[0])}),[O,E]),(0,c.useEffect)((()=>{const e=O.length>0;if(T){const t=e?(0,a.sprintf)((0,a._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",O.length),O.length):(0,a.__)("No results.");(0,My.speak)(t,"polite")}}),[O,T]),(0,wt.jsx)(bR,{onFocusOutside:()=>{R(!1)},children:(0,wt.jsx)(Qx,{__nextHasNoMarginBottom:r,__associatedWPComponentName:"ComboboxControl",className:s(v,"components-combobox-control"),label:u,id:`components-form-token-input-${j}`,hideLabelFromVision:h,help:m,children:(0,wt.jsxs)("div",{className:"components-combobox-control__suggestions-container",tabIndex:-1,onKeyDown:F,children:[(0,wt.jsxs)(dR,{__next40pxDefaultSize:o,children:[(0,wt.jsx)(Mg,{children:(0,wt.jsx)(fR,{className:"components-combobox-control__input",instanceId:j,ref:D,placeholder:w,value:T?M:k,onFocus:()=>{N(!0),y&&R(!0),f(""),A("")},onBlur:()=>{N(!1)},onClick:()=>{R(!0)},isExpanded:T,selectedSuggestionIndex:xR(E,O),onChange:e=>{const t=e.value;A(t),f(t),I&&R(!0)}})}),g&&(0,wt.jsx)(Gg,{children:(0,wt.jsx)(sy,{className:"components-combobox-control__reset",icon:e_,disabled:!_,onClick:()=>{S(null),D.current?.focus()},onKeyDown:e=>{e.stopPropagation()},label:(0,a.__)("Reset")})})]}),T&&(0,wt.jsx)(mR,{instanceId:j,match:{label:M,value:""},displayTransform:e=>e.label,suggestions:O,selectedIndex:xR(E,O),onHover:P,onSelect:z,scrollIntoView:!0,__experimentalRenderItem:x})]})})})};function wR(e){if(e.state){const{state:t,...n}=e,{store:r,...o}=wR(t);return{...n,...o,store:r}}return e}const _R={__unstableComposite:"Composite",__unstableCompositeGroup:"Composite.Group or Composite.Row",__unstableCompositeItem:"Composite.Item",__unstableUseCompositeState:"Composite"};function SR(e,t={}){var n;const r=null!==(n=e.displayName)&&void 0!==n?n:"",o=n=>{Fi()(`wp.components.${r}`,{since:"6.7",alternative:_R.hasOwnProperty(r)?_R[r]:void 0});const{store:o,...i}=wR(n),s=i;return s.id=(0,l.useInstanceId)(o,s.baseId,s.id),Object.entries(t).forEach((([e,t])=>{s.hasOwnProperty(e)&&(Object.assign(s,{[t]:s[e]}),delete s[e])})),delete s.baseId,(0,wt.jsx)(e,{...s,store:o})};return o.displayName=r,o}const CR=(0,c.forwardRef)((({role:e,...t},n)=>{const r="row"===e?Dn.Row:Dn.Group;return(0,wt.jsx)(r,{ref:n,role:e,...t})})),kR=SR(Object.assign(Dn,{displayName:"__unstableComposite"}),{baseId:"id"}),jR=SR(Object.assign(CR,{displayName:"__unstableCompositeGroup"})),ER=SR(Object.assign(Dn.Item,{displayName:"__unstableCompositeItem"}),{focusable:"accessibleWhenDisabled"});function PR(e={}){Fi()("wp.components.__unstableUseCompositeState",{since:"6.7",alternative:_R.__unstableUseCompositeState});const{baseId:t,currentId:n,orientation:r,rtl:o=!1,loop:i=!1,wrap:s=!1,shift:a=!1,unstable_virtual:c}=e;return{baseId:(0,l.useInstanceId)(kR,"composite",t),store:gt({defaultActiveId:n,rtl:o,orientation:r,focusLoop:i,focusShift:a,focusWrap:s,virtualFocus:c})}}const TR=new Set(["alert","status","log","marquee","timer"]),RR=[];function IR(e){const t=e.getAttribute("role");return!("SCRIPT"===e.tagName||e.hasAttribute("aria-hidden")||e.hasAttribute("aria-live")||t&&TR.has(t))}const NR=Tl.transitionDuration,MR=Number.parseInt(Tl.transitionDuration),AR="components-modal__disappear-animation";const DR=(0,c.createContext)(new Set),OR=new Map;const zR=(0,c.forwardRef)((function(e,t){const{bodyOpenClassName:n="modal-open",role:r="dialog",title:o=null,focusOnMount:i=!0,shouldCloseOnEsc:u=!0,shouldCloseOnClickOutside:d=!0,isDismissible:p=!0,aria:f={labelledby:void 0,describedby:void 0},onRequestClose:h,icon:m,closeButtonLabel:g,children:v,style:b,overlayClassName:x,className:y,contentLabel:w,onKeyDown:_,isFullScreen:S=!1,size:C,headerActions:k=null,__experimentalHideHeader:j=!1}=e,E=(0,c.useRef)(),P=(0,l.useInstanceId)(zR),T=o?`components-modal-header-${P}`:f.labelledby,R=(0,l.useFocusOnMount)("firstContentElement"===i?"firstElement":i),I=(0,l.useConstrainedTabbing)(),N=(0,l.useFocusReturn)(),M=(0,c.useRef)(null),A=(0,c.useRef)(null),[D,O]=(0,c.useState)(!1),[z,L]=(0,c.useState)(!1);let F;S||"fill"===C?F="is-full-screen":C&&(F=`has-size-${C}`);const B=(0,c.useCallback)((()=>{if(!M.current)return;const e=(0,DT.getScrollContainer)(M.current);M.current===e?L(!0):L(!1)}),[M]);(0,c.useEffect)((()=>(function(e){const t=Array.from(document.body.children),n=[];RR.push(n);for(const r of t)r!==e&&IR(r)&&(r.setAttribute("aria-hidden","true"),n.push(r))}(E.current),()=>function(){const e=RR.pop();if(e)for(const t of e)t.removeAttribute("aria-hidden")}())),[]);const V=(0,c.useRef)();(0,c.useEffect)((()=>{V.current=h}),[h]);const $=(0,c.useContext)(DR),[H]=(0,c.useState)((()=>new Set));(0,c.useEffect)((()=>{$.add(V);for(const e of $)e!==V&&e.current?.();return()=>{for(const e of H)e.current?.();$.delete(V)}}),[$,H]),(0,c.useEffect)((()=>{var e;const t=n,r=1+(null!==(e=OR.get(t))&&void 0!==e?e:0);return OR.set(t,r),document.body.classList.add(n),()=>{const e=OR.get(t)-1;0===e?(document.body.classList.remove(t),OR.delete(t)):OR.set(t,e)}}),[n]);const{closeModal:W,frameRef:U,frameStyle:G,overlayClassname:K}=function(){const e=(0,c.useRef)(),[t,n]=(0,c.useState)(!1),r=(0,l.useReducedMotion)(),o=(0,c.useCallback)((()=>new Promise((t=>{const o=e.current;if(r)return void t();if(!o)return void t();let i;Promise.race([new Promise((e=>{i=t=>{t.animationName===AR&&e()},o.addEventListener("animationend",i),n(!0)})),new Promise((e=>{setTimeout((()=>e()),1.2*MR)}))]).then((()=>{i&&o.removeEventListener("animationend",i),n(!1),t()}))}))),[r]);return{overlayClassname:t?"is-animating-out":void 0,frameRef:e,frameStyle:{"--modal-frame-animation-duration":`${NR}`},closeModal:o}}();(0,c.useLayoutEffect)((()=>{if(!window.ResizeObserver||!A.current)return;const e=new ResizeObserver(B);return e.observe(A.current),B(),()=>{e.disconnect()}}),[B,A]);const q=(0,c.useCallback)((e=>{var t;const n=null!==(t=e?.currentTarget?.scrollTop)&&void 0!==t?t:-1;!D&&n>0?O(!0):D&&n<=0&&O(!1)}),[D]);let Y=null;const X={onPointerDown:e=>{e.target===e.currentTarget&&(Y=e.target,e.preventDefault())},onPointerUp:({target:e,button:t})=>{const n=e===Y;Y=null,0===t&&n&&W().then((()=>h()))}},Z=(0,wt.jsx)("div",{ref:(0,l.useMergeRefs)([E,t]),className:s("components-modal__screen-overlay",K,x),onKeyDown:Ax((function(e){!u||"Escape"!==e.code&&"Escape"!==e.key||e.defaultPrevented||(e.preventDefault(),W().then((()=>h(e))))})),...d?X:{},children:(0,wt.jsx)(vw,{document,children:(0,wt.jsx)("div",{className:s("components-modal__frame",F,y),style:{...G,...b},ref:(0,l.useMergeRefs)([U,I,N,"firstContentElement"!==i?R:null]),role:r,"aria-label":w,"aria-labelledby":w?void 0:T,"aria-describedby":f.describedby,tabIndex:-1,onKeyDown:_,children:(0,wt.jsxs)("div",{className:s("components-modal__content",{"hide-header":j,"is-scrollable":z,"has-scrolled-content":D}),role:"document",onScroll:q,ref:M,"aria-label":z?(0,a.__)("Scrollable section"):void 0,tabIndex:z?0:void 0,children:[!j&&(0,wt.jsxs)("div",{className:"components-modal__header",children:[(0,wt.jsxs)("div",{className:"components-modal__header-heading-container",children:[m&&(0,wt.jsx)("span",{className:"components-modal__icon-container","aria-hidden":!0,children:m}),o&&(0,wt.jsx)("h1",{id:T,className:"components-modal__header-heading",children:o})]}),k,p&&(0,wt.jsxs)(wt.Fragment,{children:[(0,wt.jsx)(Hg,{marginBottom:0,marginLeft:3}),(0,wt.jsx)(sy,{size:"small",onClick:e=>W().then((()=>h(e))),icon:Gy,label:g||(0,a.__)("Close")})]})]}),(0,wt.jsx)("div",{ref:(0,l.useMergeRefs)([A,"firstContentElement"===i?R:null]),children:v})]})})})});return(0,c.createPortal)((0,wt.jsx)(DR.Provider,{value:H,children:Z}),document.body)})),LR=zR;const FR={name:"7g5ii0",styles:"&&{z-index:1000001;}"},BR=Xa(((e,t)=>{const{isOpen:n,onConfirm:r,onCancel:o,children:i,confirmButtonText:s,cancelButtonText:l,...u}=Ya(e,"ConfirmDialog"),d=qa()(FR),p=(0,c.useRef)(),f=(0,c.useRef)(),[h,m]=(0,c.useState)(),[g,v]=(0,c.useState)();(0,c.useEffect)((()=>{const e=void 0!==n;m(!e||n),v(!e)}),[n]);const b=(0,c.useCallback)((e=>t=>{e?.(t),g&&m(!1)}),[g,m]),x=(0,c.useCallback)((e=>{e.target===p.current||e.target===f.current||"Enter"!==e.key||b(r)(e)}),[b,r]),y=null!=l?l:(0,a.__)("Cancel"),w=null!=s?s:(0,a.__)("OK");return(0,wt.jsx)(wt.Fragment,{children:h&&(0,wt.jsx)(LR,{onRequestClose:b(o),onKeyDown:x,closeButtonLabel:y,isDismissible:!0,ref:t,overlayClassName:d,__experimentalHideHeader:!0,...u,children:(0,wt.jsxs)(jk,{spacing:8,children:[(0,wt.jsx)(Xv,{children:i}),(0,wt.jsxs)(Ig,{direction:"row",justify:"flex-end",children:[(0,wt.jsx)(sy,{__next40pxDefaultSize:!0,ref:p,variant:"tertiary",onClick:b(o),children:y}),(0,wt.jsx)(sy,{__next40pxDefaultSize:!0,ref:f,variant:"primary",onClick:b(r),children:w})]})]})})})}),"ConfirmDialog");(0,B.createContext)(void 0);var VR=jt([ir,Nt],[sr,Mt]),$R=VR.useContext,HR=(VR.useScopedContext,VR.useProviderContext);VR.ContextProvider,VR.ScopedContextProvider,(0,B.createContext)(void 0),(0,B.createContext)(!1);function WR(e={}){var t=e,{combobox:n}=t,r=T(t,["combobox"]);const o=qe(r.store,Ke(n,["value","items","renderedItems","baseElement","arrowElement","anchorElement","contentElement","popoverElement","disclosureElement"])),i=o.getState(),s=ht(P(E({},r),{store:o,virtualFocus:F(r.virtualFocus,i.virtualFocus,!0),includesBaseElement:F(r.includesBaseElement,i.includesBaseElement,!1),activeId:F(r.activeId,i.activeId,r.defaultActiveId,null),orientation:F(r.orientation,i.orientation,"vertical")})),a=Hn(P(E({},r),{store:o,placement:F(r.placement,i.placement,"bottom-start")})),l=new String(""),c=P(E(E({},s.getState()),a.getState()),{value:F(r.value,i.value,r.defaultValue,l),setValueOnMove:F(r.setValueOnMove,i.setValueOnMove,!1),labelElement:F(i.labelElement,null),selectElement:F(i.selectElement,null),listElement:F(i.listElement,null)}),u=Ve(c,s,a,o);return $e(u,(()=>Ue(u,["value","items"],(e=>{if(e.value!==l)return;if(!e.items.length)return;const t=e.items.find((e=>!e.disabled&&null!=e.value));null!=(null==t?void 0:t.value)&&u.setState("value",t.value)})))),$e(u,(()=>Ue(u,["mounted"],(e=>{e.mounted||u.setState("activeId",c.activeId)})))),$e(u,(()=>Ue(u,["mounted","items","value"],(e=>{if(n)return;if(e.mounted)return;const t=ot(e.value),r=t[t.length-1];if(null==r)return;const o=e.items.find((e=>!e.disabled&&e.value===r));o&&u.setState("activeId",o.id)})))),$e(u,(()=>Ge(u,["setValueOnMove","moves"],(e=>{const{mounted:t,value:n,activeId:r}=u.getState();if(!e.setValueOnMove&&t)return;if(Array.isArray(n))return;if(!e.moves)return;if(!r)return;const o=s.item(r);o&&!o.disabled&&null!=o.value&&u.setState("value",o.value)})))),P(E(E(E({},s),a),u),{combobox:n,setValue:e=>u.setState("value",e),setLabelElement:e=>u.setState("labelElement",e),setSelectElement:e=>u.setState("selectElement",e),setListElement:e=>u.setState("listElement",e)})}function UR(e={}){const t=HR();e=b(v({},e),{combobox:void 0!==e.combobox?e.combobox:t});const[n,r]=et(WR,e);return function(e,t,n){return Pe(t,[n.combobox]),Je(e,n,"value","setValue"),Je(e,n,"setValueOnMove"),Object.assign(Vn(mt(e,t,n),t,n),{combobox:n.combobox})}(n,r,e)}var GR=jt([ir,Nt],[sr,Mt]),KR=GR.useContext,qR=GR.useScopedContext,YR=GR.useProviderContext,XR=(GR.ContextProvider,GR.ScopedContextProvider),ZR=(0,B.createContext)(!1),QR=(0,B.createContext)(null),JR=kt((function(e){var t=e,{store:n}=t,r=x(t,["store"]);const o=YR();D(n=n||o,!1);const i=je(r.id),s=r.onClick,a=Se((e=>{null==s||s(e),e.defaultPrevented||queueMicrotask((()=>{const e=null==n?void 0:n.getState().selectElement;null==e||e.focus()}))}));return L(r=b(v({id:i},r),{ref:ke(n.setLabelElement,r.ref),onClick:a,style:v({cursor:"default"},r.style)}))})),eI=St(_t((function(e){return Ct("div",JR(e))}))),tI="button",nI=kt((function(e){const t=(0,B.useRef)(null),n=Ee(t,tI),[r,o]=(0,B.useState)((()=>!!n&&Z({tagName:n,type:e.type})));return(0,B.useEffect)((()=>{t.current&&o(Z(t.current))}),[]),e=b(v({role:r||"a"===n?void 0:"button"},e),{ref:ke(t,e.ref)}),e=kn(e)})),rI=(_t((function(e){const t=nI(e);return Ct(tI,t)})),Symbol("disclosure")),oI=kt((function(e){var t=e,{store:n,toggleOnClick:r=!0}=t,o=x(t,["store","toggleOnClick"]);const i=Yn();D(n=n||i,!1);const s=(0,B.useRef)(null),[a,l]=(0,B.useState)(!1),c=n.useState("disclosureElement"),u=n.useState("open");(0,B.useEffect)((()=>{let e=c===s.current;(null==c?void 0:c.isConnected)||(null==n||n.setDisclosureElement(s.current),e=!0),l(u&&e)}),[c,n,u]);const d=o.onClick,p=Re(r),[f,h]=Me(o,rI,!0),m=Se((e=>{null==d||d(e),e.defaultPrevented||f||p(e)&&(null==n||n.setDisclosureElement(e.currentTarget),null==n||n.toggle())})),g=n.useState("contentElement");return o=b(v(v({"aria-expanded":a,"aria-controls":null==g?void 0:g.id},h),o),{ref:ke(s,o.ref),onClick:m}),o=nI(o)})),iI=(_t((function(e){return Ct("button",oI(e))})),kt((function(e){var t=e,{store:n}=t,r=x(t,["store"]);const o=Zn();D(n=n||o,!1);const i=n.useState("contentElement");return r=v({"aria-haspopup":ne(i,"dialog")},r),r=oI(v({store:n},r))}))),sI=(_t((function(e){return Ct("button",iI(e))})),kt((function(e){var t=e,{store:n}=t,r=x(t,["store"]);const o=or();return n=n||o,r=b(v({},r),{ref:ke(null==n?void 0:n.setAnchorElement,r.ref)})}))),aI=(_t((function(e){return Ct("div",sI(e))})),kt((function(e){var t=e,{store:n}=t,r=x(t,["store"]);const o=or();D(n=n||o,!1);const i=r.onClick,s=Se((e=>{null==n||n.setAnchorElement(e.currentTarget),null==i||i(e)}));return r=Ie(r,(e=>(0,wt.jsx)(sr,{value:n,children:e})),[n]),r=b(v({},r),{onClick:s}),r=sI(v({store:n},r)),r=iI(v({store:n},r))}))),lI=(_t((function(e){return Ct("button",aI(e))})),{top:"4,10 8,6 12,10",right:"6,4 10,8 6,12",bottom:"4,6 8,10 12,6",left:"10,4 6,8 10,12"}),cI=kt((function(e){var t=e,{store:n,placement:r}=t,o=x(t,["store","placement"]);const i=rr();D(n=n||i,!1);const s=n.useState((e=>r||e.placement)).split("-")[0],a=lI[s],l=(0,B.useMemo)((()=>(0,wt.jsx)("svg",{display:"block",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,viewBox:"0 0 16 16",height:"1em",width:"1em",children:(0,wt.jsx)("polyline",{points:a})})),[a]);return L(o=b(v({children:l,"aria-hidden":!0},o),{style:v({width:"1em",height:"1em",pointerEvents:"none"},o.style)}))})),uI=(_t((function(e){return Ct("span",cI(e))})),kt((function(e){var t=e,{store:n}=t,r=x(t,["store"]);const o=KR();return r=cI(v({store:n=n||o},r))}))),dI=_t((function(e){return Ct("span",uI(e))})),pI="";function fI(){pI=""}function hI(e,t){var n;const r=(null==(n=e.element)?void 0:n.textContent)||e.children||"value"in e&&e.value;return!!r&&(o=r,o.normalize("NFD").replace(/[\u0300-\u036f]/g,"")).trim().toLowerCase().startsWith(t.toLowerCase());var o}function mI(e,t,n){if(!n)return e;const r=e.find((e=>e.id===n));return r&&hI(r,t)?pI!==t&&hI(r,pI)?e:(pI=t,function(e,t,n=!1){const r=e.findIndex((e=>e.id===t));return[...e.slice(r+1),...n?[vt]:[],...e.slice(0,r)]}(e.filter((e=>hI(e,pI))),n).filter((e=>e.id!==n))):e}var gI=kt((function(e){var t=e,{store:n,typeahead:r=!0}=t,o=x(t,["store","typeahead"]);const i=Rt();D(n=n||i,!1);const s=o.onKeyDownCapture,a=(0,B.useRef)(0),l=Se((e=>{if(null==s||s(e),e.defaultPrevented)return;if(!r)return;if(!n)return;const{renderedItems:t,items:o,activeId:i}=n.getState();if(!function(e){const t=e.target;return(!t||!ee(t))&&(!(" "!==e.key||!pI.length)||1===e.key.length&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&/^[\p{Letter}\p{Number}]$/u.test(e.key))}(e))return fI();let l=function(e){return e.filter((e=>!e.disabled))}(t.length?t:o);if(!function(e,t){if(ce(e))return!0;const n=e.target;if(!n)return!1;const r=t.some((e=>e.element===n));return r}(e,l))return fI();e.preventDefault(),window.clearTimeout(a.current),a.current=window.setTimeout((()=>{pI=""}),500);const c=e.key.toLowerCase();pI+=c,l=mI(l,c,i);const u=l.find((e=>hI(e,pI)));u?n.move(u.id):fI()}));return L(o=b(v({},o),{onKeyDownCapture:l}))}));_t((function(e){return Ct("div",gI(e))}));function vI(e,t){return()=>{const n=t();if(!n)return;let r=0,o=e.item(n);const i=o;for(;o&&null==o.value;){const n=t(++r);if(!n)return;if(o=e.item(n),o===i)break}return null==o?void 0:o.id}}var bI=kt((function(e){var t=e,{store:n,name:r,form:o,required:i,showOnKeyDown:s=!0,moveOnKeyDown:a=!0,toggleOnPress:l=!0,toggleOnClick:c=l}=t,u=x(t,["store","name","form","required","showOnKeyDown","moveOnKeyDown","toggleOnPress","toggleOnClick"]);const d=YR();D(n=n||d,!1);const p=u.onKeyDown,f=Re(s),h=Re(a),m=n.useState("placement").split("-")[0],g=n.useState("value"),y=Array.isArray(g),w=Se((e=>{var t;if(null==p||p(e),e.defaultPrevented)return;if(!n)return;const{orientation:r,items:o,activeId:i}=n.getState(),s="horizontal"!==r,a="vertical"!==r,l=!!(null==(t=o.find((e=>!e.disabled&&null!=e.value)))?void 0:t.rowId),c={ArrowUp:(l||s)&&vI(n,n.up),ArrowRight:(l||a)&&vI(n,n.next),ArrowDown:(l||s)&&vI(n,n.down),ArrowLeft:(l||a)&&vI(n,n.previous)}[e.key];c&&h(e)&&(e.preventDefault(),n.move(c()));const u="top"===m||"bottom"===m;({ArrowDown:u,ArrowUp:u,ArrowLeft:"left"===m,ArrowRight:"right"===m})[e.key]&&f(e)&&(e.preventDefault(),n.move(i),me(e.currentTarget,"keyup",n.show))}));u=Ie(u,(e=>(0,wt.jsx)(XR,{value:n,children:e})),[n]);const[_,S]=(0,B.useState)(!1),C=(0,B.useRef)(!1);(0,B.useEffect)((()=>{const e=C.current;C.current=!1,e||S(!1)}),[g]);const k=n.useState((e=>{var t;return null==(t=e.labelElement)?void 0:t.id})),j=u["aria-label"],E=u["aria-labelledby"]||k,P=n.useState((e=>{if(r)return e.items})),T=(0,B.useMemo)((()=>[...new Set(null==P?void 0:P.map((e=>e.value)).filter((e=>null!=e)))]),[P]);u=Ie(u,(e=>r?(0,wt.jsxs)(wt.Fragment,{children:[(0,wt.jsxs)("select",{style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"},tabIndex:-1,"aria-hidden":!0,"aria-label":j,"aria-labelledby":E,name:r,form:o,required:i,value:g,multiple:y,onFocus:()=>{var e;return null==(e=null==n?void 0:n.getState().selectElement)?void 0:e.focus()},onChange:e=>{var t;C.current=!0,S(!0),null==n||n.setValue(y?(t=e.target,Array.from(t.selectedOptions).map((e=>e.value))):e.target.value)},children:[ot(g).map((e=>null==e||T.includes(e)?null:(0,wt.jsx)("option",{value:e,children:e},e))),T.map((e=>(0,wt.jsx)("option",{value:e,children:e},e)))]}),e]}):e),[n,j,E,r,o,i,g,y,T]);const R=(0,wt.jsxs)(wt.Fragment,{children:[g,(0,wt.jsx)(dI,{})]}),I=n.useState("contentElement");return u=b(v({role:"combobox","aria-autocomplete":"none","aria-labelledby":k,"aria-haspopup":ne(I,"listbox"),"data-autofill":_||void 0,"data-name":r,children:R},u),{ref:ke(n.setSelectElement,u.ref),onKeyDown:w}),u=aI(v({store:n,toggleOnClick:c},u)),u=gI(v({store:n},u))})),xI=_t((function(e){return Ct("button",bI(e))})),yI=(0,B.createContext)(null),wI=kt((function(e){var t=e,{store:n,resetOnEscape:r=!0,hideOnEnter:o=!0,focusOnMove:i=!0,composite:s,alwaysVisible:a}=t,l=x(t,["store","resetOnEscape","hideOnEnter","focusOnMove","composite","alwaysVisible"]);const c=KR();D(n=n||c,!1);const u=je(l.id),d=n.useState("value"),p=Array.isArray(d),[f,h]=(0,B.useState)(d),m=n.useState("mounted");(0,B.useEffect)((()=>{m||h(d)}),[m,d]),r=r&&!p;const g=l.onKeyDown,y=Re(r),w=Re(o),_=Se((e=>{null==g||g(e),e.defaultPrevented||("Escape"===e.key&&y(e)&&(null==n||n.setValue(f))," "!==e.key&&"Enter"!==e.key||ce(e)&&w(e)&&(e.preventDefault(),null==n||n.hide()))})),S=(0,B.useContext)(QR),C=(0,B.useState)(),[k,j]=S||C,E=(0,B.useMemo)((()=>[k,j]),[k]),[P,T]=(0,B.useState)(null),R=(0,B.useContext)(yI);(0,B.useEffect)((()=>{if(R)return R(n),()=>R(null)}),[R,n]),l=Ie(l,(e=>(0,wt.jsx)(XR,{value:n,children:(0,wt.jsx)(yI.Provider,{value:T,children:(0,wt.jsx)(QR.Provider,{value:E,children:e})})})),[n,E]);const I=!!n.combobox;s=null!=s?s:!I&&P!==n;const[N,M]=Ce(s?n.setListElement:null),A=function(e,t,n){const[r,o]=(0,B.useState)(n);return ye((()=>{const n=e&&"current"in e?e.current:e;if(!n)return;const r=()=>{const e=n.getAttribute(t);null!=e&&o(e)},i=new MutationObserver(r);return i.observe(n,{attributeFilter:[t]}),r(),()=>i.disconnect()}),[e,t]),r}(N,"role",l.role),O=(s||("listbox"===A||"menu"===A||"tree"===A||"grid"===A))&&p||void 0,z=Fr(m,l.hidden,a),L=z?b(v({},l.style),{display:"none"}):l.style;s&&(l=v({role:"listbox","aria-multiselectable":O},l));const F=n.useState((e=>{var t;return k||(null==(t=e.labelElement)?void 0:t.id)}));return l=b(v({id:u,"aria-labelledby":F,hidden:z},l),{ref:ke(M,l.ref),style:L,onKeyDown:_}),l=ln(b(v({store:n},l),{composite:s})),l=gI(v({store:n,typeahead:!I},l))})),_I=(_t((function(e){return Ct("div",wI(e))})),kt((function(e){var t=e,{store:n,alwaysVisible:r}=t,o=x(t,["store","alwaysVisible"]);const i=YR();return o=wI(v({store:n=n||i,alwaysVisible:r},o)),o=Ni(v({store:n,alwaysVisible:r},o))}))),SI=uo(_t((function(e){return Ct("div",_I(e))})),YR);function CI(e){const t=e.relatedTarget;return(null==t?void 0:t.nodeType)===Node.ELEMENT_NODE?t:null}var kI=Symbol("composite-hover");var jI=kt((function(e){var t=e,{store:n,focusOnHover:r=!0,blurOnHoverEnd:o=!!r}=t,i=x(t,["store","focusOnHover","blurOnHoverEnd"]);const s=Rt();D(n=n||s,!1);const a=Ae(),l=i.onMouseMove,c=Re(r),u=Se((e=>{if(null==l||l(e),!e.defaultPrevented&&a()&&c(e)){if(!Gt(e.currentTarget)){const e=null==n?void 0:n.getState().baseElement;e&&!Ut(e)&&e.focus()}null==n||n.setActiveId(e.currentTarget.id)}})),d=i.onMouseLeave,p=Re(o),f=Se((e=>{var t;null==d||d(e),e.defaultPrevented||a()&&(function(e){const t=CI(e);return!!t&&Y(e.currentTarget,t)}(e)||function(e){let t=CI(e);if(!t)return!1;do{if(N(t,kI)&&t[kI])return!0;t=t.parentElement}while(t);return!1}(e)||c(e)&&p(e)&&(null==n||n.setActiveId(null),null==(t=null==n?void 0:n.getState().baseElement)||t.focus()))})),h=(0,B.useCallback)((e=>{e&&(e[kI]=!0)}),[]);return L(i=b(v({},i),{ref:ke(h,i.ref),onMouseMove:u,onMouseLeave:f}))}));St(_t((function(e){return Ct("div",jI(e))})));var EI=kt((function(e){var t,n=e,{store:r,value:o,getItem:i,hideOnClick:s,setValueOnClick:a=null!=o,preventScrollOnKeyDown:l=!0,focusOnHover:c=!0}=n,u=x(n,["store","value","getItem","hideOnClick","setValueOnClick","preventScrollOnKeyDown","focusOnHover"]);const d=qR();D(r=r||d,!1);const p=je(u.id),f=z(u),h=(0,B.useCallback)((e=>{const t=b(v({},e),{value:f?void 0:o,children:o});return i?i(t):t}),[f,o,i]),m=r.useState((e=>Array.isArray(e.value)));s=null!=s?s:null!=o&&!m;const g=u.onClick,y=Re(a),w=Re(s),_=Se((e=>{null==g||g(e),e.defaultPrevented||de(e)||ue(e)||(y(e)&&null!=o&&(null==r||r.setValue((e=>Array.isArray(e)?e.includes(o)?e.filter((e=>e!==o)):[...e,o]:o))),w(e)&&(null==r||r.hide()))})),S=r.useState((e=>function(e,t){if(null!=t)return null!=e&&(Array.isArray(e)?e.includes(t):e===t)}(e.value,o)));u=Ie(u,(e=>(0,wt.jsx)(ZR.Provider,{value:null!=S&&S,children:e})),[S]);const C=r.useState("listElement"),k=r.useState((e=>null!=o&&(null!=e.value&&((e.activeId===p||!(null==r?void 0:r.item(e.activeId)))&&(Array.isArray(e.value)?e.value[e.value.length-1]===o:e.value===o)))));u=b(v({id:p,role:re(C),"aria-selected":S,children:o},u),{autoFocus:null!=(t=u.autoFocus)?t:k,onClick:_}),u=Pn(v({store:r,getItem:h,preventScrollOnKeyDown:l},u));const j=Re(c);return u=jI(b(v({store:r},u),{focusOnHover(e){if(!j(e))return!1;const t=null==r?void 0:r.getState();return!!(null==t?void 0:t.open)}}))})),PI=St(_t((function(e){return Ct("div",EI(e))}))),TI=(0,B.createContext)(!1),RI=(0,wt.jsx)("svg",{display:"block",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,viewBox:"0 0 16 16",height:"1em",width:"1em",children:(0,wt.jsx)("polyline",{points:"4,8 7,12 12,4"})});var II=kt((function(e){var t=e,{store:n,checked:r}=t,o=x(t,["store","checked"]);const i=(0,B.useContext)(TI),s=function(e){return e.checked?e.children||RI:"function"==typeof e.children?e.children:null}({checked:r=null!=r?r:i,children:o.children});return L(o=b(v({"aria-hidden":!0},o),{children:s,style:v({width:"1em",height:"1em",pointerEvents:"none"},o.style)}))})),NI=(_t((function(e){return Ct("span",II(e))})),kt((function(e){var t=e,{store:n,checked:r}=t,o=x(t,["store","checked"]);const i=(0,B.useContext)(ZR);return r=null!=r?r:i,o=II(b(v({},o),{checked:r}))}))),MI=_t((function(e){return Ct("span",NI(e))}));const AI="2px",DI="400ms",OI="cubic-bezier( 0.16, 1, 0.3, 1 )",zI={compact:Tl.controlPaddingXSmall,small:Tl.controlPaddingXSmall,default:Tl.controlPaddingX},LI=cl(xI,{shouldForwardProp:e=>"hasCustomRenderProp"!==e,target:"e1p3eej77"})((({size:e,hasCustomRenderProp:t})=>bl("display:block;background-color:",jl.theme.background,";border:none;color:",jl.theme.foreground,";cursor:pointer;font-family:inherit;text-align:start;user-select:none;width:100%;&[data-focus-visible]{outline:none;}",((e,t)=>{const n={compact:{[t]:32,paddingInlineStart:zI.compact,paddingInlineEnd:zI.compact+18},default:{[t]:40,paddingInlineStart:zI.default,paddingInlineEnd:zI.default+18},small:{[t]:24,paddingInlineStart:zI.small,paddingInlineEnd:zI.small+18}};return n[e]||n.default})(e,t?"minHeight":"height")," ",!t&&$I," ",lb({inputSize:e}),";","")),""),FI=xl({"0%":{opacity:0,transform:`translateY(-${AI})`},"100%":{opacity:1,transform:"translateY(0)"}}),BI=cl(SI,{target:"e1p3eej76"})("display:flex;flex-direction:column;background-color:",jl.theme.background,";border-radius:",Tl.radiusSmall,";border:1px solid ",jl.theme.foreground,";box-shadow:",Tl.elevationMedium,";z-index:1000000;max-height:min( var( --popover-available-height, 400px ), 400px );overflow:auto;overscroll-behavior:contain;min-width:min-content;&[data-open]{@media not ( prefers-reduced-motion ){animation-duration:",DI,";animation-timing-function:",OI,";animation-name:",FI,";will-change:transform,opacity;}}&[data-focus-visible]{outline:none;}"),VI=cl(PI,{target:"e1p3eej75"})((({size:e})=>bl("cursor:default;display:flex;align-items:center;justify-content:space-between;font-size:",Tl.fontSize,";line-height:28px;padding-block:",wl(2),";scroll-margin:",wl(1),";user-select:none;&[aria-disabled='true']{cursor:not-allowed;}&[data-active-item]{background-color:",jl.theme.gray[300],";}",(e=>{const t={compact:{paddingInlineStart:zI.compact,paddingInlineEnd:zI.compact-6},default:{paddingInlineStart:zI.default,paddingInlineEnd:zI.default-6},small:{paddingInlineStart:zI.small,paddingInlineEnd:zI.small-6}};return t[e]||t.default})(e),";","")),""),$I={name:"1h52dri",styles:"overflow:hidden;text-overflow:ellipsis;white-space:nowrap"},HI=cl("div",{target:"e1p3eej74"})($I,";"),WI=cl("span",{target:"e1p3eej73"})("color:",jl.theme.gray[600],";margin-inline-start:",wl(2),";"),UI=cl("div",{target:"e1p3eej72"})("display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;flex:1;column-gap:",wl(4),";"),GI=cl("span",{target:"e1p3eej71"})("color:",jl.theme.gray[600],";text-align:initial;line-height:",Tl.fontLineHeightBase,";padding-inline-end:",wl(1),";margin-block:",wl(1),";"),KI=cl(MI,{target:"e1p3eej70"})("display:flex;align-items:center;margin-inline-start:",wl(2),";align-self:start;margin-block-start:2px;font-size:0;",UI,"~&,&:not(:empty){font-size:24px;}"),qI=(0,c.createContext)(void 0);function YI(e){return(Array.isArray(e)?0===e.length:null==e)?(0,a.__)("Select an item"):Array.isArray(e)?1===e.length?e[0]:(0,a.sprintf)((0,a.__)("%s items selected"),e.length):e}const XI=({renderSelectedValue:e,size:t="default",store:n,...r})=>{const{value:o}=Qe(n),i=(0,c.useMemo)((()=>null!=e?e:YI),[e]);return(0,wt.jsx)(LI,{...r,size:t,hasCustomRenderProp:!!e,store:n,children:i(o)})};const ZI=function(e){const{children:t,hideLabelFromVision:n=!1,label:r,size:o,store:i,className:s,isLegacy:a=!1,...l}=e,u=(0,c.useCallback)((e=>{a&&e.stopPropagation()}),[a]),d=(0,c.useMemo)((()=>({store:i,size:o})),[i,o]);return(0,wt.jsxs)("div",{className:s,children:[(0,wt.jsx)(eI,{store:i,render:n?(0,wt.jsx)(pl,{}):(0,wt.jsx)(Qx.VisualLabel,{as:"div"}),children:r}),(0,wt.jsxs)(kb,{__next40pxDefaultSize:!0,size:o,suffix:(0,wt.jsx)(xS,{}),children:[(0,wt.jsx)(XI,{...l,size:o,store:i,showOnKeyDown:!a}),(0,wt.jsx)(BI,{gutter:12,store:i,sameWidth:!0,slide:!1,onKeyDown:u,flip:!a,children:(0,wt.jsx)(qI.Provider,{value:d,children:t})})]})]})};function QI({children:e,...t}){var n;const r=(0,c.useContext)(qI);return(0,wt.jsxs)(VI,{store:r?.store,size:null!==(n=r?.size)&&void 0!==n?n:"default",...t,children:[null!=e?e:t.value,(0,wt.jsx)(KI,{children:(0,wt.jsx)(vS,{icon:xk})})]})}QI.displayName="CustomSelectControlV2.Item";const JI=QI;function eN({__experimentalHint:e,...t}){return{hint:e,...t}}function tN(e,t){return t||(0,a.sprintf)((0,a.__)("Currently selected: %s"),e)}const nN=function e(t){const{__next40pxDefaultSize:n=!1,describedBy:r,options:o,onChange:i,size:a="default",value:c,className:u,showSelectedHint:d=!1,...p}=function({__experimentalShowSelectedHint:e,...t}){return{showSelectedHint:e,...t}}(t),f=(0,l.useInstanceId)(e,"custom-select-control__description"),h=UR({async setValue(e){const t=o.find((t=>t.name===e));if(!i||!t)return;await Promise.resolve();const n=h.getState(),r={highlightedIndex:n.renderedItems.findIndex((t=>t.value===e)),inputValue:"",isOpen:n.open,selectedItem:t,type:""};i(r)},value:c?.name,defaultValue:o[0]?.name}),m=o.map(eN).map((({name:e,key:t,hint:n,style:r,className:o})=>{const i=(0,wt.jsxs)(UI,{children:[(0,wt.jsx)("span",{children:e}),(0,wt.jsx)(GI,{className:"components-custom-select-control__item-hint",children:n})]});return(0,wt.jsx)(JI,{value:e,children:n?i:e,style:r,className:s(o,"components-custom-select-control__item",{"has-hint":n})},t)})),{value:g}=h.getState(),v=n&&"default"===a||"__unstable-large"===a?"default":n||"default"!==a?a:"compact";return(0,wt.jsxs)(wt.Fragment,{children:[(0,wt.jsx)(ZI,{"aria-describedby":f,renderSelectedValue:d?()=>{const e=o?.map(eN)?.find((({name:e})=>g===e))?.hint;return(0,wt.jsxs)(HI,{children:[g,e&&(0,wt.jsx)(WI,{className:"components-custom-select-control__hint",children:e})]})}:void 0,size:v,store:h,className:s("components-custom-select-control",u),isLegacy:!0,...p,children:m}),(0,wt.jsx)(pl,{children:(0,wt.jsx)("span",{id:f,children:tN(g,r)})})]})};function rN(e){const t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):"number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?new Date(e):new Date(NaN)}function oN(e){const t=rN(e);return t.setHours(0,0,0,0),t}function iN(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function sN(e,t){const n=rN(e);if(isNaN(t))return iN(e,NaN);if(!t)return n;const r=n.getDate(),o=iN(e,n.getTime());o.setMonth(n.getMonth()+t+1,0);return r>=o.getDate()?o:(n.setFullYear(o.getFullYear(),o.getMonth(),r),n)}function aN(e,t){return sN(e,-t)}const lN={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function cN(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const uN={date:cN({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:cN({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:cN({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},dN={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function pN(e){return(t,n)=>{let r;if("formatting"===(n?.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,o=n?.width?String(n.width):t;r=e.formattingValues[o]||e.formattingValues[t]}else{const t=e.defaultWidth,o=n?.width?String(n.width):e.defaultWidth;r=e.values[o]||e.values[t]}return r[e.argumentCallback?e.argumentCallback(t):t]}}const fN={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:pN({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:pN({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:pN({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:pN({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:pN({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function hN(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const s=i[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?function(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n;return}(a,(e=>e.test(s))):function(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n;return}(a,(e=>e.test(s)));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;return{value:c,rest:t.slice(s.length)}}}const mN={ordinalNumber:(gN={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const n=e.match(gN.matchPattern);if(!n)return null;const r=n[0],o=e.match(gN.parsePattern);if(!o)return null;let i=gN.valueCallback?gN.valueCallback(o[0]):o[0];return i=t.valueCallback?t.valueCallback(i):i,{value:i,rest:e.slice(r.length)}}),era:hN({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:hN({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:hN({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:hN({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:hN({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};var gN;const vN={code:"en-US",formatDistance:(e,t,n)=>{let r;const o=lN[e];return r="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:uN,formatRelative:(e,t,n,r)=>dN[e],localize:fN,match:mN,options:{weekStartsOn:0,firstWeekContainsDate:1}};let bN={};function xN(){return bN}Math.pow(10,8);const yN=6048e5,wN=864e5;function _N(e){const t=rN(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function SN(e,t){const n=oN(e),r=oN(t),o=+n-_N(n),i=+r-_N(r);return Math.round((o-i)/wN)}function CN(e){const t=rN(e),n=iN(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function kN(e){const t=rN(e);return SN(t,CN(t))+1}function jN(e,t){const n=xN(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=rN(e),i=o.getDay(),s=(i<r?7:0)+i-r;return o.setDate(o.getDate()-s),o.setHours(0,0,0,0),o}function EN(e){return jN(e,{weekStartsOn:1})}function PN(e){const t=rN(e),n=t.getFullYear(),r=iN(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const o=EN(r),i=iN(e,0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);const s=EN(i);return t.getTime()>=o.getTime()?n+1:t.getTime()>=s.getTime()?n:n-1}function TN(e){const t=PN(e),n=iN(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),EN(n)}function RN(e){const t=rN(e),n=+EN(t)-+TN(t);return Math.round(n/yN)+1}function IN(e,t){const n=rN(e),r=n.getFullYear(),o=xN(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,s=iN(e,0);s.setFullYear(r+1,0,i),s.setHours(0,0,0,0);const a=jN(s,t),l=iN(e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=jN(l,t);return n.getTime()>=a.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function NN(e,t){const n=xN(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=IN(e,t),i=iN(e,0);i.setFullYear(o,0,r),i.setHours(0,0,0,0);return jN(i,t)}function MN(e,t){const n=rN(e),r=+jN(n,t)-+NN(n,t);return Math.round(r/yN)+1}function AN(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const DN={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return AN("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):AN(n+1,2)},d:(e,t)=>AN(e.getDate(),t.length),a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>AN(e.getHours()%12||12,t.length),H:(e,t)=>AN(e.getHours(),t.length),m:(e,t)=>AN(e.getMinutes(),t.length),s:(e,t)=>AN(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return AN(Math.trunc(r*Math.pow(10,n-3)),t.length)}},ON="midnight",zN="noon",LN="morning",FN="afternoon",BN="evening",VN="night",$N={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){const t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:"year"})}return DN.y(e,t)},Y:function(e,t,n,r){const o=IN(e,r),i=o>0?o:1-o;if("YY"===t){return AN(i%100,2)}return"Yo"===t?n.ordinalNumber(i,{unit:"year"}):AN(i,t.length)},R:function(e,t){return AN(PN(e),t.length)},u:function(e,t){return AN(e.getFullYear(),t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return AN(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return AN(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return DN.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return AN(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=MN(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):AN(o,t.length)},I:function(e,t,n){const r=RN(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):AN(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):DN.d(e,t)},D:function(e,t,n){const r=kN(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):AN(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return AN(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return AN(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return AN(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(o=12===r?zN:0===r?ON:r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(o=r>=17?BN:r>=12?FN:r>=4?LN:VN,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return DN.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):DN.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):AN(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):AN(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):DN.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):DN.s(e,t)},S:function(e,t){return DN.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return WN(r);case"XXXX":case"XX":return UN(r);default:return UN(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return WN(r);case"xxxx":case"xx":return UN(r);default:return UN(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+HN(r,":");default:return"GMT"+UN(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+HN(r,":");default:return"GMT"+UN(r,":")}},t:function(e,t,n){return AN(Math.trunc(e.getTime()/1e3),t.length)},T:function(e,t,n){return AN(e.getTime(),t.length)}};function HN(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return 0===i?n+String(o):n+String(o)+t+AN(i,2)}function WN(e,t){if(e%60==0){return(e>0?"-":"+")+AN(Math.abs(e)/60,2)}return UN(e,t)}function UN(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+AN(Math.trunc(r/60),2)+t+AN(r%60,2)}const GN=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},KN=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},qN={p:KN,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return GN(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"})}return i.replace("{{date}}",GN(r,t)).replace("{{time}}",KN(o,t))}},YN=/^D+$/,XN=/^Y+$/,ZN=["D","DD","YY","YYYY"];function QN(e){return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}function JN(e){if(!QN(e)&&"number"!=typeof e)return!1;const t=rN(e);return!isNaN(Number(t))}const eM=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,tM=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,nM=/^'([^]*?)'?$/,rM=/''/g,oM=/[a-zA-Z]/;function iM(e,t,n){const r=xN(),o=n?.locale??r.locale??vN,i=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,s=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=rN(e);if(!JN(a))throw new RangeError("Invalid time value");let l=t.match(tM).map((e=>{const t=e[0];if("p"===t||"P"===t){return(0,qN[t])(e,o.formatLong)}return e})).join("").match(eM).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:sM(e)};if($N[t])return{isToken:!0,value:e};if(t.match(oM))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}}));o.localize.preprocessor&&(l=o.localize.preprocessor(a,l));const c={firstWeekContainsDate:i,weekStartsOn:s,locale:o};return l.map((r=>{if(!r.isToken)return r.value;const i=r.value;(!n?.useAdditionalWeekYearTokens&&function(e){return XN.test(e)}(i)||!n?.useAdditionalDayOfYearTokens&&function(e){return YN.test(e)}(i))&&function(e,t,n){const r=function(e,t,n){const r="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,n);if(console.warn(r),ZN.includes(e))throw new RangeError(r)}(i,t,String(e));return(0,$N[i[0]])(a,i,o.localize,c)})).join("")}function sM(e){const t=e.match(nM);return t?t[1].replace(rM,"'"):e}function aM(e,t){const n=rN(e),r=rN(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function lM(e,t){return+rN(e)==+rN(t)}function cM(e,t){return+oN(e)==+oN(t)}function uM(e,t){const n=rN(e);return isNaN(t)?iN(e,NaN):t?(n.setDate(n.getDate()+t),n):n}function dM(e,t){return uM(e,7*t)}function pM(e,t){return dM(e,-t)}function fM(e,t){const n=xN(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=rN(e),i=o.getDay(),s=6+(i<r?-7:0)-(i-r);return o.setDate(o.getDate()+s),o.setHours(23,59,59,999),o}const hM=(0,wt.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wt.jsx)(n.Path,{d:"m14.5 6.5-1 1 3.7 3.7H4v1.6h13.2l-3.7 3.7 1 1 5.6-5.5z"})}),mM=(0,wt.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wt.jsx)(n.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"})}),gM=window.wp.date;function vM(e,t){const n=rN(e),r=rN(t);return n.getTime()>r.getTime()}function bM(e,t){return+rN(e)<+rN(t)}function xM(e){const t=rN(e),n=t.getFullYear(),r=t.getMonth(),o=iN(e,0);return o.setFullYear(n,r+1,0),o.setHours(0,0,0,0),o.getDate()}function yM(e,t){const n=rN(e),r=n.getFullYear(),o=n.getDate(),i=iN(e,0);i.setFullYear(r,t,15),i.setHours(0,0,0,0);const s=xM(i);return n.setMonth(t,Math.min(o,s)),n}function wM(e,t){let n=rN(e);return isNaN(+n)?iN(e,NaN):(null!=t.year&&n.setFullYear(t.year),null!=t.month&&(n=yM(n,t.month)),null!=t.date&&n.setDate(t.date),null!=t.hours&&n.setHours(t.hours),null!=t.minutes&&n.setMinutes(t.minutes),null!=t.seconds&&n.setSeconds(t.seconds),null!=t.milliseconds&&n.setMilliseconds(t.milliseconds),n)}function _M(){return oN(Date.now())}function SM(e,t){const n=rN(e);return isNaN(+n)?iN(e,NaN):(n.setFullYear(t),n)}function CM(e,t){return sN(e,12*t)}function kM(e,t){return CM(e,-t)}function jM(e,t){const n=rN(e.start),r=rN(e.end);let o=+n>+r;const i=o?+n:+r,s=o?r:n;s.setHours(0,0,0,0);let a=t?.step??1;if(!a)return[];a<0&&(a=-a,o=!o);const l=[];for(;+s<=i;)l.push(rN(s)),s.setDate(s.getDate()+a),s.setHours(0,0,0,0);return o?l.reverse():l}function EM(e,t){const n=rN(e.start),r=rN(e.end);let o=+n>+r;const i=o?+n:+r,s=o?r:n;s.setHours(0,0,0,0),s.setDate(1);let a=t?.step??1;if(!a)return[];a<0&&(a=-a,o=!o);const l=[];for(;+s<=i;)l.push(rN(s)),s.setMonth(s.getMonth()+a);return o?l.reverse():l}function PM(e){const t=rN(e);return t.setDate(1),t.setHours(0,0,0,0),t}function TM(e){const t=rN(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function RM(e,t){const n=rN(e.start),r=rN(e.end);let o=+n>+r;const i=jN(o?r:n,t),s=jN(o?n:r,t);i.setHours(15),s.setHours(15);const a=+s.getTime();let l=i,c=t?.step??1;if(!c)return[];c<0&&(c=-c,o=!o);const u=[];for(;+l<=a;)l.setHours(0),u.push(rN(l)),l=dM(l,c),l.setHours(15);return o?u.reverse():u}let IM=function(e){return e[e.SUNDAY=0]="SUNDAY",e[e.MONDAY=1]="MONDAY",e[e.TUESDAY=2]="TUESDAY",e[e.WEDNESDAY=3]="WEDNESDAY",e[e.THURSDAY=4]="THURSDAY",e[e.FRIDAY=5]="FRIDAY",e[e.SATURDAY=6]="SATURDAY",e}({});const NM=(e,t,n)=>(lM(e,t)||vM(e,t))&&(lM(e,n)||bM(e,n)),MM=e=>wM(e,{hours:0,minutes:0,seconds:0,milliseconds:0}),AM=cl("div",{target:"e105ri6r5"})(Bx,";"),DM=cl(yy,{target:"e105ri6r4"})("margin-bottom:",wl(4),";"),OM=cl(Tk,{target:"e105ri6r3"})("font-size:",Tl.fontSize,";font-weight:",Tl.fontWeight,";strong{font-weight:",Tl.fontWeightHeading,";}"),zM=cl("div",{target:"e105ri6r2"})("column-gap:",wl(2),";display:grid;grid-template-columns:0.5fr repeat( 5, 1fr ) 0.5fr;justify-items:center;row-gap:",wl(2),";"),LM=cl("div",{target:"e105ri6r1"})("color:",jl.theme.gray[700],";font-size:",Tl.fontSize,";line-height:",Tl.fontLineHeightBase,";&:nth-of-type( 1 ){justify-self:start;}&:nth-of-type( 7 ){justify-self:end;}"),FM=cl(sy,{shouldForwardProp:e=>!["column","isSelected","isToday","hasEvents"].includes(e),target:"e105ri6r0"})("grid-column:",(e=>e.column),";position:relative;justify-content:center;",(e=>1===e.column&&"\n\t\tjustify-self: start;\n\t\t")," ",(e=>7===e.column&&"\n\t\tjustify-self: end;\n\t\t")," ",(e=>e.disabled&&"\n\t\tpointer-events: none;\n\t\t")," &&&{border-radius:",Tl.radiusRound,";height:",wl(7),";width:",wl(7),";",(e=>e.isSelected&&`\n\t\t\t\tbackground: ${jl.theme.accent};\n\n\t\t\t\t&,\n\t\t\t\t&:hover:not(:disabled, [aria-disabled=true]) {\n\t\t\t\t\tcolor: ${jl.theme.accentInverted};\n\t\t\t\t}\n\n\t\t\t\t&:focus:not(:disabled),\n\t\t\t\t&:focus:not(:disabled) {\n\t\t\t\t\tborder: ${Tl.borderWidthFocus} solid currentColor;\n\t\t\t\t}\n\n\t\t\t\t/* Highlight the selected day for high-contrast mode */\n\t\t\t\t&::after {\n\t\t\t\t\tcontent: '';\n\t\t\t\t\tposition: absolute;\n\t\t\t\t\tpointer-events: none;\n\t\t\t\t\tinset: 0;\n\t\t\t\t\tborder-radius: inherit;\n\t\t\t\t\tborder: 1px solid transparent;\n\t\t\t\t}\n\t\t\t`)," ",(e=>!e.isSelected&&e.isToday&&`\n\t\t\tbackground: ${jl.theme.gray[200]};\n\t\t\t`),";}",(e=>e.hasEvents&&`\n\t\t::before {\n\t\t\tborder: 2px solid ${e.isSelected?jl.theme.accentInverted:jl.theme.accent};\n\t\t\tborder-radius: ${Tl.radiusRound};\n\t\t\tcontent: " ";\n\t\t\tleft: 50%;\n\t\t\tposition: absolute;\n\t\t\ttransform: translate(-50%, 9px);\n\t\t}\n\t\t`),";");function BM(e){return"string"==typeof e?new Date(e):rN(e)}function VM(e,t){return t?(e%12+12)%24:e%12}function $M(e){return(t,n)=>{const r={...t};return n.type!==Sx&&n.type!==Ix&&n.type!==Tx||void 0!==r.value&&(r.value=r.value.toString().padStart(e,"0")),r}}function HM(e){var t;const n=null!==(t=e.target?.ownerDocument.defaultView?.HTMLInputElement)&&void 0!==t?t:HTMLInputElement;return e.target instanceof n&&e.target.validity.valid}const WM="yyyy-MM-dd'T'HH:mm:ss";function UM({day:e,column:t,isSelected:n,isFocusable:r,isFocusAllowed:o,isToday:i,isInvalid:s,numEvents:a,onClick:l,onKeyDown:u}){const d=(0,c.useRef)();return(0,c.useEffect)((()=>{d.current&&r&&o&&d.current.focus()}),[r]),(0,wt.jsx)(FM,{ref:d,className:"components-datetime__date__day",disabled:s,tabIndex:r?0:-1,"aria-label":GM(e,n,a),column:t,isSelected:n,isToday:i,hasEvents:a>0,onClick:l,onKeyDown:u,children:(0,gM.dateI18n)("j",e,-e.getTimezoneOffset())})}function GM(e,t,n){const{formats:r}=(0,gM.getSettings)(),o=(0,gM.dateI18n)(r.date,e,-e.getTimezoneOffset());return t&&n>0?(0,a.sprintf)((0,a._n)("%1$s. Selected. There is %2$d event","%1$s. Selected. There are %2$d events",n),o,n):t?(0,a.sprintf)((0,a.__)("%1$s. Selected"),o):n>0?(0,a.sprintf)((0,a._n)("%1$s. There is %2$d event","%1$s. There are %2$d events",n),o,n):o}const KM=function({currentDate:e,onChange:t,events:n=[],isInvalidDate:r,onMonthPreviewed:o,startOfWeek:i=0}){const s=e?BM(e):new Date,{calendar:l,viewing:u,setSelected:d,setViewing:p,isSelected:f,viewPreviousMonth:h,viewNextMonth:m}=(({weekStartsOn:e=IM.SUNDAY,viewing:t=new Date,selected:n=[],numberOfMonths:r=1}={})=>{const[o,i]=(0,c.useState)(t),s=(0,c.useCallback)((()=>i(_M())),[i]),a=(0,c.useCallback)((e=>i((t=>yM(t,e)))),[]),l=(0,c.useCallback)((()=>i((e=>aN(e,1)))),[]),u=(0,c.useCallback)((()=>i((e=>sN(e,1)))),[]),d=(0,c.useCallback)((e=>i((t=>SM(t,e)))),[]),p=(0,c.useCallback)((()=>i((e=>kM(e,1)))),[]),f=(0,c.useCallback)((()=>i((e=>CM(e,1)))),[]),[h,m]=(0,c.useState)(n.map(MM)),g=(0,c.useCallback)((e=>h.findIndex((t=>lM(t,e)))>-1),[h]),v=(0,c.useCallback)(((e,t)=>{m(t?Array.isArray(e)?e:[e]:t=>t.concat(Array.isArray(e)?e:[e]))}),[]),b=(0,c.useCallback)((e=>m((t=>Array.isArray(e)?t.filter((t=>!e.map((e=>e.getTime())).includes(t.getTime()))):t.filter((t=>!lM(t,e)))))),[]),x=(0,c.useCallback)(((e,t)=>g(e)?b(e):v(e,t)),[b,g,v]),y=(0,c.useCallback)(((e,t,n)=>{m(n?jM({start:e,end:t}):n=>n.concat(jM({start:e,end:t})))}),[]),w=(0,c.useCallback)(((e,t)=>{m((n=>n.filter((n=>!jM({start:e,end:t}).map((e=>e.getTime())).includes(n.getTime())))))}),[]),_=(0,c.useMemo)((()=>EM({start:PM(o),end:TM(sN(o,r-1))}).map((t=>RM({start:PM(t),end:TM(t)},{weekStartsOn:e}).map((t=>jM({start:jN(t,{weekStartsOn:e}),end:fM(t,{weekStartsOn:e})})))))),[o,e,r]);return{clearTime:MM,inRange:NM,viewing:o,setViewing:i,viewToday:s,viewMonth:a,viewPreviousMonth:l,viewNextMonth:u,viewYear:d,viewPreviousYear:p,viewNextYear:f,selected:h,setSelected:m,clearSelected:()=>m([]),isSelected:g,select:v,deselect:b,toggle:x,selectRange:y,deselectRange:w,calendar:_}})({selected:[oN(s)],viewing:oN(s),weekStartsOn:i}),[g,v]=(0,c.useState)(oN(s)),[b,x]=(0,c.useState)(!1),[y,w]=(0,c.useState)(e);return e!==y&&(w(e),d([oN(s)]),p(oN(s)),v(oN(s))),(0,wt.jsxs)(AM,{className:"components-datetime__date",role:"application","aria-label":(0,a.__)("Calendar"),children:[(0,wt.jsxs)(DM,{children:[(0,wt.jsx)(sy,{icon:(0,a.isRTL)()?hM:mM,variant:"tertiary","aria-label":(0,a.__)("View previous month"),onClick:()=>{h(),v(aN(g,1)),o?.(iM(aN(u,1),WM))},size:"compact"}),(0,wt.jsxs)(OM,{level:3,children:[(0,wt.jsx)("strong",{children:(0,gM.dateI18n)("F",u,-u.getTimezoneOffset())})," ",(0,gM.dateI18n)("Y",u,-u.getTimezoneOffset())]}),(0,wt.jsx)(sy,{icon:(0,a.isRTL)()?mM:hM,variant:"tertiary","aria-label":(0,a.__)("View next month"),onClick:()=>{m(),v(sN(g,1)),o?.(iM(sN(u,1),WM))},size:"compact"})]}),(0,wt.jsxs)(zM,{onFocus:()=>x(!0),onBlur:()=>x(!1),children:[l[0][0].map((e=>(0,wt.jsx)(LM,{children:(0,gM.dateI18n)("D",e,-e.getTimezoneOffset())},e.toString()))),l[0].map((e=>e.map(((e,i)=>aM(e,u)?(0,wt.jsx)(UM,{day:e,column:i+1,isSelected:f(e),isFocusable:lM(e,g),isFocusAllowed:b,isToday:cM(e,new Date),isInvalid:!!r&&r(e),numEvents:n.filter((t=>cM(t.date,e))).length,onClick:()=>{d([e]),v(e),t?.(iM(new Date(e.getFullYear(),e.getMonth(),e.getDate(),s.getHours(),s.getMinutes(),s.getSeconds(),s.getMilliseconds()),WM))},onKeyDown:t=>{let n;"ArrowLeft"===t.key&&(n=uM(e,(0,a.isRTL)()?1:-1)),"ArrowRight"===t.key&&(n=uM(e,(0,a.isRTL)()?-1:1)),"ArrowUp"===t.key&&(n=pM(e,1)),"ArrowDown"===t.key&&(n=dM(e,1)),"PageUp"===t.key&&(n=aN(e,1)),"PageDown"===t.key&&(n=sN(e,1)),"Home"===t.key&&(n=jN(e)),"End"===t.key&&(n=oN(fM(e))),n&&(t.preventDefault(),v(n),aM(n,u)||(p(n),o?.(iM(n,WM))))}},e.toString()):null))))]})]})};function qM(e){const t=rN(e);return t.setSeconds(0,0),t}const YM=cl("div",{target:"evcr2319"})("box-sizing:border-box;font-size:",Tl.fontSize,";"),XM=cl("fieldset",{target:"evcr2318"})("border:0;margin:0 0 ",wl(4)," 0;padding:0;&:last-child{margin-bottom:0;}"),ZM=cl("div",{target:"evcr2317"})({name:"pd0mhc",styles:"direction:ltr;display:flex"}),QM=bl("&&& ",fb,"{padding-left:",wl(2),";padding-right:",wl(2),";text-align:center;}",""),JM=cl(Sy,{target:"evcr2316"})(QM," width:",wl(9),";&&& ",fb,"{padding-right:0;}&&& ",tb,"{border-right:0;border-top-right-radius:0;border-bottom-right-radius:0;}"),eA=cl("span",{target:"evcr2315"})("border-top:",Tl.borderWidth," solid ",jl.gray[700],";border-bottom:",Tl.borderWidth," solid ",jl.gray[700],";font-size:",Tl.fontSize,";line-height:calc(\n\t\t",Tl.controlHeight," - ",Tl.borderWidth," * 2\n\t);display:inline-block;"),tA=cl(Sy,{target:"evcr2314"})(QM," width:",wl(9),";&&& ",fb,"{padding-left:0;}&&& ",tb,"{border-left:0;border-top-left-radius:0;border-bottom-left-radius:0;}"),nA=cl("div",{target:"evcr2313"})({name:"1ff36h2",styles:"flex-grow:1"}),rA=cl(Sy,{target:"evcr2312"})(QM," width:",wl(9),";"),oA=cl(Sy,{target:"evcr2311"})(QM," width:",wl(14),";"),iA=cl("div",{target:"evcr2310"})({name:"ebu3jh",styles:"text-decoration:underline dotted"}),sA=()=>{const{timezone:e}=(0,gM.getSettings)(),t=(new Date).getTimezoneOffset()/60*-1;if(Number(e.offset)===t)return null;const n=Number(e.offset)>=0?"+":"",r=""!==e.abbr&&isNaN(Number(e.abbr))?e.abbr:`UTC${n}${e.offsetFormatted}`,o=e.string.replace("_"," "),i="UTC"===e.string?(0,a.__)("Coordinated Universal Time"):`(${r}) ${o}`;return 0===o.trim().length?(0,wt.jsx)(iA,{className:"components-datetime__timezone",children:r}):(0,wt.jsx)(Yi,{placement:"top",text:i,children:(0,wt.jsx)(iA,{className:"components-datetime__timezone",children:r})})};const aA=(0,c.forwardRef)((function(e,t){const{label:n,...r}=e,o=r["aria-label"]||n;return(0,wt.jsx)(K_,{...r,"aria-label":o,ref:t,children:n})}));function lA({value:e,defaultValue:t,is12Hour:n,label:r,minutesProps:o,onChange:i}){const[l={hours:(new Date).getHours(),minutes:(new Date).getMinutes()},u]=E_({value:e,onChange:i,defaultValue:t}),d=l.hours<12?"AM":"PM";const p=l.hours%12||12;const f=e=>(t,{event:r})=>{if(!HM(r))return;const o=Number(t);u({...l,[e]:"hours"===e&&n?VM(o,"PM"===d):o})};const h=r?XM:c.Fragment;return(0,wt.jsxs)(h,{children:[r&&(0,wt.jsx)(Qx.VisualLabel,{as:"legend",children:r}),(0,wt.jsxs)(yy,{alignment:"left",expanded:!1,children:[(0,wt.jsxs)(ZM,{className:"components-datetime__time-field components-datetime__time-field-time",children:[(0,wt.jsx)(JM,{className:"components-datetime__time-field-hours-input",label:(0,a.__)("Hours"),hideLabelFromVision:!0,__next40pxDefaultSize:!0,value:String(n?p:l.hours).padStart(2,"0"),step:1,min:n?1:0,max:n?12:23,required:!0,spinControls:"none",isPressEnterToChange:!0,isDragEnabled:!1,isShiftStepEnabled:!1,onChange:f("hours"),__unstableStateReducer:$M(2)}),(0,wt.jsx)(eA,{className:"components-datetime__time-separator","aria-hidden":"true",children:":"}),(0,wt.jsx)(tA,{className:s("components-datetime__time-field-minutes-input",o?.className),label:(0,a.__)("Minutes"),hideLabelFromVision:!0,__next40pxDefaultSize:!0,value:String(l.minutes).padStart(2,"0"),step:1,min:0,max:59,required:!0,spinControls:"none",isPressEnterToChange:!0,isDragEnabled:!1,isShiftStepEnabled:!1,onChange:(...e)=>{f("minutes")(...e),o?.onChange?.(...e)},__unstableStateReducer:$M(2),...o})]}),n&&(0,wt.jsxs)(R_,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,label:(0,a.__)("Select AM or PM"),hideLabelFromVision:!0,value:d,onChange:e=>{var t;(t=e,()=>{d!==t&&u({...l,hours:VM(p,"PM"===t)})})()},children:[(0,wt.jsx)(aA,{value:"AM",label:(0,a.__)("AM")}),(0,wt.jsx)(aA,{value:"PM",label:(0,a.__)("PM")})]})]})]})}const cA=["dmy","mdy","ymd"];function uA({is12Hour:e,currentTime:t,onChange:n,dateOrder:r,hideLabelFromVision:o=!1}){const[i,s]=(0,c.useState)((()=>t?qM(BM(t)):new Date));(0,c.useEffect)((()=>{s(t?qM(BM(t)):new Date)}),[t]);const l=[{value:"01",label:(0,a.__)("January")},{value:"02",label:(0,a.__)("February")},{value:"03",label:(0,a.__)("March")},{value:"04",label:(0,a.__)("April")},{value:"05",label:(0,a.__)("May")},{value:"06",label:(0,a.__)("June")},{value:"07",label:(0,a.__)("July")},{value:"08",label:(0,a.__)("August")},{value:"09",label:(0,a.__)("September")},{value:"10",label:(0,a.__)("October")},{value:"11",label:(0,a.__)("November")},{value:"12",label:(0,a.__)("December")}],{day:u,month:d,year:p,minutes:f,hours:h}=(0,c.useMemo)((()=>({day:iM(i,"dd"),month:iM(i,"MM"),year:iM(i,"yyyy"),minutes:iM(i,"mm"),hours:iM(i,"HH"),am:iM(i,"a")})),[i]),m=e=>(t,{event:r})=>{if(!HM(r))return;const o=Number(t),a=wM(i,{[e]:o});s(a),n?.(iM(a,WM))},g=(0,wt.jsx)(rA,{className:"components-datetime__time-field components-datetime__time-field-day",label:(0,a.__)("Day"),hideLabelFromVision:!0,__next40pxDefaultSize:!0,value:u,step:1,min:1,max:31,required:!0,spinControls:"none",isPressEnterToChange:!0,isDragEnabled:!1,isShiftStepEnabled:!1,onChange:m("date")},"day"),v=(0,wt.jsx)(nA,{children:(0,wt.jsx)(_S,{className:"components-datetime__time-field components-datetime__time-field-month",label:(0,a.__)("Month"),hideLabelFromVision:!0,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:d,options:l,onChange:e=>{const t=yM(i,Number(e)-1);s(t),n?.(iM(t,WM))}})},"month"),b=(0,wt.jsx)(oA,{className:"components-datetime__time-field components-datetime__time-field-year",label:(0,a.__)("Year"),hideLabelFromVision:!0,__next40pxDefaultSize:!0,value:p,step:1,min:1,max:9999,required:!0,spinControls:"none",isPressEnterToChange:!0,isDragEnabled:!1,isShiftStepEnabled:!1,onChange:m("year"),__unstableStateReducer:$M(4)},"year"),x=e?"mdy":"dmy",y=(r&&cA.includes(r)?r:x).split("").map((e=>{switch(e){case"d":return g;case"m":return v;case"y":return b;default:return null}}));return(0,wt.jsxs)(YM,{className:"components-datetime__time",children:[(0,wt.jsxs)(XM,{children:[o?(0,wt.jsx)(pl,{as:"legend",children:(0,a.__)("Time")}):(0,wt.jsx)(Qx.VisualLabel,{as:"legend",className:"components-datetime__time-legend",children:(0,a.__)("Time")}),(0,wt.jsxs)(yy,{className:"components-datetime__time-wrapper",children:[(0,wt.jsx)(lA,{value:{hours:Number(h),minutes:Number(f)},is12Hour:e,onChange:({hours:e,minutes:t})=>{const r=wM(i,{hours:e,minutes:t});s(r),n?.(iM(r,WM))}}),(0,wt.jsx)(Hg,{}),(0,wt.jsx)(sA,{})]})]}),(0,wt.jsxs)(XM,{children:[o?(0,wt.jsx)(pl,{as:"legend",children:(0,a.__)("Date")}):(0,wt.jsx)(Qx.VisualLabel,{as:"legend",className:"components-datetime__time-legend",children:(0,a.__)("Date")}),(0,wt.jsx)(yy,{className:"components-datetime__time-wrapper",children:y})]})]})}uA.TimeInput=lA,Object.assign(uA.TimeInput,{displayName:"TimePicker.TimeInput"});const dA=uA;const pA=cl(jk,{target:"e1p5onf00"})({name:"1khn195",styles:"box-sizing:border-box"}),fA=()=>{};const hA=(0,c.forwardRef)((function({currentDate:e,is12Hour:t,dateOrder:n,isInvalidDate:r,onMonthPreviewed:o=fA,onChange:i,events:s,startOfWeek:a},l){return(0,wt.jsx)(pA,{ref:l,className:"components-datetime",spacing:4,children:(0,wt.jsxs)(wt.Fragment,{children:[(0,wt.jsx)(dA,{currentTime:e,onChange:i,is12Hour:t,dateOrder:n}),(0,wt.jsx)(KM,{currentDate:e,onChange:i,isInvalidDate:r,events:s,onMonthPreviewed:o,startOfWeek:a})]})})})),mA=hA,gA=[{name:(0,a._x)("None","Size of a UI element"),slug:"none"},{name:(0,a._x)("Small","Size of a UI element"),slug:"small"},{name:(0,a._x)("Medium","Size of a UI element"),slug:"medium"},{name:(0,a._x)("Large","Size of a UI element"),slug:"large"},{name:(0,a._x)("Extra Large","Size of a UI element"),slug:"xlarge"}],vA={BaseControl:{_overrides:{__associatedWPComponentName:"DimensionControl"}}};const bA=function(e){const{__next40pxDefaultSize:t=!1,__nextHasNoMarginBottom:n=!1,label:r,value:o,sizes:i=gA,icon:l,onChange:c,className:u=""}=e;Fi()("wp.components.DimensionControl",{since:"6.7",version:"7.0"});const d=(0,wt.jsxs)(wt.Fragment,{children:[l&&(0,wt.jsx)(ry,{icon:l}),r]});return(0,wt.jsx)(is,{value:vA,children:(0,wt.jsx)(_S,{__next40pxDefaultSize:t,__nextHasNoMarginBottom:n,className:s(u,"block-editor-dimension-control"),label:d,hideLabelFromVision:!1,value:o,onChange:e=>{const t=((e,t)=>e.find((e=>t===e.slug)))(i,e);t&&o!==t.slug?"function"==typeof c&&c(t.slug):c?.(void 0)},options:(e=>{const t=e.map((({name:e,slug:t})=>({label:e,value:t})));return[{label:(0,a.__)("Default"),value:""},...t]})(i)})})};const xA={name:"u2jump",styles:"position:relative;pointer-events:none;&::after{content:'';position:absolute;top:0;right:0;bottom:0;left:0;}*{pointer-events:none;}"},yA=(0,c.createContext)(!1),{Consumer:wA,Provider:_A}=yA;function SA({className:e,children:t,isDisabled:n=!0,...r}){const o=qa();return(0,wt.jsx)(_A,{value:n,children:(0,wt.jsx)("div",{inert:n?"true":void 0,className:n?o(xA,e,"components-disabled"):void 0,...r,children:t})})}SA.Context=yA,SA.Consumer=wA;const CA=SA,kA=(0,c.forwardRef)((({visible:e,children:t,...n},r)=>{const o=Ln({open:e});return(0,wt.jsx)($r,{store:o,ref:r,...n,children:t})})),jA="is-dragging-components-draggable";const EA=function({children:e,onDragStart:t,onDragOver:n,onDragEnd:r,appendToOwnerDocument:o=!1,cloneClassname:i,elementId:s,transferData:a,__experimentalTransferDataType:u="text",__experimentalDragComponent:d}){const p=(0,c.useRef)(null),f=(0,c.useRef)((()=>{}));return(0,c.useEffect)((()=>()=>{f.current()}),[]),(0,wt.jsxs)(wt.Fragment,{children:[e({onDraggableStart:function(e){const{ownerDocument:r}=e.target;e.dataTransfer.setData(u,JSON.stringify(a));const c=r.createElement("div");c.style.top="0",c.style.left="0";const d=r.createElement("div");"function"==typeof e.dataTransfer.setDragImage&&(d.classList.add("components-draggable__invisible-drag-image"),r.body.appendChild(d),e.dataTransfer.setDragImage(d,0,0)),c.classList.add("components-draggable__clone"),i&&c.classList.add(i);let h=0,m=0;if(p.current){h=e.clientX,m=e.clientY,c.style.transform=`translate( ${h}px, ${m}px )`;const t=r.createElement("div");t.innerHTML=p.current.innerHTML,c.appendChild(t),r.body.appendChild(c)}else{const e=r.getElementById(s),t=e.getBoundingClientRect(),n=e.parentNode,i=t.top,a=t.left;c.style.width=`${t.width+0}px`;const l=e.cloneNode(!0);l.id=`clone-${s}`,h=a-0,m=i-0,c.style.transform=`translate( ${h}px, ${m}px )`,Array.from(l.querySelectorAll("iframe")).forEach((e=>e.parentNode?.removeChild(e))),c.appendChild(l),o?r.body.appendChild(c):n?.appendChild(c)}let g=e.clientX,v=e.clientY;const b=(0,l.throttle)((function(e){if(g===e.clientX&&v===e.clientY)return;const t=h+e.clientX-g,r=m+e.clientY-v;c.style.transform=`translate( ${t}px, ${r}px )`,g=e.clientX,v=e.clientY,h=t,m=r,n&&n(e)}),16);r.addEventListener("dragover",b),r.body.classList.add(jA),t&&t(e),f.current=()=>{c&&c.parentNode&&c.parentNode.removeChild(c),d&&d.parentNode&&d.parentNode.removeChild(d),r.body.classList.remove(jA),r.removeEventListener("dragover",b)}},onDraggableEnd:function(e){e.preventDefault(),f.current(),r&&r(e)}}),d&&(0,wt.jsx)("div",{className:"components-draggable-drag-component-root",style:{display:"none"},ref:p,children:d})]})},PA=(0,wt.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wt.jsx)(n.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"})});const TA=function({className:e,label:t,onFilesDrop:n,onHTMLDrop:r,onDrop:o,...i}){const[u,d]=(0,c.useState)(),[p,f]=(0,c.useState)(),[h,m]=(0,c.useState)(),g=(0,l.__experimentalUseDropZone)({onDrop(e){const t=e.dataTransfer?(0,DT.getFilesFromDataTransfer)(e.dataTransfer):[],i=e.dataTransfer?.getData("text/html");i&&r?r(i):t.length&&n?n(t):o&&o(e)},onDragStart(e){d(!0);let t="default";e.dataTransfer?.types.includes("text/html")?t="html":(e.dataTransfer?.types.includes("Files")||(e.dataTransfer?(0,DT.getFilesFromDataTransfer)(e.dataTransfer):[]).length>0)&&(t="file"),m(t)},onDragEnd(){f(!1),d(!1),m(void 0)},onDragEnter(){f(!0)},onDragLeave(){f(!1)}}),v=s("components-drop-zone",e,{"is-active":(u||p)&&("file"===h&&n||"html"===h&&r||"default"===h&&o),"is-dragging-over-document":u,"is-dragging-over-element":p,[`is-dragging-${h}`]:!!h});return(0,wt.jsx)("div",{...i,ref:g,className:v,children:(0,wt.jsx)("div",{className:"components-drop-zone__content",children:(0,wt.jsxs)("div",{className:"components-drop-zone__content-inner",children:[(0,wt.jsx)(vS,{icon:PA,className:"components-drop-zone__content-icon"}),(0,wt.jsx)("span",{className:"components-drop-zone__content-text",children:t||(0,a.__)("Drop files to upload")})]})})})};function RA({children:e}){return Fi()("wp.components.DropZoneProvider",{since:"5.8",hint:"wp.component.DropZone no longer needs a provider. wp.components.DropZoneProvider is safe to remove from your code."}),e}const IA=(0,wt.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wt.jsx)(n.Path,{d:"M5 17.7c.4.5.8.9 1.2 1.2l1.1-1.4c-.4-.3-.7-.6-1-1L5 17.7zM5 6.3l1.4 1.1c.3-.4.6-.7 1-1L6.3 5c-.5.4-.9.8-1.3 1.3zm.1 7.8l-1.7.5c.2.6.4 1.1.7 1.6l1.5-.8c-.2-.4-.4-.8-.5-1.3zM4.8 12v-.7L3 11.1v1.8l1.7-.2c.1-.2.1-.5.1-.7zm3 7.9c.5.3 1.1.5 1.6.7l.5-1.7c-.5-.1-.9-.3-1.3-.5l-.8 1.5zM19 6.3c-.4-.5-.8-.9-1.2-1.2l-1.1 1.4c.4.3.7.6 1 1L19 6.3zm-.1 3.6l1.7-.5c-.2-.6-.4-1.1-.7-1.6l-1.5.8c.2.4.4.8.5 1.3zM5.6 8.6l-1.5-.8c-.3.5-.5 1-.7 1.6l1.7.5c.1-.5.3-.9.5-1.3zm2.2-4.5l.8 1.5c.4-.2.8-.4 1.3-.5l-.5-1.7c-.6.2-1.1.4-1.6.7zm8.8 13.5l1.1 1.4c.5-.4.9-.8 1.2-1.2l-1.4-1.1c-.2.3-.5.6-.9.9zm1.8-2.2l1.5.8c.3-.5.5-1.1.7-1.6l-1.7-.5c-.1.5-.3.9-.5 1.3zm2.6-4.3l-1.7.2v1.4l1.7.2V12v-.9zM11.1 3l.2 1.7h1.4l.2-1.7h-1.8zm3 2.1c.5.1.9.3 1.3.5l.8-1.5c-.5-.3-1.1-.5-1.6-.7l-.5 1.7zM12 19.2h-.7l-.2 1.8h1.8l-.2-1.7c-.2-.1-.5-.1-.7-.1zm2.1-.3l.5 1.7c.6-.2 1.1-.4 1.6-.7l-.8-1.5c-.4.2-.8.4-1.3.5z"})});function NA(e=[],t="90deg"){const n=100/e.length,r=e.map(((e,t)=>`${e} ${t*n}%, ${e} ${(t+1)*n}%`)).join(", ");return`linear-gradient( ${t}, ${r} )`}Tv([Rv]);const MA=function({values:e}){return e?(0,wt.jsx)(Q_,{colorValue:NA(e,"135deg")}):(0,wt.jsx)(ry,{icon:IA})};function AA({label:e,value:t,colors:n,disableCustomColors:r,enableAlpha:o,onChange:i}){const[s,u]=(0,c.useState)(!1),d=(0,l.useInstanceId)(AA,"color-list-picker-option"),p=`${d}__label`,f=`${d}__content`;return(0,wt.jsxs)(wt.Fragment,{children:[(0,wt.jsx)(sy,{className:"components-color-list-picker__swatch-button",onClick:()=>u((e=>!e)),"aria-expanded":s,"aria-controls":f,children:(0,wt.jsxs)(yy,{justify:"flex-start",spacing:2,children:[t?(0,wt.jsx)(Q_,{colorValue:t,className:"components-color-list-picker__swatch-color"}):(0,wt.jsx)(ry,{icon:IA}),(0,wt.jsx)("span",{id:p,children:e})]})}),(0,wt.jsx)("div",{role:"group",id:f,"aria-labelledby":p,"aria-hidden":!s,children:s&&(0,wt.jsx)(Bk,{"aria-label":(0,a.__)("Color options"),className:"components-color-list-picker__color-picker",colors:n,value:t,clearable:!1,onChange:i,disableCustomColors:r,enableAlpha:o})})]})}const DA=function({colors:e,labels:t,value:n=[],disableCustomColors:r,enableAlpha:o,onChange:i}){return(0,wt.jsx)("div",{className:"components-color-list-picker",children:t.map(((t,s)=>(0,wt.jsx)(AA,{label:t,value:n[s],colors:e,disableCustomColors:r,enableAlpha:o,onChange:e=>{const t=n.slice();t[s]=e,i(t)}},s)))})},OA=["#333","#CCC"];function zA({value:e,onChange:t}){const n=!!e,r=n?e:OA,o=NA(r),i=(s=r).map(((e,t)=>({position:100*t/(s.length-1),color:e})));var s;return(0,wt.jsx)(hT,{disableInserter:!0,background:o,hasGradient:n,value:i,onChange:e=>{const n=function(e=[]){return e.map((({color:e})=>e))}(e);t(n)}})}const LA=function({asButtons:e,loop:t,clearable:n=!0,unsetable:r=!0,colorPalette:o,duotonePalette:i,disableCustomColors:s,disableCustomDuotone:l,value:u,onChange:d,"aria-label":p,"aria-labelledby":f,...h}){const[m,g]=(0,c.useMemo)((()=>{return!(e=o)||e.length<2?["#000","#fff"]:e.map((({color:e})=>({color:e,brightness:Ev(e).brightness()}))).reduce((([e,t],n)=>[n.brightness<=e.brightness?n:e,n.brightness>=t.brightness?n:t]),[{brightness:1,color:""},{brightness:0,color:""}]).map((({color:e})=>e));var e}),[o]),v="unset"===u,b=(0,a.__)("Unset"),x=(0,wt.jsx)(kk.Option,{value:"unset",isSelected:v,tooltipText:b,"aria-label":b,className:"components-duotone-picker__color-indicator",onClick:()=>{d(v?void 0:"unset")}},"unset"),y=i.map((({colors:e,slug:t,name:n})=>{const r={background:NA(e,"135deg"),color:"transparent"},o=null!=n?n:(0,a.sprintf)((0,a.__)("Duotone code: %s"),t),i=n?(0,a.sprintf)((0,a.__)("Duotone: %s"),n):o,s=Ji()(e,u);return(0,wt.jsx)(kk.Option,{value:e,isSelected:s,"aria-label":i,tooltipText:o,style:r,onClick:()=>{d(s?void 0:e)}},t)}));let w;if(e)w={asButtons:!0};else{const e={asButtons:!1,loop:t};w=p?{...e,"aria-label":p}:f?{...e,"aria-labelledby":f}:{...e,"aria-label":(0,a.__)("Custom color picker.")}}const _=r?[x,...y]:y;return(0,wt.jsx)(kk,{...h,...w,options:_,actions:!!n&&(0,wt.jsx)(kk.ButtonAction,{onClick:()=>d(void 0),children:(0,a.__)("Clear")}),children:(0,wt.jsx)(Hg,{paddingTop:0===_.length?0:4,children:(0,wt.jsxs)(jk,{spacing:3,children:[!s&&!l&&(0,wt.jsx)(zA,{value:v?void 0:u,onChange:d}),!l&&(0,wt.jsx)(DA,{labels:[(0,a.__)("Shadows"),(0,a.__)("Highlights")],colors:o,value:v?void 0:u,disableCustomColors:s,enableAlpha:!0,onChange:e=>{e[0]||(e[0]=m),e[1]||(e[1]=g);const t=e.length>=2?e:void 0;d(t)}})]})})})};const FA=(0,c.forwardRef)((function(e,t){const{href:n,children:r,className:o,rel:i="",...l}=e,c=[...new Set([...i.split(" "),"external","noreferrer","noopener"].filter(Boolean))].join(" "),u=s("components-external-link",o),d=!!n?.startsWith("#");return(0,wt.jsxs)("a",{...l,className:u,href:n,onClick:t=>{d&&t.preventDefault(),e.onClick&&e.onClick(t)},target:"_blank",rel:c,ref:t,children:[(0,wt.jsx)("span",{className:"components-external-link__contents",children:r}),(0,wt.jsx)("span",{className:"components-external-link__icon","aria-label":(0,a.__)("(opens in a new tab)"),children:"↗"})]})})),BA={width:200,height:170},VA=["avi","mpg","mpeg","mov","mp4","m4v","ogg","ogv","webm","wmv"];function $A(e){return Math.round(100*e)}const HA=cl("div",{target:"eeew7dm8"})({name:"jqnsxy",styles:"background-color:transparent;display:flex;text-align:center;width:100%"}),WA=cl("div",{target:"eeew7dm7"})("align-items:center;border-radius:",Tl.radiusSmall,";cursor:pointer;display:inline-flex;justify-content:center;margin:auto;position:relative;height:100%;&:after{border-radius:inherit;bottom:0;box-shadow:inset 0 0 0 1px rgba( 0, 0, 0, 0.1 );content:'';left:0;pointer-events:none;position:absolute;right:0;top:0;}img,video{border-radius:inherit;box-sizing:border-box;display:block;height:auto;margin:0;max-height:100%;max-width:100%;pointer-events:none;user-select:none;width:auto;}"),UA=cl("div",{target:"eeew7dm6"})("background:",jl.gray[100],";border-radius:inherit;box-sizing:border-box;height:",BA.height,"px;max-width:280px;min-width:",BA.width,"px;width:100%;"),GA=cl(mj,{target:"eeew7dm5"})({name:"1d3w5wq",styles:"width:100%"});var KA={name:"1mn7kwb",styles:"padding-bottom:1em"};const qA=({__nextHasNoMarginBottom:e})=>e?void 0:KA;var YA={name:"1mn7kwb",styles:"padding-bottom:1em"};const XA=({hasHelpText:e=!1})=>e?YA:void 0,ZA=cl(Ig,{target:"eeew7dm4"})("max-width:320px;padding-top:1em;",XA," ",qA,";"),QA=cl("div",{target:"eeew7dm3"})("left:50%;overflow:hidden;pointer-events:none;position:absolute;top:50%;transform:translate3d( -50%, -50%, 0 );z-index:1;@media not ( prefers-reduced-motion ){transition:opacity 100ms linear;}opacity:",(({showOverlay:e})=>e?1:0),";"),JA=cl("div",{target:"eeew7dm2"})({name:"1yzbo24",styles:"background:rgba( 255, 255, 255, 0.4 );backdrop-filter:blur( 16px ) saturate( 180% );position:absolute;transform:translateZ( 0 )"}),eD=cl(JA,{target:"eeew7dm1"})({name:"1sw8ur",styles:"height:1px;left:1px;right:1px"}),tD=cl(JA,{target:"eeew7dm0"})({name:"188vg4t",styles:"width:1px;top:1px;bottom:1px"}),nD=0,rD=100,oD=()=>{};function iD({__nextHasNoMarginBottom:e,hasHelpText:t,onChange:n=oD,point:r={x:.5,y:.5}}){const o=$A(r.x),i=$A(r.y),s=(e,t)=>{if(void 0===e)return;const o=parseInt(e,10);isNaN(o)||n({...r,[t]:o/100})};return(0,wt.jsxs)(ZA,{className:"focal-point-picker__controls",__nextHasNoMarginBottom:e,hasHelpText:t,gap:4,children:[(0,wt.jsx)(sD,{label:(0,a.__)("Left"),"aria-label":(0,a.__)("Focal point left position"),value:[o,"%"].join(""),onChange:e=>s(e,"x"),dragDirection:"e"}),(0,wt.jsx)(sD,{label:(0,a.__)("Top"),"aria-label":(0,a.__)("Focal point top position"),value:[i,"%"].join(""),onChange:e=>s(e,"y"),dragDirection:"s"})]})}function sD(e){return(0,wt.jsx)(GA,{__next40pxDefaultSize:!0,className:"focal-point-picker__controls-position-unit-control",labelPosition:"top",max:rD,min:nD,units:[{value:"%",label:"%"}],...e})}const aD=cl("div",{target:"e19snlhg0"})("background-color:transparent;cursor:grab;height:40px;margin:-20px 0 0 -20px;position:absolute;user-select:none;width:40px;will-change:transform;z-index:10000;background:rgba( 255, 255, 255, 0.4 );border:1px solid rgba( 255, 255, 255, 0.4 );border-radius:",Tl.radiusRound,";backdrop-filter:blur( 16px ) saturate( 180% );box-shadow:rgb( 0 0 0 / 10% ) 0px 0px 8px;@media not ( prefers-reduced-motion ){transition:transform 100ms linear;}",(({isDragging:e})=>e&&"\n\t\t\tbox-shadow: rgb( 0 0 0 / 12% ) 0px 0px 10px;\n\t\t\ttransform: scale( 1.1 );\n\t\t\tcursor: grabbing;\n\t\t\t"),";");function lD({left:e="50%",top:t="50%",...n}){const r={left:e,top:t};return(0,wt.jsx)(aD,{...n,className:"components-focal-point-picker__icon_container",style:r})}function cD({bounds:e,...t}){return(0,wt.jsxs)(QA,{...t,className:"components-focal-point-picker__grid",style:{width:e.width,height:e.height},children:[(0,wt.jsx)(eD,{style:{top:"33%"}}),(0,wt.jsx)(eD,{style:{top:"66%"}}),(0,wt.jsx)(tD,{style:{left:"33%"}}),(0,wt.jsx)(tD,{style:{left:"66%"}})]})}function uD({alt:e,autoPlay:t,src:n,onLoad:r,mediaRef:o,muted:i=!0,...s}){if(!n)return(0,wt.jsx)(UA,{className:"components-focal-point-picker__media components-focal-point-picker__media--placeholder",ref:o,...s});return function(e=""){return!!e&&(e.startsWith("data:video/")||VA.includes(function(e=""){const t=e.split(".");return t[t.length-1]}(e)))}(n)?(0,wt.jsx)("video",{...s,autoPlay:t,className:"components-focal-point-picker__media components-focal-point-picker__media--video",loop:!0,muted:i,onLoadedData:r,ref:o,src:n}):(0,wt.jsx)("img",{...s,alt:e,className:"components-focal-point-picker__media components-focal-point-picker__media--image",onLoad:r,ref:o,src:n})}const dD=function e({__nextHasNoMarginBottom:t,autoPlay:n=!0,className:r,help:o,label:i,onChange:u,onDrag:d,onDragEnd:p,onDragStart:f,resolvePoint:h,url:m,value:g={x:.5,y:.5},...v}){const[b,x]=(0,c.useState)(g),[y,w]=(0,c.useState)(!1),{startDrag:_,endDrag:S,isDragging:C}=(0,l.__experimentalUseDragging)({onDragStart:e=>{E.current?.focus();const t=I(e);t&&(f?.(t,e),x(t))},onDragMove:e=>{e.preventDefault();const t=I(e);t&&(d?.(t,e),x(t))},onDragEnd:()=>{p?.(),u?.(b)}}),{x:k,y:j}=C?b:g,E=(0,c.useRef)(null),[P,T]=(0,c.useState)(BA),R=(0,c.useRef)((()=>{if(!E.current)return;const{clientWidth:e,clientHeight:t}=E.current;T(e>0&&t>0?{width:e,height:t}:{...BA})}));(0,c.useEffect)((()=>{const e=R.current;if(!E.current)return;const{defaultView:t}=E.current.ownerDocument;return t?.addEventListener("resize",e),()=>t?.removeEventListener("resize",e)}),[]),(0,l.useIsomorphicLayoutEffect)((()=>{R.current()}),[]);const I=({clientX:e,clientY:t,shiftKey:n})=>{if(!E.current)return;const{top:r,left:o}=E.current.getBoundingClientRect();let i=(e-o)/P.width,s=(t-r)/P.height;return n&&(i=.1*Math.round(i/.1),s=.1*Math.round(s/.1)),N({x:i,y:s})},N=e=>{var t;const n=null!==(t=h?.(e))&&void 0!==t?t:e;n.x=Math.max(0,Math.min(n.x,1)),n.y=Math.max(0,Math.min(n.y,1));const r=e=>Math.round(100*e)/100;return{x:r(n.x),y:r(n.y)}},M={left:void 0!==k?k*P.width:.5*P.width,top:void 0!==j?j*P.height:.5*P.height},A=s("components-focal-point-picker-control",r),D=`inspector-focal-point-picker-control-${(0,l.useInstanceId)(e)}`;return ns((()=>{w(!0);const e=window.setTimeout((()=>{w(!1)}),600);return()=>window.clearTimeout(e)}),[k,j]),(0,wt.jsxs)(Qx,{...v,__nextHasNoMarginBottom:t,__associatedWPComponentName:"FocalPointPicker",label:i,id:D,help:o,className:A,children:[(0,wt.jsx)(HA,{className:"components-focal-point-picker-wrapper",children:(0,wt.jsxs)(WA,{className:"components-focal-point-picker",onKeyDown:e=>{const{code:t,shiftKey:n}=e;if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(t))return;e.preventDefault();const r={x:k,y:j},o=n?.1:.01,i="ArrowUp"===t||"ArrowLeft"===t?-1*o:o,s="ArrowUp"===t||"ArrowDown"===t?"y":"x";r[s]=r[s]+i,u?.(N(r))},onMouseDown:_,onBlur:()=>{C&&S()},ref:E,role:"button",tabIndex:-1,children:[(0,wt.jsx)(cD,{bounds:P,showOverlay:y}),(0,wt.jsx)(uD,{alt:(0,a.__)("Media preview"),autoPlay:n,onLoad:R.current,src:m}),(0,wt.jsx)(lD,{...M,isDragging:C})]})}),(0,wt.jsx)(iD,{__nextHasNoMarginBottom:t,hasHelpText:!!o,point:{x:k,y:j},onChange:e=>{u?.(N(e))}})]})};function pD({iframeRef:e,...t}){const n=(0,l.useMergeRefs)([e,(0,l.useFocusableIframe)()]);return Fi()("wp.components.FocusableIframe",{since:"5.9",alternative:"wp.compose.useFocusableIframe"}),(0,wt.jsx)("iframe",{ref:n,...t})}const fD=(0,wt.jsxs)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,wt.jsx)(n.Path,{d:"m19 7.5h-7.628c-.3089-.87389-1.1423-1.5-2.122-1.5-.97966 0-1.81309.62611-2.12197 1.5h-2.12803v1.5h2.12803c.30888.87389 1.14231 1.5 2.12197 1.5.9797 0 1.8131-.62611 2.122-1.5h7.628z"}),(0,wt.jsx)(n.Path,{d:"m19 15h-2.128c-.3089-.8739-1.1423-1.5-2.122-1.5s-1.8131.6261-2.122 1.5h-7.628v1.5h7.628c.3089.8739 1.1423 1.5 2.122 1.5s1.8131-.6261 2.122-1.5h2.128z"})]});function hD(e){const[t,...n]=e;if(!t)return null;const[,r]=lj(t.size);return n.every((e=>{const[,t]=lj(e.size);return t===r}))?r:null}const mD=cl("fieldset",{target:"e8tqeku4"})({name:"1t1ytme",styles:"border:0;margin:0;padding:0"}),gD=cl(yy,{target:"e8tqeku3"})("height:",wl(4),";"),vD=cl(sy,{target:"e8tqeku2"})("margin-top:",wl(-1),";"),bD=cl(Qx.VisualLabel,{target:"e8tqeku1"})("display:flex;gap:",wl(1),";justify-content:flex-start;margin-bottom:0;"),xD=cl("span",{target:"e8tqeku0"})("color:",jl.gray[700],";"),yD={key:"default",name:(0,a.__)("Default"),value:void 0},wD={key:"custom",name:(0,a.__)("Custom")},_D=e=>{var t;const{__next40pxDefaultSize:n,fontSizes:r,value:o,disableCustomFontSizes:i,size:s,onChange:l,onSelectCustom:c}=e,u=!!hD(r),d=[yD,...r.map((e=>{let t;if(u){const[n]=lj(e.size);void 0!==n&&(t=String(n))}else(function(e){return/^[\d\.]+(px|em|rem|vw|vh|%|svw|lvw|dvw|svh|lvh|dvh|vi|svi|lvi|dvi|vb|svb|lvb|dvb|vmin|svmin|lvmin|dvmin|vmax|svmax|lvmax|dvmax)?$/i.test(String(e))})(e.size)&&(t=String(e.size));return{key:e.slug,name:e.name||e.slug,value:e.size,hint:t}})),...i?[]:[wD]],p=o?null!==(t=d.find((e=>e.value===o)))&&void 0!==t?t:wD:yD;return(0,wt.jsx)(nN,{__next40pxDefaultSize:n,className:"components-font-size-picker__select",label:(0,a.__)("Font size"),hideLabelFromVision:!0,describedBy:(0,a.sprintf)((0,a.__)("Currently selected font size: %s"),p.name),options:d,value:p,showSelectedHint:!0,onChange:({selectedItem:e})=>{e===wD?c():l(e.value)},size:s})},SD=[(0,a.__)("S"),(0,a.__)("M"),(0,a.__)("L"),(0,a.__)("XL"),(0,a.__)("XXL")],CD=[(0,a.__)("Small"),(0,a.__)("Medium"),(0,a.__)("Large"),(0,a.__)("Extra Large"),(0,a.__)("Extra Extra Large")],kD=e=>{const{fontSizes:t,value:n,__next40pxDefaultSize:r,size:o,onChange:i}=e;return(0,wt.jsx)(R_,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:r,label:(0,a.__)("Font size"),hideLabelFromVision:!0,value:n,onChange:i,isBlock:!0,size:o,children:t.map(((e,t)=>(0,wt.jsx)(aA,{value:e.size,label:SD[t],"aria-label":e.name||CD[t],showTooltip:!0},e.slug)))})},jD=["px","em","rem","vw","vh"],ED=(0,c.forwardRef)(((e,t)=>{const{__next40pxDefaultSize:n=!1,fallbackFontSize:r,fontSizes:o=[],disableCustomFontSizes:i=!1,onChange:s,size:l="default",units:u=jD,value:d,withSlider:p=!1,withReset:f=!0}=e,h=cj({availableUnits:u}),m=o.find((e=>e.size===d)),g=!!d&&!m,[v,b]=(0,c.useState)(g);let x;x=!i&&v?"custom":o.length>5?"select":"togglegroup";const y=(0,c.useMemo)((()=>{switch(x){case"custom":return(0,a.__)("Custom");case"togglegroup":if(m)return m.name||CD[o.indexOf(m)];break;case"select":const e=hD(o);if(e)return`(${e})`}return""}),[x,m,o]);if(0===o.length&&i)return null;const w="string"==typeof d||"string"==typeof o[0]?.size,[_,S]=lj(d,h),C=!!S&&["em","rem","vw","vh"].includes(S),k=void 0===d;return(0,wt.jsxs)(mD,{ref:t,className:"components-font-size-picker",children:[(0,wt.jsx)(pl,{as:"legend",children:(0,a.__)("Font size")}),(0,wt.jsx)(Hg,{children:(0,wt.jsxs)(gD,{className:"components-font-size-picker__header",children:[(0,wt.jsxs)(bD,{"aria-label":`${(0,a.__)("Size")} ${y||""}`,children:[(0,a.__)("Size"),y&&(0,wt.jsx)(xD,{className:"components-font-size-picker__header__hint",children:y})]}),!i&&(0,wt.jsx)(vD,{label:"custom"===x?(0,a.__)("Use size preset"):(0,a.__)("Set custom size"),icon:fD,onClick:()=>b(!v),isPressed:"custom"===x,size:"small"})]})}),(0,wt.jsxs)("div",{children:["select"===x&&(0,wt.jsx)(_D,{__next40pxDefaultSize:n,fontSizes:o,value:d,disableCustomFontSizes:i,size:l,onChange:e=>{void 0===e?s?.(void 0):s?.(w?e:Number(e),o.find((t=>t.size===e)))},onSelectCustom:()=>b(!0)}),"togglegroup"===x&&(0,wt.jsx)(kD,{fontSizes:o,value:d,__next40pxDefaultSize:n,size:l,onChange:e=>{void 0===e?s?.(void 0):s?.(w?e:Number(e),o.find((t=>t.size===e)))}}),"custom"===x&&(0,wt.jsxs)(Ig,{className:"components-font-size-picker__custom-size-control",children:[(0,wt.jsx)(Gg,{isBlock:!0,children:(0,wt.jsx)(mj,{__next40pxDefaultSize:n,label:(0,a.__)("Custom"),labelPosition:"top",hideLabelFromVision:!0,value:d,onChange:e=>{b(!0),s?.(void 0===e?void 0:w?e:parseInt(e,10))},size:l,units:w?h:[],min:0})}),p&&(0,wt.jsx)(Gg,{isBlock:!0,children:(0,wt.jsx)(Hg,{marginX:2,marginBottom:0,children:(0,wt.jsx)(dC,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:n,className:"components-font-size-picker__custom-input",label:(0,a.__)("Custom Size"),hideLabelFromVision:!0,value:_,initialPosition:r,withInputField:!1,onChange:e=>{b(!0),s?.(void 0===e?void 0:w?e+(null!=S?S:"px"):e)},min:0,max:C?10:100,step:C?.1:1})})}),f&&(0,wt.jsx)(Gg,{children:(0,wt.jsx)(iy,{disabled:k,accessibleWhenDisabled:!0,onClick:()=>{s?.(void 0)},variant:"secondary",__next40pxDefaultSize:!0,size:"__unstable-large"===l||e.__next40pxDefaultSize?"default":"small",children:(0,a.__)("Reset")})})]})]})]})})),PD=ED;const TD=function({accept:e,children:t,multiple:n=!1,onChange:r,onClick:o,render:i,...s}){const a=(0,c.useRef)(null),l=()=>{a.current?.click()},u=i?i({openFileDialog:l}):(0,wt.jsx)(sy,{onClick:l,...s,children:t}),d=e?.includes("image/*")?`${e}, image/heic, image/heif`:e;return(0,wt.jsxs)("div",{className:"components-form-file-upload",children:[u,(0,wt.jsx)("input",{type:"file",ref:a,multiple:n,style:{display:"none"},accept:d,onChange:r,onClick:o,"data-testid":"form-file-upload-input"})]})},RD=()=>{};const ID=(0,c.forwardRef)((function(e,t){const{className:n,checked:r,id:o,disabled:i,onChange:a=RD,...l}=e,c=s("components-form-toggle",n,{"is-checked":r,"is-disabled":i});return(0,wt.jsxs)("span",{className:c,children:[(0,wt.jsx)("input",{className:"components-form-toggle__input",id:o,type:"checkbox",checked:r,onChange:a,disabled:i,...l,ref:t}),(0,wt.jsx)("span",{className:"components-form-toggle__track"}),(0,wt.jsx)("span",{className:"components-form-toggle__thumb"})]})})),ND=ID,MD=()=>{};function AD({value:e,status:t,title:n,displayTransform:r,isBorderless:o=!1,disabled:i=!1,onClickRemove:c=MD,onMouseEnter:u,onMouseLeave:d,messages:p,termPosition:f,termsCount:h}){const m=(0,l.useInstanceId)(AD),g=s("components-form-token-field__token",{"is-error":"error"===t,"is-success":"success"===t,"is-validating":"validating"===t,"is-borderless":o,"is-disabled":i}),v=r(e),b=(0,a.sprintf)((0,a.__)("%1$s (%2$s of %3$s)"),v,f,h);return(0,wt.jsxs)("span",{className:g,onMouseEnter:u,onMouseLeave:d,title:n,children:[(0,wt.jsxs)("span",{className:"components-form-token-field__token-text",id:`components-form-token-field__token-text-${m}`,children:[(0,wt.jsx)(pl,{as:"span",children:b}),(0,wt.jsx)("span",{"aria-hidden":"true",children:v})]}),(0,wt.jsx)(sy,{className:"components-form-token-field__remove-token",icon:e_,onClick:i?void 0:()=>c({value:e}),disabled:i,label:p.remove,"aria-describedby":`components-form-token-field__token-text-${m}`})]})}const DD=({__next40pxDefaultSize:e,hasTokens:t})=>!e&&bl("padding-top:",wl(t?1:.5),";padding-bottom:",wl(t?1:.5),";",""),OD=cl(Ig,{target:"ehq8nmi0"})("padding:7px;",Bx," ",DD,";"),zD=e=>e;const LD=function e(t){const{autoCapitalize:n,autoComplete:r,maxLength:o,placeholder:i,label:u=(0,a.__)("Add item"),className:d,suggestions:p=[],maxSuggestions:f=100,value:h=[],displayTransform:m=zD,saveTransform:g=(e=>e.trim()),onChange:v=(()=>{}),onInputChange:b=(()=>{}),onFocus:x,isBorderless:y=!1,disabled:w=!1,tokenizeOnSpace:_=!1,messages:S={added:(0,a.__)("Item added."),removed:(0,a.__)("Item removed."),remove:(0,a.__)("Remove item"),__experimentalInvalid:(0,a.__)("Invalid item")},__experimentalRenderItem:C,__experimentalExpandOnFocus:k=!1,__experimentalValidateInput:j=(()=>!0),__experimentalShowHowTo:E=!0,__next40pxDefaultSize:P=!1,__experimentalAutoSelectFirstMatch:T=!1,__nextHasNoMarginBottom:R=!1,tokenizeOnBlur:I=!1}=_b(t);R||Fi()("Bottom margin styles for wp.components.FormTokenField",{since:"6.7",version:"7.0",hint:"Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version."});const N=(0,l.useInstanceId)(e),[M,A]=(0,c.useState)(""),[D,O]=(0,c.useState)(0),[z,L]=(0,c.useState)(!1),[F,B]=(0,c.useState)(!1),[V,$]=(0,c.useState)(-1),[H,W]=(0,c.useState)(!1),U=(0,l.usePrevious)(p),G=(0,l.usePrevious)(h),K=(0,c.useRef)(null),q=(0,c.useRef)(null),Y=(0,l.useDebounce)(My.speak,500);function X(){K.current?.focus()}function Z(){return K.current===K.current?.ownerDocument.activeElement}function Q(e){if(fe()&&j(M))L(!1),I&&fe()&&ae(M);else{if(A(""),O(0),L(!1),k){const t=e.relatedTarget===q.current;B(t)}else B(!1);$(-1),W(!1)}}function J(e){e.target===q.current&&z&&e.preventDefault()}function ee(e){le(e.value),X()}function te(e){const t=e.value,n=_?/[ ,\t]+/:/[,\t]+/,r=t.split(n),o=r[r.length-1]||"";r.length>1&&se(r.slice(0,-1)),A(o),b(o)}function ne(e){let t=!1;return Z()&&pe()&&(e(),t=!0),t}function re(){const e=de()-1;e>-1&&le(h[e])}function oe(){const e=de();e<h.length&&(le(h[e]),function(e){O(h.length-Math.max(e,-1)-1)}(e))}function ie(){let e=!1;const t=function(){if(-1!==V)return ue()[V];return}();return t?(ae(t),e=!0):fe()&&(ae(M),e=!0),e}function se(e){const t=[...new Set(e.map(g).filter(Boolean).filter((e=>!function(e){return h.some((t=>ce(e)===ce(t)))}(e))))];if(t.length>0){const e=[...h];e.splice(de(),0,...t),v(e)}}function ae(e){j(e)?(se([e]),(0,My.speak)(S.added,"assertive"),A(""),$(-1),W(!1),B(!k),z&&!I&&X()):(0,My.speak)(S.__experimentalInvalid,"assertive")}function le(e){const t=h.filter((t=>ce(t)!==ce(e)));v(t),(0,My.speak)(S.removed,"assertive")}function ce(e){return"object"==typeof e?e.value:e}function ue(e=M,t=p,n=h,r=f,o=g){let i=o(e);const s=[],a=[],l=n.map((e=>"string"==typeof e?e:e.value));return 0===i.length?t=t.filter((e=>!l.includes(e))):(i=i.toLocaleLowerCase(),t.forEach((e=>{const t=e.toLocaleLowerCase().indexOf(i);-1===l.indexOf(e)&&(0===t?s.push(e):t>0&&a.push(e))})),t=s.concat(a)),t.slice(0,r)}function de(){return h.length-D}function pe(){return 0===M.length}function fe(){return g(M).length>0}function he(e=!0){const t=M.trim().length>1,n=ue(M),r=n.length>0,o=Z()&&k;if(B(o||t&&r),e&&(T&&t&&r?($(0),W(!0)):($(-1),W(!1))),t){const e=r?(0,a.sprintf)((0,a._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",n.length),n.length):(0,a.__)("No results.");Y(e,"assertive")}}function me(e,t,n){const r=ce(e),o="string"!=typeof e?e.status:void 0,i=t+1,s=n.length;return(0,wt.jsx)(Gg,{children:(0,wt.jsx)(AD,{value:r,status:o,title:"string"!=typeof e?e.title:void 0,displayTransform:m,onClickRemove:ee,isBorderless:"string"!=typeof e&&e.isBorderless||y,onMouseEnter:"string"!=typeof e?e.onMouseEnter:void 0,onMouseLeave:"string"!=typeof e?e.onMouseLeave:void 0,disabled:"error"!==o&&w,messages:S,termsCount:s,termPosition:i})},"token-"+r)}(0,c.useEffect)((()=>{z&&!Z()&&X()}),[z]),(0,c.useEffect)((()=>{const e=!ww()(p,U||[]);(e||h!==G)&&he(e)}),[p,U,h,G]),(0,c.useEffect)((()=>{he()}),[M]),(0,c.useEffect)((()=>{he()}),[T]),w&&z&&(L(!1),A(""));const ge=s(d,"components-form-token-field__input-container",{"is-active":z,"is-disabled":w});let ve={className:"components-form-token-field",tabIndex:-1};const be=ue();return w||(ve=Object.assign({},ve,{onKeyDown:Ax((function(e){let t=!1;if(!e.defaultPrevented){switch(e.key){case"Backspace":t=ne(re);break;case"Enter":t=ie();break;case"ArrowLeft":t=function(){let e=!1;return pe()&&(O((e=>Math.min(e+1,h.length))),e=!0),e}();break;case"ArrowUp":$((e=>(0===e?ue(M,p,h,f,g).length:e)-1)),W(!0),t=!0;break;case"ArrowRight":t=function(){let e=!1;return pe()&&(O((e=>Math.max(e-1,0))),e=!0),e}();break;case"ArrowDown":$((e=>(e+1)%ue(M,p,h,f,g).length)),W(!0),t=!0;break;case"Delete":t=ne(oe);break;case"Space":_&&(t=ie());break;case"Escape":t=function(e){return e.target instanceof HTMLInputElement&&(A(e.target.value),B(!1),$(-1),W(!1)),!0}(e)}t&&e.preventDefault()}})),onKeyPress:function(e){let t=!1;","===e.key&&(fe()&&ae(M),t=!0);t&&e.preventDefault()},onFocus:function(e){Z()||e.target===q.current?(L(!0),B(k||F)):L(!1),"function"==typeof x&&x(e)}})),(0,wt.jsxs)("div",{...ve,children:[u&&(0,wt.jsx)(Ux,{htmlFor:`components-form-token-input-${N}`,className:"components-form-token-field__label",children:u}),(0,wt.jsxs)("div",{ref:q,className:ge,tabIndex:-1,onMouseDown:J,onTouchStart:J,children:[(0,wt.jsx)(OD,{justify:"flex-start",align:"center",gap:1,wrap:!0,__next40pxDefaultSize:P,hasTokens:!!h.length,children:function(){const e=h.map(me);return e.splice(de(),0,function(){const e={instanceId:N,autoCapitalize:n,autoComplete:r,placeholder:0===h.length?i:"",disabled:w,value:M,onBlur:Q,isExpanded:F,selectedSuggestionIndex:V};return(0,wt.jsx)(fR,{...e,onChange:o&&h.length>=o?void 0:te,ref:K},"input")}()),e}()}),F&&(0,wt.jsx)(mR,{instanceId:N,match:g(M),displayTransform:m,suggestions:be,selectedIndex:V,scrollIntoView:H,onHover:function(e){const t=ue().indexOf(e);t>=0&&($(t),W(!1))},onSelect:function(e){ae(e)},__experimentalRenderItem:C})]}),!R&&(0,wt.jsx)(Hg,{marginBottom:2}),E&&(0,wt.jsx)(qx,{id:`components-form-token-suggestions-howto-${N}`,className:"components-form-token-field__help",__nextHasNoMarginBottom:R,children:_?(0,a.__)("Separate with commas, spaces, or the Enter key."):(0,a.__)("Separate with commas or the Enter key.")})]})},FD=()=>(0,wt.jsx)(n.SVG,{width:"8",height:"8",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,wt.jsx)(n.Circle,{cx:"4",cy:"4",r:"4"})});function BD({currentPage:e,numberOfPages:t,setCurrentPage:n}){return(0,wt.jsx)("ul",{className:"components-guide__page-control","aria-label":(0,a.__)("Guide controls"),children:Array.from({length:t}).map(((r,o)=>(0,wt.jsx)("li",{"aria-current":o===e?"step":void 0,children:(0,wt.jsx)(sy,{icon:(0,wt.jsx)(FD,{}),"aria-label":(0,a.sprintf)((0,a.__)("Page %1$d of %2$d"),o+1,t),onClick:()=>n(o)},o)},o)))})}const VD=function({children:e,className:t,contentLabel:n,finishButtonText:r=(0,a.__)("Finish"),onFinish:o,pages:i=[]}){const l=(0,c.useRef)(null),[u,d]=(0,c.useState)(0);var p;(0,c.useEffect)((()=>{const e=l.current?.querySelector(".components-guide");e instanceof HTMLElement&&e.focus()}),[u]),(0,c.useEffect)((()=>{c.Children.count(e)&&Fi()("Passing children to <Guide>",{since:"5.5",alternative:"the `pages` prop"})}),[e]),c.Children.count(e)&&(i=null!==(p=c.Children.map(e,(e=>({content:e}))))&&void 0!==p?p:[]);const f=u>0,h=u<i.length-1,m=()=>{f&&d(u-1)},g=()=>{h&&d(u+1)};return 0===i.length?null:(0,wt.jsx)(LR,{className:s("components-guide",t),contentLabel:n,isDismissible:i.length>1,onRequestClose:o,onKeyDown:e=>{"ArrowLeft"===e.code?(m(),e.preventDefault()):"ArrowRight"===e.code&&(g(),e.preventDefault())},ref:l,children:(0,wt.jsxs)("div",{className:"components-guide__container",children:[(0,wt.jsxs)("div",{className:"components-guide__page",children:[i[u].image,i.length>1&&(0,wt.jsx)(BD,{currentPage:u,numberOfPages:i.length,setCurrentPage:d}),i[u].content]}),(0,wt.jsxs)("div",{className:"components-guide__footer",children:[f&&(0,wt.jsx)(sy,{className:"components-guide__back-button",variant:"tertiary",onClick:m,__next40pxDefaultSize:!0,children:(0,a.__)("Previous")}),h&&(0,wt.jsx)(sy,{className:"components-guide__forward-button",variant:"primary",onClick:g,__next40pxDefaultSize:!0,children:(0,a.__)("Next")}),!h&&(0,wt.jsx)(sy,{className:"components-guide__finish-button",variant:"primary",onClick:o,__next40pxDefaultSize:!0,children:r})]})]})})};function $D(e){return(0,c.useEffect)((()=>{Fi()("<GuidePage>",{since:"5.5",alternative:"the `pages` prop in <Guide>"})}),[]),(0,wt.jsx)("div",{...e})}const HD=(0,c.forwardRef)((function({label:e,labelPosition:t,size:n,tooltip:r,...o},i){return Fi()("wp.components.IconButton",{since:"5.4",alternative:"wp.components.Button",version:"6.2"}),(0,wt.jsx)(sy,{...o,ref:i,tooltipPosition:t,iconSize:n,showTooltip:void 0!==r?!!r:void 0,label:r||e})}));const WD=Xa((function(e,t){const{role:n,wrapperClassName:r,...o}=function(e){const{as:t,className:n,onClick:r,role:o="listitem",size:i,...s}=Ya(e,"Item"),{spacedAround:a,size:l}=QP(),u=i||l,d=t||(void 0!==r?"button":"div"),p=qa(),f=(0,c.useMemo)((()=>p(("button"===d||"a"===d)&&LP(d),XP[u]||XP.medium,BP,a&&WP,n)),[d,n,p,u,a]),h=p(FP);return{as:d,className:f,onClick:r,wrapperClassName:h,role:o,...s}}(e);return(0,wt.jsx)("div",{role:n,className:r,children:(0,wt.jsx)(dl,{...o,ref:t})})}),"Item"),UD=WD;function GD({target:e,callback:t,shortcut:n,bindGlobal:r,eventName:o}){return(0,l.useKeyboardShortcut)(n,t,{bindGlobal:r,target:e,eventName:o}),null}const KD=function({children:e,shortcuts:t,bindGlobal:n,eventName:r}){const o=(0,c.useRef)(null),i=Object.entries(null!=t?t:{}).map((([e,t])=>(0,wt.jsx)(GD,{shortcut:e,callback:t,bindGlobal:n,eventName:r,target:o},e)));return c.Children.count(e)?(0,wt.jsxs)("div",{ref:o,children:[i,e]}):(0,wt.jsx)(wt.Fragment,{children:i})};const qD=function e(t){const{children:n,className:r="",label:o,hideSeparator:i}=t,a=(0,l.useInstanceId)(e);if(!c.Children.count(n))return null;const u=`components-menu-group-label-${a}`,d=s(r,"components-menu-group",{"has-hidden-separator":i});return(0,wt.jsxs)("div",{className:d,children:[o&&(0,wt.jsx)("div",{className:"components-menu-group__label",id:u,"aria-hidden":"true",children:o}),(0,wt.jsx)("div",{role:"group","aria-labelledby":o?u:void 0,children:n})]})};const YD=(0,c.forwardRef)((function(e,t){let{children:n,info:r,className:o,icon:i,iconPosition:a="right",shortcut:l,isSelected:u,role:d="menuitem",suffix:p,...f}=e;return o=s("components-menu-item__button",o),r&&(n=(0,wt.jsxs)("span",{className:"components-menu-item__info-wrapper",children:[(0,wt.jsx)("span",{className:"components-menu-item__item",children:n}),(0,wt.jsx)("span",{className:"components-menu-item__info",children:r})]})),i&&"string"!=typeof i&&(i=(0,c.cloneElement)(i,{className:s("components-menu-items__item-icon",{"has-icon-right":"right"===a})})),(0,wt.jsxs)(sy,{ref:t,"aria-checked":"menuitemcheckbox"===d||"menuitemradio"===d?u:void 0,role:d,icon:"left"===a?i:void 0,className:o,...f,children:[(0,wt.jsx)("span",{className:"components-menu-item__item",children:n}),!p&&(0,wt.jsx)(Bi,{className:"components-menu-item__shortcut",shortcut:l}),!p&&i&&"right"===a&&(0,wt.jsx)(ry,{icon:i}),p]})})),XD=YD,ZD=()=>{};const QD=function({choices:e=[],onHover:t=ZD,onSelect:n,value:r}){return(0,wt.jsx)(wt.Fragment,{children:e.map((e=>{const o=r===e.value;return(0,wt.jsx)(XD,{role:"menuitemradio",disabled:e.disabled,icon:o?xk:null,info:e.info,isSelected:o,shortcut:e.shortcut,className:"components-menu-items-choice",onClick:()=>{o||n(e.value)},onMouseEnter:()=>t(e.value),onMouseLeave:()=>t(null),"aria-label":e["aria-label"],children:e.label},e.value)}))})};const JD=(0,c.forwardRef)((function({eventToOffset:e,...t},n){return(0,wt.jsx)(BT,{ref:n,stopNavigationEvents:!0,onlyBrowserTabstops:!0,eventToOffset:t=>{const{code:n,shiftKey:r}=t;return"Tab"===n?r?-1:1:e?e(t):void 0},...t})})),eO="root",tO=100,nO=()=>{},rO=()=>{},oO=(0,c.createContext)({activeItem:void 0,activeMenu:eO,setActiveMenu:nO,navigationTree:{items:{},getItem:rO,addItem:nO,removeItem:nO,menus:{},getMenu:rO,addMenu:nO,removeMenu:nO,childMenu:{},traverseMenu:nO,isMenuEmpty:()=>!1}}),iO=()=>(0,c.useContext)(oO);const sO=cl("div",{target:"eeiismy11"})("width:100%;box-sizing:border-box;padding:0 ",wl(4),";overflow:hidden;"),aO=cl("div",{target:"eeiismy10"})("margin-top:",wl(6),";margin-bottom:",wl(6),";display:flex;flex-direction:column;ul{padding:0;margin:0;list-style:none;}.components-navigation__back-button{margin-bottom:",wl(6),";}.components-navigation__group+.components-navigation__group{margin-top:",wl(6),";}"),lO=cl(sy,{target:"eeiismy9"})({name:"26l0q2",styles:"&.is-tertiary{color:inherit;opacity:0.7;&:hover:not( :disabled ){opacity:1;box-shadow:none;color:inherit;}&:active:not( :disabled ){background:transparent;opacity:1;color:inherit;}}"}),cO=cl("div",{target:"eeiismy8"})({name:"1aubja5",styles:"overflow:hidden;width:100%"}),uO=cl("div",{target:"eeiismy7"})({name:"rgorny",styles:"margin:11px 0;padding:1px"}),dO=cl("span",{target:"eeiismy6"})("height:",wl(6),";.components-button.is-small{color:inherit;opacity:0.7;margin-right:",wl(1),";padding:0;&:active:not( :disabled ){background:none;opacity:1;color:inherit;}&:hover:not( :disabled ){box-shadow:none;opacity:1;color:inherit;}}"),pO=cl(Tk,{target:"eeiismy5"})("min-height:",wl(12),";align-items:center;color:inherit;display:flex;justify-content:space-between;margin-bottom:",wl(2),";padding:",(()=>(0,a.isRTL)()?`${wl(1)} ${wl(4)} ${wl(1)} ${wl(2)}`:`${wl(1)} ${wl(2)} ${wl(1)} ${wl(4)}`),";"),fO=cl("li",{target:"eeiismy4"})("border-radius:",Tl.radiusSmall,";color:inherit;margin-bottom:0;>button,>a.components-button,>a{width:100%;color:inherit;opacity:0.7;padding:",wl(2)," ",wl(4),";",Bg({textAlign:"left"},{textAlign:"right"})," &:hover,&:focus:not( [aria-disabled='true'] ):active,&:active:not( [aria-disabled='true'] ):active{color:inherit;opacity:1;}}&.is-active{background-color:",jl.theme.accent,";color:",jl.white,";>button,>a{color:",jl.white,";opacity:1;}}>svg path{color:",jl.gray[600],";}"),hO=cl("div",{target:"eeiismy3"})("display:flex;align-items:center;height:auto;min-height:40px;margin:0;padding:",wl(1.5)," ",wl(4),";font-weight:400;line-height:20px;width:100%;color:inherit;opacity:0.7;"),mO=cl("span",{target:"eeiismy2"})("display:flex;margin-right:",wl(2),";"),gO=cl("span",{target:"eeiismy1"})("margin-left:",(()=>(0,a.isRTL)()?"0":wl(2)),";margin-right:",(()=>(0,a.isRTL)()?wl(2):"0"),";display:inline-flex;padding:",wl(1)," ",wl(3),";border-radius:",Tl.radiusSmall,";@keyframes fade-in{from{opacity:0;}to{opacity:1;}}@media not ( prefers-reduced-motion ){animation:fade-in 250ms ease-out;}"),vO=cl(Xv,{target:"eeiismy0"})((()=>(0,a.isRTL)()?"margin-left: auto;":"margin-right: auto;")," font-size:14px;line-height:20px;color:inherit;");function bO(){const[e,t]=(0,c.useState)({});return{nodes:e,getNode:t=>e[t],addNode:(e,n)=>{const{children:r,...o}=n;return t((t=>({...t,[e]:o})))},removeNode:e=>t((t=>{const{[e]:n,...r}=t;return r}))}}const xO=()=>{};const yO=function({activeItem:e,activeMenu:t=eO,children:n,className:r,onActivateMenu:o=xO}){const[i,l]=(0,c.useState)(t),[u,d]=(0,c.useState)(),p=(()=>{const{nodes:e,getNode:t,addNode:n,removeNode:r}=bO(),{nodes:o,getNode:i,addNode:s,removeNode:a}=bO(),[l,u]=(0,c.useState)({}),d=e=>l[e]||[],p=(e,t)=>{const n=[];let r,o=[e];for(;o.length>0&&(r=i(o.shift()),!r||n.includes(r.menu)||(n.push(r.menu),o=[...o,...d(r.menu)],!1!==t(r))););};return{items:e,getItem:t,addItem:n,removeItem:r,menus:o,getMenu:i,addMenu:(e,t)=>{u((n=>{const r={...n};return t.parentMenu?(r[t.parentMenu]||(r[t.parentMenu]=[]),r[t.parentMenu].push(e),r):r})),s(e,t)},removeMenu:a,childMenu:l,traverseMenu:p,isMenuEmpty:e=>{let t=!0;return p(e,(e=>{if(!e.isEmpty)return t=!1,!1})),t}}})(),f=(0,a.isRTL)()?"right":"left",h=(e,t=f)=>{p.getMenu(e)&&(d(t),l(e),o(e))},m=(0,c.useRef)(!1);(0,c.useEffect)((()=>{m.current||(m.current=!0)}),[]),(0,c.useEffect)((()=>{t!==i&&h(t)}),[t]);const g={activeItem:e,activeMenu:i,setActiveMenu:h,navigationTree:p},v=s("components-navigation",r),b=Vl({type:"slide-in",origin:u});return(0,wt.jsx)(sO,{className:v,children:(0,wt.jsx)("div",{className:b?s({[b]:m.current&&u}):void 0,children:(0,wt.jsx)(oO.Provider,{value:g,children:n})},i)})},wO=(0,wt.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wt.jsx)(n.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})}),_O=(0,wt.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wt.jsx)(n.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})});const SO=(0,c.forwardRef)((function({backButtonLabel:e,className:t,href:n,onClick:r,parentMenu:o},i){const{setActiveMenu:l,navigationTree:c}=iO(),u=s("components-navigation__back-button",t),d=void 0!==o?c.getMenu(o)?.title:void 0,p=(0,a.isRTL)()?wO:_O;return(0,wt.jsxs)(lO,{className:u,href:n,variant:"tertiary",ref:i,onClick:e=>{"function"==typeof r&&r(e);const t=(0,a.isRTL)()?"left":"right";o&&!e.defaultPrevented&&l(o,t)},children:[(0,wt.jsx)(vS,{icon:p}),e||d||(0,a.__)("Back")]})})),CO=SO,kO=(0,c.createContext)({group:void 0});let jO=0;const EO=function({children:e,className:t,title:n}){const[r]=(0,c.useState)("group-"+ ++jO),{navigationTree:{items:o}}=iO(),i={group:r};if(!Object.values(o).some((e=>e.group===r&&e._isVisible)))return(0,wt.jsx)(kO.Provider,{value:i,children:e});const a=`components-navigation__group-title-${r}`,l=s("components-navigation__group",t);return(0,wt.jsx)(kO.Provider,{value:i,children:(0,wt.jsxs)("li",{className:l,children:[n&&(0,wt.jsx)(pO,{className:"components-navigation__group-title",id:a,level:3,children:n}),(0,wt.jsx)("ul",{"aria-labelledby":a,role:"group",children:e})]})})};function PO(e){const{badge:t,title:n}=e;return(0,wt.jsxs)(wt.Fragment,{children:[n&&(0,wt.jsx)(vO,{className:"components-navigation__item-title",as:"span",children:n}),t&&(0,wt.jsx)(gO,{className:"components-navigation__item-badge",children:t})]})}const TO=(0,c.createContext)({menu:void 0,search:""}),RO=()=>(0,c.useContext)(TO),IO=e=>Iy()(e).replace(/^\//,"").toLowerCase(),NO=(e,t)=>{const{activeMenu:n,navigationTree:{addItem:r,removeItem:o}}=iO(),{group:i}=(0,c.useContext)(kO),{menu:s,search:a}=RO();(0,c.useEffect)((()=>{const l=n===s,c=!a||void 0!==t.title&&((e,t)=>-1!==IO(e).indexOf(IO(t)))(t.title,a);return r(e,{...t,group:i,menu:s,_isVisible:l&&c}),()=>{o(e)}}),[n,a])};let MO=0;function AO(e){const{children:t,className:n,title:r,href:o,...i}=e,[a]=(0,c.useState)("item-"+ ++MO);NO(a,e);const{navigationTree:l}=iO();if(!l.getItem(a)?._isVisible)return null;const u=s("components-navigation__item",n);return(0,wt.jsx)(fO,{className:u,...i,children:t})}const DO=()=>{};const OO=function(e){const{badge:t,children:n,className:r,href:o,item:i,navigateToMenu:l,onClick:c=DO,title:u,icon:d,hideIfTargetMenuEmpty:p,isText:f,...h}=e,{activeItem:m,setActiveMenu:g,navigationTree:{isMenuEmpty:v}}=iO();if(p&&l&&v(l))return null;const b=i&&m===i,x=s(r,{"is-active":b}),y=(0,a.isRTL)()?_O:wO,w=n?e:{...e,onClick:void 0},_=f?h:{as:sy,href:o,onClick:e=>{l&&g(l),c(e)},"aria-current":b?"page":void 0,...h};return(0,wt.jsx)(AO,{...w,className:x,children:n||(0,wt.jsxs)(hO,{..._,children:[d&&(0,wt.jsx)(mO,{children:(0,wt.jsx)(vS,{icon:d})}),(0,wt.jsx)(PO,{title:u,badge:t}),l&&(0,wt.jsx)(vS,{icon:y})]})})},zO=(0,wt.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wt.jsx)(n.Path,{d:"M13 5c-3.3 0-6 2.7-6 6 0 1.4.5 2.7 1.3 3.7l-3.8 3.8 1.1 1.1 3.8-3.8c1 .8 2.3 1.3 3.7 1.3 3.3 0 6-2.7 6-6S16.3 5 13 5zm0 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z"})}),LO=(0,l.createHigherOrderComponent)((e=>t=>(0,wt.jsx)(e,{...t,speak:My.speak,debouncedSpeak:(0,l.useDebounce)(My.speak,500)})),"withSpokenMessages"),FO=({size:e})=>wl("compact"===e?1:2),BO=cl("div",{target:"effl84m1"})("display:flex;padding-inline-end:",FO,";svg{fill:currentColor;}"),VO=cl(ty,{target:"effl84m0"})("input[type='search']{&::-webkit-search-decoration,&::-webkit-search-cancel-button,&::-webkit-search-results-button,&::-webkit-search-results-decoration{-webkit-appearance:none;}}&:not( :focus-within ){--wp-components-color-background:",jl.theme.gray[100],";}");function $O({searchRef:e,value:t,onChange:n,onClose:r}){if(!r&&!t)return(0,wt.jsx)(vS,{icon:zO});return(0,wt.jsx)(sy,{size:"small",icon:e_,label:r?(0,a.__)("Close search"):(0,a.__)("Reset search"),onClick:null!=r?r:()=>{n(""),e.current?.focus()}})}const HO=(0,c.forwardRef)((function({__nextHasNoMarginBottom:e=!1,className:t,onChange:n,value:r,label:o=(0,a.__)("Search"),placeholder:i=(0,a.__)("Search"),hideLabelFromVision:u=!0,onClose:d,size:p="default",...f},h){delete f.disabled;const m=(0,c.useRef)(null),g=(0,l.useInstanceId)(HO,"components-search-control"),v=(0,c.useMemo)((()=>({BaseControl:{_overrides:{__nextHasNoMarginBottom:e},__associatedWPComponentName:"SearchControl"},InputBase:{isBorderless:!0}})),[e]);return(0,wt.jsx)(is,{value:v,children:(0,wt.jsx)(VO,{__next40pxDefaultSize:!0,id:g,hideLabelFromVision:u,label:o,ref:(0,l.useMergeRefs)([m,h]),type:"search",size:p,className:s("components-search-control",t),onChange:e=>n(null!=e?e:""),autoComplete:"off",placeholder:i,value:null!=r?r:"",suffix:(0,wt.jsx)(BO,{size:p,children:(0,wt.jsx)($O,{searchRef:m,value:r,onChange:n,onClose:d})}),...f})})})),WO=HO;const UO=LO((function({debouncedSpeak:e,onCloseSearch:t,onSearch:n,search:r,title:o}){const{navigationTree:{items:i}}=iO(),{menu:s}=RO(),l=(0,c.useRef)(null);(0,c.useEffect)((()=>{const e=setTimeout((()=>{l.current?.focus()}),tO);return()=>{clearTimeout(e)}}),[]),(0,c.useEffect)((()=>{if(!r)return;const t=Object.values(i).filter((e=>e._isVisible)).length,n=(0,a.sprintf)((0,a._n)("%d result found.","%d results found.",t),t);e(n)}),[i,r]);const u=()=>{n?.(""),t()},d=`components-navigation__menu-title-search-${s}`,p=(0,a.sprintf)((0,a.__)("Search %s"),o?.toLowerCase()).trim();return(0,wt.jsx)(uO,{children:(0,wt.jsx)(WO,{__nextHasNoMarginBottom:!0,className:"components-navigation__menu-search-input",id:d,onChange:e=>n?.(e),onKeyDown:e=>{"Escape"!==e.code||e.defaultPrevented||(e.preventDefault(),u())},placeholder:p,onClose:u,ref:l,value:r})})}));function GO({hasSearch:e,onSearch:t,search:n,title:r,titleAction:o}){const[i,s]=(0,c.useState)(!1),{menu:l}=RO(),u=(0,c.useRef)(null);if(!r)return null;const d=`components-navigation__menu-title-${l}`,p=(0,a.sprintf)((0,a.__)("Search in %s"),r);return(0,wt.jsxs)(cO,{className:"components-navigation__menu-title",children:[!i&&(0,wt.jsxs)(pO,{as:"h2",className:"components-navigation__menu-title-heading",level:3,children:[(0,wt.jsx)("span",{id:d,children:r}),(e||o)&&(0,wt.jsxs)(dO,{children:[o,e&&(0,wt.jsx)(sy,{size:"small",variant:"tertiary",label:p,onClick:()=>s(!0),ref:u,children:(0,wt.jsx)(vS,{icon:zO})})]})]}),i&&(0,wt.jsx)("div",{className:Vl({type:"slide-in",origin:"left"}),children:(0,wt.jsx)(UO,{onCloseSearch:()=>{s(!1),setTimeout((()=>{u.current?.focus()}),tO)},onSearch:t,search:n,title:r})})]})}function KO({search:e}){const{navigationTree:{items:t}}=iO(),n=Object.values(t).filter((e=>e._isVisible)).length;return!e||n?null:(0,wt.jsx)(fO,{children:(0,wt.jsxs)(hO,{children:[(0,a.__)("No results found.")," "]})})}const qO=function(e){const{backButtonLabel:t,children:n,className:r,hasSearch:o,menu:i=eO,onBackButtonClick:a,onSearch:l,parentMenu:u,search:d,isSearchDebouncing:p,title:f,titleAction:h}=e,[m,g]=(0,c.useState)("");(e=>{const{navigationTree:{addMenu:t,removeMenu:n}}=iO(),r=e.menu||eO;(0,c.useEffect)((()=>(t(r,{...e,menu:r}),()=>{n(r)})),[])})(e);const{activeMenu:v}=iO(),b={menu:i,search:m};if(v!==i)return(0,wt.jsx)(TO.Provider,{value:b,children:n});const x=!!l,y=x?d:m,w=x?l:g,_=`components-navigation__menu-title-${i}`,S=s("components-navigation__menu",r);return(0,wt.jsx)(TO.Provider,{value:b,children:(0,wt.jsxs)(aO,{className:S,children:[(u||a)&&(0,wt.jsx)(CO,{backButtonLabel:t,parentMenu:u,onClick:a}),f&&(0,wt.jsx)(GO,{hasSearch:o,onSearch:w,search:y,title:f,titleAction:h}),(0,wt.jsx)($T,{children:(0,wt.jsxs)("ul",{"aria-labelledby":_,children:[n,y&&!p&&(0,wt.jsx)(KO,{search:y})]})})]})})};function YO(e,t){void 0===t&&(t={});for(var n=function(e){for(var t=[],n=0;n<e.length;){var r=e[n];if("*"!==r&&"+"!==r&&"?"!==r)if("\\"!==r)if("{"!==r)if("}"!==r)if(":"!==r)if("("!==r)t.push({type:"CHAR",index:n,value:e[n++]});else{var o=1,i="";if("?"===e[a=n+1])throw new TypeError('Pattern cannot start with "?" at '.concat(a));for(;a<e.length;)if("\\"!==e[a]){if(")"===e[a]){if(0==--o){a++;break}}else if("("===e[a]&&(o++,"?"!==e[a+1]))throw new TypeError("Capturing groups are not allowed at ".concat(a));i+=e[a++]}else i+=e[a++]+e[a++];if(o)throw new TypeError("Unbalanced pattern at ".concat(n));if(!i)throw new TypeError("Missing pattern at ".concat(n));t.push({type:"PATTERN",index:n,value:i}),n=a}else{for(var s="",a=n+1;a<e.length;){var l=e.charCodeAt(a);if(!(l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||95===l))break;s+=e[a++]}if(!s)throw new TypeError("Missing parameter name at ".concat(n));t.push({type:"NAME",index:n,value:s}),n=a}else t.push({type:"CLOSE",index:n,value:e[n++]});else t.push({type:"OPEN",index:n,value:e[n++]});else t.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});else t.push({type:"MODIFIER",index:n,value:e[n++]})}return t.push({type:"END",index:n,value:""}),t}(e),r=t.prefixes,o=void 0===r?"./":r,i=t.delimiter,s=void 0===i?"/#?":i,a=[],l=0,c=0,u="",d=function(e){if(c<n.length&&n[c].type===e)return n[c++].value},p=function(e){var t=d(e);if(void 0!==t)return t;var r=n[c],o=r.type,i=r.index;throw new TypeError("Unexpected ".concat(o," at ").concat(i,", expected ").concat(e))},f=function(){for(var e,t="";e=d("CHAR")||d("ESCAPED_CHAR");)t+=e;return t},h=function(e){var t=a[a.length-1],n=e||(t&&"string"==typeof t?t:"");if(t&&!n)throw new TypeError('Must have text between two parameters, missing text after "'.concat(t.name,'"'));return!n||function(e){for(var t=0,n=s;t<n.length;t++){var r=n[t];if(e.indexOf(r)>-1)return!0}return!1}(n)?"[^".concat(ZO(s),"]+?"):"(?:(?!".concat(ZO(n),")[^").concat(ZO(s),"])+?")};c<n.length;){var m=d("CHAR"),g=d("NAME"),v=d("PATTERN");if(g||v){var b=m||"";-1===o.indexOf(b)&&(u+=b,b=""),u&&(a.push(u),u=""),a.push({name:g||l++,prefix:b,suffix:"",pattern:v||h(b),modifier:d("MODIFIER")||""})}else{var x=m||d("ESCAPED_CHAR");if(x)u+=x;else if(u&&(a.push(u),u=""),d("OPEN")){b=f();var y=d("NAME")||"",w=d("PATTERN")||"",_=f();p("CLOSE"),a.push({name:y||(w?l++:""),pattern:y&&!w?h(b):w,prefix:b,suffix:_,modifier:d("MODIFIER")||""})}else p("END")}}return a}function XO(e,t){var n=[];return function(e,t,n){void 0===n&&(n={});var r=n.decode,o=void 0===r?function(e){return e}:r;return function(n){var r=e.exec(n);if(!r)return!1;for(var i=r[0],s=r.index,a=Object.create(null),l=function(e){if(void 0===r[e])return"continue";var n=t[e-1];"*"===n.modifier||"+"===n.modifier?a[n.name]=r[e].split(n.prefix+n.suffix).map((function(e){return o(e,n)})):a[n.name]=o(r[e],n)},c=1;c<r.length;c++)l(c);return{path:i,index:s,params:a}}}(ez(e,n,t),n,t)}function ZO(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function QO(e){return e&&e.sensitive?"":"i"}function JO(e,t,n){return function(e,t,n){void 0===n&&(n={});for(var r=n.strict,o=void 0!==r&&r,i=n.start,s=void 0===i||i,a=n.end,l=void 0===a||a,c=n.encode,u=void 0===c?function(e){return e}:c,d=n.delimiter,p=void 0===d?"/#?":d,f=n.endsWith,h="[".concat(ZO(void 0===f?"":f),"]|$"),m="[".concat(ZO(p),"]"),g=s?"^":"",v=0,b=e;v<b.length;v++){var x=b[v];if("string"==typeof x)g+=ZO(u(x));else{var y=ZO(u(x.prefix)),w=ZO(u(x.suffix));if(x.pattern)if(t&&t.push(x),y||w)if("+"===x.modifier||"*"===x.modifier){var _="*"===x.modifier?"?":"";g+="(?:".concat(y,"((?:").concat(x.pattern,")(?:").concat(w).concat(y,"(?:").concat(x.pattern,"))*)").concat(w,")").concat(_)}else g+="(?:".concat(y,"(").concat(x.pattern,")").concat(w,")").concat(x.modifier);else{if("+"===x.modifier||"*"===x.modifier)throw new TypeError('Can not repeat "'.concat(x.name,'" without a prefix and suffix'));g+="(".concat(x.pattern,")").concat(x.modifier)}else g+="(?:".concat(y).concat(w,")").concat(x.modifier)}}if(l)o||(g+="".concat(m,"?")),g+=n.endsWith?"(?=".concat(h,")"):"$";else{var S=e[e.length-1],C="string"==typeof S?m.indexOf(S[S.length-1])>-1:void 0===S;o||(g+="(?:".concat(m,"(?=").concat(h,"))?")),C||(g+="(?=".concat(m,"|").concat(h,")"))}return new RegExp(g,QO(n))}(YO(e,n),t,n)}function ez(e,t,n){return e instanceof RegExp?function(e,t){if(!t)return e;for(var n=/\((?:\?<(.*?)>)?(?!\?)/g,r=0,o=n.exec(e.source);o;)t.push({name:o[1]||r++,prefix:"",suffix:"",modifier:"",pattern:""}),o=n.exec(e.source);return e}(e,t):Array.isArray(e)?function(e,t,n){var r=e.map((function(e){return ez(e,t,n).source}));return new RegExp("(?:".concat(r.join("|"),")"),QO(n))}(e,t,n):JO(e,t,n)}function tz(e,t){return XO(t,{decode:decodeURIComponent})(e)}const nz=(0,c.createContext)({location:{},goTo:()=>{},goBack:()=>{},goToParent:()=>{},addScreen:()=>{},removeScreen:()=>{},params:{}});const rz={name:"xpkswc",styles:"overflow-x:hidden;contain:content"},oz=xl({"0%":{opacity:0,transform:"translateX( 50px )"},"100%":{opacity:1,transform:"none"}}),iz=xl({"0%":{opacity:0,transform:"translateX( -50px )"},"100%":{opacity:1,transform:"none"}}),sz=e=>bl("overflow-x:auto;max-height:100%;",(({isInitial:e,isBack:t,isRTL:n})=>{if(e&&!t)return;return bl("animation-duration:0.14s;animation-timing-function:ease-in-out;will-change:transform,opacity;animation-name:",n&&t||!n&&!t?oz:iz,";@media ( prefers-reduced-motion ){animation-duration:0s;}","")})(e),";","");function az(e,t,n={}){var r;const{focusSelectors:o}=e,i={...e.currentLocation},{isBack:s=!1,skipFocus:a=!1,replace:l,focusTargetSelector:c,...u}=n;if(i.path===t)return{currentLocation:i,focusSelectors:o};let d,p;function f(){var t;return d=null!==(t=d)&&void 0!==t?t:new Map(e.focusSelectors),d}return c&&i.path&&f().set(i.path,c),o.get(t)&&(s&&(p=o.get(t)),f().delete(t)),{currentLocation:{...u,isInitial:!1,path:t,isBack:s,hasRestoredFocus:!1,focusTargetSelector:p,skipFocus:a},focusSelectors:null!==(r=d)&&void 0!==r?r:o}}function lz(e,t={}){const{screens:n,focusSelectors:r}=e,o={...e.currentLocation},i=o.path;if(void 0===i)return{currentLocation:o,focusSelectors:r};const s=function(e,t){if(!e.startsWith("/"))return;const n=e.split("/");let r;for(;n.length>1&&void 0===r;){n.pop();const e=""===n.join("/")?"/":n.join("/");t.find((t=>!1!==tz(e,t.path)))&&(r=e)}return r}(i,n);return void 0===s?{currentLocation:o,focusSelectors:r}:az(e,s,{...t,isBack:!0})}function cz(e,t){let{screens:n,currentLocation:r,matchedPath:o,focusSelectors:i,...s}=e;switch(t.type){case"add":n=function({screens:e},t){return e.some((e=>e.path===t.path))?e:[...e,t]}(e,t.screen);break;case"remove":n=function({screens:e},t){return e.filter((e=>e.id!==t.id))}(e,t.screen);break;case"goto":({currentLocation:r,focusSelectors:i}=az(e,t.path,t.options));break;case"gotoparent":({currentLocation:r,focusSelectors:i}=lz(e,t.options))}if(n===e.screens&&r===e.currentLocation)return e;const a=r.path;return o=void 0!==a?function(e,t){for(const n of t){const t=tz(e,n.path);if(t)return{params:t.params,id:n.id}}}(a,n):void 0,o&&e.matchedPath&&o.id===e.matchedPath.id&&ww()(o.params,e.matchedPath.params)&&(o=e.matchedPath),{...s,screens:n,currentLocation:r,matchedPath:o,focusSelectors:i}}const uz=Xa((function(e,t){const{initialPath:n,children:r,className:o,...i}=Ya(e,"NavigatorProvider"),[s,a]=(0,c.useReducer)(cz,n,(e=>({screens:[],currentLocation:{path:e,isInitial:!0},matchedPath:void 0,focusSelectors:new Map,initialPath:n}))),l=(0,c.useMemo)((()=>({goBack:e=>a({type:"gotoparent",options:e}),goTo:(e,t)=>a({type:"goto",path:e,options:t}),goToParent:e=>{Fi()("wp.components.useNavigator().goToParent",{since:"6.7",alternative:"wp.components.useNavigator().goBack"}),a({type:"gotoparent",options:e})},addScreen:e=>a({type:"add",screen:e}),removeScreen:e=>a({type:"remove",screen:e})})),[]),{currentLocation:u,matchedPath:d}=s,p=(0,c.useMemo)((()=>{var e;return{location:u,params:null!==(e=d?.params)&&void 0!==e?e:{},match:d?.id,...l}}),[u,d,l]),f=qa(),h=(0,c.useMemo)((()=>f(rz,o)),[o,f]);return(0,wt.jsx)(dl,{ref:t,className:h,...i,children:(0,wt.jsx)(nz.Provider,{value:p,children:r})})}),"NavigatorProvider"),dz=window.wp.escapeHtml;const pz=Xa((function(e,t){/^\//.test(e.path);const n=(0,c.useId)(),{children:r,className:o,path:i,...s}=Ya(e,"NavigatorScreen"),{location:u,match:d,addScreen:p,removeScreen:f}=(0,c.useContext)(nz),h=d===n,m=(0,c.useRef)(null);(0,c.useEffect)((()=>{const e={id:n,path:(0,dz.escapeAttribute)(i)};return p(e),()=>f(e)}),[n,i,p,f]);const g=(0,a.isRTL)(),{isInitial:v,isBack:b}=u,x=qa(),y=(0,c.useMemo)((()=>x(sz({isInitial:v,isBack:b,isRTL:g}),o)),[o,x,v,b,g]),w=(0,c.useRef)(u);(0,c.useEffect)((()=>{w.current=u}),[u]);const _=u.isInitial&&!u.isBack;(0,c.useEffect)((()=>{if(_||!h||!m.current||w.current.hasRestoredFocus||u.skipFocus)return;const e=m.current.ownerDocument.activeElement;if(m.current.contains(e))return;let t=null;if(u.isBack&&u.focusTargetSelector&&(t=m.current.querySelector(u.focusTargetSelector)),!t){const[e]=DT.focus.tabbable.find(m.current);t=null!=e?e:m.current}w.current.hasRestoredFocus=!0,t.focus()}),[_,h,u.isBack,u.focusTargetSelector,u.skipFocus]);const S=(0,l.useMergeRefs)([t,m]);return h?(0,wt.jsx)(dl,{ref:S,className:y,...s,children:r}):null}),"NavigatorScreen");function fz(){const{location:e,params:t,goTo:n,goBack:r,goToParent:o}=(0,c.useContext)(nz);return{location:e,goTo:n,goBack:r,goToParent:o,params:t}}const hz=(e,t)=>`[${e}="${t}"]`;const mz=Xa((function(e,t){const n=function(e){const{path:t,onClick:n,as:r=sy,attributeName:o="id",...i}=Ya(e,"NavigatorButton"),s=(0,dz.escapeAttribute)(t),{goTo:a}=fz();return{as:r,onClick:(0,c.useCallback)((e=>{e.preventDefault(),a(s,{focusTargetSelector:hz(o,s)}),n?.(e)}),[a,n,o,s]),...i,[o]:s}}(e);return(0,wt.jsx)(dl,{ref:t,...n})}),"NavigatorButton");const gz=Xa((function(e,t){const n=function(e){const{onClick:t,as:n=sy,...r}=Ya(e,"NavigatorBackButton"),{goBack:o}=fz();return{as:n,onClick:(0,c.useCallback)((e=>{e.preventDefault(),o(),t?.(e)}),[o,t]),...r}}(e);return(0,wt.jsx)(dl,{ref:t,...n})}),"NavigatorBackButton");const vz=Xa((function(e,t){return Fi()("wp.components.NavigatorToParentButton",{since:"6.7",alternative:"wp.components.NavigatorBackButton"}),(0,wt.jsx)(gz,{ref:t,...e})}),"NavigatorToParentButton"),bz=()=>{};function xz(e){switch(e){case"success":case"warning":case"info":return"polite";default:return"assertive"}}function yz(e){switch(e){case"warning":return(0,a.__)("Warning notice");case"info":return(0,a.__)("Information notice");case"error":return(0,a.__)("Error notice");default:return(0,a.__)("Notice")}}const wz=function({className:e,status:t="info",children:n,spokenMessage:r=n,onRemove:o=bz,isDismissible:i=!0,actions:l=[],politeness:u=xz(t),__unstableHTML:d,onDismiss:p=bz}){!function(e,t){const n="string"==typeof e?e:(0,c.renderToString)(e);(0,c.useEffect)((()=>{n&&(0,My.speak)(n,t)}),[n,t])}(r,u);const f=s(e,"components-notice","is-"+t,{"is-dismissible":i});return d&&"string"==typeof n&&(n=(0,wt.jsx)(c.RawHTML,{children:n})),(0,wt.jsxs)("div",{className:f,children:[(0,wt.jsx)(pl,{children:yz(t)}),(0,wt.jsxs)("div",{className:"components-notice__content",children:[n,(0,wt.jsx)("div",{className:"components-notice__actions",children:l.map((({className:e,label:t,isPrimary:n,variant:r,noDefaultClasses:o=!1,onClick:i,url:a},l)=>{let c=r;return"primary"===r||o||(c=a?"link":"secondary"),void 0===c&&n&&(c="primary"),(0,wt.jsx)(sy,{href:a,variant:c,onClick:a?void 0:i,className:s("components-notice__action",e),children:t},l)}))})]}),i&&(0,wt.jsx)(sy,{className:"components-notice__dismiss",icon:Gy,label:(0,a.__)("Close"),onClick:()=>{p(),o()}})]})},_z=()=>{};const Sz=function({notices:e,onRemove:t=_z,className:n,children:r}){const o=e=>()=>t(e);return n=s("components-notice-list",n),(0,wt.jsxs)("div",{className:n,children:[r,[...e].reverse().map((e=>{const{content:t,...n}=e;return(0,B.createElement)(wz,{...n,key:e.id,onRemove:o(e.id)},e.content)}))]})};const Cz=function({label:e,children:t}){return(0,wt.jsxs)("div",{className:"components-panel__header",children:[e&&(0,wt.jsx)("h2",{children:e}),t]})};const kz=(0,c.forwardRef)((function({header:e,className:t,children:n},r){const o=s(t,"components-panel");return(0,wt.jsxs)("div",{className:o,ref:r,children:[e&&(0,wt.jsx)(Cz,{label:e}),n]})})),jz=(0,wt.jsx)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,wt.jsx)(n.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})}),Ez=()=>{};const Pz=(0,c.forwardRef)((({isOpened:e,icon:t,title:n,...r},o)=>n?(0,wt.jsx)("h2",{className:"components-panel__body-title",children:(0,wt.jsxs)(sy,{className:"components-panel__body-toggle","aria-expanded":e,ref:o,...r,children:[(0,wt.jsx)("span",{"aria-hidden":"true",children:(0,wt.jsx)(ry,{className:"components-panel__arrow",icon:e?jz:bS})}),n,t&&(0,wt.jsx)(ry,{icon:t,className:"components-panel__icon",size:20})]})}):null)),Tz=(0,c.forwardRef)((function(e,t){const{buttonProps:n={},children:r,className:o,icon:i,initialOpen:a,onToggle:u=Ez,opened:d,title:p,scrollAfterOpen:f=!0}=e,[h,m]=CS(d,{initial:void 0===a||a,fallback:!1}),g=(0,c.useRef)(null),v=(0,l.useReducedMotion)()?"auto":"smooth",b=(0,c.useRef)();b.current=f,ns((()=>{h&&b.current&&g.current?.scrollIntoView&&g.current.scrollIntoView({inline:"nearest",block:"nearest",behavior:v})}),[h,v]);const x=s("components-panel__body",o,{"is-opened":h});return(0,wt.jsxs)("div",{className:x,ref:(0,l.useMergeRefs)([g,t]),children:[(0,wt.jsx)(Pz,{icon:i,isOpened:Boolean(h),onClick:e=>{e.preventDefault();const t=!h;m(t),u(t)},title:p,...n}),"function"==typeof r?r({opened:Boolean(h)}):h&&r]})})),Rz=Tz;const Iz=(0,c.forwardRef)((function({className:e,children:t},n){return(0,wt.jsx)("div",{className:s("components-panel__row",e),ref:n,children:t})})),Nz=(0,wt.jsx)(n.SVG,{className:"components-placeholder__illustration",fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 60 60",preserveAspectRatio:"none",children:(0,wt.jsx)(n.Path,{vectorEffect:"non-scaling-stroke",d:"M60 60 0 0"})});const Mz=function(e){const{icon:t,children:n,label:r,instructions:o,className:i,notices:a,preview:u,isColumnLayout:d,withIllustration:p,...f}=e,[h,{width:m}]=(0,l.useResizeObserver)();let g;"number"==typeof m&&(g={"is-large":m>=480,"is-medium":m>=160&&m<480,"is-small":m<160});const v=s("components-placeholder",i,g,p?"has-illustration":null),b=s("components-placeholder__fieldset",{"is-column-layout":d});return(0,c.useEffect)((()=>{o&&(0,My.speak)(o)}),[o]),(0,wt.jsxs)("div",{...f,className:v,children:[p?Nz:null,h,a,u&&(0,wt.jsx)("div",{className:"components-placeholder__preview",children:u}),(0,wt.jsxs)("div",{className:"components-placeholder__label",children:[(0,wt.jsx)(ry,{icon:t}),r]}),!!o&&(0,wt.jsx)("div",{className:"components-placeholder__instructions",children:o}),(0,wt.jsx)("div",{className:b,children:n})]})};function Az(e=!1){const t=e?"right":"left";return xl({"0%":{[t]:"-50%"},"100%":{[t]:"100%"}})}const Dz=cl("div",{target:"e15u147w2"})("position:relative;overflow:hidden;height:",Tl.borderWidthFocus,";background-color:color-mix(\n\t\tin srgb,\n\t\t",jl.theme.foreground,",\n\t\ttransparent 90%\n\t);border-radius:",Tl.radiusFull,";outline:2px solid transparent;outline-offset:2px;:where( & ){width:160px;}");var Oz={name:"152sa26",styles:"width:var(--indicator-width);transition:width 0.4s ease-in-out"};const zz=cl("div",{target:"e15u147w1"})("display:inline-block;position:absolute;top:0;height:100%;border-radius:",Tl.radiusFull,";background-color:color-mix(\n\t\tin srgb,\n\t\t",jl.theme.foreground,",\n\t\ttransparent 10%\n\t);outline:2px solid transparent;outline-offset:-2px;",(({isIndeterminate:e})=>e?bl({animationDuration:"1.5s",animationTimingFunction:"ease-in-out",animationIterationCount:"infinite",animationName:Az((0,a.isRTL)()),width:"50%"},"",""):Oz),";"),Lz=cl("progress",{target:"e15u147w0"})({name:"11fb690",styles:"position:absolute;top:0;left:0;opacity:0;width:100%;height:100%"});const Fz=(0,c.forwardRef)((function(e,t){const{className:n,value:r,...o}=e,i=!Number.isFinite(r);return(0,wt.jsxs)(Dz,{className:n,children:[(0,wt.jsx)(zz,{style:{"--indicator-width":i?void 0:`${r}%`},isIndeterminate:i}),(0,wt.jsx)(Lz,{max:100,value:r,"aria-label":(0,a.__)("Loading …"),ref:t,...o})]})})),Bz=e=>e.every((e=>null!==e.parent));function Vz(e){const t=e.map((e=>({children:[],parent:null,...e,id:String(e.id)})));if(!Bz(t))return t;const n=t.reduce(((e,t)=>{const{parent:n}=t;return e[n]||(e[n]=[]),e[n].push(t),e}),{}),r=e=>e.map((e=>{const t=n[e.id];return{...e,children:t&&t.length?r(t):[]}}));return r(n[0]||[])}const $z=window.wp.htmlEntities,Hz={BaseControl:{_overrides:{__associatedWPComponentName:"TreeSelect"}}};function Wz(e,t=0){return e.flatMap((e=>[{value:e.id,label:" ".repeat(3*t)+(0,$z.decodeEntities)(e.name)},...Wz(e.children||[],t+1)]))}const Uz=function(e){const{label:t,noOptionLabel:n,onChange:r,selectedId:o,tree:i=[],...s}=_b(e),a=(0,c.useMemo)((()=>[n&&{value:"",label:n},...Wz(i)].filter((e=>!!e))),[n,i]);return(0,wt.jsx)(is,{value:Hz,children:(0,wt.jsx)(wS,{label:t,options:a,onChange:r,value:o,...s})})};function Gz({__next40pxDefaultSize:e,label:t,noOptionLabel:n,authorList:r,selectedAuthorId:o,onChange:i}){if(!r)return null;const s=Vz(r);return(0,wt.jsx)(Uz,{label:t,noOptionLabel:n,onChange:i,tree:s,selectedId:void 0!==o?String(o):void 0,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:e})}function Kz({__next40pxDefaultSize:e,label:t,noOptionLabel:n,categoriesList:r,selectedCategoryId:o,onChange:i,...s}){const a=(0,c.useMemo)((()=>Vz(r)),[r]);return(0,wt.jsx)(Uz,{label:t,noOptionLabel:n,onChange:i,tree:a,selectedId:void 0!==o?String(o):void 0,...s,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:e})}function qz(e){return"categoriesList"in e}function Yz(e){return"categorySuggestions"in e}const Xz=function({authorList:e,selectedAuthorId:t,numberOfItems:n,order:r,orderBy:o,maxItems:i=100,minItems:s=1,onAuthorChange:l,onNumberOfItemsChange:c,onOrderChange:u,onOrderByChange:d,...p}){return(0,wt.jsx)(jk,{spacing:"4",className:"components-query-controls",children:[u&&d&&(0,wt.jsx)(_S,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,a.__)("Order by"),value:void 0===o||void 0===r?void 0:`${o}/${r}`,options:[{label:(0,a.__)("Newest to oldest"),value:"date/desc"},{label:(0,a.__)("Oldest to newest"),value:"date/asc"},{label:(0,a.__)("A → Z"),value:"title/asc"},{label:(0,a.__)("Z → A"),value:"title/desc"}],onChange:e=>{if("string"!=typeof e)return;const[t,n]=e.split("/");n!==r&&u(n),t!==o&&d(t)}},"query-controls-order-select"),qz(p)&&p.categoriesList&&p.onCategoryChange&&(0,wt.jsx)(Kz,{__next40pxDefaultSize:!0,categoriesList:p.categoriesList,label:(0,a.__)("Category"),noOptionLabel:(0,a._x)("All","categories"),selectedCategoryId:p.selectedCategoryId,onChange:p.onCategoryChange},"query-controls-category-select"),Yz(p)&&p.categorySuggestions&&p.onCategoryChange&&(0,wt.jsx)(LD,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,a.__)("Categories"),value:p.selectedCategories&&p.selectedCategories.map((e=>({id:e.id,value:e.name||e.value}))),suggestions:Object.keys(p.categorySuggestions),onChange:p.onCategoryChange,maxSuggestions:20},"query-controls-categories-select"),l&&(0,wt.jsx)(Gz,{__next40pxDefaultSize:!0,authorList:e,label:(0,a.__)("Author"),noOptionLabel:(0,a._x)("All","authors"),selectedAuthorId:t,onChange:l},"query-controls-author-select"),c&&(0,wt.jsx)(dC,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,a.__)("Number of items"),value:n,onChange:c,min:s,max:i,required:!0},"query-controls-range-control")]})},Zz=(0,c.createContext)({store:void 0,disabled:void 0});const Qz=(0,c.forwardRef)((function({value:e,children:t,...n},r){const{store:o,disabled:i}=(0,c.useContext)(Zz),s=Qe(o,"value"),a=void 0!==s&&s===e;return(0,wt.jsx)(M_,{disabled:i,store:o,ref:r,value:e,render:(0,wt.jsx)(sy,{variant:a?"primary":"secondary",...n}),children:t||e})})),Jz=Qz;const eL=(0,c.forwardRef)((function({label:e,checked:t,defaultChecked:n,disabled:r,onChange:o,children:i,...s},a){const l=g_({value:t,defaultValue:n,setValue:e=>{o?.(null!=e?e:void 0)}}),u=(0,c.useMemo)((()=>({store:l,disabled:r})),[l,r]);return(0,wt.jsx)(Zz.Provider,{value:u,children:(0,wt.jsx)(__,{store:l,render:(0,wt.jsx)(CE,{children:i}),"aria-label":e,ref:a,...s})})})),tL=eL;function nL(e,t){return`${e}-${t}-option-description`}function rL(e,t){return`${e}-${t}`}function oL(e){return`${e}__help`}const iL=function e(t){const{label:n,className:r,selected:o,help:i,onChange:a,hideLabelFromVision:c,options:u=[],id:d,...p}=t,f=(0,l.useInstanceId)(e,"inspector-radio-control",d),h=e=>a(e.target.value);return u?.length?(0,wt.jsxs)("fieldset",{id:f,className:s(r,"components-radio-control"),"aria-describedby":i?oL(f):void 0,children:[c?(0,wt.jsx)(pl,{as:"legend",children:n}):(0,wt.jsx)(Qx.VisualLabel,{as:"legend",children:n}),(0,wt.jsx)(jk,{spacing:3,className:s("components-radio-control__group-wrapper",{"has-help":!!i}),children:u.map(((e,t)=>(0,wt.jsxs)("div",{className:"components-radio-control__option",children:[(0,wt.jsx)("input",{id:rL(f,t),className:"components-radio-control__input",type:"radio",name:f,value:e.value,onChange:h,checked:e.value===o,"aria-describedby":e.description?nL(f,t):void 0,...p}),(0,wt.jsx)("label",{className:"components-radio-control__label",htmlFor:rL(f,t),children:e.label}),e.description?(0,wt.jsx)(qx,{__nextHasNoMarginBottom:!0,id:nL(f,t),className:"components-radio-control__option-description",children:e.description}):null]},rL(f,t))))}),!!i&&(0,wt.jsx)(qx,{__nextHasNoMarginBottom:!0,id:oL(f),className:"components-base-control__help",children:i})]}):null};var sL=function(){var e=function(t,n){return e=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])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),aL=function(){return aL=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},aL.apply(this,arguments)},lL={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},cL={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},uL={width:"20px",height:"20px",position:"absolute"},dL={top:aL(aL({},lL),{top:"-5px"}),right:aL(aL({},cL),{left:void 0,right:"-5px"}),bottom:aL(aL({},lL),{top:void 0,bottom:"-5px"}),left:aL(aL({},cL),{left:"-5px"}),topRight:aL(aL({},uL),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:aL(aL({},uL),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:aL(aL({},uL),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:aL(aL({},uL),{left:"-10px",top:"-10px",cursor:"nw-resize"})},pL=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onMouseDown=function(e){t.props.onResizeStart(e,t.props.direction)},t.onTouchStart=function(e){t.props.onResizeStart(e,t.props.direction)},t}return sL(t,e),t.prototype.render=function(){return B.createElement("div",{className:this.props.className||"",style:aL(aL({position:"absolute",userSelect:"none"},dL[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},t}(B.PureComponent),fL=function(){var e=function(t,n){return e=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])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),hL=function(){return hL=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},hL.apply(this,arguments)},mL={width:"auto",height:"auto"},gL=function(e,t,n){return Math.max(Math.min(e,n),t)},vL=function(e,t){return Math.round(e/t)*t},bL=function(e,t){return new RegExp(e,"i").test(t)},xL=function(e){return Boolean(e.touches&&e.touches.length)},yL=function(e,t,n){void 0===n&&(n=0);var r=t.reduce((function(n,r,o){return Math.abs(r-e)<Math.abs(t[n]-e)?o:n}),0),o=Math.abs(t[r]-e);return 0===n||o<n?t[r]:e},wL=function(e){return"auto"===(e=e.toString())||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:e+"px"},_L=function(e,t,n,r){if(e&&"string"==typeof e){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%"))return t*(Number(e.replace("%",""))/100);if(e.endsWith("vw"))return n*(Number(e.replace("vw",""))/100);if(e.endsWith("vh"))return r*(Number(e.replace("vh",""))/100)}return e},SL=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],CL="__resizable_base__",kL=function(e){function t(t){var n=e.call(this,t)||this;return n.ratio=1,n.resizable=null,n.parentLeft=0,n.parentTop=0,n.resizableLeft=0,n.resizableRight=0,n.resizableTop=0,n.resizableBottom=0,n.targetLeft=0,n.targetTop=0,n.appendBase=function(){if(!n.resizable||!n.window)return null;var e=n.parentNode;if(!e)return null;var t=n.window.document.createElement("div");return t.style.width="100%",t.style.height="100%",t.style.position="absolute",t.style.transform="scale(0, 0)",t.style.left="0",t.style.flex="0 0 100%",t.classList?t.classList.add(CL):t.className+=CL,e.appendChild(t),t},n.removeBase=function(e){var t=n.parentNode;t&&t.removeChild(e)},n.ref=function(e){e&&(n.resizable=e)},n.state={isResizing:!1,width:void 0===(n.propsSize&&n.propsSize.width)?"auto":n.propsSize&&n.propsSize.width,height:void 0===(n.propsSize&&n.propsSize.height)?"auto":n.propsSize&&n.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},n.onResizeStart=n.onResizeStart.bind(n),n.onMouseMove=n.onMouseMove.bind(n),n.onMouseUp=n.onMouseUp.bind(n),n}return fL(t,e),Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||mL},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var e=0,t=0;if(this.resizable&&this.window){var n=this.resizable.offsetWidth,r=this.resizable.offsetHeight,o=this.resizable.style.position;"relative"!==o&&(this.resizable.style.position="relative"),e="auto"!==this.resizable.style.width?this.resizable.offsetWidth:n,t="auto"!==this.resizable.style.height?this.resizable.offsetHeight:r,this.resizable.style.position=o}return{width:e,height:t}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var e=this,t=this.props.size,n=function(t){if(void 0===e.state[t]||"auto"===e.state[t])return"auto";if(e.propsSize&&e.propsSize[t]&&e.propsSize[t].toString().endsWith("%")){if(e.state[t].toString().endsWith("%"))return e.state[t].toString();var n=e.getParentSize();return Number(e.state[t].toString().replace("px",""))/n[t]*100+"%"}return wL(e.state[t])};return{width:t&&void 0!==t.width&&!this.state.isResizing?wL(t.width):n("width"),height:t&&void 0!==t.height&&!this.state.isResizing?wL(t.height):n("height")}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var e=this.appendBase();if(!e)return{width:0,height:0};var t=!1,n=this.parentNode.style.flexWrap;"wrap"!==n&&(t=!0,this.parentNode.style.flexWrap="wrap"),e.style.position="relative",e.style.minWidth="100%",e.style.minHeight="100%";var r={width:e.offsetWidth,height:e.offsetHeight};return t&&(this.parentNode.style.flexWrap=n),this.removeBase(e),r},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(this.resizable&&this.window){var e=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==e.flexBasis?e.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(e,t){var n=this.propsSize&&this.propsSize[t];return"auto"!==this.state[t]||this.state.original[t]!==e||void 0!==n&&"auto"!==n?e:"auto"},t.prototype.calculateNewMaxFromBoundary=function(e,t){var n,r,o=this.props.boundsByDirection,i=this.state.direction,s=o&&bL("left",i),a=o&&bL("top",i);if("parent"===this.props.bounds){var l=this.parentNode;l&&(n=s?this.resizableRight-this.parentLeft:l.offsetWidth+(this.parentLeft-this.resizableLeft),r=a?this.resizableBottom-this.parentTop:l.offsetHeight+(this.parentTop-this.resizableTop))}else"window"===this.props.bounds?this.window&&(n=s?this.resizableRight:this.window.innerWidth-this.resizableLeft,r=a?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(n=s?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),r=a?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return n&&Number.isFinite(n)&&(e=e&&e<n?e:n),r&&Number.isFinite(r)&&(t=t&&t<r?t:r),{maxWidth:e,maxHeight:t}},t.prototype.calculateNewSizeFromDirection=function(e,t){var n=this.props.scale||1,r=this.props.resizeRatio||1,o=this.state,i=o.direction,s=o.original,a=this.props,l=a.lockAspectRatio,c=a.lockAspectRatioExtraHeight,u=a.lockAspectRatioExtraWidth,d=s.width,p=s.height,f=c||0,h=u||0;return bL("right",i)&&(d=s.width+(e-s.x)*r/n,l&&(p=(d-h)/this.ratio+f)),bL("left",i)&&(d=s.width-(e-s.x)*r/n,l&&(p=(d-h)/this.ratio+f)),bL("bottom",i)&&(p=s.height+(t-s.y)*r/n,l&&(d=(p-f)*this.ratio+h)),bL("top",i)&&(p=s.height-(t-s.y)*r/n,l&&(d=(p-f)*this.ratio+h)),{newWidth:d,newHeight:p}},t.prototype.calculateNewSizeFromAspectRatio=function(e,t,n,r){var o=this.props,i=o.lockAspectRatio,s=o.lockAspectRatioExtraHeight,a=o.lockAspectRatioExtraWidth,l=void 0===r.width?10:r.width,c=void 0===n.width||n.width<0?e:n.width,u=void 0===r.height?10:r.height,d=void 0===n.height||n.height<0?t:n.height,p=s||0,f=a||0;if(i){var h=(u-p)*this.ratio+f,m=(d-p)*this.ratio+f,g=(l-f)/this.ratio+p,v=(c-f)/this.ratio+p,b=Math.max(l,h),x=Math.min(c,m),y=Math.max(u,g),w=Math.min(d,v);e=gL(e,b,x),t=gL(t,y,w)}else e=gL(e,l,c),t=gL(t,u,d);return{newWidth:e,newHeight:t}},t.prototype.setBoundingClientRect=function(){if("parent"===this.props.bounds){var e=this.parentNode;if(e){var t=e.getBoundingClientRect();this.parentLeft=t.left,this.parentTop=t.top}}if(this.props.bounds&&"string"!=typeof this.props.bounds){var n=this.props.bounds.getBoundingClientRect();this.targetLeft=n.left,this.targetTop=n.top}if(this.resizable){var r=this.resizable.getBoundingClientRect(),o=r.left,i=r.top,s=r.right,a=r.bottom;this.resizableLeft=o,this.resizableRight=s,this.resizableTop=i,this.resizableBottom=a}},t.prototype.onResizeStart=function(e,t){if(this.resizable&&this.window){var n,r=0,o=0;if(e.nativeEvent&&function(e){return Boolean((e.clientX||0===e.clientX)&&(e.clientY||0===e.clientY))}(e.nativeEvent)?(r=e.nativeEvent.clientX,o=e.nativeEvent.clientY):e.nativeEvent&&xL(e.nativeEvent)&&(r=e.nativeEvent.touches[0].clientX,o=e.nativeEvent.touches[0].clientY),this.props.onResizeStart)if(this.resizable)if(!1===this.props.onResizeStart(e,t,this.resizable))return;this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio="number"==typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height;var i=this.window.getComputedStyle(this.resizable);if("auto"!==i.flexBasis){var s=this.parentNode;if(s){var a=this.window.getComputedStyle(s).flexDirection;this.flexDir=a.startsWith("row")?"row":"column",n=i.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var l={original:{x:r,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:hL(hL({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(e.target).cursor||"auto"}),direction:t,flexBasis:n};this.setState(l)}},t.prototype.onMouseMove=function(e){var t=this;if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&xL(e))try{e.preventDefault(),e.stopPropagation()}catch(e){}var n=this.props,r=n.maxWidth,o=n.maxHeight,i=n.minWidth,s=n.minHeight,a=xL(e)?e.touches[0].clientX:e.clientX,l=xL(e)?e.touches[0].clientY:e.clientY,c=this.state,u=c.direction,d=c.original,p=c.width,f=c.height,h=this.getParentSize(),m=function(e,t,n,r,o,i,s){return r=_L(r,e.width,t,n),o=_L(o,e.height,t,n),i=_L(i,e.width,t,n),s=_L(s,e.height,t,n),{maxWidth:void 0===r?void 0:Number(r),maxHeight:void 0===o?void 0:Number(o),minWidth:void 0===i?void 0:Number(i),minHeight:void 0===s?void 0:Number(s)}}(h,this.window.innerWidth,this.window.innerHeight,r,o,i,s);r=m.maxWidth,o=m.maxHeight,i=m.minWidth,s=m.minHeight;var g=this.calculateNewSizeFromDirection(a,l),v=g.newHeight,b=g.newWidth,x=this.calculateNewMaxFromBoundary(r,o);this.props.snap&&this.props.snap.x&&(b=yL(b,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(v=yL(v,this.props.snap.y,this.props.snapGap));var y=this.calculateNewSizeFromAspectRatio(b,v,{width:x.maxWidth,height:x.maxHeight},{width:i,height:s});if(b=y.newWidth,v=y.newHeight,this.props.grid){var w=vL(b,this.props.grid[0]),_=vL(v,this.props.grid[1]),S=this.props.snapGap||0;b=0===S||Math.abs(w-b)<=S?w:b,v=0===S||Math.abs(_-v)<=S?_:v}var C={width:b-d.width,height:v-d.height};if(p&&"string"==typeof p)if(p.endsWith("%"))b=b/h.width*100+"%";else if(p.endsWith("vw")){b=b/this.window.innerWidth*100+"vw"}else if(p.endsWith("vh")){b=b/this.window.innerHeight*100+"vh"}if(f&&"string"==typeof f)if(f.endsWith("%"))v=v/h.height*100+"%";else if(f.endsWith("vw")){v=v/this.window.innerWidth*100+"vw"}else if(f.endsWith("vh")){v=v/this.window.innerHeight*100+"vh"}var k={width:this.createSizeForCssProperty(b,"width"),height:this.createSizeForCssProperty(v,"height")};"row"===this.flexDir?k.flexBasis=k.width:"column"===this.flexDir&&(k.flexBasis=k.height),(0,Or.flushSync)((function(){t.setState(k)})),this.props.onResize&&this.props.onResize(e,u,this.resizable,C)}},t.prototype.onMouseUp=function(e){var t=this.state,n=t.isResizing,r=t.direction,o=t.original;if(n&&this.resizable){var i={width:this.size.width-o.width,height:this.size.height-o.height};this.props.onResizeStop&&this.props.onResizeStop(e,r,this.resizable,i),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:hL(hL({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(e){this.setState({width:e.width,height:e.height})},t.prototype.renderResizer=function(){var e=this,t=this.props,n=t.enable,r=t.handleStyles,o=t.handleClasses,i=t.handleWrapperStyle,s=t.handleWrapperClass,a=t.handleComponent;if(!n)return null;var l=Object.keys(n).map((function(t){return!1!==n[t]?B.createElement(pL,{key:t,direction:t,onResizeStart:e.onResizeStart,replaceStyles:r&&r[t],className:o&&o[t]},a&&a[t]?a[t]:null):null}));return B.createElement("div",{className:s,style:i},l)},t.prototype.render=function(){var e=this,t=Object.keys(this.props).reduce((function(t,n){return-1!==SL.indexOf(n)||(t[n]=e.props[n]),t}),{}),n=hL(hL(hL({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(n.flexBasis=this.state.flexBasis);var r=this.props.as||"div";return B.createElement(r,hL({ref:this.ref,style:n,className:this.props.className},t),this.state.isResizing&&B.createElement("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer())},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(B.PureComponent);const jL=()=>{},EL={bottom:"bottom",corner:"corner"};function PL({axis:e,fadeTimeout:t=180,onResize:n=jL,position:r=EL.bottom,showPx:o=!1}){const[i,s]=(0,l.useResizeObserver)(),a=!!e,[u,d]=(0,c.useState)(!1),[p,f]=(0,c.useState)(!1),{width:h,height:m}=s,g=(0,c.useRef)(m),v=(0,c.useRef)(h),b=(0,c.useRef)(),x=(0,c.useCallback)((()=>{b.current&&window.clearTimeout(b.current),b.current=window.setTimeout((()=>{a||(d(!1),f(!1))}),t)}),[t,a]);(0,c.useEffect)((()=>{if(!(null!==h||null!==m))return;const e=h!==v.current,t=m!==g.current;if(e||t){if(h&&!v.current&&m&&!g.current)return v.current=h,void(g.current=m);e&&(d(!0),v.current=h),t&&(f(!0),g.current=m),n({width:h,height:m}),x()}}),[h,m,n,x]);const y=function({axis:e,height:t,moveX:n=!1,moveY:r=!1,position:o=EL.bottom,showPx:i=!1,width:s}){if(!n&&!r)return;if(o===EL.corner)return`${s} x ${t}`;const a=i?" px":"";if(e){if("x"===e&&n)return`${s}${a}`;if("y"===e&&r)return`${t}${a}`}if(n&&r)return`${s} x ${t}`;if(n)return`${s}${a}`;if(r)return`${t}${a}`;return}({axis:e,height:m,moveX:u,moveY:p,position:r,showPx:o,width:h});return{label:y,resizeListener:i}}const TL=cl("div",{target:"e1wq7y4k3"})({name:"1cd7zoc",styles:"bottom:0;box-sizing:border-box;left:0;pointer-events:none;position:absolute;right:0;top:0"}),RL=cl("div",{target:"e1wq7y4k2"})({name:"ajymcs",styles:"align-items:center;box-sizing:border-box;display:inline-flex;justify-content:center;opacity:0;pointer-events:none;transition:opacity 120ms linear"}),IL=cl("div",{target:"e1wq7y4k1"})("background:",jl.theme.foreground,";border-radius:",Tl.radiusSmall,";box-sizing:border-box;font-family:",Fx("default.fontFamily"),";font-size:12px;color:",jl.theme.foregroundInverted,";padding:4px 8px;position:relative;"),NL=cl(Xv,{target:"e1wq7y4k0"})("&&&{color:",jl.theme.foregroundInverted,";display:block;font-size:13px;line-height:1.4;white-space:nowrap;}");const ML=(0,c.forwardRef)((function({label:e,position:t=EL.corner,zIndex:n=1e3,...r},o){const i=!!e,s=t===EL.bottom,l=t===EL.corner;if(!i)return null;let c={opacity:i?1:void 0,zIndex:n},u={};return s&&(c={...c,position:"absolute",bottom:-10,left:"50%",transform:"translate(-50%, 0)"},u={transform:"translate(0, 100%)"}),l&&(c={...c,position:"absolute",top:4,right:(0,a.isRTL)()?void 0:4,left:(0,a.isRTL)()?4:void 0}),(0,wt.jsx)(RL,{"aria-hidden":"true",className:"components-resizable-tooltip__tooltip-wrapper",ref:o,style:c,...r,children:(0,wt.jsx)(IL,{className:"components-resizable-tooltip__tooltip",style:u,children:(0,wt.jsx)(NL,{as:"span",children:e})})})})),AL=ML,DL=()=>{};const OL=(0,c.forwardRef)((function({axis:e,className:t,fadeTimeout:n=180,isVisible:r=!0,labelRef:o,onResize:i=DL,position:a=EL.bottom,showPx:l=!0,zIndex:c=1e3,...u},d){const{label:p,resizeListener:f}=PL({axis:e,fadeTimeout:n,onResize:i,showPx:l,position:a});if(!r)return null;const h=s("components-resize-tooltip",t);return(0,wt.jsxs)(TL,{"aria-hidden":"true",className:h,ref:d,...u,children:[f,(0,wt.jsx)(AL,{"aria-hidden":u["aria-hidden"],label:p,position:a,ref:o,zIndex:c})]})})),zL=OL,LL="components-resizable-box__handle",FL="components-resizable-box__side-handle",BL="components-resizable-box__corner-handle",VL={top:s(LL,FL,"components-resizable-box__handle-top"),right:s(LL,FL,"components-resizable-box__handle-right"),bottom:s(LL,FL,"components-resizable-box__handle-bottom"),left:s(LL,FL,"components-resizable-box__handle-left"),topLeft:s(LL,BL,"components-resizable-box__handle-top","components-resizable-box__handle-left"),topRight:s(LL,BL,"components-resizable-box__handle-top","components-resizable-box__handle-right"),bottomRight:s(LL,BL,"components-resizable-box__handle-bottom","components-resizable-box__handle-right"),bottomLeft:s(LL,BL,"components-resizable-box__handle-bottom","components-resizable-box__handle-left")},$L={width:void 0,height:void 0,top:void 0,right:void 0,bottom:void 0,left:void 0},HL={top:$L,right:$L,bottom:$L,left:$L,topLeft:$L,topRight:$L,bottomRight:$L,bottomLeft:$L};const WL=(0,c.forwardRef)((function({className:e,children:t,showHandle:n=!0,__experimentalShowTooltip:r=!1,__experimentalTooltipProps:o={},...i},a){return(0,wt.jsxs)(kL,{className:s("components-resizable-box__container",n&&"has-show-handle",e),handleClasses:VL,handleStyles:HL,ref:a,...i,children:[t,r&&(0,wt.jsx)(zL,{...o})]})}));const UL=function({naturalWidth:e,naturalHeight:t,children:n,isInline:r=!1}){if(1!==c.Children.count(n))return null;const o=r?"span":"div";let i;return e&&t&&(i=`${e} / ${t}`),(0,wt.jsx)(o,{className:"components-responsive-wrapper",children:(0,wt.jsx)("div",{children:(0,c.cloneElement)(n,{className:s("components-responsive-wrapper__content",n.props.className),style:{...n.props.style,aspectRatio:i}})})})},GL=function(){const{MutationObserver:e}=window;if(!e||!document.body||!window.parent)return;function t(){const e=document.body.getBoundingClientRect();window.parent.postMessage({action:"resize",width:e.width,height:e.height},"*")}function n(e){e.style&&["width","height","minHeight","maxHeight"].forEach((function(t){/^\\d+(vw|vh|svw|lvw|dvw|svh|lvh|dvh|vi|svi|lvi|dvi|vb|svb|lvb|dvb|vmin|svmin|lvmin|dvmin|vmax|svmax|lvmax|dvmax)$/.test(e.style[t])&&(e.style[t]="")}))}new e(t).observe(document.body,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0}),window.addEventListener("load",t,!0),Array.prototype.forEach.call(document.querySelectorAll("[style]"),n),Array.prototype.forEach.call(document.styleSheets,(function(e){Array.prototype.forEach.call(e.cssRules||e.rules,n)})),document.body.style.position="absolute",document.body.style.width="100%",document.body.setAttribute("data-resizable-iframe-connected",""),t(),window.addEventListener("resize",t,!0)};const KL=function({html:e="",title:t="",type:n,styles:r=[],scripts:o=[],onFocus:i,tabIndex:s}){const a=(0,c.useRef)(),[u,d]=(0,c.useState)(0),[p,f]=(0,c.useState)(0);function h(i=!1){if(!function(){try{return!!a.current?.contentDocument?.body}catch(e){return!1}}())return;const{contentDocument:s,ownerDocument:l}=a.current;if(!i&&null!==s?.body.getAttribute("data-resizable-iframe-connected"))return;const u=(0,wt.jsxs)("html",{lang:l.documentElement.lang,className:n,children:[(0,wt.jsxs)("head",{children:[(0,wt.jsx)("title",{children:t}),(0,wt.jsx)("style",{dangerouslySetInnerHTML:{__html:"\n\tbody {\n\t\tmargin: 0;\n\t}\n\thtml,\n\tbody,\n\tbody > div {\n\t\twidth: 100%;\n\t}\n\thtml.wp-has-aspect-ratio,\n\tbody.wp-has-aspect-ratio,\n\tbody.wp-has-aspect-ratio > div,\n\tbody.wp-has-aspect-ratio > div iframe {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\toverflow: hidden; /* If it has an aspect ratio, it shouldn't scroll. */\n\t}\n\tbody > div > * {\n\t\tmargin-top: 0 !important; /* Has to have !important to override inline styles. */\n\t\tmargin-bottom: 0 !important;\n\t}\n"}}),r.map(((e,t)=>(0,wt.jsx)("style",{dangerouslySetInnerHTML:{__html:e}},t)))]}),(0,wt.jsxs)("body",{"data-resizable-iframe-connected":"data-resizable-iframe-connected",className:n,children:[(0,wt.jsx)("div",{dangerouslySetInnerHTML:{__html:e}}),(0,wt.jsx)("script",{type:"text/javascript",dangerouslySetInnerHTML:{__html:`(${GL.toString()})();`}}),o.map((e=>(0,wt.jsx)("script",{src:e},e)))]})]});s.open(),s.write("<!DOCTYPE html>"+(0,c.renderToString)(u)),s.close()}return(0,c.useEffect)((()=>{function e(){h(!1)}function t(e){const t=a.current;if(!t||t.contentWindow!==e.source)return;let n=e.data||{};if("string"==typeof n)try{n=JSON.parse(n)}catch(e){}"resize"===n.action&&(d(n.width),f(n.height))}h();const n=a.current,r=n?.ownerDocument?.defaultView;return n?.addEventListener("load",e,!1),r?.addEventListener("message",t),()=>{n?.removeEventListener("load",e,!1),r?.removeEventListener("message",t)}}),[]),(0,c.useEffect)((()=>{h()}),[t,r,o]),(0,c.useEffect)((()=>{h(!0)}),[e,n]),(0,wt.jsx)("iframe",{ref:(0,l.useMergeRefs)([a,(0,l.useFocusableIframe)()]),title:t,tabIndex:s,className:"components-sandbox",sandbox:"allow-scripts allow-same-origin allow-presentation",onFocus:i,width:Math.ceil(u),height:Math.ceil(p)})};const qL=(0,c.forwardRef)((function({className:e,children:t,spokenMessage:n=t,politeness:r="polite",actions:o=[],onRemove:i,icon:l=null,explicitDismiss:u=!1,onDismiss:d,listRef:p},f){function h(e){e&&e.preventDefault&&e.preventDefault(),p?.current?.focus(),d?.(),i?.()}!function(e,t){const n="string"==typeof e?e:(0,c.renderToString)(e);(0,c.useEffect)((()=>{n&&(0,My.speak)(n,t)}),[n,t])}(n,r);const m=(0,c.useRef)({onDismiss:d,onRemove:i});(0,c.useLayoutEffect)((()=>{m.current={onDismiss:d,onRemove:i}})),(0,c.useEffect)((()=>{const e=setTimeout((()=>{u||(m.current.onDismiss?.(),m.current.onRemove?.())}),1e4);return()=>clearTimeout(e)}),[u]);const g=s(e,"components-snackbar",{"components-snackbar-explicit-dismiss":!!u});o&&o.length>1&&(o=[o[0]]);const v=s("components-snackbar__content",{"components-snackbar__content-with-icon":!!l});return(0,wt.jsx)("div",{ref:f,className:g,onClick:u?void 0:h,tabIndex:0,role:u?void 0:"button",onKeyPress:u?void 0:h,"aria-label":u?void 0:(0,a.__)("Dismiss this notice"),"data-testid":"snackbar",children:(0,wt.jsxs)("div",{className:v,children:[l&&(0,wt.jsx)("div",{className:"components-snackbar__icon",children:l}),t,o.map((({label:e,onClick:t,url:n},r)=>(0,wt.jsx)(sy,{href:n,variant:"tertiary",onClick:e=>function(e,t){e.stopPropagation(),i?.(),t&&t(e)}(e,t),className:"components-snackbar__action",children:e},r))),u&&(0,wt.jsx)("span",{role:"button","aria-label":(0,a.__)("Dismiss this notice"),tabIndex:0,className:"components-snackbar__dismiss-button",onClick:h,onKeyPress:h,children:"✕"})]})})})),YL=qL,XL={init:{height:0,opacity:0},open:{height:"auto",opacity:1,transition:{height:{type:"tween",duration:.3,ease:[0,0,.2,1]},opacity:{type:"tween",duration:.25,delay:.05,ease:[0,0,.2,1]}}},exit:{opacity:0,transition:{type:"tween",duration:.1,ease:[0,0,.2,1]}}};const ZL=function({notices:e,className:t,children:n,onRemove:r}){const o=(0,c.useRef)(null),i=(0,l.useReducedMotion)();t=s("components-snackbar-list",t);const a=e=>()=>r?.(e.id);return(0,wt.jsxs)("div",{className:t,tabIndex:-1,ref:o,"data-testid":"snackbar-list",children:[n,(0,wt.jsx)(xg,{children:e.map((e=>{const{content:t,...n}=e;return(0,wt.jsx)(dg.div,{layout:!i,initial:"init",animate:"open",exit:"exit",variants:i?void 0:XL,children:(0,wt.jsx)("div",{className:"components-snackbar-list__notice-container",children:(0,wt.jsx)(YL,{...n,onRemove:a(e),listRef:o,children:e.content})})},e.id)}))})]})};const QL=xl`
+function es(e){return"[object Object]"===Object.prototype.toString.call(e)}function ts(e){var t,n;return!1!==es(e)&&(void 0===(t=e.constructor)||!1!==es(n=t.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf"))}const ns=function(e,t){const n=(0,c.useRef)(!1);(0,c.useEffect)((()=>{if(n.current)return e();n.current=!0}),t),(0,c.useEffect)((()=>()=>{n.current=!1}),[])},rs=(0,c.createContext)({}),os=()=>(0,c.useContext)(rs);const is=(0,c.memo)((({children:e,value:t})=>{const n=function({value:e}){const t=os(),n=(0,c.useRef)(e);return ns((()=>{Ji()(n.current,e)&&n.current}),[e]),(0,c.useMemo)((()=>Zi()(null!=t?t:{},null!=e?e:{},{isMergeableObject:ts})),[t,e])}({value:t});return(0,wt.jsx)(rs.Provider,{value:n,children:e})})),ss="data-wp-component",as="data-wp-c16t",ls="__contextSystemKey__";var cs=function(){return cs=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},cs.apply(this,arguments)};Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError;function us(e){return e.toLowerCase()}var ds=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],ps=/[^A-Z0-9]+/gi;function fs(e,t,n){return t instanceof RegExp?e.replace(t,n):t.reduce((function(e,t){return e.replace(t,n)}),e)}function hs(e,t){return void 0===t&&(t={}),function(e,t){void 0===t&&(t={});for(var n=t.splitRegexp,r=void 0===n?ds:n,o=t.stripRegexp,i=void 0===o?ps:o,s=t.transform,a=void 0===s?us:s,l=t.delimiter,c=void 0===l?" ":l,u=fs(fs(e,r,"$1\0$2"),i,"\0"),d=0,p=u.length;"\0"===u.charAt(d);)d++;for(;"\0"===u.charAt(p-1);)p--;return u.slice(d,p).split("\0").map(a).join(c)}(e,cs({delimiter:"."},t))}function ms(e,t){return void 0===t&&(t={}),hs(e,cs({delimiter:"-"},t))}function gs(e,t){var n,r,o=0;function i(){var i,s,a=n,l=arguments.length;e:for(;a;){if(a.args.length===arguments.length){for(s=0;s<l;s++)if(a.args[s]!==arguments[s]){a=a.next;continue e}return a!==n&&(a===r&&(r=a.prev),a.prev.next=a.next,a.next&&(a.next.prev=a.prev),a.next=n,a.prev=null,n.prev=a,n=a),a.val}a=a.next}for(i=new Array(l),s=0;s<l;s++)i[s]=arguments[s];return a={args:i,val:e.apply(null,i)},n?(n.prev=a,a.next=n):r=a,o===t.maxSize?(r=r.prev).next=null:o++,n=a,a.val}return t=t||{},i.clear=function(){n=null,r=null,o=0},i}const vs=gs((function(e){return`components-${ms(e)}`}));var bs=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){0}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}(),xs=Math.abs,ys=String.fromCharCode,ws=Object.assign;function _s(e){return e.trim()}function Ss(e,t,n){return e.replace(t,n)}function Cs(e,t){return e.indexOf(t)}function ks(e,t){return 0|e.charCodeAt(t)}function js(e,t,n){return e.slice(t,n)}function Es(e){return e.length}function Ps(e){return e.length}function Ts(e,t){return t.push(e),e}var Rs=1,Is=1,Ns=0,Ms=0,As=0,Ds="";function Os(e,t,n,r,o,i,s){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:Rs,column:Is,length:s,return:""}}function zs(e,t){return ws(Os("",null,null,"",null,null,0),e,{length:-e.length},t)}function Ls(){return As=Ms>0?ks(Ds,--Ms):0,Is--,10===As&&(Is=1,Rs--),As}function Fs(){return As=Ms<Ns?ks(Ds,Ms++):0,Is++,10===As&&(Is=1,Rs++),As}function Bs(){return ks(Ds,Ms)}function Vs(){return Ms}function $s(e,t){return js(Ds,e,t)}function Hs(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Ws(e){return Rs=Is=1,Ns=Es(Ds=e),Ms=0,[]}function Us(e){return Ds="",e}function Gs(e){return _s($s(Ms-1,Ys(91===e?e+2:40===e?e+1:e)))}function Ks(e){for(;(As=Bs())&&As<33;)Fs();return Hs(e)>2||Hs(As)>3?"":" "}function qs(e,t){for(;--t&&Fs()&&!(As<48||As>102||As>57&&As<65||As>70&&As<97););return $s(e,Vs()+(t<6&&32==Bs()&&32==Fs()))}function Ys(e){for(;Fs();)switch(As){case e:return Ms;case 34:case 39:34!==e&&39!==e&&Ys(As);break;case 40:41===e&&Ys(e);break;case 92:Fs()}return Ms}function Xs(e,t){for(;Fs()&&e+As!==57&&(e+As!==84||47!==Bs()););return"/*"+$s(t,Ms-1)+"*"+ys(47===e?e:Fs())}function Zs(e){for(;!Hs(Bs());)Fs();return $s(e,Ms)}var Qs="-ms-",Js="-moz-",ea="-webkit-",ta="comm",na="rule",ra="decl",oa="@keyframes";function ia(e,t){for(var n="",r=Ps(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function sa(e,t,n,r){switch(e.type){case"@import":case ra:return e.return=e.return||e.value;case ta:return"";case oa:return e.return=e.value+"{"+ia(e.children,r)+"}";case na:e.value=e.props.join(",")}return Es(n=ia(e.children,r))?e.return=e.value+"{"+n+"}":""}function aa(e){return Us(la("",null,null,null,[""],e=Ws(e),0,[0],e))}function la(e,t,n,r,o,i,s,a,l){for(var c=0,u=0,d=s,p=0,f=0,h=0,m=1,g=1,v=1,b=0,x="",y=o,w=i,_=r,S=x;g;)switch(h=b,b=Fs()){case 40:if(108!=h&&58==ks(S,d-1)){-1!=Cs(S+=Ss(Gs(b),"&","&\f"),"&\f")&&(v=-1);break}case 34:case 39:case 91:S+=Gs(b);break;case 9:case 10:case 13:case 32:S+=Ks(h);break;case 92:S+=qs(Vs()-1,7);continue;case 47:switch(Bs()){case 42:case 47:Ts(ua(Xs(Fs(),Vs()),t,n),l);break;default:S+="/"}break;case 123*m:a[c++]=Es(S)*v;case 125*m:case 59:case 0:switch(b){case 0:case 125:g=0;case 59+u:f>0&&Es(S)-d&&Ts(f>32?da(S+";",r,n,d-1):da(Ss(S," ","")+";",r,n,d-2),l);break;case 59:S+=";";default:if(Ts(_=ca(S,t,n,c,u,o,a,x,y=[],w=[],d),i),123===b)if(0===u)la(S,t,_,_,y,i,d,a,w);else switch(99===p&&110===ks(S,3)?100:p){case 100:case 109:case 115:la(e,_,_,r&&Ts(ca(e,_,_,0,0,o,a,x,o,y=[],d),w),o,w,d,a,r?y:w);break;default:la(S,_,_,_,[""],w,0,a,w)}}c=u=f=0,m=v=1,x=S="",d=s;break;case 58:d=1+Es(S),f=h;default:if(m<1)if(123==b)--m;else if(125==b&&0==m++&&125==Ls())continue;switch(S+=ys(b),b*m){case 38:v=u>0?1:(S+="\f",-1);break;case 44:a[c++]=(Es(S)-1)*v,v=1;break;case 64:45===Bs()&&(S+=Gs(Fs())),p=Bs(),u=d=Es(x=S+=Zs(Vs())),b++;break;case 45:45===h&&2==Es(S)&&(m=0)}}return i}function ca(e,t,n,r,o,i,s,a,l,c,u){for(var d=o-1,p=0===o?i:[""],f=Ps(p),h=0,m=0,g=0;h<r;++h)for(var v=0,b=js(e,d+1,d=xs(m=s[h])),x=e;v<f;++v)(x=_s(m>0?p[v]+" "+b:Ss(b,/&\f/g,p[v])))&&(l[g++]=x);return Os(e,t,n,0===o?na:a,l,c,u)}function ua(e,t,n){return Os(e,t,n,ta,ys(As),js(e,2,-2),0)}function da(e,t,n,r){return Os(e,t,n,ra,js(e,0,r),js(e,r+1,-1),r)}var pa=function(e,t,n){for(var r=0,o=0;r=o,o=Bs(),38===r&&12===o&&(t[n]=1),!Hs(o);)Fs();return $s(e,Ms)},fa=function(e,t){return Us(function(e,t){var n=-1,r=44;do{switch(Hs(r)){case 0:38===r&&12===Bs()&&(t[n]=1),e[n]+=pa(Ms-1,t,n);break;case 2:e[n]+=Gs(r);break;case 4:if(44===r){e[++n]=58===Bs()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=ys(r)}}while(r=Fs());return e}(Ws(e),t))},ha=new WeakMap,ma=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||ha.get(n))&&!r){ha.set(e,!0);for(var o=[],i=fa(t,o),s=n.props,a=0,l=0;a<i.length;a++)for(var c=0;c<s.length;c++,l++)e.props[l]=o[a]?i[a].replace(/&\f/g,s[c]):s[c]+" "+i[a]}}},ga=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function va(e,t){switch(function(e,t){return 45^ks(e,0)?(((t<<2^ks(e,0))<<2^ks(e,1))<<2^ks(e,2))<<2^ks(e,3):0}(e,t)){case 5103:return ea+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return ea+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return ea+e+Js+e+Qs+e+e;case 6828:case 4268:return ea+e+Qs+e+e;case 6165:return ea+e+Qs+"flex-"+e+e;case 5187:return ea+e+Ss(e,/(\w+).+(:[^]+)/,ea+"box-$1$2"+Qs+"flex-$1$2")+e;case 5443:return ea+e+Qs+"flex-item-"+Ss(e,/flex-|-self/,"")+e;case 4675:return ea+e+Qs+"flex-line-pack"+Ss(e,/align-content|flex-|-self/,"")+e;case 5548:return ea+e+Qs+Ss(e,"shrink","negative")+e;case 5292:return ea+e+Qs+Ss(e,"basis","preferred-size")+e;case 6060:return ea+"box-"+Ss(e,"-grow","")+ea+e+Qs+Ss(e,"grow","positive")+e;case 4554:return ea+Ss(e,/([^-])(transform)/g,"$1"+ea+"$2")+e;case 6187:return Ss(Ss(Ss(e,/(zoom-|grab)/,ea+"$1"),/(image-set)/,ea+"$1"),e,"")+e;case 5495:case 3959:return Ss(e,/(image-set\([^]*)/,ea+"$1$`$1");case 4968:return Ss(Ss(e,/(.+:)(flex-)?(.*)/,ea+"box-pack:$3"+Qs+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ea+e+e;case 4095:case 3583:case 4068:case 2532:return Ss(e,/(.+)-inline(.+)/,ea+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Es(e)-1-t>6)switch(ks(e,t+1)){case 109:if(45!==ks(e,t+4))break;case 102:return Ss(e,/(.+:)(.+)-([^]+)/,"$1"+ea+"$2-$3$1"+Js+(108==ks(e,t+3)?"$3":"$2-$3"))+e;case 115:return~Cs(e,"stretch")?va(Ss(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==ks(e,t+1))break;case 6444:switch(ks(e,Es(e)-3-(~Cs(e,"!important")&&10))){case 107:return Ss(e,":",":"+ea)+e;case 101:return Ss(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ea+(45===ks(e,14)?"inline-":"")+"box$3$1"+ea+"$2$3$1"+Qs+"$2box$3")+e}break;case 5936:switch(ks(e,t+11)){case 114:return ea+e+Qs+Ss(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ea+e+Qs+Ss(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ea+e+Qs+Ss(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ea+e+Qs+e+e}return e}var ba=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case ra:e.return=va(e.value,e.length);break;case oa:return ia([zs(e,{value:Ss(e.value,"@","@"+ea)})],r);case na:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return ia([zs(e,{props:[Ss(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return ia([zs(e,{props:[Ss(t,/:(plac\w+)/,":"+ea+"input-$1")]}),zs(e,{props:[Ss(t,/:(plac\w+)/,":-moz-$1")]}),zs(e,{props:[Ss(t,/:(plac\w+)/,Qs+"input-$1")]})],r)}return""}))}}];const xa=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r=e.stylisPlugins||ba;var o,i,s={},a=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)s[t[n]]=!0;a.push(e)}));var l,c,u,d,p=[sa,(d=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&d(e)})],f=(c=[ma,ga].concat(r,p),u=Ps(c),function(e,t,n,r){for(var o="",i=0;i<u;i++)o+=c[i](e,t,n,r)||"";return o});i=function(e,t,n,r){l=n,function(e){ia(aa(e),f)}(e?e+"{"+t.styles+"}":t.styles),r&&(h.inserted[t.name]=!0)};var h={key:t,sheet:new bs({key:t,container:o,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:s,registered:{},insert:i};return h.sheet.hydrate(a),h};const ya=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)};const wa={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function _a(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var Sa=/[A-Z]|^ms/g,Ca=/_EMO_([^_]+?)_([^]*?)_EMO_/g,ka=function(e){return 45===e.charCodeAt(1)},ja=function(e){return null!=e&&"boolean"!=typeof e},Ea=_a((function(e){return ka(e)?e:e.replace(Sa,"-$&").toLowerCase()})),Pa=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Ca,(function(e,t,n){return Ra={name:t,styles:n,next:Ra},t}))}return 1===wa[e]||ka(e)||"number"!=typeof t||0===t?t:t+"px"};function Ta(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return Ra={name:n.name,styles:n.styles,next:Ra},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)Ra={name:r.name,styles:r.styles,next:Ra},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Ta(e,t,n[o])+";";else for(var i in n){var s=n[i];if("object"!=typeof s)null!=t&&void 0!==t[s]?r+=i+"{"+t[s]+"}":ja(s)&&(r+=Ea(i)+":"+Pa(i,s)+";");else if(!Array.isArray(s)||"string"!=typeof s[0]||null!=t&&void 0!==t[s[0]]){var a=Ta(e,t,s);switch(i){case"animation":case"animationName":r+=Ea(i)+":"+a+";";break;default:r+=i+"{"+a+"}"}}else for(var l=0;l<s.length;l++)ja(s[l])&&(r+=Ea(i)+":"+Pa(i,s[l])+";")}return r}(e,t,n);case"function":if(void 0!==e){var o=Ra,i=n(e);return Ra=o,Ta(e,t,i)}}if(null==t)return n;var s=t[n];return void 0!==s?s:n}var Ra,Ia=/label:\s*([^\s;\n{]+)\s*(;|$)/g;var Na=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";Ra=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=Ta(n,t,i)):o+=i[0];for(var s=1;s<e.length;s++)o+=Ta(n,t,e[s]),r&&(o+=i[s]);Ia.lastIndex=0;for(var a,l="";null!==(a=Ia.exec(o));)l+="-"+a[1];return{name:ya(o)+l,styles:o,next:Ra}},Ma=!!B.useInsertionEffect&&B.useInsertionEffect,Aa=Ma||function(e){return e()},Da=(0,B.createContext)("undefined"!=typeof HTMLElement?xa({key:"css"}):null);var Oa=Da.Provider,za=function(e){return(0,B.forwardRef)((function(t,n){var r=(0,B.useContext)(Da);return e(t,r,n)}))},La=(0,B.createContext)({});function Fa(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}var Ba=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},Va=function(e,t,n){Ba(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0);o=o.next}while(void 0!==o)}};function $a(e,t){if(void 0===e.inserted[t.name])return e.insert("",t,e.sheet,!0)}function Ha(e,t,n){var r=[],o=Fa(e,r,n);return r.length<2?n:o+t(r)}var Wa=function e(t){for(var n="",r=0;r<t.length;r++){var o=t[r];if(null!=o){var i=void 0;switch(typeof o){case"boolean":break;case"object":if(Array.isArray(o))i=e(o);else for(var s in i="",o)o[s]&&s&&(i&&(i+=" "),i+=s);break;default:i=o}i&&(n&&(n+=" "),n+=i)}}return n};const Ua=function(e){var t=xa(e);t.sheet.speedy=function(e){this.isSpeedy=e},t.compat=!0;var n=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o=Na(n,t.registered,void 0);return Va(t,o,!1),t.key+"-"+o.name};return{css:n,cx:function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return Ha(t.registered,n,Wa(r))},injectGlobal:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o=Na(n,t.registered);$a(t,o)},keyframes:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o=Na(n,t.registered),i="animation-"+o.name;return $a(t,{name:o.name,styles:"@keyframes "+i+"{"+o.styles+"}"}),i},hydrate:function(e){e.forEach((function(e){t.inserted[e]=!0}))},flush:function(){t.registered={},t.inserted={},t.sheet.flush()},sheet:t.sheet,cache:t,getRegisteredStyles:Fa.bind(null,t.registered),merge:Ha.bind(null,t.registered,n)}};var Ga=Ua({key:"css"}),Ka=(Ga.flush,Ga.hydrate,Ga.cx);Ga.merge,Ga.getRegisteredStyles,Ga.injectGlobal,Ga.keyframes,Ga.css,Ga.sheet,Ga.cache;const qa=()=>{const e=(0,B.useContext)(Da),t=(0,c.useCallback)(((...t)=>{if(null===e)throw new Error("The `useCx` hook should be only used within a valid Emotion Cache Context");return Ka(...t.map((t=>(e=>null!=e&&["name","styles"].every((t=>void 0!==e[t])))(t)?(Va(e,t,!1),`${e.key}-${t.name}`):t)))}),[e]);return t};function Ya(e,t){const n=os(),r=n?.[t]||{},o={[as]:!0,...(i=t,{[ss]:i})};var i;const{_overrides:s,...a}=r,l=Object.entries(a).length?Object.assign({},a,e):e,c=qa()(vs(t),e.className),u="function"==typeof l.renderChildren?l.renderChildren(l):l.children;for(const e in l)o[e]=l[e];for(const e in s)o[e]=s[e];return void 0!==u&&(o.children=u),o.className=c,o}function Xa(e,t){return Qa(e,t,{forwardsRef:!0})}function Za(e,t){return Qa(e,t)}function Qa(e,t,n){const r=n?.forwardsRef?(0,c.forwardRef)(e):e;let o=r[ls]||[t];return Array.isArray(t)&&(o=[...o,...t]),"string"==typeof t&&(o=[...o,t]),Object.assign(r,{[ls]:[...new Set(o)],displayName:t,selector:`.${vs(t)}`})}function Ja(e){if(!e)return[];let t=[];return e[ls]&&(t=e[ls]),e.type&&e.type[ls]&&(t=e.type[ls]),t}function el(e,t){return!!e&&("string"==typeof t?Ja(e).includes(t):!!Array.isArray(t)&&t.some((t=>Ja(e).includes(t))))}const tl={border:0,clip:"rect(1px, 1px, 1px, 1px)",WebkitClipPath:"inset( 50% )",clipPath:"inset( 50% )",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",wordWrap:"normal"};function nl(){return nl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nl.apply(this,arguments)}var rl=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,ol=_a((function(e){return rl.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),il=function(e){return"theme"!==e},sl=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?ol:il},al=function(e,t,n){var r;if(t){var o=t.shouldForwardProp;r=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},ll=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;Ba(t,n,r);Aa((function(){return Va(t,n,r)}));return null};const cl=function e(t,n){var r,o,i=t.__emotion_real===t,s=i&&t.__emotion_base||t;void 0!==n&&(r=n.label,o=n.target);var a=al(t,n,i),l=a||sl(s),c=!l("as");return function(){var u=arguments,d=i&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==r&&d.push("label:"+r+";"),null==u[0]||void 0===u[0].raw)d.push.apply(d,u);else{0,d.push(u[0][0]);for(var p=u.length,f=1;f<p;f++)d.push(u[f],u[0][f])}var h=za((function(e,t,n){var r=c&&e.as||s,i="",u=[],p=e;if(null==e.theme){for(var f in p={},e)p[f]=e[f];p.theme=(0,B.useContext)(La)}"string"==typeof e.className?i=Fa(t.registered,u,e.className):null!=e.className&&(i=e.className+" ");var h=Na(d.concat(u),t.registered,p);i+=t.key+"-"+h.name,void 0!==o&&(i+=" "+o);var m=c&&void 0===a?sl(r):l,g={};for(var v in e)c&&"as"===v||m(v)&&(g[v]=e[v]);return g.className=i,g.ref=n,(0,B.createElement)(B.Fragment,null,(0,B.createElement)(ll,{cache:t,serialized:h,isStringTag:"string"==typeof r}),(0,B.createElement)(r,g))}));return h.displayName=void 0!==r?r:"Styled("+("string"==typeof s?s:s.displayName||s.name||"Component")+")",h.defaultProps=t.defaultProps,h.__emotion_real=h,h.__emotion_base=s,h.__emotion_styles=d,h.__emotion_forwardProp=a,Object.defineProperty(h,"toString",{value:function(){return"."+o}}),h.withComponent=function(t,r){return e(t,nl({},n,r,{shouldForwardProp:al(h,r,!0)})).apply(void 0,d)},h}},ul=cl("div",{target:"e19lxcc00"})("");const dl=Object.assign((0,c.forwardRef)((function({as:e,...t},n){return(0,wt.jsx)(ul,{as:e,ref:n,...t})})),{selector:".components-view"});const pl=Xa((function(e,t){const{style:n,...r}=Ya(e,"VisuallyHidden");return(0,wt.jsx)(dl,{ref:t,...r,style:{...tl,...n||{}}})}),"VisuallyHidden"),fl=[["top left","top center","top right"],["center left","center center","center right"],["bottom left","bottom center","bottom right"]],hl={"top left":(0,a.__)("Top Left"),"top center":(0,a.__)("Top Center"),"top right":(0,a.__)("Top Right"),"center left":(0,a.__)("Center Left"),"center center":(0,a.__)("Center"),center:(0,a.__)("Center"),"center right":(0,a.__)("Center Right"),"bottom left":(0,a.__)("Bottom Left"),"bottom center":(0,a.__)("Bottom Center"),"bottom right":(0,a.__)("Bottom Right")},ml=fl.flat();function gl(e){const t="center"===e?"center center":e,n=t?.replace("-"," ");return ml.includes(n)?n:void 0}function vl(e,t){const n=gl(t);if(!n)return;return`${e}-${n.replace(" ","-")}`}o(1880);function bl(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Na(t)}var xl=function(){var e=bl.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}};const yl="4px";function wl(e){if(void 0===e)return;if(!e)return"0";const t="number"==typeof e?e:Number(e);return"undefined"!=typeof window&&window.CSS?.supports?.("margin",e.toString())||Number.isNaN(t)?e.toString():`calc(${yl} * ${e})`}const _l="#fff",Sl={900:"#1e1e1e",800:"#2f2f2f",700:"#757575",600:"#949494",400:"#ccc",300:"#ddd",200:"#e0e0e0",100:"#f0f0f0"},Cl={accent:"var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9))",accentDarker10:"var(--wp-components-color-accent-darker-10, var(--wp-admin-theme-color-darker-10, #2145e6))",accentDarker20:"var(--wp-components-color-accent-darker-20, var(--wp-admin-theme-color-darker-20, #183ad6))",accentInverted:`var(--wp-components-color-accent-inverted, ${_l})`,background:`var(--wp-components-color-background, ${_l})`,foreground:`var(--wp-components-color-foreground, ${Sl[900]})`,foregroundInverted:`var(--wp-components-color-foreground-inverted, ${_l})`,gray:{900:`var(--wp-components-color-foreground, ${Sl[900]})`,800:`var(--wp-components-color-gray-800, ${Sl[800]})`,700:`var(--wp-components-color-gray-700, ${Sl[700]})`,600:`var(--wp-components-color-gray-600, ${Sl[600]})`,400:`var(--wp-components-color-gray-400, ${Sl[400]})`,300:`var(--wp-components-color-gray-300, ${Sl[300]})`,200:`var(--wp-components-color-gray-200, ${Sl[200]})`,100:`var(--wp-components-color-gray-100, ${Sl[100]})`}},kl={background:Cl.background,backgroundDisabled:Cl.gray[100],border:Cl.gray[600],borderHover:Cl.gray[700],borderFocus:Cl.accent,borderDisabled:Cl.gray[400],textDisabled:Cl.gray[600],darkGrayPlaceholder:`color-mix(in srgb, ${Cl.foreground}, transparent 38%)`,lightGrayPlaceholder:`color-mix(in srgb, ${Cl.background}, transparent 35%)`},jl=Object.freeze({gray:Sl,white:_l,alert:{yellow:"#f0b849",red:"#d94f4f",green:"#4ab866"},theme:Cl,ui:kl}),El="36px",Pl={controlPaddingX:12,controlPaddingXSmall:8,controlPaddingXLarge:12*1.3334,controlBackgroundColor:jl.white,controlBoxShadowFocus:`0 0 0 0.5px ${jl.theme.accent}`,controlHeight:El,controlHeightXSmall:`calc( ${El} * 0.6 )`,controlHeightSmall:`calc( ${El} * 0.8 )`,controlHeightLarge:`calc( ${El} * 1.2 )`,controlHeightXLarge:`calc( ${El} * 1.4 )`},Tl=Object.assign({},Pl,{colorDivider:"rgba(0, 0, 0, 0.1)",colorScrollbarThumb:"rgba(0, 0, 0, 0.2)",colorScrollbarThumbHover:"rgba(0, 0, 0, 0.5)",colorScrollbarTrack:"rgba(0, 0, 0, 0.04)",elevationIntensity:1,radiusXSmall:"1px",radiusSmall:"2px",radiusMedium:"4px",radiusLarge:"8px",radiusFull:"9999px",radiusRound:"50%",borderWidth:"1px",borderWidthFocus:"1.5px",borderWidthTab:"4px",spinnerSize:16,fontSize:"13px",fontSizeH1:"calc(2.44 * 13px)",fontSizeH2:"calc(1.95 * 13px)",fontSizeH3:"calc(1.56 * 13px)",fontSizeH4:"calc(1.25 * 13px)",fontSizeH5:"13px",fontSizeH6:"calc(0.8 * 13px)",fontSizeInputMobile:"16px",fontSizeMobile:"15px",fontSizeSmall:"calc(0.92 * 13px)",fontSizeXSmall:"calc(0.75 * 13px)",fontLineHeightBase:"1.4",fontWeight:"normal",fontWeightHeading:"600",gridBase:"4px",cardPaddingXSmall:`${wl(2)}`,cardPaddingSmall:`${wl(4)}`,cardPaddingMedium:`${wl(4)} ${wl(6)}`,cardPaddingLarge:`${wl(6)} ${wl(8)}`,elevationXSmall:"0 1px 1px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.02), 0 3px 3px rgba(0, 0, 0, 0.02), 0 4px 4px rgba(0, 0, 0, 0.01)",elevationSmall:"0 1px 2px rgba(0, 0, 0, 0.05), 0 2px 3px rgba(0, 0, 0, 0.04), 0 6px 6px rgba(0, 0, 0, 0.03), 0 8px 8px rgba(0, 0, 0, 0.02)",elevationMedium:"0 2px 3px rgba(0, 0, 0, 0.05), 0 4px 5px rgba(0, 0, 0, 0.04), 0 12px 12px rgba(0, 0, 0, 0.03), 0 16px 16px rgba(0, 0, 0, 0.02)",elevationLarge:"0 5px 15px rgba(0, 0, 0, 0.08), 0 15px 27px rgba(0, 0, 0, 0.07), 0 30px 36px rgba(0, 0, 0, 0.04), 0 50px 43px rgba(0, 0, 0, 0.02)",surfaceBackgroundColor:jl.white,surfaceBackgroundSubtleColor:"#F3F3F3",surfaceBackgroundTintColor:"#F5F5F5",surfaceBorderColor:"rgba(0, 0, 0, 0.1)",surfaceBorderBoldColor:"rgba(0, 0, 0, 0.15)",surfaceBorderSubtleColor:"rgba(0, 0, 0, 0.05)",surfaceBackgroundTertiaryColor:jl.white,surfaceColor:jl.white,transitionDuration:"200ms",transitionDurationFast:"160ms",transitionDurationFaster:"120ms",transitionDurationFastest:"100ms",transitionTimingFunction:"cubic-bezier(0.08, 0.52, 0.52, 1)",transitionTimingFunctionControl:"cubic-bezier(0.12, 0.8, 0.32, 1)"});const Rl=({size:e=92})=>bl("direction:ltr;display:grid;grid-template-columns:repeat( 3, 1fr );grid-template-rows:repeat( 3, 1fr );box-sizing:border-box;width:",e,"px;aspect-ratio:1;border-radius:",Tl.radiusMedium,";outline:none;","");var Il={name:"e0dnmk",styles:"cursor:pointer"};const Nl=cl("div",{target:"e1r95csn3"})(Rl," border:1px solid transparent;",(e=>e.disablePointerEvents?bl("",""):Il),";"),Ml=cl("div",{target:"e1r95csn2"})({name:"1fbxn64",styles:"grid-column:1/-1;box-sizing:border-box;display:grid;grid-template-columns:repeat( 3, 1fr )"}),Al=cl("span",{target:"e1r95csn1"})({name:"e2kws5",styles:"position:relative;display:flex;align-items:center;justify-content:center;box-sizing:border-box;margin:0;padding:0;appearance:none;border:none;outline:none"}),Dl=cl("span",{target:"e1r95csn0"})("display:block;contain:strict;box-sizing:border-box;width:",6,"px;aspect-ratio:1;margin:auto;color:",jl.theme.gray[400],";border:",3,"px solid currentColor;",Al,"[data-active-item] &{color:",jl.gray[900],";transform:scale( calc( 5 / 3 ) );}",Al,":not([data-active-item]):hover &{color:",jl.theme.accent,";}",Al,"[data-focus-visible] &{outline:1px solid ",jl.theme.accent,";outline-offset:1px;}@media not ( prefers-reduced-motion ){transition-property:color,transform;transition-duration:120ms;transition-timing-function:linear;}");function Ol({id:e,value:t,...n}){return(0,wt.jsx)(Yi,{text:hl[t],children:(0,wt.jsxs)(Dn.Item,{id:e,render:(0,wt.jsx)(Al,{...n,role:"gridcell"}),children:[(0,wt.jsx)(pl,{children:t}),(0,wt.jsx)(Dl,{role:"presentation"})]})})}const zl=function({className:e,disablePointerEvents:t=!0,size:r,width:o,height:i,style:a={},value:l="center",...c}){var u,d;return(0,wt.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:null!==(u=null!=r?r:o)&&void 0!==u?u:24,height:null!==(d=null!=r?r:i)&&void 0!==d?d:24,role:"presentation",className:s("component-alignment-matrix-control-icon",e),style:{pointerEvents:t?"none":void 0,...a},...c,children:ml.map(((e,t)=>{const r=function(e="center"){const t=gl(e);if(!t)return;const n=ml.indexOf(t);return n>-1?n:void 0}(l)===t?4:2;return(0,wt.jsx)(n.Rect,{x:1.5+t%3*7+(7-r)/2,y:1.5+7*Math.floor(t/3)+(7-r)/2,width:r,height:r,fill:"currentColor"},e)}))})};const Ll=Object.assign((function e({className:t,id:n,label:r=(0,a.__)("Alignment Matrix Control"),defaultValue:o="center center",value:i,onChange:u,width:d=92,...p}){const f=(0,l.useInstanceId)(e,"alignment-matrix-control",n),h=(0,c.useCallback)((e=>{const t=function(e,t){const n=t?.replace(e+"-","");return gl(n)}(f,e);t&&u?.(t)}),[f,u]),m=s("component-alignment-matrix-control",t);return(0,wt.jsx)(Dn,{defaultActiveId:vl(f,o),activeId:vl(f,i),setActiveId:h,rtl:(0,a.isRTL)(),render:(0,wt.jsx)(Nl,{...p,"aria-label":r,className:m,id:f,role:"grid",size:d}),children:fl.map(((e,t)=>(0,wt.jsx)(Dn.Row,{render:(0,wt.jsx)(Ml,{role:"row"}),children:e.map((e=>(0,wt.jsx)(Ol,{id:vl(f,e),value:e},e)))},t)))})}),{Icon:Object.assign(zl,{displayName:"AlignmentMatrixControl.Icon"})}),Fl=Ll;function Bl(e){return"appear"===e?"top":"left"}function Vl(e){if("loading"===e.type)return"components-animate__loading";const{type:t,origin:n=Bl(t)}=e;if("appear"===t){const[e,t="center"]=n.split(" ");return s("components-animate__appear",{["is-from-"+t]:"center"!==t,["is-from-"+e]:"middle"!==e})}return"slide-in"===t?s("components-animate__slide-in","is-from-"+n):void 0}const $l=function({type:e,options:t={},children:n}){return n({className:Vl({type:e,...t})})},Hl=(0,B.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Wl=(0,B.createContext)({}),Ul=(0,B.createContext)(null),Gl="undefined"!=typeof document,Kl=Gl?B.useLayoutEffect:B.useEffect,ql=(0,B.createContext)({strict:!1}),Yl=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Xl="data-"+Yl("framerAppearId"),Zl=!1,Ql=!1;class Jl{constructor(){this.order=[],this.scheduled=new Set}add(e){if(!this.scheduled.has(e))return this.scheduled.add(e),this.order.push(e),!0}remove(e){const t=this.order.indexOf(e);-1!==t&&(this.order.splice(t,1),this.scheduled.delete(e))}clear(){this.order.length=0,this.scheduled.clear()}}const ec=["read","resolveKeyframes","update","preRender","render","postRender"];function tc(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=ec.reduce(((e,t)=>(e[t]=function(e){let t=new Jl,n=new Jl,r=0,o=!1,i=!1;const s=new WeakSet,a={schedule:(e,i=!1,a=!1)=>{const l=a&&o,c=l?t:n;return i&&s.add(e),c.add(e)&&l&&o&&(r=t.order.length),e},cancel:e=>{n.remove(e),s.delete(e)},process:l=>{if(o)i=!0;else{if(o=!0,[t,n]=[n,t],n.clear(),r=t.order.length,r)for(let n=0;n<r;n++){const r=t.order[n];s.has(r)&&(a.schedule(r),e()),r(l)}o=!1,i&&(i=!1,a.process(l))}}};return a}((()=>n=!0)),e)),{}),s=e=>{i[e].process(o)},a=()=>{const i=Ql?o.timestamp:performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(i-o.timestamp,40),1),o.timestamp=i,o.isProcessing=!0,ec.forEach(s),o.isProcessing=!1,n&&t&&(r=!1,e(a))};return{schedule:ec.reduce(((t,s)=>{const l=i[s];return t[s]=(t,i=!1,s=!1)=>(n||(n=!0,r=!0,o.isProcessing||e(a)),l.schedule(t,i,s)),t}),{}),cancel:e=>ec.forEach((t=>i[t].cancel(e))),state:o,steps:i}}const{schedule:nc,cancel:rc}=tc(queueMicrotask,!1);function oc(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function ic(e,t,n){return(0,B.useCallback)((r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&("function"==typeof n?n(r):oc(n)&&(n.current=r))}),[t])}function sc(e){return"string"==typeof e||Array.isArray(e)}function ac(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}const lc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],cc=["initial",...lc];function uc(e){return ac(e.animate)||cc.some((t=>sc(e[t])))}function dc(e){return Boolean(uc(e)||e.variants)}function pc(e){const{initial:t,animate:n}=function(e,t){if(uc(e)){const{initial:t,animate:n}=e;return{initial:!1===t||sc(t)?t:void 0,animate:sc(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,(0,B.useContext)(Wl));return(0,B.useMemo)((()=>({initial:t,animate:n})),[fc(t),fc(n)])}function fc(e){return Array.isArray(e)?e.join(" "):e}const hc={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},mc={};for(const e in hc)mc[e]={isEnabled:t=>hc[e].some((e=>!!t[e]))};const gc=(0,B.createContext)({}),vc=(0,B.createContext)({}),bc=Symbol.for("motionComponentSymbol");function xc({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&function(e){for(const t in e)mc[t]={...mc[t],...e[t]}}(e);const i=(0,B.forwardRef)((function(i,s){let a;const l={...(0,B.useContext)(Hl),...i,layoutId:yc(i)},{isStatic:c}=l,u=pc(i),d=r(i,c);if(!c&&Gl){u.visualElement=function(e,t,n,r){const{visualElement:o}=(0,B.useContext)(Wl),i=(0,B.useContext)(ql),s=(0,B.useContext)(Ul),a=(0,B.useContext)(Hl).reducedMotion,l=(0,B.useRef)();r=r||i.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:o,props:n,presenceContext:s,blockInitialAnimation:!!s&&!1===s.initial,reducedMotionConfig:a}));const c=l.current;(0,B.useInsertionEffect)((()=>{c&&c.update(n,s)}));const u=(0,B.useRef)(Boolean(n[Xl]&&!window.HandoffComplete));return Kl((()=>{c&&(nc.render(c.render),u.current&&c.animationState&&c.animationState.animateChanges())})),(0,B.useEffect)((()=>{c&&(c.updateFeatures(),!u.current&&c.animationState&&c.animationState.animateChanges(),u.current&&(u.current=!1,window.HandoffComplete=!0))})),c}(o,d,l,t);const n=(0,B.useContext)(vc),r=(0,B.useContext)(ql).strict;u.visualElement&&(a=u.visualElement.loadFeatures(l,r,e,n))}return(0,wt.jsxs)(Wl.Provider,{value:u,children:[a&&u.visualElement?(0,wt.jsx)(a,{visualElement:u.visualElement,...l}):null,n(o,i,ic(d,u.visualElement,s),d,c,u.visualElement)]})}));return i[bc]=o,i}function yc({layoutId:e}){const t=(0,B.useContext)(gc).id;return t&&void 0!==e?t+"-"+e:e}function wc(e){function t(t,n={}){return xc(e(t,n))}if("undefined"==typeof Proxy)return t;const n=new Map;return new Proxy(t,{get:(e,r)=>(n.has(r)||n.set(r,t(r)),n.get(r))})}const _c=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Sc(e){return"string"==typeof e&&!e.includes("-")&&!!(_c.indexOf(e)>-1||/[A-Z]/u.test(e))}const Cc={};const kc=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],jc=new Set(kc);function Ec(e,{layout:t,layoutId:n}){return jc.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!Cc[e]||"opacity"===e)}const Pc=e=>Boolean(e&&e.getVelocity),Tc={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Rc=kc.length;const Ic=e=>t=>"string"==typeof t&&t.startsWith(e),Nc=Ic("--"),Mc=Ic("var(--"),Ac=e=>!!Mc(e)&&Dc.test(e.split("/*")[0].trim()),Dc=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Oc=(e,t)=>t&&"number"==typeof e?t.transform(e):e,zc=(e,t,n)=>n>t?t:n<e?e:n,Lc={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},Fc={...Lc,transform:e=>zc(0,1,e)},Bc={...Lc,default:1},Vc=e=>Math.round(1e5*e)/1e5,$c=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,Hc=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,Wc=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function Uc(e){return"string"==typeof e}const Gc=e=>({test:t=>Uc(t)&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),Kc=Gc("deg"),qc=Gc("%"),Yc=Gc("px"),Xc=Gc("vh"),Zc=Gc("vw"),Qc={...qc,parse:e=>qc.parse(e)/100,transform:e=>qc.transform(100*e)},Jc={...Lc,transform:Math.round},eu={borderWidth:Yc,borderTopWidth:Yc,borderRightWidth:Yc,borderBottomWidth:Yc,borderLeftWidth:Yc,borderRadius:Yc,radius:Yc,borderTopLeftRadius:Yc,borderTopRightRadius:Yc,borderBottomRightRadius:Yc,borderBottomLeftRadius:Yc,width:Yc,maxWidth:Yc,height:Yc,maxHeight:Yc,size:Yc,top:Yc,right:Yc,bottom:Yc,left:Yc,padding:Yc,paddingTop:Yc,paddingRight:Yc,paddingBottom:Yc,paddingLeft:Yc,margin:Yc,marginTop:Yc,marginRight:Yc,marginBottom:Yc,marginLeft:Yc,rotate:Kc,rotateX:Kc,rotateY:Kc,rotateZ:Kc,scale:Bc,scaleX:Bc,scaleY:Bc,scaleZ:Bc,skew:Kc,skewX:Kc,skewY:Kc,distance:Yc,translateX:Yc,translateY:Yc,translateZ:Yc,x:Yc,y:Yc,z:Yc,perspective:Yc,transformPerspective:Yc,opacity:Fc,originX:Qc,originY:Qc,originZ:Yc,zIndex:Jc,backgroundPositionX:Yc,backgroundPositionY:Yc,fillOpacity:Fc,strokeOpacity:Fc,numOctaves:Jc};function tu(e,t,n,r){const{style:o,vars:i,transform:s,transformOrigin:a}=e;let l=!1,c=!1,u=!0;for(const e in t){const n=t[e];if(Nc(e)){i[e]=n;continue}const r=eu[e],d=Oc(n,r);if(jc.has(e)){if(l=!0,s[e]=d,!u)continue;n!==(r.default||0)&&(u=!1)}else e.startsWith("origin")?(c=!0,a[e]=d):o[e]=d}if(t.transform||(l||r?o.transform=function(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,o){let i="";for(let t=0;t<Rc;t++){const n=kc[t];void 0!==e[n]&&(i+=`${Tc[n]||n}(${e[n]}) `)}return t&&!e.z&&(i+="translateZ(0)"),i=i.trim(),o?i=o(e,r?"":i):n&&r&&(i="none"),i}(e.transform,n,u,r):o.transform&&(o.transform="none")),c){const{originX:e="50%",originY:t="50%",originZ:n=0}=a;o.transformOrigin=`${e} ${t} ${n}`}}const nu=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ru(e,t,n){for(const r in t)Pc(t[r])||Ec(r,n)||(e[r]=t[r])}function ou(e,t,n){const r={};return ru(r,e.style||{},e),Object.assign(r,function({transformTemplate:e},t,n){return(0,B.useMemo)((()=>{const r=nu();return tu(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)}),[t])}(e,t,n)),r}function iu(e,t,n){const r={},o=ou(e,t,n);return e.drag&&!1!==e.dragListener&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=o,r}const su=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function au(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||su.has(e)}let lu=e=>!au(e);try{(cu=require("@emotion/is-prop-valid").default)&&(lu=e=>e.startsWith("on")?!au(e):cu(e))}catch(U){}var cu;function uu(e,t,n){return"string"==typeof e?e:Yc.transform(t+n*e)}const du={offset:"stroke-dashoffset",array:"stroke-dasharray"},pu={offset:"strokeDashoffset",array:"strokeDasharray"};function fu(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...c},u,d,p){if(tu(e,c,u,p),d)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:f,style:h,dimensions:m}=e;f.transform&&(m&&(h.transform=f.transform),delete f.transform),m&&(void 0!==o||void 0!==i||h.transform)&&(h.transformOrigin=function(e,t,n){return`${uu(t,e.x,e.width)} ${uu(n,e.y,e.height)}`}(m,void 0!==o?o:.5,void 0!==i?i:.5)),void 0!==t&&(f.x=t),void 0!==n&&(f.y=n),void 0!==r&&(f.scale=r),void 0!==s&&function(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?du:pu;e[i.offset]=Yc.transform(-r);const s=Yc.transform(t),a=Yc.transform(n);e[i.array]=`${s} ${a}`}(f,s,a,l,!1)}const hu=()=>({...nu(),attrs:{}}),mu=e=>"string"==typeof e&&"svg"===e.toLowerCase();function gu(e,t,n,r){const o=(0,B.useMemo)((()=>{const n=hu();return fu(n,t,{enableHardwareAcceleration:!1},mu(r),e.transformTemplate),{...n.attrs,style:{...n.style}}}),[t]);if(e.style){const t={};ru(t,e.style,e),o.style={...t,...o.style}}return o}function vu(e=!1){return(t,n,r,{latestValues:o},i)=>{const s=(Sc(t)?gu:iu)(n,o,i,t),a=function(e,t,n){const r={};for(const o in e)"values"===o&&"object"==typeof e.values||(lu(o)||!0===n&&au(o)||!t&&!au(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}(n,"string"==typeof t,e),l=t!==B.Fragment?{...a,...s,ref:r}:{},{children:c}=n,u=(0,B.useMemo)((()=>Pc(c)?c.get():c),[c]);return(0,B.createElement)(t,{...l,children:u})}}function bu(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const t in n)e.style.setProperty(t,n[t])}const xu=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function yu(e,t,n,r){bu(e,t,void 0,r);for(const n in t.attrs)e.setAttribute(xu.has(n)?n:Yl(n),t.attrs[n])}function wu(e,t,n){var r;const{style:o}=e,i={};for(const s in o)(Pc(o[s])||t.style&&Pc(t.style[s])||Ec(s,e)||void 0!==(null===(r=null==n?void 0:n.getValue(s))||void 0===r?void 0:r.liveStyle))&&(i[s]=o[s]);return i}function _u(e,t,n){const r=wu(e,t,n);for(const n in e)if(Pc(e[n])||Pc(t[n])){r[-1!==kc.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=e[n]}return r}function Su(e){const t=[{},{}];return null==e||e.values.forEach(((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()})),t}function Cu(e,t,n,r){if("function"==typeof t){const[o,i]=Su(r);t=t(void 0!==n?n:e.custom,o,i)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){const[o,i]=Su(r);t=t(void 0!==n?n:e.custom,o,i)}return t}function ku(e){const t=(0,B.useRef)(null);return null===t.current&&(t.current=e()),t.current}const ju=e=>Array.isArray(e),Eu=e=>Boolean(e&&"object"==typeof e&&e.mix&&e.toValue),Pu=e=>ju(e)?e[e.length-1]||0:e;function Tu(e){const t=Pc(e)?e.get():e;return Eu(t)?t.toValue():t}const Ru=e=>(t,n)=>{const r=(0,B.useContext)(Wl),o=(0,B.useContext)(Ul),i=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,o,i){const s={latestValues:Iu(r,o,i,e),renderState:t()};return n&&(s.mount=e=>n(r,e,s)),s}(e,t,r,o);return n?i():ku(i)};function Iu(e,t,n,r){const o={},i=r(e,{});for(const e in i)o[e]=Tu(i[e]);let{initial:s,animate:a}=e;const l=uc(e),c=dc(e);t&&c&&!l&&!1!==e.inherit&&(void 0===s&&(s=t.initial),void 0===a&&(a=t.animate));let u=!!n&&!1===n.initial;u=u||!1===s;const d=u?a:s;if(d&&"boolean"!=typeof d&&!ac(d)){(Array.isArray(d)?d:[d]).forEach((t=>{const n=Cu(e,t);if(!n)return;const{transitionEnd:r,transition:i,...s}=n;for(const e in s){let t=s[e];if(Array.isArray(t)){t=t[u?t.length-1:0]}null!==t&&(o[e]=t)}for(const e in r)o[e]=r[e]}))}return o}const Nu=e=>e,{schedule:Mu,cancel:Au,state:Du,steps:Ou}=tc("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:Nu,!0),zu={useVisualState:Ru({scrapeMotionValuesFromProps:_u,createRenderState:hu,onMount:(e,t,{renderState:n,latestValues:r})=>{Mu.read((()=>{try{n.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(e){n.dimensions={x:0,y:0,width:0,height:0}}})),Mu.render((()=>{fu(n,r,{enableHardwareAcceleration:!1},mu(t.tagName),e.transformTemplate),yu(t,n)}))}})},Lu={useVisualState:Ru({scrapeMotionValuesFromProps:wu,createRenderState:nu})};function Fu(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Bu=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function Vu(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const $u=e=>t=>Bu(t)&&e(t,Vu(t));function Hu(e,t,n,r){return Fu(e,t,$u(n),r)}const Wu=(e,t)=>n=>t(e(n)),Uu=(...e)=>e.reduce(Wu);function Gu(e){let t=null;return()=>{const n=()=>{t=null};return null===t&&(t=e,n)}}const Ku=Gu("dragHorizontal"),qu=Gu("dragVertical");function Yu(e){let t=!1;if("y"===e)t=qu();else if("x"===e)t=Ku();else{const e=Ku(),n=qu();e&&n?t=()=>{e(),n()}:(e&&e(),n&&n())}return t}function Xu(){const e=Yu(!0);return!e||(e(),!1)}class Zu{constructor(e){this.isMounted=!1,this.node=e}update(){}}function Qu(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd";return Hu(e.current,n,((n,o)=>{if("touch"===n.pointerType||Xu())return;const i=e.getProps();e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",t);const s=i[r];s&&Mu.postRender((()=>s(n,o)))}),{passive:!e.getProps()[r]})}const Ju=(e,t)=>!!t&&(e===t||Ju(e,t.parentElement));function ed(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Vu(n))}const td=new WeakMap,nd=new WeakMap,rd=e=>{const t=td.get(e.target);t&&t(e)},od=e=>{e.forEach(rd)};function id(e,t,n){const r=function({root:e,...t}){const n=e||document;nd.has(n)||nd.set(n,{});const r=nd.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(od,{root:e,...t})),r[o]}(t);return td.set(e,n),r.observe(e),()=>{td.delete(e),r.unobserve(e)}}const sd={some:0,all:1};const ad={inView:{Feature:class extends Zu{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:o}=e,i={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:sd[r]};return id(this.node.current,i,(e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,o&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),i=t?n:r;i&&i(e)}))}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends Zu{constructor(){super(...arguments),this.removeStartListeners=Nu,this.removeEndListeners=Nu,this.removeAccessibleListeners=Nu,this.startPointerPress=(e,t)=>{if(this.isPressing)return;this.removeEndListeners();const n=this.node.getProps(),r=Hu(window,"pointerup",((e,t)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:r,globalTapTarget:o}=this.node.getProps(),i=o||Ju(this.node.current,e.target)?n:r;i&&Mu.update((()=>i(e,t)))}),{passive:!(n.onTap||n.onPointerUp)}),o=Hu(window,"pointercancel",((e,t)=>this.cancelPress(e,t)),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=Uu(r,o),this.startPress(e,t)},this.startAccessiblePress=()=>{const e=Fu(this.node.current,"keydown",(e=>{if("Enter"!==e.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=Fu(this.node.current,"keyup",(e=>{"Enter"===e.key&&this.checkPressEnd()&&ed("up",((e,t)=>{const{onTap:n}=this.node.getProps();n&&Mu.postRender((()=>n(e,t)))}))})),ed("down",((e,t)=>{this.startPress(e,t)}))})),t=Fu(this.node.current,"blur",(()=>{this.isPressing&&ed("cancel",((e,t)=>this.cancelPress(e,t)))}));this.removeAccessibleListeners=Uu(e,t)}}startPress(e,t){this.isPressing=!0;const{onTapStart:n,whileTap:r}=this.node.getProps();r&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&Mu.postRender((()=>n(e,t)))}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;return this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Xu()}cancelPress(e,t){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&Mu.postRender((()=>n(e,t)))}mount(){const e=this.node.getProps(),t=Hu(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),n=Fu(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Uu(t,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends Zu{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Uu(Fu(this.node.current,"focus",(()=>this.onFocus())),Fu(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends Zu{mount(){this.unmount=Uu(Qu(this.node,!0),Qu(this.node,!1))}unmount(){}}}};function ld(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function cd(e,t,n){const r=e.getProps();return Cu(r,t,void 0!==n?n:r.custom,e)}const ud=e=>1e3*e,dd=e=>e/1e3,pd={type:"spring",stiffness:500,damping:25,restSpeed:10},fd={type:"keyframes",duration:.8},hd={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},md=(e,{keyframes:t})=>t.length>2?fd:jc.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:pd:hd;function gd(e,t){return e[t]||e.default||e}const vd=!1,bd=e=>null!==e;function xd(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(bd),i=t&&"loop"!==n&&t%2==1?0:o.length-1;return i&&void 0!==r?r:o[i]}let yd;function wd(){yd=void 0}const _d={now:()=>(void 0===yd&&_d.set(Du.isProcessing||Ql?Du.timestamp:performance.now()),yd),set:e=>{yd=e,queueMicrotask(wd)}},Sd=e=>/^0[^.\s]+$/u.test(e);let Cd=Nu,kd=Nu;const jd=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Ed=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Pd(e,t,n=1){kd(n<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=function(e){const t=Ed.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${null!=n?n:r}`,o]}(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const e=i.trim();return jd(e)?parseFloat(e):e}return Ac(o)?Pd(o,t,n+1):o}const Td=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Rd=e=>e===Lc||e===Yc,Id=(e,t)=>parseFloat(e.split(", ")[t]),Nd=(e,t)=>(n,{transform:r})=>{if("none"===r||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return Id(o[1],t);{const t=r.match(/^matrix\((.+)\)$/u);return t?Id(t[1],e):0}},Md=new Set(["x","y","z"]),Ad=kc.filter((e=>!Md.has(e)));const Dd={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Nd(4,13),y:Nd(5,14)};Dd.translateX=Dd.x,Dd.translateY=Dd.y;const Od=e=>t=>t.test(e),zd=[Lc,Yc,qc,Kc,Zc,Xc,{test:e=>"auto"===e,parse:e=>e}],Ld=e=>zd.find(Od(e)),Fd=new Set;let Bd=!1,Vd=!1;function $d(){if(Vd){const e=Array.from(Fd).filter((e=>e.needsMeasurement)),t=new Set(e.map((e=>e.element))),n=new Map;t.forEach((e=>{const t=function(e){const t=[];return Ad.forEach((n=>{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),t}(e);t.length&&(n.set(e,t),e.render())})),e.forEach((e=>e.measureInitialState())),t.forEach((e=>{e.render();const t=n.get(e);t&&t.forEach((([t,n])=>{var r;null===(r=e.getValue(t))||void 0===r||r.set(n)}))})),e.forEach((e=>e.measureEndState())),e.forEach((e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)}))}Vd=!1,Bd=!1,Fd.forEach((e=>e.complete())),Fd.clear()}function Hd(){Fd.forEach((e=>{e.readKeyframes(),e.needsMeasurement&&(Vd=!0)}))}class Wd{constructor(e,t,n,r,o,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=o,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Fd.add(this),Bd||(Bd=!0,Mu.read(Hd),Mu.resolveKeyframes($d))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;for(let o=0;o<e.length;o++)if(null===e[o])if(0===o){const o=null==r?void 0:r.get(),i=e[e.length-1];if(void 0!==o)e[0]=o;else if(n&&t){const r=n.readValue(t,i);null!=r&&(e[0]=r)}void 0===e[0]&&(e[0]=i),r&&void 0===o&&r.set(e[0])}else e[o]=e[o-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Fd.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Fd.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Ud=(e,t)=>n=>Boolean(Uc(n)&&Wc.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),Gd=(e,t,n)=>r=>{if(!Uc(r))return r;const[o,i,s,a]=r.match($c);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(s),alpha:void 0!==a?parseFloat(a):1}},Kd={...Lc,transform:e=>Math.round((e=>zc(0,255,e))(e))},qd={test:Ud("rgb","red"),parse:Gd("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Kd.transform(e)+", "+Kd.transform(t)+", "+Kd.transform(n)+", "+Vc(Fc.transform(r))+")"};const Yd={test:Ud("#"),parse:function(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:qd.transform},Xd={test:Ud("hsl","hue"),parse:Gd("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+qc.transform(Vc(t))+", "+qc.transform(Vc(n))+", "+Vc(Fc.transform(r))+")"},Zd={test:e=>qd.test(e)||Yd.test(e)||Xd.test(e),parse:e=>qd.test(e)?qd.parse(e):Xd.test(e)?Xd.parse(e):Yd.parse(e),transform:e=>Uc(e)?e:e.hasOwnProperty("red")?qd.transform(e):Xd.transform(e)};const Qd="number",Jd="color",ep="var",tp="var(",np="${}",rp=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function op(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const s=t.replace(rp,(e=>(Zd.test(e)?(r.color.push(i),o.push(Jd),n.push(Zd.parse(e))):e.startsWith(tp)?(r.var.push(i),o.push(ep),n.push(e)):(r.number.push(i),o.push(Qd),n.push(parseFloat(e))),++i,np))).split(np);return{values:n,split:s,indexes:r,types:o}}function ip(e){return op(e).values}function sp(e){const{split:t,types:n}=op(e),r=t.length;return e=>{let o="";for(let i=0;i<r;i++)if(o+=t[i],void 0!==e[i]){const t=n[i];o+=t===Qd?Vc(e[i]):t===Jd?Zd.transform(e[i]):e[i]}return o}}const ap=e=>"number"==typeof e?0:e;const lp={test:function(e){var t,n;return isNaN(e)&&Uc(e)&&((null===(t=e.match($c))||void 0===t?void 0:t.length)||0)+((null===(n=e.match(Hc))||void 0===n?void 0:n.length)||0)>0},parse:ip,createTransformer:sp,getAnimatableNone:function(e){const t=ip(e);return sp(e)(t.map(ap))}},cp=new Set(["brightness","contrast","saturate","opacity"]);function up(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match($c)||[];if(!r)return e;const o=n.replace(r,"");let i=cp.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const dp=/\b([a-z-]*)\(.*?\)/gu,pp={...lp,getAnimatableNone:e=>{const t=e.match(dp);return t?t.map(up).join(" "):e}},fp={...eu,color:Zd,backgroundColor:Zd,outlineColor:Zd,fill:Zd,stroke:Zd,borderColor:Zd,borderTopColor:Zd,borderRightColor:Zd,borderBottomColor:Zd,borderLeftColor:Zd,filter:pp,WebkitFilter:pp},hp=e=>fp[e];function mp(e,t){let n=hp(e);return n!==pp&&(n=lp),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const gp=new Set(["auto","none","0"]);class vp extends Wd{constructor(e,t,n,r){super(e,t,n,r,null==r?void 0:r.owner,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:n}=this;if(!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){const r=e[n];if("string"==typeof r&&Ac(r)){const o=Pd(r,t.current);void 0!==o&&(e[n]=o),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!Td.has(n)||2!==e.length)return;const[r,o]=e,i=Ld(r),s=Ld(o);if(i!==s)if(Rd(i)&&Rd(s))for(let t=0;t<e.length;t++){const n=e[t];"string"==typeof n&&(e[t]=parseFloat(n))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)("number"==typeof(r=e[t])?0===r:null===r||"none"===r||"0"===r||Sd(r))&&n.push(t);var r;n.length&&function(e,t,n){let r,o=0;for(;o<e.length&&!r;){const t=e[o];"string"==typeof t&&!gp.has(t)&&op(t).values.length&&(r=e[o]),o++}if(r&&n)for(const o of t)e[o]=mp(n,r)}(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Dd[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const r=t[t.length-1];void 0!==r&&e.getValue(n,r).jump(r,!1)}measureEndState(){var e;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const i=r.length-1,s=r[i];r[i]=Dd[n](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==s&&void 0===this.finalKeyframe&&(this.finalKeyframe=s),(null===(e=this.removedTransforms)||void 0===e?void 0:e.length)&&this.removedTransforms.forEach((([e,n])=>{t.getValue(e).set(n)})),this.resolveNoneKeyframes()}}const bp=(e,t)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!lp.test(e)&&"0"!==e||e.startsWith("url(")));class xp{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i="loop",...s}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.options={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:o,repeatType:i,...s},this.updateFinishedPromise()}get resolved(){return this._resolved||this.hasAttemptedResolve||(Hd(),$d()),this._resolved}onKeyframesResolved(e,t){this.hasAttemptedResolve=!0;const{name:n,type:r,velocity:o,delay:i,onComplete:s,onUpdate:a,isGenerator:l}=this.options;if(!l&&!function(e,t,n,r){const o=e[0];if(null===o)return!1;if("display"===t||"visibility"===t)return!0;const i=e[e.length-1],s=bp(o,t),a=bp(i,t);return Cd(s===a,`You are trying to animate ${t} from "${o}" to "${i}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${i} via the \`style\` property.`),!(!s||!a)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||"spring"===n&&r)}(e,n,r,o)){if(vd||!i)return null==a||a(xd(e,this.options,t)),null==s||s(),void this.resolveFinishedPromise();this.options.duration=0}const c=this.initPlayback(e,t);!1!==c&&(this._resolved={keyframes:e,finalKeyframe:t,...c},this.onPostResolved())}onPostResolved(){}then(e,t){return this.currentFinishedPromise.then(e,t)}updateFinishedPromise(){this.currentFinishedPromise=new Promise((e=>{this.resolveFinishedPromise=e}))}}function yp(e,t){return t?e*(1e3/t):0}const wp=5;function _p(e,t,n){const r=Math.max(t-wp,0);return yp(n-e(r),t-r)}const Sp=.001,Cp=.01,kp=10,jp=.05,Ep=1;function Pp({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,i;Cd(e<=ud(kp),"Spring duration must be 10 seconds or less");let s=1-t;s=zc(jp,Ep,s),e=zc(Cp,kp,dd(e)),s<1?(o=t=>{const r=t*s,o=r*e,i=r-n,a=Rp(t,s),l=Math.exp(-o);return Sp-i/a*l},i=t=>{const r=t*s*e,i=r*n+n,a=Math.pow(s,2)*Math.pow(t,2)*e,l=Math.exp(-r),c=Rp(Math.pow(t,2),s);return(-o(t)+Sp>0?-1:1)*((i-a)*l)/c}):(o=t=>Math.exp(-t*e)*((t-n)*e+1)-Sp,i=t=>Math.exp(-t*e)*(e*e*(n-t)));const a=function(e,t,n){let r=n;for(let n=1;n<Tp;n++)r-=e(r)/t(r);return r}(o,i,5/e);if(e=ud(e),isNaN(a))return{stiffness:100,damping:10,duration:e};{const t=Math.pow(a,2)*r;return{stiffness:t,damping:2*s*Math.sqrt(r*t),duration:e}}}const Tp=12;function Rp(e,t){return e*Math.sqrt(1-t*t)}const Ip=["duration","bounce"],Np=["stiffness","damping","mass"];function Mp(e,t){return t.some((t=>void 0!==e[t]))}function Ap({keyframes:e,restDelta:t,restSpeed:n,...r}){const o=e[0],i=e[e.length-1],s={done:!1,value:o},{stiffness:a,damping:l,mass:c,duration:u,velocity:d,isResolvedFromDuration:p}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!Mp(e,Np)&&Mp(e,Ip)){const n=Pp(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}({...r,velocity:-dd(r.velocity||0)}),f=d||0,h=l/(2*Math.sqrt(a*c)),m=i-o,g=dd(Math.sqrt(a/c)),v=Math.abs(m)<5;let b;if(n||(n=v?.01:2),t||(t=v?.005:.5),h<1){const e=Rp(g,h);b=t=>{const n=Math.exp(-h*g*t);return i-n*((f+h*g*m)/e*Math.sin(e*t)+m*Math.cos(e*t))}}else if(1===h)b=e=>i-Math.exp(-g*e)*(m+(f+g*m)*e);else{const e=g*Math.sqrt(h*h-1);b=t=>{const n=Math.exp(-h*g*t),r=Math.min(e*t,300);return i-n*((f+h*g*m)*Math.sinh(r)+e*m*Math.cosh(r))/e}}return{calculatedDuration:p&&u||null,next:e=>{const r=b(e);if(p)s.done=e>=u;else{let o=f;0!==e&&(o=h<1?_p(b,e,r):0);const a=Math.abs(o)<=n,l=Math.abs(i-r)<=t;s.done=a&&l}return s.value=s.done?i:r,s}}}function Dp({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:s,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],p={done:!1,value:d},f=e=>void 0===a?l:void 0===l||Math.abs(a-e)<Math.abs(l-e)?a:l;let h=n*t;const m=d+h,g=void 0===s?m:s(m);g!==m&&(h=g-d);const v=e=>-h*Math.exp(-e/r),b=e=>g+v(e),x=e=>{const t=v(e),n=b(e);p.done=Math.abs(t)<=c,p.value=p.done?g:n};let y,w;const _=e=>{(e=>void 0!==a&&e<a||void 0!==l&&e>l)(p.value)&&(y=e,w=Ap({keyframes:[p.value,f(p.value)],velocity:_p(b,e,p.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return _(0),{calculatedDuration:null,next:e=>{let t=!1;return w||void 0!==y||(t=!0,x(e),_(e)),void 0!==y&&e>=y?w.next(e-y):(!t&&x(e),p)}}}const Op=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,zp=1e-7,Lp=12;function Fp(e,t,n,r){if(e===t&&n===r)return Nu;const o=t=>function(e,t,n,r,o){let i,s,a=0;do{s=t+(n-t)/2,i=Op(s,r,o)-e,i>0?n=s:t=s}while(Math.abs(i)>zp&&++a<Lp);return s}(t,0,1,e,n);return e=>0===e||1===e?e:Op(o(e),t,r)}const Bp=Fp(.42,0,1,1),Vp=Fp(0,0,.58,1),$p=Fp(.42,0,.58,1),Hp=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Wp=e=>t=>1-e(1-t),Up=e=>1-Math.sin(Math.acos(e)),Gp=Wp(Up),Kp=Hp(Up),qp=Fp(.33,1.53,.69,.99),Yp=Wp(qp),Xp=Hp(Yp),Zp={linear:Nu,easeIn:Bp,easeInOut:$p,easeOut:Vp,circIn:Up,circInOut:Kp,circOut:Gp,backIn:Yp,backInOut:Xp,backOut:qp,anticipate:e=>(e*=2)<1?.5*Yp(e):.5*(2-Math.pow(2,-10*(e-1)))},Qp=e=>{if(Array.isArray(e)){kd(4===e.length,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return Fp(t,n,r,o)}return"string"==typeof e?(kd(void 0!==Zp[e],`Invalid easing type '${e}'`),Zp[e]):e},Jp=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r},ef=(e,t,n)=>e+(t-e)*n;function tf(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}const nf=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},rf=[Yd,qd,Xd];function of(e){const t=(e=>rf.find((t=>t.test(e))))(e);kd(Boolean(t),`'${e}' is not an animatable color. Use the equivalent color code instead.`);let n=t.parse(e);return t===Xd&&(n=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let o=0,i=0,s=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,a=2*n-r;o=tf(a,r,e+1/3),i=tf(a,r,e),s=tf(a,r,e-1/3)}else o=i=s=n;return{red:Math.round(255*o),green:Math.round(255*i),blue:Math.round(255*s),alpha:r}}(n)),n}const sf=(e,t)=>{const n=of(e),r=of(t),o={...n};return e=>(o.red=nf(n.red,r.red,e),o.green=nf(n.green,r.green,e),o.blue=nf(n.blue,r.blue,e),o.alpha=ef(n.alpha,r.alpha,e),qd.transform(o))},af=new Set(["none","hidden"]);function lf(e,t){return n=>n>0?t:e}function cf(e,t){return n=>ef(e,t,n)}function uf(e){return"number"==typeof e?cf:"string"==typeof e?Ac(e)?lf:Zd.test(e)?sf:ff:Array.isArray(e)?df:"object"==typeof e?Zd.test(e)?sf:pf:lf}function df(e,t){const n=[...e],r=n.length,o=e.map(((e,n)=>uf(e)(e,t[n])));return e=>{for(let t=0;t<r;t++)n[t]=o[t](e);return n}}function pf(e,t){const n={...e,...t},r={};for(const o in n)void 0!==e[o]&&void 0!==t[o]&&(r[o]=uf(e[o])(e[o],t[o]));return e=>{for(const t in r)n[t]=r[t](e);return n}}const ff=(e,t)=>{const n=lp.createTransformer(t),r=op(e),o=op(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?af.has(e)&&!o.values.length||af.has(t)&&!r.values.length?function(e,t){return af.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):Uu(df(function(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const s=t.types[i],a=e.indexes[s][o[s]],l=null!==(n=e.values[a])&&void 0!==n?n:0;r[i]=l,o[s]++}return r}(r,o),o.values),n):(Cd(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),lf(e,t))};function hf(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return ef(e,t,n);return uf(e)(e,t)}function mf(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(kd(i===t.length,"Both input and output ranges must be the same length"),1===i)return()=>t[0];if(2===i&&e[0]===e[1])return()=>t[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=function(e,t,n){const r=[],o=n||hf,i=e.length-1;for(let n=0;n<i;n++){let i=o(e[n],e[n+1]);if(t){const e=Array.isArray(t)?t[n]||Nu:t;i=Uu(e,i)}r.push(i)}return r}(t,r,o),a=s.length,l=t=>{let n=0;if(a>1)for(;n<e.length-2&&!(t<e[n+1]);n++);const r=Jp(e[n],e[n+1],t);return s[n](r)};return n?t=>l(zc(e[0],e[i-1],t)):l}function gf(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Jp(0,t,r);e.push(ef(n,1,o))}}(t,e.length-1),t}function vf({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=(e=>Array.isArray(e)&&"number"!=typeof e[0])(r)?r.map(Qp):Qp(r),i={done:!1,value:t[0]},s=function(e,t){return e.map((e=>e*t))}(n&&n.length===t.length?n:gf(t),e),a=mf(s,t,{ease:Array.isArray(o)?o:(l=t,c=o,l.map((()=>c||$p)).splice(0,l.length-1))});var l,c;return{calculatedDuration:e,next:t=>(i.value=a(t),i.done=t>=e,i)}}const bf=e=>{const t=({timestamp:t})=>e(t);return{start:()=>Mu.update(t,!0),stop:()=>Au(t),now:()=>Du.isProcessing?Du.timestamp:_d.now()}},xf={decay:Dp,inertia:Dp,tween:vf,keyframes:vf,spring:Ap},yf=e=>e/100;class wf extends xp{constructor({KeyframeResolver:e=Wd,...t}){super(t),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();const{onStop:e}=this.options;e&&e()};const{name:n,motionValue:r,keyframes:o}=this.options,i=(e,t)=>this.onKeyframesResolved(e,t);n&&r&&r.owner?this.resolver=r.owner.resolveKeyframes(o,i,n,r):this.resolver=new e(o,i,n,r),this.resolver.scheduleResolve()}initPlayback(e){const{type:t="keyframes",repeat:n=0,repeatDelay:r=0,repeatType:o,velocity:i=0}=this.options,s=xf[t]||vf;let a,l;s!==vf&&"number"!=typeof e[0]&&(a=Uu(yf,hf(e[0],e[1])),e=[0,100]);const c=s({...this.options,keyframes:e});"mirror"===o&&(l=s({...this.options,keyframes:[...e].reverse(),velocity:-i})),null===c.calculatedDuration&&(c.calculatedDuration=function(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}(c));const{calculatedDuration:u}=c,d=u+r;return{generator:c,mirroredGenerator:l,mapPercentToKeyframes:a,calculatedDuration:u,resolvedDuration:d,totalDuration:d*(n+1)-r}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&e?this.state=this.pendingPlayState:this.pause()}tick(e,t=!1){const{resolved:n}=this;if(!n){const{keyframes:e}=this.options;return{done:!0,value:e[e.length-1]}}const{finalKeyframe:r,generator:o,mirroredGenerator:i,mapPercentToKeyframes:s,keyframes:a,calculatedDuration:l,totalDuration:c,resolvedDuration:u}=n;if(null===this.startTime)return o.next(0);const{delay:d,repeat:p,repeatType:f,repeatDelay:h,onUpdate:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-c/this.speed,this.startTime)),t?this.currentTime=e:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const g=this.currentTime-d*(this.speed>=0?1:-1),v=this.speed>=0?g<0:g>c;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=c);let b=this.currentTime,x=o;if(p){const e=Math.min(this.currentTime,c)/u;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,p+1);Boolean(t%2)&&("reverse"===f?(n=1-n,h&&(n-=h/u)):"mirror"===f&&(x=i)),b=zc(0,1,n)*u}const y=v?{done:!1,value:a[0]}:x.next(b);s&&(y.value=s(y.value));let{done:w}=y;v||null===l||(w=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const _=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return _&&void 0!==r&&(y.value=xd(a,this.options,r)),m&&m(y.value),_&&this.finish(),y}get duration(){const{resolved:e}=this;return e?dd(e.calculatedDuration):0}get time(){return dd(this.currentTime)}set time(e){e=ud(e),this.currentTime=e,null!==this.holdTime||0===this.speed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=dd(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:e=bf,onPlay:t}=this.options;this.driver||(this.driver=e((e=>this.tick(e)))),t&&t();const n=this.driver.now();null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime&&"finished"!==this.state||(this.startTime=n),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;this._resolved?(this.state="paused",this.holdTime=null!==(e=this.currentTime)&&void 0!==e?e:0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const _f=e=>Array.isArray(e)&&"number"==typeof e[0];function Sf(e){return Boolean(!e||"string"==typeof e&&e in kf||_f(e)||Array.isArray(e)&&e.every(Sf))}const Cf=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,kf={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Cf([0,.65,.55,1]),circOut:Cf([.55,0,1,.45]),backIn:Cf([.31,.01,.66,-.59]),backOut:Cf([.33,1.53,.69,.99])};function jf(e){return Ef(e)||kf.easeOut}function Ef(e){return e?_f(e)?Cf(e):Array.isArray(e)?e.map(jf):kf[e]:void 0}const Pf=function(e){let t;return()=>(void 0===t&&(t=e()),t)}((()=>Object.hasOwnProperty.call(Element.prototype,"animate"))),Tf=new Set(["opacity","clipPath","filter","transform"]);class Rf extends xp{constructor(e){super(e);const{name:t,motionValue:n,keyframes:r}=this.options;this.resolver=new vp(r,((e,t)=>this.onKeyframesResolved(e,t)),t,n),this.resolver.scheduleResolve()}initPlayback(e,t){var n;let{duration:r=300,times:o,ease:i,type:s,motionValue:a,name:l}=this.options;if(!(null===(n=a.owner)||void 0===n?void 0:n.current))return!1;if(function(e){return"spring"===e.type||"backgroundColor"===e.name||!Sf(e.ease)}(this.options)){const{onComplete:t,onUpdate:n,motionValue:a,...l}=this.options,c=function(e,t){const n=new wf({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let i=0;for(;!r.done&&i<2e4;)r=n.sample(i),o.push(r.value),i+=10;return{times:void 0,keyframes:o,duration:i-10,ease:"linear"}}(e,l);1===(e=c.keyframes).length&&(e[1]=e[0]),r=c.duration,o=c.times,i=c.ease,s="keyframes"}const c=function(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:s="loop",ease:a,times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=Ef(a);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:"reverse"===s?"alternate":"normal"})}(a.owner.current,l,e,{...this.options,duration:r,times:o,ease:i});return c.startTime=_d.now(),this.pendingTimeline?(c.timeline=this.pendingTimeline,this.pendingTimeline=void 0):c.onfinish=()=>{const{onComplete:n}=this.options;a.set(xd(e,this.options,t)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:c,duration:r,times:o,type:s,ease:i,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:t}=e;return dd(t)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:t}=e;return dd(t.currentTime||0)}set time(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.currentTime=ud(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:t}=e;return t.playbackRate}set speed(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:t}=e;return t.playState}attachTimeline(e){if(this._resolved){const{resolved:t}=this;if(!t)return Nu;const{animation:n}=t;n.timeline=e,n.onfinish=null}else this.pendingTimeline=e;return Nu}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:t}=e;"finished"===t.playState&&this.updateFinishedPromise(),t.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:t}=e;t.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;const{resolved:e}=this;if(!e)return;const{animation:t,keyframes:n,duration:r,type:o,ease:i,times:s}=e;if("idle"!==t.playState&&"finished"!==t.playState){if(this.time){const{motionValue:e,onUpdate:t,onComplete:a,...l}=this.options,c=new wf({...l,keyframes:n,duration:r,type:o,ease:i,times:s,isGenerator:!0}),u=ud(this.time);e.setWithVelocity(c.sample(u-10).value,c.sample(u).value,10)}this.cancel()}}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:i,type:s}=e;return Pf()&&n&&Tf.has(n)&&t&&t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate&&!r&&"mirror"!==o&&0!==i&&"inertia"!==s}}const If=(e,t,n,r={},o,i)=>s=>{const a=gd(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c-=ud(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:e=>{t.set(e),a.onUpdate&&a.onUpdate(e)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:i?void 0:o};(function({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:s,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length})(a)||(u={...u,...md(e,u)}),u.duration&&(u.duration=ud(u.duration)),u.repeatDelay&&(u.repeatDelay=ud(u.repeatDelay)),void 0!==u.from&&(u.keyframes[0]=u.from);let d=!1;if((!1===u.type||0===u.duration&&!u.repeatDelay)&&(u.duration=0,0===u.delay&&(d=!0)),(vd||Zl)&&(d=!0,u.duration=0,u.delay=0),d&&!i&&void 0!==t.get()){const e=xd(u.keyframes,a);if(void 0!==e)return void Mu.update((()=>{u.onUpdate(e),u.onComplete()}))}return!i&&Rf.supports(u)?new Rf(u):new wf(u)};function Nf(e){return Boolean(Pc(e)&&e.add)}function Mf(e,t){-1===e.indexOf(t)&&e.push(t)}function Af(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Df{constructor(){this.subscriptions=[]}add(e){return Mf(this.subscriptions,e),()=>Af(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let o=0;o<r;o++){const r=this.subscriptions[o];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Of={current:void 0};class zf{constructor(e,t={}){this.version="11.2.6",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(e,t=!0)=>{const n=_d.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){var t;this.current=e,this.updatedAt=_d.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t))))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new Df);const n=this.events[e].add(t);return"change"===e?()=>{n(),Mu.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return Of.current&&Of.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=_d.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return yp(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise((t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()})).then((()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()}))}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Lf(e,t){return new zf(e,t)}function Ff(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Lf(n))}function Bf({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function Vf(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var i;let{transition:s=e.getDefaultTransition(),transitionEnd:a,...l}=t;const c=e.getValue("willChange");r&&(s=r);const u=[],d=o&&e.animationState&&e.animationState.getState()[o];for(const t in l){const r=e.getValue(t,null!==(i=e.latestValues[t])&&void 0!==i?i:null),o=l[t];if(void 0===o||d&&Bf(d,t))continue;const a={delay:n,elapsed:0,...gd(s||{},t)};let p=!1;if(window.HandoffAppearAnimations){const n=e.getProps()[Xl];if(n){const e=window.HandoffAppearAnimations(n,t,r,Mu);null!==e&&(a.elapsed=e,p=!0)}}r.start(If(t,r,o,e.shouldReduceMotion&&jc.has(t)?{type:!1}:a,e,p));const f=r.animation;f&&(Nf(c)&&(c.add(t),f.then((()=>c.remove(t)))),u.push(f))}return a&&Promise.all(u).then((()=>{Mu.update((()=>{a&&function(e,t){const n=cd(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const t in i)Ff(e,t,Pu(i[t]))}(e,a)}))})),u}function $f(e,t,n={}){var r;const o=cd(e,t,"exit"===n.type?null===(r=e.presenceContext)||void 0===r?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const s=o?()=>Promise.all(Vf(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(r=0)=>{const{delayChildren:o=0,staggerChildren:s,staggerDirection:a}=i;return function(e,t,n=0,r=0,o=1,i){const s=[],a=(e.variantChildren.size-1)*r,l=1===o?(e=0)=>e*r:(e=0)=>a-e*r;return Array.from(e.variantChildren).sort(Hf).forEach(((e,r)=>{e.notify("AnimationStart",t),s.push($f(e,t,{...i,delay:n+l(r)}).then((()=>e.notify("AnimationComplete",t))))})),Promise.all(s)}(e,t,o+r,s,a,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[e,t]="beforeChildren"===l?[s,a]:[a,s];return e().then((()=>t()))}return Promise.all([s(),a(n.delay)])}function Hf(e,t){return e.sortNodePosition(t)}const Wf=[...lc].reverse(),Uf=lc.length;function Gf(e){return t=>Promise.all(t.map((({animation:t,options:n})=>function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){const o=t.map((t=>$f(e,t,n)));r=Promise.all(o)}else if("string"==typeof t)r=$f(e,t,n);else{const o="function"==typeof t?cd(e,t,n.custom):t;r=Promise.all(Vf(e,o,n))}return r.then((()=>{Mu.postRender((()=>{e.notify("AnimationComplete",t)}))}))}(e,t,n))))}function Kf(e){let t=Gf(e);const n={animate:Yf(!0),whileInView:Yf(),whileHover:Yf(),whileTap:Yf(),whileDrag:Yf(),whileFocus:Yf(),exit:Yf()};let r=!0;const o=t=>(n,r)=>{var o;const i=cd(e,r,"exit"===t?null===(o=e.presenceContext)||void 0===o?void 0:o.custom:void 0);if(i){const{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function i(i){const s=e.getProps(),a=e.getVariantContext(!0)||{},l=[],c=new Set;let u={},d=1/0;for(let t=0;t<Uf;t++){const p=Wf[t],f=n[p],h=void 0!==s[p]?s[p]:a[p],m=sc(h),g=p===i?f.isActive:null;!1===g&&(d=t);let v=h===a[p]&&h!==s[p]&&m;if(v&&r&&e.manuallyAnimateOnMount&&(v=!1),f.protectedKeys={...u},!f.isActive&&null===g||!h&&!f.prevProp||ac(h)||"boolean"==typeof h)continue;let b=qf(f.prevProp,h)||p===i&&f.isActive&&!v&&m||t>d&&m,x=!1;const y=Array.isArray(h)?h:[h];let w=y.reduce(o(p),{});!1===g&&(w={});const{prevResolvedValues:_={}}=f,S={..._,...w},C=t=>{b=!0,c.has(t)&&(x=!0,c.delete(t)),f.needsAnimating[t]=!0;const n=e.getValue(t);n&&(n.liveStyle=!1)};for(const e in S){const t=w[e],n=_[e];if(u.hasOwnProperty(e))continue;let r=!1;r=ju(t)&&ju(n)?!ld(t,n):t!==n,r?null!=t?C(e):c.add(e):void 0!==t&&c.has(e)?C(e):f.protectedKeys[e]=!0}f.prevProp=h,f.prevResolvedValues=w,f.isActive&&(u={...u,...w}),r&&e.blockInitialAnimation&&(b=!1),!b||v&&!x||l.push(...y.map((e=>({animation:e,options:{type:p}}))))}if(c.size){const t={};c.forEach((n=>{const r=e.getBaseTarget(n),o=e.getValue(n);o&&(o.liveStyle=!0),t[n]=null!=r?r:null})),l.push({animation:t})}let p=Boolean(l.length);return!r||!1!==s.initial&&s.initial!==s.animate||e.manuallyAnimateOnMount||(p=!1),r=!1,p?t(l):Promise.resolve()}return{animateChanges:i,setActive:function(t,r){var o;if(n[t].isActive===r)return Promise.resolve();null===(o=e.variantChildren)||void 0===o||o.forEach((e=>{var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,r)})),n[t].isActive=r;const s=i(t);for(const e in n)n[e].protectedKeys={};return s},setAnimateFunction:function(n){t=n(e)},getState:()=>n}}function qf(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!ld(t,e)}function Yf(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}let Xf=0;const Zf={animation:{Feature:class extends Zu{constructor(e){super(e),e.animationState||(e.animationState=Kf(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),ac(e)&&(this.unmount=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){}}},exit:{Feature:class extends Zu{constructor(){super(...arguments),this.id=Xf++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;const r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then((()=>t(this.id)))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}}},Qf=(e,t)=>Math.abs(e-t);class Jf{constructor(e,t,{transformPagePoint:n,contextWindow:r,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const e=nh(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=Qf(e.x,t.x),r=Qf(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;const{point:r}=e,{timestamp:o}=Du;this.history.push({...r,timestamp:o});const{onStart:i,onMove:s}=this.handlers;t||(i&&i(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),s&&s(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=eh(t,this.transformPagePoint),Mu.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:r,resumeAnimation:o}=this.handlers;if(this.dragSnapToOrigin&&o&&o(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const i=nh("pointercancel"===e.type?this.lastMoveEventInfo:eh(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,i),r&&r(e,i)},!Bu(e))return;this.dragSnapToOrigin=o,this.handlers=t,this.transformPagePoint=n,this.contextWindow=r||window;const i=eh(Vu(e),this.transformPagePoint),{point:s}=i,{timestamp:a}=Du;this.history=[{...s,timestamp:a}];const{onSessionStart:l}=t;l&&l(e,nh(i,this.history)),this.removeListeners=Uu(Hu(this.contextWindow,"pointermove",this.handlePointerMove),Hu(this.contextWindow,"pointerup",this.handlePointerUp),Hu(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Au(this.updatePoint)}}function eh(e,t){return t?{point:t(e.point)}:e}function th(e,t){return{x:e.x-t.x,y:e.y-t.y}}function nh({point:e},t){return{point:e,delta:th(e,oh(t)),offset:th(e,rh(t)),velocity:ih(t,.1)}}function rh(e){return e[0]}function oh(e){return e[e.length-1]}function ih(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=oh(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>ud(t)));)n--;if(!r)return{x:0,y:0};const i=dd(o.timestamp-r.timestamp);if(0===i)return{x:0,y:0};const s={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function sh(e){return e.max-e.min}function ah(e,t=0,n=.01){return Math.abs(e-t)<=n}function lh(e,t,n,r=.5){e.origin=r,e.originPoint=ef(t.min,t.max,e.origin),e.scale=sh(n)/sh(t),(ah(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=ef(n.min,n.max,e.origin)-e.originPoint,(ah(e.translate)||isNaN(e.translate))&&(e.translate=0)}function ch(e,t,n,r){lh(e.x,t.x,n.x,r?r.originX:void 0),lh(e.y,t.y,n.y,r?r.originY:void 0)}function uh(e,t,n){e.min=n.min+t.min,e.max=e.min+sh(t)}function dh(e,t,n){e.min=t.min-n.min,e.max=e.min+sh(t)}function ph(e,t,n){dh(e.x,t.x,n.x),dh(e.y,t.y,n.y)}function fh(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function hh(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}const mh=.35;function gh(e,t,n){return{min:vh(e,t),max:vh(e,n)}}function vh(e,t){return"number"==typeof e?e:e[t]||0}const bh=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),xh=()=>({x:{min:0,max:0},y:{min:0,max:0}});function yh(e){return[e("x"),e("y")]}function wh({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function _h(e){return void 0===e||1===e}function Sh({scale:e,scaleX:t,scaleY:n}){return!_h(e)||!_h(t)||!_h(n)}function Ch(e){return Sh(e)||kh(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function kh(e){return jh(e.x)||jh(e.y)}function jh(e){return e&&"0%"!==e}function Eh(e,t,n){return n+t*(e-n)}function Ph(e,t,n,r,o){return void 0!==o&&(e=Eh(e,o,r)),Eh(e,n,r)+t}function Th(e,t=0,n=1,r,o){e.min=Ph(e.min,t,n,r,o),e.max=Ph(e.max,t,n,r,o)}function Rh(e,{x:t,y:n}){Th(e.x,t.translate,t.scale,t.originPoint),Th(e.y,n.translate,n.scale,n.originPoint)}function Ih(e){return Number.isInteger(e)||e>1.0000000000001||e<.999999999999?e:1}function Nh(e,t){e.min=e.min+t,e.max=e.max+t}function Mh(e,t,[n,r,o]){const i=void 0!==t[o]?t[o]:.5,s=ef(e.min,e.max,i);Th(e,t[n],t[r],s,t.scale)}const Ah=["x","scaleX","originX"],Dh=["y","scaleY","originY"];function Oh(e,t){Mh(e.x,t,Ah),Mh(e.y,t,Dh)}function zh(e,t){return wh(function(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}const Lh=({current:e})=>e?e.ownerDocument.defaultView:null,Fh=new WeakMap;class Bh{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=xh(),this.visualElement=e}start(e,{snapToCursor:t=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:r}=this.getProps();this.panSession=new Jf(e,{onSessionStart:e=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(Vu(e,"page").point)},onStart:(e,t)=>{const{drag:n,dragPropagation:r,onDragStart:o}=this.getProps();if(n&&!r&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Yu(n),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),yh((e=>{let t=this.getAxisMotionValue(e).get()||0;if(qc.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];if(r){t=sh(r)*(parseFloat(t)/100)}}}this.originPoint[e]=t})),o&&Mu.postRender((()=>o(e,t)));const{animationState:i}=this.visualElement;i&&i.setActive("whileDrag",!0)},onMove:(e,t)=>{const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:o,onDrag:i}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:s}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(s),void(null!==this.currentDirection&&o&&o(this.currentDirection));this.updateAxis("x",t.point,s),this.updateAxis("y",t.point,s),this.visualElement.render(),i&&i(e,t)},onSessionEnd:(e,t)=>this.stop(e,t),resumeAnimation:()=>yh((e=>{var t;return"paused"===this.getAnimationState(e)&&(null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.play())}))},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:r,contextWindow:Lh(this.visualElement)})}stop(e,t){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:r}=t;this.startAnimation(r);const{onDragEnd:o}=this.getProps();o&&Mu.postRender((()=>o(e,t)))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!Vh(e,r,this.currentDirection))return;const o=this.getAxisMotionValue(e);let i=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(i=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?ef(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?ef(n,e,r.max):Math.min(e,n)),e}(i,this.constraints[e],this.elastic[e])),o.set(i)}resolveConstraints(){var e;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(e=this.visualElement.projection)||void 0===e?void 0:e.layout,o=this.constraints;t&&oc(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!r)&&function(e,{top:t,left:n,bottom:r,right:o}){return{x:fh(e.x,n,o),y:fh(e.y,t,r)}}(r.layoutBox,t),this.elastic=function(e=mh){return!1===e?e=0:!0===e&&(e=mh),{x:gh(e,"left","right"),y:gh(e,"top","bottom")}}(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&yh((e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(r.layoutBox[e],this.constraints[e]))}))}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!oc(e))return!1;const n=e.current;kd(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const o=function(e,t,n){const r=zh(e,n),{scroll:o}=t;return o&&(Nh(r.x,o.offset.x),Nh(r.y,o.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let i=function(e,t){return{x:hh(e.x,t.x),y:hh(e.y,t.y)}}(r.layout.layoutBox,o);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(i));this.hasMutatedConstraints=!!e,e&&(i=wh(e))}return i}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:s}=this.getProps(),a=this.constraints||{},l=yh((s=>{if(!Vh(s,t,this.currentDirection))return;let l=a&&a[s]||{};i&&(l={min:0,max:0});const c=r?200:1e6,u=r?40:1e7,d={type:"inertia",velocity:n?e[s]:0,bounceStiffness:c,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...o,...l};return this.startAxisValueAnimation(s,d)}));return Promise.all(l).then(s)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return n.start(If(e,n,0,t,this.visualElement))}stopAnimation(){yh((e=>this.getAxisMotionValue(e).stop()))}pauseAnimation(){yh((e=>{var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.pause()}))}getAnimationState(e){var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.state}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps(),r=n[t];return r||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){yh((t=>{const{drag:n}=this.getProps();if(!Vh(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,o=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:i}=r.layout.layoutBox[t];o.set(e[t]-ef(n,i,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!oc(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};yh((e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const n=t.get();r[e]=function(e,t){let n=.5;const r=sh(e),o=sh(t);return o>r?n=Jp(t.min,t.max-r,e.min):r>o&&(n=Jp(e.min,e.max-o,t.min)),zc(0,1,n)}({min:n,max:n},this.constraints[e])}}));const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),yh((t=>{if(!Vh(t,e,null))return;const n=this.getAxisMotionValue(t),{min:o,max:i}=this.constraints[t];n.set(ef(o,i,r[t]))}))}addListeners(){if(!this.visualElement.current)return;Fh.set(this.visualElement,this);const e=Hu(this.visualElement.current,"pointerdown",(e=>{const{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)})),t=()=>{const{dragConstraints:e}=this.getProps();oc(e)&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,r=n.addEventListener("measure",t);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),t();const o=Fu(window,"resize",(()=>this.scalePositionWithinConstraints())),i=n.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(yh((t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))})),this.visualElement.render())}));return()=>{o(),e(),r(),i&&i()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:o=!1,dragElastic:i=mh,dragMomentum:s=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:o,dragElastic:i,dragMomentum:s}}}function Vh(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const $h=e=>(t,n)=>{e&&Mu.postRender((()=>e(t,n)))};const Hh={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Wh(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Uh={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!Yc.test(e))return e;e=parseFloat(e)}return`${Wh(e,t.target.x)}% ${Wh(e,t.target.y)}%`}},Gh={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=lp.parse(e);if(o.length>5)return r;const i=lp.createTransformer(e),s="number"!=typeof o[0]?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+s]/=a,o[1+s]/=l;const c=ef(a,l,.5);return"number"==typeof o[2+s]&&(o[2+s]/=c),"number"==typeof o[3+s]&&(o[3+s]/=c),i(o)}};class Kh extends B.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:o}=e;var i;i=Yh,Object.assign(Cc,i),o&&(t.group&&t.group.add(o),n&&n.register&&r&&n.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",(()=>{this.safeToRemove()})),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Hh.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:o}=this.props,i=n.projection;return i?(i.isPresent=o,r||e.layoutDependency!==t||void 0===t?i.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?i.promote():i.relegate()||Mu.postRender((()=>{const e=i.getStack();e&&e.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),nc.postRender((()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()})))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function qh(e){const[t,n]=function(){const e=(0,B.useContext)(Ul);if(null===e)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,o=(0,B.useId)();return(0,B.useEffect)((()=>r(o)),[]),!t&&n?[!1,()=>n&&n(o)]:[!0]}(),r=(0,B.useContext)(gc);return(0,wt.jsx)(Kh,{...e,layoutGroup:r,switchLayoutGroup:(0,B.useContext)(vc),isPresent:t,safeToRemove:n})}const Yh={borderRadius:{...Uh,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Uh,borderTopRightRadius:Uh,borderBottomLeftRadius:Uh,borderBottomRightRadius:Uh,boxShadow:Gh},Xh=["TopLeft","TopRight","BottomLeft","BottomRight"],Zh=Xh.length,Qh=e=>"string"==typeof e?parseFloat(e):e,Jh=e=>"number"==typeof e||Yc.test(e);function em(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const tm=rm(0,.5,Gp),nm=rm(.5,.95,Nu);function rm(e,t,n){return r=>r<e?0:r>t?1:n(Jp(e,t,r))}function om(e,t){e.min=t.min,e.max=t.max}function im(e,t){om(e.x,t.x),om(e.y,t.y)}function sm(e,t,n,r,o){return e=Eh(e-=t,1/n,r),void 0!==o&&(e=Eh(e,1/o,r)),e}function am(e,t,[n,r,o],i,s){!function(e,t=0,n=1,r=.5,o,i=e,s=e){qc.test(t)&&(t=parseFloat(t),t=ef(s.min,s.max,t/100)-s.min);if("number"!=typeof t)return;let a=ef(i.min,i.max,r);e===i&&(a-=t),e.min=sm(e.min,t,n,a,o),e.max=sm(e.max,t,n,a,o)}(e,t[n],t[r],t[o],t.scale,i,s)}const lm=["x","scaleX","originX"],cm=["y","scaleY","originY"];function um(e,t,n,r){am(e.x,t,lm,n?n.x:void 0,r?r.x:void 0),am(e.y,t,cm,n?n.y:void 0,r?r.y:void 0)}function dm(e){return 0===e.translate&&1===e.scale}function pm(e){return dm(e.x)&&dm(e.y)}function fm(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function hm(e){return sh(e.x)/sh(e.y)}class mm{constructor(){this.members=[]}add(e){Mf(this.members,e),e.scheduleRender()}remove(e){if(Af(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex((t=>e===t));if(0===t)return!1;let n;for(let e=t;e>=0;e--){const t=this.members[e];if(!1!==t.isPresent){n=t;break}}return!!n&&(this.promote(n),!0)}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:r}=e.options;!1===r&&n.hide()}}exitAnimationComplete(){this.members.forEach((e=>{const{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()}))}scheduleRender(){this.members.forEach((e=>{e.instance&&e.scheduleRender(!1)}))}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function gm(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,s=(null==n?void 0:n.z)||0;if((o||i||s)&&(r=`translate3d(${o}px, ${i}px, ${s}px) `),1===t.x&&1===t.y||(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:e,rotate:t,rotateX:o,rotateY:i,skewX:s,skewY:a}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),o&&(r+=`rotateX(${o}deg) `),i&&(r+=`rotateY(${i}deg) `),s&&(r+=`skewX(${s}deg) `),a&&(r+=`skewY(${a}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return 1===a&&1===l||(r+=`scale(${a}, ${l})`),r||"none"}const vm=(e,t)=>e.depth-t.depth;class bm{constructor(){this.children=[],this.isDirty=!1}add(e){Mf(this.children,e),this.isDirty=!0}remove(e){Af(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(vm),this.isDirty=!1,this.children.forEach(e)}}const xm=["","X","Y","Z"],ym={visibility:"hidden"};let wm=0;const _m={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function Sm(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Cm({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(e={},n=(null==t?void 0:t())){this.id=wm++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{var e;this.projectionUpdateScheduled=!1,_m.totalNodes=_m.resolvedTargetDeltas=_m.recalculatedProjection=0,this.nodes.forEach(Em),this.nodes.forEach(Am),this.nodes.forEach(Dm),this.nodes.forEach(Pm),e=_m,window.MotionDebug&&window.MotionDebug.record(e)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new bm)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new Df),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t,n=this.root.hasTreeAnimated){if(this.instance)return;var r;this.isSVG=(r=t)instanceof SVGElement&&"svg"!==r.tagName,this.instance=t;const{layoutId:o,layout:i,visualElement:s}=this.options;if(s&&!s.current&&s.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(i||o)&&(this.isLayoutDirty=!0),e){let n;const r=()=>this.root.updateBlockedByResize=!1;e(t,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=_d.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(Au(r),e(i-t))};return Mu.read(r,!0),()=>Au(r)}(r,250),Hh.hasAnimatedSinceResize&&(Hh.hasAnimatedSinceResize=!1,this.nodes.forEach(Mm))}))}o&&this.root.registerSharedNode(o,this),!1!==this.options.animate&&s&&(o||i)&&this.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||s.getDefaultTransition()||Vm,{onLayoutAnimationStart:i,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!fm(this.targetLayout,r)||n,c=!t&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||c||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,c);const t={...gd(o,"layout"),onPlay:i,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||Mm(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Au(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,window.HandoffCancelAllAnimations&&window.HandoffCancelAllAnimations(),this.nodes&&this.nodes.forEach(Om),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){const t=this.path[e];t.shouldResetTransform=!0,t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(Rm);this.isUpdating||this.nodes.forEach(Im),this.isUpdating=!1,this.nodes.forEach(Nm),this.nodes.forEach(km),this.nodes.forEach(jm),this.clearAllSnapshots();const e=_d.now();Du.delta=zc(0,1e3/60,e-Du.timestamp),Du.timestamp=e,Du.isProcessing=!0,Ou.update.process(Du),Ou.preRender.process(Du),Ou.render.process(Du),Du.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,nc.read((()=>this.update())))}clearAllSnapshots(){this.nodes.forEach(Tm),this.sharedNodes.forEach(zm)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Mu.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Mu.postRender((()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()}))}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++){this.path[e].updateScroll()}const e=this.layout;this.layout=this.measure(!1),this.layoutCorrected=xh(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&(this.scroll={animationId:this.root.animationId,phase:e,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!o)return;const e=this.isLayoutDirty||this.shouldResetTransform,t=this.projectionDelta&&!pm(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,i=r!==this.prevTransformTemplateValue;e&&(t||Ch(this.latestValues)||i)&&(o(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);var r;return e&&(n=this.removeTransform(n)),Wm((r=n).x),Wm(r.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:e}=this.options;if(!e)return xh();const t=e.measureViewportBox(),{scroll:n}=this.root;return n&&(Nh(t.x,n.offset.x),Nh(t.y,n.offset.y)),t}removeElementScroll(e){const t=xh();im(t,e);for(let n=0;n<this.path.length;n++){const r=this.path[n],{scroll:o,options:i}=r;if(r!==this.root&&o&&i.layoutScroll){if(o.isRoot){im(t,e);const{scroll:n}=this.root;n&&(Nh(t.x,-n.offset.x),Nh(t.y,-n.offset.y))}Nh(t.x,o.offset.x),Nh(t.y,o.offset.y)}}return t}applyTransform(e,t=!1){const n=xh();im(n,e);for(let e=0;e<this.path.length;e++){const r=this.path[e];!t&&r.options.layoutScroll&&r.scroll&&r!==r.root&&Oh(n,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),Ch(r.latestValues)&&Oh(n,r.latestValues)}return Ch(this.latestValues)&&Oh(n,this.latestValues),n}removeTransform(e){const t=xh();im(t,e);for(let e=0;e<this.path.length;e++){const n=this.path[e];if(!n.instance)continue;if(!Ch(n.latestValues))continue;Sh(n.latestValues)&&n.updateSnapshot();const r=xh();im(r,n.measurePageBox()),um(t,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,r)}return Ch(this.latestValues)&&um(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Du.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){var t;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const r=Boolean(this.resumingFrom)||this!==n;if(!(e||r&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty)||this.attemptToResolveRelativeTarget))return;const{layout:o,layoutId:i}=this.options;if(this.layout&&(o||i)){if(this.resolvedRelativeTargetAt=Du.timestamp,!this.targetDelta&&!this.relativeTarget){const e=this.getClosestProjectingParent();e&&e.layout&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=xh(),this.relativeTargetOrigin=xh(),ph(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),im(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var s,a,l;if(this.target||(this.target=xh(),this.targetWithTransforms=xh()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),s=this.target,a=this.relativeTarget,l=this.relativeParent.target,uh(s.x,a.x,l.x),uh(s.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):im(this.target,this.layout.layoutBox),Rh(this.target,this.targetDelta)):im(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const e=this.getClosestProjectingParent();e&&Boolean(e.resumingFrom)===Boolean(this.resumingFrom)&&!e.options.layoutScroll&&e.target&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=xh(),this.relativeTargetOrigin=xh(),ph(this.relativeTargetOrigin,this.target,e.target),im(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}_m.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!Sh(this.parent.latestValues)&&!kh(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var e;const t=this.getLead(),n=Boolean(this.resumingFrom)||this!==t;let r=!0;if((this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty))&&(r=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===Du.timestamp&&(r=!1),r)return;const{layout:o,layoutId:i}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!o&&!i)return;im(this.layoutCorrected,this.layout.layoutBox);const s=this.treeScale.x,a=this.treeScale.y;!function(e,t,n,r=!1){const o=n.length;if(!o)return;let i,s;t.x=t.y=1;for(let a=0;a<o;a++){i=n[a],s=i.projectionDelta;const o=i.instance;o&&o.style&&"contents"===o.style.display||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&Oh(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,Rh(e,s)),r&&Ch(i.latestValues)&&Oh(e,i.latestValues))}t.x=Ih(t.x),t.y=Ih(t.y)}(this.layoutCorrected,this.treeScale,this.path,n),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms=xh());const{target:l}=t;if(!l)return void(this.projectionTransform&&(this.projectionDelta=bh(),this.projectionTransform="none",this.scheduleRender()));this.projectionDelta||(this.projectionDelta=bh(),this.projectionDeltaWithTransform=bh());const c=this.projectionTransform;ch(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.projectionTransform=gm(this.projectionDelta,this.treeScale),this.projectionTransform===c&&this.treeScale.x===s&&this.treeScale.y===a||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),_m.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(e,t=!1){const n=this.snapshot,r=n?n.latestValues:{},o={...this.latestValues},i=bh();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const s=xh(),a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),c=!l||l.members.length<=1,u=Boolean(a&&!c&&!0===this.options.crossfade&&!this.path.some(Bm));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;Lm(i.x,e.x,n),Lm(i.y,e.y,n),this.setTargetDelta(i),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ph(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox),function(e,t,n,r){Fm(e.x,t.x,n.x,r),Fm(e.y,t.y,n.y,r)}(this.relativeTarget,this.relativeTargetOrigin,s,n),d&&function(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||(d=xh()),im(d,this.relativeTarget)),a&&(this.animationValues=o,function(e,t,n,r,o,i){o?(e.opacity=ef(0,void 0!==n.opacity?n.opacity:1,tm(r)),e.opacityExit=ef(void 0!==t.opacity?t.opacity:1,0,nm(r))):i&&(e.opacity=ef(void 0!==t.opacity?t.opacity:1,void 0!==n.opacity?n.opacity:1,r));for(let o=0;o<Zh;o++){const i=`border${Xh[o]}Radius`;let s=em(t,i),a=em(n,i);void 0===s&&void 0===a||(s||(s=0),a||(a=0),0===s||0===a||Jh(s)===Jh(a)?(e[i]=Math.max(ef(Qh(s),Qh(a),r),0),(qc.test(a)||qc.test(s))&&(e[i]+="%")):e[i]=a)}(t.rotate||n.rotate)&&(e.rotate=ef(t.rotate||0,n.rotate||0,r))}(o,r,this.latestValues,n,u,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Au(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Mu.update((()=>{Hh.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,n){const r=Pc(e)?e:Lf(e);return r.start(If("",r,t,n)),r.animation}(0,1e3,{...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0}))}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:o}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&Um(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||xh();const t=sh(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=sh(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}im(t,n),Oh(t,o),ch(this.projectionDeltaWithTransform,this.layoutCorrected,t,o)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new mm);this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){var e;const{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}getPrevLead(){var e;const{layoutId:t}=this.options;return t?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;const r={};n.z&&Sm("z",e,r,this.animationValues);for(let t=0;t<xm.length;t++)Sm(`rotate${xm[t]}`,e,r,this.animationValues),Sm(`skew${xm[t]}`,e,r,this.animationValues);e.render();for(const t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}getProjectionStyles(e){var t,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return ym;const r={visibility:""},o=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,r.opacity="",r.pointerEvents=Tu(null==e?void 0:e.pointerEvents)||"",r.transform=o?o(this.latestValues,""):"none",r;const i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target){const t={};return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=Tu(null==e?void 0:e.pointerEvents)||""),this.hasProjected&&!Ch(this.latestValues)&&(t.transform=o?o({},""):"none",this.hasProjected=!1),t}const s=i.animationValues||i.latestValues;this.applyTransformsToTarget(),r.transform=gm(this.projectionDeltaWithTransform,this.treeScale,s),o&&(r.transform=o(s,r.transform));const{x:a,y:l}=this.projectionDelta;r.transformOrigin=`${100*a.origin}% ${100*l.origin}% 0`,i.animationValues?r.opacity=i===this?null!==(n=null!==(t=s.opacity)&&void 0!==t?t:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:r.opacity=i===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0;for(const e in Cc){if(void 0===s[e])continue;const{correct:t,applyTo:n}=Cc[e],o="none"===r.transform?s[e]:t(s[e],i);if(n){const e=n.length;for(let t=0;t<e;t++)r[n[t]]=o}else r[e]=o}return this.options.layoutId&&(r.pointerEvents=i===this?Tu(null==e?void 0:e.pointerEvents)||"":"none"),r}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach((e=>{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()})),this.root.nodes.forEach(Rm),this.root.sharedNodes.clear()}}}function km(e){e.updateLayout()}function jm(e){var t;const n=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:r}=e.layout,{animationType:o}=e.options,i=n.source!==e.layout.source;"size"===o?yh((e=>{const r=i?n.measuredBox[e]:n.layoutBox[e],o=sh(r);r.min=t[e].min,r.max=r.min+o})):Um(o,n.layoutBox,t)&&yh((r=>{const o=i?n.measuredBox[r]:n.layoutBox[r],s=sh(t[r]);o.max=o.min+s,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+s)}));const s=bh();ch(s,t,n.layoutBox);const a=bh();i?ch(a,e.applyTransform(r,!0),n.measuredBox):ch(a,t,n.layoutBox);const l=!pm(s);let c=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:o,layout:i}=r;if(o&&i){const s=xh();ph(s,n.layoutBox,o.layoutBox);const a=xh();ph(a,t,i.layoutBox),fm(s,a)||(c=!0),r.options.layoutRoot&&(e.relativeTarget=a,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:n,delta:a,layoutDelta:s,hasLayoutChanged:l,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Em(e){_m.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Pm(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Tm(e){e.clearSnapshot()}function Rm(e){e.clearMeasurements()}function Im(e){e.isLayoutDirty=!1}function Nm(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Mm(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Am(e){e.resolveTargetDelta()}function Dm(e){e.calcProjection()}function Om(e){e.resetSkewAndRotation()}function zm(e){e.removeLeadSnapshot()}function Lm(e,t,n){e.translate=ef(t.translate,0,n),e.scale=ef(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Fm(e,t,n,r){e.min=ef(t.min,n.min,r),e.max=ef(t.max,n.max,r)}function Bm(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const Vm={duration:.45,ease:[.4,0,.1,1]},$m=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Hm=$m("applewebkit/")&&!$m("chrome/")?Math.round:Nu;function Wm(e){e.min=Hm(e.min),e.max=Hm(e.max)}function Um(e,t,n){return"position"===e||"preserve-aspect"===e&&!ah(hm(t),hm(n),.2)}const Gm=Cm({attachResizeListener:(e,t)=>Fu(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Km={current:void 0},qm=Cm({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Km.current){const e=new Gm({});e.mount(window),e.setOptions({layoutScroll:!0}),Km.current=e}return Km.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),Ym={pan:{Feature:class extends Zu{constructor(){super(...arguments),this.removePointerDownListener=Nu}onPointerDown(e){this.session=new Jf(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Lh(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:$h(e),onStart:$h(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&Mu.postRender((()=>r(e,t)))}}}mount(){this.removePointerDownListener=Hu(this.node.current,"pointerdown",(e=>this.onPointerDown(e)))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends Zu{constructor(e){super(e),this.removeGroupControls=Nu,this.removeListeners=Nu,this.controls=new Bh(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Nu}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:qm,MeasureLayout:qh}},Xm={current:null},Zm={current:!1};const Qm=new WeakMap,Jm=[...zd,Zd,lp],eg=Object.keys(mc),tg=eg.length,ng=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],rg=cc.length;function og(e){if(e)return!1!==e.options.allowProjection?e.projection:og(e.parent)}class ig{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:o,visualState:i},s={}){this.resolveKeyframes=(e,t,n,r)=>new this.KeyframeResolver(e,t,n,r,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Wd,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Mu.render(this.render,!1,!0);const{latestValues:a,renderState:l}=i;this.latestValues=a,this.baseTarget={...a},this.initialValues=t.initial?{...a}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=s,this.blockInitialAnimation=Boolean(o),this.isControllingVariants=uc(t),this.isVariantNode=dc(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:c,...u}=this.scrapeMotionValuesFromProps(t,{},this);for(const e in u){const t=u[e];void 0!==a[e]&&Pc(t)&&(t.set(a[e],!1),Nf(c)&&c.add(e))}}mount(e){this.current=e,Qm.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach(((e,t)=>this.bindToMotionValue(t,e))),Zm.current||function(){if(Zm.current=!0,Gl)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Xm.current=e.matches;e.addListener(t),t()}else Xm.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Xm.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){var e;Qm.delete(this.current),this.projection&&this.projection.unmount(),Au(this.notifyUpdate),Au(this.render),this.valueSubscriptions.forEach((e=>e())),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const t in this.features)null===(e=this.features[t])||void 0===e||e.unmount();this.current=null}bindToMotionValue(e,t){const n=jc.has(e),r=t.on("change",(t=>{this.latestValues[e]=t,this.props.onUpdate&&Mu.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)})),o=t.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,(()=>{r(),o(),t.owner&&t.stop()}))}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}loadFeatures({children:e,...t},n,r,o){let i,s;for(let e=0;e<tg;e++){const n=eg[e],{isEnabled:r,Feature:o,ProjectionNode:a,MeasureLayout:l}=mc[n];a&&(i=a),r(t)&&(!this.features[n]&&o&&(this.features[n]=new o(this)),l&&(s=l))}if(("html"===this.type||"svg"===this.type)&&!this.projection&&i){const{layoutId:e,layout:n,drag:r,dragConstraints:s,layoutScroll:a,layoutRoot:l}=t;this.projection=new i(this.latestValues,t["data-framer-portal-id"]?void 0:og(this.parent)),this.projection.setOptions({layoutId:e,layout:n,alwaysMeasureLayout:Boolean(r)||s&&oc(s),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:"string"==typeof n?n:"both",initialPromotionConfig:o,layoutScroll:a,layoutRoot:l})}return s}updateFeatures(){for(const e in this.features){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):xh()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<ng.length;t++){const n=ng[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const r=e["on"+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=function(e,t,n){const{willChange:r}=t;for(const o in t){const i=t[o],s=n[o];if(Pc(i))e.addValue(o,i),Nf(r)&&r.add(o);else if(Pc(s))e.addValue(o,Lf(i,{owner:e})),Nf(r)&&r.remove(o);else if(s!==i)if(e.hasValue(o)){const t=e.getValue(o);!0===t.liveStyle?t.jump(i):t.hasAnimated||t.set(i)}else{const t=e.getStaticValue(o);e.addValue(o,Lf(void 0!==t?t:i,{owner:e}))}}for(const r in n)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(e=!1){if(e)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const e=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(e.initial=this.props.initial),e}const t={};for(let e=0;e<rg;e++){const n=cc[e],r=this.props[n];(sc(r)||!1===r)&&(t[n]=r)}return t}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=Lf(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){var n;let r=void 0===this.latestValues[e]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,e))&&void 0!==n?n:this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];return null!=r&&("string"==typeof r&&(jd(r)||Sd(r))?r=parseFloat(r):!(e=>Jm.find(Od(e)))(r)&&lp.test(t)&&(r=mp(e,t)),this.setBaseTarget(e,Pc(r)?r.get():r)),Pc(r)?r.get():r}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:n}=this.props;let r;if("string"==typeof n||"object"==typeof n){const o=Cu(this.props,n,null===(t=this.presenceContext)||void 0===t?void 0:t.custom);o&&(r=o[e])}if(n&&void 0!==r)return r;const o=this.getBaseTargetFromProps(this.props,e);return void 0===o||Pc(o)?void 0!==this.initialValues[e]&&void 0===r?void 0:this.baseTarget[e]:o}on(e,t){return this.events[e]||(this.events[e]=new Df),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class sg extends ig{constructor(){super(...arguments),this.KeyframeResolver=vp}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}}class ag extends sg{constructor(){super(...arguments),this.type="html"}readValueFromInstance(e,t){if(jc.has(t)){const e=hp(t);return e&&e.default||0}{const r=(n=e,window.getComputedStyle(n)),o=(Nc(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof o?o.trim():o}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return zh(e,t)}build(e,t,n,r){tu(e,t,n,r.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return wu(e,t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Pc(e)&&(this.childSubscription=e.on("change",(e=>{this.current&&(this.current.textContent=`${e}`)})))}renderInstance(e,t,n,r){bu(e,t,n,r)}}class lg extends sg{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(jc.has(t)){const e=hp(t);return e&&e.default||0}return t=xu.has(t)?t:Yl(t),e.getAttribute(t)}measureInstanceViewportBox(){return xh()}scrapeMotionValuesFromProps(e,t,n){return _u(e,t,n)}build(e,t,n,r){fu(e,t,n,this.isSVGTag,r.transformTemplate)}renderInstance(e,t,n,r){yu(e,t,0,r)}mount(e){this.isSVGTag=mu(e.tagName),super.mount(e)}}const cg=(e,t)=>Sc(e)?new lg(t,{enableHardwareAcceleration:!1}):new ag(t,{allowProjection:e!==B.Fragment,enableHardwareAcceleration:!0}),ug={...Zf,...ad,...Ym,...{layout:{ProjectionNode:qm,MeasureLayout:qh}}},dg=wc(((e,t)=>function(e,{forwardMotionProps:t=!1},n,r){return{...Sc(e)?zu:Lu,preloadedFeatures:n,useRender:vu(t),createVisualElement:r,Component:e}}(e,t,ug,cg)));function pg(){const e=(0,B.useRef)(!1);return Kl((()=>(e.current=!0,()=>{e.current=!1})),[]),e}function fg(){const e=pg(),[t,n]=(0,B.useState)(0),r=(0,B.useCallback)((()=>{e.current&&n(t+1)}),[t]);return[(0,B.useCallback)((()=>Mu.postRender(r)),[r]),t]}class hg extends B.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){const e=this.props.sizeRef.current;e.height=t.offsetHeight||0,e.width=t.offsetWidth||0,e.top=t.offsetTop,e.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function mg({children:e,isPresent:t}){const n=(0,B.useId)(),r=(0,B.useRef)(null),o=(0,B.useRef)({width:0,height:0,top:0,left:0}),{nonce:i}=(0,B.useContext)(Hl);return(0,B.useInsertionEffect)((()=>{const{width:e,height:s,top:a,left:l}=o.current;if(t||!r.current||!e||!s)return;r.current.dataset.motionPopId=n;const c=document.createElement("style");return i&&(c.nonce=i),document.head.appendChild(c),c.sheet&&c.sheet.insertRule(`\n [data-motion-pop-id="${n}"] {\n position: absolute !important;\n width: ${e}px !important;\n height: ${s}px !important;\n top: ${a}px !important;\n left: ${l}px !important;\n }\n `),()=>{document.head.removeChild(c)}}),[t]),(0,wt.jsx)(hg,{isPresent:t,childRef:r,sizeRef:o,children:B.cloneElement(e,{ref:r})})}const gg=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:s})=>{const a=ku(vg),l=(0,B.useId)(),c=(0,B.useMemo)((()=>({id:l,initial:t,isPresent:n,custom:o,onExitComplete:e=>{a.set(e,!0);for(const e of a.values())if(!e)return;r&&r()},register:e=>(a.set(e,!1),()=>a.delete(e))})),i?[Math.random()]:[n]);return(0,B.useMemo)((()=>{a.forEach(((e,t)=>a.set(t,!1)))}),[n]),B.useEffect((()=>{!n&&!a.size&&r&&r()}),[n]),"popLayout"===s&&(e=(0,wt.jsx)(mg,{isPresent:n,children:e})),(0,wt.jsx)(Ul.Provider,{value:c,children:e})};function vg(){return new Map}const bg=e=>e.key||"";const xg=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:o,presenceAffectsLayout:i=!0,mode:s="sync"})=>{kd(!o,"Replace exitBeforeEnter with mode='wait'");const a=(0,B.useContext)(gc).forceRender||fg()[0],l=pg(),c=function(e){const t=[];return B.Children.forEach(e,(e=>{(0,B.isValidElement)(e)&&t.push(e)})),t}(e);let u=c;const d=(0,B.useRef)(new Map).current,p=(0,B.useRef)(u),f=(0,B.useRef)(new Map).current,h=(0,B.useRef)(!0);var m;if(Kl((()=>{h.current=!1,function(e,t){e.forEach((e=>{const n=bg(e);t.set(n,e)}))}(c,f),p.current=u})),m=()=>{h.current=!0,f.clear(),d.clear()},(0,B.useEffect)((()=>()=>m()),[]),h.current)return(0,wt.jsx)(wt.Fragment,{children:u.map((e=>(0,wt.jsx)(gg,{isPresent:!0,initial:!!n&&void 0,presenceAffectsLayout:i,mode:s,children:e},bg(e))))});u=[...u];const g=p.current.map(bg),v=c.map(bg),b=g.length;for(let e=0;e<b;e++){const t=g[e];-1!==v.indexOf(t)||d.has(t)||d.set(t,void 0)}return"wait"===s&&d.size&&(u=[]),d.forEach(((e,n)=>{if(-1!==v.indexOf(n))return;const o=f.get(n);if(!o)return;const h=g.indexOf(n);let m=e;if(!m){const e=()=>{d.delete(n);const e=Array.from(f.keys()).filter((e=>!v.includes(e)));if(e.forEach((e=>f.delete(e))),p.current=c.filter((t=>{const r=bg(t);return r===n||e.includes(r)})),!d.size){if(!1===l.current)return;a(),r&&r()}};m=(0,wt.jsx)(gg,{isPresent:!1,onExitComplete:e,custom:t,presenceAffectsLayout:i,mode:s,children:o},bg(o)),d.set(n,m)}u.splice(h,0,m)})),u=u.map((e=>{const t=e.key;return d.has(t)?e:(0,wt.jsx)(gg,{isPresent:!0,presenceAffectsLayout:i,mode:s,children:e},bg(e))})),(0,wt.jsx)(wt.Fragment,{children:d.size?u:u.map((e=>(0,B.cloneElement)(e)))})},yg=["40em","52em","64em"],wg=(e={})=>{const{defaultIndex:t=0}=e;if("number"!=typeof t)throw new TypeError(`Default breakpoint index should be a number. Got: ${t}, ${typeof t}`);if(t<0||t>yg.length-1)throw new RangeError(`Default breakpoint index out of range. Theme has ${yg.length} breakpoints, got index ${t}`);const[n,r]=(0,c.useState)(t);return(0,c.useEffect)((()=>{const e=()=>{const e=yg.filter((e=>"undefined"!=typeof window&&window.matchMedia(`screen and (min-width: ${e})`).matches)).length;n!==e&&r(e)};return e(),"undefined"!=typeof window&&window.addEventListener("resize",e),()=>{"undefined"!=typeof window&&window.removeEventListener("resize",e)}}),[n]),n};function _g(e,t={}){const n=wg(t);if(!Array.isArray(e)&&"function"!=typeof e)return e;const r=e||[];return r[n>=r.length?r.length-1:n]}const Sg={name:"zjik7",styles:"display:flex"},Cg={name:"qgaee5",styles:"display:block;max-height:100%;max-width:100%;min-height:0;min-width:0"},kg={name:"82a6rk",styles:"flex:1"},jg={name:"13nosa1",styles:">*{min-height:0;}"},Eg={name:"1pwxzk4",styles:">*{min-width:0;}"};function Pg(e){const{align:t,className:n,direction:r="row",expanded:o=!0,gap:i=2,justify:s="space-between",wrap:a=!1,...l}=Ya(function(e){const{isReversed:t,...n}=e;return void 0!==t?(Fi()("Flex isReversed",{alternative:'Flex direction="row-reverse" or "column-reverse"',since:"5.9"}),{...n,direction:t?"row-reverse":"row"}):n}(e),"Flex"),u=_g(Array.isArray(r)?r:[r]),d="string"==typeof u&&!!u.includes("column"),p=qa();return{...l,className:(0,c.useMemo)((()=>{const e=bl({alignItems:null!=t?t:d?"normal":"center",flexDirection:u,flexWrap:a?"wrap":void 0,gap:wl(i),justifyContent:s,height:d&&o?"100%":void 0,width:!d&&o?"100%":void 0},"","");return p(Sg,e,d?jg:Eg,n)}),[t,n,p,u,o,i,d,s,a]),isColumn:d}}const Tg=(0,c.createContext)({flexItemDisplay:void 0}),Rg=()=>(0,c.useContext)(Tg);const Ig=Xa((function(e,t){const{children:n,isColumn:r,...o}=Pg(e);return(0,wt.jsx)(Tg.Provider,{value:{flexItemDisplay:r?"block":void 0},children:(0,wt.jsx)(dl,{...o,ref:t,children:n})})}),"Flex");function Ng(e){const{className:t,display:n,isBlock:r=!1,...o}=Ya(e,"FlexItem"),i={},s=Rg().flexItemDisplay;i.Base=bl({display:n||s},"","");return{...o,className:qa()(Cg,i.Base,r&&kg,t)}}const Mg=Xa((function(e,t){const n=function(e){return Ng({isBlock:!0,...Ya(e,"FlexBlock")})}(e);return(0,wt.jsx)(dl,{...n,ref:t})}),"FlexBlock"),Ag=new RegExp(/-left/g),Dg=new RegExp(/-right/g),Og=new RegExp(/Left/g),zg=new RegExp(/Right/g);function Lg(e){return"left"===e?"right":"right"===e?"left":Ag.test(e)?e.replace(Ag,"-right"):Dg.test(e)?e.replace(Dg,"-left"):Og.test(e)?e.replace(Og,"Right"):zg.test(e)?e.replace(zg,"Left"):e}const Fg=(e={})=>Object.fromEntries(Object.entries(e).map((([e,t])=>[Lg(e),t])));function Bg(e={},t){return()=>t?(0,a.isRTL)()?bl(t,"",""):bl(e,"",""):(0,a.isRTL)()?bl(Fg(e),"",""):bl(e,"","")}Bg.watch=()=>(0,a.isRTL)();const Vg=e=>null!=e;const $g=Xa((function(e,t){const n=function(e){const{className:t,margin:n,marginBottom:r=2,marginLeft:o,marginRight:i,marginTop:s,marginX:a,marginY:l,padding:c,paddingBottom:u,paddingLeft:d,paddingRight:p,paddingTop:f,paddingX:h,paddingY:m,...g}=Ya(e,"Spacer");return{...g,className:qa()(Vg(n)&&bl("margin:",wl(n),";",""),Vg(l)&&bl("margin-bottom:",wl(l),";margin-top:",wl(l),";",""),Vg(a)&&bl("margin-left:",wl(a),";margin-right:",wl(a),";",""),Vg(s)&&bl("margin-top:",wl(s),";",""),Vg(r)&&bl("margin-bottom:",wl(r),";",""),Vg(o)&&Bg({marginLeft:wl(o)})(),Vg(i)&&Bg({marginRight:wl(i)})(),Vg(c)&&bl("padding:",wl(c),";",""),Vg(m)&&bl("padding-bottom:",wl(m),";padding-top:",wl(m),";",""),Vg(h)&&bl("padding-left:",wl(h),";padding-right:",wl(h),";",""),Vg(f)&&bl("padding-top:",wl(f),";",""),Vg(u)&&bl("padding-bottom:",wl(u),";",""),Vg(d)&&Bg({paddingLeft:wl(d)})(),Vg(p)&&Bg({paddingRight:wl(p)})(),t)}}(e);return(0,wt.jsx)(dl,{...n,ref:t})}),"Spacer"),Hg=$g,Wg=(0,wt.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wt.jsx)(n.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})}),Ug=(0,wt.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wt.jsx)(n.Path,{d:"M7 11.5h10V13H7z"})});const Gg=Xa((function(e,t){const n=Ng(e);return(0,wt.jsx)(dl,{...n,ref:t})}),"FlexItem");const Kg={name:"hdknak",styles:"display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap"};function qg(e){return null!=e}const Yg=e=>"string"==typeof e?(e=>parseFloat(e))(e):e,Xg="…",Zg={auto:"auto",head:"head",middle:"middle",tail:"tail",none:"none"},Qg={ellipsis:Xg,ellipsizeMode:Zg.auto,limit:0,numberOfLines:0};function Jg(e="",t){const n={...Qg,...t},{ellipsis:r,ellipsizeMode:o,limit:i}=n;if(o===Zg.none)return e;let s,a;switch(o){case Zg.head:s=0,a=i;break;case Zg.middle:s=Math.floor(i/2),a=Math.floor(i/2);break;default:s=i,a=0}const l=o!==Zg.auto?function(e,t,n,r){if("string"!=typeof e)return"";const o=e.length,i=~~t,s=~~n,a=qg(r)?r:Xg;return 0===i&&0===s||i>=o||s>=o||i+s>=o?e:0===s?e.slice(0,i)+a:e.slice(0,i)+a+e.slice(o-s)}(e,s,a,r):e;return l}function ev(e){const{className:t,children:n,ellipsis:r=Xg,ellipsizeMode:o=Zg.auto,limit:i=0,numberOfLines:s=0,...a}=Ya(e,"Truncate"),l=qa();let u;"string"==typeof n?u=n:"number"==typeof n&&(u=n.toString());const d=u?Jg(u,{ellipsis:r,ellipsizeMode:o,limit:i,numberOfLines:s}):n,p=!!u&&o===Zg.auto;return{...a,className:(0,c.useMemo)((()=>l(p&&!s&&Kg,p&&!!s&&bl(1===s?"word-break: break-all;":""," -webkit-box-orient:vertical;-webkit-line-clamp:",s,";display:-webkit-box;overflow:hidden;",""),t)),[t,l,s,p]),children:d}}var tv={grad:.9,turn:360,rad:360/(2*Math.PI)},nv=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},rv=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},ov=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},iv=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},sv=function(e){return{r:ov(e.r,0,255),g:ov(e.g,0,255),b:ov(e.b,0,255),a:ov(e.a)}},av=function(e){return{r:rv(e.r),g:rv(e.g),b:rv(e.b),a:rv(e.a,3)}},lv=/^#([0-9a-f]{3,8})$/i,cv=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},uv=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=Math.max(t,n,r),s=i-Math.min(t,n,r),a=s?i===t?(n-r)/s:i===n?2+(r-t)/s:4+(t-n)/s:0;return{h:60*(a<0?a+6:a),s:i?s/i*100:0,v:i/255*100,a:o}},dv=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),s=r*(1-n),a=r*(1-(t-i)*n),l=r*(1-(1-t+i)*n),c=i%6;return{r:255*[r,a,s,s,l,r][c],g:255*[l,r,r,a,s,s][c],b:255*[s,s,l,r,r,a][c],a:o}},pv=function(e){return{h:iv(e.h),s:ov(e.s,0,100),l:ov(e.l,0,100),a:ov(e.a)}},fv=function(e){return{h:rv(e.h),s:rv(e.s),l:rv(e.l),a:rv(e.a,3)}},hv=function(e){return dv((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},mv=function(e){return{h:(t=uv(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},gv=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,vv=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,bv=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,xv=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,yv={string:[[function(e){var t=lv.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?rv(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?rv(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=bv.exec(e)||xv.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:sv({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=gv.exec(e)||vv.exec(e);if(!t)return null;var n,r,o=pv({h:(n=t[1],r=t[2],void 0===r&&(r="deg"),Number(n)*(tv[r]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return hv(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 nv(t)&&nv(n)&&nv(r)?sv({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(!nv(t)||!nv(n)||!nv(r))return null;var s=pv({h:Number(t),s:Number(n),l:Number(r),a:Number(i)});return hv(s)},"hsl"],[function(e){var t=e.h,n=e.s,r=e.v,o=e.a,i=void 0===o?1:o;if(!nv(t)||!nv(n)||!nv(r))return null;var s=function(e){return{h:iv(e.h),s:ov(e.s,0,100),v:ov(e.v,0,100),a:ov(e.a)}}({h:Number(t),s:Number(n),v:Number(r),a:Number(i)});return dv(s)},"hsv"]]},wv=function(e,t){for(var n=0;n<t.length;n++){var r=t[n][0](e);if(r)return[r,t[n][1]]}return[null,void 0]},_v=function(e){return"string"==typeof e?wv(e.trim(),yv.string):"object"==typeof e&&null!==e?wv(e,yv.object):[null,void 0]},Sv=function(e,t){var n=mv(e);return{h:n.h,s:ov(n.s+100*t,0,100),l:n.l,a:n.a}},Cv=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},kv=function(e,t){var n=mv(e);return{h:n.h,s:n.s,l:ov(n.l+100*t,0,100),a:n.a}},jv=function(){function e(e){this.parsed=_v(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return null!==this.parsed},e.prototype.brightness=function(){return rv(Cv(this.rgba),2)},e.prototype.isDark=function(){return Cv(this.rgba)<.5},e.prototype.isLight=function(){return Cv(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=av(this.rgba)).r,n=e.g,r=e.b,i=(o=e.a)<1?cv(rv(255*o)):"","#"+cv(t)+cv(n)+cv(r)+i;var e,t,n,r,o,i},e.prototype.toRgb=function(){return av(this.rgba)},e.prototype.toRgbString=function(){return t=(e=av(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 fv(mv(this.rgba))},e.prototype.toHslString=function(){return t=(e=fv(mv(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=uv(this.rgba),{h:rv(e.h),s:rv(e.s),v:rv(e.v),a:rv(e.a,3)};var e},e.prototype.invert=function(){return Ev({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),Ev(Sv(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),Ev(Sv(this.rgba,-e))},e.prototype.grayscale=function(){return Ev(Sv(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),Ev(kv(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),Ev(kv(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?Ev({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):rv(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=mv(this.rgba);return"number"==typeof e?Ev({h:e,s:t.s,l:t.l,a:t.a}):rv(t.h)},e.prototype.isEqual=function(e){return this.toHex()===Ev(e).toHex()},e}(),Ev=function(e){return e instanceof jv?e:new jv(e)},Pv=[],Tv=function(e){e.forEach((function(e){Pv.indexOf(e)<0&&(e(jv,yv),Pv.push(e))}))};function Rv(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,s,a=r[this.toHex()];if(a)return a;if(null==t?void 0:t.closest){var l=this.toRgb(),c=1/0,u="black";if(!i.length)for(var d in n)i[d]=new e(n[d]).toRgb();for(var p in n){var f=(o=l,s=i[p],Math.pow(o.r-s.r,2)+Math.pow(o.g-s.g,2)+Math.pow(o.b-s.b,2));f<c&&(c=f,u=p)}return u}},t.string.push([function(t){var r=t.toLowerCase(),o="transparent"===r?"#0000":n[r];return o?new e(o).toRgb():null},"name"])}let Iv;Tv([Rv]);const Nv=gs((function(e){if("string"!=typeof e)return"";if("string"==typeof(t=e)&&Ev(t).isValid())return e;var t;if(!e.includes("var("))return"";if("undefined"==typeof document)return"";const n=function(){if("undefined"!=typeof document){if(!Iv){const e=document.createElement("div");e.setAttribute("data-g2-color-computation-node",""),document.body.appendChild(e),Iv=e}return Iv}}();if(!n)return"";n.style.background=e;const r=window?.getComputedStyle(n).background;return n.style.background="",r||""}));function Mv(e){const t=function(e){const t=Nv(e);return Ev(t).isLight()?"#000000":"#ffffff"}(e);return"#000000"===t?"dark":"light"}const Av=bl("color:",jl.gray[900],";line-height:",Tl.fontLineHeightBase,";margin:0;text-wrap:balance;text-wrap:pretty;",""),Dv={name:"4zleql",styles:"display:block"},Ov=bl("color:",jl.alert.green,";",""),zv=bl("color:",jl.alert.red,";",""),Lv=bl("color:",jl.gray[700],";",""),Fv=bl("mark{background:",jl.alert.yellow,";border-radius:",Tl.radiusSmall,";box-shadow:0 0 0 1px rgba( 0, 0, 0, 0.05 ) inset,0 -1px 0 rgba( 0, 0, 0, 0.1 ) inset;}",""),Bv={name:"50zrmy",styles:"text-transform:uppercase"};var Vv=o(9664);const $v=gs((e=>{const t={};for(const n in e)t[n.toLowerCase()]=e[n];return t}));const Hv=13,Wv={body:Hv,caption:10,footnote:11,largeTitle:28,subheadline:12,title:20},Uv=[1,2,3,4,5,6].flatMap((e=>[e,e.toString()]));function Gv(e=Hv){if(e in Wv)return Gv(Wv[e]);if("number"!=typeof e){const t=parseFloat(e);if(Number.isNaN(t))return e;e=t}return`calc(${`(${e} / ${Hv})`} * ${Tl.fontSize})`}function Kv(e=3){if(!Uv.includes(e))return Gv(e);return Tl[`fontSizeH${e}`]}var qv={name:"50zrmy",styles:"text-transform:uppercase"};function Yv(t){const{adjustLineHeightForInnerControls:n,align:r,children:o,className:i,color:s,ellipsizeMode:a,isDestructive:l=!1,display:u,highlightEscape:d=!1,highlightCaseSensitive:p=!1,highlightWords:f,highlightSanitize:h,isBlock:m=!1,letterSpacing:g,lineHeight:v,optimizeReadabilityFor:b,size:x,truncate:y=!1,upperCase:w=!1,variant:_,weight:S=Tl.fontWeight,...C}=Ya(t,"Text");let k=o;const j=Array.isArray(f),E="caption"===x;if(j){if("string"!=typeof o)throw new TypeError("`children` of `Text` must only be `string` types when `highlightWords` is defined");k=function({activeClassName:e="",activeIndex:t=-1,activeStyle:n,autoEscape:r,caseSensitive:o=!1,children:i,findChunks:s,highlightClassName:a="",highlightStyle:l={},highlightTag:u="mark",sanitize:d,searchWords:p=[],unhighlightClassName:f="",unhighlightStyle:h}){if(!i)return null;if("string"!=typeof i)return i;const m=i,g=(0,Vv.findAll)({autoEscape:r,caseSensitive:o,findChunks:s,sanitize:d,searchWords:p,textToHighlight:m}),v=u;let b,x=-1,y="";const w=g.map(((r,i)=>{const s=m.substr(r.start,r.end-r.start);if(r.highlight){let r;x++,r="object"==typeof a?o?a[s]:(a=$v(a))[s.toLowerCase()]:a;const u=x===+t;y=`${r} ${u?e:""}`,b=!0===u&&null!==n?Object.assign({},l,n):l;const d={children:s,className:y,key:i,style:b};return"string"!=typeof v&&(d.highlightIndex=x),(0,c.createElement)(v,d)}return(0,c.createElement)("span",{children:s,className:f,key:i,style:h})}));return w}({autoEscape:d,children:o,caseSensitive:p,searchWords:f,sanitize:h})}const P=qa();let T;!0===y&&(T="auto"),!1===y&&(T="none");const R=ev({...C,className:(0,c.useMemo)((()=>{const t={},o=function(e,t){if(t)return t;if(!e)return;let n=`calc(${Tl.controlHeight} + ${wl(2)})`;switch(e){case"large":n=`calc(${Tl.controlHeightLarge} + ${wl(2)})`;break;case"small":n=`calc(${Tl.controlHeightSmall} + ${wl(2)})`;break;case"xSmall":n=`calc(${Tl.controlHeightXSmall} + ${wl(2)})`}return n}(n,v);if(t.Base=bl({color:s,display:u,fontSize:Gv(x),fontWeight:S,lineHeight:o,letterSpacing:g,textAlign:r},"",""),t.upperCase=qv,t.optimalTextColor=null,b){const e="dark"===Mv(b);t.optimalTextColor=bl(e?{color:jl.gray[900]}:{color:jl.white},"","")}return P(Av,t.Base,t.optimalTextColor,l&&zv,!!j&&Fv,m&&Dv,E&&Lv,_&&e[_],w&&t.upperCase,i)}),[n,r,i,s,P,u,m,E,l,j,g,v,b,x,w,_,S]),children:o,ellipsizeMode:a||T});return!y&&Array.isArray(o)&&(k=c.Children.map(o,(e=>{if("object"!=typeof e||null===e||!("props"in e))return e;return el(e,["Link"])?(0,c.cloneElement)(e,{size:e.props.size||"inherit"}):e}))),{...R,children:y?R.children:k}}const Xv=Xa((function(e,t){const n=Yv(e);return(0,wt.jsx)(dl,{as:"span",...n,ref:t})}),"Text");const Zv={name:"9amh4a",styles:"font-size:11px;font-weight:500;line-height:1.4;text-transform:uppercase"};const Qv=cl("span",{target:"em5sgkm8"})({name:"pvvbxf",styles:"box-sizing:border-box;display:block"}),Jv=cl("span",{target:"em5sgkm7"})({name:"jgf79h",styles:"align-items:center;align-self:stretch;box-sizing:border-box;display:flex"}),eb=({disabled:e,isBorderless:t})=>t?"transparent":e?jl.ui.borderDisabled:jl.ui.border,tb=cl("div",{target:"em5sgkm6"})("&&&{box-sizing:border-box;border-color:",eb,";border-radius:inherit;border-style:solid;border-width:1px;bottom:0;left:0;margin:0;padding:0;pointer-events:none;position:absolute;right:0;top:0;",Bg({paddingLeft:2}),";}"),nb=cl(Ig,{target:"em5sgkm5"})("box-sizing:border-box;position:relative;border-radius:",Tl.radiusSmall,";padding-top:0;&:focus-within:not( :has( :is( ",Qv,", ",Jv," ):focus-within ) ){",tb,"{border-color:",jl.ui.borderFocus,";box-shadow:",Tl.controlBoxShadowFocus,";outline:2px solid transparent;outline-offset:-2px;}}"),rb=({disabled:e})=>bl({backgroundColor:e?jl.ui.backgroundDisabled:jl.ui.background},"","");var ob={name:"1d3w5wq",styles:"width:100%"};const ib=({__unstableInputWidth:e,labelPosition:t})=>e?"side"===t?"":bl("edge"===t?{flex:`0 0 ${e}`}:{width:e},"",""):ob,sb=cl("div",{target:"em5sgkm4"})("align-items:center;box-sizing:border-box;border-radius:inherit;display:flex;flex:1;position:relative;",rb," ",ib,";"),ab=({disabled:e})=>e?bl({color:jl.ui.textDisabled},"",""):"",lb=({inputSize:e})=>{const t={default:"13px",small:"11px",compact:"13px","__unstable-large":"13px"},n=t[e]||t.default;return n?bl("font-size:","16px",";@media ( min-width: 600px ){font-size:",n,";}",""):""},cb=({inputSize:e,__next40pxDefaultSize:t})=>{const n={default:{height:40,lineHeight:1,minHeight:40,paddingLeft:Tl.controlPaddingX,paddingRight:Tl.controlPaddingX},small:{height:24,lineHeight:1,minHeight:24,paddingLeft:Tl.controlPaddingXSmall,paddingRight:Tl.controlPaddingXSmall},compact:{height:32,lineHeight:1,minHeight:32,paddingLeft:Tl.controlPaddingXSmall,paddingRight:Tl.controlPaddingXSmall},"__unstable-large":{height:40,lineHeight:1,minHeight:40,paddingLeft:Tl.controlPaddingX,paddingRight:Tl.controlPaddingX}};return t||(n.default=n.compact),n[e]||n.default},ub=e=>bl(cb(e),"",""),db=({paddingInlineStart:e,paddingInlineEnd:t})=>bl({paddingInlineStart:e,paddingInlineEnd:t},"",""),pb=({isDragging:e,dragCursor:t})=>{let n,r;return e&&(n=bl("cursor:",t,";user-select:none;&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none!important;margin:0!important;}","")),e&&t&&(r=bl("&:active{cursor:",t,";}","")),bl(n," ",r,";","")},fb=cl("input",{target:"em5sgkm3"})("&&&{background-color:transparent;box-sizing:border-box;border:none;box-shadow:none!important;color:",jl.theme.foreground,";display:block;font-family:inherit;margin:0;outline:none;width:100%;",pb," ",ab," ",lb," ",ub," ",db," &::-webkit-input-placeholder{line-height:normal;}}"),hb=cl(Xv,{target:"em5sgkm2"})("&&&{",Zv,";box-sizing:border-box;display:block;padding-top:0;padding-bottom:0;max-width:100%;z-index:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}"),mb=e=>(0,wt.jsx)(hb,{...e,as:"label"}),gb=cl(Gg,{target:"em5sgkm1"})({name:"1b6uupn",styles:"max-width:calc( 100% - 10px )"}),vb=({variant:e="default",size:t,__next40pxDefaultSize:n,isPrefix:r})=>{const{paddingLeft:o}=cb({inputSize:t,__next40pxDefaultSize:n}),i=r?"paddingInlineStart":"paddingInlineEnd";return bl("default"===e?{[i]:o}:{display:"flex",[i]:o-4},"","")},bb=cl("div",{target:"em5sgkm0"})(vb,";");const xb=(0,c.memo)((function({disabled:e=!1,isBorderless:t=!1}){return(0,wt.jsx)(tb,{"aria-hidden":"true",className:"components-input-control__backdrop",disabled:e,isBorderless:t})})),yb=xb;function wb({children:e,hideLabelFromVision:t,htmlFor:n,...r}){return e?t?(0,wt.jsx)(pl,{as:"label",htmlFor:n,children:e}):(0,wt.jsx)(gb,{children:(0,wt.jsx)(mb,{htmlFor:n,...r,children:e})}):null}function _b(e){const{__next36pxDefaultSize:t,__next40pxDefaultSize:n,...r}=e;return{...r,__next40pxDefaultSize:null!=n?n:t}}function Sb(e){const t={};switch(e){case"top":t.direction="column",t.expanded=!1,t.gap=0;break;case"bottom":t.direction="column-reverse",t.expanded=!1,t.gap=0;break;case"edge":t.justify="space-between"}return t}function Cb(e,t){const{__next40pxDefaultSize:n,__unstableInputWidth:r,children:o,className:i,disabled:s=!1,hideLabelFromVision:a=!1,labelPosition:u,id:d,isBorderless:p=!1,label:f,prefix:h,size:m="default",suffix:g,...v}=_b(Ya(e,"InputBase")),b=function(e){const t=(0,l.useInstanceId)(Cb);return e||`input-base-control-${t}`}(d),x=a||!f,y=(0,c.useMemo)((()=>({InputControlPrefixWrapper:{__next40pxDefaultSize:n,size:m},InputControlSuffixWrapper:{__next40pxDefaultSize:n,size:m}})),[n,m]);return(0,wt.jsxs)(nb,{...v,...Sb(u),className:i,gap:2,ref:t,children:[(0,wt.jsx)(wb,{className:"components-input-control__label",hideLabelFromVision:a,labelPosition:u,htmlFor:b,children:f}),(0,wt.jsxs)(sb,{__unstableInputWidth:r,className:"components-input-control__container",disabled:s,hideLabel:x,labelPosition:u,children:[(0,wt.jsxs)(is,{value:y,children:[h&&(0,wt.jsx)(Qv,{className:"components-input-control__prefix",children:h}),o,g&&(0,wt.jsx)(Jv,{className:"components-input-control__suffix",children:g})]}),(0,wt.jsx)(yb,{disabled:s,isBorderless:p})]})]})}const kb=Xa(Cb,"InputBase");const jb={toVector:(e,t)=>(void 0===e&&(e=t),Array.isArray(e)?e:[e,e]),add:(e,t)=>[e[0]+t[0],e[1]+t[1]],sub:(e,t)=>[e[0]-t[0],e[1]-t[1]],addTo(e,t){e[0]+=t[0],e[1]+=t[1]},subTo(e,t){e[0]-=t[0],e[1]-=t[1]}};function Eb(e,t,n){return 0===t||Math.abs(t)===1/0?Math.pow(e,5*n):e*t*n/(t+n*e)}function Pb(e,t,n,r=.15){return 0===r?function(e,t,n){return Math.max(t,Math.min(e,n))}(e,t,n):e<t?-Eb(t-e,n-t,r)+t:e>n?+Eb(e-n,n-t,r)+n:e}function Tb(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function Rb(e,t,n){return(t=Tb(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ib(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Nb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ib(Object(n),!0).forEach((function(t){Rb(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ib(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Mb={pointer:{start:"down",change:"move",end:"up"},mouse:{start:"down",change:"move",end:"up"},touch:{start:"start",change:"move",end:"end"},gesture:{start:"start",change:"change",end:"end"}};function Ab(e){return e?e[0].toUpperCase()+e.slice(1):""}const Db=["enter","leave"];function Ob(e,t="",n=!1){const r=Mb[e],o=r&&r[t]||t;return"on"+Ab(e)+Ab(o)+(function(e=!1,t){return e&&!Db.includes(t)}(n,o)?"Capture":"")}const zb=["gotpointercapture","lostpointercapture"];function Lb(e){let t=e.substring(2).toLowerCase();const n=!!~t.indexOf("passive");n&&(t=t.replace("passive",""));const r=zb.includes(t)?"capturecapture":"capture",o=!!~t.indexOf(r);return o&&(t=t.replace("capture","")),{device:t,capture:o,passive:n}}function Fb(e){return"touches"in e}function Bb(e){return Fb(e)?"touch":"pointerType"in e?e.pointerType:"mouse"}function Vb(e){return Fb(e)?function(e){return"touchend"===e.type||"touchcancel"===e.type?e.changedTouches:e.targetTouches}(e)[0]:e}function $b(e){return function(e){return Array.from(e.touches).filter((t=>{var n,r;return t.target===e.currentTarget||(null===(n=e.currentTarget)||void 0===n||null===(r=n.contains)||void 0===r?void 0:r.call(n,t.target))}))}(e).map((e=>e.identifier))}function Hb(e){const t=Vb(e);return Fb(e)?t.identifier:t.pointerId}function Wb(e){const t=Vb(e);return[t.clientX,t.clientY]}function Ub(e,...t){return"function"==typeof e?e(...t):e}function Gb(){}function Kb(...e){return 0===e.length?Gb:1===e.length?e[0]:function(){let t;for(const n of e)t=n.apply(this,arguments)||t;return t}}function qb(e,t){return Object.assign({},t,e||{})}class Yb{constructor(e,t,n){this.ctrl=e,this.args=t,this.key=n,this.state||(this.state={},this.computeValues([0,0]),this.computeInitial(),this.init&&this.init(),this.reset())}get state(){return this.ctrl.state[this.key]}set state(e){this.ctrl.state[this.key]=e}get shared(){return this.ctrl.state.shared}get eventStore(){return this.ctrl.gestureEventStores[this.key]}get timeoutStore(){return this.ctrl.gestureTimeoutStores[this.key]}get config(){return this.ctrl.config[this.key]}get sharedConfig(){return this.ctrl.config.shared}get handler(){return this.ctrl.handlers[this.key]}reset(){const{state:e,shared:t,ingKey:n,args:r}=this;t[n]=e._active=e.active=e._blocked=e._force=!1,e._step=[!1,!1],e.intentional=!1,e._movement=[0,0],e._distance=[0,0],e._direction=[0,0],e._delta=[0,0],e._bounds=[[-1/0,1/0],[-1/0,1/0]],e.args=r,e.axis=void 0,e.memo=void 0,e.elapsedTime=e.timeDelta=0,e.direction=[0,0],e.distance=[0,0],e.overflow=[0,0],e._movementBound=[!1,!1],e.velocity=[0,0],e.movement=[0,0],e.delta=[0,0],e.timeStamp=0}start(e){const t=this.state,n=this.config;t._active||(this.reset(),this.computeInitial(),t._active=!0,t.target=e.target,t.currentTarget=e.currentTarget,t.lastOffset=n.from?Ub(n.from,t):t.offset,t.offset=t.lastOffset,t.startTime=t.timeStamp=e.timeStamp)}computeValues(e){const t=this.state;t._values=e,t.values=this.config.transform(e)}computeInitial(){const e=this.state;e._initial=e._values,e.initial=e.values}compute(e){const{state:t,config:n,shared:r}=this;t.args=this.args;let o=0;if(e&&(t.event=e,n.preventDefault&&e.cancelable&&t.event.preventDefault(),t.type=e.type,r.touches=this.ctrl.pointerIds.size||this.ctrl.touchIds.size,r.locked=!!document.pointerLockElement,Object.assign(r,function(e){const t={};if("buttons"in e&&(t.buttons=e.buttons),"shiftKey"in e){const{shiftKey:n,altKey:r,metaKey:o,ctrlKey:i}=e;Object.assign(t,{shiftKey:n,altKey:r,metaKey:o,ctrlKey:i})}return t}(e)),r.down=r.pressed=r.buttons%2==1||r.touches>0,o=e.timeStamp-t.timeStamp,t.timeStamp=e.timeStamp,t.elapsedTime=t.timeStamp-t.startTime),t._active){const e=t._delta.map(Math.abs);jb.addTo(t._distance,e)}this.axisIntent&&this.axisIntent(e);const[i,s]=t._movement,[a,l]=n.threshold,{_step:c,values:u}=t;if(n.hasCustomTransform?(!1===c[0]&&(c[0]=Math.abs(i)>=a&&u[0]),!1===c[1]&&(c[1]=Math.abs(s)>=l&&u[1])):(!1===c[0]&&(c[0]=Math.abs(i)>=a&&Math.sign(i)*a),!1===c[1]&&(c[1]=Math.abs(s)>=l&&Math.sign(s)*l)),t.intentional=!1!==c[0]||!1!==c[1],!t.intentional)return;const d=[0,0];if(n.hasCustomTransform){const[e,t]=u;d[0]=!1!==c[0]?e-c[0]:0,d[1]=!1!==c[1]?t-c[1]:0}else d[0]=!1!==c[0]?i-c[0]:0,d[1]=!1!==c[1]?s-c[1]:0;this.restrictToAxis&&!t._blocked&&this.restrictToAxis(d);const p=t.offset,f=t._active&&!t._blocked||t.active;f&&(t.first=t._active&&!t.active,t.last=!t._active&&t.active,t.active=r[this.ingKey]=t._active,e&&(t.first&&("bounds"in n&&(t._bounds=Ub(n.bounds,t)),this.setup&&this.setup()),t.movement=d,this.computeOffset()));const[h,m]=t.offset,[[g,v],[b,x]]=t._bounds;t.overflow=[h<g?-1:h>v?1:0,m<b?-1:m>x?1:0],t._movementBound[0]=!!t.overflow[0]&&(!1===t._movementBound[0]?t._movement[0]:t._movementBound[0]),t._movementBound[1]=!!t.overflow[1]&&(!1===t._movementBound[1]?t._movement[1]:t._movementBound[1]);const y=t._active&&n.rubberband||[0,0];if(t.offset=function(e,[t,n],[r,o]){const[[i,s],[a,l]]=e;return[Pb(t,i,s,r),Pb(n,a,l,o)]}(t._bounds,t.offset,y),t.delta=jb.sub(t.offset,p),this.computeMovement(),f&&(!t.last||o>32)){t.delta=jb.sub(t.offset,p);const e=t.delta.map(Math.abs);jb.addTo(t.distance,e),t.direction=t.delta.map(Math.sign),t._direction=t._delta.map(Math.sign),!t.first&&o>0&&(t.velocity=[e[0]/o,e[1]/o],t.timeDelta=o)}}emit(){const e=this.state,t=this.shared,n=this.config;if(e._active||this.clean(),(e._blocked||!e.intentional)&&!e._force&&!n.triggerAllEvents)return;const r=this.handler(Nb(Nb(Nb({},t),e),{},{[this.aliasKey]:e.values}));void 0!==r&&(e.memo=r)}clean(){this.eventStore.clean(),this.timeoutStore.clean()}}class Xb extends Yb{constructor(...e){super(...e),Rb(this,"aliasKey","xy")}reset(){super.reset(),this.state.axis=void 0}init(){this.state.offset=[0,0],this.state.lastOffset=[0,0]}computeOffset(){this.state.offset=jb.add(this.state.lastOffset,this.state.movement)}computeMovement(){this.state.movement=jb.sub(this.state.offset,this.state.lastOffset)}axisIntent(e){const t=this.state,n=this.config;if(!t.axis&&e){const r="object"==typeof n.axisThreshold?n.axisThreshold[Bb(e)]:n.axisThreshold;t.axis=function([e,t],n){const r=Math.abs(e),o=Math.abs(t);return r>o&&r>n?"x":o>r&&o>n?"y":void 0}(t._movement,r)}t._blocked=(n.lockDirection||!!n.axis)&&!t.axis||!!n.axis&&n.axis!==t.axis}restrictToAxis(e){if(this.config.axis||this.config.lockDirection)switch(this.state.axis){case"x":e[1]=0;break;case"y":e[0]=0}}}const Zb=e=>e,Qb={enabled:(e=!0)=>e,eventOptions:(e,t,n)=>Nb(Nb({},n.shared.eventOptions),e),preventDefault:(e=!1)=>e,triggerAllEvents:(e=!1)=>e,rubberband(e=0){switch(e){case!0:return[.15,.15];case!1:return[0,0];default:return jb.toVector(e)}},from:e=>"function"==typeof e?e:null!=e?jb.toVector(e):void 0,transform(e,t,n){const r=e||n.shared.transform;return this.hasCustomTransform=!!r,r||Zb},threshold:e=>jb.toVector(e,0)};const Jb=Nb(Nb({},Qb),{},{axis(e,t,{axis:n}){if(this.lockDirection="lock"===n,!this.lockDirection)return n},axisThreshold:(e=0)=>e,bounds(e={}){if("function"==typeof e)return t=>Jb.bounds(e(t));if("current"in e)return()=>e.current;if("function"==typeof HTMLElement&&e instanceof HTMLElement)return e;const{left:t=-1/0,right:n=1/0,top:r=-1/0,bottom:o=1/0}=e;return[[t,n],[r,o]]}}),ex={ArrowRight:(e,t=1)=>[e*t,0],ArrowLeft:(e,t=1)=>[-1*e*t,0],ArrowUp:(e,t=1)=>[0,-1*e*t],ArrowDown:(e,t=1)=>[0,e*t]};const tx="undefined"!=typeof window&&window.document&&window.document.createElement;function nx(){return tx&&"ontouchstart"in window}const rx={isBrowser:tx,gesture:function(){try{return"constructor"in GestureEvent}catch(e){return!1}}(),touch:nx(),touchscreen:nx()||tx&&window.navigator.maxTouchPoints>1,pointer:tx&&"onpointerdown"in window,pointerLock:tx&&"exitPointerLock"in window.document},ox={mouse:0,touch:0,pen:8},ix=Nb(Nb({},Jb),{},{device(e,t,{pointer:{touch:n=!1,lock:r=!1,mouse:o=!1}={}}){return this.pointerLock=r&&rx.pointerLock,rx.touch&&n?"touch":this.pointerLock?"mouse":rx.pointer&&!o?"pointer":rx.touch?"touch":"mouse"},preventScrollAxis(e,t,{preventScroll:n}){if(this.preventScrollDelay="number"==typeof n?n:n||void 0===n&&e?250:void 0,rx.touchscreen&&!1!==n)return e||(void 0!==n?"y":void 0)},pointerCapture(e,t,{pointer:{capture:n=!0,buttons:r=1,keys:o=!0}={}}){return this.pointerButtons=r,this.keys=o,!this.pointerLock&&"pointer"===this.device&&n},threshold(e,t,{filterTaps:n=!1,tapsThreshold:r=3,axis:o}){const i=jb.toVector(e,n?r:o?1:0);return this.filterTaps=n,this.tapsThreshold=r,i},swipe({velocity:e=.5,distance:t=50,duration:n=250}={}){return{velocity:this.transform(jb.toVector(e)),distance:this.transform(jb.toVector(t)),duration:n}},delay(e=0){switch(e){case!0:return 180;case!1:return 0;default:return e}},axisThreshold:e=>e?Nb(Nb({},ox),e):ox,keyboardDisplacement:(e=10)=>e});Nb(Nb({},Qb),{},{device(e,t,{shared:n,pointer:{touch:r=!1}={}}){if(n.target&&!rx.touch&&rx.gesture)return"gesture";if(rx.touch&&r)return"touch";if(rx.touchscreen){if(rx.pointer)return"pointer";if(rx.touch)return"touch"}},bounds(e,t,{scaleBounds:n={},angleBounds:r={}}){const o=e=>{const t=qb(Ub(n,e),{min:-1/0,max:1/0});return[t.min,t.max]},i=e=>{const t=qb(Ub(r,e),{min:-1/0,max:1/0});return[t.min,t.max]};return"function"!=typeof n&&"function"!=typeof r?[o(),i()]:e=>[o(e),i(e)]},threshold(e,t,n){this.lockDirection="lock"===n.axis;return jb.toVector(e,this.lockDirection?[.1,3]:0)},modifierKey:e=>void 0===e?"ctrlKey":e,pinchOnWheel:(e=!0)=>e});Nb(Nb({},Jb),{},{mouseOnly:(e=!0)=>e});Nb(Nb({},Jb),{},{mouseOnly:(e=!0)=>e});const sx=new Map,ax=new Map;const lx={key:"drag",engine:class extends Xb{constructor(...e){super(...e),Rb(this,"ingKey","dragging")}reset(){super.reset();const e=this.state;e._pointerId=void 0,e._pointerActive=!1,e._keyboardActive=!1,e._preventScroll=!1,e._delayed=!1,e.swipe=[0,0],e.tap=!1,e.canceled=!1,e.cancel=this.cancel.bind(this)}setup(){const e=this.state;if(e._bounds instanceof HTMLElement){const t=e._bounds.getBoundingClientRect(),n=e.currentTarget.getBoundingClientRect(),r={left:t.left-n.left+e.offset[0],right:t.right-n.right+e.offset[0],top:t.top-n.top+e.offset[1],bottom:t.bottom-n.bottom+e.offset[1]};e._bounds=Jb.bounds(r)}}cancel(){const e=this.state;e.canceled||(e.canceled=!0,e._active=!1,setTimeout((()=>{this.compute(),this.emit()}),0))}setActive(){this.state._active=this.state._pointerActive||this.state._keyboardActive}clean(){this.pointerClean(),this.state._pointerActive=!1,this.state._keyboardActive=!1,super.clean()}pointerDown(e){const t=this.config,n=this.state;if(null!=e.buttons&&(Array.isArray(t.pointerButtons)?!t.pointerButtons.includes(e.buttons):-1!==t.pointerButtons&&t.pointerButtons!==e.buttons))return;const r=this.ctrl.setEventIds(e);t.pointerCapture&&e.target.setPointerCapture(e.pointerId),r&&r.size>1&&n._pointerActive||(this.start(e),this.setupPointer(e),n._pointerId=Hb(e),n._pointerActive=!0,this.computeValues(Wb(e)),this.computeInitial(),t.preventScrollAxis&&"mouse"!==Bb(e)?(n._active=!1,this.setupScrollPrevention(e)):t.delay>0?(this.setupDelayTrigger(e),t.triggerAllEvents&&(this.compute(e),this.emit())):this.startPointerDrag(e))}startPointerDrag(e){const t=this.state;t._active=!0,t._preventScroll=!0,t._delayed=!1,this.compute(e),this.emit()}pointerMove(e){const t=this.state,n=this.config;if(!t._pointerActive)return;const r=Hb(e);if(void 0!==t._pointerId&&r!==t._pointerId)return;const o=Wb(e);return document.pointerLockElement===e.target?t._delta=[e.movementX,e.movementY]:(t._delta=jb.sub(o,t._values),this.computeValues(o)),jb.addTo(t._movement,t._delta),this.compute(e),t._delayed&&t.intentional?(this.timeoutStore.remove("dragDelay"),t.active=!1,void this.startPointerDrag(e)):n.preventScrollAxis&&!t._preventScroll?t.axis?t.axis===n.preventScrollAxis||"xy"===n.preventScrollAxis?(t._active=!1,void this.clean()):(this.timeoutStore.remove("startPointerDrag"),void this.startPointerDrag(e)):void 0:void this.emit()}pointerUp(e){this.ctrl.setEventIds(e);try{this.config.pointerCapture&&e.target.hasPointerCapture(e.pointerId)&&e.target.releasePointerCapture(e.pointerId)}catch(e){0}const t=this.state,n=this.config;if(!t._active||!t._pointerActive)return;const r=Hb(e);if(void 0!==t._pointerId&&r!==t._pointerId)return;this.state._pointerActive=!1,this.setActive(),this.compute(e);const[o,i]=t._distance;if(t.tap=o<=n.tapsThreshold&&i<=n.tapsThreshold,t.tap&&n.filterTaps)t._force=!0;else{const[e,r]=t._delta,[o,i]=t._movement,[s,a]=n.swipe.velocity,[l,c]=n.swipe.distance,u=n.swipe.duration;if(t.elapsedTime<u){const n=Math.abs(e/t.timeDelta),u=Math.abs(r/t.timeDelta);n>s&&Math.abs(o)>l&&(t.swipe[0]=Math.sign(e)),u>a&&Math.abs(i)>c&&(t.swipe[1]=Math.sign(r))}}this.emit()}pointerClick(e){!this.state.tap&&e.detail>0&&(e.preventDefault(),e.stopPropagation())}setupPointer(e){const t=this.config,n=t.device;t.pointerLock&&e.currentTarget.requestPointerLock(),t.pointerCapture||(this.eventStore.add(this.sharedConfig.window,n,"change",this.pointerMove.bind(this)),this.eventStore.add(this.sharedConfig.window,n,"end",this.pointerUp.bind(this)),this.eventStore.add(this.sharedConfig.window,n,"cancel",this.pointerUp.bind(this)))}pointerClean(){this.config.pointerLock&&document.pointerLockElement===this.state.currentTarget&&document.exitPointerLock()}preventScroll(e){this.state._preventScroll&&e.cancelable&&e.preventDefault()}setupScrollPrevention(e){this.state._preventScroll=!1,function(e){"persist"in e&&"function"==typeof e.persist&&e.persist()}(e);const t=this.eventStore.add(this.sharedConfig.window,"touch","change",this.preventScroll.bind(this),{passive:!1});this.eventStore.add(this.sharedConfig.window,"touch","end",t),this.eventStore.add(this.sharedConfig.window,"touch","cancel",t),this.timeoutStore.add("startPointerDrag",this.startPointerDrag.bind(this),this.config.preventScrollDelay,e)}setupDelayTrigger(e){this.state._delayed=!0,this.timeoutStore.add("dragDelay",(()=>{this.state._step=[0,0],this.startPointerDrag(e)}),this.config.delay)}keyDown(e){const t=ex[e.key];if(t){const n=this.state,r=e.shiftKey?10:e.altKey?.1:1;this.start(e),n._delta=t(this.config.keyboardDisplacement,r),n._keyboardActive=!0,jb.addTo(n._movement,n._delta),this.compute(e),this.emit()}}keyUp(e){e.key in ex&&(this.state._keyboardActive=!1,this.setActive(),this.compute(e),this.emit())}bind(e){const t=this.config.device;e(t,"start",this.pointerDown.bind(this)),this.config.pointerCapture&&(e(t,"change",this.pointerMove.bind(this)),e(t,"end",this.pointerUp.bind(this)),e(t,"cancel",this.pointerUp.bind(this)),e("lostPointerCapture","",this.pointerUp.bind(this))),this.config.keys&&(e("key","down",this.keyDown.bind(this)),e("key","up",this.keyUp.bind(this))),this.config.filterTaps&&e("click","",this.pointerClick.bind(this),{capture:!0,passive:!1})}},resolver:ix};function cx(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}const ux={target(e){if(e)return()=>"current"in e?e.current:e},enabled:(e=!0)=>e,window:(e=(rx.isBrowser?window:void 0))=>e,eventOptions:({passive:e=!0,capture:t=!1}={})=>({passive:e,capture:t}),transform:e=>e},dx=["target","eventOptions","window","enabled","transform"];function px(e={},t){const n={};for(const[r,o]of Object.entries(t))switch(typeof o){case"function":n[r]=o.call(n,e[r],r,e);break;case"object":n[r]=px(e[r],o);break;case"boolean":o&&(n[r]=e[r])}return n}class fx{constructor(e,t){Rb(this,"_listeners",new Set),this._ctrl=e,this._gestureKey=t}add(e,t,n,r,o){const i=this._listeners,s=function(e,t=""){const n=Mb[e];return e+(n&&n[t]||t)}(t,n),a=Nb(Nb({},this._gestureKey?this._ctrl.config[this._gestureKey].eventOptions:{}),o);e.addEventListener(s,r,a);const l=()=>{e.removeEventListener(s,r,a),i.delete(l)};return i.add(l),l}clean(){this._listeners.forEach((e=>e())),this._listeners.clear()}}class hx{constructor(){Rb(this,"_timeouts",new Map)}add(e,t,n=140,...r){this.remove(e),this._timeouts.set(e,window.setTimeout(t,n,...r))}remove(e){const t=this._timeouts.get(e);t&&window.clearTimeout(t)}clean(){this._timeouts.forEach((e=>{window.clearTimeout(e)})),this._timeouts.clear()}}class mx{constructor(e){Rb(this,"gestures",new Set),Rb(this,"_targetEventStore",new fx(this)),Rb(this,"gestureEventStores",{}),Rb(this,"gestureTimeoutStores",{}),Rb(this,"handlers",{}),Rb(this,"config",{}),Rb(this,"pointerIds",new Set),Rb(this,"touchIds",new Set),Rb(this,"state",{shared:{shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1}}),function(e,t){t.drag&&gx(e,"drag");t.wheel&&gx(e,"wheel");t.scroll&&gx(e,"scroll");t.move&&gx(e,"move");t.pinch&&gx(e,"pinch");t.hover&&gx(e,"hover")}(this,e)}setEventIds(e){return Fb(e)?(this.touchIds=new Set($b(e)),this.touchIds):"pointerId"in e?("pointerup"===e.type||"pointercancel"===e.type?this.pointerIds.delete(e.pointerId):"pointerdown"===e.type&&this.pointerIds.add(e.pointerId),this.pointerIds):void 0}applyHandlers(e,t){this.handlers=e,this.nativeHandlers=t}applyConfig(e,t){this.config=function(e,t,n={}){const r=e,{target:o,eventOptions:i,window:s,enabled:a,transform:l}=r,c=cx(r,dx);if(n.shared=px({target:o,eventOptions:i,window:s,enabled:a,transform:l},ux),t){const e=ax.get(t);n[t]=px(Nb({shared:n.shared},c),e)}else for(const e in c){const t=ax.get(e);t&&(n[e]=px(Nb({shared:n.shared},c[e]),t))}return n}(e,t,this.config)}clean(){this._targetEventStore.clean();for(const e of this.gestures)this.gestureEventStores[e].clean(),this.gestureTimeoutStores[e].clean()}effect(){return this.config.shared.target&&this.bind(),()=>this._targetEventStore.clean()}bind(...e){const t=this.config.shared,n={};let r;if(!t.target||(r=t.target(),r)){if(t.enabled){for(const t of this.gestures){const o=this.config[t],i=vx(n,o.eventOptions,!!r);if(o.enabled){new(sx.get(t))(this,e,t).bind(i)}}const o=vx(n,t.eventOptions,!!r);for(const t in this.nativeHandlers)o(t,"",(n=>this.nativeHandlers[t](Nb(Nb({},this.state.shared),{},{event:n,args:e}))),void 0,!0)}for(const e in n)n[e]=Kb(...n[e]);if(!r)return n;for(const e in n){const{device:t,capture:o,passive:i}=Lb(e);this._targetEventStore.add(r,t,"",n[e],{capture:o,passive:i})}}}}function gx(e,t){e.gestures.add(t),e.gestureEventStores[t]=new fx(e,t),e.gestureTimeoutStores[t]=new hx}const vx=(e,t,n)=>(r,o,i,s={},a=!1)=>{var l,c;const u=null!==(l=s.capture)&&void 0!==l?l:t.capture,d=null!==(c=s.passive)&&void 0!==c?c:t.passive;let p=a?r:Ob(r,o,u);n&&d&&(p+="Passive"),e[p]=e[p]||[],e[p].push(i)};function bx(e,t={},n,r){const o=$().useMemo((()=>new mx(e)),[]);if(o.applyHandlers(e,r),o.applyConfig(t,n),$().useEffect(o.effect.bind(o)),$().useEffect((()=>o.clean.bind(o)),[]),void 0===t.target)return o.bind.bind(o)}function xx(e,t){var n;return n=lx,sx.set(n.key,n.engine),ax.set(n.key,n.resolver),bx({drag:e},t||{},"drag")}const yx=e=>e,wx={error:null,initialValue:"",isDirty:!1,isDragEnabled:!1,isDragging:!1,isPressEnterToChange:!1,value:""},_x="CHANGE",Sx="COMMIT",Cx="CONTROL",kx="DRAG_END",jx="DRAG_START",Ex="DRAG",Px="INVALIDATE",Tx="PRESS_DOWN",Rx="PRESS_ENTER",Ix="PRESS_UP",Nx="RESET";function Mx(e=yx,t=wx,n){const[r,o]=(0,c.useReducer)((i=e,(e,t)=>{const n={...e};switch(t.type){case Cx:return n.value=t.payload.value,n.isDirty=!1,n._event=void 0,n;case Ix:case Tx:n.isDirty=!1;break;case jx:n.isDragging=!0;break;case kx:n.isDragging=!1;break;case _x:n.error=null,n.value=t.payload.value,e.isPressEnterToChange&&(n.isDirty=!0);break;case Sx:n.value=t.payload.value,n.isDirty=!1;break;case Nx:n.error=null,n.isDirty=!1,n.value=t.payload.value||e.initialValue;break;case Px:n.error=t.payload.error}return n._event=t.payload.event,i(n,t)}),function(e=wx){const{value:t}=e;return{...wx,...e,initialValue:t}}(t));var i;const s=e=>(t,n)=>{o({type:e,payload:{value:t,event:n}})},a=e=>t=>{o({type:e,payload:{event:t}})},l=e=>t=>{o({type:e,payload:t})},u=s(_x),d=s(Nx),p=s(Sx),f=l(jx),h=l(Ex),m=l(kx),g=a(Ix),v=a(Tx),b=a(Rx),x=(0,c.useRef)(r),y=(0,c.useRef)({value:t.value,onChangeHandler:n});return(0,c.useLayoutEffect)((()=>{x.current=r,y.current={value:t.value,onChangeHandler:n}})),(0,c.useLayoutEffect)((()=>{var e;void 0===x.current._event||r.value===y.current.value||r.isDirty||y.current.onChangeHandler(null!==(e=r.value)&&void 0!==e?e:"",{event:x.current._event})}),[r.value,r.isDirty]),(0,c.useLayoutEffect)((()=>{var e;t.value===x.current.value||x.current.isDirty||o({type:Cx,payload:{value:null!==(e=t.value)&&void 0!==e?e:""}})}),[t.value]),{change:u,commit:p,dispatch:o,drag:h,dragEnd:m,dragStart:f,invalidate:(e,t)=>o({type:Px,payload:{error:e,event:t}}),pressDown:v,pressEnter:b,pressUp:g,reset:d,state:r}}function Ax(e){return t=>{const{isComposing:n}="nativeEvent"in t?t.nativeEvent:t;n||229===t.keyCode||e(t)}}const Dx=()=>{};const Ox=(0,c.forwardRef)((function({disabled:e=!1,dragDirection:t="n",dragThreshold:n=10,id:r,isDragEnabled:o=!1,isPressEnterToChange:i=!1,onBlur:s=Dx,onChange:a=Dx,onDrag:l=Dx,onDragEnd:u=Dx,onDragStart:d=Dx,onKeyDown:p=Dx,onValidate:f=Dx,size:h="default",stateReducer:m=(e=>e),value:g,type:v,...b},x){const{state:y,change:w,commit:_,drag:S,dragEnd:C,dragStart:k,invalidate:j,pressDown:E,pressEnter:P,pressUp:T,reset:R}=Mx(m,{isDragEnabled:o,value:g,isPressEnterToChange:i},a),{value:I,isDragging:N,isDirty:M}=y,A=(0,c.useRef)(!1),D=function(e,t){const n=function(e){let t="ns-resize";switch(e){case"n":case"s":t="ns-resize";break;case"e":case"w":t="ew-resize"}return t}(t);return(0,c.useEffect)((()=>{document.documentElement.style.cursor=e?n:null}),[e,n]),n}(N,t),O=e=>{const t=e.currentTarget.value;try{f(t),_(t,e)}catch(t){j(t,e)}},z=xx((e=>{const{distance:t,dragging:n,event:r,target:o}=e;if(e.event={...e.event,target:o},t){if(r.stopPropagation(),!n)return u(e),void C(e);l(e),S(e),N||(d(e),k(e))}}),{axis:"e"===t||"w"===t?"x":"y",threshold:n,enabled:o,pointer:{capture:!1}}),L=o?z():{};let F;return"number"===v&&(F=e=>{b.onMouseDown?.(e),e.currentTarget!==e.currentTarget.ownerDocument.activeElement&&e.currentTarget.focus()}),(0,wt.jsx)(fb,{...b,...L,className:"components-input-control__input",disabled:e,dragCursor:D,isDragging:N,id:r,onBlur:e=>{s(e),!M&&e.target.validity.valid||(A.current=!0,O(e))},onChange:e=>{const t=e.target.value;w(t,e)},onKeyDown:Ax((e=>{const{key:t}=e;switch(p(e),t){case"ArrowUp":T(e);break;case"ArrowDown":E(e);break;case"Enter":P(e),i&&(e.preventDefault(),O(e));break;case"Escape":i&&M&&(e.preventDefault(),R(g,e))}})),onMouseDown:F,ref:x,inputSize:h,value:null!=I?I:"",type:v})})),zx=Ox,Lx={"default.fontFamily":"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif","default.fontSize":"13px","helpText.fontSize":"12px",mobileTextMinFontSize:"16px"};function Fx(e){var t;return null!==(t=Lx[e])&&void 0!==t?t:""}const Bx={name:"kv6lnz",styles:"box-sizing:border-box;*,*::before,*::after{box-sizing:inherit;}"};const Vx=cl("div",{target:"ej5x27r4"})("font-family:",Fx("default.fontFamily"),";font-size:",Fx("default.fontSize"),";",Bx,";"),$x=({__nextHasNoMarginBottom:e=!1})=>!e&&bl("margin-bottom:",wl(2),";",""),Hx=cl("div",{target:"ej5x27r3"})($x," .components-panel__row &{margin-bottom:inherit;}"),Wx=bl(Zv,";display:block;margin-bottom:",wl(2),";padding:0;",""),Ux=cl("label",{target:"ej5x27r2"})(Wx,";");var Gx={name:"11yad0w",styles:"margin-bottom:revert"};const Kx=({__nextHasNoMarginBottom:e=!1})=>!e&&Gx,qx=cl("p",{target:"ej5x27r1"})("margin-top:",wl(2),";margin-bottom:0;font-size:",Fx("helpText.fontSize"),";font-style:normal;color:",jl.gray[700],";",Kx,";"),Yx=cl("span",{target:"ej5x27r0"})(Wx,";"),Xx=(0,c.forwardRef)(((e,t)=>{const{className:n,children:r,...o}=e;return(0,wt.jsx)(Yx,{ref:t,...o,className:s("components-base-control__label",n),children:r})})),Zx=Object.assign(Za((e=>{const{__nextHasNoMarginBottom:t=!1,__associatedWPComponentName:n="BaseControl",id:r,label:o,hideLabelFromVision:i=!1,help:s,className:a,children:l}=Ya(e,"BaseControl");return t||Fi()(`Bottom margin styles for wp.components.${n}`,{since:"6.7",version:"7.0",hint:"Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version."}),(0,wt.jsxs)(Vx,{className:a,children:[(0,wt.jsxs)(Hx,{className:"components-base-control__field",__nextHasNoMarginBottom:t,children:[o&&r&&(i?(0,wt.jsx)(pl,{as:"label",htmlFor:r,children:o}):(0,wt.jsx)(Ux,{className:"components-base-control__label",htmlFor:r,children:o})),o&&!r&&(i?(0,wt.jsx)(pl,{as:"label",children:o}):(0,wt.jsx)(Xx,{children:o})),l]}),!!s&&(0,wt.jsx)(qx,{id:r?r+"__help":void 0,className:"components-base-control__help",__nextHasNoMarginBottom:t,children:s})]})}),"BaseControl"),{VisualLabel:Xx}),Qx=Zx,Jx=()=>{};const ey=(0,c.forwardRef)((function(e,t){const{__next40pxDefaultSize:n,__unstableStateReducer:r=(e=>e),__unstableInputWidth:o,className:i,disabled:a=!1,help:u,hideLabelFromVision:d=!1,id:p,isPressEnterToChange:f=!1,label:h,labelPosition:m="top",onChange:g=Jx,onValidate:v=Jx,onKeyDown:b=Jx,prefix:x,size:y="default",style:w,suffix:_,value:S,...C}=_b(e),k=function(e){const t=(0,l.useInstanceId)(ey);return e||`inspector-input-control-${t}`}(p),j=s("components-input-control",i),E=function(e){const t=(0,c.useRef)(e.value),[n,r]=(0,c.useState)({}),o=void 0!==n.value?n.value:e.value;return(0,c.useLayoutEffect)((()=>{const{current:o}=t;t.current=e.value,void 0===n.value||n.isStale?n.isStale&&e.value!==o&&r({}):r({...n,isStale:!0})}),[e.value,n]),{value:o,onBlur:t=>{r({}),e.onBlur?.(t)},onChange:(t,n)=>{r((e=>Object.assign(e,{value:t,isStale:!1}))),e.onChange(t,n)}}}({value:S,onBlur:C.onBlur,onChange:g}),P=u?{"aria-describedby":`${k}__help`}:{};return(0,wt.jsx)(Qx,{className:j,help:u,id:k,__nextHasNoMarginBottom:!0,children:(0,wt.jsx)(kb,{__next40pxDefaultSize:n,__unstableInputWidth:o,disabled:a,gap:3,hideLabelFromVision:d,id:k,justify:"left",label:h,labelPosition:m,prefix:x,size:y,style:w,suffix:_,children:(0,wt.jsx)(zx,{...C,...P,__next40pxDefaultSize:n,className:"components-input-control__input",disabled:a,id:k,isPressEnterToChange:f,onKeyDown:b,onValidate:v,paddingInlineStart:x?wl(1):void 0,paddingInlineEnd:_?wl(1):void 0,ref:t,size:y,stateReducer:r,...E})})})})),ty=ey;const ny=function({icon:e,className:t,size:n=20,style:r={},...o}){const i=["dashicon","dashicons","dashicons-"+e,t].filter(Boolean).join(" "),s={...20!=n?{fontSize:`${n}px`,width:`${n}px`,height:`${n}px`}:{},...r};return(0,wt.jsx)("span",{className:i,style:s,...o})};const ry=function({icon:e=null,size:t=("string"==typeof e?20:24),...r}){if("string"==typeof e)return(0,wt.jsx)(ny,{icon:e,size:t,...r});if((0,c.isValidElement)(e)&&ny===e.type)return(0,c.cloneElement)(e,{...r});if("function"==typeof e)return(0,c.createElement)(e,{size:t,...r});if(e&&("svg"===e.type||e.type===n.SVG)){const o={...e.props,width:t,height:t,...r};return(0,wt.jsx)(n.SVG,{...o})}return(0,c.isValidElement)(e)?(0,c.cloneElement)(e,{size:t,...r}):e},oy=["onMouseDown","onClick"];const iy=(0,c.forwardRef)((function(e,t){const{__next40pxDefaultSize:n,accessibleWhenDisabled:r,isBusy:o,isDestructive:i,className:a,disabled:c,icon:u,iconPosition:d="left",iconSize:p,showTooltip:f,tooltipPosition:h,shortcut:m,label:g,children:v,size:b="default",text:x,variant:y,description:w,..._}=function({__experimentalIsFocusable:e,isDefault:t,isPrimary:n,isSecondary:r,isTertiary:o,isLink:i,isPressed:s,isSmall:a,size:l,variant:c,describedBy:u,...d}){let p=l,f=c;const h={accessibleWhenDisabled:e,"aria-pressed":s,description:u};var m,g,v,b,x,y;return a&&(null!==(m=p)&&void 0!==m||(p="small")),n&&(null!==(g=f)&&void 0!==g||(f="primary")),o&&(null!==(v=f)&&void 0!==v||(f="tertiary")),r&&(null!==(b=f)&&void 0!==b||(f="secondary")),t&&(Fi()("wp.components.Button `isDefault` prop",{since:"5.4",alternative:'variant="secondary"'}),null!==(x=f)&&void 0!==x||(f="secondary")),i&&(null!==(y=f)&&void 0!==y||(f="link")),{...h,...d,size:p,variant:f}}(e),{href:S,target:C,"aria-checked":k,"aria-pressed":j,"aria-selected":E,...P}="href"in _?_:{href:void 0,target:void 0,..._},T=(0,l.useInstanceId)(iy,"components-button__description"),R="string"==typeof v&&!!v||Array.isArray(v)&&v?.[0]&&null!==v[0]&&"components-tooltip"!==v?.[0]?.props?.className,I=s("components-button",a,{"is-next-40px-default-size":n,"is-secondary":"secondary"===y,"is-primary":"primary"===y,"is-small":"small"===b,"is-compact":"compact"===b,"is-tertiary":"tertiary"===y,"is-pressed":[!0,"true","mixed"].includes(j),"is-pressed-mixed":"mixed"===j,"is-busy":o,"is-link":"link"===y,"is-destructive":i,"has-text":!!u&&(R||x),"has-icon":!!u}),N=c&&!r,M=void 0===S||c?"button":"a",A="button"===M?{type:"button",disabled:N,"aria-checked":k,"aria-pressed":j,"aria-selected":E}:{},D="a"===M?{href:S,target:C}:{},O={};if(c&&r){A["aria-disabled"]=!0,D["aria-disabled"]=!0;for(const e of oy)O[e]=e=>{e&&(e.stopPropagation(),e.preventDefault())}}const z=!N&&(f&&!!g||!!m||!!g&&!v?.length&&!1!==f),L=w?T:void 0,F=P["aria-describedby"]||L,B={className:I,"aria-label":P["aria-label"]||g,"aria-describedby":F,ref:t},V=(0,wt.jsxs)(wt.Fragment,{children:[u&&"left"===d&&(0,wt.jsx)(ry,{icon:u,size:p}),x&&(0,wt.jsx)(wt.Fragment,{children:x}),v,u&&"right"===d&&(0,wt.jsx)(ry,{icon:u,size:p})]}),$="a"===M?(0,wt.jsx)("a",{...D,...P,...O,...B,children:V}):(0,wt.jsx)("button",{...A,...P,...O,...B,children:V}),H=z?{text:v?.length&&w?w:g,shortcut:m,placement:h&&$i(h)}:{};return(0,wt.jsxs)(wt.Fragment,{children:[(0,wt.jsx)(Yi,{...H,children:$}),w&&(0,wt.jsx)(pl,{children:(0,wt.jsx)("span",{id:L,children:w})})]})})),sy=iy;var ay={name:"euqsgg",styles:"input[type='number']::-webkit-outer-spin-button,input[type='number']::-webkit-inner-spin-button{-webkit-appearance:none!important;margin:0!important;}input[type='number']{-moz-appearance:textfield;}"};const ly=({hideHTMLArrows:e})=>e?ay:"",cy=cl(ty,{target:"ep09it41"})(ly,";"),uy=cl(sy,{target:"ep09it40"})("&&&&&{color:",jl.theme.accent,";}"),dy={smallSpinButtons:bl("width:",wl(5),";min-width:",wl(5),";height:",wl(5),";","")};function py(e){const t=Number(e);return isNaN(t)?0:t}function fy(...e){return e.reduce(((e,t)=>e+py(t)),0)}function hy(e,t,n){const r=py(e);return Math.max(t,Math.min(r,n))}function my(e=0,t=1/0,n=1/0,r=1){const o=py(e),i=py(r),s=function(e){const t=(e+"").split(".");return void 0!==t[1]?t[1].length:0}(r),a=hy(Math.round(o/i)*i,t,n);return s?py(a.toFixed(s)):a}const gy={bottom:{align:"flex-end",justify:"center"},bottomLeft:{align:"flex-end",justify:"flex-start"},bottomRight:{align:"flex-end",justify:"flex-end"},center:{align:"center",justify:"center"},edge:{align:"center",justify:"space-between"},left:{align:"center",justify:"flex-start"},right:{align:"center",justify:"flex-end"},stretch:{align:"stretch"},top:{align:"flex-start",justify:"center"},topLeft:{align:"flex-start",justify:"flex-start"},topRight:{align:"flex-start",justify:"flex-end"}},vy={bottom:{justify:"flex-end",align:"center"},bottomLeft:{justify:"flex-end",align:"flex-start"},bottomRight:{justify:"flex-end",align:"flex-end"},center:{justify:"center",align:"center"},edge:{justify:"space-between",align:"center"},left:{justify:"center",align:"flex-start"},right:{justify:"center",align:"flex-end"},stretch:{align:"stretch"},top:{justify:"flex-start",align:"center"},topLeft:{justify:"flex-start",align:"flex-start"},topRight:{justify:"flex-start",align:"flex-end"}};function by(e){return"string"==typeof e?[e]:c.Children.toArray(e).filter((e=>(0,c.isValidElement)(e)))}function xy(e){const{alignment:t="edge",children:n,direction:r,spacing:o=2,...i}=Ya(e,"HStack"),s=function(e,t="row"){if(!qg(e))return{};const n="column"===t?vy:gy;return e in n?n[e]:{align:e}}(t,r),a=by(n).map(((e,t)=>{if(el(e,["Spacer"])){const n=e,r=n.key||`hstack-${t}`;return(0,wt.jsx)(Gg,{isBlock:!0,...n.props},r)}return e})),l={children:a,direction:r,justify:"center",...s,...i,gap:o},{isColumn:c,...u}=Pg(l);return u}const yy=Xa((function(e,t){const n=xy(e);return(0,wt.jsx)(dl,{...n,ref:t})}),"HStack"),wy=()=>{};const _y=(0,c.forwardRef)((function(e,t){const{__unstableStateReducer:n,className:r,dragDirection:o="n",hideHTMLArrows:i=!1,spinControls:u=(i?"none":"native"),isDragEnabled:d=!0,isShiftStepEnabled:p=!0,label:f,max:h=1/0,min:m=-1/0,required:g=!1,shiftStep:v=10,step:b=1,spinFactor:x=1,type:y="number",value:w,size:_="default",suffix:S,onChange:C=wy,...k}=_b(e);i&&Fi()("wp.components.NumberControl hideHTMLArrows prop ",{alternative:'spinControls="none"',since:"6.2",version:"6.3"});const j=(0,c.useRef)(),E=(0,l.useMergeRefs)([j,t]),P="any"===b,T=P?1:Yg(b),R=Yg(x)*T,I=my(0,m,h,T),N=(e,t)=>P?""+Math.min(h,Math.max(m,Yg(e))):""+my(e,m,h,null!=t?t:T),M="number"===y?"off":void 0,A=s("components-number-control",r),D=qa()("small"===_&&dy.smallSpinButtons),O=(e,t,n)=>{n?.preventDefault();const r=n?.shiftKey&&p,o=r?Yg(v)*R:R;let i=function(e){const t=""===e;return!qg(e)||t}(e)?I:e;return"up"===t?i=fy(i,o):"down"===t&&(i=function(...e){return e.reduce(((e,t,n)=>{const r=py(t);return 0===n?r:e-r}),0)}(i,o)),N(i,r?o:void 0)},z=e=>t=>C(String(O(w,e,t)),{event:{...t,target:j.current}});return(0,wt.jsx)(cy,{autoComplete:M,inputMode:"numeric",...k,className:A,dragDirection:o,hideHTMLArrows:"native"!==u,isDragEnabled:d,label:f,max:h,min:m,ref:E,required:g,step:b,type:y,value:w,__unstableStateReducer:(e,t)=>{var r;const i=((e,t)=>{const n={...e},{type:r,payload:i}=t,s=i.event,l=n.value;if(r!==Ix&&r!==Tx||(n.value=O(l,r===Ix?"up":"down",s)),r===Ex&&d){const[e,t]=i.delta,r=i.shiftKey&&p,s=r?Yg(v)*R:R;let c,u;switch(o){case"n":u=t,c=-1;break;case"e":u=e,c=(0,a.isRTL)()?-1:1;break;case"s":u=t,c=1;break;case"w":u=e,c=(0,a.isRTL)()?1:-1}if(0!==u){u=Math.ceil(Math.abs(u))*Math.sign(u);const e=u*s*c;n.value=N(fy(l,e),r?s:void 0)}}if(r===Rx||r===Sx){const e=!1===g&&""===l;n.value=e?l:N(l)}return n})(e,t);return null!==(r=n?.(i,t))&&void 0!==r?r:i},size:_,suffix:"custom"===u?(0,wt.jsxs)(wt.Fragment,{children:[S,(0,wt.jsx)(Hg,{marginBottom:0,marginRight:2,children:(0,wt.jsxs)(yy,{spacing:1,children:[(0,wt.jsx)(uy,{className:D,icon:Wg,size:"small",label:(0,a.__)("Increment"),onClick:z("up")}),(0,wt.jsx)(uy,{className:D,icon:Ug,size:"small",label:(0,a.__)("Decrement"),onClick:z("down")})]})})]}):S,onChange:C})})),Sy=_y;const Cy=cl("div",{target:"eln3bjz3"})("border-radius:",Tl.radiusRound,";border:",Tl.borderWidth," solid ",jl.ui.border,";box-sizing:border-box;cursor:grab;height:",32,"px;overflow:hidden;width:",32,"px;:active{cursor:grabbing;}"),ky=cl("div",{target:"eln3bjz2"})({name:"1r307gh",styles:"box-sizing:border-box;position:relative;width:100%;height:100%;:focus-visible{outline:none;}"}),jy=cl("div",{target:"eln3bjz1"})("background:",jl.theme.accent,";border-radius:",Tl.radiusRound,";box-sizing:border-box;display:block;left:50%;top:4px;transform:translateX( -50% );position:absolute;width:",6,"px;height:",6,"px;"),Ey=cl(Xv,{target:"eln3bjz0"})("color:",jl.theme.accent,";margin-right:",wl(3),";");const Py=function({value:e,onChange:t,...n}){const r=(0,c.useRef)(null),o=(0,c.useRef)(),i=(0,c.useRef)(),s=e=>{if(void 0!==e&&(e.preventDefault(),e.target?.focus(),void 0!==o.current&&void 0!==t)){const{x:n,y:r}=o.current;t(function(e,t,n,r){const o=r-t,i=n-e,s=Math.atan2(o,i),a=Math.round(s*(180/Math.PI))+90;if(a<0)return 360+a;return a}(n,r,e.clientX,e.clientY))}},{startDrag:a,isDragging:u}=(0,l.__experimentalUseDragging)({onDragStart:e=>{(()=>{if(null===r.current)return;const e=r.current.getBoundingClientRect();o.current={x:e.x+e.width/2,y:e.y+e.height/2}})(),s(e)},onDragMove:s,onDragEnd:s});return(0,c.useEffect)((()=>{u?(void 0===i.current&&(i.current=document.body.style.cursor),document.body.style.cursor="grabbing"):(document.body.style.cursor=i.current||"",i.current=void 0)}),[u]),(0,wt.jsx)(Cy,{ref:r,onMouseDown:a,className:"components-angle-picker-control__angle-circle",...n,children:(0,wt.jsx)(ky,{style:e?{transform:`rotate(${e}deg)`}:void 0,className:"components-angle-picker-control__angle-circle-indicator-wrapper",tabIndex:-1,children:(0,wt.jsx)(jy,{className:"components-angle-picker-control__angle-circle-indicator"})})})};const Ty=(0,c.forwardRef)((function(e,t){const{className:n,label:r=(0,a.__)("Angle"),onChange:o,value:i,...l}=e,c=s("components-angle-picker-control",n),u=(0,wt.jsx)(Ey,{children:"°"}),[d,p]=(0,a.isRTL)()?[u,null]:[null,u];return(0,wt.jsxs)(Ig,{...l,ref:t,className:c,gap:2,children:[(0,wt.jsx)(Mg,{children:(0,wt.jsx)(Sy,{label:r,className:"components-angle-picker-control__input-field",max:360,min:0,onChange:e=>{if(void 0===o)return;const t=void 0!==e&&""!==e?parseInt(e,10):0;o(t)},size:"__unstable-large",step:"1",value:i,spinControls:"none",prefix:d,suffix:p})}),(0,wt.jsx)(Hg,{marginBottom:"1",marginTop:"auto",children:(0,wt.jsx)(Py,{"aria-hidden":"true",value:i,onChange:o})})]})}));var Ry=o(9681),Iy=o.n(Ry);const Ny=window.wp.richText,My=window.wp.a11y,Ay=window.wp.keycodes,Dy=new RegExp(/[\u007e\u00ad\u2053\u207b\u208b\u2212\p{Pd}]/gu),Oy=e=>Iy()(e).toLocaleLowerCase().replace(Dy,"-");function zy(e){var t;let n=null!==(t=e?.toString?.())&&void 0!==t?t:"";return n=n.replace(/['\u2019]/,""),ms(n,{splitRegexp:[/(?!(?:1ST|2ND|3RD|[4-9]TH)(?![a-z]))([a-z0-9])([A-Z])/g,/(?!(?:1st|2nd|3rd|[4-9]th)(?![a-z]))([0-9])([a-z])/g,/([A-Za-z])([0-9])/g,/([A-Z])([A-Z][a-z])/g]})}function Ly(e){return e.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&")}function Fy(e){return t=>{const[n,r]=(0,c.useState)([]);return(0,c.useLayoutEffect)((()=>{const{options:n,isDebounced:o}=e,i=(0,l.debounce)((()=>{const o=Promise.resolve("function"==typeof n?n(t):n).then((n=>{if(o.canceled)return;const i=n.map(((t,n)=>({key:`${e.name}-${n}`,value:t,label:e.getOptionLabel(t),keywords:e.getOptionKeywords?e.getOptionKeywords(t):[],isDisabled:!!e.isOptionDisabled&&e.isOptionDisabled(t)}))),s=new RegExp("(?:\\b|\\s|^)"+Ly(t),"i");r(function(e,t=[],n=10){const r=[];for(let o=0;o<t.length;o++){const i=t[o];let{keywords:s=[]}=i;if("string"==typeof i.label&&(s=[...s,i.label]),s.some((t=>e.test(Iy()(t))))&&(r.push(i),r.length===n))break}return r}(s,i))}));return o}),o?250:0),s=i();return()=>{i.cancel(),s&&(s.canceled=!0)}}),[t]),[n]}}const By=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?yi({element:n.current,padding:r}).fn(t):{}:n?yi({element:n,padding:r}).fn(t):{};var o}});var Vy="undefined"!=typeof document?B.useLayoutEffect:B.useEffect;function $y(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!$y(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!$y(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Hy(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Wy(e,t){const n=Hy(e);return Math.round(t*n)/n}function Uy(e){const t=B.useRef(e);return Vy((()=>{t.current=e})),t}const Gy=(0,wt.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wt.jsx)(n.Path,{d:"m13.06 12 6.47-6.47-1.06-1.06L12 10.94 5.53 4.47 4.47 5.53 10.94 12l-6.47 6.47 1.06 1.06L12 13.06l6.47 6.47 1.06-1.06L13.06 12Z"})});let Ky=0;function qy(e){const t=document.scrollingElement||document.body;e&&(Ky=t.scrollTop);const n=e?"add":"remove";t.classList[n]("lockscroll"),document.documentElement.classList[n]("lockscroll"),e||(t.scrollTop=Ky)}let Yy=0;const Xy=function(){return(0,c.useEffect)((()=>(0===Yy&&qy(!0),++Yy,()=>{1===Yy&&qy(!1),--Yy})),[]),null},Zy={slots:(0,l.observableMap)(),fills:(0,l.observableMap)(),registerSlot:()=>{},updateSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{},isDefault:!0},Qy=(0,c.createContext)(Zy);function Jy(e){const t=(0,c.useContext)(Qy);return{...(0,l.useObservableValue)(t.slots,e),...(0,c.useMemo)((()=>({updateSlot:n=>t.updateSlot(e,n),unregisterSlot:n=>t.unregisterSlot(e,n),registerFill:n=>t.registerFill(e,n),unregisterFill:n=>t.unregisterFill(e,n)})),[e,t])}}const ew={registerSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{},getSlot:()=>{},getFills:()=>[],subscribe:()=>()=>{}},tw=(0,c.createContext)(ew),nw=e=>{const{getSlot:t,subscribe:n}=(0,c.useContext)(tw);return(0,c.useSyncExternalStore)(n,(()=>t(e)),(()=>t(e)))};function rw({name:e,children:t}){const{registerFill:n,unregisterFill:r}=(0,c.useContext)(tw),o=nw(e),i=(0,c.useRef)({name:e,children:t});return(0,c.useLayoutEffect)((()=>{const t=i.current;return n(e,t),()=>r(e,t)}),[]),(0,c.useLayoutEffect)((()=>{i.current.children=t,o&&o.forceUpdate()}),[t]),(0,c.useLayoutEffect)((()=>{e!==i.current.name&&(r(i.current.name,i.current),i.current.name=e,n(e,i.current))}),[e]),null}function ow(e){return"function"==typeof e}class iw extends c.Component{constructor(e){super(e),this.isUnmounted=!1}componentDidMount(){const{registerSlot:e}=this.props;this.isUnmounted=!1,e(this.props.name,this)}componentWillUnmount(){const{unregisterSlot:e}=this.props;this.isUnmounted=!0,e(this.props.name,this)}componentDidUpdate(e){const{name:t,unregisterSlot:n,registerSlot:r}=this.props;e.name!==t&&(n(e.name,this),r(t,this))}forceUpdate(){this.isUnmounted||super.forceUpdate()}render(){var e;const{children:t,name:n,fillProps:r={},getFills:o}=this.props,i=(null!==(e=o(n,this))&&void 0!==e?e:[]).map((e=>{const t=ow(e.children)?e.children(r):e.children;return c.Children.map(t,((e,t)=>{if(!e||"string"==typeof e)return e;let n=t;return"object"==typeof e&&"key"in e&&e?.key&&(n=e.key),(0,c.cloneElement)(e,{key:n})}))})).filter((e=>!(0,c.isEmptyElement)(e)));return(0,wt.jsx)(wt.Fragment,{children:ow(t)?t(i):i})}}const sw=e=>(0,wt.jsx)(tw.Consumer,{children:({registerSlot:t,unregisterSlot:n,getFills:r})=>(0,wt.jsx)(iw,{...e,registerSlot:t,unregisterSlot:n,getFills:r})}),aw={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let lw;const cw=new Uint8Array(16);function uw(){if(!lw&&(lw="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!lw))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return lw(cw)}const dw=[];for(let e=0;e<256;++e)dw.push((e+256).toString(16).slice(1));function pw(e,t=0){return dw[e[t+0]]+dw[e[t+1]]+dw[e[t+2]]+dw[e[t+3]]+"-"+dw[e[t+4]]+dw[e[t+5]]+"-"+dw[e[t+6]]+dw[e[t+7]]+"-"+dw[e[t+8]]+dw[e[t+9]]+"-"+dw[e[t+10]]+dw[e[t+11]]+dw[e[t+12]]+dw[e[t+13]]+dw[e[t+14]]+dw[e[t+15]]}const fw=function(e,t,n){if(aw.randomUUID&&!t&&!e)return aw.randomUUID();const r=(e=e||{}).random||(e.rng||uw)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return pw(r)},hw=new Set,mw=new WeakMap;function gw(e){const{children:t,document:n}=e;if(!n)return null;const r=(e=>{if(mw.has(e))return mw.get(e);let t=fw().replace(/[0-9]/g,"");for(;hw.has(t);)t=fw().replace(/[0-9]/g,"");hw.add(t);const n=xa({container:e,key:t});return mw.set(e,n),n})(n.head);return(0,wt.jsx)(Oa,{value:r,children:t})}const vw=gw;function bw(e){var t;const{name:n,children:r}=e,{registerFill:o,unregisterFill:i,...s}=Jy(n),a=function(){const[,e]=(0,c.useState)({}),t=(0,c.useRef)(!0);return(0,c.useEffect)((()=>(t.current=!0,()=>{t.current=!1})),[]),()=>{t.current&&e({})}}(),l=(0,c.useRef)({rerender:a});if((0,c.useEffect)((()=>(o(l),()=>{i(l)})),[o,i]),!s.ref||!s.ref.current)return null;const u=(0,wt.jsx)(vw,{document:s.ref.current.ownerDocument,children:"function"==typeof r?r(null!==(t=s.fillProps)&&void 0!==t?t:{}):r});return(0,c.createPortal)(u,s.ref.current)}const xw=(0,c.forwardRef)((function(e,t){const{name:n,fillProps:r={},as:o,children:i,...s}=e,{registerSlot:a,unregisterSlot:u,...d}=(0,c.useContext)(Qy),p=(0,c.useRef)(null);return(0,c.useLayoutEffect)((()=>(a(n,p,r),()=>{u(n,p)})),[a,u,n]),(0,c.useLayoutEffect)((()=>{d.updateSlot(n,r)})),(0,wt.jsx)(dl,{as:o,ref:(0,l.useMergeRefs)([t,p]),...s})})),yw=window.wp.isShallowEqual;var ww=o.n(yw);function _w(){const e=(0,l.observableMap)(),t=(0,l.observableMap)();return{slots:e,fills:t,registerSlot:(t,n,r)=>{const o=e.get(t);e.set(t,{...o,ref:n||o?.ref,fillProps:r||o?.fillProps||{}})},updateSlot:(n,r)=>{const o=e.get(n);if(!o)return;if(ww()(o.fillProps,r))return;o.fillProps=r;const i=t.get(n);i&&i.forEach((e=>e.current.rerender()))},unregisterSlot:(t,n)=>{e.get(t)?.ref===n&&e.delete(t)},registerFill:(e,n)=>{t.set(e,[...t.get(e)||[],n])},unregisterFill:(e,n)=>{const r=t.get(e);r&&t.set(e,r.filter((e=>e!==n)))}}}function Sw({children:e}){const[t]=(0,c.useState)(_w);return(0,wt.jsx)(Qy.Provider,{value:t,children:e})}function Cw(){const e={},t={};let n=[];function r(t){return e[t]}function o(e){const t=r(e);t&&t.forceUpdate()}function i(){n.forEach((e=>e()))}return{registerSlot:function(t,n){const r=e[t];e[t]=n,i(),o(t),r&&r.forceUpdate()},unregisterSlot:function(t,n){e[t]===n&&(delete e[t],i())},registerFill:function(e,n){t[e]=[...t[e]||[],n],o(e)},unregisterFill:function(e,n){var r;t[e]=null!==(r=t[e]?.filter((e=>e!==n)))&&void 0!==r?r:[],o(e)},getSlot:r,getFills:function(n,r){return e[n]!==r?[]:t[n]},subscribe:function(e){return n.push(e),()=>{n=n.filter((t=>t!==e))}}}}const kw=function({children:e}){const[t]=(0,c.useState)(Cw);return(0,wt.jsx)(tw.Provider,{value:t,children:e})};function jw(e){return(0,wt.jsxs)(wt.Fragment,{children:[(0,wt.jsx)(rw,{...e}),(0,wt.jsx)(bw,{...e})]})}const Ew=(0,c.forwardRef)((function(e,t){const{bubblesVirtually:n,...r}=e;return n?(0,wt.jsx)(xw,{...r,ref:t}):(0,wt.jsx)(sw,{...r})}));function Pw({children:e,passthrough:t=!1}){return!(0,c.useContext)(Qy).isDefault&&t?(0,wt.jsx)(wt.Fragment,{children:e}):(0,wt.jsx)(kw,{children:(0,wt.jsx)(Sw,{children:e})})}function Tw(e){const t="symbol"==typeof e?e.description:e,n=t=>(0,wt.jsx)(jw,{name:e,...t});n.displayName=`${t}Fill`;const r=t=>(0,wt.jsx)(Ew,{name:e,...t});return r.displayName=`${t}Slot`,r.__unstableName=e,{Fill:n,Slot:r}}Pw.displayName="SlotFillProvider";const Rw="Popover",Iw=()=>(0,wt.jsxs)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",className:"components-popover__triangle",role:"presentation",children:[(0,wt.jsx)(n.Path,{className:"components-popover__triangle-bg",d:"M 0 0 L 50 50 L 100 0"}),(0,wt.jsx)(n.Path,{className:"components-popover__triangle-border",d:"M 0 0 L 50 50 L 100 0",vectorEffect:"non-scaling-stroke"})]}),Nw=(0,c.createContext)(void 0),Mw="components-popover__fallback-container",Aw=Xa(((e,t)=>{const{animate:n=!0,headerTitle:r,constrainTabbing:o,onClose:i,children:a,className:u,noArrow:d=!0,position:p,placement:f="bottom-start",offset:h=0,focusOnMount:m="firstElement",anchor:g,expandOnMobile:v,onFocusOutside:b,__unstableSlotName:x=Rw,flip:y=!0,resize:w=!0,shift:_=!1,inline:S=!1,variant:C,style:k,__unstableForcePosition:j,anchorRef:E,anchorRect:P,getAnchorRect:T,isAlternate:R,...I}=Ya(e,"Popover");let N=y,M=w;void 0!==j&&(Fi()("`__unstableForcePosition` prop in wp.components.Popover",{since:"6.1",version:"6.3",alternative:"`flip={ false }` and `resize={ false }`"}),N=!j,M=!j),void 0!==E&&Fi()("`anchorRef` prop in wp.components.Popover",{since:"6.1",alternative:"`anchor` prop"}),void 0!==P&&Fi()("`anchorRect` prop in wp.components.Popover",{since:"6.1",alternative:"`anchor` prop"}),void 0!==T&&Fi()("`getAnchorRect` prop in wp.components.Popover",{since:"6.1",alternative:"`anchor` prop"});const A=R?"toolbar":C;void 0!==R&&Fi()("`isAlternate` prop in wp.components.Popover",{since:"6.2",alternative:"`variant` prop with the `'toolbar'` value"});const D=(0,c.useRef)(null),[O,z]=(0,c.useState)(null),L=(0,c.useCallback)((e=>{z(e)}),[]),F=(0,l.useViewportMatch)("medium","<"),V=v&&F,$=!V&&!d,H=p?$i(p):f,W=[..."overlay"===f?[{name:"overlay",fn:({rects:e})=>e.reference},xi({apply({rects:e,elements:t}){var n;const{firstElementChild:r}=null!==(n=t.floating)&&void 0!==n?n:{};r instanceof HTMLElement&&Object.assign(r.style,{width:`${e.reference.width}px`,height:`${e.reference.height}px`})}})]:[],Ro(h),N&&bi(),M&&xi({apply(e){var t;const{firstElementChild:n}=null!==(t=Q.floating.current)&&void 0!==t?t:{};n instanceof HTMLElement&&Object.assign(n.style,{maxHeight:`${e.availableHeight}px`,overflow:"auto"})}}),_&&vi({crossAxis:!0,limiter:wi(),padding:1}),By({element:D})],U=(0,c.useContext)(Nw)||x,G=Jy(U);let K;(i||b)&&(K=(e,t)=>{"focus-outside"===e&&b?b(t):i&&i()});const[q,Y]=(0,l.__experimentalUseDialog)({constrainTabbing:o,focusOnMount:m,__unstableOnClose:K,onClose:K}),{x:X,y:Z,refs:Q,strategy:J,update:ee,placement:te,middlewareData:{arrow:ne}}=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,d]=B.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=B.useState(r);$y(p,r)||f(r);const[h,m]=B.useState(null),[g,v]=B.useState(null),b=B.useCallback((e=>{e!==_.current&&(_.current=e,m(e))}),[]),x=B.useCallback((e=>{e!==S.current&&(S.current=e,v(e))}),[]),y=i||h,w=s||g,_=B.useRef(null),S=B.useRef(null),C=B.useRef(u),k=null!=l,j=Uy(l),E=Uy(o),P=B.useCallback((()=>{if(!_.current||!S.current)return;const e={placement:t,strategy:n,middleware:p};E.current&&(e.platform=E.current),_i(_.current,S.current,e).then((e=>{const t={...e,isPositioned:!0};T.current&&!$y(C.current,t)&&(C.current=t,Or.flushSync((()=>{d(t)})))}))}),[p,t,n,E]);Vy((()=>{!1===c&&C.current.isPositioned&&(C.current.isPositioned=!1,d((e=>({...e,isPositioned:!1}))))}),[c]);const T=B.useRef(!1);Vy((()=>(T.current=!0,()=>{T.current=!1})),[]),Vy((()=>{if(y&&(_.current=y),w&&(S.current=w),y&&w){if(j.current)return j.current(y,w,P);P()}}),[y,w,P,j,k]);const R=B.useMemo((()=>({reference:_,floating:S,setReference:b,setFloating:x})),[b,x]),I=B.useMemo((()=>({reference:y,floating:w})),[y,w]),N=B.useMemo((()=>{const e={position:n,left:0,top:0};if(!I.floating)return e;const t=Wy(I.floating,u.x),r=Wy(I.floating,u.y);return a?{...e,transform:"translate("+t+"px, "+r+"px)",...Hy(I.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,a,I.floating,u.x,u.y]);return B.useMemo((()=>({...u,update:P,refs:R,elements:I,floatingStyles:N})),[u,P,R,I,N])}({placement:"overlay"===H?void 0:H,middleware:W,whileElementsMounted:(e,t,n)=>gi(e,t,n,{layoutShift:!1,animationFrame:!0})}),re=(0,c.useCallback)((e=>{D.current=e,ee()}),[ee]),oe=E?.top,ie=E?.bottom,se=E?.startContainer,ae=E?.current;(0,c.useLayoutEffect)((()=>{const e=(({anchor:e,anchorRef:t,anchorRect:n,getAnchorRect:r,fallbackReferenceElement:o})=>{var i;let s=null;return e?s=e:function(e){return!!e?.top}(t)?s={getBoundingClientRect(){const e=t.top.getBoundingClientRect(),n=t.bottom.getBoundingClientRect();return new window.DOMRect(e.x,e.y,e.width,n.bottom-e.top)}}:function(e){return!!e?.current}(t)?s=t.current:t?s=t:n?s={getBoundingClientRect:()=>n}:r?s={getBoundingClientRect(){var e,t,n,i;const s=r(o);return new window.DOMRect(null!==(e=s.x)&&void 0!==e?e:s.left,null!==(t=s.y)&&void 0!==t?t:s.top,null!==(n=s.width)&&void 0!==n?n:s.right-s.left,null!==(i=s.height)&&void 0!==i?i:s.bottom-s.top)}}:o&&(s=o.parentElement),null!==(i=s)&&void 0!==i?i:null})({anchor:g,anchorRef:E,anchorRect:P,getAnchorRect:T,fallbackReferenceElement:O});Q.setReference(e)}),[g,E,oe,ie,se,ae,P,T,O,Q]);const le=(0,l.useMergeRefs)([Q.setFloating,q,t]),ce=V?void 0:{position:J,top:0,left:0,x:Wi(X),y:Wi(Z)},ue=(0,l.useReducedMotion)(),de=n&&!V&&!ue,[pe,fe]=(0,c.useState)(!1),{style:he,...me}=(0,c.useMemo)((()=>(e=>{const t=e.startsWith("top")||e.startsWith("bottom")?"translateY":"translateX",n=e.startsWith("top")||e.startsWith("left")?1:-1;return{style:Hi[e],initial:{opacity:0,scale:0,[t]:2*n+"em"},animate:{opacity:1,scale:1,[t]:0},transition:{duration:.1,ease:[0,0,.2,1]}}})(te)),[te]),ge=de?{style:{...k,...he,...ce},onAnimationComplete:()=>fe(!0),...me}:{animate:!1,style:{...k,...ce}},ve=(!de||pe)&&null!==X&&null!==Z;let be=(0,wt.jsxs)(dg.div,{className:s(u,{"is-expanded":V,"is-positioned":ve,[`is-${"toolbar"===A?"alternate":A}`]:A}),...ge,...I,ref:le,...Y,tabIndex:-1,children:[V&&(0,wt.jsx)(Xy,{}),V&&(0,wt.jsxs)("div",{className:"components-popover__header",children:[(0,wt.jsx)("span",{className:"components-popover__header-title",children:r}),(0,wt.jsx)(sy,{className:"components-popover__close",icon:Gy,onClick:i})]}),(0,wt.jsx)("div",{className:"components-popover__content",children:a}),$&&(0,wt.jsx)("div",{ref:re,className:["components-popover__arrow",`is-${te.split("-")[0]}`].join(" "),style:{left:void 0!==ne?.x&&Number.isFinite(ne.x)?`${ne.x}px`:"",top:void 0!==ne?.y&&Number.isFinite(ne.y)?`${ne.y}px`:""},children:(0,wt.jsx)(Iw,{})})]});const xe=G.ref&&!S,ye=E||P||g;return xe?be=(0,wt.jsx)(jw,{name:U,children:be}):S||(be=(0,c.createPortal)((0,wt.jsx)(gw,{document,children:be}),(()=>{let e=document.body.querySelector("."+Mw);return e||(e=document.createElement("div"),e.className=Mw,document.body.append(e)),e})())),ye?be:(0,wt.jsxs)(wt.Fragment,{children:[(0,wt.jsx)("span",{ref:L}),be]})}),"Popover");Aw.Slot=(0,c.forwardRef)((function({name:e=Rw},t){return(0,wt.jsx)(Ew,{bubblesVirtually:!0,name:e,className:"popover-slot",ref:t})})),Aw.__unstableSlotNameProvider=Nw.Provider;const Dw=Aw;function Ow({items:e,onSelect:t,selectedIndex:n,instanceId:r,listBoxId:o,className:i,Component:a="div"}){return(0,wt.jsx)(a,{id:o,role:"listbox",className:"components-autocomplete__results",children:e.map(((e,o)=>(0,wt.jsx)(sy,{id:`components-autocomplete-item-${r}-${e.key}`,role:"option","aria-selected":o===n,accessibleWhenDisabled:!0,disabled:e.isDisabled,className:s("components-autocomplete__result",i,{"is-selected":o===n}),variant:o===n?"primary":void 0,onClick:()=>t(e),children:e.label},e.key)))})}function zw(e){var t;const n=null!==(t=e.useItems)&&void 0!==t?t:Fy(e);return function({filterValue:e,instanceId:t,listBoxId:r,className:o,selectedIndex:i,onChangeOptions:s,onSelect:u,onReset:d,reset:p,contentRef:f}){const[h]=n(e),m=(0,Ny.useAnchor)({editableContentElement:f.current}),[g,v]=(0,c.useState)(!1),b=(0,c.useRef)(null),x=(0,l.useMergeRefs)([b,(0,l.useRefEffect)((e=>{f.current&&v(e.ownerDocument!==f.current.ownerDocument)}),[f])]);var y,w;y=b,w=p,(0,c.useEffect)((()=>{const e=e=>{y.current&&!y.current.contains(e.target)&&w(e)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e)}}),[w]);const _=(0,l.useDebounce)(My.speak,500);return(0,c.useLayoutEffect)((()=>{s(h),function(t){_&&(t.length?_(e?(0,a.sprintf)((0,a._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",t.length),t.length):(0,a.sprintf)((0,a._n)("Initial %d result loaded. Type to filter all available results. Use up and down arrow keys to navigate.","Initial %d results loaded. Type to filter all available results. Use up and down arrow keys to navigate.",t.length),t.length),"assertive"):_((0,a.__)("No results."),"assertive"))}(h)}),[h]),0===h.length?null:(0,wt.jsxs)(wt.Fragment,{children:[(0,wt.jsx)(Dw,{focusOnMount:!1,onClose:d,placement:"top-start",className:"components-autocomplete__popover",anchor:m,ref:x,children:(0,wt.jsx)(Ow,{items:h,onSelect:u,selectedIndex:i,instanceId:t,listBoxId:r,className:o})}),f.current&&g&&(0,Or.createPortal)((0,wt.jsx)(Ow,{items:h,onSelect:u,selectedIndex:i,instanceId:t,listBoxId:r,className:o,Component:pl}),f.current.ownerDocument.body)]})}}const Lw=e=>{if(null===e)return"";switch(typeof e){case"string":case"number":return e.toString();case"boolean":default:return"";case"object":if(e instanceof Array)return e.map(Lw).join("");if("props"in e)return Lw(e.props.children)}return""},Fw=[];function Bw({record:e,onChange:t,onReplace:n,completers:r,contentRef:o}){const i=(0,l.useInstanceId)(Bw),[s,a]=(0,c.useState)(0),[u,d]=(0,c.useState)(Fw),[p,f]=(0,c.useState)(""),[h,m]=(0,c.useState)(null),[g,v]=(0,c.useState)(null),b=(0,c.useRef)(!1);function x(r){const{getOptionCompletion:o}=h||{};if(!r.isDisabled){if(o){const i=o(r.value,p),s=(e=>null!==e&&"object"==typeof e&&"action"in e&&void 0!==e.action&&"value"in e&&void 0!==e.value)(i)?i:{action:"insert-at-caret",value:i};if("replace"===s.action)return void n([s.value]);"insert-at-caret"===s.action&&function(n){if(null===h)return;const r=e.start,o=r-h.triggerPrefix.length-p.length,i=(0,Ny.create)({html:(0,c.renderToString)(n)});t((0,Ny.insert)(e,i,o,r))}(s.value)}y()}}function y(){a(0),d(Fw),f(""),m(null),v(null)}const w=(0,c.useMemo)((()=>(0,Ny.isCollapsed)(e)?(0,Ny.getTextContent)((0,Ny.slice)(e,0)):""),[e]);(0,c.useEffect)((()=>{if(!w)return void(h&&y());const t=r.reduce(((e,t)=>w.lastIndexOf(t.triggerPrefix)>(null!==e?w.lastIndexOf(e.triggerPrefix):-1)?t:e),null);if(!t)return void(h&&y());const{allowContext:n,triggerPrefix:o}=t,i=w.lastIndexOf(o),s=w.slice(i+o.length);if(s.length>50)return;const a=0===u.length,l=s.split(/\s/),c=1===l.length,d=b.current&&l.length<=3;if(a&&!d&&!c)return void(h&&y());const p=(0,Ny.getTextContent)((0,Ny.slice)(e,void 0,(0,Ny.getTextContent)(e).length));if(n&&!n(w.slice(0,i),p))return void(h&&y());if(/^\s/.test(s)||/\s\s+$/.test(s))return void(h&&y());if(!/[\u0000-\uFFFF]*$/.test(s))return void(h&&y());const x=Ly(t.triggerPrefix),_=Iy()(w),S=_.slice(_.lastIndexOf(t.triggerPrefix)).match(new RegExp(`${x}([\0-]*)$`)),C=S&&S[1];m(t),v((()=>t!==h?zw(t):g)),f(null===C?"":C)}),[w]);const{key:_=""}=u[s]||{},{className:S}=h||{},C=!!h&&u.length>0,k=C?`components-autocomplete-listbox-${i}`:void 0,j=C?`components-autocomplete-item-${i}-${_}`:null,E=void 0!==e.start;return{listBoxId:k,activeId:j,onKeyDown:Ax((function(e){if(b.current="Backspace"===e.key,h&&0!==u.length&&!e.defaultPrevented){switch(e.key){case"ArrowUp":{const e=(0===s?u.length:s)-1;a(e),(0,Ay.isAppleOS)()&&(0,My.speak)(Lw(u[e].label),"assertive");break}case"ArrowDown":{const e=(s+1)%u.length;a(e),(0,Ay.isAppleOS)()&&(0,My.speak)(Lw(u[e].label),"assertive");break}case"Escape":m(null),v(null),e.preventDefault();break;case"Enter":x(u[s]);break;case"ArrowLeft":case"ArrowRight":return void y();default:return}e.preventDefault()}})),popover:E&&g&&(0,wt.jsx)(g,{className:S,filterValue:p,instanceId:i,listBoxId:k,selectedIndex:s,onChangeOptions:function(e){a(e.length===u.length?s:0),d(e)},onSelect:x,value:e,contentRef:o,reset:y})}}function Vw(e){const t=(0,c.useRef)(null),n=(0,c.useRef)(),{record:r}=e,o=function(e){const t=(0,c.useRef)(new Set);return t.current.add(e),t.current.size>2&&t.current.delete(Array.from(t.current)[0]),Array.from(t.current)[0]}(r),{popover:i,listBoxId:s,activeId:a,onKeyDown:u}=Bw({...e,contentRef:t});n.current=u;const d=(0,l.useMergeRefs)([t,(0,l.useRefEffect)((e=>{function t(e){n.current?.(e)}return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}}),[])]);return r.text!==o?.text?{ref:d,children:i,"aria-autocomplete":s?"list":void 0,"aria-owns":s,"aria-activedescendant":a}:{ref:d}}function $w({children:e,isSelected:t,...n}){const{popover:r,...o}=Bw(n);return(0,wt.jsxs)(wt.Fragment,{children:[e(o),t&&r]})}function Hw(e){const{help:t,id:n,...r}=e,o=(0,l.useInstanceId)(Qx,"wp-components-base-control",n);return{baseControlProps:{id:o,help:t,...r},controlProps:{id:o,...t?{"aria-describedby":`${o}__help`}:{}}}}const Ww=(0,wt.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wt.jsx)(n.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})}),Uw=(0,wt.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wt.jsx)(n.Path,{d:"M17.031 4.703 15.576 4l-1.56 3H14v.03l-2.324 4.47H9.5V13h1.396l-1.502 2.889h-.95a3.694 3.694 0 0 1 0-7.389H10V7H8.444a5.194 5.194 0 1 0 0 10.389h.17L7.5 19.53l1.416.719L15.049 8.5h.507a3.694 3.694 0 0 1 0 7.39H14v1.5h1.556a5.194 5.194 0 0 0 .273-10.383l1.202-2.304Z"})});const Gw=bl("",""),Kw={name:"bjn8wh",styles:"position:relative"},qw=e=>{const{color:t=jl.gray[200],style:n="solid",width:r=Tl.borderWidth}=e||{};return`${t} ${!!r&&"0"!==r||!!t?n||"solid":n} ${r!==Tl.borderWidth?`clamp(1px, ${r}, 10px)`:r}`},Yw={name:"1nwbfnf",styles:"grid-column:span 2;margin:0 auto"};function Xw(e){const{className:t,size:n="default",...r}=Ya(e,"BorderBoxControlLinkedButton"),o=qa();return{...r,className:(0,c.useMemo)((()=>o((e=>bl("position:absolute;top:","__unstable-large"===e?"8px":"3px",";",Bg({right:0})()," line-height:0;",""))(n),t)),[t,o,n])}}const Zw=Xa(((e,t)=>{const{className:n,isLinked:r,...o}=Xw(e),i=r?(0,a.__)("Unlink sides"):(0,a.__)("Link sides");return(0,wt.jsx)(Yi,{text:i,children:(0,wt.jsx)(dl,{className:n,children:(0,wt.jsx)(sy,{...o,size:"small",icon:r?Ww:Uw,iconSize:24,"aria-label":i,ref:t})})})}),"BorderBoxControlLinkedButton");function Qw(e){const{className:t,value:n,size:r="default",...o}=Ya(e,"BorderBoxControlVisualizer"),i=qa(),s=(0,c.useMemo)((()=>i(((e,t)=>bl("position:absolute;top:","__unstable-large"===t?"20px":"15px",";right:","__unstable-large"===t?"39px":"29px",";bottom:","__unstable-large"===t?"20px":"15px",";left:","__unstable-large"===t?"39px":"29px",";border-top:",qw(e?.top),";border-bottom:",qw(e?.bottom),";",Bg({borderLeft:qw(e?.left)})()," ",Bg({borderRight:qw(e?.right)})(),";",""))(n,r),t)),[i,t,n,r]);return{...o,className:s,value:n}}const Jw=Xa(((e,t)=>{const{value:n,...r}=Qw(e);return(0,wt.jsx)(dl,{...r,ref:t})}),"BorderBoxControlVisualizer"),e_=(0,wt.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wt.jsx)(n.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"})}),t_=(0,wt.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wt.jsx)(n.Path,{d:"M5 11.25h14v1.5H5z"})}),n_=(0,wt.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wt.jsx)(n.Path,{fillRule:"evenodd",d:"M5 11.25h3v1.5H5v-1.5zm5.5 0h3v1.5h-3v-1.5zm8.5 0h-3v1.5h3v-1.5z",clipRule:"evenodd"})}),r_=(0,wt.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wt.jsx)(n.Path,{fillRule:"evenodd",d:"M5.25 11.25h1.5v1.5h-1.5v-1.5zm3 0h1.5v1.5h-1.5v-1.5zm4.5 0h-1.5v1.5h1.5v-1.5zm1.5 0h1.5v1.5h-1.5v-1.5zm4.5 0h-1.5v1.5h1.5v-1.5z",clipRule:"evenodd"})}),o_=(0,B.createContext)(null),i_=e=>!e.isLayoutDirty&&e.willUpdate(!1);function s_(){const e=new Set,t=new WeakMap,n=()=>e.forEach(i_);return{add:r=>{e.add(r),t.set(r,r.addEventListener("willUpdate",n))},remove:r=>{e.delete(r);const o=t.get(r);o&&(o(),t.delete(r)),n()},dirty:n}}const a_=e=>!0===e,l_=({children:e,id:t,inherit:n=!0})=>{const r=(0,B.useContext)(gc),o=(0,B.useContext)(o_),[i,s]=fg(),a=(0,B.useRef)(null),l=r.id||o;null===a.current&&((e=>a_(!0===e)||"id"===e)(n)&&l&&(t=t?l+"-"+t:l),a.current={id:t,group:a_(n)&&r.group||s_()});const c=(0,B.useMemo)((()=>({...a.current,forceRender:i})),[s]);return(0,wt.jsx)(gc.Provider,{value:c,children:e})};const c_=e=>{const t=bl("border-color:",jl.ui.border,";","");return bl(e&&t," &:hover{border-color:",jl.ui.borderHover,";}&:focus-within{border-color:",jl.ui.borderFocus,";box-shadow:",Tl.controlBoxShadowFocus,";z-index:1;outline:2px solid transparent;outline-offset:-2px;}","")};var u_={name:"1aqh2c7",styles:"min-height:40px;padding:3px"},d_={name:"1ndywgm",styles:"min-height:36px;padding:2px"};const p_=e=>({default:d_,"__unstable-large":u_}[e]),f_={name:"7whenc",styles:"display:flex;width:100%"},h_=cl("div",{target:"eakva830"})({name:"zjik7",styles:"display:flex"});function m_(e={}){var t,n=T(e,[]);const r=null==(t=n.store)?void 0:t.getState(),o=ht(P(E({},n),{focusLoop:F(n.focusLoop,null==r?void 0:r.focusLoop,!0)})),i=Ve(P(E({},o.getState()),{value:F(n.value,null==r?void 0:r.value,n.defaultValue,null)}),o,n.store);return P(E(E({},o),i),{setValue:e=>i.setState("value",e)})}function g_(e={}){const[t,n]=et(m_,e);return function(e,t,n){return Je(e=mt(e,t,n),n,"value","setValue"),e}(t,n,e)}var v_=jt([Nt],[Mt]),b_=v_.useContext,x_=(v_.useScopedContext,v_.useProviderContext),y_=(v_.ContextProvider,v_.ScopedContextProvider),w_=kt((function(e){var t=e,{store:n}=t,r=x(t,["store"]);const o=x_();return D(n=n||o,!1),r=Ie(r,(e=>(0,wt.jsx)(y_,{value:n,children:e})),[n]),r=v({role:"radiogroup"},r),r=ln(v({store:n},r))})),__=_t((function(e){return Ct("div",w_(e))}));const S_=(0,c.createContext)({}),C_=S_;function k_(e){const t=(0,c.useRef)(!0),n=(0,l.usePrevious)(e),r=(0,c.useRef)(!1);(0,c.useEffect)((()=>{t.current&&(t.current=!1)}),[]);const o=r.current||!t.current&&n!==e;return(0,c.useEffect)((()=>{r.current=o}),[o]),o?{value:null!=e?e:"",defaultValue:void 0}:{value:void 0,defaultValue:e}}const j_=(0,c.forwardRef)((function({children:e,isAdaptiveWidth:t,label:n,onChange:r,size:o,value:i,id:s,...u},d){const p=(0,l.useInstanceId)(j_,"toggle-group-control-as-radio-group"),f=s||p,{value:h,defaultValue:m}=k_(i),g=r?e=>{r(null!=e?e:void 0)}:void 0,v=g_({defaultValue:m,value:h,setValue:g,rtl:(0,a.isRTL)()}),b=Qe(v,"value"),x=v.setValue;(0,c.useEffect)((()=>{""===b&&v.setActiveId(void 0)}),[v,b]);const y=(0,c.useMemo)((()=>({activeItemIsNotFirstItem:()=>v.getState().activeId!==v.first(),baseId:f,isBlock:!t,size:o,value:b,setValue:x})),[f,t,v,o,b,x]);return(0,wt.jsx)(C_.Provider,{value:y,children:(0,wt.jsx)(__,{store:v,"aria-label":n,render:(0,wt.jsx)(dl,{}),...u,id:f,ref:d,children:e})})}));function E_({defaultValue:e,onChange:t,value:n}){const r=void 0!==n,o=r?n:e,[i,s]=(0,c.useState)(o);let a;return a=r&&"function"==typeof t?t:r||"function"!=typeof t?s:e=>{t(e),s(e)},[r?n:i,a]}const P_=(0,c.forwardRef)((function({children:e,isAdaptiveWidth:t,label:n,onChange:r,size:o,value:i,id:s,...a},u){const d=(0,l.useInstanceId)(P_,"toggle-group-control-as-button-group"),p=s||d,{value:f,defaultValue:h}=k_(i),[m,g]=E_({defaultValue:h,value:f,onChange:r}),v=(0,c.useMemo)((()=>({baseId:p,value:m,setValue:g,isBlock:!t,isDeselectable:!0,size:o})),[p,m,g,t,o]);return(0,wt.jsx)(C_.Provider,{value:v,children:(0,wt.jsx)(dl,{"aria-label":n,...a,ref:u,role:"group",children:e})})}));const T_=Xa((function(e,t){const{__nextHasNoMarginBottom:n=!1,__next40pxDefaultSize:r=!1,className:o,isAdaptiveWidth:i=!1,isBlock:s=!1,isDeselectable:a=!1,label:u,hideLabelFromVision:d=!1,help:p,onChange:f,size:h="default",value:m,children:g,...v}=Ya(e,"ToggleGroupControl"),b=(0,l.useInstanceId)(T_,"toggle-group-control"),x=r&&"default"===h?"__unstable-large":h,y=qa(),w=(0,c.useMemo)((()=>y((({isBlock:e,isDeselectable:t,size:n})=>bl("background:",jl.ui.background,";border:1px solid transparent;border-radius:",Tl.radiusSmall,";display:inline-flex;min-width:0;position:relative;",p_(n)," ",!t&&c_(e),";",""))({isBlock:s,isDeselectable:a,size:x}),s&&f_,o)),[o,y,s,a,x]),_=a?P_:j_;return(0,wt.jsxs)(Qx,{help:p,__nextHasNoMarginBottom:n,__associatedWPComponentName:"ToggleGroupControl",children:[!d&&(0,wt.jsx)(h_,{children:(0,wt.jsx)(Qx.VisualLabel,{children:u})}),(0,wt.jsx)(_,{...v,className:w,isAdaptiveWidth:i,label:u,onChange:f,ref:t,size:x,value:m,children:(0,wt.jsx)(l_,{id:b,children:g})})]})}),"ToggleGroupControl"),R_=T_;var I_="input";var N_=kt((function(e){var t=e,{store:n,name:r,value:o,checked:i}=t,s=x(t,["store","name","value","checked"]);const a=b_();n=n||a;const l=je(s.id),c=(0,B.useRef)(null),u=Qe(n,(e=>null!=i?i:function(e,t){if(void 0!==t)return null!=e&&null!=t?t===e:!!t}(o,null==e?void 0:e.value)));(0,B.useEffect)((()=>{if(!l)return;if(!u)return;(null==n?void 0:n.getState().activeId)===l||null==n||n.setActiveId(l)}),[n,u,l]);const d=s.onChange,p=function(e,t){return"input"===e&&(!t||"radio"===t)}(Ee(c,I_),s.type),f=z(s),[h,m]=Te();(0,B.useEffect)((()=>{const e=c.current;e&&(p||(void 0!==u&&(e.checked=u),void 0!==r&&(e.name=r),void 0!==o&&(e.value=`${o}`)))}),[h,p,u,r,o]);const g=Se((e=>{if(f)return e.preventDefault(),void e.stopPropagation();p||(e.currentTarget.checked=!0,m()),null==d||d(e),e.defaultPrevented||null==n||n.setValue(o)})),y=s.onClick,w=Se((e=>{null==y||y(e),e.defaultPrevented||p||g(e)})),_=s.onFocus,S=Se((e=>{if(null==_||_(e),e.defaultPrevented)return;if(!p)return;if(!n)return;const{moves:t,activeId:r}=n.getState();t&&(l&&r!==l||g(e))}));return s=b(v({id:l,role:p?void 0:"radio",type:p?"radio":void 0,"aria-checked":u},s),{ref:ke(c,s.ref),onChange:g,onClick:w,onFocus:S}),s=Pn(v({store:n,clickOnEnter:!p},s)),L(v({name:p?r:void 0,value:p?o:void 0,checked:u},s))})),M_=St(_t((function(e){const t=N_(e);return Ct(I_,t)})));const A_=cl("div",{target:"et6ln9s1"})({name:"sln1fl",styles:"display:inline-flex;max-width:100%;min-width:0;position:relative"}),D_={name:"82a6rk",styles:"flex:1"},O_=({isDeselectable:e,isIcon:t,isPressed:n,size:r})=>bl("align-items:center;appearance:none;background:transparent;border:none;border-radius:",Tl.radiusXSmall,";color:",jl.gray[700],";fill:currentColor;cursor:pointer;display:flex;font-family:inherit;height:100%;justify-content:center;line-height:100%;outline:none;padding:0 12px;position:relative;text-align:center;@media not ( prefers-reduced-motion ){transition:background ",Tl.transitionDurationFast," linear,color ",Tl.transitionDurationFast," linear,font-weight 60ms linear;}user-select:none;width:100%;z-index:2;&::-moz-focus-inner{border:0;}&[disabled]{opacity:0.4;cursor:default;}&:active{background:",Tl.controlBackgroundColor,";}",e&&L_," ",t&&B_({size:r})," ",n&&z_,";",""),z_=bl("color:",jl.white,";&:active{background:transparent;}",""),L_=bl("color:",jl.gray[900],";&:focus{box-shadow:inset 0 0 0 1px ",jl.white,",0 0 0 ",Tl.borderWidthFocus," ",jl.theme.accent,";outline:2px solid transparent;}",""),F_=cl("div",{target:"et6ln9s0"})("display:flex;font-size:",Tl.fontSize,";line-height:1;"),B_=({size:e="default"})=>bl("color:",jl.gray[900],";height:",{default:"30px","__unstable-large":"32px"}[e],";aspect-ratio:1;padding-left:0;padding-right:0;",""),V_=bl("background:",jl.gray[900],";border-radius:",Tl.radiusXSmall,";position:absolute;inset:0;z-index:1;outline:2px solid transparent;outline-offset:-3px;",""),{ButtonContentView:$_,LabelView:H_}=t,W_={duration:0},U_=({showTooltip:e,text:t,children:n})=>e&&t?(0,wt.jsx)(Yi,{text:t,placement:"top",children:n}):(0,wt.jsx)(wt.Fragment,{children:n});const G_=Xa((function e(t,n){const r=(0,l.useReducedMotion)(),o=(0,c.useContext)(S_),i=Ya({...t,id:(0,l.useInstanceId)(e,o.baseId||"toggle-group-control-option-base")},"ToggleGroupControlOptionBase"),{isBlock:s=!1,isDeselectable:a=!1,size:u="default"}=o,{className:d,isIcon:p=!1,value:f,children:h,showTooltip:m=!1,disabled:g,...v}=i,b=o.value===f,x=qa(),y=(0,c.useMemo)((()=>x(s&&D_)),[x,s]),w=(0,c.useMemo)((()=>x(O_({isDeselectable:a,isIcon:p,isPressed:b,size:u}),d)),[x,a,p,b,u,d]),_=(0,c.useMemo)((()=>x(V_)),[x]),S={...v,className:w,"data-value":f,ref:n};return(0,wt.jsxs)(H_,{className:y,children:[(0,wt.jsx)(U_,{showTooltip:m,text:v["aria-label"],children:a?(0,wt.jsx)("button",{...S,disabled:g,"aria-pressed":b,type:"button",onClick:()=>{a&&b?o.setValue(void 0):o.setValue(f)},children:(0,wt.jsx)($_,{children:h})}):(0,wt.jsx)(M_,{disabled:g,onFocusVisible:()=>{(null===o.value||""===o.value)&&!o.activeItemIsNotFirstItem?.()||o.setValue(f)},render:(0,wt.jsx)("button",{type:"button",...S}),value:f,children:(0,wt.jsx)($_,{children:h})})}),b?(0,wt.jsx)(dg.div,{layout:!0,layoutRoot:!0,children:(0,wt.jsx)(dg.div,{className:_,transition:r?W_:void 0,role:"presentation",layoutId:"toggle-group-backdrop-shared-layout-id"})}):null]})}),"ToggleGroupControlOptionBase"),K_=G_;const q_=(0,c.forwardRef)((function(e,t){const{icon:n,label:r,...o}=e;return(0,wt.jsx)(K_,{...o,isIcon:!0,"aria-label":r,showTooltip:!0,ref:t,children:(0,wt.jsx)(ry,{icon:n})})})),Y_=q_,X_=[{label:(0,a.__)("Solid"),icon:t_,value:"solid"},{label:(0,a.__)("Dashed"),icon:n_,value:"dashed"},{label:(0,a.__)("Dotted"),icon:r_,value:"dotted"}];const Z_=Xa((function({onChange:e,...t},n){return(0,wt.jsx)(R_,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,ref:n,isDeselectable:!0,onChange:t=>{e?.(t)},...t,children:X_.map((e=>(0,wt.jsx)(Y_,{value:e.value,icon:e.icon,label:e.label},e.value)))})}),"BorderControlStylePicker");const Q_=(0,c.forwardRef)((function(e,t){const{className:n,colorValue:r,...o}=e;return(0,wt.jsx)("span",{className:s("component-color-indicator",n),style:{background:r},ref:t,...o})}));var J_=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},eS=function(e){return.2126*J_(e.r)+.7152*J_(e.g)+.0722*J_(e.b)};function tS(e){e.prototype.luminance=function(){return e=eS(this.rgba),void 0===(t=2)&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0;var e,t,n},e.prototype.contrast=function(t){void 0===t&&(t="#FFF");var n,r,o,i,s,a,l,c=t instanceof e?t:new e(t);return i=this.rgba,s=c.toRgb(),n=(a=eS(i))>(l=eS(s))?(a+.05)/(l+.05):(l+.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)>=(s=void 0===(i=(n=t).size)?"normal":i,"AAA"===(o=void 0===(r=n.level)?"AA":r)&&"normal"===s?7:"AA"===o&&"large"===s?3:4.5);var n,r,o,i,s}}const nS=Xa(((e,t)=>{const{renderContent:n,renderToggle:r,className:o,contentClassName:i,expandOnMobile:a,headerTitle:u,focusOnMount:d,popoverProps:p,onClose:f,onToggle:h,style:m,open:g,defaultOpen:v,position:b,variant:x}=Ya(e,"Dropdown");void 0!==b&&Fi()("`position` prop in wp.components.Dropdown",{since:"6.2",alternative:"`popoverProps.placement` prop",hint:"Note that the `position` prop will override any values passed through the `popoverProps.placement` prop."});const[y,w]=(0,c.useState)(null),_=(0,c.useRef)(),[S,C]=E_({defaultValue:v,value:g,onChange:h});function k(){f?.(),C(!1)}const j={isOpen:!!S,onToggle:()=>C(!S),onClose:k},E=!!(p?.anchor||p?.anchorRef||p?.getAnchorRect||p?.anchorRect);return(0,wt.jsxs)("div",{className:o,ref:(0,l.useMergeRefs)([_,t,w]),tabIndex:-1,style:m,children:[r(j),S&&(0,wt.jsx)(Dw,{position:b,onClose:k,onFocusOutside:function(){if(!_.current)return;const{ownerDocument:e}=_.current,t=e?.activeElement?.closest('[role="dialog"]');_.current.contains(e.activeElement)||t&&!t.contains(_.current)||k()},expandOnMobile:a,headerTitle:u,focusOnMount:d,offset:13,anchor:E?void 0:y,variant:x,...p,className:s("components-dropdown__content",p?.className,i),children:n(j)})]})}),"Dropdown"),rS=nS;const oS=Xa((function(e,t){const n=Ya(e,"InputControlSuffixWrapper");return(0,wt.jsx)(bb,{...n,ref:t})}),"InputControlSuffixWrapper");const iS=({disabled:e})=>e?bl("color:",jl.ui.textDisabled,";cursor:default;",""):"";var sS={name:"1lv1yo7",styles:"display:inline-flex"};const aS=({variant:e})=>"minimal"===e?sS:"",lS=cl(kb,{target:"e1mv6sxx3"})("color:",jl.theme.foreground,";cursor:pointer;",iS," ",aS,";"),cS=({__next40pxDefaultSize:e,multiple:t,selectSize:n="default"})=>{if(t)return;const r={default:{height:40,minHeight:40,paddingTop:0,paddingBottom:0},small:{height:24,minHeight:24,paddingTop:0,paddingBottom:0},compact:{height:32,minHeight:32,paddingTop:0,paddingBottom:0},"__unstable-large":{height:40,minHeight:40,paddingTop:0,paddingBottom:0}};e||(r.default=r.compact);return bl(r[n]||r.default,"","")},uS=({__next40pxDefaultSize:e,multiple:t,selectSize:n="default"})=>{const r={default:Tl.controlPaddingX,small:Tl.controlPaddingXSmall,compact:Tl.controlPaddingXSmall,"__unstable-large":Tl.controlPaddingX};e||(r.default=r.compact);const o=r[n]||r.default;return Bg({paddingLeft:o,paddingRight:o+18,...t?{paddingTop:o,paddingBottom:o}:{}})},dS=({multiple:e})=>({overflow:e?"auto":"hidden"});var pS={name:"n1jncc",styles:"field-sizing:content"};const fS=({variant:e})=>"minimal"===e?pS:"",hS=cl("select",{target:"e1mv6sxx2"})("&&&{appearance:none;background:transparent;box-sizing:border-box;border:none;box-shadow:none!important;color:currentColor;cursor:inherit;display:block;font-family:inherit;margin:0;width:100%;max-width:none;white-space:nowrap;text-overflow:ellipsis;",lb,";",cS,";",uS,";",dS," ",fS,";}"),mS=cl("div",{target:"e1mv6sxx1"})("margin-inline-end:",wl(-1),";line-height:0;path{fill:currentColor;}"),gS=cl(oS,{target:"e1mv6sxx0"})("position:absolute;pointer-events:none;",Bg({right:0}),";");const vS=(0,c.forwardRef)((function({icon:e,size:t=24,...n},r){return(0,c.cloneElement)(e,{width:t,height:t,...n,ref:r})})),bS=(0,wt.jsx)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,wt.jsx)(n.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})}),xS=()=>(0,wt.jsx)(gS,{children:(0,wt.jsx)(mS,{children:(0,wt.jsx)(vS,{icon:bS,size:18})})});function yS({options:e}){return e.map((({id:e,label:t,value:n,...r},o)=>{const i=e||`${t}-${n}-${o}`;return(0,wt.jsx)("option",{value:n,...r,children:t},i)}))}const wS=(0,c.forwardRef)((function(e,t){const{className:n,disabled:r=!1,help:o,hideLabelFromVision:i,id:a,label:c,multiple:u=!1,onChange:d,options:p=[],size:f="default",value:h,labelPosition:m="top",children:g,prefix:v,suffix:b,variant:x="default",__next40pxDefaultSize:y=!1,__nextHasNoMarginBottom:w=!1,..._}=_b(e),S=function(e){const t=(0,l.useInstanceId)(wS);return e||`inspector-select-control-${t}`}(a),C=o?`${S}__help`:void 0;if(!p?.length&&!g)return null;const k=s("components-select-control",n);return(0,wt.jsx)(Qx,{help:o,id:S,__nextHasNoMarginBottom:w,__associatedWPComponentName:"SelectControl",children:(0,wt.jsx)(lS,{className:k,disabled:r,hideLabelFromVision:i,id:S,isBorderless:"minimal"===x,label:c,size:f,suffix:b||!u&&(0,wt.jsx)(xS,{}),prefix:v,labelPosition:m,__unstableInputWidth:"minimal"===x?"auto":void 0,variant:x,__next40pxDefaultSize:y,children:(0,wt.jsx)(hS,{..._,__next40pxDefaultSize:y,"aria-describedby":C,className:"components-select-control__input",disabled:r,id:S,multiple:u,onChange:t=>{if(e.multiple){const n=Array.from(t.target.options).filter((({selected:e})=>e)).map((({value:e})=>e));e.onChange?.(n,{event:t})}else e.onChange?.(t.target.value,{event:t})},ref:t,selectSize:f,value:h,variant:x,children:g||(0,wt.jsx)(yS,{options:p})})})})})),_S=wS,SS={initial:void 0,fallback:""};const CS=function(e,t=SS){const{initial:n,fallback:r}={...SS,...t},[o,i]=(0,c.useState)(e),s=qg(e);return(0,c.useEffect)((()=>{s&&o&&i(void 0)}),[s,o]),[function(e=[],t){var n;return null!==(n=e.find(qg))&&void 0!==n?n:t}([e,o,n],r),(0,c.useCallback)((e=>{s||i(e)}),[s])]};function kS(e,t,n){return"number"!=typeof e?null:parseFloat(`${hy(e,t,n)}`)}const jS=30,ES=()=>bl({height:jS,minHeight:jS},"",""),PS=12,TS=({__next40pxDefaultSize:e})=>!e&&bl({minHeight:jS},"",""),RS=cl("div",{target:"e1epgpqk14"})("-webkit-tap-highlight-color:transparent;align-items:center;display:flex;justify-content:flex-start;padding:0;position:relative;touch-action:none;width:100%;min-height:40px;",TS,";"),IS=({color:e=jl.ui.borderFocus})=>bl({color:e},"",""),NS=({marks:e,__nextHasNoMarginBottom:t})=>t?"":bl({marginBottom:e?16:void 0},"",""),MS=cl("div",{target:"e1epgpqk13"})("display:block;flex:1;position:relative;width:100%;",IS,";",ES,";",NS,";"),AS=cl("span",{target:"e1epgpqk12"})("display:flex;margin-top:",4,"px;",Bg({marginRight:6}),";"),DS=cl("span",{target:"e1epgpqk11"})("display:flex;margin-top:",4,"px;",Bg({marginLeft:6}),";"),OS=({disabled:e,railColor:t})=>{let n=t||"";return e&&(n=jl.ui.backgroundDisabled),bl({background:n},"","")},zS=cl("span",{target:"e1epgpqk10"})("background-color:",jl.gray[300],";left:0;pointer-events:none;right:0;display:block;height:",4,"px;position:absolute;margin-top:",13,"px;top:0;border-radius:",Tl.radiusFull,";",OS,";"),LS=({disabled:e,trackColor:t})=>{let n=t||"currentColor";return e&&(n=jl.gray[400]),bl({background:n},"","")},FS=cl("span",{target:"e1epgpqk9"})("background-color:currentColor;border-radius:",Tl.radiusFull,";height:",4,"px;pointer-events:none;display:block;position:absolute;margin-top:",13,"px;top:0;",LS,";"),BS=cl("span",{target:"e1epgpqk8"})({name:"l7tjj5",styles:"display:block;pointer-events:none;position:relative;width:100%;user-select:none"}),VS=({disabled:e,isFilled:t})=>{let n=t?"currentColor":jl.gray[300];return e&&(n=jl.gray[400]),bl({backgroundColor:n},"","")},$S=cl("span",{target:"e1epgpqk7"})("height:",PS,"px;left:0;position:absolute;top:9px;width:1px;",VS,";"),HS=({isFilled:e})=>bl({color:e?jl.gray[700]:jl.gray[300]},"",""),WS=cl("span",{target:"e1epgpqk6"})("color:",jl.gray[300],";font-size:11px;position:absolute;top:22px;white-space:nowrap;",Bg({left:0}),";",Bg({transform:"translateX( -50% )"},{transform:"translateX( 50% )"}),";",HS,";"),US=({disabled:e})=>bl("background-color:",e?jl.gray[400]:jl.theme.accent,";",""),GS=cl("span",{target:"e1epgpqk5"})("align-items:center;display:flex;height:",PS,"px;justify-content:center;margin-top:",9,"px;outline:0;pointer-events:none;position:absolute;top:0;user-select:none;width:",PS,"px;border-radius:",Tl.radiusRound,";",US,";",Bg({marginLeft:-10}),";",Bg({transform:"translateX( 4.5px )"},{transform:"translateX( -4.5px )"}),";"),KS=({isFocused:e})=>e?bl("&::before{content:' ';position:absolute;background-color:",jl.theme.accent,";opacity:0.4;border-radius:",Tl.radiusRound,";height:",20,"px;width:",20,"px;top:-4px;left:-4px;}",""):"",qS=cl("span",{target:"e1epgpqk4"})("align-items:center;border-radius:",Tl.radiusRound,";height:100%;outline:0;position:absolute;user-select:none;width:100%;box-shadow:",Tl.elevationXSmall,";",US,";",KS,";"),YS=cl("input",{target:"e1epgpqk3"})("box-sizing:border-box;cursor:pointer;display:block;height:100%;left:0;margin:0 -",6,"px;opacity:0;outline:none;position:absolute;right:0;top:0;width:calc( 100% + ",PS,"px );"),XS=({show:e})=>bl({opacity:e?1:0},"","");var ZS={name:"1cypxip",styles:"top:-80%"},QS={name:"1lr98c4",styles:"bottom:-80%"};const JS=({position:e})=>"bottom"===e?QS:ZS,eC=cl("span",{target:"e1epgpqk2"})("background:rgba( 0, 0, 0, 0.8 );border-radius:",Tl.radiusSmall,";color:white;display:inline-block;font-size:12px;min-width:32px;opacity:0;padding:4px 8px;pointer-events:none;position:absolute;text-align:center;user-select:none;line-height:1.4;@media not ( prefers-reduced-motion ){transition:opacity 120ms ease;}",XS,";",JS,";",Bg({transform:"translateX(-50%)"},{transform:"translateX(50%)"}),";"),tC=cl(Sy,{target:"e1epgpqk1"})("display:inline-block;font-size:13px;margin-top:0;input[type='number']&{",ES,";}",Bg({marginLeft:`${wl(4)} !important`}),";"),nC=cl("span",{target:"e1epgpqk0"})("display:block;margin-top:0;button,button.is-small{margin-left:0;",ES,";}",Bg({marginLeft:8}),";");const rC=(0,c.forwardRef)((function(e,t){const{describedBy:n,label:r,value:o,...i}=e;return(0,wt.jsx)(YS,{...i,"aria-describedby":n,"aria-label":r,"aria-hidden":!1,ref:t,tabIndex:0,type:"range",value:o})}));function oC(e){const{className:t,isFilled:n=!1,label:r,style:o={},...i}=e,a=s("components-range-control__mark",n&&"is-filled",t),l=s("components-range-control__mark-label",n&&"is-filled");return(0,wt.jsxs)(wt.Fragment,{children:[(0,wt.jsx)($S,{...i,"aria-hidden":"true",className:a,isFilled:n,style:o}),r&&(0,wt.jsx)(WS,{"aria-hidden":"true",className:l,isFilled:n,style:o,children:r})]})}function iC(e){const{disabled:t=!1,marks:n=!1,min:r=0,max:o=100,step:i=1,value:s=0,...a}=e;return(0,wt.jsxs)(wt.Fragment,{children:[(0,wt.jsx)(zS,{disabled:t,...a}),n&&(0,wt.jsx)(sC,{disabled:t,marks:n,min:r,max:o,step:i,value:s})]})}function sC(e){const{disabled:t=!1,marks:n=!1,min:r=0,max:o=100,step:i=1,value:s=0}=e,l=function({marks:e,min:t=0,max:n=100,step:r=1,value:o=0}){if(!e)return[];const i=n-t;if(!Array.isArray(e)){e=[];const n=1+Math.round(i/r);for(;n>e.push({value:r*e.length+t}););}const s=[];return e.forEach(((e,r)=>{if(e.value<t||e.value>n)return;const l=`mark-${r}`,c=e.value<=o,u=(e.value-t)/i*100+"%",d={[(0,a.isRTL)()?"right":"left"]:u};s.push({...e,isFilled:c,key:l,style:d})})),s}({marks:n,min:r,max:o,step:"any"===i?1:i,value:s});return(0,wt.jsx)(BS,{"aria-hidden":"true",className:"components-range-control__marks",children:l.map((e=>(0,B.createElement)(oC,{...e,key:e.key,"aria-hidden":"true",disabled:t})))})}function aC(e){const{className:t,inputRef:n,tooltipPosition:r,show:o=!1,style:i={},value:a=0,renderTooltipContent:l=(e=>e),zIndex:u=100,...d}=e,p=function({inputRef:e,tooltipPosition:t}){const[n,r]=(0,c.useState)(),o=(0,c.useCallback)((()=>{e&&e.current&&r(t)}),[t,e]);return(0,c.useEffect)((()=>{o()}),[o]),(0,c.useEffect)((()=>(window.addEventListener("resize",o),()=>{window.removeEventListener("resize",o)}))),n}({inputRef:n,tooltipPosition:r}),f=s("components-simple-tooltip",t),h={...i,zIndex:u};return(0,wt.jsx)(eC,{...d,"aria-hidden":o,className:f,position:p,show:o,role:"tooltip",style:h,children:l(a)})}const lC=()=>{};function cC({resetFallbackValue:e,initialPosition:t}){return void 0!==e?Number.isNaN(e)?null:e:void 0!==t?Number.isNaN(t)?null:t:null}const uC=(0,c.forwardRef)((function e(t,n){const{__nextHasNoMarginBottom:r=!1,afterIcon:o,allowReset:i=!1,beforeIcon:u,className:d,color:p=jl.theme.accent,currentInput:f,disabled:h=!1,help:m,hideLabelFromVision:g=!1,initialPosition:v,isShiftStepEnabled:b=!0,label:x,marks:y=!1,max:w=100,min:_=0,onBlur:S=lC,onChange:C=lC,onFocus:k=lC,onMouseLeave:j=lC,onMouseMove:E=lC,railColor:P,renderTooltipContent:T=(e=>e),resetFallbackValue:R,__next40pxDefaultSize:I=!1,shiftStep:N=10,showTooltip:M,step:A=1,trackColor:D,value:O,withInputField:z=!0,...L}=t,[F,B]=function(e){const{min:t,max:n,value:r,initial:o}=e,[i,s]=CS(kS(r,t,n),{initial:kS(null!=o?o:null,t,n),fallback:null});return[i,(0,c.useCallback)((e=>{s(null===e?null:kS(e,t,n))}),[t,n,s])]}({min:_,max:w,value:null!=O?O:null,initial:v}),V=(0,c.useRef)(!1);let $=M,H=z;"any"===A&&($=!1,H=!1);const[W,U]=(0,c.useState)($),[G,K]=(0,c.useState)(!1),q=(0,c.useRef)(),Y=q.current?.matches(":focus"),X=!h&&G,Z=null===F,Q=Z?"":void 0!==F?F:f,J=Z?(w-_)/2+_:F,ee=`${hy(Z?50:(F-_)/(w-_)*100,0,100)}%`,te=s("components-range-control",d),ne=s("components-range-control__wrapper",!!y&&"is-marked"),re=(0,l.useInstanceId)(e,"inspector-range-control"),oe=m?`${re}__help`:void 0,ie=!1!==$&&Number.isFinite(F),se=()=>{const e=Number.isNaN(R)?null:null!=R?R:null;B(e),C(null!=e?e:void 0)},ae={[(0,a.isRTL)()?"right":"left"]:ee};return(0,wt.jsx)(Qx,{__nextHasNoMarginBottom:r,__associatedWPComponentName:"RangeControl",className:te,label:x,hideLabelFromVision:g,id:`${re}`,help:m,children:(0,wt.jsxs)(RS,{className:"components-range-control__root",__next40pxDefaultSize:I,children:[u&&(0,wt.jsx)(AS,{children:(0,wt.jsx)(ry,{icon:u})}),(0,wt.jsxs)(MS,{__nextHasNoMarginBottom:r,className:ne,color:p,marks:!!y,children:[(0,wt.jsx)(rC,{...L,className:"components-range-control__slider",describedBy:oe,disabled:h,id:`${re}`,label:x,max:w,min:_,onBlur:e=>{S(e),K(!1),U(!1)},onChange:e=>{const t=parseFloat(e.target.value);B(t),C(t)},onFocus:e=>{k(e),K(!0),U(!0)},onMouseMove:E,onMouseLeave:j,ref:(0,l.useMergeRefs)([q,n]),step:A,value:null!=Q?Q:void 0}),(0,wt.jsx)(iC,{"aria-hidden":!0,disabled:h,marks:y,max:w,min:_,railColor:P,step:A,value:J}),(0,wt.jsx)(FS,{"aria-hidden":!0,className:"components-range-control__track",disabled:h,style:{width:ee},trackColor:D}),(0,wt.jsx)(GS,{className:"components-range-control__thumb-wrapper",style:ae,disabled:h,children:(0,wt.jsx)(qS,{"aria-hidden":!0,isFocused:X,disabled:h})}),ie&&(0,wt.jsx)(aC,{className:"components-range-control__tooltip",inputRef:q,tooltipPosition:"bottom",renderTooltipContent:T,show:Y||W,style:ae,value:F})]}),o&&(0,wt.jsx)(DS,{children:(0,wt.jsx)(ry,{icon:o})}),H&&(0,wt.jsx)(tC,{"aria-label":x,className:"components-range-control__number",disabled:h,inputMode:"decimal",isShiftStepEnabled:b,max:w,min:_,onBlur:()=>{V.current&&(se(),V.current=!1)},onChange:e=>{let t=parseFloat(e);B(t),isNaN(t)?i&&(V.current=!0):((t<_||t>w)&&(t=kS(t,_,w)),C(t),V.current=!1)},shiftStep:N,size:I?"__unstable-large":"default",__unstableInputWidth:wl(I?20:16),step:A,value:Q}),i&&(0,wt.jsx)(nC,{children:(0,wt.jsx)(sy,{className:"components-range-control__reset",accessibleWhenDisabled:!h,disabled:h||F===cC({resetFallbackValue:R,initialPosition:v}),variant:"secondary",size:"small",onClick:se,children:(0,a.__)("Reset")})})]})})})),dC=uC,pC=cl(Sy,{target:"ez9hsf47"})("width:",wl(24),";"),fC=cl(_S,{target:"ez9hsf46"})("margin-left:",wl(-2),";width:5em;"),hC=cl(dC,{target:"ez9hsf45"})("flex:1;margin-right:",wl(2),";"),mC=`\n.react-colorful__interactive {\n\twidth: calc( 100% - ${wl(2)} );\n\tmargin-left: ${wl(1)};\n}`,gC=cl("div",{target:"ez9hsf44"})("padding-top:",wl(2),";padding-right:0;padding-left:0;padding-bottom:0;"),vC=cl(yy,{target:"ez9hsf43"})("padding-left:",wl(4),";padding-right:",wl(4),";"),bC=cl(Ig,{target:"ez9hsf42"})("padding-top:",wl(4),";padding-left:",wl(4),";padding-right:",wl(3),";padding-bottom:",wl(5),";"),xC=cl("div",{target:"ez9hsf41"})(Bx,";width:216px;.react-colorful{display:flex;flex-direction:column;align-items:center;width:216px;height:auto;}.react-colorful__saturation{width:100%;border-radius:0;height:216px;margin-bottom:",wl(4),";border-bottom:none;}.react-colorful__hue,.react-colorful__alpha{width:184px;height:16px;border-radius:",Tl.radiusFull,";margin-bottom:",wl(2),";}.react-colorful__pointer{height:16px;width:16px;border:none;box-shadow:0 0 2px 0 rgba( 0, 0, 0, 0.25 );outline:2px solid transparent;}.react-colorful__pointer-fill{box-shadow:inset 0 0 0 ",Tl.borderWidthFocus," #fff;}",mC,";"),yC=cl(sy,{target:"ez9hsf40"})("&&&&&{min-width:",wl(6),";padding:0;>svg{margin-right:0;}}"),wC=(0,wt.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wt.jsx)(n.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5 4.5h11a.5.5 0 0 1 .5.5v11a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V5a.5.5 0 0 1 .5-.5ZM3 5a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5Zm17 3v10.75c0 .69-.56 1.25-1.25 1.25H6v1.5h12.75a2.75 2.75 0 0 0 2.75-2.75V8H20Z"})}),_C=e=>{const{color:t,colorType:n}=e,[r,o]=(0,c.useState)(null),i=(0,c.useRef)(),s=(0,l.useCopyToClipboard)((()=>{switch(n){case"hsl":return t.toHslString();case"rgb":return t.toRgbString();default:return t.toHex()}}),(()=>{i.current&&clearTimeout(i.current),o(t.toHex()),i.current=setTimeout((()=>{o(null),i.current=void 0}),3e3)}));return(0,c.useEffect)((()=>()=>{i.current&&clearTimeout(i.current)}),[]),(0,wt.jsx)(Yi,{delay:0,hideOnClick:!1,text:r===t.toHex()?(0,a.__)("Copied!"):(0,a.__)("Copy"),children:(0,wt.jsx)(yC,{size:"small",ref:s,icon:wC,showTooltip:!1})})};const SC=Xa((function(e,t){const n=Ya(e,"InputControlPrefixWrapper");return(0,wt.jsx)(bb,{...n,isPrefix:!0,ref:t})}),"InputControlPrefixWrapper"),CC=({min:e,max:t,label:n,abbreviation:r,onChange:o,value:i})=>(0,wt.jsxs)(yy,{spacing:4,children:[(0,wt.jsx)(pC,{min:e,max:t,label:n,hideLabelFromVision:!0,value:i,onChange:e=>{o(e?"string"!=typeof e?e:parseInt(e,10):0)},prefix:(0,wt.jsx)(SC,{children:(0,wt.jsx)(Xv,{color:jl.theme.accent,lineHeight:1,children:r})}),spinControls:"none",size:"__unstable-large"}),(0,wt.jsx)(hC,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:n,hideLabelFromVision:!0,min:e,max:t,value:i,onChange:o,withInputField:!1})]}),kC=({color:e,onChange:t,enableAlpha:n})=>{const{r,g:o,b:i,a:s}=e.toRgb();return(0,wt.jsxs)(wt.Fragment,{children:[(0,wt.jsx)(CC,{min:0,max:255,label:"Red",abbreviation:"R",value:r,onChange:e=>t(Ev({r:e,g:o,b:i,a:s}))}),(0,wt.jsx)(CC,{min:0,max:255,label:"Green",abbreviation:"G",value:o,onChange:e=>t(Ev({r,g:e,b:i,a:s}))}),(0,wt.jsx)(CC,{min:0,max:255,label:"Blue",abbreviation:"B",value:i,onChange:e=>t(Ev({r,g:o,b:e,a:s}))}),n&&(0,wt.jsx)(CC,{min:0,max:100,label:"Alpha",abbreviation:"A",value:Math.trunc(100*s),onChange:e=>t(Ev({r,g:o,b:i,a:e/100}))})]})},jC=({color:e,onChange:t,enableAlpha:n})=>{const r=(0,c.useMemo)((()=>e.toHsl()),[e]),[o,i]=(0,c.useState)({...r}),s=e.isEqual(Ev(o));(0,c.useEffect)((()=>{s||i(r)}),[r,s]);const a=s?o:r,l=n=>{const r=Ev({...a,...n});e.isEqual(r)?i((e=>({...e,...n}))):t(r)};return(0,wt.jsxs)(wt.Fragment,{children:[(0,wt.jsx)(CC,{min:0,max:359,label:"Hue",abbreviation:"H",value:a.h,onChange:e=>{l({h:e})}}),(0,wt.jsx)(CC,{min:0,max:100,label:"Saturation",abbreviation:"S",value:a.s,onChange:e=>{l({s:e})}}),(0,wt.jsx)(CC,{min:0,max:100,label:"Lightness",abbreviation:"L",value:a.l,onChange:e=>{l({l:e})}}),n&&(0,wt.jsx)(CC,{min:0,max:100,label:"Alpha",abbreviation:"A",value:Math.trunc(100*a.a),onChange:e=>{l({a:e/100})}})]})},EC=({color:e,onChange:t,enableAlpha:n})=>(0,wt.jsx)(ey,{prefix:(0,wt.jsx)(SC,{children:(0,wt.jsx)(Xv,{color:jl.theme.accent,lineHeight:1,children:"#"})}),value:e.toHex().slice(1).toUpperCase(),onChange:e=>{if(!e)return;const n=e.startsWith("#")?e:"#"+e;t(Ev(n))},maxLength:n?9:7,label:(0,a.__)("Hex color"),hideLabelFromVision:!0,size:"__unstable-large",__unstableStateReducer:(e,t)=>{const n=t.payload?.event?.nativeEvent;if("insertFromPaste"!==n?.inputType)return{...e};const r=e.value?.startsWith("#")?e.value.slice(1).toUpperCase():e.value?.toUpperCase();return{...e,value:r}},__unstableInputWidth:"9em"}),PC=({colorType:e,color:t,onChange:n,enableAlpha:r})=>{const o={color:t,onChange:n,enableAlpha:r};switch(e){case"hsl":return(0,wt.jsx)(jC,{...o});case"rgb":return(0,wt.jsx)(kC,{...o});default:return(0,wt.jsx)(EC,{...o})}};function TC(){return(TC=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function RC(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(o[n]=e[n]);return o}function IC(e){var t=(0,B.useRef)(e),n=(0,B.useRef)((function(e){t.current&&t.current(e)}));return t.current=e,n.current}var NC=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e<t?t:e},MC=function(e){return"touches"in e},AC=function(e){return e&&e.ownerDocument.defaultView||self},DC=function(e,t,n){var r=e.getBoundingClientRect(),o=MC(t)?function(e,t){for(var n=0;n<e.length;n++)if(e[n].identifier===t)return e[n];return e[0]}(t.touches,n):t;return{left:NC((o.pageX-(r.left+AC(e).pageXOffset))/r.width),top:NC((o.pageY-(r.top+AC(e).pageYOffset))/r.height)}},OC=function(e){!MC(e)&&e.preventDefault()},zC=B.memo((function(e){var t=e.onMove,n=e.onKey,r=RC(e,["onMove","onKey"]),o=(0,B.useRef)(null),i=IC(t),s=IC(n),a=(0,B.useRef)(null),l=(0,B.useRef)(!1),c=(0,B.useMemo)((function(){var e=function(e){OC(e),(MC(e)?e.touches.length>0:e.buttons>0)&&o.current?i(DC(o.current,e,a.current)):n(!1)},t=function(){return n(!1)};function n(n){var r=l.current,i=AC(o.current),s=n?i.addEventListener:i.removeEventListener;s(r?"touchmove":"mousemove",e),s(r?"touchend":"mouseup",t)}return[function(e){var t=e.nativeEvent,r=o.current;if(r&&(OC(t),!function(e,t){return t&&!MC(e)}(t,l.current)&&r)){if(MC(t)){l.current=!0;var s=t.changedTouches||[];s.length&&(a.current=s[0].identifier)}r.focus(),i(DC(r,t,a.current)),n(!0)}},function(e){var t=e.which||e.keyCode;t<37||t>40||(e.preventDefault(),s({left:39===t?.05:37===t?-.05:0,top:40===t?.05:38===t?-.05:0}))},n]}),[s,i]),u=c[0],d=c[1],p=c[2];return(0,B.useEffect)((function(){return p}),[p]),B.createElement("div",TC({},r,{onTouchStart:u,onMouseDown:u,className:"react-colorful__interactive",ref:o,onKeyDown:d,tabIndex:0,role:"slider"}))})),LC=function(e){return e.filter(Boolean).join(" ")},FC=function(e){var t=e.color,n=e.left,r=e.top,o=void 0===r?.5:r,i=LC(["react-colorful__pointer",e.className]);return B.createElement("div",{className:i,style:{top:100*o+"%",left:100*n+"%"}},B.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},BC=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n},VC=(Math.PI,function(e){var t=e.s,n=e.v,r=e.a,o=(200-t)*n/100;return{h:BC(e.h),s:BC(o>0&&o<200?t*n/100/(o<=100?o:200-o)*100:0),l:BC(o/2),a:BC(r,2)}}),$C=function(e){var t=VC(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},HC=function(e){var t=VC(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},WC=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),s=r*(1-n),a=r*(1-(t-i)*n),l=r*(1-(1-t+i)*n),c=i%6;return{r:BC(255*[r,a,s,s,l,r][c]),g:BC(255*[l,r,r,a,s,s][c]),b:BC(255*[s,s,l,r,r,a][c]),a:BC(o,2)}},UC=function(e){var t=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?KC({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)}):{h:0,s:0,v:0,a:1}},GC=UC,KC=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=Math.max(t,n,r),s=i-Math.min(t,n,r),a=s?i===t?(n-r)/s:i===n?2+(r-t)/s:4+(t-n)/s:0;return{h:BC(60*(a<0?a+6:a)),s:BC(i?s/i*100:0),v:BC(i/255*100),a:o}},qC=B.memo((function(e){var t=e.hue,n=e.onChange,r=LC(["react-colorful__hue",e.className]);return B.createElement("div",{className:r},B.createElement(zC,{onMove:function(e){n({h:360*e.left})},onKey:function(e){n({h:NC(t+360*e.left,0,360)})},"aria-label":"Hue","aria-valuenow":BC(t),"aria-valuemax":"360","aria-valuemin":"0"},B.createElement(FC,{className:"react-colorful__hue-pointer",left:t/360,color:$C({h:t,s:100,v:100,a:1})})))})),YC=B.memo((function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:$C({h:t.h,s:100,v:100,a:1})};return B.createElement("div",{className:"react-colorful__saturation",style:r},B.createElement(zC,{onMove:function(e){n({s:100*e.left,v:100-100*e.top})},onKey:function(e){n({s:NC(t.s+100*e.left,0,100),v:NC(t.v-100*e.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+BC(t.s)+"%, Brightness "+BC(t.v)+"%"},B.createElement(FC,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:$C(t)})))})),XC=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},ZC=function(e,t){return e.replace(/\s/g,"")===t.replace(/\s/g,"")};function QC(e,t,n){var r=IC(n),o=(0,B.useState)((function(){return e.toHsva(t)})),i=o[0],s=o[1],a=(0,B.useRef)({color:t,hsva:i});(0,B.useEffect)((function(){if(!e.equal(t,a.current.color)){var n=e.toHsva(t);a.current={hsva:n,color:t},s(n)}}),[t,e]),(0,B.useEffect)((function(){var t;XC(i,a.current.hsva)||e.equal(t=e.fromHsva(i),a.current.color)||(a.current={hsva:i,color:t},r(t))}),[i,e,r]);var l=(0,B.useCallback)((function(e){s((function(t){return Object.assign({},t,e)}))}),[]);return[i,l]}var JC,ek="undefined"!=typeof window?B.useLayoutEffect:B.useEffect,tk=new Map,nk=function(e){ek((function(){var t=e.current?e.current.ownerDocument:document;if(void 0!==t&&!tk.has(t)){var n=t.createElement("style");n.innerHTML='.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url(\'data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>\')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}',tk.set(t,n);var r=JC||o.nc;r&&n.setAttribute("nonce",r),t.head.appendChild(n)}}),[])},rk=function(e){var t=e.className,n=e.colorModel,r=e.color,o=void 0===r?n.defaultColor:r,i=e.onChange,s=RC(e,["className","colorModel","color","onChange"]),a=(0,B.useRef)(null);nk(a);var l=QC(n,o,i),c=l[0],u=l[1],d=LC(["react-colorful",t]);return B.createElement("div",TC({},s,{ref:a,className:d}),B.createElement(YC,{hsva:c,onChange:u}),B.createElement(qC,{hue:c.h,onChange:u,className:"react-colorful__last-control"}))},ok=function(e){var t=e.className,n=e.hsva,r=e.onChange,o={backgroundImage:"linear-gradient(90deg, "+HC(Object.assign({},n,{a:0}))+", "+HC(Object.assign({},n,{a:1}))+")"},i=LC(["react-colorful__alpha",t]),s=BC(100*n.a);return B.createElement("div",{className:i},B.createElement("div",{className:"react-colorful__alpha-gradient",style:o}),B.createElement(zC,{onMove:function(e){r({a:e.left})},onKey:function(e){r({a:NC(n.a+e.left)})},"aria-label":"Alpha","aria-valuetext":s+"%","aria-valuenow":s,"aria-valuemin":"0","aria-valuemax":"100"},B.createElement(FC,{className:"react-colorful__alpha-pointer",left:n.a,color:HC(n)})))},ik=function(e){var t=e.className,n=e.colorModel,r=e.color,o=void 0===r?n.defaultColor:r,i=e.onChange,s=RC(e,["className","colorModel","color","onChange"]),a=(0,B.useRef)(null);nk(a);var l=QC(n,o,i),c=l[0],u=l[1],d=LC(["react-colorful",t]);return B.createElement("div",TC({},s,{ref:a,className:d}),B.createElement(YC,{hsva:c,onChange:u}),B.createElement(qC,{hue:c.h,onChange:u}),B.createElement(ok,{hsva:c,onChange:u,className:"react-colorful__last-control"}))},sk={defaultColor:"rgba(0, 0, 0, 1)",toHsva:UC,fromHsva:function(e){var t=WC(e);return"rgba("+t.r+", "+t.g+", "+t.b+", "+t.a+")"},equal:ZC},ak=function(e){return B.createElement(ik,TC({},e,{colorModel:sk}))},lk={defaultColor:"rgb(0, 0, 0)",toHsva:GC,fromHsva:function(e){var t=WC(e);return"rgb("+t.r+", "+t.g+", "+t.b+")"},equal:ZC},ck=function(e){return B.createElement(rk,TC({},e,{colorModel:lk}))};const uk=({color:e,enableAlpha:t,onChange:n})=>{const r=t?ak:ck,o=(0,c.useMemo)((()=>e.toRgbString()),[e]);return(0,wt.jsx)(r,{color:o,onChange:e=>{n(Ev(e))},onPointerDown:({currentTarget:e,pointerId:t})=>{e.setPointerCapture(t)},onPointerUp:({currentTarget:e,pointerId:t})=>{e.releasePointerCapture(t)}})};Tv([Rv]);const dk=[{label:"RGB",value:"rgb"},{label:"HSL",value:"hsl"},{label:"Hex",value:"hex"}],pk=Xa(((e,t)=>{const{enableAlpha:n=!1,color:r,onChange:o,defaultValue:i="#fff",copyFormat:s,...u}=Ya(e,"ColorPicker"),[d,p]=E_({onChange:o,value:r,defaultValue:i}),f=(0,c.useMemo)((()=>Ev(d||"")),[d]),h=(0,l.useDebounce)(p),m=(0,c.useCallback)((e=>{h(e.toHex())}),[h]),[g,v]=(0,c.useState)(s||"hex");return(0,wt.jsxs)(xC,{ref:t,...u,children:[(0,wt.jsx)(uk,{onChange:m,color:f,enableAlpha:n}),(0,wt.jsxs)(gC,{children:[(0,wt.jsxs)(vC,{justify:"space-between",children:[(0,wt.jsx)(fC,{__nextHasNoMarginBottom:!0,options:dk,value:g,onChange:e=>v(e),label:(0,a.__)("Color format"),hideLabelFromVision:!0,variant:"minimal"}),(0,wt.jsx)(_C,{color:f,colorType:s||g})]}),(0,wt.jsx)(bC,{direction:"column",gap:2,children:(0,wt.jsx)(PC,{colorType:g,color:f,onChange:m,enableAlpha:n})})]})]})}),"ColorPicker"),fk=pk;function hk(e){if(void 0!==e)return"string"==typeof e?e:e.hex?e.hex:void 0}const mk=gs((e=>{const t=Ev(e),n=t.toHex(),r=t.toRgb(),o=t.toHsv(),i=t.toHsl();return{hex:n,rgb:r,hsv:o,hsl:i,source:"hex",oldHue:i.h}}));function gk(e){const{onChangeComplete:t}=e,n=(0,c.useCallback)((e=>{t(mk(e))}),[t]);return function(e){return void 0!==e.onChangeComplete||void 0!==e.disableAlpha||"string"==typeof e.color?.hex}(e)?{color:hk(e.color),enableAlpha:!e.disableAlpha,onChange:n}:{...e,color:e.color,enableAlpha:e.enableAlpha,onChange:e.onChange}}const vk=e=>(0,wt.jsx)(fk,{...gk(e)}),bk=(0,c.createContext)({}),xk=(0,wt.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wt.jsx)(n.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})});const yk=(0,c.forwardRef)((function(e,t){const{isPressed:n,...r}=e;return(0,wt.jsx)(sy,{...r,"aria-pressed":n,ref:t})}));const wk=(0,c.forwardRef)((function(e,t){const{id:n,isSelected:r,...o}=e,{setActiveId:i,activeId:s}=(0,c.useContext)(bk);return(0,c.useEffect)((()=>{r&&!s&&window.setTimeout((()=>i?.(n)),0)}),[r,i,s,n]),(0,wt.jsx)(Dn.Item,{render:(0,wt.jsx)(sy,{...o,role:"option","aria-selected":!!r,ref:t}),id:n})}));function _k(e){const{actions:t,options:n,baseId:r,className:o,loop:i=!0,children:s,...l}=e,[u,d]=(0,c.useState)(void 0),p=(0,c.useMemo)((()=>({baseId:r,activeId:u,setActiveId:d})),[r,u,d]);return(0,wt.jsx)("div",{className:o,children:(0,wt.jsxs)(bk.Provider,{value:p,children:[(0,wt.jsx)(Dn,{...l,id:r,focusLoop:i,rtl:(0,a.isRTL)(),role:"listbox",activeId:u,setActiveId:d,children:n}),s,t]})})}function Sk(e){const{actions:t,options:n,children:r,baseId:o,...i}=e,s=(0,c.useMemo)((()=>({baseId:o})),[o]);return(0,wt.jsx)("div",{...i,id:o,children:(0,wt.jsxs)(bk.Provider,{value:s,children:[n,r,t]})})}function Ck(e){const{asButtons:t,actions:n,options:r,children:o,className:i,...a}=e,c=(0,l.useInstanceId)(Ck,"components-circular-option-picker",a.id),u=t?Sk:_k,d=n?(0,wt.jsx)("div",{className:"components-circular-option-picker__custom-clear-wrapper",children:n}):void 0,p=(0,wt.jsx)("div",{className:"components-circular-option-picker__swatches",children:r});return(0,wt.jsx)(u,{...a,baseId:c,className:s("components-circular-option-picker",i),actions:d,options:p,children:o})}Ck.Option=function e({className:t,isSelected:n,selectedIconProps:r={},tooltipText:o,...i}){const{baseId:a,setActiveId:u}=(0,c.useContext)(bk),d={id:(0,l.useInstanceId)(e,a||"components-circular-option-picker__option"),className:"components-circular-option-picker__option",...i},p=void 0!==u?(0,wt.jsx)(wk,{...d,isSelected:n}):(0,wt.jsx)(yk,{...d,isPressed:n});return(0,wt.jsxs)("div",{className:s(t,"components-circular-option-picker__option-wrapper"),children:[o?(0,wt.jsx)(Yi,{text:o,children:p}):p,n&&(0,wt.jsx)(vS,{icon:xk,...r})]})},Ck.OptionGroup=function({className:e,options:t,...n}){const r="aria-label"in n||"aria-labelledby"in n?"group":void 0;return(0,wt.jsx)("div",{...n,role:r,className:s("components-circular-option-picker__option-group","components-circular-option-picker__swatches",e),children:t})},Ck.ButtonAction=function({className:e,children:t,...n}){return(0,wt.jsx)(sy,{className:s("components-circular-option-picker__clear",e),variant:"tertiary",...n,children:t})},Ck.DropdownLinkAction=function({buttonProps:e,className:t,dropdownProps:n,linkText:r}){return(0,wt.jsx)(rS,{className:s("components-circular-option-picker__dropdown-link-action",t),renderToggle:({isOpen:t,onToggle:n})=>(0,wt.jsx)(sy,{"aria-expanded":t,"aria-haspopup":"true",onClick:n,variant:"link",...e,children:r}),...n})};const kk=Ck;const jk=Xa((function(e,t){const n=function(e){const{expanded:t=!1,alignment:n="stretch",...r}=Ya(e,"VStack");return xy({direction:"column",expanded:t,alignment:n,...r})}(e);return(0,wt.jsx)(dl,{...n,ref:t})}),"VStack");const Ek=Xa((function(e,t){const n=ev(e);return(0,wt.jsx)(dl,{as:"span",...n,ref:t})}),"Truncate");const Pk=Xa((function(e,t){const n=function(e){const{as:t,level:n=2,color:r=jl.gray[900],isBlock:o=!0,weight:i=Tl.fontWeightHeading,...s}=Ya(e,"Heading"),a=t||`h${n}`,l={};return"string"==typeof a&&"h"!==a[0]&&(l.role="heading",l["aria-level"]="string"==typeof n?parseInt(n):n),{...Yv({color:r,isBlock:o,weight:i,size:Kv(n),...s}),...l,as:a}}(e);return(0,wt.jsx)(dl,{...n,ref:t})}),"Heading"),Tk=Pk;const Rk=cl(Tk,{target:"ev9wop70"})({name:"13lxv2o",styles:"text-transform:uppercase;line-height:24px;font-weight:500;&&&{font-size:11px;margin-bottom:0;}"}),Ik=({paddingSize:e="small"})=>{if("none"===e)return;const t={small:wl(2),medium:wl(4)};return bl("padding:",t[e]||t.small,";","")},Nk=cl("div",{target:"eovvns30"})("margin-left:",wl(-2),";margin-right:",wl(-2),";&:first-of-type{margin-top:",wl(-2),";}&:last-of-type{margin-bottom:",wl(-2),";}",Ik,";");const Mk=Xa((function(e,t){const{paddingSize:n="small",...r}=Ya(e,"DropdownContentWrapper");return(0,wt.jsx)(Nk,{...r,paddingSize:n,ref:t})}),"DropdownContentWrapper");Tv([Rv,tS]);const Ak=e=>{const t=/var\(/.test(null!=e?e:""),n=/color-mix\(/.test(null!=e?e:"");return!t&&!n},Dk=e=>e.length>0&&e.every((e=>{return t=e,Array.isArray(t.colors)&&!("color"in t);var t}));function Ok({className:e,clearColor:t,colors:n,onChange:r,value:o,...i}){const s=(0,c.useMemo)((()=>n.map((({color:e,name:n},i)=>{const s=Ev(e),l=o===e;return(0,wt.jsx)(kk.Option,{isSelected:l,selectedIconProps:l?{fill:s.contrast()>s.contrast("#000")?"#fff":"#000"}:{},tooltipText:n||(0,a.sprintf)((0,a.__)("Color code: %s"),e),style:{backgroundColor:e,color:e},onClick:l?t:()=>r(e,i),"aria-label":n?(0,a.sprintf)((0,a.__)("Color: %s"),n):(0,a.sprintf)((0,a.__)("Color code: %s"),e)},`${e}-${i}`)}))),[n,o,r,t]);return(0,wt.jsx)(kk.OptionGroup,{className:e,options:s,...i})}function zk({className:e,clearColor:t,colors:n,onChange:r,value:o,headingLevel:i}){const s=(0,l.useInstanceId)(zk,"color-palette");return 0===n.length?null:(0,wt.jsx)(jk,{spacing:3,className:e,children:n.map((({name:e,colors:n},a)=>{const l=`${s}-${a}`;return(0,wt.jsxs)(jk,{spacing:2,children:[(0,wt.jsx)(Rk,{id:l,level:i,children:e}),(0,wt.jsx)(Ok,{clearColor:t,colors:n,onChange:e=>r(e,a),value:o,"aria-labelledby":l})]},a)}))})}function Lk({isRenderedInSidebar:e,popoverProps:t,...n}){const r=(0,c.useMemo)((()=>({shift:!0,resize:!1,...e?{placement:"left-start",offset:34}:{placement:"bottom",offset:8},...t})),[e,t]);return(0,wt.jsx)(rS,{contentClassName:"components-color-palette__custom-color-dropdown-content",popoverProps:r,...n})}Tv([Rv,tS]);const Fk=(0,c.forwardRef)((function(e,t){const{asButtons:n,loop:r,clearable:o=!0,colors:i=[],disableCustomColors:l=!1,enableAlpha:u=!1,onChange:d,value:p,__experimentalIsRenderedInSidebar:f=!1,headingLevel:h=2,"aria-label":m,"aria-labelledby":g,...v}=e,[b,x]=(0,c.useState)(p),y=(0,c.useCallback)((()=>d(void 0)),[d]),w=(0,c.useCallback)((e=>{x(((e,t)=>{if(!e||!t||Ak(e))return e;const{ownerDocument:n}=t,{defaultView:r}=n,o=r?.getComputedStyle(t).backgroundColor;return o?Ev(o).toHex():e})(p,e))}),[p]),_=Dk(i),S=(0,c.useMemo)((()=>((e,t=[],n=!1)=>{if(!e)return"";const r=!!e&&Ak(e),o=r?Ev(e).toHex():e,i=n?t:[{colors:t}];for(const{colors:e}of i)for(const{name:t,color:n}of e)if(o===(r?Ev(n).toHex():n))return t;return(0,a.__)("Custom")})(p,i,_)),[p,i,_]),C=p?.startsWith("#"),k=p?.replace(/^var\((.+)\)$/,"$1"),j=k?(0,a.sprintf)((0,a.__)('Custom color picker. The currently selected color is called "%1$s" and has a value of "%2$s".'),S,k):(0,a.__)("Custom color picker."),E={clearColor:y,onChange:d,value:p},P=!!o&&(0,wt.jsx)(kk.ButtonAction,{onClick:y,children:(0,a.__)("Clear")});let T;if(n)T={asButtons:!0};else{const e={asButtons:!1,loop:r};T=m?{...e,"aria-label":m}:g?{...e,"aria-labelledby":g}:{...e,"aria-label":(0,a.__)("Custom color picker.")}}return(0,wt.jsxs)(jk,{spacing:3,ref:t,...v,children:[!l&&(0,wt.jsx)(Lk,{isRenderedInSidebar:f,renderContent:()=>(0,wt.jsx)(Mk,{paddingSize:"none",children:(0,wt.jsx)(vk,{color:b,onChange:e=>d(e),enableAlpha:u})}),renderToggle:({isOpen:e,onToggle:t})=>(0,wt.jsxs)(jk,{className:"components-color-palette__custom-color-wrapper",spacing:0,children:[(0,wt.jsx)("button",{ref:w,className:"components-color-palette__custom-color-button","aria-expanded":e,"aria-haspopup":"true",onClick:t,"aria-label":j,style:{background:p},type:"button"}),(0,wt.jsxs)(jk,{className:"components-color-palette__custom-color-text-wrapper",spacing:.5,children:[(0,wt.jsx)(Ek,{className:"components-color-palette__custom-color-name",children:p?S:(0,a.__)("No color selected")}),(0,wt.jsx)(Ek,{className:s("components-color-palette__custom-color-value",{"components-color-palette__custom-color-value--is-hex":C}),children:k})]})]})}),(i.length>0||P)&&(0,wt.jsx)(kk,{...T,actions:P,options:_?(0,wt.jsx)(zk,{...E,headingLevel:h,colors:i,value:p}):(0,wt.jsx)(Ok,{...E,colors:i,value:p})})]})})),Bk=Fk,Vk=cl(Sy,{target:"e1bagdl32"})("&&&{input{display:block;width:100%;}",tb,"{transition:box-shadow 0.1s linear;}}"),$k=({selectSize:e})=>({small:bl("box-sizing:border-box;padding:2px 1px;width:20px;font-size:8px;line-height:1;letter-spacing:-0.5px;text-transform:uppercase;text-align-last:center;&:not( :disabled ){color:",jl.gray[800],";}",""),default:bl("box-sizing:border-box;min-width:24px;max-width:48px;height:24px;margin-inline-end:",wl(2),";padding:",wl(1),";font-size:13px;line-height:1;text-align-last:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;field-sizing:content;&:not( :disabled ){color:",jl.theme.accent,";}","")}[e]),Hk=cl("div",{target:"e1bagdl31"})("&&&{pointer-events:none;",$k,";color:",jl.gray[900],";}"),Wk=({selectSize:e="default"})=>({small:bl("height:100%;border:1px solid transparent;transition:box-shadow 0.1s linear,border 0.1s linear;",Bg({borderTopLeftRadius:0,borderBottomLeftRadius:0})()," &:not(:disabled):hover{background-color:",jl.gray[100],";}&:focus{border:1px solid ",jl.ui.borderFocus,";box-shadow:inset 0 0 0 ",Tl.borderWidth+" "+jl.ui.borderFocus,";outline-offset:0;outline:2px solid transparent;z-index:1;}",""),default:bl("display:flex;justify-content:center;align-items:center;&:where( :not( :disabled ) ):hover{box-shadow:0 0 0 ",Tl.borderWidth+" "+jl.ui.borderFocus,";outline:",Tl.borderWidth," solid transparent;}&:focus{box-shadow:0 0 0 ",Tl.borderWidthFocus+" "+jl.ui.borderFocus,";outline:",Tl.borderWidthFocus," solid transparent;}","")}[e]),Uk=cl("select",{target:"e1bagdl30"})("&&&{appearance:none;background:transparent;border-radius:",Tl.radiusXSmall,";border:none;display:block;outline:none;margin:0;min-height:auto;font-family:inherit;",$k,";",Wk,";&:not( :disabled ){cursor:pointer;}}"),Gk=bl("box-shadow:inset ",Tl.controlBoxShadowFocus,";",""),Kk=bl("border:0;padding:0;margin:0;",Bx,";",""),qk=bl(Vk,"{flex:0 0 auto;}",""),Yk=bl("background:#fff;&&>button{aspect-ratio:1;padding:0;display:flex;align-items:center;justify-content:center;",Bg({borderRadius:"2px 0 0 2px"},{borderRadius:"0 2px 2px 0"})()," border:",Tl.borderWidth," solid ",jl.ui.border,";&:focus,&:hover:not( :disabled ){",Gk," border-color:",jl.ui.borderFocus,";z-index:1;position:relative;}}",""),Xk=(e,t)=>{const{style:n}=e||{};return bl("border-radius:",Tl.radiusFull,";border:2px solid transparent;",n?(e=>{const{color:t,style:n}=e||{},r=n&&"none"!==n?jl.gray[300]:void 0;return bl("border-style:","none"===n?"solid":n,";border-color:",t||r,";","")})(e):void 0," width:","__unstable-large"===t?"24px":"22px",";height:","__unstable-large"===t?"24px":"22px",";padding:","__unstable-large"===t?"2px":"1px",";&>span{height:",wl(4),";width:",wl(4),";background:linear-gradient(\n\t\t\t\t-45deg,\n\t\t\t\ttransparent 48%,\n\t\t\t\trgb( 0 0 0 / 20% ) 48%,\n\t\t\t\trgb( 0 0 0 / 20% ) 52%,\n\t\t\t\ttransparent 52%\n\t\t\t);}","")},Zk=bl("width:",228,"px;>div:first-of-type>",Ux,"{margin-bottom:0;}&& ",Ux,"+button:not( .has-text ){min-width:24px;padding:0;}",""),Qk=bl("",""),Jk=bl("",""),ej=bl("justify-content:center;width:100%;&&{border-top:",Tl.borderWidth," solid ",jl.gray[400],";border-top-left-radius:0;border-top-right-radius:0;height:40px;}",""),tj="web"===c.Platform.OS,nj={px:{value:"px",label:tj?"px":(0,a.__)("Pixels (px)"),a11yLabel:(0,a.__)("Pixels (px)"),step:1},"%":{value:"%",label:tj?"%":(0,a.__)("Percentage (%)"),a11yLabel:(0,a.__)("Percent (%)"),step:.1},em:{value:"em",label:tj?"em":(0,a.__)("Relative to parent font size (em)"),a11yLabel:(0,a._x)("ems","Relative to parent font size (em)"),step:.01},rem:{value:"rem",label:tj?"rem":(0,a.__)("Relative to root font size (rem)"),a11yLabel:(0,a._x)("rems","Relative to root font size (rem)"),step:.01},vw:{value:"vw",label:tj?"vw":(0,a.__)("Viewport width (vw)"),a11yLabel:(0,a.__)("Viewport width (vw)"),step:.1},vh:{value:"vh",label:tj?"vh":(0,a.__)("Viewport height (vh)"),a11yLabel:(0,a.__)("Viewport height (vh)"),step:.1},vmin:{value:"vmin",label:tj?"vmin":(0,a.__)("Viewport smallest dimension (vmin)"),a11yLabel:(0,a.__)("Viewport smallest dimension (vmin)"),step:.1},vmax:{value:"vmax",label:tj?"vmax":(0,a.__)("Viewport largest dimension (vmax)"),a11yLabel:(0,a.__)("Viewport largest dimension (vmax)"),step:.1},ch:{value:"ch",label:tj?"ch":(0,a.__)("Width of the zero (0) character (ch)"),a11yLabel:(0,a.__)("Width of the zero (0) character (ch)"),step:.01},ex:{value:"ex",label:tj?"ex":(0,a.__)("x-height of the font (ex)"),a11yLabel:(0,a.__)("x-height of the font (ex)"),step:.01},cm:{value:"cm",label:tj?"cm":(0,a.__)("Centimeters (cm)"),a11yLabel:(0,a.__)("Centimeters (cm)"),step:.001},mm:{value:"mm",label:tj?"mm":(0,a.__)("Millimeters (mm)"),a11yLabel:(0,a.__)("Millimeters (mm)"),step:.1},in:{value:"in",label:tj?"in":(0,a.__)("Inches (in)"),a11yLabel:(0,a.__)("Inches (in)"),step:.001},pc:{value:"pc",label:tj?"pc":(0,a.__)("Picas (pc)"),a11yLabel:(0,a.__)("Picas (pc)"),step:1},pt:{value:"pt",label:tj?"pt":(0,a.__)("Points (pt)"),a11yLabel:(0,a.__)("Points (pt)"),step:1},svw:{value:"svw",label:tj?"svw":(0,a.__)("Small viewport width (svw)"),a11yLabel:(0,a.__)("Small viewport width (svw)"),step:.1},svh:{value:"svh",label:tj?"svh":(0,a.__)("Small viewport height (svh)"),a11yLabel:(0,a.__)("Small viewport height (svh)"),step:.1},svi:{value:"svi",label:tj?"svi":(0,a.__)("Viewport smallest size in the inline direction (svi)"),a11yLabel:(0,a.__)("Small viewport width or height (svi)"),step:.1},svb:{value:"svb",label:tj?"svb":(0,a.__)("Viewport smallest size in the block direction (svb)"),a11yLabel:(0,a.__)("Small viewport width or height (svb)"),step:.1},svmin:{value:"svmin",label:tj?"svmin":(0,a.__)("Small viewport smallest dimension (svmin)"),a11yLabel:(0,a.__)("Small viewport smallest dimension (svmin)"),step:.1},lvw:{value:"lvw",label:tj?"lvw":(0,a.__)("Large viewport width (lvw)"),a11yLabel:(0,a.__)("Large viewport width (lvw)"),step:.1},lvh:{value:"lvh",label:tj?"lvh":(0,a.__)("Large viewport height (lvh)"),a11yLabel:(0,a.__)("Large viewport height (lvh)"),step:.1},lvi:{value:"lvi",label:tj?"lvi":(0,a.__)("Large viewport width or height (lvi)"),a11yLabel:(0,a.__)("Large viewport width or height (lvi)"),step:.1},lvb:{value:"lvb",label:tj?"lvb":(0,a.__)("Large viewport width or height (lvb)"),a11yLabel:(0,a.__)("Large viewport width or height (lvb)"),step:.1},lvmin:{value:"lvmin",label:tj?"lvmin":(0,a.__)("Large viewport smallest dimension (lvmin)"),a11yLabel:(0,a.__)("Large viewport smallest dimension (lvmin)"),step:.1},dvw:{value:"dvw",label:tj?"dvw":(0,a.__)("Dynamic viewport width (dvw)"),a11yLabel:(0,a.__)("Dynamic viewport width (dvw)"),step:.1},dvh:{value:"dvh",label:tj?"dvh":(0,a.__)("Dynamic viewport height (dvh)"),a11yLabel:(0,a.__)("Dynamic viewport height (dvh)"),step:.1},dvi:{value:"dvi",label:tj?"dvi":(0,a.__)("Dynamic viewport width or height (dvi)"),a11yLabel:(0,a.__)("Dynamic viewport width or height (dvi)"),step:.1},dvb:{value:"dvb",label:tj?"dvb":(0,a.__)("Dynamic viewport width or height (dvb)"),a11yLabel:(0,a.__)("Dynamic viewport width or height (dvb)"),step:.1},dvmin:{value:"dvmin",label:tj?"dvmin":(0,a.__)("Dynamic viewport smallest dimension (dvmin)"),a11yLabel:(0,a.__)("Dynamic viewport smallest dimension (dvmin)"),step:.1},dvmax:{value:"dvmax",label:tj?"dvmax":(0,a.__)("Dynamic viewport largest dimension (dvmax)"),a11yLabel:(0,a.__)("Dynamic viewport largest dimension (dvmax)"),step:.1},svmax:{value:"svmax",label:tj?"svmax":(0,a.__)("Small viewport largest dimension (svmax)"),a11yLabel:(0,a.__)("Small viewport largest dimension (svmax)"),step:.1},lvmax:{value:"lvmax",label:tj?"lvmax":(0,a.__)("Large viewport largest dimension (lvmax)"),a11yLabel:(0,a.__)("Large viewport largest dimension (lvmax)"),step:.1}},rj=Object.values(nj),oj=[nj.px,nj["%"],nj.em,nj.rem,nj.vw,nj.vh],ij=nj.px;function sj(e,t,n){return lj(t?`${null!=e?e:""}${t}`:e,n)}function aj(e){return Array.isArray(e)&&!!e.length}function lj(e,t=rj){let n,r;if(void 0!==e||null===e){n=`${e}`.trim();const t=parseFloat(n);r=isFinite(t)?t:void 0}const o=n?.match(/[\d.\-\+]*\s*(.*)/),i=o?.[1]?.toLowerCase();let s;if(aj(t)){const e=t.find((e=>e.value===i));s=e?.value}else s=ij.value;return[r,s]}const cj=({units:e=rj,availableUnits:t=[],defaultValues:n})=>{const r=function(e=[],t){return Array.isArray(t)?t.filter((t=>e.includes(t.value))):[]}(t,e);return n&&r.forEach(((e,t)=>{if(n[e.value]){const[o]=lj(n[e.value]);r[t].default=o}})),r};const uj=e=>e.replace(/^var\((.+)\)$/,"$1"),dj=Xa(((e,t)=>{const{__experimentalIsRenderedInSidebar:n,border:r,colors:o,disableCustomColors:i,enableAlpha:s,enableStyle:l,indicatorClassName:u,indicatorWrapperClassName:d,isStyleSettable:p,onReset:f,onColorChange:h,onStyleChange:m,popoverContentClassName:g,popoverControlsClassName:v,resetButtonClassName:b,showDropdownHeader:x,size:y,__unstablePopoverProps:w,..._}=function(e){const{border:t,className:n,colors:r=[],enableAlpha:o=!1,enableStyle:i=!0,onChange:s,previousStyleSelection:a,size:l="default",__experimentalIsRenderedInSidebar:u=!1,...d}=Ya(e,"BorderControlDropdown"),[p]=lj(t?.width),f=0===p,h=qa(),m=(0,c.useMemo)((()=>h(Yk,n)),[n,h]),g=(0,c.useMemo)((()=>h(Jk)),[h]),v=(0,c.useMemo)((()=>h(Xk(t,l))),[t,h,l]),b=(0,c.useMemo)((()=>h(Zk)),[h]),x=(0,c.useMemo)((()=>h(Qk)),[h]),y=(0,c.useMemo)((()=>h(ej)),[h]);return{...d,border:t,className:m,colors:r,enableAlpha:o,enableStyle:i,indicatorClassName:g,indicatorWrapperClassName:v,onColorChange:e=>{s({color:e,style:"none"===t?.style?a:t?.style,width:f&&e?"1px":t?.width})},onStyleChange:e=>{const n=f&&e?"1px":t?.width;s({...t,style:e,width:n})},onReset:()=>{s({...t,color:void 0,style:void 0})},popoverContentClassName:x,popoverControlsClassName:b,resetButtonClassName:y,size:l,__experimentalIsRenderedInSidebar:u}}(e),{color:S,style:C}=r||{},k=((e,t)=>{if(e&&t){if(Dk(t)){let n;return t.some((t=>t.colors.some((t=>t.color===e&&(n=t,!0))))),n}return t.find((t=>t.color===e))}})(S,o),j=((e,t,n,r)=>{if(r){if(t){const e=uj(t.color);return n?(0,a.sprintf)((0,a.__)('Border color and style picker. The currently selected color is called "%1$s" and has a value of "%2$s". The currently selected style is "%3$s".'),t.name,e,n):(0,a.sprintf)((0,a.__)('Border color and style picker. The currently selected color is called "%1$s" and has a value of "%2$s".'),t.name,e)}if(e){const t=uj(e);return n?(0,a.sprintf)((0,a.__)('Border color and style picker. The currently selected color has a value of "%1$s". The currently selected style is "%2$s".'),t,n):(0,a.sprintf)((0,a.__)('Border color and style picker. The currently selected color has a value of "%s".'),t)}return(0,a.__)("Border color and style picker.")}return t?(0,a.sprintf)((0,a.__)('Border color picker. The currently selected color is called "%1$s" and has a value of "%2$s".'),t.name,uj(t.color)):e?(0,a.sprintf)((0,a.__)('Border color picker. The currently selected color has a value of "%s".'),uj(e)):(0,a.__)("Border color picker.")})(S,k,C,l),E=S||C&&"none"!==C,P=n?"bottom left":void 0;return(0,wt.jsx)(rS,{renderToggle:({onToggle:e})=>(0,wt.jsx)(sy,{onClick:e,variant:"tertiary","aria-label":j,tooltipPosition:P,label:(0,a.__)("Border color and style picker"),showTooltip:!0,__next40pxDefaultSize:"__unstable-large"===y,children:(0,wt.jsx)("span",{className:d,children:(0,wt.jsx)(Q_,{className:u,colorValue:S})})}),renderContent:({onClose:e})=>(0,wt.jsxs)(wt.Fragment,{children:[(0,wt.jsx)(Mk,{paddingSize:"medium",children:(0,wt.jsxs)(jk,{className:v,spacing:6,children:[x?(0,wt.jsxs)(yy,{children:[(0,wt.jsx)(Ux,{children:(0,a.__)("Border color")}),(0,wt.jsx)(sy,{size:"small",label:(0,a.__)("Close border color"),icon:e_,onClick:e})]}):void 0,(0,wt.jsx)(Bk,{className:g,value:S,onChange:h,colors:o,disableCustomColors:i,__experimentalIsRenderedInSidebar:n,clearable:!1,enableAlpha:s}),l&&p&&(0,wt.jsx)(Z_,{label:(0,a.__)("Style"),value:C,onChange:m})]})}),E&&(0,wt.jsx)(Mk,{paddingSize:"none",children:(0,wt.jsx)(sy,{className:b,variant:"tertiary",onClick:()=>{f(),e()},children:(0,a.__)("Reset")})})]}),popoverProps:{...w},..._,ref:t})}),"BorderControlDropdown"),pj=dj;const fj=(0,c.forwardRef)((function({className:e,isUnitSelectTabbable:t=!0,onChange:n,size:r="default",unit:o="px",units:i=oj,...a},l){if(!aj(i)||1===i?.length)return(0,wt.jsx)(Hk,{className:"components-unit-control__unit-label",selectSize:r,children:o});const c=s("components-unit-control__select",e);return(0,wt.jsx)(Uk,{ref:l,className:c,onChange:e=>{const{value:t}=e.target,r=i.find((e=>e.value===t));n?.(t,{event:e,data:r})},selectSize:r,tabIndex:t?void 0:-1,value:o,...a,children:i.map((e=>(0,wt.jsx)("option",{value:e.value,children:e.label},e.value)))})}));const hj=(0,c.forwardRef)((function(e,t){const{__unstableStateReducer:n,autoComplete:r="off",children:o,className:i,disabled:l=!1,disableUnits:u=!1,isPressEnterToChange:d=!1,isResetValueOnUnitChange:p=!1,isUnitSelectTabbable:f=!0,label:h,onChange:m,onUnitChange:g,size:v="default",unit:b,units:x=oj,value:y,onFocus:w,..._}=_b(e);"unit"in e&&Fi()("UnitControl unit prop",{since:"5.6",hint:"The unit should be provided within the `value` prop.",version:"6.2"});const S=null!=y?y:void 0,[C,k]=(0,c.useMemo)((()=>{const e=function(e,t,n=rj){const r=Array.isArray(n)?[...n]:[],[,o]=sj(e,t,rj);return o&&!r.some((e=>e.value===o))&&nj[o]&&r.unshift(nj[o]),r}(S,b,x),[{value:t=""}={},...n]=e,r=n.reduce(((e,{value:t})=>{const n=Ly(t?.substring(0,1)||"");return e.includes(n)?e:`${e}|${n}`}),Ly(t.substring(0,1)));return[e,new RegExp(`^(?:${r})$`,"i")]}),[S,b,x]),[j,E]=sj(S,b,C),[P,T]=CS(1===C.length?C[0].value:b,{initial:E,fallback:""});(0,c.useEffect)((()=>{void 0!==E&&T(E)}),[E,T]);const R=s("components-unit-control","components-unit-control-wrapper",i);let I;!u&&f&&C.length&&(I=e=>{_.onKeyDown?.(e),e.metaKey||e.ctrlKey||!k.test(e.key)||N.current?.focus()});const N=(0,c.useRef)(null),M=u?null:(0,wt.jsx)(fj,{ref:N,"aria-label":(0,a.__)("Select unit"),disabled:l,isUnitSelectTabbable:f,onChange:(e,t)=>{const{data:n}=t;let r=`${null!=j?j:""}${e}`;p&&void 0!==n?.default&&(r=`${n.default}${e}`),m?.(r,t),g?.(e,t),T(e)},size:["small","compact"].includes(v)||"default"===v&&!_.__next40pxDefaultSize?"small":"default",unit:P,units:C,onFocus:w,onBlur:e.onBlur});let A=_.step;if(!A&&C){var D;const e=C.find((e=>e.value===P));A=null!==(D=e?.step)&&void 0!==D?D:1}return(0,wt.jsx)(Vk,{..._,autoComplete:r,className:R,disabled:l,spinControls:"none",isPressEnterToChange:d,label:h,onKeyDown:I,onChange:(e,t)=>{if(""===e||null==e)return void m?.("",t);const n=function(e,t,n,r){const[o,i]=lj(e,t),s=null!=o?o:n;let a=i||r;return!a&&aj(t)&&(a=t[0].value),[s,a]}(e,C,j,P).join("");m?.(n,t)},ref:t,size:v,suffix:M,type:d?"text":"number",value:null!=j?j:"",step:A,onFocus:w,__unstableStateReducer:n})})),mj=hj,gj=e=>void 0!==e?.width&&""!==e.width||void 0!==e?.color;function vj(e){const{className:t,colors:n=[],isCompact:r,onChange:o,enableAlpha:i=!0,enableStyle:s=!0,shouldSanitizeBorder:a=!0,size:l="default",value:u,width:d,__experimentalIsRenderedInSidebar:p=!1,__next40pxDefaultSize:f,...h}=Ya(e,"BorderControl"),m="default"===l&&f?"__unstable-large":l,[g,v]=lj(u?.width),b=v||"px",x=0===g,[y,w]=(0,c.useState)(),[_,S]=(0,c.useState)(),C=!a||gj(u),k=(0,c.useCallback)((e=>{!a||gj(e)?o(e):o(void 0)}),[o,a]),j=(0,c.useCallback)((e=>{const t=""===e?void 0:e,[n]=lj(e),r=0===n,o={...u,width:t};r&&!x&&(w(u?.color),S(u?.style),o.color=void 0,o.style="none"),!r&&x&&(void 0===o.color&&(o.color=y),"none"===o.style&&(o.style=_)),k(o)}),[u,x,y,_,k]),E=(0,c.useCallback)((e=>{j(`${e}${b}`)}),[j,b]),P=qa(),T=(0,c.useMemo)((()=>P(Kk,t)),[t,P]);let R=d;r&&(R="__unstable-large"===l?"116px":"90px");const I=(0,c.useMemo)((()=>{const e=!!R&&qk,t=(e=>bl("height:","__unstable-large"===e?"40px":"30px",";",""))(m);return P(bl(Vk,"{flex:1 1 40%;}&& ",Uk,"{min-height:0;}",""),e,t)}),[R,P,m]),N=(0,c.useMemo)((()=>P(bl("flex:1 1 60%;",Bg({marginRight:wl(3)})(),";",""))),[P]);return{...h,className:T,colors:n,enableAlpha:i,enableStyle:s,innerWrapperClassName:I,inputWidth:R,isStyleSettable:C,onBorderChange:k,onSliderChange:E,onWidthChange:j,previousStyleSelection:_,sliderClassName:N,value:u,widthUnit:b,widthValue:g,size:m,__experimentalIsRenderedInSidebar:p,__next40pxDefaultSize:f}}const bj=e=>{const{label:t,hideLabelFromVision:n}=e;return t?n?(0,wt.jsx)(pl,{as:"legend",children:t}):(0,wt.jsx)(Ux,{as:"legend",children:t}):null},xj=Xa(((e,t)=>{const{__next40pxDefaultSize:n=!1,colors:r,disableCustomColors:o,disableUnits:i,enableAlpha:s,enableStyle:l,hideLabelFromVision:c,innerWrapperClassName:u,inputWidth:d,isStyleSettable:p,label:f,onBorderChange:h,onSliderChange:m,onWidthChange:g,placeholder:v,__unstablePopoverProps:b,previousStyleSelection:x,showDropdownHeader:y,size:w,sliderClassName:_,value:S,widthUnit:C,widthValue:k,withSlider:j,__experimentalIsRenderedInSidebar:E,...P}=vj(e);return(0,wt.jsxs)(dl,{as:"fieldset",...P,ref:t,children:[(0,wt.jsx)(bj,{label:f,hideLabelFromVision:c}),(0,wt.jsxs)(yy,{spacing:4,className:u,children:[(0,wt.jsx)(mj,{prefix:(0,wt.jsx)(Hg,{marginRight:1,marginBottom:0,children:(0,wt.jsx)(pj,{border:S,colors:r,__unstablePopoverProps:b,disableCustomColors:o,enableAlpha:s,enableStyle:l,isStyleSettable:p,onChange:h,previousStyleSelection:x,showDropdownHeader:y,__experimentalIsRenderedInSidebar:E,size:w})}),label:(0,a.__)("Border width"),hideLabelFromVision:!0,min:0,onChange:g,value:S?.width||"",placeholder:v,disableUnits:i,__unstableInputWidth:d,size:w}),j&&(0,wt.jsx)(dC,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Border width"),hideLabelFromVision:!0,className:_,initialPosition:0,max:100,min:0,onChange:m,step:["px","%"].includes(C)?1:.1,value:k||void 0,withInputField:!1,__next40pxDefaultSize:n})]})]})}),"BorderControl"),yj=xj,wj={bottom:{alignItems:"flex-end",justifyContent:"center"},bottomLeft:{alignItems:"flex-start",justifyContent:"flex-end"},bottomRight:{alignItems:"flex-end",justifyContent:"flex-end"},center:{alignItems:"center",justifyContent:"center"},spaced:{alignItems:"center",justifyContent:"space-between"},left:{alignItems:"center",justifyContent:"flex-start"},right:{alignItems:"center",justifyContent:"flex-end"},stretch:{alignItems:"stretch"},top:{alignItems:"flex-start",justifyContent:"center"},topLeft:{alignItems:"flex-start",justifyContent:"flex-start"},topRight:{alignItems:"flex-start",justifyContent:"flex-end"}};function _j(e){const{align:t,alignment:n,className:r,columnGap:o,columns:i=2,gap:s=3,isInline:a=!1,justify:l,rowGap:u,rows:d,templateColumns:p,templateRows:f,...h}=Ya(e,"Grid"),m=_g(Array.isArray(i)?i:[i]),g=_g(Array.isArray(d)?d:[d]),v=p||!!i&&`repeat( ${m}, 1fr )`,b=f||!!d&&`repeat( ${g}, 1fr )`,x=qa();return{...h,className:(0,c.useMemo)((()=>{const e=function(e){return e?wj[e]:{}}(n),i=bl({alignItems:t,display:a?"inline-grid":"grid",gap:`calc( ${Tl.gridBase} * ${s} )`,gridTemplateColumns:v||void 0,gridTemplateRows:b||void 0,gridRowGap:u,gridColumnGap:o,justifyContent:l,verticalAlign:a?"middle":void 0,...e},"","");return x(i,r)}),[t,n,r,o,x,s,v,b,a,l,u])}}const Sj=Xa((function(e,t){const n=_j(e);return(0,wt.jsx)(dl,{...n,ref:t})}),"Grid");function Cj(e){const{className:t,colors:n=[],enableAlpha:r=!1,enableStyle:o=!0,size:i="default",__experimentalIsRenderedInSidebar:s=!1,...a}=Ya(e,"BorderBoxControlSplitControls"),l=qa(),u=(0,c.useMemo)((()=>l((e=>bl("position:relative;flex:1;width:","__unstable-large"===e?void 0:"80%",";",""))(i),t)),[l,t,i]);return{...a,centeredClassName:(0,c.useMemo)((()=>l(Yw,t)),[l,t]),className:u,colors:n,enableAlpha:r,enableStyle:o,rightAlignedClassName:(0,c.useMemo)((()=>l(bl(Bg({marginLeft:"auto"})(),";",""),t)),[l,t]),size:i,__experimentalIsRenderedInSidebar:s}}const kj=Xa(((e,t)=>{const{centeredClassName:n,colors:r,disableCustomColors:o,enableAlpha:i,enableStyle:s,onChange:u,popoverPlacement:d,popoverOffset:p,rightAlignedClassName:f,size:h="default",value:m,__experimentalIsRenderedInSidebar:g,...v}=Cj(e),[b,x]=(0,c.useState)(null),y=(0,c.useMemo)((()=>d?{placement:d,offset:p,anchor:b,shift:!0}:void 0),[d,p,b]),w={colors:r,disableCustomColors:o,enableAlpha:i,enableStyle:s,isCompact:!0,__experimentalIsRenderedInSidebar:g,size:h},_=(0,l.useMergeRefs)([x,t]);return(0,wt.jsxs)(Sj,{...v,ref:_,gap:4,children:[(0,wt.jsx)(Jw,{value:m,size:h}),(0,wt.jsx)(yj,{className:n,hideLabelFromVision:!0,label:(0,a.__)("Top border"),onChange:e=>u(e,"top"),__unstablePopoverProps:y,value:m?.top,...w}),(0,wt.jsx)(yj,{hideLabelFromVision:!0,label:(0,a.__)("Left border"),onChange:e=>u(e,"left"),__unstablePopoverProps:y,value:m?.left,...w}),(0,wt.jsx)(yj,{className:f,hideLabelFromVision:!0,label:(0,a.__)("Right border"),onChange:e=>u(e,"right"),__unstablePopoverProps:y,value:m?.right,...w}),(0,wt.jsx)(yj,{className:n,hideLabelFromVision:!0,label:(0,a.__)("Bottom border"),onChange:e=>u(e,"bottom"),__unstablePopoverProps:y,value:m?.bottom,...w})]})}),"BorderBoxControlSplitControls"),jj=kj,Ej=/^([\d.\-+]*)\s*(fr|cm|mm|Q|in|pc|pt|px|em|ex|ch|rem|lh|vw|vh|vmin|vmax|%|cap|ic|rlh|vi|vb|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx|svw|lvw|dvw|svh|lvh|dvh|svi|lvi|dvi|svb|lvb|dvb|svmin|lvmin|dvmin|svmax|lvmax|dvmax)?$/;const Pj=["top","right","bottom","left"],Tj=["color","style","width"],Rj=e=>!e||!Tj.some((t=>void 0!==e[t])),Ij=e=>{if(!e)return!1;if(Nj(e)){return!Pj.every((t=>Rj(e[t])))}return!Rj(e)},Nj=(e={})=>Object.keys(e).some((e=>-1!==Pj.indexOf(e))),Mj=e=>{if(!Nj(e))return!1;const t=Pj.map((t=>Aj(e?.[t])));return!t.every((e=>e===t[0]))},Aj=(e,t)=>{if(Rj(e))return t;const{color:n,style:r,width:o}=t||{},{color:i=n,style:s=r,width:a=o}=e;return[a,!!a&&"0"!==a||!!i?s||"solid":s,i].filter(Boolean).join(" ")},Dj=e=>function(e){if(0===e.length)return;const t={};let n,r=0;return e.forEach((e=>{t[e]=void 0===t[e]?1:t[e]+1,t[e]>r&&(n=e,r=t[e])})),n}(e.map((e=>void 0===e?void 0:function(e){const t=e.trim().match(Ej);if(!t)return[void 0,void 0];const[,n,r]=t;let o=parseFloat(n);return o=Number.isNaN(o)?void 0:o,[o,r]}(`${e}`)[1])).filter((e=>void 0!==e)));function Oj(e){const{className:t,colors:n=[],onChange:r,enableAlpha:o=!1,enableStyle:i=!0,size:s="default",value:a,__experimentalIsRenderedInSidebar:l=!1,__next40pxDefaultSize:u,...d}=Ya(e,"BorderBoxControl"),p="default"===s&&u?"__unstable-large":s,f=Mj(a),h=Nj(a),m=h?(e=>{if(!e)return;const t=[],n=[],r=[];Pj.forEach((o=>{t.push(e[o]?.color),n.push(e[o]?.style),r.push(e[o]?.width)}));const o=t.every((e=>e===t[0])),i=n.every((e=>e===n[0])),s=r.every((e=>e===r[0]));return{color:o?t[0]:void 0,style:i?n[0]:void 0,width:s?r[0]:Dj(r)}})(a):a,g=h?a:(e=>{if(e&&!Rj(e))return{top:e,right:e,bottom:e,left:e}})(a),v=!isNaN(parseFloat(`${m?.width}`)),[b,x]=(0,c.useState)(!f),y=qa(),w=(0,c.useMemo)((()=>y(Gw,t)),[y,t]),_=(0,c.useMemo)((()=>y(bl("flex:1;",Bg({marginRight:"24px"})(),";",""))),[y]),S=(0,c.useMemo)((()=>y(Kw)),[y]);return{...d,className:w,colors:n,disableUnits:f&&!v,enableAlpha:o,enableStyle:i,hasMixedBorders:f,isLinked:b,linkedControlClassName:_,onLinkedChange:e=>{if(!e)return r(void 0);if(!f||(t=e)&&Tj.every((e=>void 0!==t[e])))return r(Rj(e)?void 0:e);var t;const n=((e,t)=>{const n={};return e.color!==t.color&&(n.color=t.color),e.style!==t.style&&(n.style=t.style),e.width!==t.width&&(n.width=t.width),n})(m,e),o={top:{...a?.top,...n},right:{...a?.right,...n},bottom:{...a?.bottom,...n},left:{...a?.left,...n}};if(Mj(o))return r(o);const i=Rj(o.top)?void 0:o.top;r(i)},onSplitChange:(e,t)=>{const n={...g,[t]:e};Mj(n)?r(n):r(e)},toggleLinked:()=>x(!b),linkedValue:m,size:p,splitValue:g,wrapperClassName:S,__experimentalIsRenderedInSidebar:l}}const zj=e=>{const{label:t,hideLabelFromVision:n}=e;return t?n?(0,wt.jsx)(pl,{as:"label",children:t}):(0,wt.jsx)(Ux,{children:t}):null},Lj=Xa(((e,t)=>{const{className:n,colors:r,disableCustomColors:o,disableUnits:i,enableAlpha:s,enableStyle:u,hasMixedBorders:d,hideLabelFromVision:p,isLinked:f,label:h,linkedControlClassName:m,linkedValue:g,onLinkedChange:v,onSplitChange:b,popoverPlacement:x,popoverOffset:y,size:w,splitValue:_,toggleLinked:S,wrapperClassName:C,__experimentalIsRenderedInSidebar:k,...j}=Oj(e),[E,P]=(0,c.useState)(null),T=(0,c.useMemo)((()=>x?{placement:x,offset:y,anchor:E,shift:!0}:void 0),[x,y,E]),R=(0,l.useMergeRefs)([P,t]);return(0,wt.jsxs)(dl,{className:n,...j,ref:R,children:[(0,wt.jsx)(zj,{label:h,hideLabelFromVision:p}),(0,wt.jsxs)(dl,{className:C,children:[f?(0,wt.jsx)(yj,{className:m,colors:r,disableUnits:i,disableCustomColors:o,enableAlpha:s,enableStyle:u,onChange:v,placeholder:d?(0,a.__)("Mixed"):void 0,__unstablePopoverProps:T,shouldSanitizeBorder:!1,value:g,withSlider:!0,width:"__unstable-large"===w?"116px":"110px",__experimentalIsRenderedInSidebar:k,size:w}):(0,wt.jsx)(jj,{colors:r,disableCustomColors:o,enableAlpha:s,enableStyle:u,onChange:b,popoverPlacement:x,popoverOffset:y,value:_,__experimentalIsRenderedInSidebar:k,size:w}),(0,wt.jsx)(Zw,{onClick:S,isLinked:f,size:w})]})]})}),"BorderBoxControl"),Fj=Lj;const Bj=cl("span",{target:"e1j5nr4z8"})({name:"1w884gc",styles:"box-sizing:border-box;display:block;width:24px;height:24px;position:relative;padding:4px"}),Vj=cl("span",{target:"e1j5nr4z7"})({name:"i6vjox",styles:"box-sizing:border-box;display:block;position:relative;width:100%;height:100%"}),$j=({isFocused:e})=>bl({backgroundColor:"currentColor",opacity:e?1:.3},"",""),Hj=cl("span",{target:"e1j5nr4z6"})("box-sizing:border-box;display:block;pointer-events:none;position:absolute;",$j,";"),Wj=cl(Hj,{target:"e1j5nr4z5"})({name:"1k2w39q",styles:"bottom:3px;top:3px;width:2px"}),Uj=cl(Hj,{target:"e1j5nr4z4"})({name:"1q9b07k",styles:"height:2px;left:3px;right:3px"}),Gj=cl(Uj,{target:"e1j5nr4z3"})({name:"abcix4",styles:"top:0"}),Kj=cl(Wj,{target:"e1j5nr4z2"})({name:"1wf8jf",styles:"right:0"}),qj=cl(Uj,{target:"e1j5nr4z1"})({name:"8tapst",styles:"bottom:0"}),Yj=cl(Wj,{target:"e1j5nr4z0"})({name:"1ode3cm",styles:"left:0"});function Xj({size:e=24,side:t="all",sides:n,...r}){const o=e=>!(e=>n?.length&&!n.includes(e))(e)&&("all"===t||t===e),i=o("top")||o("vertical"),s=o("right")||o("horizontal"),a=o("bottom")||o("vertical"),l=o("left")||o("horizontal"),c=e/24;return(0,wt.jsx)(Bj,{style:{transform:`scale(${c})`},...r,children:(0,wt.jsxs)(Vj,{children:[(0,wt.jsx)(Gj,{isFocused:i}),(0,wt.jsx)(Kj,{isFocused:s}),(0,wt.jsx)(qj,{isFocused:a}),(0,wt.jsx)(Yj,{isFocused:l})]})})}const Zj=cl(mj,{target:"e1jovhle5"})({name:"1ejyr19",styles:"max-width:90px"}),Qj=cl(yy,{target:"e1jovhle4"})({name:"1j1lmoi",styles:"grid-column:1/span 3"}),Jj=cl(sy,{target:"e1jovhle3"})({name:"tkya7b",styles:"grid-area:1/2;justify-self:end"}),eE=cl("div",{target:"e1jovhle2"})({name:"1dfa8al",styles:"grid-area:1/3;justify-self:end"}),tE=cl(Xj,{target:"e1jovhle1"})({name:"ou8xsw",styles:"flex:0 0 auto"}),nE=cl(dC,{target:"e1jovhle0"})("width:100%;margin-inline-end:",wl(2),";"),rE={px:{max:300,step:1},"%":{max:100,step:1},vw:{max:100,step:1},vh:{max:100,step:1},em:{max:10,step:.1},rm:{max:10,step:.1},svw:{max:100,step:1},lvw:{max:100,step:1},dvw:{max:100,step:1},svh:{max:100,step:1},lvh:{max:100,step:1},dvh:{max:100,step:1},vi:{max:100,step:1},svi:{max:100,step:1},lvi:{max:100,step:1},dvi:{max:100,step:1},vb:{max:100,step:1},svb:{max:100,step:1},lvb:{max:100,step:1},dvb:{max:100,step:1},vmin:{max:100,step:1},svmin:{max:100,step:1},lvmin:{max:100,step:1},dvmin:{max:100,step:1},vmax:{max:100,step:1},svmax:{max:100,step:1},lvmax:{max:100,step:1},dvmax:{max:100,step:1}},oE={all:(0,a.__)("All sides"),top:(0,a.__)("Top side"),bottom:(0,a.__)("Bottom side"),left:(0,a.__)("Left side"),right:(0,a.__)("Right side"),mixed:(0,a.__)("Mixed"),vertical:(0,a.__)("Top and bottom sides"),horizontal:(0,a.__)("Left and right sides")},iE={top:void 0,right:void 0,bottom:void 0,left:void 0},sE=["top","right","bottom","left"];function aE(e){return e.sort(((t,n)=>e.filter((e=>e===t)).length-e.filter((e=>e===n)).length)).pop()}function lE(e={},t,n=sE){const r=function(e){const t=[];if(!e?.length)return sE;if(e.includes("vertical"))t.push("top","bottom");else if(e.includes("horizontal"))t.push("left","right");else{const n=sE.filter((t=>e.includes(t)));t.push(...n)}return t}(n).map((t=>lj(e[t]))),o=r.map((e=>{var t;return null!==(t=e[0])&&void 0!==t?t:""})),i=r.map((e=>e[1])),s=o.every((e=>e===o[0]))?o[0]:"";let a;var l;"number"==typeof s?a=aE(i):a=null!==(l=function(e){if(!e||"object"!=typeof e)return;const t=Object.values(e).filter(Boolean);return aE(t)}(t))&&void 0!==l?l:aE(i);return[s,a].join("")}function cE(e={},t,n=sE){const r=lE(e,t,n);return isNaN(parseFloat(r))}function uE(e){return e&&Object.values(e).filter((e=>!!e&&/\d/.test(e))).length>0}function dE(e,t){let n="all";return e||(n=t?"vertical":"top"),n}function pE(e,t,n){const r={...e};return n?.length?n.forEach((e=>{"vertical"===e?(r.top=t,r.bottom=t):"horizontal"===e?(r.left=t,r.right=t):r[e]=t})):sE.forEach((e=>r[e]=t)),r}const fE=()=>{};function hE({__next40pxDefaultSize:e,onChange:t=fE,onFocus:n=fE,values:r,sides:o,selectedUnits:i,setSelectedUnits:s,...a}){var c,u;const d=(0,l.useInstanceId)(hE,"box-control-input-all"),p=lE(r,i,o),f=uE(r)&&cE(r,i,o),h=f?oE.mixed:void 0,[m,g]=lj(p),v=e=>{const n=void 0!==e&&!isNaN(parseFloat(e)),i=pE(r,n?e:void 0,o);t(i)};return(0,wt.jsxs)(wt.Fragment,{children:[(0,wt.jsx)(Zj,{...a,__next40pxDefaultSize:e,className:"component-box-control__unit-control",disableUnits:f,id:d,isPressEnterToChange:!0,value:p,onChange:v,onUnitChange:e=>{const t=pE(i,e,o);s(t)},onFocus:e=>{n(e,{side:"all"})},placeholder:h,label:oE.all,hideLabelFromVision:!0}),(0,wt.jsx)(nE,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:e,"aria-controls":d,label:oE.all,hideLabelFromVision:!0,onChange:e=>{v(void 0!==e?[e,g].join(""):void 0)},min:0,max:null!==(c=rE[null!=g?g:"px"]?.max)&&void 0!==c?c:10,step:null!==(u=rE[null!=g?g:"px"]?.step)&&void 0!==u?u:.1,value:null!=m?m:0,withInputField:!1})]})}const mE=()=>{};function gE({__next40pxDefaultSize:e,onChange:t=mE,onFocus:n=mE,values:r,selectedUnits:o,setSelectedUnits:i,sides:s,...a}){const c=(0,l.useInstanceId)(gE,"box-control-input"),u=e=>t=>{n(t,{side:e})},d=(e,n,o)=>{const i={...r},s=void 0!==n&&!isNaN(parseFloat(n))?n:void 0;if(i[e]=s,o?.event.altKey)switch(e){case"top":i.bottom=s;break;case"bottom":i.top=s;break;case"left":i.right=s;break;case"right":i.left=s}(e=>{t(e)})(i)},p=e=>t=>{const n={...o};n[e]=t,i(n)},f=s?.length?sE.filter((e=>s.includes(e))):sE;return(0,wt.jsx)(wt.Fragment,{children:f.map((t=>{var n,i;const[l,f]=lj(r[t]),h=r[t]?f:o[t],m=[c,t].join("-");return(0,wt.jsxs)(Qj,{expanded:!0,children:[(0,wt.jsx)(tE,{side:t,sides:s}),(0,wt.jsx)(Yi,{placement:"top-end",text:oE[t],children:(0,wt.jsx)(Zj,{...a,__next40pxDefaultSize:e,className:"component-box-control__unit-control",id:m,isPressEnterToChange:!0,value:[l,h].join(""),onChange:(e,n)=>d(t,e,n),onUnitChange:p(t),onFocus:u(t),label:oE[t],hideLabelFromVision:!0})}),(0,wt.jsx)(nE,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:e,"aria-controls":m,label:oE[t],hideLabelFromVision:!0,onChange:e=>{d(t,void 0!==e?[e,h].join(""):void 0)},min:0,max:null!==(n=rE[null!=h?h:"px"]?.max)&&void 0!==n?n:10,step:null!==(i=rE[null!=h?h:"px"]?.step)&&void 0!==i?i:.1,value:null!=l?l:0,withInputField:!1})]},`box-control-${t}`)}))})}const vE=["vertical","horizontal"];function bE({__next40pxDefaultSize:e,onChange:t,onFocus:n,values:r,selectedUnits:o,setSelectedUnits:i,sides:s,...a}){const c=(0,l.useInstanceId)(bE,"box-control-input"),u=e=>t=>{n&&n(t,{side:e})},d=(e,n)=>{if(!t)return;const o={...r},i=void 0!==n&&!isNaN(parseFloat(n))?n:void 0;"vertical"===e&&(o.top=i,o.bottom=i),"horizontal"===e&&(o.left=i,o.right=i),t(o)},p=e=>t=>{const n={...o};"vertical"===e&&(n.top=t,n.bottom=t),"horizontal"===e&&(n.left=t,n.right=t),i(n)},f=s?.length?vE.filter((e=>s.includes(e))):vE;return(0,wt.jsx)(wt.Fragment,{children:f.map((t=>{var n,i;const[l,f]=lj("vertical"===t?r.top:r.left),h="vertical"===t?o.top:o.left,m=[c,t].join("-");return(0,wt.jsxs)(Qj,{children:[(0,wt.jsx)(tE,{side:t,sides:s}),(0,wt.jsx)(Yi,{placement:"top-end",text:oE[t],children:(0,B.createElement)(Zj,{...a,__next40pxDefaultSize:e,className:"component-box-control__unit-control",id:m,isPressEnterToChange:!0,value:[l,null!=h?h:f].join(""),onChange:e=>d(t,e),onUnitChange:p(t),onFocus:u(t),label:oE[t],hideLabelFromVision:!0,key:t})}),(0,wt.jsx)(nE,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:e,"aria-controls":m,label:oE[t],hideLabelFromVision:!0,onChange:e=>d(t,void 0!==e?[e,null!=h?h:f].join(""):void 0),min:0,max:null!==(n=rE[null!=h?h:"px"]?.max)&&void 0!==n?n:10,step:null!==(i=rE[null!=h?h:"px"]?.step)&&void 0!==i?i:.1,value:null!=l?l:0,withInputField:!1})]},t)}))})}function xE({isLinked:e,...t}){const n=e?(0,a.__)("Unlink sides"):(0,a.__)("Link sides");return(0,wt.jsx)(Yi,{text:n,children:(0,wt.jsx)(sy,{...t,className:"component-box-control__linked-button",size:"small",icon:e?Ww:Uw,iconSize:24,"aria-label":n})})}const yE={min:0},wE=()=>{};function _E({__next40pxDefaultSize:e=!1,id:t,inputProps:n=yE,onChange:r=wE,label:o=(0,a.__)("Box Control"),values:i,units:s,sides:u,splitOnAxis:d=!1,allowReset:p=!0,resetValues:f=iE,onMouseOver:h,onMouseOut:m}){const[g,v]=CS(i,{fallback:iE}),b=g||iE,x=uE(i),y=1===u?.length,[w,_]=(0,c.useState)(x),[S,C]=(0,c.useState)(!x||!cE(b)||y),[k,j]=(0,c.useState)(dE(S,d)),[E,P]=(0,c.useState)({top:lj(i?.top)[1],right:lj(i?.right)[1],bottom:lj(i?.bottom)[1],left:lj(i?.left)[1]}),T=function(e){const t=(0,l.useInstanceId)(_E,"inspector-box-control");return e||t}(t),R=`${T}-heading`,I={...n,onChange:e=>{r(e),v(e),_(!0)},onFocus:(e,{side:t})=>{j(t)},isLinked:S,units:s,selectedUnits:E,setSelectedUnits:P,sides:u,values:b,onMouseOver:h,onMouseOut:m,__next40pxDefaultSize:e};return(0,wt.jsxs)(Sj,{id:T,columns:3,templateColumns:"1fr min-content min-content",role:"group","aria-labelledby":R,children:[(0,wt.jsx)(Zx.VisualLabel,{id:R,children:o}),S&&(0,wt.jsxs)(Qj,{children:[(0,wt.jsx)(tE,{side:k,sides:u}),(0,wt.jsx)(hE,{...I})]}),!y&&(0,wt.jsx)(eE,{children:(0,wt.jsx)(xE,{onClick:()=>{C(!S),j(dE(!S,d))},isLinked:S})}),!S&&d&&(0,wt.jsx)(bE,{...I}),!S&&!d&&(0,wt.jsx)(gE,{...I}),p&&(0,wt.jsx)(Jj,{className:"component-box-control__reset-button",variant:"secondary",size:"small",onClick:()=>{r(f),v(f),P(f),_(!1)},disabled:!w,children:(0,a.__)("Reset")})]})}const SE=_E;const CE=(0,c.forwardRef)((function(e,t){const{className:n,...r}=e,o=s("components-button-group",n);return(0,wt.jsx)("div",{ref:t,role:"group",className:o,...r})}));const kE={name:"12ip69d",styles:"background:transparent;display:block;margin:0!important;pointer-events:none;position:absolute;will-change:box-shadow"};function jE(e){return`0 ${e}px ${2*e}px 0\n\t${`rgba(0, 0, 0, ${e/20})`}`}const EE=Xa((function(e,t){const n=function(e){const{active:t,borderRadius:n="inherit",className:r,focus:o,hover:i,isInteractive:s=!1,offset:a=0,value:l=0,...u}=Ya(e,"Elevation"),d=qa();return{...u,className:(0,c.useMemo)((()=>{let e=qg(i)?i:2*l,c=qg(t)?t:l/2;s||(e=qg(i)?i:void 0,c=qg(t)?t:void 0);const u=`box-shadow ${Tl.transitionDuration} ${Tl.transitionTimingFunction}`,p={};return p.Base=bl({borderRadius:n,bottom:a,boxShadow:jE(l),opacity:Tl.elevationIntensity,left:a,right:a,top:a},bl("@media not ( prefers-reduced-motion ){transition:",u,";}",""),"",""),qg(e)&&(p.hover=bl("*:hover>&{box-shadow:",jE(e),";}","")),qg(c)&&(p.active=bl("*:active>&{box-shadow:",jE(c),";}","")),qg(o)&&(p.focus=bl("*:focus>&{box-shadow:",jE(o),";}","")),d(kE,p.Base,p.hover,p.focus,p.active,r)}),[t,n,r,d,o,i,s,a,l]),"aria-hidden":!0}}(e);return(0,wt.jsx)(dl,{...n,ref:t})}),"Elevation"),PE=EE;const TE=`calc(${Tl.radiusLarge} - 1px)`,RE=bl("box-shadow:0 0 0 1px ",Tl.surfaceBorderColor,";outline:none;",""),IE={name:"1showjb",styles:"border-bottom:1px solid;box-sizing:border-box;&:last-child{border-bottom:none;}"},NE={name:"14n5oej",styles:"border-top:1px solid;box-sizing:border-box;&:first-of-type{border-top:none;}"},ME={name:"13udsys",styles:"height:100%"},AE={name:"6ywzd",styles:"box-sizing:border-box;height:auto;max-height:100%"},DE={name:"dq805e",styles:"box-sizing:border-box;overflow:hidden;&>img,&>iframe{display:block;height:auto;max-width:100%;width:100%;}"},OE={name:"c990dr",styles:"box-sizing:border-box;display:block;width:100%"},zE=bl("&:first-of-type{border-top-left-radius:",TE,";border-top-right-radius:",TE,";}&:last-of-type{border-bottom-left-radius:",TE,";border-bottom-right-radius:",TE,";}",""),LE=bl("border-color:",Tl.colorDivider,";",""),FE={name:"1t90u8d",styles:"box-shadow:none"},BE={name:"1e1ncky",styles:"border:none"},VE=bl("border-radius:",TE,";",""),$E=bl("padding:",Tl.cardPaddingXSmall,";",""),HE={large:bl("padding:",Tl.cardPaddingLarge,";",""),medium:bl("padding:",Tl.cardPaddingMedium,";",""),small:bl("padding:",Tl.cardPaddingSmall,";",""),xSmall:$E,extraSmall:$E},WE=bl("background-color:",jl.ui.backgroundDisabled,";",""),UE=bl("background-color:",Tl.surfaceColor,";color:",jl.gray[900],";position:relative;","");Tl.surfaceBackgroundColor;function GE({borderBottom:e,borderLeft:t,borderRight:n,borderTop:r}){const o=`1px solid ${Tl.surfaceBorderColor}`;return bl({borderBottom:e?o:void 0,borderLeft:t?o:void 0,borderRight:n?o:void 0,borderTop:r?o:void 0},"","")}const KE=bl("",""),qE=bl("background:",Tl.surfaceBackgroundTintColor,";",""),YE=bl("background:",Tl.surfaceBackgroundTertiaryColor,";",""),XE=e=>[e,e].join(" "),ZE=e=>["90deg",[Tl.surfaceBackgroundColor,e].join(" "),"transparent 1%"].join(","),QE=e=>[[Tl.surfaceBackgroundColor,e].join(" "),"transparent 1%"].join(","),JE=(e,t)=>bl("background:",(e=>[`linear-gradient( ${ZE(e)} ) center`,`linear-gradient( ${QE(e)} ) center`,Tl.surfaceBorderBoldColor].join(","))(t),";background-size:",XE(e),";",""),eP=[`linear-gradient( ${[`${Tl.surfaceBorderSubtleColor} 1px`,"transparent 1px"].join(",")} )`,`linear-gradient( ${["90deg",`${Tl.surfaceBorderSubtleColor} 1px`,"transparent 1px"].join(",")} )`].join(","),tP=(e,t,n)=>{switch(e){case"dotted":return JE(t,n);case"grid":return(e=>bl("background:",Tl.surfaceBackgroundColor,";background-image:",eP,";background-size:",XE(e),";",""))(t);case"primary":return KE;case"secondary":return qE;case"tertiary":return YE}};function nP(e){const{backgroundSize:t=12,borderBottom:n=!1,borderLeft:r=!1,borderRight:o=!1,borderTop:i=!1,className:s,variant:a="primary",...l}=Ya(e,"Surface"),u=qa();return{...l,className:(0,c.useMemo)((()=>{const e={borders:GE({borderBottom:n,borderLeft:r,borderRight:o,borderTop:i})};return u(UE,e.borders,tP(a,`${t}px`,t-1+"px"),s)}),[t,n,r,o,i,s,u,a])}}function rP(e){const{className:t,elevation:n=0,isBorderless:r=!1,isRounded:o=!0,size:i="medium",...s}=Ya(function({elevation:e,isElevated:t,...n}){const r={...n};let o=e;var i;return t&&(Fi()("Card isElevated prop",{since:"5.9",alternative:"elevation"}),null!==(i=o)&&void 0!==i||(o=2)),void 0!==o&&(r.elevation=o),r}(e),"Card"),a=qa();return{...nP({...s,className:(0,c.useMemo)((()=>a(RE,r&&FE,o&&VE,t)),[t,a,r,o])}),elevation:n,isBorderless:r,isRounded:o,size:i}}const oP=Xa((function(e,t){const{children:n,elevation:r,isBorderless:o,isRounded:i,size:s,...a}=rP(e),l=i?Tl.radiusLarge:0,u=qa(),d=(0,c.useMemo)((()=>u(bl({borderRadius:l},"",""))),[u,l]),p=(0,c.useMemo)((()=>{const e={size:s,isBorderless:o};return{CardBody:e,CardHeader:e,CardFooter:e}}),[o,s]);return(0,wt.jsx)(is,{value:p,children:(0,wt.jsxs)(dl,{...a,ref:t,children:[(0,wt.jsx)(dl,{className:u(ME),children:n}),(0,wt.jsx)(PE,{className:d,isInteractive:!1,value:r?1:0}),(0,wt.jsx)(PE,{className:d,isInteractive:!1,value:r})]})})}),"Card"),iP=oP;const sP=bl("@media only screen and ( min-device-width: 40em ){&::-webkit-scrollbar{height:12px;width:12px;}&::-webkit-scrollbar-track{background-color:transparent;}&::-webkit-scrollbar-track{background:",Tl.colorScrollbarTrack,";border-radius:8px;}&::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:",Tl.colorScrollbarThumb,";border:2px solid rgba( 0, 0, 0, 0 );border-radius:7px;}&:hover::-webkit-scrollbar-thumb{background-color:",Tl.colorScrollbarThumbHover,";}}",""),aP={name:"13udsys",styles:"height:100%"},lP={name:"7zq9w",styles:"scroll-behavior:smooth"},cP={name:"q33xhg",styles:"overflow-x:auto;overflow-y:hidden"},uP={name:"103x71s",styles:"overflow-x:hidden;overflow-y:auto"},dP={name:"umwchj",styles:"overflow-y:auto"};const pP=Xa((function(e,t){const n=function(e){const{className:t,scrollDirection:n="y",smoothScroll:r=!1,...o}=Ya(e,"Scrollable"),i=qa();return{...o,className:(0,c.useMemo)((()=>i(aP,sP,r&&lP,"x"===n&&cP,"y"===n&&uP,"auto"===n&&dP,t)),[t,i,n,r])}}(e);return(0,wt.jsx)(dl,{...n,ref:t})}),"Scrollable"),fP=pP;const hP=Xa((function(e,t){const{isScrollable:n,...r}=function(e){const{className:t,isScrollable:n=!1,isShady:r=!1,size:o="medium",...i}=Ya(e,"CardBody"),s=qa();return{...i,className:(0,c.useMemo)((()=>s(AE,zE,HE[o],r&&WE,"components-card__body",t)),[t,s,r,o]),isScrollable:n}}(e);return n?(0,wt.jsx)(fP,{...r,ref:t}):(0,wt.jsx)(dl,{...r,ref:t})}),"CardBody"),mP=hP;var gP=kt((function(e){var t=e,{orientation:n="horizontal"}=t,r=x(t,["orientation"]);return r=v({role:"separator","aria-orientation":n},r)})),vP=_t((function(e){return Ct("hr",gP(e))}));const bP={vertical:{start:"marginLeft",end:"marginRight"},horizontal:{start:"marginTop",end:"marginBottom"}},xP=({"aria-orientation":e="horizontal",margin:t,marginStart:n,marginEnd:r})=>bl(Bg({[bP[e].start]:wl(null!=n?n:t),[bP[e].end]:wl(null!=r?r:t)})(),"","");var yP={name:"1u4hpl4",styles:"display:inline"};const wP=({"aria-orientation":e="horizontal"})=>"vertical"===e?yP:void 0,_P=({"aria-orientation":e="horizontal"})=>bl({["vertical"===e?"borderRight":"borderBottom"]:"1px solid currentColor"},"",""),SP=({"aria-orientation":e="horizontal"})=>bl({height:"vertical"===e?"auto":0,width:"vertical"===e?0:"auto"},"",""),CP=cl("hr",{target:"e19on6iw0"})("border:0;margin:0;",wP," ",_P," ",SP," ",xP,";");const kP=Xa((function(e,t){const n=Ya(e,"Divider");return(0,wt.jsx)(vP,{render:(0,wt.jsx)(CP,{}),...n,ref:t})}),"Divider");const jP=Xa((function(e,t){const n=function(e){const{className:t,...n}=Ya(e,"CardDivider"),r=qa();return{...n,className:(0,c.useMemo)((()=>r(OE,LE,"components-card__divider",t)),[t,r])}}(e);return(0,wt.jsx)(kP,{...n,ref:t})}),"CardDivider"),EP=jP;const PP=Xa((function(e,t){const n=function(e){const{className:t,justify:n,isBorderless:r=!1,isShady:o=!1,size:i="medium",...s}=Ya(e,"CardFooter"),a=qa();return{...s,className:(0,c.useMemo)((()=>a(NE,zE,LE,HE[i],r&&BE,o&&WE,"components-card__footer",t)),[t,a,r,o,i]),justify:n}}(e);return(0,wt.jsx)(Ig,{...n,ref:t})}),"CardFooter"),TP=PP;const RP=Xa((function(e,t){const n=function(e){const{className:t,isBorderless:n=!1,isShady:r=!1,size:o="medium",...i}=Ya(e,"CardHeader"),s=qa();return{...i,className:(0,c.useMemo)((()=>s(IE,zE,LE,HE[o],n&&BE,r&&WE,"components-card__header",t)),[t,s,n,r,o])}}(e);return(0,wt.jsx)(Ig,{...n,ref:t})}),"CardHeader"),IP=RP;const NP=Xa((function(e,t){const n=function(e){const{className:t,...n}=Ya(e,"CardMedia"),r=qa();return{...n,className:(0,c.useMemo)((()=>r(DE,zE,"components-card__media",t)),[t,r])}}(e);return(0,wt.jsx)(dl,{...n,ref:t})}),"CardMedia"),MP=NP;const AP=function e(t){const{__nextHasNoMarginBottom:n,label:r,className:o,heading:i,checked:a,indeterminate:u,help:d,id:p,onChange:f,...h}=t;i&&Fi()("`heading` prop in `CheckboxControl`",{alternative:"a separate element to implement a heading",since:"5.8"});const[m,g]=(0,c.useState)(!1),[v,b]=(0,c.useState)(!1),x=(0,l.useRefEffect)((e=>{e&&(e.indeterminate=!!u,g(e.matches(":checked")),b(e.matches(":indeterminate")))}),[a,u]),y=(0,l.useInstanceId)(e,"inspector-checkbox-control",p);return(0,wt.jsx)(Qx,{__nextHasNoMarginBottom:n,__associatedWPComponentName:"CheckboxControl",label:i,id:y,help:d&&(0,wt.jsx)("span",{className:"components-checkbox-control__help",children:d}),className:s("components-checkbox-control",o),children:(0,wt.jsxs)(yy,{spacing:0,justify:"start",alignment:"top",children:[(0,wt.jsxs)("span",{className:"components-checkbox-control__input-container",children:[(0,wt.jsx)("input",{ref:x,id:y,className:"components-checkbox-control__input",type:"checkbox",value:"1",onChange:e=>f(e.target.checked),checked:a,"aria-describedby":d?y+"__help":void 0,...h}),v?(0,wt.jsx)(vS,{icon:Ug,className:"components-checkbox-control__indeterminate",role:"presentation"}):null,m?(0,wt.jsx)(vS,{icon:xk,className:"components-checkbox-control__checked",role:"presentation"}):null]}),r&&(0,wt.jsx)("label",{className:"components-checkbox-control__label",htmlFor:y,children:r})]})})},DP=4e3;function OP({className:e,children:t,onCopy:n,onFinishCopy:r,text:o,...i}){Fi()("wp.components.ClipboardButton",{since:"5.8",alternative:"wp.compose.useCopyToClipboard"});const a=(0,c.useRef)(),u=(0,l.useCopyToClipboard)(o,(()=>{n(),a.current&&clearTimeout(a.current),r&&(a.current=setTimeout((()=>r()),DP))}));(0,c.useEffect)((()=>{a.current&&clearTimeout(a.current)}),[]);const d=s("components-clipboard-button",e);return(0,wt.jsx)(sy,{...i,className:d,ref:u,onCopy:e=>{e.target.focus()},children:t})}const zP=(0,wt.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wt.jsx)(n.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})});const LP=e=>bl("font-size:",Fx("default.fontSize"),";font-family:inherit;appearance:none;border:1px solid transparent;cursor:pointer;background:none;text-align:start;text-decoration:","a"===e?"none":void 0,";svg,path{fill:currentColor;}&:hover{color:",jl.theme.accent,";}&:focus{box-shadow:none;outline:none;}&:focus-visible{box-shadow:0 0 0 var( --wp-admin-border-width-focus ) ",jl.theme.accent,";outline:2px solid transparent;outline-offset:0;}",""),FP={name:"1bcj5ek",styles:"width:100%;display:block"},BP={name:"150ruhm",styles:"box-sizing:border-box;width:100%;display:block;margin:0;color:inherit"},VP=bl("border:1px solid ",Tl.surfaceBorderColor,";",""),$P=bl(">*:not( marquee )>*{border-bottom:1px solid ",Tl.surfaceBorderColor,";}>*:last-of-type>*:not( :focus ){border-bottom-color:transparent;}",""),HP=Tl.radiusSmall,WP=bl("border-radius:",HP,";",""),UP=bl("border-radius:",HP,";>*:first-of-type>*{border-top-left-radius:",HP,";border-top-right-radius:",HP,";}>*:last-of-type>*{border-bottom-left-radius:",HP,";border-bottom-right-radius:",HP,";}",""),GP=`calc(${Tl.fontSize} * ${Tl.fontLineHeightBase})`,KP=`calc((${Tl.controlHeight} - ${GP} - 2px) / 2)`,qP=`calc((${Tl.controlHeightSmall} - ${GP} - 2px) / 2)`,YP=`calc((${Tl.controlHeightLarge} - ${GP} - 2px) / 2)`,XP={small:bl("padding:",qP," ",Tl.controlPaddingXSmall,"px;",""),medium:bl("padding:",KP," ",Tl.controlPaddingX,"px;",""),large:bl("padding:",YP," ",Tl.controlPaddingXLarge,"px;","")};const ZP=(0,c.createContext)({size:"medium"}),QP=()=>(0,c.useContext)(ZP);const JP=Xa((function(e,t){const{isBordered:n,isSeparated:r,size:o,...i}=function(e){const{className:t,isBordered:n=!1,isRounded:r=!0,isSeparated:o=!1,role:i="list",...s}=Ya(e,"ItemGroup");return{isBordered:n,className:qa()(n&&VP,o&&$P,r&&UP,t),role:i,isSeparated:o,...s}}(e),{size:s}=QP(),a={spacedAround:!n&&!r,size:o||s};return(0,wt.jsx)(ZP.Provider,{value:a,children:(0,wt.jsx)(dl,{...i,ref:t})})}),"ItemGroup"),eT=10,tT=0,nT=eT;function rT(e){return Math.max(0,Math.min(100,e))}function oT(e,t,n){const r=e.slice();return r[t]=n,r}function iT(e,t,n){if(function(e,t,n,r=tT){const o=e[t].position,i=Math.min(o,n),s=Math.max(o,n);return e.some((({position:e},o)=>o!==t&&(Math.abs(e-n)<r||i<e&&e<s)))}(e,t,n))return e;return oT(e,t,{...e[t],position:n})}function sT(e,t,n){return oT(e,t,{...e[t],color:n})}function aT(e,t){if(!t)return;const{x:n,width:r}=t.getBoundingClientRect(),o=e-n;return Math.round(rT(100*o/r))}function lT({isOpen:e,position:t,color:n,...r}){const o=`components-custom-gradient-picker__control-point-button-description-${(0,l.useInstanceId)(lT)}`;return(0,wt.jsxs)(wt.Fragment,{children:[(0,wt.jsx)(sy,{"aria-label":(0,a.sprintf)((0,a.__)("Gradient control point at position %1$s%% with color code %2$s."),t,n),"aria-describedby":o,"aria-haspopup":"true","aria-expanded":e,className:s("components-custom-gradient-picker__control-point-button",{"is-active":e}),...r}),(0,wt.jsx)(pl,{id:o,children:(0,a.__)("Use your left or right arrow keys or drag and drop with the mouse to change the gradient position. Press the button to change the color or remove the control point.")})]})}function cT({isRenderedInSidebar:e,className:t,...n}){const r=(0,c.useMemo)((()=>({placement:"bottom",offset:8,resize:!1})),[]),o=s("components-custom-gradient-picker__control-point-dropdown",t);return(0,wt.jsx)(Lk,{isRenderedInSidebar:e,popoverProps:r,className:o,...n})}function uT({disableRemove:e,disableAlpha:t,gradientPickerDomRef:n,ignoreMarkerPosition:r,value:o,onChange:i,onStartControlPointChange:s,onStopControlPointChange:l,__experimentalIsRenderedInSidebar:u}){const d=(0,c.useRef)(),p=e=>{if(void 0===d.current||null===n.current)return;const t=aT(e.clientX,n.current),{initialPosition:r,index:s,significantMoveHappened:a}=d.current;!a&&Math.abs(r-t)>=5&&(d.current.significantMoveHappened=!0),i(iT(o,s,t))},f=()=>{window&&window.removeEventListener&&d.current&&d.current.listenersActivated&&(window.removeEventListener("mousemove",p),window.removeEventListener("mouseup",f),l(),d.current.listenersActivated=!1)},h=(0,c.useRef)();return h.current=f,(0,c.useEffect)((()=>()=>{h.current?.()}),[]),(0,wt.jsx)(wt.Fragment,{children:o.map(((n,c)=>{const h=n?.position;return r!==h&&(0,wt.jsx)(cT,{isRenderedInSidebar:u,onClose:l,renderToggle:({isOpen:e,onToggle:t})=>(0,wt.jsx)(lT,{onClick:()=>{d.current&&d.current.significantMoveHappened||(e?l():s(),t())},onMouseDown:()=>{window&&window.addEventListener&&(d.current={initialPosition:h,index:c,significantMoveHappened:!1,listenersActivated:!0},s(),window.addEventListener("mousemove",p),window.addEventListener("mouseup",f))},onKeyDown:e=>{"ArrowLeft"===e.code?(e.stopPropagation(),i(iT(o,c,rT(n.position-nT)))):"ArrowRight"===e.code&&(e.stopPropagation(),i(iT(o,c,rT(n.position+nT))))},isOpen:e,position:n.position,color:n.color},c),renderContent:({onClose:r})=>(0,wt.jsxs)(Mk,{paddingSize:"none",children:[(0,wt.jsx)(vk,{enableAlpha:!t,color:n.color,onChange:e=>{i(sT(o,c,Ev(e).toRgbString()))}}),!e&&o.length>2&&(0,wt.jsx)(yy,{className:"components-custom-gradient-picker__remove-control-point-wrapper",alignment:"center",children:(0,wt.jsx)(sy,{onClick:()=>{i(function(e,t){return e.filter(((e,n)=>n!==t))}(o,c)),r()},variant:"link",children:(0,a.__)("Remove Control Point")})})]}),style:{left:`${n.position}%`,transform:"translateX( -50% )"}},c)}))})}uT.InsertPoint=function({value:e,onChange:t,onOpenInserter:n,onCloseInserter:r,insertPosition:o,disableAlpha:i,__experimentalIsRenderedInSidebar:s}){const[a,l]=(0,c.useState)(!1);return(0,wt.jsx)(cT,{isRenderedInSidebar:s,className:"components-custom-gradient-picker__inserter",onClose:()=>{r()},renderToggle:({isOpen:e,onToggle:t})=>(0,wt.jsx)(sy,{"aria-expanded":e,"aria-haspopup":"true",onClick:()=>{e?r():(l(!1),n()),t()},className:"components-custom-gradient-picker__insert-point-dropdown",icon:Wg}),renderContent:()=>(0,wt.jsx)(Mk,{paddingSize:"none",children:(0,wt.jsx)(vk,{enableAlpha:!i,onChange:n=>{a?t(function(e,t,n){const r=e.findIndex((e=>e.position===t));return sT(e,r,n)}(e,o,Ev(n).toRgbString())):(t(function(e,t,n){const r=e.findIndex((e=>e.position>t)),o={color:n,position:t},i=e.slice();return i.splice(r-1,0,o),i}(e,o,Ev(n).toRgbString())),l(!0))}})}),style:null!==o?{left:`${o}%`,transform:"translateX( -50% )"}:void 0})};const dT=uT,pT=(e,t)=>{switch(t.type){case"MOVE_INSERTER":if("IDLE"===e.id||"MOVING_INSERTER"===e.id)return{id:"MOVING_INSERTER",insertPosition:t.insertPosition};break;case"STOP_INSERTER_MOVE":if("MOVING_INSERTER"===e.id)return{id:"IDLE"};break;case"OPEN_INSERTER":if("MOVING_INSERTER"===e.id)return{id:"INSERTING_CONTROL_POINT",insertPosition:e.insertPosition};break;case"CLOSE_INSERTER":if("INSERTING_CONTROL_POINT"===e.id)return{id:"IDLE"};break;case"START_CONTROL_CHANGE":if("IDLE"===e.id)return{id:"MOVING_CONTROL_POINT"};break;case"STOP_CONTROL_CHANGE":if("MOVING_CONTROL_POINT"===e.id)return{id:"IDLE"}}return e},fT={id:"IDLE"};function hT({background:e,hasGradient:t,value:n,onChange:r,disableInserter:o=!1,disableAlpha:i=!1,__experimentalIsRenderedInSidebar:a=!1}){const l=(0,c.useRef)(null),[u,d]=(0,c.useReducer)(pT,fT),p=e=>{if(!l.current)return;const t=aT(e.clientX,l.current);n.some((({position:e})=>Math.abs(t-e)<eT))?"MOVING_INSERTER"===u.id&&d({type:"STOP_INSERTER_MOVE"}):d({type:"MOVE_INSERTER",insertPosition:t})},f="MOVING_INSERTER"===u.id,h="INSERTING_CONTROL_POINT"===u.id;return(0,wt.jsxs)("div",{className:s("components-custom-gradient-picker__gradient-bar",{"has-gradient":t}),onMouseEnter:p,onMouseMove:p,onMouseLeave:()=>{d({type:"STOP_INSERTER_MOVE"})},children:[(0,wt.jsx)("div",{className:"components-custom-gradient-picker__gradient-bar-background",style:{background:e,opacity:t?1:.4}}),(0,wt.jsxs)("div",{ref:l,className:"components-custom-gradient-picker__markers-container",children:[!o&&(f||h)&&(0,wt.jsx)(dT.InsertPoint,{__experimentalIsRenderedInSidebar:a,disableAlpha:i,insertPosition:u.insertPosition,value:n,onChange:r,onOpenInserter:()=>{d({type:"OPEN_INSERTER"})},onCloseInserter:()=>{d({type:"CLOSE_INSERTER"})}}),(0,wt.jsx)(dT,{__experimentalIsRenderedInSidebar:a,disableAlpha:i,disableRemove:o,gradientPickerDomRef:l,ignoreMarkerPosition:h?u.insertPosition:void 0,value:n,onChange:r,onStartControlPointChange:()=>{d({type:"START_CONTROL_CHANGE"})},onStopControlPointChange:()=>{d({type:"STOP_CONTROL_CHANGE"})}})]})]})}var mT=o(8924);const gT="linear-gradient(135deg, rgba(6, 147, 227, 1) 0%, rgb(155, 81, 224) 100%)",vT={type:"angular",value:"90"},bT=[{value:"linear-gradient",label:(0,a.__)("Linear")},{value:"radial-gradient",label:(0,a.__)("Radial")}],xT={top:0,"top right":45,"right top":45,right:90,"right bottom":135,"bottom right":135,bottom:180,"bottom left":225,"left bottom":225,left:270,"top left":315,"left top":315};function yT({type:e,value:t,length:n}){return`${function({type:e,value:t}){return"literal"===e?t:"hex"===e?`#${t}`:`${e}(${t.join(",")})`}({type:e,value:t})} ${function(e){if(!e)return"";const{value:t,type:n}=e;return`${t}${n}`}(n)}`}function wT({type:e,orientation:t,colorStops:n}){const r=function(e){if(!Array.isArray(e)&&e&&"angular"===e.type)return`${e.value}deg`}(t);return`${e}(${[r,...n.sort(((e,t)=>{const n=e=>void 0===e?.length?.value?0:parseInt(e.length.value);return n(e)-n(t)})).map(yT)].filter(Boolean).join(",")})`}function _T(e){return void 0===e.length||"%"!==e.length.type}function ST(e){switch(e.type){case"hex":return`#${e.value}`;case"literal":return e.value;case"rgb":case"rgba":return`${e.type}(${e.value.join(",")})`;default:return"transparent"}}Tv([Rv]);const CT=cl(Mg,{target:"e10bzpgi1"})({name:"1gvx10y",styles:"flex-grow:5"}),kT=cl(Mg,{target:"e10bzpgi0"})({name:"1gvx10y",styles:"flex-grow:5"}),jT=({gradientAST:e,hasGradient:t,onChange:n})=>{var r;const o=null!==(r=e?.orientation?.value)&&void 0!==r?r:180;return(0,wt.jsx)(Ty,{onChange:t=>{n(wT({...e,orientation:{type:"angular",value:`${t}`}}))},value:t?o:""})},ET=({gradientAST:e,hasGradient:t,onChange:n})=>{const{type:r}=e;return(0,wt.jsx)(_S,{__nextHasNoMarginBottom:!0,className:"components-custom-gradient-picker__type-picker",label:(0,a.__)("Type"),labelPosition:"top",onChange:t=>{"linear-gradient"===t&&n(wT({...e,orientation:e.orientation?void 0:vT,type:"linear-gradient"})),"radial-gradient"===t&&(()=>{const{orientation:t,...r}=e;n(wT({...r,type:"radial-gradient"}))})()},options:bT,size:"__unstable-large",value:t?r:void 0})};const PT=function({value:e,onChange:t,__experimentalIsRenderedInSidebar:n=!1}){const{gradientAST:r,hasGradient:o}=function(e){let t,n=!!e;const r=null!=e?e:gT;try{t=mT.parse(r)[0]}catch(e){console.warn("wp.components.CustomGradientPicker failed to parse the gradient with error",e),t=mT.parse(gT)[0],n=!1}if(Array.isArray(t.orientation)||"directional"!==t.orientation?.type||(t.orientation={type:"angular",value:xT[t.orientation.value].toString()}),t.colorStops.some(_T)){const{colorStops:e}=t,n=100/(e.length-1);e.forEach(((e,t)=>{e.length={value:""+n*t,type:"%"}}))}return{gradientAST:t,hasGradient:n}}(e),i=function(e){return wT({type:"linear-gradient",orientation:vT,colorStops:e.colorStops})}(r),s=r.colorStops.map((e=>({color:ST(e),position:parseInt(e.length.value)})));return(0,wt.jsxs)(jk,{spacing:4,className:"components-custom-gradient-picker",children:[(0,wt.jsx)(hT,{__experimentalIsRenderedInSidebar:n,background:i,hasGradient:o,value:s,onChange:e=>{t(wT(function(e,t){return{...e,colorStops:t.map((({position:e,color:t})=>{const{r:n,g:r,b:o,a:i}=Ev(t).toRgb();return{length:{type:"%",value:e?.toString()},type:i<1?"rgba":"rgb",value:i<1?[`${n}`,`${r}`,`${o}`,`${i}`]:[`${n}`,`${r}`,`${o}`]}}))}}(r,e)))}}),(0,wt.jsxs)(Ig,{gap:3,className:"components-custom-gradient-picker__ui-line",children:[(0,wt.jsx)(CT,{children:(0,wt.jsx)(ET,{gradientAST:r,hasGradient:o,onChange:t})}),(0,wt.jsx)(kT,{children:"linear-gradient"===r.type&&(0,wt.jsx)(jT,{gradientAST:r,hasGradient:o,onChange:t})})]})]})},TT=e=>e.length>0&&e.every((e=>{return t=e,Array.isArray(t.gradients)&&!("gradient"in t);var t}));function RT({className:e,clearGradient:t,gradients:n,onChange:r,value:o,...i}){const s=(0,c.useMemo)((()=>n.map((({gradient:e,name:n,slug:i},s)=>(0,wt.jsx)(kk.Option,{value:e,isSelected:o===e,tooltipText:n||(0,a.sprintf)((0,a.__)("Gradient code: %s"),e),style:{color:"rgba( 0,0,0,0 )",background:e},onClick:o===e?t:()=>r(e,s),"aria-label":n?(0,a.sprintf)((0,a.__)("Gradient: %s"),n):(0,a.sprintf)((0,a.__)("Gradient code: %s"),e)},i)))),[n,o,r,t]);return(0,wt.jsx)(kk.OptionGroup,{className:e,options:s,...i})}function IT({className:e,clearGradient:t,gradients:n,onChange:r,value:o,headingLevel:i}){const s=(0,l.useInstanceId)(IT);return(0,wt.jsx)(jk,{spacing:3,className:e,children:n.map((({name:e,gradients:n},a)=>{const l=`color-palette-${s}-${a}`;return(0,wt.jsxs)(jk,{spacing:2,children:[(0,wt.jsx)(Rk,{level:i,id:l,children:e}),(0,wt.jsx)(RT,{clearGradient:t,gradients:n,onChange:e=>r(e,a),value:o,"aria-labelledby":l})]},a)}))})}function NT(e){const{asButtons:t,loop:n,actions:r,headingLevel:o,"aria-label":i,"aria-labelledby":s,...l}=e,c=TT(e.gradients)?(0,wt.jsx)(IT,{headingLevel:o,...l}):(0,wt.jsx)(RT,{...l});let u;if(t)u={asButtons:!0};else{const e={asButtons:!1,loop:n};u=i?{...e,"aria-label":i}:s?{...e,"aria-labelledby":s}:{...e,"aria-label":(0,a.__)("Custom color picker.")}}return(0,wt.jsx)(kk,{...u,actions:r,options:c})}const MT=function({className:e,gradients:t=[],onChange:n,value:r,clearable:o=!0,disableCustomGradients:i=!1,__experimentalIsRenderedInSidebar:s,headingLevel:l=2,...u}){const d=(0,c.useCallback)((()=>n(void 0)),[n]);return(0,wt.jsxs)(jk,{spacing:t.length?4:0,children:[!i&&(0,wt.jsx)(PT,{__experimentalIsRenderedInSidebar:s,value:r,onChange:n}),(t.length>0||o)&&(0,wt.jsx)(NT,{...u,className:e,clearGradient:d,gradients:t,onChange:n,value:r,actions:o&&!i&&(0,wt.jsx)(kk.ButtonAction,{onClick:d,children:(0,a.__)("Clear")}),headingLevel:l})]})},AT=(0,wt.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wt.jsx)(n.Path,{d:"M5 5v1.5h14V5H5zm0 7.8h14v-1.5H5v1.5zM5 19h14v-1.5H5V19z"})}),DT=window.wp.dom,OT=()=>{},zT=["menuitem","menuitemradio","menuitemcheckbox"];class LT extends c.Component{constructor(e){super(e),this.onKeyDown=this.onKeyDown.bind(this),this.bindContainer=this.bindContainer.bind(this),this.getFocusableContext=this.getFocusableContext.bind(this),this.getFocusableIndex=this.getFocusableIndex.bind(this)}componentDidMount(){this.container&&this.container.addEventListener("keydown",this.onKeyDown)}componentWillUnmount(){this.container&&this.container.removeEventListener("keydown",this.onKeyDown)}bindContainer(e){const{forwardedRef:t}=this.props;this.container=e,"function"==typeof t?t(e):t&&"current"in t&&(t.current=e)}getFocusableContext(e){if(!this.container)return null;const{onlyBrowserTabstops:t}=this.props,n=(t?DT.focus.tabbable:DT.focus.focusable).find(this.container),r=this.getFocusableIndex(n,e);return r>-1&&e?{index:r,target:e,focusables:n}:null}getFocusableIndex(e,t){return e.indexOf(t)}onKeyDown(e){this.props.onKeyDown&&this.props.onKeyDown(e);const{getFocusableContext:t}=this,{cycle:n=!0,eventToOffset:r,onNavigate:o=OT,stopNavigationEvents:i}=this.props,s=r(e);if(void 0!==s&&i){e.stopImmediatePropagation();const t=e.target?.getAttribute("role");!!t&&zT.includes(t)&&e.preventDefault()}if(!s)return;const a=e.target?.ownerDocument?.activeElement;if(!a)return;const l=t(a);if(!l)return;const{index:c,focusables:u}=l,d=n?function(e,t,n){const r=e+n;return r<0?t+r:r>=t?r-t:r}(c,u.length,s):c+s;d>=0&&d<u.length&&(u[d].focus(),o(d,u[d]),"Tab"===e.code&&e.preventDefault())}render(){const{children:e,stopNavigationEvents:t,eventToOffset:n,onNavigate:r,onKeyDown:o,cycle:i,onlyBrowserTabstops:s,forwardedRef:a,...l}=this.props;return(0,wt.jsx)("div",{ref:this.bindContainer,...l,children:e})}}const FT=(e,t)=>(0,wt.jsx)(LT,{...e,forwardedRef:t});FT.displayName="NavigableContainer";const BT=(0,c.forwardRef)(FT);const VT=(0,c.forwardRef)((function({role:e="menu",orientation:t="vertical",...n},r){return(0,wt.jsx)(BT,{ref:r,stopNavigationEvents:!0,onlyBrowserTabstops:!1,role:e,"aria-orientation":"presentation"===e||"vertical"!==t&&"horizontal"!==t?void 0:t,eventToOffset:e=>{const{code:n}=e;let r=["ArrowDown"],o=["ArrowUp"];return"horizontal"===t&&(r=["ArrowRight"],o=["ArrowLeft"]),"both"===t&&(r=["ArrowRight","ArrowDown"],o=["ArrowLeft","ArrowUp"]),r.includes(n)?1:o.includes(n)?-1:["ArrowDown","ArrowUp","ArrowLeft","ArrowRight"].includes(n)?0:void 0},...n})})),$T=VT;function HT(e={},t={}){const n={...e,...t};return t.className&&e.className&&(n.className=s(t.className,e.className)),n}function WT(e){return"function"==typeof e}const UT=Za((function(e){const{children:t,className:n,controls:r,icon:o=AT,label:i,popoverProps:a,toggleProps:l,menuProps:c,disableOpenOnArrowDown:u=!1,text:d,noIcons:p,open:f,defaultOpen:h,onToggle:m,variant:g}=Ya(e,"DropdownMenu");if(!r?.length&&!WT(t))return null;let v;r?.length&&(v=r,Array.isArray(v[0])||(v=[r]));const b=HT({className:"components-dropdown-menu__popover",variant:g},a);return(0,wt.jsx)(rS,{className:n,popoverProps:b,renderToggle:({isOpen:e,onToggle:t})=>{var n;const{as:r=sy,...a}=null!=l?l:{},c=HT({className:s("components-dropdown-menu__toggle",{"is-opened":e})},a);return(0,wt.jsx)(r,{...c,icon:o,onClick:e=>{t(),c.onClick&&c.onClick(e)},onKeyDown:n=>{(n=>{u||e||"ArrowDown"!==n.code||(n.preventDefault(),t())})(n),c.onKeyDown&&c.onKeyDown(n)},"aria-haspopup":"true","aria-expanded":e,label:i,text:d,showTooltip:null===(n=l?.showTooltip)||void 0===n||n,children:c.children})},renderContent:e=>{const n=HT({"aria-label":i,className:s("components-dropdown-menu__menu",{"no-icons":p})},c);return(0,wt.jsxs)($T,{...n,role:"menu",children:[WT(t)?t(e):null,v?.flatMap(((t,n)=>t.map(((t,r)=>(0,wt.jsx)(sy,{onClick:n=>{n.stopPropagation(),e.onClose(),t.onClick&&t.onClick()},className:s("components-dropdown-menu__menu-item",{"has-separator":n>0&&0===r,"is-active":t.isActive,"is-icon-only":!t.title}),icon:t.icon,label:t.label,"aria-checked":"menuitemcheckbox"===t.role||"menuitemradio"===t.role?t.isActive:void 0,role:"menuitemcheckbox"===t.role||"menuitemradio"===t.role?t.role:"menuitem",accessibleWhenDisabled:!0,disabled:t.isDisabled,children:t.title},[n,r].join())))))]})},open:f,defaultOpen:h,onToggle:m})}),"DropdownMenu"),GT=UT;const KT=cl(Q_,{target:"e1lpqc909"})("&&{flex-shrink:0;width:",wl(6),";height:",wl(6),";}"),qT=cl(ty,{target:"e1lpqc908"})(sb,"{background:",jl.gray[100],";border-radius:",Tl.radiusXSmall,";",fb,fb,fb,fb,"{height:",wl(8),";}",tb,tb,tb,"{border-color:transparent;box-shadow:none;}}"),YT=({as:e})=>"button"===e?bl("display:flex;align-items:center;width:100%;appearance:none;background:transparent;border:none;border-radius:0;padding:0;cursor:pointer;&:hover{color:",jl.theme.accent,";}",""):null,XT=cl(dl,{target:"e1lpqc907"})(YT," padding-block:3px;padding-inline-start:",wl(3),";border:1px solid ",Tl.surfaceBorderColor,";border-bottom-color:transparent;font-size:",Fx("default.fontSize"),";&:focus-visible{border-color:transparent;box-shadow:0 0 0 var( --wp-admin-border-width-focus ) ",jl.theme.accent,";outline:2px solid transparent;outline-offset:0;}border-top-left-radius:",Tl.radiusSmall,";border-top-right-radius:",Tl.radiusSmall,";&+&{border-top-left-radius:0;border-top-right-radius:0;}&:last-child{border-bottom-left-radius:",Tl.radiusSmall,";border-bottom-right-radius:",Tl.radiusSmall,";border-bottom-color:",Tl.surfaceBorderColor,";}&.is-selected+&{border-top-color:transparent;}&.is-selected{border-color:",jl.theme.accent,";}"),ZT=cl("div",{target:"e1lpqc906"})("line-height:",wl(8),";margin-left:",wl(2),";margin-right:",wl(2),";white-space:nowrap;overflow:hidden;"),QT=cl(Tk,{target:"e1lpqc905"})("text-transform:uppercase;line-height:",wl(6),";font-weight:500;&&&{font-size:11px;margin-bottom:0;}"),JT=cl(dl,{target:"e1lpqc904"})("height:",wl(6),";display:flex;"),eR=cl(dl,{target:"e1lpqc903"})("margin-top:",wl(2),";"),tR=cl(dl,{target:"e1lpqc902"})({name:"u6wnko",styles:"&&&{.components-button.has-icon{min-width:0;padding:0;}}"}),nR=cl(sy,{target:"e1lpqc901"})("&&{color:",jl.theme.accent,";}"),rR=cl(sy,{target:"e1lpqc900"})("&&{margin-top:",wl(1),";}");function oR({value:e,onChange:t,label:n}){return(0,wt.jsx)(qT,{label:n,hideLabelFromVision:!0,value:e,onChange:t})}function iR({isGradient:e,element:t,onChange:n,popoverProps:r,onClose:o=(()=>{})}){const i=(0,c.useMemo)((()=>({shift:!0,offset:20,resize:!1,placement:"left-start",...r,className:s("components-palette-edit__popover",r?.className)})),[r]);return(0,wt.jsxs)(Dw,{...i,onClose:o,children:[!e&&(0,wt.jsx)(vk,{color:t.color,enableAlpha:!0,onChange:e=>{n({...t,color:e})}}),e&&(0,wt.jsx)("div",{className:"components-palette-edit__popover-gradient-picker",children:(0,wt.jsx)(PT,{__experimentalIsRenderedInSidebar:!0,value:t.gradient,onChange:e=>{n({...t,gradient:e})}})})]})}function sR({canOnlyChangeValues:e,element:t,onChange:n,onRemove:r,popoverProps:o,slugPrefix:i,isGradient:s}){const l=s?t.gradient:t.color,[u,d]=(0,c.useState)(!1),[p,f]=(0,c.useState)(null),h=(0,c.useMemo)((()=>({...o,anchor:p})),[p,o]);return(0,wt.jsxs)(XT,{ref:f,as:"div",children:[(0,wt.jsxs)(yy,{justify:"flex-start",children:[(0,wt.jsx)(sy,{onClick:()=>{d(!0)},"aria-label":(0,a.sprintf)((0,a.__)("Edit: %s"),t.name.trim().length?t.name:l),style:{padding:0},children:(0,wt.jsx)(KT,{colorValue:l})}),(0,wt.jsx)(Gg,{children:e?(0,wt.jsx)(ZT,{children:t.name.trim().length?t.name:" "}):(0,wt.jsx)(oR,{label:s?(0,a.__)("Gradient name"):(0,a.__)("Color name"),value:t.name,onChange:e=>n({...t,name:e,slug:i+zy(null!=e?e:"")})})}),!e&&(0,wt.jsx)(Gg,{children:(0,wt.jsx)(rR,{size:"small",icon:t_,label:(0,a.sprintf)((0,a.__)("Remove color: %s"),t.name.trim().length?t.name:l),onClick:r})})]}),u&&(0,wt.jsx)(iR,{isGradient:s,onChange:n,element:t,popoverProps:h,onClose:()=>d(!1)})]})}function aR({elements:e,onChange:t,canOnlyChangeValues:n,slugPrefix:r,isGradient:o,popoverProps:i,addColorRef:s}){const a=(0,c.useRef)();(0,c.useEffect)((()=>{a.current=e}),[e]);const u=(0,l.useDebounce)((e=>t(function(e){const t={};return e.map((e=>{var n;let r;const{slug:o}=e;return t[o]=(t[o]||0)+1,t[o]>1&&(r=`${o}-${t[o]-1}`),{...e,slug:null!==(n=r)&&void 0!==n?n:o}}))}(e))),100);return(0,wt.jsx)(jk,{spacing:3,children:(0,wt.jsx)(JP,{isRounded:!0,children:e.map(((a,l)=>(0,wt.jsx)(sR,{isGradient:o,canOnlyChangeValues:n,element:a,onChange:t=>{u(e.map(((e,n)=>n===l?t:e)))},onRemove:()=>{const n=e.filter(((e,t)=>t!==l));t(n.length?n:void 0),s.current?.focus()},slugPrefix:r,popoverProps:i},l)))})})}const lR=[];const cR=function({gradients:e,colors:t=lR,onChange:n,paletteLabel:r,paletteLabelHeadingLevel:o=2,emptyMessage:i,canOnlyChangeValues:s,canReset:u,slugPrefix:d="",popoverProps:p}){const f=!!e,h=f?e:t,[m,g]=(0,c.useState)(!1),[v,b]=(0,c.useState)(null),x=m&&!!v&&h[v]&&!h[v].slug,y=h.length>0,w=(0,l.useDebounce)(n,100),_=(0,c.useCallback)(((e,t)=>{const n=void 0===t?void 0:h[t];n&&n[f?"gradient":"color"]===e?b(t):g(!0)}),[f,h]),S=(0,c.useRef)(null);return(0,wt.jsxs)(tR,{children:[(0,wt.jsxs)(yy,{children:[(0,wt.jsx)(QT,{level:o,children:r}),(0,wt.jsxs)(JT,{children:[y&&m&&(0,wt.jsx)(nR,{size:"small",onClick:()=>{g(!1),b(null)},children:(0,a.__)("Done")}),!s&&(0,wt.jsx)(sy,{ref:S,size:"small",isPressed:x,icon:Wg,label:f?(0,a.__)("Add gradient"):(0,a.__)("Add color"),onClick:()=>{const{name:r,slug:o}=function(e,t){const n=new RegExp(`^${t}color-([\\d]+)$`),r=e.reduce(((e,t)=>{if("string"==typeof t?.slug){const r=t?.slug.match(n);if(r){const t=parseInt(r[1],10);if(t>=e)return t+1}}return e}),1);return{name:(0,a.sprintf)((0,a.__)("Color %s"),r),slug:`${t}color-${r}`}}(h,d);n(e?[...e,{gradient:gT,name:r,slug:o}]:[...t,{color:"#000",name:r,slug:o}]),g(!0),b(h.length)}}),y&&(!m||!s||u)&&(0,wt.jsx)(GT,{icon:zP,label:f?(0,a.__)("Gradient options"):(0,a.__)("Color options"),toggleProps:{size:"small"},children:({onClose:e})=>(0,wt.jsx)(wt.Fragment,{children:(0,wt.jsxs)($T,{role:"menu",children:[!m&&(0,wt.jsx)(sy,{variant:"tertiary",onClick:()=>{g(!0),e()},className:"components-palette-edit__menu-button",children:(0,a.__)("Show details")}),!s&&(0,wt.jsx)(sy,{variant:"tertiary",onClick:()=>{b(null),g(!1),n(),e()},className:"components-palette-edit__menu-button",children:f?(0,a.__)("Remove all gradients"):(0,a.__)("Remove all colors")}),u&&(0,wt.jsx)(sy,{variant:"tertiary",onClick:()=>{b(null),n(),e()},children:f?(0,a.__)("Reset gradient"):(0,a.__)("Reset colors")})]})})})]})]}),y&&(0,wt.jsxs)(eR,{children:[m&&(0,wt.jsx)(aR,{canOnlyChangeValues:s,elements:h,onChange:n,slugPrefix:d,isGradient:f,popoverProps:p,addColorRef:S}),!m&&null!==v&&(0,wt.jsx)(iR,{isGradient:f,onClose:()=>b(null),onChange:e=>{w(h.map(((t,n)=>n===v?e:t)))},element:h[null!=v?v:-1],popoverProps:p}),!m&&(f?(0,wt.jsx)(MT,{gradients:e,onChange:_,clearable:!1,disableCustomGradients:!0}):(0,wt.jsx)(Bk,{colors:t,onChange:_,clearable:!1,disableCustomColors:!0}))]}),!y&&i&&(0,wt.jsx)(eR,{children:i})]})},uR=({__next40pxDefaultSize:e})=>!e&&bl("height:28px;padding-left:",wl(1),";padding-right:",wl(1),";",""),dR=cl(Ig,{target:"evuatpg0"})("height:38px;padding-left:",wl(2),";padding-right:",wl(2),";",uR,";");const pR=(0,c.forwardRef)((function(e,t){const{value:n,isExpanded:r,instanceId:o,selectedSuggestionIndex:i,className:a,onChange:l,onFocus:u,onBlur:d,...p}=e,[f,h]=(0,c.useState)(!1),m=n?n.length+1:0;return(0,wt.jsx)("input",{ref:t,id:`components-form-token-input-${o}`,type:"text",...p,value:n||"",onChange:e=>{l&&l({value:e.target.value})},onFocus:e=>{h(!0),u?.(e)},onBlur:e=>{h(!1),d?.(e)},size:m,className:s(a,"components-form-token-field__input"),autoComplete:"off",role:"combobox","aria-expanded":r,"aria-autocomplete":"list","aria-owns":r?`components-form-token-suggestions-${o}`:void 0,"aria-activedescendant":f&&-1!==i&&r?`components-form-token-suggestions-${o}-${i}`:void 0,"aria-describedby":`components-form-token-suggestions-howto-${o}`})})),fR=pR,hR=e=>{e.preventDefault()};const mR=function({selectedIndex:e,scrollIntoView:t,match:n,onHover:r,onSelect:o,suggestions:i=[],displayTransform:a,instanceId:c,__experimentalRenderItem:u}){const d=(0,l.useRefEffect)((n=>(e>-1&&t&&n.children[e]&&n.children[e].scrollIntoView({behavior:"instant",block:"nearest",inline:"nearest"}),()=>{0})),[e,t]),p=e=>()=>{r?.(e)},f=e=>()=>{o?.(e)};return(0,wt.jsx)("ul",{ref:d,className:"components-form-token-field__suggestions-list",id:`components-form-token-suggestions-${c}`,role:"listbox",children:i.map(((t,r)=>{const o=(e=>{const t=a(n).toLocaleLowerCase();if(0===t.length)return null;const r=a(e),o=r.toLocaleLowerCase().indexOf(t);return{suggestionBeforeMatch:r.substring(0,o),suggestionMatch:r.substring(o,o+t.length),suggestionAfterMatch:r.substring(o+t.length)}})(t),i=r===e,l="object"==typeof t&&t?.disabled,d="object"==typeof t&&"value"in t?t?.value:a(t),h=s("components-form-token-field__suggestion",{"is-selected":i});let m;return m="function"==typeof u?u({item:t}):o?(0,wt.jsxs)("span",{"aria-label":a(t),children:[o.suggestionBeforeMatch,(0,wt.jsx)("strong",{className:"components-form-token-field__suggestion-match",children:o.suggestionMatch}),o.suggestionAfterMatch]}):a(t),(0,wt.jsx)("li",{id:`components-form-token-suggestions-${c}-${r}`,role:"option",className:h,onMouseDown:hR,onClick:f(t),onMouseEnter:p(t),"aria-selected":r===e,"aria-disabled":l,children:m},d)}))})},gR=(0,l.createHigherOrderComponent)((e=>t=>{const[n,r]=(0,c.useState)(void 0),o=(0,c.useCallback)((e=>r((()=>e?.handleFocusOutside?e.handleFocusOutside.bind(e):void 0))),[]);return(0,wt.jsx)("div",{...(0,l.__experimentalUseFocusOutside)(n),children:(0,wt.jsx)(e,{ref:o,...t})})}),"withFocusOutside"),vR=()=>{},bR=gR(class extends c.Component{handleFocusOutside(e){this.props.onFocusOutside(e)}render(){return this.props.children}}),xR=(e,t)=>null===e?-1:t.indexOf(e);const yR=function e(t){var n;const{__nextHasNoMarginBottom:r=!1,__next40pxDefaultSize:o=!1,value:i,label:u,options:d,onChange:p,onFilterValueChange:f=vR,hideLabelFromVision:h,help:m,allowReset:g=!0,className:v,messages:b={selected:(0,a.__)("Item selected.")},__experimentalRenderItem:x,expandOnFocus:y=!0,placeholder:w}=_b(t),[_,S]=E_({value:i,onChange:p}),C=d.find((e=>e.value===_)),k=null!==(n=C?.label)&&void 0!==n?n:"",j=(0,l.useInstanceId)(e,"combobox-control"),[E,P]=(0,c.useState)(C||null),[T,R]=(0,c.useState)(!1),[I,N]=(0,c.useState)(!1),[M,A]=(0,c.useState)(""),D=(0,c.useRef)(null),O=(0,c.useMemo)((()=>{const e=[],t=[],n=Oy(M);return d.forEach((r=>{const o=Oy(r.label).indexOf(n);0===o?e.push(r):o>0&&t.push(r)})),e.concat(t)}),[M,d]),z=e=>{e.disabled||(S(e.value),(0,My.speak)(b.selected,"assertive"),P(e),A(""),R(!1))},L=(e=1)=>{let t=xR(E,O)+e;t<0?t=O.length-1:t>=O.length&&(t=0),P(O[t]),R(!0)},F=Ax((e=>{let t=!1;if(!e.defaultPrevented){switch(e.code){case"Enter":E&&(z(E),t=!0);break;case"ArrowUp":L(-1),t=!0;break;case"ArrowDown":L(1),t=!0;break;case"Escape":R(!1),P(null),t=!0}t&&e.preventDefault()}}));return(0,c.useEffect)((()=>{const e=O.length>0,t=xR(E,O)>0;e&&!t&&P(O[0])}),[O,E]),(0,c.useEffect)((()=>{const e=O.length>0;if(T){const t=e?(0,a.sprintf)((0,a._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",O.length),O.length):(0,a.__)("No results.");(0,My.speak)(t,"polite")}}),[O,T]),(0,wt.jsx)(bR,{onFocusOutside:()=>{R(!1)},children:(0,wt.jsx)(Qx,{__nextHasNoMarginBottom:r,__associatedWPComponentName:"ComboboxControl",className:s(v,"components-combobox-control"),label:u,id:`components-form-token-input-${j}`,hideLabelFromVision:h,help:m,children:(0,wt.jsxs)("div",{className:"components-combobox-control__suggestions-container",tabIndex:-1,onKeyDown:F,children:[(0,wt.jsxs)(dR,{__next40pxDefaultSize:o,children:[(0,wt.jsx)(Mg,{children:(0,wt.jsx)(fR,{className:"components-combobox-control__input",instanceId:j,ref:D,placeholder:w,value:T?M:k,onFocus:()=>{N(!0),y&&R(!0),f(""),A("")},onBlur:()=>{N(!1)},onClick:()=>{R(!0)},isExpanded:T,selectedSuggestionIndex:xR(E,O),onChange:e=>{const t=e.value;A(t),f(t),I&&R(!0)}})}),g&&(0,wt.jsx)(Gg,{children:(0,wt.jsx)(sy,{className:"components-combobox-control__reset",icon:e_,disabled:!_,onClick:()=>{S(null),D.current?.focus()},onKeyDown:e=>{e.stopPropagation()},label:(0,a.__)("Reset")})})]}),T&&(0,wt.jsx)(mR,{instanceId:j,match:{label:M,value:""},displayTransform:e=>e.label,suggestions:O,selectedIndex:xR(E,O),onHover:P,onSelect:z,scrollIntoView:!0,__experimentalRenderItem:x})]})})})};function wR(e){if(e.state){const{state:t,...n}=e,{store:r,...o}=wR(t);return{...n,...o,store:r}}return e}const _R={__unstableComposite:"Composite",__unstableCompositeGroup:"Composite.Group or Composite.Row",__unstableCompositeItem:"Composite.Item",__unstableUseCompositeState:"Composite"};function SR(e,t={}){var n;const r=null!==(n=e.displayName)&&void 0!==n?n:"",o=n=>{Fi()(`wp.components.${r}`,{since:"6.7",alternative:_R.hasOwnProperty(r)?_R[r]:void 0});const{store:o,...i}=wR(n),s=i;return s.id=(0,l.useInstanceId)(o,s.baseId,s.id),Object.entries(t).forEach((([e,t])=>{s.hasOwnProperty(e)&&(Object.assign(s,{[t]:s[e]}),delete s[e])})),delete s.baseId,(0,wt.jsx)(e,{...s,store:o})};return o.displayName=r,o}const CR=(0,c.forwardRef)((({role:e,...t},n)=>{const r="row"===e?Dn.Row:Dn.Group;return(0,wt.jsx)(r,{ref:n,role:e,...t})})),kR=SR(Object.assign(Dn,{displayName:"__unstableComposite"}),{baseId:"id"}),jR=SR(Object.assign(CR,{displayName:"__unstableCompositeGroup"})),ER=SR(Object.assign(Dn.Item,{displayName:"__unstableCompositeItem"}),{focusable:"accessibleWhenDisabled"});function PR(e={}){Fi()("wp.components.__unstableUseCompositeState",{since:"6.7",alternative:_R.__unstableUseCompositeState});const{baseId:t,currentId:n,orientation:r,rtl:o=!1,loop:i=!1,wrap:s=!1,shift:a=!1,unstable_virtual:c}=e;return{baseId:(0,l.useInstanceId)(kR,"composite",t),store:gt({defaultActiveId:n,rtl:o,orientation:r,focusLoop:i,focusShift:a,focusWrap:s,virtualFocus:c})}}const TR=new Set(["alert","status","log","marquee","timer"]),RR=[];function IR(e){const t=e.getAttribute("role");return!("SCRIPT"===e.tagName||e.hasAttribute("aria-hidden")||e.hasAttribute("aria-live")||t&&TR.has(t))}const NR=Tl.transitionDuration,MR=Number.parseInt(Tl.transitionDuration),AR="components-modal__disappear-animation";const DR=(0,c.createContext)(new Set),OR=new Map;const zR=(0,c.forwardRef)((function(e,t){const{bodyOpenClassName:n="modal-open",role:r="dialog",title:o=null,focusOnMount:i=!0,shouldCloseOnEsc:u=!0,shouldCloseOnClickOutside:d=!0,isDismissible:p=!0,aria:f={labelledby:void 0,describedby:void 0},onRequestClose:h,icon:m,closeButtonLabel:g,children:v,style:b,overlayClassName:x,className:y,contentLabel:w,onKeyDown:_,isFullScreen:S=!1,size:C,headerActions:k=null,__experimentalHideHeader:j=!1}=e,E=(0,c.useRef)(),P=(0,l.useInstanceId)(zR),T=o?`components-modal-header-${P}`:f.labelledby,R=(0,l.useFocusOnMount)("firstContentElement"===i?"firstElement":i),I=(0,l.useConstrainedTabbing)(),N=(0,l.useFocusReturn)(),M=(0,c.useRef)(null),A=(0,c.useRef)(null),[D,O]=(0,c.useState)(!1),[z,L]=(0,c.useState)(!1);let F;S||"fill"===C?F="is-full-screen":C&&(F=`has-size-${C}`);const B=(0,c.useCallback)((()=>{if(!M.current)return;const e=(0,DT.getScrollContainer)(M.current);M.current===e?L(!0):L(!1)}),[M]);(0,c.useEffect)((()=>(function(e){const t=Array.from(document.body.children),n=[];RR.push(n);for(const r of t)r!==e&&IR(r)&&(r.setAttribute("aria-hidden","true"),n.push(r))}(E.current),()=>function(){const e=RR.pop();if(e)for(const t of e)t.removeAttribute("aria-hidden")}())),[]);const V=(0,c.useRef)();(0,c.useEffect)((()=>{V.current=h}),[h]);const $=(0,c.useContext)(DR),[H]=(0,c.useState)((()=>new Set));(0,c.useEffect)((()=>{$.add(V);for(const e of $)e!==V&&e.current?.();return()=>{for(const e of H)e.current?.();$.delete(V)}}),[$,H]),(0,c.useEffect)((()=>{var e;const t=n,r=1+(null!==(e=OR.get(t))&&void 0!==e?e:0);return OR.set(t,r),document.body.classList.add(n),()=>{const e=OR.get(t)-1;0===e?(document.body.classList.remove(t),OR.delete(t)):OR.set(t,e)}}),[n]);const{closeModal:W,frameRef:U,frameStyle:G,overlayClassname:K}=function(){const e=(0,c.useRef)(),[t,n]=(0,c.useState)(!1),r=(0,l.useReducedMotion)(),o=(0,c.useCallback)((()=>new Promise((t=>{const o=e.current;if(r)return void t();if(!o)return void t();let i;Promise.race([new Promise((e=>{i=t=>{t.animationName===AR&&e()},o.addEventListener("animationend",i),n(!0)})),new Promise((e=>{setTimeout((()=>e()),1.2*MR)}))]).then((()=>{i&&o.removeEventListener("animationend",i),n(!1),t()}))}))),[r]);return{overlayClassname:t?"is-animating-out":void 0,frameRef:e,frameStyle:{"--modal-frame-animation-duration":`${NR}`},closeModal:o}}();(0,c.useLayoutEffect)((()=>{if(!window.ResizeObserver||!A.current)return;const e=new ResizeObserver(B);return e.observe(A.current),B(),()=>{e.disconnect()}}),[B,A]);const q=(0,c.useCallback)((e=>{var t;const n=null!==(t=e?.currentTarget?.scrollTop)&&void 0!==t?t:-1;!D&&n>0?O(!0):D&&n<=0&&O(!1)}),[D]);let Y=null;const X={onPointerDown:e=>{e.target===e.currentTarget&&(Y=e.target,e.preventDefault())},onPointerUp:({target:e,button:t})=>{const n=e===Y;Y=null,0===t&&n&&W().then((()=>h()))}},Z=(0,wt.jsx)("div",{ref:(0,l.useMergeRefs)([E,t]),className:s("components-modal__screen-overlay",K,x),onKeyDown:Ax((function(e){!u||"Escape"!==e.code&&"Escape"!==e.key||e.defaultPrevented||(e.preventDefault(),W().then((()=>h(e))))})),...d?X:{},children:(0,wt.jsx)(vw,{document,children:(0,wt.jsx)("div",{className:s("components-modal__frame",F,y),style:{...G,...b},ref:(0,l.useMergeRefs)([U,I,N,"firstContentElement"!==i?R:null]),role:r,"aria-label":w,"aria-labelledby":w?void 0:T,"aria-describedby":f.describedby,tabIndex:-1,onKeyDown:_,children:(0,wt.jsxs)("div",{className:s("components-modal__content",{"hide-header":j,"is-scrollable":z,"has-scrolled-content":D}),role:"document",onScroll:q,ref:M,"aria-label":z?(0,a.__)("Scrollable section"):void 0,tabIndex:z?0:void 0,children:[!j&&(0,wt.jsxs)("div",{className:"components-modal__header",children:[(0,wt.jsxs)("div",{className:"components-modal__header-heading-container",children:[m&&(0,wt.jsx)("span",{className:"components-modal__icon-container","aria-hidden":!0,children:m}),o&&(0,wt.jsx)("h1",{id:T,className:"components-modal__header-heading",children:o})]}),k,p&&(0,wt.jsxs)(wt.Fragment,{children:[(0,wt.jsx)(Hg,{marginBottom:0,marginLeft:3}),(0,wt.jsx)(sy,{size:"small",onClick:e=>W().then((()=>h(e))),icon:Gy,label:g||(0,a.__)("Close")})]})]}),(0,wt.jsx)("div",{ref:(0,l.useMergeRefs)([A,"firstContentElement"===i?R:null]),children:v})]})})})});return(0,c.createPortal)((0,wt.jsx)(DR.Provider,{value:H,children:Z}),document.body)})),LR=zR;const FR={name:"7g5ii0",styles:"&&{z-index:1000001;}"},BR=Xa(((e,t)=>{const{isOpen:n,onConfirm:r,onCancel:o,children:i,confirmButtonText:s,cancelButtonText:l,...u}=Ya(e,"ConfirmDialog"),d=qa()(FR),p=(0,c.useRef)(),f=(0,c.useRef)(),[h,m]=(0,c.useState)(),[g,v]=(0,c.useState)();(0,c.useEffect)((()=>{const e=void 0!==n;m(!e||n),v(!e)}),[n]);const b=(0,c.useCallback)((e=>t=>{e?.(t),g&&m(!1)}),[g,m]),x=(0,c.useCallback)((e=>{e.target===p.current||e.target===f.current||"Enter"!==e.key||b(r)(e)}),[b,r]),y=null!=l?l:(0,a.__)("Cancel"),w=null!=s?s:(0,a.__)("OK");return(0,wt.jsx)(wt.Fragment,{children:h&&(0,wt.jsx)(LR,{onRequestClose:b(o),onKeyDown:x,closeButtonLabel:y,isDismissible:!0,ref:t,overlayClassName:d,__experimentalHideHeader:!0,...u,children:(0,wt.jsxs)(jk,{spacing:8,children:[(0,wt.jsx)(Xv,{children:i}),(0,wt.jsxs)(Ig,{direction:"row",justify:"flex-end",children:[(0,wt.jsx)(sy,{__next40pxDefaultSize:!0,ref:p,variant:"tertiary",onClick:b(o),children:y}),(0,wt.jsx)(sy,{__next40pxDefaultSize:!0,ref:f,variant:"primary",onClick:b(r),children:w})]})]})})})}),"ConfirmDialog");(0,B.createContext)(void 0);var VR=jt([ir,Nt],[sr,Mt]),$R=VR.useContext,HR=(VR.useScopedContext,VR.useProviderContext);VR.ContextProvider,VR.ScopedContextProvider,(0,B.createContext)(void 0),(0,B.createContext)(!1);function WR(e={}){var t=e,{combobox:n}=t,r=T(t,["combobox"]);const o=qe(r.store,Ke(n,["value","items","renderedItems","baseElement","arrowElement","anchorElement","contentElement","popoverElement","disclosureElement"])),i=o.getState(),s=ht(P(E({},r),{store:o,virtualFocus:F(r.virtualFocus,i.virtualFocus,!0),includesBaseElement:F(r.includesBaseElement,i.includesBaseElement,!1),activeId:F(r.activeId,i.activeId,r.defaultActiveId,null),orientation:F(r.orientation,i.orientation,"vertical")})),a=Hn(P(E({},r),{store:o,placement:F(r.placement,i.placement,"bottom-start")})),l=new String(""),c=P(E(E({},s.getState()),a.getState()),{value:F(r.value,i.value,r.defaultValue,l),setValueOnMove:F(r.setValueOnMove,i.setValueOnMove,!1),labelElement:F(i.labelElement,null),selectElement:F(i.selectElement,null),listElement:F(i.listElement,null)}),u=Ve(c,s,a,o);return $e(u,(()=>Ue(u,["value","items"],(e=>{if(e.value!==l)return;if(!e.items.length)return;const t=e.items.find((e=>!e.disabled&&null!=e.value));null!=(null==t?void 0:t.value)&&u.setState("value",t.value)})))),$e(u,(()=>Ue(u,["mounted"],(e=>{e.mounted||u.setState("activeId",c.activeId)})))),$e(u,(()=>Ue(u,["mounted","items","value"],(e=>{if(n)return;if(e.mounted)return;const t=ot(e.value),r=t[t.length-1];if(null==r)return;const o=e.items.find((e=>!e.disabled&&e.value===r));o&&u.setState("activeId",o.id)})))),$e(u,(()=>Ge(u,["setValueOnMove","moves"],(e=>{const{mounted:t,value:n,activeId:r}=u.getState();if(!e.setValueOnMove&&t)return;if(Array.isArray(n))return;if(!e.moves)return;if(!r)return;const o=s.item(r);o&&!o.disabled&&null!=o.value&&u.setState("value",o.value)})))),P(E(E(E({},s),a),u),{combobox:n,setValue:e=>u.setState("value",e),setLabelElement:e=>u.setState("labelElement",e),setSelectElement:e=>u.setState("selectElement",e),setListElement:e=>u.setState("listElement",e)})}function UR(e={}){const t=HR();e=b(v({},e),{combobox:void 0!==e.combobox?e.combobox:t});const[n,r]=et(WR,e);return function(e,t,n){return Pe(t,[n.combobox]),Je(e,n,"value","setValue"),Je(e,n,"setValueOnMove"),Object.assign(Vn(mt(e,t,n),t,n),{combobox:n.combobox})}(n,r,e)}var GR=jt([ir,Nt],[sr,Mt]),KR=GR.useContext,qR=GR.useScopedContext,YR=GR.useProviderContext,XR=(GR.ContextProvider,GR.ScopedContextProvider),ZR=(0,B.createContext)(!1),QR=(0,B.createContext)(null),JR=kt((function(e){var t=e,{store:n}=t,r=x(t,["store"]);const o=YR();D(n=n||o,!1);const i=je(r.id),s=r.onClick,a=Se((e=>{null==s||s(e),e.defaultPrevented||queueMicrotask((()=>{const e=null==n?void 0:n.getState().selectElement;null==e||e.focus()}))}));return L(r=b(v({id:i},r),{ref:ke(n.setLabelElement,r.ref),onClick:a,style:v({cursor:"default"},r.style)}))})),eI=St(_t((function(e){return Ct("div",JR(e))}))),tI="button",nI=kt((function(e){const t=(0,B.useRef)(null),n=Ee(t,tI),[r,o]=(0,B.useState)((()=>!!n&&Z({tagName:n,type:e.type})));return(0,B.useEffect)((()=>{t.current&&o(Z(t.current))}),[]),e=b(v({role:r||"a"===n?void 0:"button"},e),{ref:ke(t,e.ref)}),e=kn(e)})),rI=(_t((function(e){const t=nI(e);return Ct(tI,t)})),Symbol("disclosure")),oI=kt((function(e){var t=e,{store:n,toggleOnClick:r=!0}=t,o=x(t,["store","toggleOnClick"]);const i=Yn();D(n=n||i,!1);const s=(0,B.useRef)(null),[a,l]=(0,B.useState)(!1),c=n.useState("disclosureElement"),u=n.useState("open");(0,B.useEffect)((()=>{let e=c===s.current;(null==c?void 0:c.isConnected)||(null==n||n.setDisclosureElement(s.current),e=!0),l(u&&e)}),[c,n,u]);const d=o.onClick,p=Re(r),[f,h]=Me(o,rI,!0),m=Se((e=>{null==d||d(e),e.defaultPrevented||f||p(e)&&(null==n||n.setDisclosureElement(e.currentTarget),null==n||n.toggle())})),g=n.useState("contentElement");return o=b(v(v({"aria-expanded":a,"aria-controls":null==g?void 0:g.id},h),o),{ref:ke(s,o.ref),onClick:m}),o=nI(o)})),iI=(_t((function(e){return Ct("button",oI(e))})),kt((function(e){var t=e,{store:n}=t,r=x(t,["store"]);const o=Zn();D(n=n||o,!1);const i=n.useState("contentElement");return r=v({"aria-haspopup":ne(i,"dialog")},r),r=oI(v({store:n},r))}))),sI=(_t((function(e){return Ct("button",iI(e))})),kt((function(e){var t=e,{store:n}=t,r=x(t,["store"]);const o=or();return n=n||o,r=b(v({},r),{ref:ke(null==n?void 0:n.setAnchorElement,r.ref)})}))),aI=(_t((function(e){return Ct("div",sI(e))})),kt((function(e){var t=e,{store:n}=t,r=x(t,["store"]);const o=or();D(n=n||o,!1);const i=r.onClick,s=Se((e=>{null==n||n.setAnchorElement(e.currentTarget),null==i||i(e)}));return r=Ie(r,(e=>(0,wt.jsx)(sr,{value:n,children:e})),[n]),r=b(v({},r),{onClick:s}),r=sI(v({store:n},r)),r=iI(v({store:n},r))}))),lI=(_t((function(e){return Ct("button",aI(e))})),{top:"4,10 8,6 12,10",right:"6,4 10,8 6,12",bottom:"4,6 8,10 12,6",left:"10,4 6,8 10,12"}),cI=kt((function(e){var t=e,{store:n,placement:r}=t,o=x(t,["store","placement"]);const i=rr();D(n=n||i,!1);const s=n.useState((e=>r||e.placement)).split("-")[0],a=lI[s],l=(0,B.useMemo)((()=>(0,wt.jsx)("svg",{display:"block",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,viewBox:"0 0 16 16",height:"1em",width:"1em",children:(0,wt.jsx)("polyline",{points:a})})),[a]);return L(o=b(v({children:l,"aria-hidden":!0},o),{style:v({width:"1em",height:"1em",pointerEvents:"none"},o.style)}))})),uI=(_t((function(e){return Ct("span",cI(e))})),kt((function(e){var t=e,{store:n}=t,r=x(t,["store"]);const o=KR();return r=cI(v({store:n=n||o},r))}))),dI=_t((function(e){return Ct("span",uI(e))})),pI="";function fI(){pI=""}function hI(e,t){var n;const r=(null==(n=e.element)?void 0:n.textContent)||e.children||"value"in e&&e.value;return!!r&&(o=r,o.normalize("NFD").replace(/[\u0300-\u036f]/g,"")).trim().toLowerCase().startsWith(t.toLowerCase());var o}function mI(e,t,n){if(!n)return e;const r=e.find((e=>e.id===n));return r&&hI(r,t)?pI!==t&&hI(r,pI)?e:(pI=t,function(e,t,n=!1){const r=e.findIndex((e=>e.id===t));return[...e.slice(r+1),...n?[vt]:[],...e.slice(0,r)]}(e.filter((e=>hI(e,pI))),n).filter((e=>e.id!==n))):e}var gI=kt((function(e){var t=e,{store:n,typeahead:r=!0}=t,o=x(t,["store","typeahead"]);const i=Rt();D(n=n||i,!1);const s=o.onKeyDownCapture,a=(0,B.useRef)(0),l=Se((e=>{if(null==s||s(e),e.defaultPrevented)return;if(!r)return;if(!n)return;const{renderedItems:t,items:o,activeId:i}=n.getState();if(!function(e){const t=e.target;return(!t||!ee(t))&&(!(" "!==e.key||!pI.length)||1===e.key.length&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&/^[\p{Letter}\p{Number}]$/u.test(e.key))}(e))return fI();let l=function(e){return e.filter((e=>!e.disabled))}(t.length?t:o);if(!function(e,t){if(ce(e))return!0;const n=e.target;if(!n)return!1;const r=t.some((e=>e.element===n));return r}(e,l))return fI();e.preventDefault(),window.clearTimeout(a.current),a.current=window.setTimeout((()=>{pI=""}),500);const c=e.key.toLowerCase();pI+=c,l=mI(l,c,i);const u=l.find((e=>hI(e,pI)));u?n.move(u.id):fI()}));return L(o=b(v({},o),{onKeyDownCapture:l}))}));_t((function(e){return Ct("div",gI(e))}));function vI(e,t){return()=>{const n=t();if(!n)return;let r=0,o=e.item(n);const i=o;for(;o&&null==o.value;){const n=t(++r);if(!n)return;if(o=e.item(n),o===i)break}return null==o?void 0:o.id}}var bI=kt((function(e){var t=e,{store:n,name:r,form:o,required:i,showOnKeyDown:s=!0,moveOnKeyDown:a=!0,toggleOnPress:l=!0,toggleOnClick:c=l}=t,u=x(t,["store","name","form","required","showOnKeyDown","moveOnKeyDown","toggleOnPress","toggleOnClick"]);const d=YR();D(n=n||d,!1);const p=u.onKeyDown,f=Re(s),h=Re(a),m=n.useState("placement").split("-")[0],g=n.useState("value"),y=Array.isArray(g),w=Se((e=>{var t;if(null==p||p(e),e.defaultPrevented)return;if(!n)return;const{orientation:r,items:o,activeId:i}=n.getState(),s="horizontal"!==r,a="vertical"!==r,l=!!(null==(t=o.find((e=>!e.disabled&&null!=e.value)))?void 0:t.rowId),c={ArrowUp:(l||s)&&vI(n,n.up),ArrowRight:(l||a)&&vI(n,n.next),ArrowDown:(l||s)&&vI(n,n.down),ArrowLeft:(l||a)&&vI(n,n.previous)}[e.key];c&&h(e)&&(e.preventDefault(),n.move(c()));const u="top"===m||"bottom"===m;({ArrowDown:u,ArrowUp:u,ArrowLeft:"left"===m,ArrowRight:"right"===m})[e.key]&&f(e)&&(e.preventDefault(),n.move(i),me(e.currentTarget,"keyup",n.show))}));u=Ie(u,(e=>(0,wt.jsx)(XR,{value:n,children:e})),[n]);const[_,S]=(0,B.useState)(!1),C=(0,B.useRef)(!1);(0,B.useEffect)((()=>{const e=C.current;C.current=!1,e||S(!1)}),[g]);const k=n.useState((e=>{var t;return null==(t=e.labelElement)?void 0:t.id})),j=u["aria-label"],E=u["aria-labelledby"]||k,P=n.useState((e=>{if(r)return e.items})),T=(0,B.useMemo)((()=>[...new Set(null==P?void 0:P.map((e=>e.value)).filter((e=>null!=e)))]),[P]);u=Ie(u,(e=>r?(0,wt.jsxs)(wt.Fragment,{children:[(0,wt.jsxs)("select",{style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"},tabIndex:-1,"aria-hidden":!0,"aria-label":j,"aria-labelledby":E,name:r,form:o,required:i,value:g,multiple:y,onFocus:()=>{var e;return null==(e=null==n?void 0:n.getState().selectElement)?void 0:e.focus()},onChange:e=>{var t;C.current=!0,S(!0),null==n||n.setValue(y?(t=e.target,Array.from(t.selectedOptions).map((e=>e.value))):e.target.value)},children:[ot(g).map((e=>null==e||T.includes(e)?null:(0,wt.jsx)("option",{value:e,children:e},e))),T.map((e=>(0,wt.jsx)("option",{value:e,children:e},e)))]}),e]}):e),[n,j,E,r,o,i,g,y,T]);const R=(0,wt.jsxs)(wt.Fragment,{children:[g,(0,wt.jsx)(dI,{})]}),I=n.useState("contentElement");return u=b(v({role:"combobox","aria-autocomplete":"none","aria-labelledby":k,"aria-haspopup":ne(I,"listbox"),"data-autofill":_||void 0,"data-name":r,children:R},u),{ref:ke(n.setSelectElement,u.ref),onKeyDown:w}),u=aI(v({store:n,toggleOnClick:c},u)),u=gI(v({store:n},u))})),xI=_t((function(e){return Ct("button",bI(e))})),yI=(0,B.createContext)(null),wI=kt((function(e){var t=e,{store:n,resetOnEscape:r=!0,hideOnEnter:o=!0,focusOnMove:i=!0,composite:s,alwaysVisible:a}=t,l=x(t,["store","resetOnEscape","hideOnEnter","focusOnMove","composite","alwaysVisible"]);const c=KR();D(n=n||c,!1);const u=je(l.id),d=n.useState("value"),p=Array.isArray(d),[f,h]=(0,B.useState)(d),m=n.useState("mounted");(0,B.useEffect)((()=>{m||h(d)}),[m,d]),r=r&&!p;const g=l.onKeyDown,y=Re(r),w=Re(o),_=Se((e=>{null==g||g(e),e.defaultPrevented||("Escape"===e.key&&y(e)&&(null==n||n.setValue(f))," "!==e.key&&"Enter"!==e.key||ce(e)&&w(e)&&(e.preventDefault(),null==n||n.hide()))})),S=(0,B.useContext)(QR),C=(0,B.useState)(),[k,j]=S||C,E=(0,B.useMemo)((()=>[k,j]),[k]),[P,T]=(0,B.useState)(null),R=(0,B.useContext)(yI);(0,B.useEffect)((()=>{if(R)return R(n),()=>R(null)}),[R,n]),l=Ie(l,(e=>(0,wt.jsx)(XR,{value:n,children:(0,wt.jsx)(yI.Provider,{value:T,children:(0,wt.jsx)(QR.Provider,{value:E,children:e})})})),[n,E]);const I=!!n.combobox;s=null!=s?s:!I&&P!==n;const[N,M]=Ce(s?n.setListElement:null),A=function(e,t,n){const[r,o]=(0,B.useState)(n);return ye((()=>{const n=e&&"current"in e?e.current:e;if(!n)return;const r=()=>{const e=n.getAttribute(t);null!=e&&o(e)},i=new MutationObserver(r);return i.observe(n,{attributeFilter:[t]}),r(),()=>i.disconnect()}),[e,t]),r}(N,"role",l.role),O=(s||("listbox"===A||"menu"===A||"tree"===A||"grid"===A))&&p||void 0,z=Fr(m,l.hidden,a),L=z?b(v({},l.style),{display:"none"}):l.style;s&&(l=v({role:"listbox","aria-multiselectable":O},l));const F=n.useState((e=>{var t;return k||(null==(t=e.labelElement)?void 0:t.id)}));return l=b(v({id:u,"aria-labelledby":F,hidden:z},l),{ref:ke(M,l.ref),style:L,onKeyDown:_}),l=ln(b(v({store:n},l),{composite:s})),l=gI(v({store:n,typeahead:!I},l))})),_I=(_t((function(e){return Ct("div",wI(e))})),kt((function(e){var t=e,{store:n,alwaysVisible:r}=t,o=x(t,["store","alwaysVisible"]);const i=YR();return o=wI(v({store:n=n||i,alwaysVisible:r},o)),o=Ni(v({store:n,alwaysVisible:r},o))}))),SI=uo(_t((function(e){return Ct("div",_I(e))})),YR);function CI(e){const t=e.relatedTarget;return(null==t?void 0:t.nodeType)===Node.ELEMENT_NODE?t:null}var kI=Symbol("composite-hover");var jI=kt((function(e){var t=e,{store:n,focusOnHover:r=!0,blurOnHoverEnd:o=!!r}=t,i=x(t,["store","focusOnHover","blurOnHoverEnd"]);const s=Rt();D(n=n||s,!1);const a=Ae(),l=i.onMouseMove,c=Re(r),u=Se((e=>{if(null==l||l(e),!e.defaultPrevented&&a()&&c(e)){if(!Gt(e.currentTarget)){const e=null==n?void 0:n.getState().baseElement;e&&!Ut(e)&&e.focus()}null==n||n.setActiveId(e.currentTarget.id)}})),d=i.onMouseLeave,p=Re(o),f=Se((e=>{var t;null==d||d(e),e.defaultPrevented||a()&&(function(e){const t=CI(e);return!!t&&Y(e.currentTarget,t)}(e)||function(e){let t=CI(e);if(!t)return!1;do{if(N(t,kI)&&t[kI])return!0;t=t.parentElement}while(t);return!1}(e)||c(e)&&p(e)&&(null==n||n.setActiveId(null),null==(t=null==n?void 0:n.getState().baseElement)||t.focus()))})),h=(0,B.useCallback)((e=>{e&&(e[kI]=!0)}),[]);return L(i=b(v({},i),{ref:ke(h,i.ref),onMouseMove:u,onMouseLeave:f}))}));St(_t((function(e){return Ct("div",jI(e))})));var EI=kt((function(e){var t,n=e,{store:r,value:o,getItem:i,hideOnClick:s,setValueOnClick:a=null!=o,preventScrollOnKeyDown:l=!0,focusOnHover:c=!0}=n,u=x(n,["store","value","getItem","hideOnClick","setValueOnClick","preventScrollOnKeyDown","focusOnHover"]);const d=qR();D(r=r||d,!1);const p=je(u.id),f=z(u),h=(0,B.useCallback)((e=>{const t=b(v({},e),{value:f?void 0:o,children:o});return i?i(t):t}),[f,o,i]),m=r.useState((e=>Array.isArray(e.value)));s=null!=s?s:null!=o&&!m;const g=u.onClick,y=Re(a),w=Re(s),_=Se((e=>{null==g||g(e),e.defaultPrevented||de(e)||ue(e)||(y(e)&&null!=o&&(null==r||r.setValue((e=>Array.isArray(e)?e.includes(o)?e.filter((e=>e!==o)):[...e,o]:o))),w(e)&&(null==r||r.hide()))})),S=r.useState((e=>function(e,t){if(null!=t)return null!=e&&(Array.isArray(e)?e.includes(t):e===t)}(e.value,o)));u=Ie(u,(e=>(0,wt.jsx)(ZR.Provider,{value:null!=S&&S,children:e})),[S]);const C=r.useState("listElement"),k=r.useState((e=>null!=o&&(null!=e.value&&((e.activeId===p||!(null==r?void 0:r.item(e.activeId)))&&(Array.isArray(e.value)?e.value[e.value.length-1]===o:e.value===o)))));u=b(v({id:p,role:re(C),"aria-selected":S,children:o},u),{autoFocus:null!=(t=u.autoFocus)?t:k,onClick:_}),u=Pn(v({store:r,getItem:h,preventScrollOnKeyDown:l},u));const j=Re(c);return u=jI(b(v({store:r},u),{focusOnHover(e){if(!j(e))return!1;const t=null==r?void 0:r.getState();return!!(null==t?void 0:t.open)}}))})),PI=St(_t((function(e){return Ct("div",EI(e))}))),TI=(0,B.createContext)(!1),RI=(0,wt.jsx)("svg",{display:"block",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,viewBox:"0 0 16 16",height:"1em",width:"1em",children:(0,wt.jsx)("polyline",{points:"4,8 7,12 12,4"})});var II=kt((function(e){var t=e,{store:n,checked:r}=t,o=x(t,["store","checked"]);const i=(0,B.useContext)(TI),s=function(e){return e.checked?e.children||RI:"function"==typeof e.children?e.children:null}({checked:r=null!=r?r:i,children:o.children});return L(o=b(v({"aria-hidden":!0},o),{children:s,style:v({width:"1em",height:"1em",pointerEvents:"none"},o.style)}))})),NI=(_t((function(e){return Ct("span",II(e))})),kt((function(e){var t=e,{store:n,checked:r}=t,o=x(t,["store","checked"]);const i=(0,B.useContext)(ZR);return r=null!=r?r:i,o=II(b(v({},o),{checked:r}))}))),MI=_t((function(e){return Ct("span",NI(e))}));const AI="2px",DI="400ms",OI="cubic-bezier( 0.16, 1, 0.3, 1 )",zI={compact:Tl.controlPaddingXSmall,small:Tl.controlPaddingXSmall,default:Tl.controlPaddingX},LI=cl(xI,{shouldForwardProp:e=>"hasCustomRenderProp"!==e,target:"e1p3eej77"})((({size:e,hasCustomRenderProp:t})=>bl("display:block;background-color:",jl.theme.background,";border:none;color:",jl.theme.foreground,";cursor:pointer;font-family:inherit;text-align:start;user-select:none;width:100%;&[data-focus-visible]{outline:none;}",((e,t)=>{const n={compact:{[t]:32,paddingInlineStart:zI.compact,paddingInlineEnd:zI.compact+18},default:{[t]:40,paddingInlineStart:zI.default,paddingInlineEnd:zI.default+18},small:{[t]:24,paddingInlineStart:zI.small,paddingInlineEnd:zI.small+18}};return n[e]||n.default})(e,t?"minHeight":"height")," ",!t&&$I," ",lb({inputSize:e}),";","")),""),FI=xl({"0%":{opacity:0,transform:`translateY(-${AI})`},"100%":{opacity:1,transform:"translateY(0)"}}),BI=cl(SI,{target:"e1p3eej76"})("display:flex;flex-direction:column;background-color:",jl.theme.background,";border-radius:",Tl.radiusSmall,";border:1px solid ",jl.theme.foreground,";box-shadow:",Tl.elevationMedium,";z-index:1000000;max-height:min( var( --popover-available-height, 400px ), 400px );overflow:auto;overscroll-behavior:contain;min-width:min-content;&[data-open]{@media not ( prefers-reduced-motion ){animation-duration:",DI,";animation-timing-function:",OI,";animation-name:",FI,";will-change:transform,opacity;}}&[data-focus-visible]{outline:none;}"),VI=cl(PI,{target:"e1p3eej75"})((({size:e})=>bl("cursor:default;display:flex;align-items:center;justify-content:space-between;font-size:",Tl.fontSize,";line-height:28px;padding-block:",wl(2),";scroll-margin:",wl(1),";user-select:none;&[aria-disabled='true']{cursor:not-allowed;}&[data-active-item]{background-color:",jl.theme.gray[300],";}",(e=>{const t={compact:{paddingInlineStart:zI.compact,paddingInlineEnd:zI.compact-6},default:{paddingInlineStart:zI.default,paddingInlineEnd:zI.default-6},small:{paddingInlineStart:zI.small,paddingInlineEnd:zI.small-6}};return t[e]||t.default})(e),";","")),""),$I={name:"1h52dri",styles:"overflow:hidden;text-overflow:ellipsis;white-space:nowrap"},HI=cl("div",{target:"e1p3eej74"})($I,";"),WI=cl("span",{target:"e1p3eej73"})("color:",jl.theme.gray[600],";margin-inline-start:",wl(2),";"),UI=cl("div",{target:"e1p3eej72"})("display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;flex:1;column-gap:",wl(4),";"),GI=cl("span",{target:"e1p3eej71"})("color:",jl.theme.gray[600],";text-align:initial;line-height:",Tl.fontLineHeightBase,";padding-inline-end:",wl(1),";margin-block:",wl(1),";"),KI=cl(MI,{target:"e1p3eej70"})("display:flex;align-items:center;margin-inline-start:",wl(2),";align-self:start;margin-block-start:2px;font-size:0;",UI,"~&,&:not(:empty){font-size:24px;}"),qI=(0,c.createContext)(void 0);function YI(e){return(Array.isArray(e)?0===e.length:null==e)?(0,a.__)("Select an item"):Array.isArray(e)?1===e.length?e[0]:(0,a.sprintf)((0,a.__)("%s items selected"),e.length):e}const XI=({renderSelectedValue:e,size:t="default",store:n,...r})=>{const{value:o}=Qe(n),i=(0,c.useMemo)((()=>null!=e?e:YI),[e]);return(0,wt.jsx)(LI,{...r,size:t,hasCustomRenderProp:!!e,store:n,children:i(o)})};const ZI=function(e){const{children:t,hideLabelFromVision:n=!1,label:r,size:o,store:i,className:s,isLegacy:a=!1,...l}=e,u=(0,c.useCallback)((e=>{a&&e.stopPropagation()}),[a]),d=(0,c.useMemo)((()=>({store:i,size:o})),[i,o]);return(0,wt.jsxs)("div",{className:s,children:[(0,wt.jsx)(eI,{store:i,render:n?(0,wt.jsx)(pl,{}):(0,wt.jsx)(Qx.VisualLabel,{as:"div"}),children:r}),(0,wt.jsxs)(kb,{__next40pxDefaultSize:!0,size:o,suffix:(0,wt.jsx)(xS,{}),children:[(0,wt.jsx)(XI,{...l,size:o,store:i,showOnKeyDown:!a}),(0,wt.jsx)(BI,{gutter:12,store:i,sameWidth:!0,slide:!1,onKeyDown:u,flip:!a,children:(0,wt.jsx)(qI.Provider,{value:d,children:t})})]})]})};function QI({children:e,...t}){var n;const r=(0,c.useContext)(qI);return(0,wt.jsxs)(VI,{store:r?.store,size:null!==(n=r?.size)&&void 0!==n?n:"default",...t,children:[null!=e?e:t.value,(0,wt.jsx)(KI,{children:(0,wt.jsx)(vS,{icon:xk})})]})}QI.displayName="CustomSelectControlV2.Item";const JI=QI;function eN({__experimentalHint:e,...t}){return{hint:e,...t}}function tN(e,t){return t||(0,a.sprintf)((0,a.__)("Currently selected: %s"),e)}const nN=function e(t){const{__next40pxDefaultSize:n=!1,describedBy:r,options:o,onChange:i,size:a="default",value:c,className:u,showSelectedHint:d=!1,...p}=function({__experimentalShowSelectedHint:e,...t}){return{showSelectedHint:e,...t}}(t),f=(0,l.useInstanceId)(e,"custom-select-control__description"),h=UR({async setValue(e){const t=o.find((t=>t.name===e));if(!i||!t)return;await Promise.resolve();const n=h.getState(),r={highlightedIndex:n.renderedItems.findIndex((t=>t.value===e)),inputValue:"",isOpen:n.open,selectedItem:t,type:""};i(r)},value:c?.name,defaultValue:o[0]?.name}),m=o.map(eN).map((({name:e,key:t,hint:n,style:r,className:o})=>{const i=(0,wt.jsxs)(UI,{children:[(0,wt.jsx)("span",{children:e}),(0,wt.jsx)(GI,{className:"components-custom-select-control__item-hint",children:n})]});return(0,wt.jsx)(JI,{value:e,children:n?i:e,style:r,className:s(o,"components-custom-select-control__item",{"has-hint":n})},t)})),{value:g}=h.getState(),v=n&&"default"===a||"__unstable-large"===a?"default":n||"default"!==a?a:"compact";return(0,wt.jsxs)(wt.Fragment,{children:[(0,wt.jsx)(ZI,{"aria-describedby":f,renderSelectedValue:d?()=>{const e=o?.map(eN)?.find((({name:e})=>g===e))?.hint;return(0,wt.jsxs)(HI,{children:[g,e&&(0,wt.jsx)(WI,{className:"components-custom-select-control__hint",children:e})]})}:void 0,size:v,store:h,className:s("components-custom-select-control",u),isLegacy:!0,...p,children:m}),(0,wt.jsx)(pl,{children:(0,wt.jsx)("span",{id:f,children:tN(g,r)})})]})};function rN(e){const t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):"number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?new Date(e):new Date(NaN)}function oN(e){const t=rN(e);return t.setHours(0,0,0,0),t}function iN(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function sN(e,t){const n=rN(e);if(isNaN(t))return iN(e,NaN);if(!t)return n;const r=n.getDate(),o=iN(e,n.getTime());o.setMonth(n.getMonth()+t+1,0);return r>=o.getDate()?o:(n.setFullYear(o.getFullYear(),o.getMonth(),r),n)}function aN(e,t){return sN(e,-t)}const lN={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function cN(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const uN={date:cN({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:cN({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:cN({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},dN={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function pN(e){return(t,n)=>{let r;if("formatting"===(n?.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,o=n?.width?String(n.width):t;r=e.formattingValues[o]||e.formattingValues[t]}else{const t=e.defaultWidth,o=n?.width?String(n.width):e.defaultWidth;r=e.values[o]||e.values[t]}return r[e.argumentCallback?e.argumentCallback(t):t]}}const fN={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:pN({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:pN({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:pN({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:pN({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:pN({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function hN(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const s=i[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?function(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n;return}(a,(e=>e.test(s))):function(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n;return}(a,(e=>e.test(s)));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;return{value:c,rest:t.slice(s.length)}}}const mN={ordinalNumber:(gN={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const n=e.match(gN.matchPattern);if(!n)return null;const r=n[0],o=e.match(gN.parsePattern);if(!o)return null;let i=gN.valueCallback?gN.valueCallback(o[0]):o[0];return i=t.valueCallback?t.valueCallback(i):i,{value:i,rest:e.slice(r.length)}}),era:hN({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:hN({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:hN({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:hN({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:hN({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};var gN;const vN={code:"en-US",formatDistance:(e,t,n)=>{let r;const o=lN[e];return r="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:uN,formatRelative:(e,t,n,r)=>dN[e],localize:fN,match:mN,options:{weekStartsOn:0,firstWeekContainsDate:1}};let bN={};function xN(){return bN}Math.pow(10,8);const yN=6048e5,wN=864e5;function _N(e){const t=rN(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function SN(e,t){const n=oN(e),r=oN(t),o=+n-_N(n),i=+r-_N(r);return Math.round((o-i)/wN)}function CN(e){const t=rN(e),n=iN(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function kN(e){const t=rN(e);return SN(t,CN(t))+1}function jN(e,t){const n=xN(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=rN(e),i=o.getDay(),s=(i<r?7:0)+i-r;return o.setDate(o.getDate()-s),o.setHours(0,0,0,0),o}function EN(e){return jN(e,{weekStartsOn:1})}function PN(e){const t=rN(e),n=t.getFullYear(),r=iN(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const o=EN(r),i=iN(e,0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);const s=EN(i);return t.getTime()>=o.getTime()?n+1:t.getTime()>=s.getTime()?n:n-1}function TN(e){const t=PN(e),n=iN(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),EN(n)}function RN(e){const t=rN(e),n=+EN(t)-+TN(t);return Math.round(n/yN)+1}function IN(e,t){const n=rN(e),r=n.getFullYear(),o=xN(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,s=iN(e,0);s.setFullYear(r+1,0,i),s.setHours(0,0,0,0);const a=jN(s,t),l=iN(e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=jN(l,t);return n.getTime()>=a.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function NN(e,t){const n=xN(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=IN(e,t),i=iN(e,0);i.setFullYear(o,0,r),i.setHours(0,0,0,0);return jN(i,t)}function MN(e,t){const n=rN(e),r=+jN(n,t)-+NN(n,t);return Math.round(r/yN)+1}function AN(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const DN={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return AN("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):AN(n+1,2)},d:(e,t)=>AN(e.getDate(),t.length),a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>AN(e.getHours()%12||12,t.length),H:(e,t)=>AN(e.getHours(),t.length),m:(e,t)=>AN(e.getMinutes(),t.length),s:(e,t)=>AN(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return AN(Math.trunc(r*Math.pow(10,n-3)),t.length)}},ON="midnight",zN="noon",LN="morning",FN="afternoon",BN="evening",VN="night",$N={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){const t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:"year"})}return DN.y(e,t)},Y:function(e,t,n,r){const o=IN(e,r),i=o>0?o:1-o;if("YY"===t){return AN(i%100,2)}return"Yo"===t?n.ordinalNumber(i,{unit:"year"}):AN(i,t.length)},R:function(e,t){return AN(PN(e),t.length)},u:function(e,t){return AN(e.getFullYear(),t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return AN(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return AN(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return DN.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return AN(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=MN(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):AN(o,t.length)},I:function(e,t,n){const r=RN(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):AN(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):DN.d(e,t)},D:function(e,t,n){const r=kN(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):AN(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return AN(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return AN(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return AN(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(o=12===r?zN:0===r?ON:r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(o=r>=17?BN:r>=12?FN:r>=4?LN:VN,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return DN.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):DN.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):AN(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):AN(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):DN.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):DN.s(e,t)},S:function(e,t){return DN.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return WN(r);case"XXXX":case"XX":return UN(r);default:return UN(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return WN(r);case"xxxx":case"xx":return UN(r);default:return UN(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+HN(r,":");default:return"GMT"+UN(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+HN(r,":");default:return"GMT"+UN(r,":")}},t:function(e,t,n){return AN(Math.trunc(e.getTime()/1e3),t.length)},T:function(e,t,n){return AN(e.getTime(),t.length)}};function HN(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return 0===i?n+String(o):n+String(o)+t+AN(i,2)}function WN(e,t){if(e%60==0){return(e>0?"-":"+")+AN(Math.abs(e)/60,2)}return UN(e,t)}function UN(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+AN(Math.trunc(r/60),2)+t+AN(r%60,2)}const GN=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},KN=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},qN={p:KN,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return GN(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"})}return i.replace("{{date}}",GN(r,t)).replace("{{time}}",KN(o,t))}},YN=/^D+$/,XN=/^Y+$/,ZN=["D","DD","YY","YYYY"];function QN(e){return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}function JN(e){if(!QN(e)&&"number"!=typeof e)return!1;const t=rN(e);return!isNaN(Number(t))}const eM=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,tM=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,nM=/^'([^]*?)'?$/,rM=/''/g,oM=/[a-zA-Z]/;function iM(e,t,n){const r=xN(),o=n?.locale??r.locale??vN,i=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,s=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=rN(e);if(!JN(a))throw new RangeError("Invalid time value");let l=t.match(tM).map((e=>{const t=e[0];if("p"===t||"P"===t){return(0,qN[t])(e,o.formatLong)}return e})).join("").match(eM).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:sM(e)};if($N[t])return{isToken:!0,value:e};if(t.match(oM))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}}));o.localize.preprocessor&&(l=o.localize.preprocessor(a,l));const c={firstWeekContainsDate:i,weekStartsOn:s,locale:o};return l.map((r=>{if(!r.isToken)return r.value;const i=r.value;(!n?.useAdditionalWeekYearTokens&&function(e){return XN.test(e)}(i)||!n?.useAdditionalDayOfYearTokens&&function(e){return YN.test(e)}(i))&&function(e,t,n){const r=function(e,t,n){const r="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,n);if(console.warn(r),ZN.includes(e))throw new RangeError(r)}(i,t,String(e));return(0,$N[i[0]])(a,i,o.localize,c)})).join("")}function sM(e){const t=e.match(nM);return t?t[1].replace(rM,"'"):e}function aM(e,t){const n=rN(e),r=rN(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function lM(e,t){return+rN(e)==+rN(t)}function cM(e,t){return+oN(e)==+oN(t)}function uM(e,t){const n=rN(e);return isNaN(t)?iN(e,NaN):t?(n.setDate(n.getDate()+t),n):n}function dM(e,t){return uM(e,7*t)}function pM(e,t){return dM(e,-t)}function fM(e,t){const n=xN(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=rN(e),i=o.getDay(),s=6+(i<r?-7:0)-(i-r);return o.setDate(o.getDate()+s),o.setHours(23,59,59,999),o}const hM=(0,wt.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wt.jsx)(n.Path,{d:"m14.5 6.5-1 1 3.7 3.7H4v1.6h13.2l-3.7 3.7 1 1 5.6-5.5z"})}),mM=(0,wt.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wt.jsx)(n.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"})}),gM=window.wp.date;function vM(e,t){const n=rN(e),r=rN(t);return n.getTime()>r.getTime()}function bM(e,t){return+rN(e)<+rN(t)}function xM(e){const t=rN(e),n=t.getFullYear(),r=t.getMonth(),o=iN(e,0);return o.setFullYear(n,r+1,0),o.setHours(0,0,0,0),o.getDate()}function yM(e,t){const n=rN(e),r=n.getFullYear(),o=n.getDate(),i=iN(e,0);i.setFullYear(r,t,15),i.setHours(0,0,0,0);const s=xM(i);return n.setMonth(t,Math.min(o,s)),n}function wM(e,t){let n=rN(e);return isNaN(+n)?iN(e,NaN):(null!=t.year&&n.setFullYear(t.year),null!=t.month&&(n=yM(n,t.month)),null!=t.date&&n.setDate(t.date),null!=t.hours&&n.setHours(t.hours),null!=t.minutes&&n.setMinutes(t.minutes),null!=t.seconds&&n.setSeconds(t.seconds),null!=t.milliseconds&&n.setMilliseconds(t.milliseconds),n)}function _M(){return oN(Date.now())}function SM(e,t){const n=rN(e);return isNaN(+n)?iN(e,NaN):(n.setFullYear(t),n)}function CM(e,t){return sN(e,12*t)}function kM(e,t){return CM(e,-t)}function jM(e,t){const n=rN(e.start),r=rN(e.end);let o=+n>+r;const i=o?+n:+r,s=o?r:n;s.setHours(0,0,0,0);let a=t?.step??1;if(!a)return[];a<0&&(a=-a,o=!o);const l=[];for(;+s<=i;)l.push(rN(s)),s.setDate(s.getDate()+a),s.setHours(0,0,0,0);return o?l.reverse():l}function EM(e,t){const n=rN(e.start),r=rN(e.end);let o=+n>+r;const i=o?+n:+r,s=o?r:n;s.setHours(0,0,0,0),s.setDate(1);let a=t?.step??1;if(!a)return[];a<0&&(a=-a,o=!o);const l=[];for(;+s<=i;)l.push(rN(s)),s.setMonth(s.getMonth()+a);return o?l.reverse():l}function PM(e){const t=rN(e);return t.setDate(1),t.setHours(0,0,0,0),t}function TM(e){const t=rN(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function RM(e,t){const n=rN(e.start),r=rN(e.end);let o=+n>+r;const i=jN(o?r:n,t),s=jN(o?n:r,t);i.setHours(15),s.setHours(15);const a=+s.getTime();let l=i,c=t?.step??1;if(!c)return[];c<0&&(c=-c,o=!o);const u=[];for(;+l<=a;)l.setHours(0),u.push(rN(l)),l=dM(l,c),l.setHours(15);return o?u.reverse():u}let IM=function(e){return e[e.SUNDAY=0]="SUNDAY",e[e.MONDAY=1]="MONDAY",e[e.TUESDAY=2]="TUESDAY",e[e.WEDNESDAY=3]="WEDNESDAY",e[e.THURSDAY=4]="THURSDAY",e[e.FRIDAY=5]="FRIDAY",e[e.SATURDAY=6]="SATURDAY",e}({});const NM=(e,t,n)=>(lM(e,t)||vM(e,t))&&(lM(e,n)||bM(e,n)),MM=e=>wM(e,{hours:0,minutes:0,seconds:0,milliseconds:0}),AM=cl("div",{target:"e105ri6r5"})(Bx,";"),DM=cl(yy,{target:"e105ri6r4"})("margin-bottom:",wl(4),";"),OM=cl(Tk,{target:"e105ri6r3"})("font-size:",Tl.fontSize,";font-weight:",Tl.fontWeight,";strong{font-weight:",Tl.fontWeightHeading,";}"),zM=cl("div",{target:"e105ri6r2"})("column-gap:",wl(2),";display:grid;grid-template-columns:0.5fr repeat( 5, 1fr ) 0.5fr;justify-items:center;row-gap:",wl(2),";"),LM=cl("div",{target:"e105ri6r1"})("color:",jl.theme.gray[700],";font-size:",Tl.fontSize,";line-height:",Tl.fontLineHeightBase,";&:nth-of-type( 1 ){justify-self:start;}&:nth-of-type( 7 ){justify-self:end;}"),FM=cl(sy,{shouldForwardProp:e=>!["column","isSelected","isToday","hasEvents"].includes(e),target:"e105ri6r0"})("grid-column:",(e=>e.column),";position:relative;justify-content:center;",(e=>1===e.column&&"\n\t\tjustify-self: start;\n\t\t")," ",(e=>7===e.column&&"\n\t\tjustify-self: end;\n\t\t")," ",(e=>e.disabled&&"\n\t\tpointer-events: none;\n\t\t")," &&&{border-radius:",Tl.radiusRound,";height:",wl(7),";width:",wl(7),";",(e=>e.isSelected&&`\n\t\t\t\tbackground: ${jl.theme.accent};\n\n\t\t\t\t&,\n\t\t\t\t&:hover:not(:disabled, [aria-disabled=true]) {\n\t\t\t\t\tcolor: ${jl.theme.accentInverted};\n\t\t\t\t}\n\n\t\t\t\t&:focus:not(:disabled),\n\t\t\t\t&:focus:not(:disabled) {\n\t\t\t\t\tborder: ${Tl.borderWidthFocus} solid currentColor;\n\t\t\t\t}\n\n\t\t\t\t/* Highlight the selected day for high-contrast mode */\n\t\t\t\t&::after {\n\t\t\t\t\tcontent: '';\n\t\t\t\t\tposition: absolute;\n\t\t\t\t\tpointer-events: none;\n\t\t\t\t\tinset: 0;\n\t\t\t\t\tborder-radius: inherit;\n\t\t\t\t\tborder: 1px solid transparent;\n\t\t\t\t}\n\t\t\t`)," ",(e=>!e.isSelected&&e.isToday&&`\n\t\t\tbackground: ${jl.theme.gray[200]};\n\t\t\t`),";}",(e=>e.hasEvents&&`\n\t\t::before {\n\t\t\tborder: 2px solid ${e.isSelected?jl.theme.accentInverted:jl.theme.accent};\n\t\t\tborder-radius: ${Tl.radiusRound};\n\t\t\tcontent: " ";\n\t\t\tleft: 50%;\n\t\t\tposition: absolute;\n\t\t\ttransform: translate(-50%, 9px);\n\t\t}\n\t\t`),";");function BM(e){return"string"==typeof e?new Date(e):rN(e)}function VM(e,t){return t?(e%12+12)%24:e%12}function $M(e){return(t,n)=>{const r={...t};return n.type!==Sx&&n.type!==Ix&&n.type!==Tx||void 0!==r.value&&(r.value=r.value.toString().padStart(e,"0")),r}}function HM(e){var t;const n=null!==(t=e.target?.ownerDocument.defaultView?.HTMLInputElement)&&void 0!==t?t:HTMLInputElement;return e.target instanceof n&&e.target.validity.valid}const WM="yyyy-MM-dd'T'HH:mm:ss";function UM({day:e,column:t,isSelected:n,isFocusable:r,isFocusAllowed:o,isToday:i,isInvalid:s,numEvents:a,onClick:l,onKeyDown:u}){const d=(0,c.useRef)();return(0,c.useEffect)((()=>{d.current&&r&&o&&d.current.focus()}),[r]),(0,wt.jsx)(FM,{ref:d,className:"components-datetime__date__day",disabled:s,tabIndex:r?0:-1,"aria-label":GM(e,n,a),column:t,isSelected:n,isToday:i,hasEvents:a>0,onClick:l,onKeyDown:u,children:(0,gM.dateI18n)("j",e,-e.getTimezoneOffset())})}function GM(e,t,n){const{formats:r}=(0,gM.getSettings)(),o=(0,gM.dateI18n)(r.date,e,-e.getTimezoneOffset());return t&&n>0?(0,a.sprintf)((0,a._n)("%1$s. Selected. There is %2$d event","%1$s. Selected. There are %2$d events",n),o,n):t?(0,a.sprintf)((0,a.__)("%1$s. Selected"),o):n>0?(0,a.sprintf)((0,a._n)("%1$s. There is %2$d event","%1$s. There are %2$d events",n),o,n):o}const KM=function({currentDate:e,onChange:t,events:n=[],isInvalidDate:r,onMonthPreviewed:o,startOfWeek:i=0}){const s=e?BM(e):new Date,{calendar:l,viewing:u,setSelected:d,setViewing:p,isSelected:f,viewPreviousMonth:h,viewNextMonth:m}=(({weekStartsOn:e=IM.SUNDAY,viewing:t=new Date,selected:n=[],numberOfMonths:r=1}={})=>{const[o,i]=(0,c.useState)(t),s=(0,c.useCallback)((()=>i(_M())),[i]),a=(0,c.useCallback)((e=>i((t=>yM(t,e)))),[]),l=(0,c.useCallback)((()=>i((e=>aN(e,1)))),[]),u=(0,c.useCallback)((()=>i((e=>sN(e,1)))),[]),d=(0,c.useCallback)((e=>i((t=>SM(t,e)))),[]),p=(0,c.useCallback)((()=>i((e=>kM(e,1)))),[]),f=(0,c.useCallback)((()=>i((e=>CM(e,1)))),[]),[h,m]=(0,c.useState)(n.map(MM)),g=(0,c.useCallback)((e=>h.findIndex((t=>lM(t,e)))>-1),[h]),v=(0,c.useCallback)(((e,t)=>{m(t?Array.isArray(e)?e:[e]:t=>t.concat(Array.isArray(e)?e:[e]))}),[]),b=(0,c.useCallback)((e=>m((t=>Array.isArray(e)?t.filter((t=>!e.map((e=>e.getTime())).includes(t.getTime()))):t.filter((t=>!lM(t,e)))))),[]),x=(0,c.useCallback)(((e,t)=>g(e)?b(e):v(e,t)),[b,g,v]),y=(0,c.useCallback)(((e,t,n)=>{m(n?jM({start:e,end:t}):n=>n.concat(jM({start:e,end:t})))}),[]),w=(0,c.useCallback)(((e,t)=>{m((n=>n.filter((n=>!jM({start:e,end:t}).map((e=>e.getTime())).includes(n.getTime())))))}),[]),_=(0,c.useMemo)((()=>EM({start:PM(o),end:TM(sN(o,r-1))}).map((t=>RM({start:PM(t),end:TM(t)},{weekStartsOn:e}).map((t=>jM({start:jN(t,{weekStartsOn:e}),end:fM(t,{weekStartsOn:e})})))))),[o,e,r]);return{clearTime:MM,inRange:NM,viewing:o,setViewing:i,viewToday:s,viewMonth:a,viewPreviousMonth:l,viewNextMonth:u,viewYear:d,viewPreviousYear:p,viewNextYear:f,selected:h,setSelected:m,clearSelected:()=>m([]),isSelected:g,select:v,deselect:b,toggle:x,selectRange:y,deselectRange:w,calendar:_}})({selected:[oN(s)],viewing:oN(s),weekStartsOn:i}),[g,v]=(0,c.useState)(oN(s)),[b,x]=(0,c.useState)(!1),[y,w]=(0,c.useState)(e);return e!==y&&(w(e),d([oN(s)]),p(oN(s)),v(oN(s))),(0,wt.jsxs)(AM,{className:"components-datetime__date",role:"application","aria-label":(0,a.__)("Calendar"),children:[(0,wt.jsxs)(DM,{children:[(0,wt.jsx)(sy,{icon:(0,a.isRTL)()?hM:mM,variant:"tertiary","aria-label":(0,a.__)("View previous month"),onClick:()=>{h(),v(aN(g,1)),o?.(iM(aN(u,1),WM))},size:"compact"}),(0,wt.jsxs)(OM,{level:3,children:[(0,wt.jsx)("strong",{children:(0,gM.dateI18n)("F",u,-u.getTimezoneOffset())})," ",(0,gM.dateI18n)("Y",u,-u.getTimezoneOffset())]}),(0,wt.jsx)(sy,{icon:(0,a.isRTL)()?mM:hM,variant:"tertiary","aria-label":(0,a.__)("View next month"),onClick:()=>{m(),v(sN(g,1)),o?.(iM(sN(u,1),WM))},size:"compact"})]}),(0,wt.jsxs)(zM,{onFocus:()=>x(!0),onBlur:()=>x(!1),children:[l[0][0].map((e=>(0,wt.jsx)(LM,{children:(0,gM.dateI18n)("D",e,-e.getTimezoneOffset())},e.toString()))),l[0].map((e=>e.map(((e,i)=>aM(e,u)?(0,wt.jsx)(UM,{day:e,column:i+1,isSelected:f(e),isFocusable:lM(e,g),isFocusAllowed:b,isToday:cM(e,new Date),isInvalid:!!r&&r(e),numEvents:n.filter((t=>cM(t.date,e))).length,onClick:()=>{d([e]),v(e),t?.(iM(new Date(e.getFullYear(),e.getMonth(),e.getDate(),s.getHours(),s.getMinutes(),s.getSeconds(),s.getMilliseconds()),WM))},onKeyDown:t=>{let n;"ArrowLeft"===t.key&&(n=uM(e,(0,a.isRTL)()?1:-1)),"ArrowRight"===t.key&&(n=uM(e,(0,a.isRTL)()?-1:1)),"ArrowUp"===t.key&&(n=pM(e,1)),"ArrowDown"===t.key&&(n=dM(e,1)),"PageUp"===t.key&&(n=aN(e,1)),"PageDown"===t.key&&(n=sN(e,1)),"Home"===t.key&&(n=jN(e)),"End"===t.key&&(n=oN(fM(e))),n&&(t.preventDefault(),v(n),aM(n,u)||(p(n),o?.(iM(n,WM))))}},e.toString()):null))))]})]})};function qM(e){const t=rN(e);return t.setSeconds(0,0),t}const YM=cl("div",{target:"evcr2319"})("box-sizing:border-box;font-size:",Tl.fontSize,";"),XM=cl("fieldset",{target:"evcr2318"})("border:0;margin:0 0 ",wl(4)," 0;padding:0;&:last-child{margin-bottom:0;}"),ZM=cl("div",{target:"evcr2317"})({name:"pd0mhc",styles:"direction:ltr;display:flex"}),QM=bl("&&& ",fb,"{padding-left:",wl(2),";padding-right:",wl(2),";text-align:center;}",""),JM=cl(Sy,{target:"evcr2316"})(QM," width:",wl(9),";&&& ",fb,"{padding-right:0;}&&& ",tb,"{border-right:0;border-top-right-radius:0;border-bottom-right-radius:0;}"),eA=cl("span",{target:"evcr2315"})("border-top:",Tl.borderWidth," solid ",jl.gray[700],";border-bottom:",Tl.borderWidth," solid ",jl.gray[700],";font-size:",Tl.fontSize,";line-height:calc(\n\t\t",Tl.controlHeight," - ",Tl.borderWidth," * 2\n\t);display:inline-block;"),tA=cl(Sy,{target:"evcr2314"})(QM," width:",wl(9),";&&& ",fb,"{padding-left:0;}&&& ",tb,"{border-left:0;border-top-left-radius:0;border-bottom-left-radius:0;}"),nA=cl("div",{target:"evcr2313"})({name:"1ff36h2",styles:"flex-grow:1"}),rA=cl(Sy,{target:"evcr2312"})(QM," width:",wl(9),";"),oA=cl(Sy,{target:"evcr2311"})(QM," width:",wl(14),";"),iA=cl("div",{target:"evcr2310"})({name:"ebu3jh",styles:"text-decoration:underline dotted"}),sA=()=>{const{timezone:e}=(0,gM.getSettings)(),t=(new Date).getTimezoneOffset()/60*-1;if(Number(e.offset)===t)return null;const n=Number(e.offset)>=0?"+":"",r=""!==e.abbr&&isNaN(Number(e.abbr))?e.abbr:`UTC${n}${e.offsetFormatted}`,o=e.string.replace("_"," "),i="UTC"===e.string?(0,a.__)("Coordinated Universal Time"):`(${r}) ${o}`;return 0===o.trim().length?(0,wt.jsx)(iA,{className:"components-datetime__timezone",children:r}):(0,wt.jsx)(Yi,{placement:"top",text:i,children:(0,wt.jsx)(iA,{className:"components-datetime__timezone",children:r})})};const aA=(0,c.forwardRef)((function(e,t){const{label:n,...r}=e,o=r["aria-label"]||n;return(0,wt.jsx)(K_,{...r,"aria-label":o,ref:t,children:n})}));function lA({value:e,defaultValue:t,is12Hour:n,label:r,minutesProps:o,onChange:i}){const[l={hours:(new Date).getHours(),minutes:(new Date).getMinutes()},u]=E_({value:e,onChange:i,defaultValue:t}),d=l.hours<12?"AM":"PM";const p=l.hours%12||12;const f=e=>(t,{event:r})=>{if(!HM(r))return;const o=Number(t);u({...l,[e]:"hours"===e&&n?VM(o,"PM"===d):o})};const h=r?XM:c.Fragment;return(0,wt.jsxs)(h,{children:[r&&(0,wt.jsx)(Qx.VisualLabel,{as:"legend",children:r}),(0,wt.jsxs)(yy,{alignment:"left",expanded:!1,children:[(0,wt.jsxs)(ZM,{className:"components-datetime__time-field components-datetime__time-field-time",children:[(0,wt.jsx)(JM,{className:"components-datetime__time-field-hours-input",label:(0,a.__)("Hours"),hideLabelFromVision:!0,__next40pxDefaultSize:!0,value:String(n?p:l.hours).padStart(2,"0"),step:1,min:n?1:0,max:n?12:23,required:!0,spinControls:"none",isPressEnterToChange:!0,isDragEnabled:!1,isShiftStepEnabled:!1,onChange:f("hours"),__unstableStateReducer:$M(2)}),(0,wt.jsx)(eA,{className:"components-datetime__time-separator","aria-hidden":"true",children:":"}),(0,wt.jsx)(tA,{className:s("components-datetime__time-field-minutes-input",o?.className),label:(0,a.__)("Minutes"),hideLabelFromVision:!0,__next40pxDefaultSize:!0,value:String(l.minutes).padStart(2,"0"),step:1,min:0,max:59,required:!0,spinControls:"none",isPressEnterToChange:!0,isDragEnabled:!1,isShiftStepEnabled:!1,onChange:(...e)=>{f("minutes")(...e),o?.onChange?.(...e)},__unstableStateReducer:$M(2),...o})]}),n&&(0,wt.jsxs)(R_,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,label:(0,a.__)("Select AM or PM"),hideLabelFromVision:!0,value:d,onChange:e=>{var t;(t=e,()=>{d!==t&&u({...l,hours:VM(p,"PM"===t)})})()},children:[(0,wt.jsx)(aA,{value:"AM",label:(0,a.__)("AM")}),(0,wt.jsx)(aA,{value:"PM",label:(0,a.__)("PM")})]})]})]})}const cA=["dmy","mdy","ymd"];function uA({is12Hour:e,currentTime:t,onChange:n,dateOrder:r,hideLabelFromVision:o=!1}){const[i,s]=(0,c.useState)((()=>t?qM(BM(t)):new Date));(0,c.useEffect)((()=>{s(t?qM(BM(t)):new Date)}),[t]);const l=[{value:"01",label:(0,a.__)("January")},{value:"02",label:(0,a.__)("February")},{value:"03",label:(0,a.__)("March")},{value:"04",label:(0,a.__)("April")},{value:"05",label:(0,a.__)("May")},{value:"06",label:(0,a.__)("June")},{value:"07",label:(0,a.__)("July")},{value:"08",label:(0,a.__)("August")},{value:"09",label:(0,a.__)("September")},{value:"10",label:(0,a.__)("October")},{value:"11",label:(0,a.__)("November")},{value:"12",label:(0,a.__)("December")}],{day:u,month:d,year:p,minutes:f,hours:h}=(0,c.useMemo)((()=>({day:iM(i,"dd"),month:iM(i,"MM"),year:iM(i,"yyyy"),minutes:iM(i,"mm"),hours:iM(i,"HH"),am:iM(i,"a")})),[i]),m=e=>(t,{event:r})=>{if(!HM(r))return;const o=Number(t),a=wM(i,{[e]:o});s(a),n?.(iM(a,WM))},g=(0,wt.jsx)(rA,{className:"components-datetime__time-field components-datetime__time-field-day",label:(0,a.__)("Day"),hideLabelFromVision:!0,__next40pxDefaultSize:!0,value:u,step:1,min:1,max:31,required:!0,spinControls:"none",isPressEnterToChange:!0,isDragEnabled:!1,isShiftStepEnabled:!1,onChange:m("date")},"day"),v=(0,wt.jsx)(nA,{children:(0,wt.jsx)(_S,{className:"components-datetime__time-field components-datetime__time-field-month",label:(0,a.__)("Month"),hideLabelFromVision:!0,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:d,options:l,onChange:e=>{const t=yM(i,Number(e)-1);s(t),n?.(iM(t,WM))}})},"month"),b=(0,wt.jsx)(oA,{className:"components-datetime__time-field components-datetime__time-field-year",label:(0,a.__)("Year"),hideLabelFromVision:!0,__next40pxDefaultSize:!0,value:p,step:1,min:1,max:9999,required:!0,spinControls:"none",isPressEnterToChange:!0,isDragEnabled:!1,isShiftStepEnabled:!1,onChange:m("year"),__unstableStateReducer:$M(4)},"year"),x=e?"mdy":"dmy",y=(r&&cA.includes(r)?r:x).split("").map((e=>{switch(e){case"d":return g;case"m":return v;case"y":return b;default:return null}}));return(0,wt.jsxs)(YM,{className:"components-datetime__time",children:[(0,wt.jsxs)(XM,{children:[o?(0,wt.jsx)(pl,{as:"legend",children:(0,a.__)("Time")}):(0,wt.jsx)(Qx.VisualLabel,{as:"legend",className:"components-datetime__time-legend",children:(0,a.__)("Time")}),(0,wt.jsxs)(yy,{className:"components-datetime__time-wrapper",children:[(0,wt.jsx)(lA,{value:{hours:Number(h),minutes:Number(f)},is12Hour:e,onChange:({hours:e,minutes:t})=>{const r=wM(i,{hours:e,minutes:t});s(r),n?.(iM(r,WM))}}),(0,wt.jsx)(Hg,{}),(0,wt.jsx)(sA,{})]})]}),(0,wt.jsxs)(XM,{children:[o?(0,wt.jsx)(pl,{as:"legend",children:(0,a.__)("Date")}):(0,wt.jsx)(Qx.VisualLabel,{as:"legend",className:"components-datetime__time-legend",children:(0,a.__)("Date")}),(0,wt.jsx)(yy,{className:"components-datetime__time-wrapper",children:y})]})]})}uA.TimeInput=lA,Object.assign(uA.TimeInput,{displayName:"TimePicker.TimeInput"});const dA=uA;const pA=cl(jk,{target:"e1p5onf00"})({name:"1khn195",styles:"box-sizing:border-box"}),fA=()=>{};const hA=(0,c.forwardRef)((function({currentDate:e,is12Hour:t,dateOrder:n,isInvalidDate:r,onMonthPreviewed:o=fA,onChange:i,events:s,startOfWeek:a},l){return(0,wt.jsx)(pA,{ref:l,className:"components-datetime",spacing:4,children:(0,wt.jsxs)(wt.Fragment,{children:[(0,wt.jsx)(dA,{currentTime:e,onChange:i,is12Hour:t,dateOrder:n}),(0,wt.jsx)(KM,{currentDate:e,onChange:i,isInvalidDate:r,events:s,onMonthPreviewed:o,startOfWeek:a})]})})})),mA=hA,gA=[{name:(0,a._x)("None","Size of a UI element"),slug:"none"},{name:(0,a._x)("Small","Size of a UI element"),slug:"small"},{name:(0,a._x)("Medium","Size of a UI element"),slug:"medium"},{name:(0,a._x)("Large","Size of a UI element"),slug:"large"},{name:(0,a._x)("Extra Large","Size of a UI element"),slug:"xlarge"}],vA={BaseControl:{_overrides:{__associatedWPComponentName:"DimensionControl"}}};const bA=function(e){const{__next40pxDefaultSize:t=!1,__nextHasNoMarginBottom:n=!1,label:r,value:o,sizes:i=gA,icon:l,onChange:c,className:u=""}=e;Fi()("wp.components.DimensionControl",{since:"6.7",version:"7.0"});const d=(0,wt.jsxs)(wt.Fragment,{children:[l&&(0,wt.jsx)(ry,{icon:l}),r]});return(0,wt.jsx)(is,{value:vA,children:(0,wt.jsx)(_S,{__next40pxDefaultSize:t,__nextHasNoMarginBottom:n,className:s(u,"block-editor-dimension-control"),label:d,hideLabelFromVision:!1,value:o,onChange:e=>{const t=((e,t)=>e.find((e=>t===e.slug)))(i,e);t&&o!==t.slug?"function"==typeof c&&c(t.slug):c?.(void 0)},options:(e=>{const t=e.map((({name:e,slug:t})=>({label:e,value:t})));return[{label:(0,a.__)("Default"),value:""},...t]})(i)})})};const xA={name:"u2jump",styles:"position:relative;pointer-events:none;&::after{content:'';position:absolute;top:0;right:0;bottom:0;left:0;}*{pointer-events:none;}"},yA=(0,c.createContext)(!1),{Consumer:wA,Provider:_A}=yA;function SA({className:e,children:t,isDisabled:n=!0,...r}){const o=qa();return(0,wt.jsx)(_A,{value:n,children:(0,wt.jsx)("div",{inert:n?"true":void 0,className:n?o(xA,e,"components-disabled"):void 0,...r,children:t})})}SA.Context=yA,SA.Consumer=wA;const CA=SA,kA=(0,c.forwardRef)((({visible:e,children:t,...n},r)=>{const o=Ln({open:e});return(0,wt.jsx)($r,{store:o,ref:r,...n,children:t})})),jA="is-dragging-components-draggable";const EA=function({children:e,onDragStart:t,onDragOver:n,onDragEnd:r,appendToOwnerDocument:o=!1,cloneClassname:i,elementId:s,transferData:a,__experimentalTransferDataType:u="text",__experimentalDragComponent:d}){const p=(0,c.useRef)(null),f=(0,c.useRef)((()=>{}));return(0,c.useEffect)((()=>()=>{f.current()}),[]),(0,wt.jsxs)(wt.Fragment,{children:[e({onDraggableStart:function(e){const{ownerDocument:r}=e.target;e.dataTransfer.setData(u,JSON.stringify(a));const c=r.createElement("div");c.style.top="0",c.style.left="0";const d=r.createElement("div");"function"==typeof e.dataTransfer.setDragImage&&(d.classList.add("components-draggable__invisible-drag-image"),r.body.appendChild(d),e.dataTransfer.setDragImage(d,0,0)),c.classList.add("components-draggable__clone"),i&&c.classList.add(i);let h=0,m=0;if(p.current){h=e.clientX,m=e.clientY,c.style.transform=`translate( ${h}px, ${m}px )`;const t=r.createElement("div");t.innerHTML=p.current.innerHTML,c.appendChild(t),r.body.appendChild(c)}else{const e=r.getElementById(s),t=e.getBoundingClientRect(),n=e.parentNode,i=t.top,a=t.left;c.style.width=`${t.width+0}px`;const l=e.cloneNode(!0);l.id=`clone-${s}`,h=a-0,m=i-0,c.style.transform=`translate( ${h}px, ${m}px )`,Array.from(l.querySelectorAll("iframe")).forEach((e=>e.parentNode?.removeChild(e))),c.appendChild(l),o?r.body.appendChild(c):n?.appendChild(c)}let g=e.clientX,v=e.clientY;const b=(0,l.throttle)((function(e){if(g===e.clientX&&v===e.clientY)return;const t=h+e.clientX-g,r=m+e.clientY-v;c.style.transform=`translate( ${t}px, ${r}px )`,g=e.clientX,v=e.clientY,h=t,m=r,n&&n(e)}),16);r.addEventListener("dragover",b),r.body.classList.add(jA),t&&t(e),f.current=()=>{c&&c.parentNode&&c.parentNode.removeChild(c),d&&d.parentNode&&d.parentNode.removeChild(d),r.body.classList.remove(jA),r.removeEventListener("dragover",b)}},onDraggableEnd:function(e){e.preventDefault(),f.current(),r&&r(e)}}),d&&(0,wt.jsx)("div",{className:"components-draggable-drag-component-root",style:{display:"none"},ref:p,children:d})]})},PA=(0,wt.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wt.jsx)(n.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"})});const TA=function({className:e,label:t,onFilesDrop:n,onHTMLDrop:r,onDrop:o,...i}){const[u,d]=(0,c.useState)(),[p,f]=(0,c.useState)(),[h,m]=(0,c.useState)(),g=(0,l.__experimentalUseDropZone)({onDrop(e){const t=e.dataTransfer?(0,DT.getFilesFromDataTransfer)(e.dataTransfer):[],i=e.dataTransfer?.getData("text/html");i&&r?r(i):t.length&&n?n(t):o&&o(e)},onDragStart(e){d(!0);let t="default";e.dataTransfer?.types.includes("text/html")?t="html":(e.dataTransfer?.types.includes("Files")||(e.dataTransfer?(0,DT.getFilesFromDataTransfer)(e.dataTransfer):[]).length>0)&&(t="file"),m(t)},onDragEnd(){f(!1),d(!1),m(void 0)},onDragEnter(){f(!0)},onDragLeave(){f(!1)}}),v=s("components-drop-zone",e,{"is-active":(u||p)&&("file"===h&&n||"html"===h&&r||"default"===h&&o),"is-dragging-over-document":u,"is-dragging-over-element":p,[`is-dragging-${h}`]:!!h});return(0,wt.jsx)("div",{...i,ref:g,className:v,children:(0,wt.jsx)("div",{className:"components-drop-zone__content",children:(0,wt.jsxs)("div",{className:"components-drop-zone__content-inner",children:[(0,wt.jsx)(vS,{icon:PA,className:"components-drop-zone__content-icon"}),(0,wt.jsx)("span",{className:"components-drop-zone__content-text",children:t||(0,a.__)("Drop files to upload")})]})})})};function RA({children:e}){return Fi()("wp.components.DropZoneProvider",{since:"5.8",hint:"wp.component.DropZone no longer needs a provider. wp.components.DropZoneProvider is safe to remove from your code."}),e}const IA=(0,wt.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wt.jsx)(n.Path,{d:"M5 17.7c.4.5.8.9 1.2 1.2l1.1-1.4c-.4-.3-.7-.6-1-1L5 17.7zM5 6.3l1.4 1.1c.3-.4.6-.7 1-1L6.3 5c-.5.4-.9.8-1.3 1.3zm.1 7.8l-1.7.5c.2.6.4 1.1.7 1.6l1.5-.8c-.2-.4-.4-.8-.5-1.3zM4.8 12v-.7L3 11.1v1.8l1.7-.2c.1-.2.1-.5.1-.7zm3 7.9c.5.3 1.1.5 1.6.7l.5-1.7c-.5-.1-.9-.3-1.3-.5l-.8 1.5zM19 6.3c-.4-.5-.8-.9-1.2-1.2l-1.1 1.4c.4.3.7.6 1 1L19 6.3zm-.1 3.6l1.7-.5c-.2-.6-.4-1.1-.7-1.6l-1.5.8c.2.4.4.8.5 1.3zM5.6 8.6l-1.5-.8c-.3.5-.5 1-.7 1.6l1.7.5c.1-.5.3-.9.5-1.3zm2.2-4.5l.8 1.5c.4-.2.8-.4 1.3-.5l-.5-1.7c-.6.2-1.1.4-1.6.7zm8.8 13.5l1.1 1.4c.5-.4.9-.8 1.2-1.2l-1.4-1.1c-.2.3-.5.6-.9.9zm1.8-2.2l1.5.8c.3-.5.5-1.1.7-1.6l-1.7-.5c-.1.5-.3.9-.5 1.3zm2.6-4.3l-1.7.2v1.4l1.7.2V12v-.9zM11.1 3l.2 1.7h1.4l.2-1.7h-1.8zm3 2.1c.5.1.9.3 1.3.5l.8-1.5c-.5-.3-1.1-.5-1.6-.7l-.5 1.7zM12 19.2h-.7l-.2 1.8h1.8l-.2-1.7c-.2-.1-.5-.1-.7-.1zm2.1-.3l.5 1.7c.6-.2 1.1-.4 1.6-.7l-.8-1.5c-.4.2-.8.4-1.3.5z"})});function NA(e=[],t="90deg"){const n=100/e.length,r=e.map(((e,t)=>`${e} ${t*n}%, ${e} ${(t+1)*n}%`)).join(", ");return`linear-gradient( ${t}, ${r} )`}Tv([Rv]);const MA=function({values:e}){return e?(0,wt.jsx)(Q_,{colorValue:NA(e,"135deg")}):(0,wt.jsx)(ry,{icon:IA})};function AA({label:e,value:t,colors:n,disableCustomColors:r,enableAlpha:o,onChange:i}){const[s,u]=(0,c.useState)(!1),d=(0,l.useInstanceId)(AA,"color-list-picker-option"),p=`${d}__label`,f=`${d}__content`;return(0,wt.jsxs)(wt.Fragment,{children:[(0,wt.jsx)(sy,{className:"components-color-list-picker__swatch-button",onClick:()=>u((e=>!e)),"aria-expanded":s,"aria-controls":f,children:(0,wt.jsxs)(yy,{justify:"flex-start",spacing:2,children:[t?(0,wt.jsx)(Q_,{colorValue:t,className:"components-color-list-picker__swatch-color"}):(0,wt.jsx)(ry,{icon:IA}),(0,wt.jsx)("span",{id:p,children:e})]})}),(0,wt.jsx)("div",{role:"group",id:f,"aria-labelledby":p,"aria-hidden":!s,children:s&&(0,wt.jsx)(Bk,{"aria-label":(0,a.__)("Color options"),className:"components-color-list-picker__color-picker",colors:n,value:t,clearable:!1,onChange:i,disableCustomColors:r,enableAlpha:o})})]})}const DA=function({colors:e,labels:t,value:n=[],disableCustomColors:r,enableAlpha:o,onChange:i}){return(0,wt.jsx)("div",{className:"components-color-list-picker",children:t.map(((t,s)=>(0,wt.jsx)(AA,{label:t,value:n[s],colors:e,disableCustomColors:r,enableAlpha:o,onChange:e=>{const t=n.slice();t[s]=e,i(t)}},s)))})},OA=["#333","#CCC"];function zA({value:e,onChange:t}){const n=!!e,r=n?e:OA,o=NA(r),i=(s=r).map(((e,t)=>({position:100*t/(s.length-1),color:e})));var s;return(0,wt.jsx)(hT,{disableInserter:!0,background:o,hasGradient:n,value:i,onChange:e=>{const n=function(e=[]){return e.map((({color:e})=>e))}(e);t(n)}})}const LA=function({asButtons:e,loop:t,clearable:n=!0,unsetable:r=!0,colorPalette:o,duotonePalette:i,disableCustomColors:s,disableCustomDuotone:l,value:u,onChange:d,"aria-label":p,"aria-labelledby":f,...h}){const[m,g]=(0,c.useMemo)((()=>{return!(e=o)||e.length<2?["#000","#fff"]:e.map((({color:e})=>({color:e,brightness:Ev(e).brightness()}))).reduce((([e,t],n)=>[n.brightness<=e.brightness?n:e,n.brightness>=t.brightness?n:t]),[{brightness:1,color:""},{brightness:0,color:""}]).map((({color:e})=>e));var e}),[o]),v="unset"===u,b=(0,a.__)("Unset"),x=(0,wt.jsx)(kk.Option,{value:"unset",isSelected:v,tooltipText:b,"aria-label":b,className:"components-duotone-picker__color-indicator",onClick:()=>{d(v?void 0:"unset")}},"unset"),y=i.map((({colors:e,slug:t,name:n})=>{const r={background:NA(e,"135deg"),color:"transparent"},o=null!=n?n:(0,a.sprintf)((0,a.__)("Duotone code: %s"),t),i=n?(0,a.sprintf)((0,a.__)("Duotone: %s"),n):o,s=Ji()(e,u);return(0,wt.jsx)(kk.Option,{value:e,isSelected:s,"aria-label":i,tooltipText:o,style:r,onClick:()=>{d(s?void 0:e)}},t)}));let w;if(e)w={asButtons:!0};else{const e={asButtons:!1,loop:t};w=p?{...e,"aria-label":p}:f?{...e,"aria-labelledby":f}:{...e,"aria-label":(0,a.__)("Custom color picker.")}}const _=r?[x,...y]:y;return(0,wt.jsx)(kk,{...h,...w,options:_,actions:!!n&&(0,wt.jsx)(kk.ButtonAction,{onClick:()=>d(void 0),children:(0,a.__)("Clear")}),children:(0,wt.jsx)(Hg,{paddingTop:0===_.length?0:4,children:(0,wt.jsxs)(jk,{spacing:3,children:[!s&&!l&&(0,wt.jsx)(zA,{value:v?void 0:u,onChange:d}),!l&&(0,wt.jsx)(DA,{labels:[(0,a.__)("Shadows"),(0,a.__)("Highlights")],colors:o,value:v?void 0:u,disableCustomColors:s,enableAlpha:!0,onChange:e=>{e[0]||(e[0]=m),e[1]||(e[1]=g);const t=e.length>=2?e:void 0;d(t)}})]})})})};const FA=(0,c.forwardRef)((function(e,t){const{href:n,children:r,className:o,rel:i="",...l}=e,c=[...new Set([...i.split(" "),"external","noreferrer","noopener"].filter(Boolean))].join(" "),u=s("components-external-link",o),d=!!n?.startsWith("#");return(0,wt.jsxs)("a",{...l,className:u,href:n,onClick:t=>{d&&t.preventDefault(),e.onClick&&e.onClick(t)},target:"_blank",rel:c,ref:t,children:[(0,wt.jsx)("span",{className:"components-external-link__contents",children:r}),(0,wt.jsx)("span",{className:"components-external-link__icon","aria-label":(0,a.__)("(opens in a new tab)"),children:"↗"})]})})),BA={width:200,height:170},VA=["avi","mpg","mpeg","mov","mp4","m4v","ogg","ogv","webm","wmv"];function $A(e){return Math.round(100*e)}const HA=cl("div",{target:"eeew7dm8"})({name:"jqnsxy",styles:"background-color:transparent;display:flex;text-align:center;width:100%"}),WA=cl("div",{target:"eeew7dm7"})("align-items:center;border-radius:",Tl.radiusSmall,";cursor:pointer;display:inline-flex;justify-content:center;margin:auto;position:relative;height:100%;&:after{border-radius:inherit;bottom:0;box-shadow:inset 0 0 0 1px rgba( 0, 0, 0, 0.1 );content:'';left:0;pointer-events:none;position:absolute;right:0;top:0;}img,video{border-radius:inherit;box-sizing:border-box;display:block;height:auto;margin:0;max-height:100%;max-width:100%;pointer-events:none;user-select:none;width:auto;}"),UA=cl("div",{target:"eeew7dm6"})("background:",jl.gray[100],";border-radius:inherit;box-sizing:border-box;height:",BA.height,"px;max-width:280px;min-width:",BA.width,"px;width:100%;"),GA=cl(mj,{target:"eeew7dm5"})({name:"1d3w5wq",styles:"width:100%"});var KA={name:"1mn7kwb",styles:"padding-bottom:1em"};const qA=({__nextHasNoMarginBottom:e})=>e?void 0:KA;var YA={name:"1mn7kwb",styles:"padding-bottom:1em"};const XA=({hasHelpText:e=!1})=>e?YA:void 0,ZA=cl(Ig,{target:"eeew7dm4"})("max-width:320px;padding-top:1em;",XA," ",qA,";"),QA=cl("div",{target:"eeew7dm3"})("left:50%;overflow:hidden;pointer-events:none;position:absolute;top:50%;transform:translate3d( -50%, -50%, 0 );z-index:1;@media not ( prefers-reduced-motion ){transition:opacity 100ms linear;}opacity:",(({showOverlay:e})=>e?1:0),";"),JA=cl("div",{target:"eeew7dm2"})({name:"1yzbo24",styles:"background:rgba( 255, 255, 255, 0.4 );backdrop-filter:blur( 16px ) saturate( 180% );position:absolute;transform:translateZ( 0 )"}),eD=cl(JA,{target:"eeew7dm1"})({name:"1sw8ur",styles:"height:1px;left:1px;right:1px"}),tD=cl(JA,{target:"eeew7dm0"})({name:"188vg4t",styles:"width:1px;top:1px;bottom:1px"}),nD=0,rD=100,oD=()=>{};function iD({__nextHasNoMarginBottom:e,hasHelpText:t,onChange:n=oD,point:r={x:.5,y:.5}}){const o=$A(r.x),i=$A(r.y),s=(e,t)=>{if(void 0===e)return;const o=parseInt(e,10);isNaN(o)||n({...r,[t]:o/100})};return(0,wt.jsxs)(ZA,{className:"focal-point-picker__controls",__nextHasNoMarginBottom:e,hasHelpText:t,gap:4,children:[(0,wt.jsx)(sD,{label:(0,a.__)("Left"),"aria-label":(0,a.__)("Focal point left position"),value:[o,"%"].join(""),onChange:e=>s(e,"x"),dragDirection:"e"}),(0,wt.jsx)(sD,{label:(0,a.__)("Top"),"aria-label":(0,a.__)("Focal point top position"),value:[i,"%"].join(""),onChange:e=>s(e,"y"),dragDirection:"s"})]})}function sD(e){return(0,wt.jsx)(GA,{__next40pxDefaultSize:!0,className:"focal-point-picker__controls-position-unit-control",labelPosition:"top",max:rD,min:nD,units:[{value:"%",label:"%"}],...e})}const aD=cl("div",{target:"e19snlhg0"})("background-color:transparent;cursor:grab;height:40px;margin:-20px 0 0 -20px;position:absolute;user-select:none;width:40px;will-change:transform;z-index:10000;background:rgba( 255, 255, 255, 0.4 );border:1px solid rgba( 255, 255, 255, 0.4 );border-radius:",Tl.radiusRound,";backdrop-filter:blur( 16px ) saturate( 180% );box-shadow:rgb( 0 0 0 / 10% ) 0px 0px 8px;@media not ( prefers-reduced-motion ){transition:transform 100ms linear;}",(({isDragging:e})=>e&&"\n\t\t\tbox-shadow: rgb( 0 0 0 / 12% ) 0px 0px 10px;\n\t\t\ttransform: scale( 1.1 );\n\t\t\tcursor: grabbing;\n\t\t\t"),";");function lD({left:e="50%",top:t="50%",...n}){const r={left:e,top:t};return(0,wt.jsx)(aD,{...n,className:"components-focal-point-picker__icon_container",style:r})}function cD({bounds:e,...t}){return(0,wt.jsxs)(QA,{...t,className:"components-focal-point-picker__grid",style:{width:e.width,height:e.height},children:[(0,wt.jsx)(eD,{style:{top:"33%"}}),(0,wt.jsx)(eD,{style:{top:"66%"}}),(0,wt.jsx)(tD,{style:{left:"33%"}}),(0,wt.jsx)(tD,{style:{left:"66%"}})]})}function uD({alt:e,autoPlay:t,src:n,onLoad:r,mediaRef:o,muted:i=!0,...s}){if(!n)return(0,wt.jsx)(UA,{className:"components-focal-point-picker__media components-focal-point-picker__media--placeholder",ref:o,...s});return function(e=""){return!!e&&(e.startsWith("data:video/")||VA.includes(function(e=""){const t=e.split(".");return t[t.length-1]}(e)))}(n)?(0,wt.jsx)("video",{...s,autoPlay:t,className:"components-focal-point-picker__media components-focal-point-picker__media--video",loop:!0,muted:i,onLoadedData:r,ref:o,src:n}):(0,wt.jsx)("img",{...s,alt:e,className:"components-focal-point-picker__media components-focal-point-picker__media--image",onLoad:r,ref:o,src:n})}const dD=function e({__nextHasNoMarginBottom:t,autoPlay:n=!0,className:r,help:o,label:i,onChange:u,onDrag:d,onDragEnd:p,onDragStart:f,resolvePoint:h,url:m,value:g={x:.5,y:.5},...v}){const[b,x]=(0,c.useState)(g),[y,w]=(0,c.useState)(!1),{startDrag:_,endDrag:S,isDragging:C}=(0,l.__experimentalUseDragging)({onDragStart:e=>{E.current?.focus();const t=I(e);t&&(f?.(t,e),x(t))},onDragMove:e=>{e.preventDefault();const t=I(e);t&&(d?.(t,e),x(t))},onDragEnd:()=>{p?.(),u?.(b)}}),{x:k,y:j}=C?b:g,E=(0,c.useRef)(null),[P,T]=(0,c.useState)(BA),R=(0,c.useRef)((()=>{if(!E.current)return;const{clientWidth:e,clientHeight:t}=E.current;T(e>0&&t>0?{width:e,height:t}:{...BA})}));(0,c.useEffect)((()=>{const e=R.current;if(!E.current)return;const{defaultView:t}=E.current.ownerDocument;return t?.addEventListener("resize",e),()=>t?.removeEventListener("resize",e)}),[]),(0,l.useIsomorphicLayoutEffect)((()=>{R.current()}),[]);const I=({clientX:e,clientY:t,shiftKey:n})=>{if(!E.current)return;const{top:r,left:o}=E.current.getBoundingClientRect();let i=(e-o)/P.width,s=(t-r)/P.height;return n&&(i=.1*Math.round(i/.1),s=.1*Math.round(s/.1)),N({x:i,y:s})},N=e=>{var t;const n=null!==(t=h?.(e))&&void 0!==t?t:e;n.x=Math.max(0,Math.min(n.x,1)),n.y=Math.max(0,Math.min(n.y,1));const r=e=>Math.round(100*e)/100;return{x:r(n.x),y:r(n.y)}},M={left:void 0!==k?k*P.width:.5*P.width,top:void 0!==j?j*P.height:.5*P.height},A=s("components-focal-point-picker-control",r),D=`inspector-focal-point-picker-control-${(0,l.useInstanceId)(e)}`;return ns((()=>{w(!0);const e=window.setTimeout((()=>{w(!1)}),600);return()=>window.clearTimeout(e)}),[k,j]),(0,wt.jsxs)(Qx,{...v,__nextHasNoMarginBottom:t,__associatedWPComponentName:"FocalPointPicker",label:i,id:D,help:o,className:A,children:[(0,wt.jsx)(HA,{className:"components-focal-point-picker-wrapper",children:(0,wt.jsxs)(WA,{className:"components-focal-point-picker",onKeyDown:e=>{const{code:t,shiftKey:n}=e;if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(t))return;e.preventDefault();const r={x:k,y:j},o=n?.1:.01,i="ArrowUp"===t||"ArrowLeft"===t?-1*o:o,s="ArrowUp"===t||"ArrowDown"===t?"y":"x";r[s]=r[s]+i,u?.(N(r))},onMouseDown:_,onBlur:()=>{C&&S()},ref:E,role:"button",tabIndex:-1,children:[(0,wt.jsx)(cD,{bounds:P,showOverlay:y}),(0,wt.jsx)(uD,{alt:(0,a.__)("Media preview"),autoPlay:n,onLoad:R.current,src:m}),(0,wt.jsx)(lD,{...M,isDragging:C})]})}),(0,wt.jsx)(iD,{__nextHasNoMarginBottom:t,hasHelpText:!!o,point:{x:k,y:j},onChange:e=>{u?.(N(e))}})]})};function pD({iframeRef:e,...t}){const n=(0,l.useMergeRefs)([e,(0,l.useFocusableIframe)()]);return Fi()("wp.components.FocusableIframe",{since:"5.9",alternative:"wp.compose.useFocusableIframe"}),(0,wt.jsx)("iframe",{ref:n,...t})}const fD=(0,wt.jsxs)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,wt.jsx)(n.Path,{d:"m19 7.5h-7.628c-.3089-.87389-1.1423-1.5-2.122-1.5-.97966 0-1.81309.62611-2.12197 1.5h-2.12803v1.5h2.12803c.30888.87389 1.14231 1.5 2.12197 1.5.9797 0 1.8131-.62611 2.122-1.5h7.628z"}),(0,wt.jsx)(n.Path,{d:"m19 15h-2.128c-.3089-.8739-1.1423-1.5-2.122-1.5s-1.8131.6261-2.122 1.5h-7.628v1.5h7.628c.3089.8739 1.1423 1.5 2.122 1.5s1.8131-.6261 2.122-1.5h2.128z"})]});function hD(e){const[t,...n]=e;if(!t)return null;const[,r]=lj(t.size);return n.every((e=>{const[,t]=lj(e.size);return t===r}))?r:null}const mD=cl("fieldset",{target:"e8tqeku4"})({name:"1t1ytme",styles:"border:0;margin:0;padding:0"}),gD=cl(yy,{target:"e8tqeku3"})("height:",wl(4),";"),vD=cl(sy,{target:"e8tqeku2"})("margin-top:",wl(-1),";"),bD=cl(Qx.VisualLabel,{target:"e8tqeku1"})("display:flex;gap:",wl(1),";justify-content:flex-start;margin-bottom:0;"),xD=cl("span",{target:"e8tqeku0"})("color:",jl.gray[700],";"),yD={key:"default",name:(0,a.__)("Default"),value:void 0},wD={key:"custom",name:(0,a.__)("Custom")},_D=e=>{var t;const{__next40pxDefaultSize:n,fontSizes:r,value:o,disableCustomFontSizes:i,size:s,onChange:l,onSelectCustom:c}=e,u=!!hD(r),d=[yD,...r.map((e=>{let t;if(u){const[n]=lj(e.size);void 0!==n&&(t=String(n))}else(function(e){return/^[\d\.]+(px|em|rem|vw|vh|%|svw|lvw|dvw|svh|lvh|dvh|vi|svi|lvi|dvi|vb|svb|lvb|dvb|vmin|svmin|lvmin|dvmin|vmax|svmax|lvmax|dvmax)?$/i.test(String(e))})(e.size)&&(t=String(e.size));return{key:e.slug,name:e.name||e.slug,value:e.size,hint:t}})),...i?[]:[wD]],p=o?null!==(t=d.find((e=>e.value===o)))&&void 0!==t?t:wD:yD;return(0,wt.jsx)(nN,{__next40pxDefaultSize:n,className:"components-font-size-picker__select",label:(0,a.__)("Font size"),hideLabelFromVision:!0,describedBy:(0,a.sprintf)((0,a.__)("Currently selected font size: %s"),p.name),options:d,value:p,showSelectedHint:!0,onChange:({selectedItem:e})=>{e===wD?c():l(e.value)},size:s})},SD=[(0,a.__)("S"),(0,a.__)("M"),(0,a.__)("L"),(0,a.__)("XL"),(0,a.__)("XXL")],CD=[(0,a.__)("Small"),(0,a.__)("Medium"),(0,a.__)("Large"),(0,a.__)("Extra Large"),(0,a.__)("Extra Extra Large")],kD=e=>{const{fontSizes:t,value:n,__next40pxDefaultSize:r,size:o,onChange:i}=e;return(0,wt.jsx)(R_,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:r,label:(0,a.__)("Font size"),hideLabelFromVision:!0,value:n,onChange:i,isBlock:!0,size:o,children:t.map(((e,t)=>(0,wt.jsx)(aA,{value:e.size,label:SD[t],"aria-label":e.name||CD[t],showTooltip:!0},e.slug)))})},jD=["px","em","rem","vw","vh"],ED=(0,c.forwardRef)(((e,t)=>{const{__next40pxDefaultSize:n=!1,fallbackFontSize:r,fontSizes:o=[],disableCustomFontSizes:i=!1,onChange:s,size:l="default",units:u=jD,value:d,withSlider:p=!1,withReset:f=!0}=e,h=cj({availableUnits:u}),m=o.find((e=>e.size===d)),g=!!d&&!m,[v,b]=(0,c.useState)(g);let x;x=!i&&v?"custom":o.length>5?"select":"togglegroup";const y=(0,c.useMemo)((()=>{switch(x){case"custom":return(0,a.__)("Custom");case"togglegroup":if(m)return m.name||CD[o.indexOf(m)];break;case"select":const e=hD(o);if(e)return`(${e})`}return""}),[x,m,o]);if(0===o.length&&i)return null;const w="string"==typeof d||"string"==typeof o[0]?.size,[_,S]=lj(d,h),C=!!S&&["em","rem","vw","vh"].includes(S),k=void 0===d;return(0,wt.jsxs)(mD,{ref:t,className:"components-font-size-picker",children:[(0,wt.jsx)(pl,{as:"legend",children:(0,a.__)("Font size")}),(0,wt.jsx)(Hg,{children:(0,wt.jsxs)(gD,{className:"components-font-size-picker__header",children:[(0,wt.jsxs)(bD,{"aria-label":`${(0,a.__)("Size")} ${y||""}`,children:[(0,a.__)("Size"),y&&(0,wt.jsx)(xD,{className:"components-font-size-picker__header__hint",children:y})]}),!i&&(0,wt.jsx)(vD,{label:"custom"===x?(0,a.__)("Use size preset"):(0,a.__)("Set custom size"),icon:fD,onClick:()=>b(!v),isPressed:"custom"===x,size:"small"})]})}),(0,wt.jsxs)("div",{children:["select"===x&&(0,wt.jsx)(_D,{__next40pxDefaultSize:n,fontSizes:o,value:d,disableCustomFontSizes:i,size:l,onChange:e=>{void 0===e?s?.(void 0):s?.(w?e:Number(e),o.find((t=>t.size===e)))},onSelectCustom:()=>b(!0)}),"togglegroup"===x&&(0,wt.jsx)(kD,{fontSizes:o,value:d,__next40pxDefaultSize:n,size:l,onChange:e=>{void 0===e?s?.(void 0):s?.(w?e:Number(e),o.find((t=>t.size===e)))}}),"custom"===x&&(0,wt.jsxs)(Ig,{className:"components-font-size-picker__custom-size-control",children:[(0,wt.jsx)(Gg,{isBlock:!0,children:(0,wt.jsx)(mj,{__next40pxDefaultSize:n,label:(0,a.__)("Custom"),labelPosition:"top",hideLabelFromVision:!0,value:d,onChange:e=>{b(!0),s?.(void 0===e?void 0:w?e:parseInt(e,10))},size:l,units:w?h:[],min:0})}),p&&(0,wt.jsx)(Gg,{isBlock:!0,children:(0,wt.jsx)(Hg,{marginX:2,marginBottom:0,children:(0,wt.jsx)(dC,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:n,className:"components-font-size-picker__custom-input",label:(0,a.__)("Custom Size"),hideLabelFromVision:!0,value:_,initialPosition:r,withInputField:!1,onChange:e=>{b(!0),s?.(void 0===e?void 0:w?e+(null!=S?S:"px"):e)},min:0,max:C?10:100,step:C?.1:1})})}),f&&(0,wt.jsx)(Gg,{children:(0,wt.jsx)(iy,{disabled:k,accessibleWhenDisabled:!0,onClick:()=>{s?.(void 0)},variant:"secondary",__next40pxDefaultSize:!0,size:"__unstable-large"===l||e.__next40pxDefaultSize?"default":"small",children:(0,a.__)("Reset")})})]})]})]})})),PD=ED;const TD=function({accept:e,children:t,multiple:n=!1,onChange:r,onClick:o,render:i,...s}){const a=(0,c.useRef)(null),l=()=>{a.current?.click()},u=i?i({openFileDialog:l}):(0,wt.jsx)(sy,{onClick:l,...s,children:t}),d=!(globalThis.window?.navigator.userAgent.includes("Safari")&&!globalThis.window?.navigator.userAgent.includes("Chrome")&&!globalThis.window?.navigator.userAgent.includes("Chromium"))&&e?.includes("image/*")?`${e}, image/heic, image/heif`:e;return(0,wt.jsxs)("div",{className:"components-form-file-upload",children:[u,(0,wt.jsx)("input",{type:"file",ref:a,multiple:n,style:{display:"none"},accept:d,onChange:r,onClick:o,"data-testid":"form-file-upload-input"})]})},RD=()=>{};const ID=(0,c.forwardRef)((function(e,t){const{className:n,checked:r,id:o,disabled:i,onChange:a=RD,...l}=e,c=s("components-form-toggle",n,{"is-checked":r,"is-disabled":i});return(0,wt.jsxs)("span",{className:c,children:[(0,wt.jsx)("input",{className:"components-form-toggle__input",id:o,type:"checkbox",checked:r,onChange:a,disabled:i,...l,ref:t}),(0,wt.jsx)("span",{className:"components-form-toggle__track"}),(0,wt.jsx)("span",{className:"components-form-toggle__thumb"})]})})),ND=ID,MD=()=>{};function AD({value:e,status:t,title:n,displayTransform:r,isBorderless:o=!1,disabled:i=!1,onClickRemove:c=MD,onMouseEnter:u,onMouseLeave:d,messages:p,termPosition:f,termsCount:h}){const m=(0,l.useInstanceId)(AD),g=s("components-form-token-field__token",{"is-error":"error"===t,"is-success":"success"===t,"is-validating":"validating"===t,"is-borderless":o,"is-disabled":i}),v=r(e),b=(0,a.sprintf)((0,a.__)("%1$s (%2$s of %3$s)"),v,f,h);return(0,wt.jsxs)("span",{className:g,onMouseEnter:u,onMouseLeave:d,title:n,children:[(0,wt.jsxs)("span",{className:"components-form-token-field__token-text",id:`components-form-token-field__token-text-${m}`,children:[(0,wt.jsx)(pl,{as:"span",children:b}),(0,wt.jsx)("span",{"aria-hidden":"true",children:v})]}),(0,wt.jsx)(sy,{className:"components-form-token-field__remove-token",icon:e_,onClick:i?void 0:()=>c({value:e}),disabled:i,label:p.remove,"aria-describedby":`components-form-token-field__token-text-${m}`})]})}const DD=({__next40pxDefaultSize:e,hasTokens:t})=>!e&&bl("padding-top:",wl(t?1:.5),";padding-bottom:",wl(t?1:.5),";",""),OD=cl(Ig,{target:"ehq8nmi0"})("padding:7px;",Bx," ",DD,";"),zD=e=>e;const LD=function e(t){const{autoCapitalize:n,autoComplete:r,maxLength:o,placeholder:i,label:u=(0,a.__)("Add item"),className:d,suggestions:p=[],maxSuggestions:f=100,value:h=[],displayTransform:m=zD,saveTransform:g=(e=>e.trim()),onChange:v=(()=>{}),onInputChange:b=(()=>{}),onFocus:x,isBorderless:y=!1,disabled:w=!1,tokenizeOnSpace:_=!1,messages:S={added:(0,a.__)("Item added."),removed:(0,a.__)("Item removed."),remove:(0,a.__)("Remove item"),__experimentalInvalid:(0,a.__)("Invalid item")},__experimentalRenderItem:C,__experimentalExpandOnFocus:k=!1,__experimentalValidateInput:j=(()=>!0),__experimentalShowHowTo:E=!0,__next40pxDefaultSize:P=!1,__experimentalAutoSelectFirstMatch:T=!1,__nextHasNoMarginBottom:R=!1,tokenizeOnBlur:I=!1}=_b(t);R||Fi()("Bottom margin styles for wp.components.FormTokenField",{since:"6.7",version:"7.0",hint:"Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version."});const N=(0,l.useInstanceId)(e),[M,A]=(0,c.useState)(""),[D,O]=(0,c.useState)(0),[z,L]=(0,c.useState)(!1),[F,B]=(0,c.useState)(!1),[V,$]=(0,c.useState)(-1),[H,W]=(0,c.useState)(!1),U=(0,l.usePrevious)(p),G=(0,l.usePrevious)(h),K=(0,c.useRef)(null),q=(0,c.useRef)(null),Y=(0,l.useDebounce)(My.speak,500);function X(){K.current?.focus()}function Z(){return K.current===K.current?.ownerDocument.activeElement}function Q(e){if(fe()&&j(M))L(!1),I&&fe()&&ae(M);else{if(A(""),O(0),L(!1),k){const t=e.relatedTarget===q.current;B(t)}else B(!1);$(-1),W(!1)}}function J(e){e.target===q.current&&z&&e.preventDefault()}function ee(e){le(e.value),X()}function te(e){const t=e.value,n=_?/[ ,\t]+/:/[,\t]+/,r=t.split(n),o=r[r.length-1]||"";r.length>1&&se(r.slice(0,-1)),A(o),b(o)}function ne(e){let t=!1;return Z()&&pe()&&(e(),t=!0),t}function re(){const e=de()-1;e>-1&&le(h[e])}function oe(){const e=de();e<h.length&&(le(h[e]),function(e){O(h.length-Math.max(e,-1)-1)}(e))}function ie(){let e=!1;const t=function(){if(-1!==V)return ue()[V];return}();return t?(ae(t),e=!0):fe()&&(ae(M),e=!0),e}function se(e){const t=[...new Set(e.map(g).filter(Boolean).filter((e=>!function(e){return h.some((t=>ce(e)===ce(t)))}(e))))];if(t.length>0){const e=[...h];e.splice(de(),0,...t),v(e)}}function ae(e){j(e)?(se([e]),(0,My.speak)(S.added,"assertive"),A(""),$(-1),W(!1),B(!k),z&&!I&&X()):(0,My.speak)(S.__experimentalInvalid,"assertive")}function le(e){const t=h.filter((t=>ce(t)!==ce(e)));v(t),(0,My.speak)(S.removed,"assertive")}function ce(e){return"object"==typeof e?e.value:e}function ue(e=M,t=p,n=h,r=f,o=g){let i=o(e);const s=[],a=[],l=n.map((e=>"string"==typeof e?e:e.value));return 0===i.length?t=t.filter((e=>!l.includes(e))):(i=i.toLocaleLowerCase(),t.forEach((e=>{const t=e.toLocaleLowerCase().indexOf(i);-1===l.indexOf(e)&&(0===t?s.push(e):t>0&&a.push(e))})),t=s.concat(a)),t.slice(0,r)}function de(){return h.length-D}function pe(){return 0===M.length}function fe(){return g(M).length>0}function he(e=!0){const t=M.trim().length>1,n=ue(M),r=n.length>0,o=Z()&&k;if(B(o||t&&r),e&&(T&&t&&r?($(0),W(!0)):($(-1),W(!1))),t){const e=r?(0,a.sprintf)((0,a._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",n.length),n.length):(0,a.__)("No results.");Y(e,"assertive")}}function me(e,t,n){const r=ce(e),o="string"!=typeof e?e.status:void 0,i=t+1,s=n.length;return(0,wt.jsx)(Gg,{children:(0,wt.jsx)(AD,{value:r,status:o,title:"string"!=typeof e?e.title:void 0,displayTransform:m,onClickRemove:ee,isBorderless:"string"!=typeof e&&e.isBorderless||y,onMouseEnter:"string"!=typeof e?e.onMouseEnter:void 0,onMouseLeave:"string"!=typeof e?e.onMouseLeave:void 0,disabled:"error"!==o&&w,messages:S,termsCount:s,termPosition:i})},"token-"+r)}(0,c.useEffect)((()=>{z&&!Z()&&X()}),[z]),(0,c.useEffect)((()=>{const e=!ww()(p,U||[]);(e||h!==G)&&he(e)}),[p,U,h,G]),(0,c.useEffect)((()=>{he()}),[M]),(0,c.useEffect)((()=>{he()}),[T]),w&&z&&(L(!1),A(""));const ge=s(d,"components-form-token-field__input-container",{"is-active":z,"is-disabled":w});let ve={className:"components-form-token-field",tabIndex:-1};const be=ue();return w||(ve=Object.assign({},ve,{onKeyDown:Ax((function(e){let t=!1;if(!e.defaultPrevented){switch(e.key){case"Backspace":t=ne(re);break;case"Enter":t=ie();break;case"ArrowLeft":t=function(){let e=!1;return pe()&&(O((e=>Math.min(e+1,h.length))),e=!0),e}();break;case"ArrowUp":$((e=>(0===e?ue(M,p,h,f,g).length:e)-1)),W(!0),t=!0;break;case"ArrowRight":t=function(){let e=!1;return pe()&&(O((e=>Math.max(e-1,0))),e=!0),e}();break;case"ArrowDown":$((e=>(e+1)%ue(M,p,h,f,g).length)),W(!0),t=!0;break;case"Delete":t=ne(oe);break;case"Space":_&&(t=ie());break;case"Escape":t=function(e){return e.target instanceof HTMLInputElement&&(A(e.target.value),B(!1),$(-1),W(!1)),!0}(e)}t&&e.preventDefault()}})),onKeyPress:function(e){let t=!1;","===e.key&&(fe()&&ae(M),t=!0);t&&e.preventDefault()},onFocus:function(e){Z()||e.target===q.current?(L(!0),B(k||F)):L(!1),"function"==typeof x&&x(e)}})),(0,wt.jsxs)("div",{...ve,children:[u&&(0,wt.jsx)(Ux,{htmlFor:`components-form-token-input-${N}`,className:"components-form-token-field__label",children:u}),(0,wt.jsxs)("div",{ref:q,className:ge,tabIndex:-1,onMouseDown:J,onTouchStart:J,children:[(0,wt.jsx)(OD,{justify:"flex-start",align:"center",gap:1,wrap:!0,__next40pxDefaultSize:P,hasTokens:!!h.length,children:function(){const e=h.map(me);return e.splice(de(),0,function(){const e={instanceId:N,autoCapitalize:n,autoComplete:r,placeholder:0===h.length?i:"",disabled:w,value:M,onBlur:Q,isExpanded:F,selectedSuggestionIndex:V};return(0,wt.jsx)(fR,{...e,onChange:o&&h.length>=o?void 0:te,ref:K},"input")}()),e}()}),F&&(0,wt.jsx)(mR,{instanceId:N,match:g(M),displayTransform:m,suggestions:be,selectedIndex:V,scrollIntoView:H,onHover:function(e){const t=ue().indexOf(e);t>=0&&($(t),W(!1))},onSelect:function(e){ae(e)},__experimentalRenderItem:C})]}),!R&&(0,wt.jsx)(Hg,{marginBottom:2}),E&&(0,wt.jsx)(qx,{id:`components-form-token-suggestions-howto-${N}`,className:"components-form-token-field__help",__nextHasNoMarginBottom:R,children:_?(0,a.__)("Separate with commas, spaces, or the Enter key."):(0,a.__)("Separate with commas or the Enter key.")})]})},FD=()=>(0,wt.jsx)(n.SVG,{width:"8",height:"8",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,wt.jsx)(n.Circle,{cx:"4",cy:"4",r:"4"})});function BD({currentPage:e,numberOfPages:t,setCurrentPage:n}){return(0,wt.jsx)("ul",{className:"components-guide__page-control","aria-label":(0,a.__)("Guide controls"),children:Array.from({length:t}).map(((r,o)=>(0,wt.jsx)("li",{"aria-current":o===e?"step":void 0,children:(0,wt.jsx)(sy,{icon:(0,wt.jsx)(FD,{}),"aria-label":(0,a.sprintf)((0,a.__)("Page %1$d of %2$d"),o+1,t),onClick:()=>n(o)},o)},o)))})}const VD=function({children:e,className:t,contentLabel:n,finishButtonText:r=(0,a.__)("Finish"),onFinish:o,pages:i=[]}){const l=(0,c.useRef)(null),[u,d]=(0,c.useState)(0);var p;(0,c.useEffect)((()=>{const e=l.current?.querySelector(".components-guide");e instanceof HTMLElement&&e.focus()}),[u]),(0,c.useEffect)((()=>{c.Children.count(e)&&Fi()("Passing children to <Guide>",{since:"5.5",alternative:"the `pages` prop"})}),[e]),c.Children.count(e)&&(i=null!==(p=c.Children.map(e,(e=>({content:e}))))&&void 0!==p?p:[]);const f=u>0,h=u<i.length-1,m=()=>{f&&d(u-1)},g=()=>{h&&d(u+1)};return 0===i.length?null:(0,wt.jsx)(LR,{className:s("components-guide",t),contentLabel:n,isDismissible:i.length>1,onRequestClose:o,onKeyDown:e=>{"ArrowLeft"===e.code?(m(),e.preventDefault()):"ArrowRight"===e.code&&(g(),e.preventDefault())},ref:l,children:(0,wt.jsxs)("div",{className:"components-guide__container",children:[(0,wt.jsxs)("div",{className:"components-guide__page",children:[i[u].image,i.length>1&&(0,wt.jsx)(BD,{currentPage:u,numberOfPages:i.length,setCurrentPage:d}),i[u].content]}),(0,wt.jsxs)("div",{className:"components-guide__footer",children:[f&&(0,wt.jsx)(sy,{className:"components-guide__back-button",variant:"tertiary",onClick:m,__next40pxDefaultSize:!0,children:(0,a.__)("Previous")}),h&&(0,wt.jsx)(sy,{className:"components-guide__forward-button",variant:"primary",onClick:g,__next40pxDefaultSize:!0,children:(0,a.__)("Next")}),!h&&(0,wt.jsx)(sy,{className:"components-guide__finish-button",variant:"primary",onClick:o,__next40pxDefaultSize:!0,children:r})]})]})})};function $D(e){return(0,c.useEffect)((()=>{Fi()("<GuidePage>",{since:"5.5",alternative:"the `pages` prop in <Guide>"})}),[]),(0,wt.jsx)("div",{...e})}const HD=(0,c.forwardRef)((function({label:e,labelPosition:t,size:n,tooltip:r,...o},i){return Fi()("wp.components.IconButton",{since:"5.4",alternative:"wp.components.Button",version:"6.2"}),(0,wt.jsx)(sy,{...o,ref:i,tooltipPosition:t,iconSize:n,showTooltip:void 0!==r?!!r:void 0,label:r||e})}));const WD=Xa((function(e,t){const{role:n,wrapperClassName:r,...o}=function(e){const{as:t,className:n,onClick:r,role:o="listitem",size:i,...s}=Ya(e,"Item"),{spacedAround:a,size:l}=QP(),u=i||l,d=t||(void 0!==r?"button":"div"),p=qa(),f=(0,c.useMemo)((()=>p(("button"===d||"a"===d)&&LP(d),XP[u]||XP.medium,BP,a&&WP,n)),[d,n,p,u,a]),h=p(FP);return{as:d,className:f,onClick:r,wrapperClassName:h,role:o,...s}}(e);return(0,wt.jsx)("div",{role:n,className:r,children:(0,wt.jsx)(dl,{...o,ref:t})})}),"Item"),UD=WD;function GD({target:e,callback:t,shortcut:n,bindGlobal:r,eventName:o}){return(0,l.useKeyboardShortcut)(n,t,{bindGlobal:r,target:e,eventName:o}),null}const KD=function({children:e,shortcuts:t,bindGlobal:n,eventName:r}){const o=(0,c.useRef)(null),i=Object.entries(null!=t?t:{}).map((([e,t])=>(0,wt.jsx)(GD,{shortcut:e,callback:t,bindGlobal:n,eventName:r,target:o},e)));return c.Children.count(e)?(0,wt.jsxs)("div",{ref:o,children:[i,e]}):(0,wt.jsx)(wt.Fragment,{children:i})};const qD=function e(t){const{children:n,className:r="",label:o,hideSeparator:i}=t,a=(0,l.useInstanceId)(e);if(!c.Children.count(n))return null;const u=`components-menu-group-label-${a}`,d=s(r,"components-menu-group",{"has-hidden-separator":i});return(0,wt.jsxs)("div",{className:d,children:[o&&(0,wt.jsx)("div",{className:"components-menu-group__label",id:u,"aria-hidden":"true",children:o}),(0,wt.jsx)("div",{role:"group","aria-labelledby":o?u:void 0,children:n})]})};const YD=(0,c.forwardRef)((function(e,t){let{children:n,info:r,className:o,icon:i,iconPosition:a="right",shortcut:l,isSelected:u,role:d="menuitem",suffix:p,...f}=e;return o=s("components-menu-item__button",o),r&&(n=(0,wt.jsxs)("span",{className:"components-menu-item__info-wrapper",children:[(0,wt.jsx)("span",{className:"components-menu-item__item",children:n}),(0,wt.jsx)("span",{className:"components-menu-item__info",children:r})]})),i&&"string"!=typeof i&&(i=(0,c.cloneElement)(i,{className:s("components-menu-items__item-icon",{"has-icon-right":"right"===a})})),(0,wt.jsxs)(sy,{ref:t,"aria-checked":"menuitemcheckbox"===d||"menuitemradio"===d?u:void 0,role:d,icon:"left"===a?i:void 0,className:o,...f,children:[(0,wt.jsx)("span",{className:"components-menu-item__item",children:n}),!p&&(0,wt.jsx)(Bi,{className:"components-menu-item__shortcut",shortcut:l}),!p&&i&&"right"===a&&(0,wt.jsx)(ry,{icon:i}),p]})})),XD=YD,ZD=()=>{};const QD=function({choices:e=[],onHover:t=ZD,onSelect:n,value:r}){return(0,wt.jsx)(wt.Fragment,{children:e.map((e=>{const o=r===e.value;return(0,wt.jsx)(XD,{role:"menuitemradio",disabled:e.disabled,icon:o?xk:null,info:e.info,isSelected:o,shortcut:e.shortcut,className:"components-menu-items-choice",onClick:()=>{o||n(e.value)},onMouseEnter:()=>t(e.value),onMouseLeave:()=>t(null),"aria-label":e["aria-label"],children:e.label},e.value)}))})};const JD=(0,c.forwardRef)((function({eventToOffset:e,...t},n){return(0,wt.jsx)(BT,{ref:n,stopNavigationEvents:!0,onlyBrowserTabstops:!0,eventToOffset:t=>{const{code:n,shiftKey:r}=t;return"Tab"===n?r?-1:1:e?e(t):void 0},...t})})),eO="root",tO=100,nO=()=>{},rO=()=>{},oO=(0,c.createContext)({activeItem:void 0,activeMenu:eO,setActiveMenu:nO,navigationTree:{items:{},getItem:rO,addItem:nO,removeItem:nO,menus:{},getMenu:rO,addMenu:nO,removeMenu:nO,childMenu:{},traverseMenu:nO,isMenuEmpty:()=>!1}}),iO=()=>(0,c.useContext)(oO);const sO=cl("div",{target:"eeiismy11"})("width:100%;box-sizing:border-box;padding:0 ",wl(4),";overflow:hidden;"),aO=cl("div",{target:"eeiismy10"})("margin-top:",wl(6),";margin-bottom:",wl(6),";display:flex;flex-direction:column;ul{padding:0;margin:0;list-style:none;}.components-navigation__back-button{margin-bottom:",wl(6),";}.components-navigation__group+.components-navigation__group{margin-top:",wl(6),";}"),lO=cl(sy,{target:"eeiismy9"})({name:"26l0q2",styles:"&.is-tertiary{color:inherit;opacity:0.7;&:hover:not( :disabled ){opacity:1;box-shadow:none;color:inherit;}&:active:not( :disabled ){background:transparent;opacity:1;color:inherit;}}"}),cO=cl("div",{target:"eeiismy8"})({name:"1aubja5",styles:"overflow:hidden;width:100%"}),uO=cl("div",{target:"eeiismy7"})({name:"rgorny",styles:"margin:11px 0;padding:1px"}),dO=cl("span",{target:"eeiismy6"})("height:",wl(6),";.components-button.is-small{color:inherit;opacity:0.7;margin-right:",wl(1),";padding:0;&:active:not( :disabled ){background:none;opacity:1;color:inherit;}&:hover:not( :disabled ){box-shadow:none;opacity:1;color:inherit;}}"),pO=cl(Tk,{target:"eeiismy5"})("min-height:",wl(12),";align-items:center;color:inherit;display:flex;justify-content:space-between;margin-bottom:",wl(2),";padding:",(()=>(0,a.isRTL)()?`${wl(1)} ${wl(4)} ${wl(1)} ${wl(2)}`:`${wl(1)} ${wl(2)} ${wl(1)} ${wl(4)}`),";"),fO=cl("li",{target:"eeiismy4"})("border-radius:",Tl.radiusSmall,";color:inherit;margin-bottom:0;>button,>a.components-button,>a{width:100%;color:inherit;opacity:0.7;padding:",wl(2)," ",wl(4),";",Bg({textAlign:"left"},{textAlign:"right"})," &:hover,&:focus:not( [aria-disabled='true'] ):active,&:active:not( [aria-disabled='true'] ):active{color:inherit;opacity:1;}}&.is-active{background-color:",jl.theme.accent,";color:",jl.white,";>button,>a{color:",jl.white,";opacity:1;}}>svg path{color:",jl.gray[600],";}"),hO=cl("div",{target:"eeiismy3"})("display:flex;align-items:center;height:auto;min-height:40px;margin:0;padding:",wl(1.5)," ",wl(4),";font-weight:400;line-height:20px;width:100%;color:inherit;opacity:0.7;"),mO=cl("span",{target:"eeiismy2"})("display:flex;margin-right:",wl(2),";"),gO=cl("span",{target:"eeiismy1"})("margin-left:",(()=>(0,a.isRTL)()?"0":wl(2)),";margin-right:",(()=>(0,a.isRTL)()?wl(2):"0"),";display:inline-flex;padding:",wl(1)," ",wl(3),";border-radius:",Tl.radiusSmall,";@keyframes fade-in{from{opacity:0;}to{opacity:1;}}@media not ( prefers-reduced-motion ){animation:fade-in 250ms ease-out;}"),vO=cl(Xv,{target:"eeiismy0"})((()=>(0,a.isRTL)()?"margin-left: auto;":"margin-right: auto;")," font-size:14px;line-height:20px;color:inherit;");function bO(){const[e,t]=(0,c.useState)({});return{nodes:e,getNode:t=>e[t],addNode:(e,n)=>{const{children:r,...o}=n;return t((t=>({...t,[e]:o})))},removeNode:e=>t((t=>{const{[e]:n,...r}=t;return r}))}}const xO=()=>{};const yO=function({activeItem:e,activeMenu:t=eO,children:n,className:r,onActivateMenu:o=xO}){const[i,l]=(0,c.useState)(t),[u,d]=(0,c.useState)(),p=(()=>{const{nodes:e,getNode:t,addNode:n,removeNode:r}=bO(),{nodes:o,getNode:i,addNode:s,removeNode:a}=bO(),[l,u]=(0,c.useState)({}),d=e=>l[e]||[],p=(e,t)=>{const n=[];let r,o=[e];for(;o.length>0&&(r=i(o.shift()),!r||n.includes(r.menu)||(n.push(r.menu),o=[...o,...d(r.menu)],!1!==t(r))););};return{items:e,getItem:t,addItem:n,removeItem:r,menus:o,getMenu:i,addMenu:(e,t)=>{u((n=>{const r={...n};return t.parentMenu?(r[t.parentMenu]||(r[t.parentMenu]=[]),r[t.parentMenu].push(e),r):r})),s(e,t)},removeMenu:a,childMenu:l,traverseMenu:p,isMenuEmpty:e=>{let t=!0;return p(e,(e=>{if(!e.isEmpty)return t=!1,!1})),t}}})(),f=(0,a.isRTL)()?"right":"left",h=(e,t=f)=>{p.getMenu(e)&&(d(t),l(e),o(e))},m=(0,c.useRef)(!1);(0,c.useEffect)((()=>{m.current||(m.current=!0)}),[]),(0,c.useEffect)((()=>{t!==i&&h(t)}),[t]);const g={activeItem:e,activeMenu:i,setActiveMenu:h,navigationTree:p},v=s("components-navigation",r),b=Vl({type:"slide-in",origin:u});return(0,wt.jsx)(sO,{className:v,children:(0,wt.jsx)("div",{className:b?s({[b]:m.current&&u}):void 0,children:(0,wt.jsx)(oO.Provider,{value:g,children:n})},i)})},wO=(0,wt.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wt.jsx)(n.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})}),_O=(0,wt.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wt.jsx)(n.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})});const SO=(0,c.forwardRef)((function({backButtonLabel:e,className:t,href:n,onClick:r,parentMenu:o},i){const{setActiveMenu:l,navigationTree:c}=iO(),u=s("components-navigation__back-button",t),d=void 0!==o?c.getMenu(o)?.title:void 0,p=(0,a.isRTL)()?wO:_O;return(0,wt.jsxs)(lO,{className:u,href:n,variant:"tertiary",ref:i,onClick:e=>{"function"==typeof r&&r(e);const t=(0,a.isRTL)()?"left":"right";o&&!e.defaultPrevented&&l(o,t)},children:[(0,wt.jsx)(vS,{icon:p}),e||d||(0,a.__)("Back")]})})),CO=SO,kO=(0,c.createContext)({group:void 0});let jO=0;const EO=function({children:e,className:t,title:n}){const[r]=(0,c.useState)("group-"+ ++jO),{navigationTree:{items:o}}=iO(),i={group:r};if(!Object.values(o).some((e=>e.group===r&&e._isVisible)))return(0,wt.jsx)(kO.Provider,{value:i,children:e});const a=`components-navigation__group-title-${r}`,l=s("components-navigation__group",t);return(0,wt.jsx)(kO.Provider,{value:i,children:(0,wt.jsxs)("li",{className:l,children:[n&&(0,wt.jsx)(pO,{className:"components-navigation__group-title",id:a,level:3,children:n}),(0,wt.jsx)("ul",{"aria-labelledby":a,role:"group",children:e})]})})};function PO(e){const{badge:t,title:n}=e;return(0,wt.jsxs)(wt.Fragment,{children:[n&&(0,wt.jsx)(vO,{className:"components-navigation__item-title",as:"span",children:n}),t&&(0,wt.jsx)(gO,{className:"components-navigation__item-badge",children:t})]})}const TO=(0,c.createContext)({menu:void 0,search:""}),RO=()=>(0,c.useContext)(TO),IO=e=>Iy()(e).replace(/^\//,"").toLowerCase(),NO=(e,t)=>{const{activeMenu:n,navigationTree:{addItem:r,removeItem:o}}=iO(),{group:i}=(0,c.useContext)(kO),{menu:s,search:a}=RO();(0,c.useEffect)((()=>{const l=n===s,c=!a||void 0!==t.title&&((e,t)=>-1!==IO(e).indexOf(IO(t)))(t.title,a);return r(e,{...t,group:i,menu:s,_isVisible:l&&c}),()=>{o(e)}}),[n,a])};let MO=0;function AO(e){const{children:t,className:n,title:r,href:o,...i}=e,[a]=(0,c.useState)("item-"+ ++MO);NO(a,e);const{navigationTree:l}=iO();if(!l.getItem(a)?._isVisible)return null;const u=s("components-navigation__item",n);return(0,wt.jsx)(fO,{className:u,...i,children:t})}const DO=()=>{};const OO=function(e){const{badge:t,children:n,className:r,href:o,item:i,navigateToMenu:l,onClick:c=DO,title:u,icon:d,hideIfTargetMenuEmpty:p,isText:f,...h}=e,{activeItem:m,setActiveMenu:g,navigationTree:{isMenuEmpty:v}}=iO();if(p&&l&&v(l))return null;const b=i&&m===i,x=s(r,{"is-active":b}),y=(0,a.isRTL)()?_O:wO,w=n?e:{...e,onClick:void 0},_=f?h:{as:sy,href:o,onClick:e=>{l&&g(l),c(e)},"aria-current":b?"page":void 0,...h};return(0,wt.jsx)(AO,{...w,className:x,children:n||(0,wt.jsxs)(hO,{..._,children:[d&&(0,wt.jsx)(mO,{children:(0,wt.jsx)(vS,{icon:d})}),(0,wt.jsx)(PO,{title:u,badge:t}),l&&(0,wt.jsx)(vS,{icon:y})]})})},zO=(0,wt.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wt.jsx)(n.Path,{d:"M13 5c-3.3 0-6 2.7-6 6 0 1.4.5 2.7 1.3 3.7l-3.8 3.8 1.1 1.1 3.8-3.8c1 .8 2.3 1.3 3.7 1.3 3.3 0 6-2.7 6-6S16.3 5 13 5zm0 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z"})}),LO=(0,l.createHigherOrderComponent)((e=>t=>(0,wt.jsx)(e,{...t,speak:My.speak,debouncedSpeak:(0,l.useDebounce)(My.speak,500)})),"withSpokenMessages"),FO=({size:e})=>wl("compact"===e?1:2),BO=cl("div",{target:"effl84m1"})("display:flex;padding-inline-end:",FO,";svg{fill:currentColor;}"),VO=cl(ty,{target:"effl84m0"})("input[type='search']{&::-webkit-search-decoration,&::-webkit-search-cancel-button,&::-webkit-search-results-button,&::-webkit-search-results-decoration{-webkit-appearance:none;}}&:not( :focus-within ){--wp-components-color-background:",jl.theme.gray[100],";}");function $O({searchRef:e,value:t,onChange:n,onClose:r}){if(!r&&!t)return(0,wt.jsx)(vS,{icon:zO});return(0,wt.jsx)(sy,{size:"small",icon:e_,label:r?(0,a.__)("Close search"):(0,a.__)("Reset search"),onClick:null!=r?r:()=>{n(""),e.current?.focus()}})}const HO=(0,c.forwardRef)((function({__nextHasNoMarginBottom:e=!1,className:t,onChange:n,value:r,label:o=(0,a.__)("Search"),placeholder:i=(0,a.__)("Search"),hideLabelFromVision:u=!0,onClose:d,size:p="default",...f},h){delete f.disabled;const m=(0,c.useRef)(null),g=(0,l.useInstanceId)(HO,"components-search-control"),v=(0,c.useMemo)((()=>({BaseControl:{_overrides:{__nextHasNoMarginBottom:e},__associatedWPComponentName:"SearchControl"},InputBase:{isBorderless:!0}})),[e]);return(0,wt.jsx)(is,{value:v,children:(0,wt.jsx)(VO,{__next40pxDefaultSize:!0,id:g,hideLabelFromVision:u,label:o,ref:(0,l.useMergeRefs)([m,h]),type:"search",size:p,className:s("components-search-control",t),onChange:e=>n(null!=e?e:""),autoComplete:"off",placeholder:i,value:null!=r?r:"",suffix:(0,wt.jsx)(BO,{size:p,children:(0,wt.jsx)($O,{searchRef:m,value:r,onChange:n,onClose:d})}),...f})})})),WO=HO;const UO=LO((function({debouncedSpeak:e,onCloseSearch:t,onSearch:n,search:r,title:o}){const{navigationTree:{items:i}}=iO(),{menu:s}=RO(),l=(0,c.useRef)(null);(0,c.useEffect)((()=>{const e=setTimeout((()=>{l.current?.focus()}),tO);return()=>{clearTimeout(e)}}),[]),(0,c.useEffect)((()=>{if(!r)return;const t=Object.values(i).filter((e=>e._isVisible)).length,n=(0,a.sprintf)((0,a._n)("%d result found.","%d results found.",t),t);e(n)}),[i,r]);const u=()=>{n?.(""),t()},d=`components-navigation__menu-title-search-${s}`,p=(0,a.sprintf)((0,a.__)("Search %s"),o?.toLowerCase()).trim();return(0,wt.jsx)(uO,{children:(0,wt.jsx)(WO,{__nextHasNoMarginBottom:!0,className:"components-navigation__menu-search-input",id:d,onChange:e=>n?.(e),onKeyDown:e=>{"Escape"!==e.code||e.defaultPrevented||(e.preventDefault(),u())},placeholder:p,onClose:u,ref:l,value:r})})}));function GO({hasSearch:e,onSearch:t,search:n,title:r,titleAction:o}){const[i,s]=(0,c.useState)(!1),{menu:l}=RO(),u=(0,c.useRef)(null);if(!r)return null;const d=`components-navigation__menu-title-${l}`,p=(0,a.sprintf)((0,a.__)("Search in %s"),r);return(0,wt.jsxs)(cO,{className:"components-navigation__menu-title",children:[!i&&(0,wt.jsxs)(pO,{as:"h2",className:"components-navigation__menu-title-heading",level:3,children:[(0,wt.jsx)("span",{id:d,children:r}),(e||o)&&(0,wt.jsxs)(dO,{children:[o,e&&(0,wt.jsx)(sy,{size:"small",variant:"tertiary",label:p,onClick:()=>s(!0),ref:u,children:(0,wt.jsx)(vS,{icon:zO})})]})]}),i&&(0,wt.jsx)("div",{className:Vl({type:"slide-in",origin:"left"}),children:(0,wt.jsx)(UO,{onCloseSearch:()=>{s(!1),setTimeout((()=>{u.current?.focus()}),tO)},onSearch:t,search:n,title:r})})]})}function KO({search:e}){const{navigationTree:{items:t}}=iO(),n=Object.values(t).filter((e=>e._isVisible)).length;return!e||n?null:(0,wt.jsx)(fO,{children:(0,wt.jsxs)(hO,{children:[(0,a.__)("No results found.")," "]})})}const qO=function(e){const{backButtonLabel:t,children:n,className:r,hasSearch:o,menu:i=eO,onBackButtonClick:a,onSearch:l,parentMenu:u,search:d,isSearchDebouncing:p,title:f,titleAction:h}=e,[m,g]=(0,c.useState)("");(e=>{const{navigationTree:{addMenu:t,removeMenu:n}}=iO(),r=e.menu||eO;(0,c.useEffect)((()=>(t(r,{...e,menu:r}),()=>{n(r)})),[])})(e);const{activeMenu:v}=iO(),b={menu:i,search:m};if(v!==i)return(0,wt.jsx)(TO.Provider,{value:b,children:n});const x=!!l,y=x?d:m,w=x?l:g,_=`components-navigation__menu-title-${i}`,S=s("components-navigation__menu",r);return(0,wt.jsx)(TO.Provider,{value:b,children:(0,wt.jsxs)(aO,{className:S,children:[(u||a)&&(0,wt.jsx)(CO,{backButtonLabel:t,parentMenu:u,onClick:a}),f&&(0,wt.jsx)(GO,{hasSearch:o,onSearch:w,search:y,title:f,titleAction:h}),(0,wt.jsx)($T,{children:(0,wt.jsxs)("ul",{"aria-labelledby":_,children:[n,y&&!p&&(0,wt.jsx)(KO,{search:y})]})})]})})};function YO(e,t){void 0===t&&(t={});for(var n=function(e){for(var t=[],n=0;n<e.length;){var r=e[n];if("*"!==r&&"+"!==r&&"?"!==r)if("\\"!==r)if("{"!==r)if("}"!==r)if(":"!==r)if("("!==r)t.push({type:"CHAR",index:n,value:e[n++]});else{var o=1,i="";if("?"===e[a=n+1])throw new TypeError('Pattern cannot start with "?" at '.concat(a));for(;a<e.length;)if("\\"!==e[a]){if(")"===e[a]){if(0==--o){a++;break}}else if("("===e[a]&&(o++,"?"!==e[a+1]))throw new TypeError("Capturing groups are not allowed at ".concat(a));i+=e[a++]}else i+=e[a++]+e[a++];if(o)throw new TypeError("Unbalanced pattern at ".concat(n));if(!i)throw new TypeError("Missing pattern at ".concat(n));t.push({type:"PATTERN",index:n,value:i}),n=a}else{for(var s="",a=n+1;a<e.length;){var l=e.charCodeAt(a);if(!(l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||95===l))break;s+=e[a++]}if(!s)throw new TypeError("Missing parameter name at ".concat(n));t.push({type:"NAME",index:n,value:s}),n=a}else t.push({type:"CLOSE",index:n,value:e[n++]});else t.push({type:"OPEN",index:n,value:e[n++]});else t.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});else t.push({type:"MODIFIER",index:n,value:e[n++]})}return t.push({type:"END",index:n,value:""}),t}(e),r=t.prefixes,o=void 0===r?"./":r,i=t.delimiter,s=void 0===i?"/#?":i,a=[],l=0,c=0,u="",d=function(e){if(c<n.length&&n[c].type===e)return n[c++].value},p=function(e){var t=d(e);if(void 0!==t)return t;var r=n[c],o=r.type,i=r.index;throw new TypeError("Unexpected ".concat(o," at ").concat(i,", expected ").concat(e))},f=function(){for(var e,t="";e=d("CHAR")||d("ESCAPED_CHAR");)t+=e;return t},h=function(e){var t=a[a.length-1],n=e||(t&&"string"==typeof t?t:"");if(t&&!n)throw new TypeError('Must have text between two parameters, missing text after "'.concat(t.name,'"'));return!n||function(e){for(var t=0,n=s;t<n.length;t++){var r=n[t];if(e.indexOf(r)>-1)return!0}return!1}(n)?"[^".concat(ZO(s),"]+?"):"(?:(?!".concat(ZO(n),")[^").concat(ZO(s),"])+?")};c<n.length;){var m=d("CHAR"),g=d("NAME"),v=d("PATTERN");if(g||v){var b=m||"";-1===o.indexOf(b)&&(u+=b,b=""),u&&(a.push(u),u=""),a.push({name:g||l++,prefix:b,suffix:"",pattern:v||h(b),modifier:d("MODIFIER")||""})}else{var x=m||d("ESCAPED_CHAR");if(x)u+=x;else if(u&&(a.push(u),u=""),d("OPEN")){b=f();var y=d("NAME")||"",w=d("PATTERN")||"",_=f();p("CLOSE"),a.push({name:y||(w?l++:""),pattern:y&&!w?h(b):w,prefix:b,suffix:_,modifier:d("MODIFIER")||""})}else p("END")}}return a}function XO(e,t){var n=[];return function(e,t,n){void 0===n&&(n={});var r=n.decode,o=void 0===r?function(e){return e}:r;return function(n){var r=e.exec(n);if(!r)return!1;for(var i=r[0],s=r.index,a=Object.create(null),l=function(e){if(void 0===r[e])return"continue";var n=t[e-1];"*"===n.modifier||"+"===n.modifier?a[n.name]=r[e].split(n.prefix+n.suffix).map((function(e){return o(e,n)})):a[n.name]=o(r[e],n)},c=1;c<r.length;c++)l(c);return{path:i,index:s,params:a}}}(ez(e,n,t),n,t)}function ZO(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function QO(e){return e&&e.sensitive?"":"i"}function JO(e,t,n){return function(e,t,n){void 0===n&&(n={});for(var r=n.strict,o=void 0!==r&&r,i=n.start,s=void 0===i||i,a=n.end,l=void 0===a||a,c=n.encode,u=void 0===c?function(e){return e}:c,d=n.delimiter,p=void 0===d?"/#?":d,f=n.endsWith,h="[".concat(ZO(void 0===f?"":f),"]|$"),m="[".concat(ZO(p),"]"),g=s?"^":"",v=0,b=e;v<b.length;v++){var x=b[v];if("string"==typeof x)g+=ZO(u(x));else{var y=ZO(u(x.prefix)),w=ZO(u(x.suffix));if(x.pattern)if(t&&t.push(x),y||w)if("+"===x.modifier||"*"===x.modifier){var _="*"===x.modifier?"?":"";g+="(?:".concat(y,"((?:").concat(x.pattern,")(?:").concat(w).concat(y,"(?:").concat(x.pattern,"))*)").concat(w,")").concat(_)}else g+="(?:".concat(y,"(").concat(x.pattern,")").concat(w,")").concat(x.modifier);else{if("+"===x.modifier||"*"===x.modifier)throw new TypeError('Can not repeat "'.concat(x.name,'" without a prefix and suffix'));g+="(".concat(x.pattern,")").concat(x.modifier)}else g+="(?:".concat(y).concat(w,")").concat(x.modifier)}}if(l)o||(g+="".concat(m,"?")),g+=n.endsWith?"(?=".concat(h,")"):"$";else{var S=e[e.length-1],C="string"==typeof S?m.indexOf(S[S.length-1])>-1:void 0===S;o||(g+="(?:".concat(m,"(?=").concat(h,"))?")),C||(g+="(?=".concat(m,"|").concat(h,")"))}return new RegExp(g,QO(n))}(YO(e,n),t,n)}function ez(e,t,n){return e instanceof RegExp?function(e,t){if(!t)return e;for(var n=/\((?:\?<(.*?)>)?(?!\?)/g,r=0,o=n.exec(e.source);o;)t.push({name:o[1]||r++,prefix:"",suffix:"",modifier:"",pattern:""}),o=n.exec(e.source);return e}(e,t):Array.isArray(e)?function(e,t,n){var r=e.map((function(e){return ez(e,t,n).source}));return new RegExp("(?:".concat(r.join("|"),")"),QO(n))}(e,t,n):JO(e,t,n)}function tz(e,t){return XO(t,{decode:decodeURIComponent})(e)}const nz=(0,c.createContext)({location:{},goTo:()=>{},goBack:()=>{},goToParent:()=>{},addScreen:()=>{},removeScreen:()=>{},params:{}});const rz={name:"xpkswc",styles:"overflow-x:hidden;contain:content"},oz=xl({"0%":{opacity:0,transform:"translateX( 50px )"},"100%":{opacity:1,transform:"none"}}),iz=xl({"0%":{opacity:0,transform:"translateX( -50px )"},"100%":{opacity:1,transform:"none"}}),sz=e=>bl("overflow-x:auto;max-height:100%;",(({isInitial:e,isBack:t,isRTL:n})=>{if(e&&!t)return;return bl("animation-duration:0.14s;animation-timing-function:ease-in-out;will-change:transform,opacity;animation-name:",n&&t||!n&&!t?oz:iz,";@media ( prefers-reduced-motion ){animation-duration:0s;}","")})(e),";","");function az(e,t,n={}){var r;const{focusSelectors:o}=e,i={...e.currentLocation},{isBack:s=!1,skipFocus:a=!1,replace:l,focusTargetSelector:c,...u}=n;if(i.path===t)return{currentLocation:i,focusSelectors:o};let d,p;function f(){var t;return d=null!==(t=d)&&void 0!==t?t:new Map(e.focusSelectors),d}return c&&i.path&&f().set(i.path,c),o.get(t)&&(s&&(p=o.get(t)),f().delete(t)),{currentLocation:{...u,isInitial:!1,path:t,isBack:s,hasRestoredFocus:!1,focusTargetSelector:p,skipFocus:a},focusSelectors:null!==(r=d)&&void 0!==r?r:o}}function lz(e,t={}){const{screens:n,focusSelectors:r}=e,o={...e.currentLocation},i=o.path;if(void 0===i)return{currentLocation:o,focusSelectors:r};const s=function(e,t){if(!e.startsWith("/"))return;const n=e.split("/");let r;for(;n.length>1&&void 0===r;){n.pop();const e=""===n.join("/")?"/":n.join("/");t.find((t=>!1!==tz(e,t.path)))&&(r=e)}return r}(i,n);return void 0===s?{currentLocation:o,focusSelectors:r}:az(e,s,{...t,isBack:!0})}function cz(e,t){let{screens:n,currentLocation:r,matchedPath:o,focusSelectors:i,...s}=e;switch(t.type){case"add":n=function({screens:e},t){return e.some((e=>e.path===t.path))?e:[...e,t]}(e,t.screen);break;case"remove":n=function({screens:e},t){return e.filter((e=>e.id!==t.id))}(e,t.screen);break;case"goto":({currentLocation:r,focusSelectors:i}=az(e,t.path,t.options));break;case"gotoparent":({currentLocation:r,focusSelectors:i}=lz(e,t.options))}if(n===e.screens&&r===e.currentLocation)return e;const a=r.path;return o=void 0!==a?function(e,t){for(const n of t){const t=tz(e,n.path);if(t)return{params:t.params,id:n.id}}}(a,n):void 0,o&&e.matchedPath&&o.id===e.matchedPath.id&&ww()(o.params,e.matchedPath.params)&&(o=e.matchedPath),{...s,screens:n,currentLocation:r,matchedPath:o,focusSelectors:i}}const uz=Xa((function(e,t){const{initialPath:n,children:r,className:o,...i}=Ya(e,"NavigatorProvider"),[s,a]=(0,c.useReducer)(cz,n,(e=>({screens:[],currentLocation:{path:e,isInitial:!0},matchedPath:void 0,focusSelectors:new Map,initialPath:n}))),l=(0,c.useMemo)((()=>({goBack:e=>a({type:"gotoparent",options:e}),goTo:(e,t)=>a({type:"goto",path:e,options:t}),goToParent:e=>{Fi()("wp.components.useNavigator().goToParent",{since:"6.7",alternative:"wp.components.useNavigator().goBack"}),a({type:"gotoparent",options:e})},addScreen:e=>a({type:"add",screen:e}),removeScreen:e=>a({type:"remove",screen:e})})),[]),{currentLocation:u,matchedPath:d}=s,p=(0,c.useMemo)((()=>{var e;return{location:u,params:null!==(e=d?.params)&&void 0!==e?e:{},match:d?.id,...l}}),[u,d,l]),f=qa(),h=(0,c.useMemo)((()=>f(rz,o)),[o,f]);return(0,wt.jsx)(dl,{ref:t,className:h,...i,children:(0,wt.jsx)(nz.Provider,{value:p,children:r})})}),"NavigatorProvider"),dz=window.wp.escapeHtml;const pz=Xa((function(e,t){/^\//.test(e.path);const n=(0,c.useId)(),{children:r,className:o,path:i,...s}=Ya(e,"NavigatorScreen"),{location:u,match:d,addScreen:p,removeScreen:f}=(0,c.useContext)(nz),h=d===n,m=(0,c.useRef)(null);(0,c.useEffect)((()=>{const e={id:n,path:(0,dz.escapeAttribute)(i)};return p(e),()=>f(e)}),[n,i,p,f]);const g=(0,a.isRTL)(),{isInitial:v,isBack:b}=u,x=qa(),y=(0,c.useMemo)((()=>x(sz({isInitial:v,isBack:b,isRTL:g}),o)),[o,x,v,b,g]),w=(0,c.useRef)(u);(0,c.useEffect)((()=>{w.current=u}),[u]);const _=u.isInitial&&!u.isBack;(0,c.useEffect)((()=>{if(_||!h||!m.current||w.current.hasRestoredFocus||u.skipFocus)return;const e=m.current.ownerDocument.activeElement;if(m.current.contains(e))return;let t=null;if(u.isBack&&u.focusTargetSelector&&(t=m.current.querySelector(u.focusTargetSelector)),!t){const[e]=DT.focus.tabbable.find(m.current);t=null!=e?e:m.current}w.current.hasRestoredFocus=!0,t.focus()}),[_,h,u.isBack,u.focusTargetSelector,u.skipFocus]);const S=(0,l.useMergeRefs)([t,m]);return h?(0,wt.jsx)(dl,{ref:S,className:y,...s,children:r}):null}),"NavigatorScreen");function fz(){const{location:e,params:t,goTo:n,goBack:r,goToParent:o}=(0,c.useContext)(nz);return{location:e,goTo:n,goBack:r,goToParent:o,params:t}}const hz=(e,t)=>`[${e}="${t}"]`;const mz=Xa((function(e,t){const n=function(e){const{path:t,onClick:n,as:r=sy,attributeName:o="id",...i}=Ya(e,"NavigatorButton"),s=(0,dz.escapeAttribute)(t),{goTo:a}=fz();return{as:r,onClick:(0,c.useCallback)((e=>{e.preventDefault(),a(s,{focusTargetSelector:hz(o,s)}),n?.(e)}),[a,n,o,s]),...i,[o]:s}}(e);return(0,wt.jsx)(dl,{ref:t,...n})}),"NavigatorButton");const gz=Xa((function(e,t){const n=function(e){const{onClick:t,as:n=sy,...r}=Ya(e,"NavigatorBackButton"),{goBack:o}=fz();return{as:n,onClick:(0,c.useCallback)((e=>{e.preventDefault(),o(),t?.(e)}),[o,t]),...r}}(e);return(0,wt.jsx)(dl,{ref:t,...n})}),"NavigatorBackButton");const vz=Xa((function(e,t){return Fi()("wp.components.NavigatorToParentButton",{since:"6.7",alternative:"wp.components.NavigatorBackButton"}),(0,wt.jsx)(gz,{ref:t,...e})}),"NavigatorToParentButton"),bz=()=>{};function xz(e){switch(e){case"success":case"warning":case"info":return"polite";default:return"assertive"}}function yz(e){switch(e){case"warning":return(0,a.__)("Warning notice");case"info":return(0,a.__)("Information notice");case"error":return(0,a.__)("Error notice");default:return(0,a.__)("Notice")}}const wz=function({className:e,status:t="info",children:n,spokenMessage:r=n,onRemove:o=bz,isDismissible:i=!0,actions:l=[],politeness:u=xz(t),__unstableHTML:d,onDismiss:p=bz}){!function(e,t){const n="string"==typeof e?e:(0,c.renderToString)(e);(0,c.useEffect)((()=>{n&&(0,My.speak)(n,t)}),[n,t])}(r,u);const f=s(e,"components-notice","is-"+t,{"is-dismissible":i});return d&&"string"==typeof n&&(n=(0,wt.jsx)(c.RawHTML,{children:n})),(0,wt.jsxs)("div",{className:f,children:[(0,wt.jsx)(pl,{children:yz(t)}),(0,wt.jsxs)("div",{className:"components-notice__content",children:[n,(0,wt.jsx)("div",{className:"components-notice__actions",children:l.map((({className:e,label:t,isPrimary:n,variant:r,noDefaultClasses:o=!1,onClick:i,url:a},l)=>{let c=r;return"primary"===r||o||(c=a?"link":"secondary"),void 0===c&&n&&(c="primary"),(0,wt.jsx)(sy,{href:a,variant:c,onClick:a?void 0:i,className:s("components-notice__action",e),children:t},l)}))})]}),i&&(0,wt.jsx)(sy,{className:"components-notice__dismiss",icon:Gy,label:(0,a.__)("Close"),onClick:()=>{p(),o()}})]})},_z=()=>{};const Sz=function({notices:e,onRemove:t=_z,className:n,children:r}){const o=e=>()=>t(e);return n=s("components-notice-list",n),(0,wt.jsxs)("div",{className:n,children:[r,[...e].reverse().map((e=>{const{content:t,...n}=e;return(0,B.createElement)(wz,{...n,key:e.id,onRemove:o(e.id)},e.content)}))]})};const Cz=function({label:e,children:t}){return(0,wt.jsxs)("div",{className:"components-panel__header",children:[e&&(0,wt.jsx)("h2",{children:e}),t]})};const kz=(0,c.forwardRef)((function({header:e,className:t,children:n},r){const o=s(t,"components-panel");return(0,wt.jsxs)("div",{className:o,ref:r,children:[e&&(0,wt.jsx)(Cz,{label:e}),n]})})),jz=(0,wt.jsx)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,wt.jsx)(n.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})}),Ez=()=>{};const Pz=(0,c.forwardRef)((({isOpened:e,icon:t,title:n,...r},o)=>n?(0,wt.jsx)("h2",{className:"components-panel__body-title",children:(0,wt.jsxs)(sy,{className:"components-panel__body-toggle","aria-expanded":e,ref:o,...r,children:[(0,wt.jsx)("span",{"aria-hidden":"true",children:(0,wt.jsx)(ry,{className:"components-panel__arrow",icon:e?jz:bS})}),n,t&&(0,wt.jsx)(ry,{icon:t,className:"components-panel__icon",size:20})]})}):null)),Tz=(0,c.forwardRef)((function(e,t){const{buttonProps:n={},children:r,className:o,icon:i,initialOpen:a,onToggle:u=Ez,opened:d,title:p,scrollAfterOpen:f=!0}=e,[h,m]=CS(d,{initial:void 0===a||a,fallback:!1}),g=(0,c.useRef)(null),v=(0,l.useReducedMotion)()?"auto":"smooth",b=(0,c.useRef)();b.current=f,ns((()=>{h&&b.current&&g.current?.scrollIntoView&&g.current.scrollIntoView({inline:"nearest",block:"nearest",behavior:v})}),[h,v]);const x=s("components-panel__body",o,{"is-opened":h});return(0,wt.jsxs)("div",{className:x,ref:(0,l.useMergeRefs)([g,t]),children:[(0,wt.jsx)(Pz,{icon:i,isOpened:Boolean(h),onClick:e=>{e.preventDefault();const t=!h;m(t),u(t)},title:p,...n}),"function"==typeof r?r({opened:Boolean(h)}):h&&r]})})),Rz=Tz;const Iz=(0,c.forwardRef)((function({className:e,children:t},n){return(0,wt.jsx)("div",{className:s("components-panel__row",e),ref:n,children:t})})),Nz=(0,wt.jsx)(n.SVG,{className:"components-placeholder__illustration",fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 60 60",preserveAspectRatio:"none",children:(0,wt.jsx)(n.Path,{vectorEffect:"non-scaling-stroke",d:"M60 60 0 0"})});const Mz=function(e){const{icon:t,children:n,label:r,instructions:o,className:i,notices:a,preview:u,isColumnLayout:d,withIllustration:p,...f}=e,[h,{width:m}]=(0,l.useResizeObserver)();let g;"number"==typeof m&&(g={"is-large":m>=480,"is-medium":m>=160&&m<480,"is-small":m<160});const v=s("components-placeholder",i,g,p?"has-illustration":null),b=s("components-placeholder__fieldset",{"is-column-layout":d});return(0,c.useEffect)((()=>{o&&(0,My.speak)(o)}),[o]),(0,wt.jsxs)("div",{...f,className:v,children:[p?Nz:null,h,a,u&&(0,wt.jsx)("div",{className:"components-placeholder__preview",children:u}),(0,wt.jsxs)("div",{className:"components-placeholder__label",children:[(0,wt.jsx)(ry,{icon:t}),r]}),!!o&&(0,wt.jsx)("div",{className:"components-placeholder__instructions",children:o}),(0,wt.jsx)("div",{className:b,children:n})]})};function Az(e=!1){const t=e?"right":"left";return xl({"0%":{[t]:"-50%"},"100%":{[t]:"100%"}})}const Dz=cl("div",{target:"e15u147w2"})("position:relative;overflow:hidden;height:",Tl.borderWidthFocus,";background-color:color-mix(\n\t\tin srgb,\n\t\t",jl.theme.foreground,",\n\t\ttransparent 90%\n\t);border-radius:",Tl.radiusFull,";outline:2px solid transparent;outline-offset:2px;:where( & ){width:160px;}");var Oz={name:"152sa26",styles:"width:var(--indicator-width);transition:width 0.4s ease-in-out"};const zz=cl("div",{target:"e15u147w1"})("display:inline-block;position:absolute;top:0;height:100%;border-radius:",Tl.radiusFull,";background-color:color-mix(\n\t\tin srgb,\n\t\t",jl.theme.foreground,",\n\t\ttransparent 10%\n\t);outline:2px solid transparent;outline-offset:-2px;",(({isIndeterminate:e})=>e?bl({animationDuration:"1.5s",animationTimingFunction:"ease-in-out",animationIterationCount:"infinite",animationName:Az((0,a.isRTL)()),width:"50%"},"",""):Oz),";"),Lz=cl("progress",{target:"e15u147w0"})({name:"11fb690",styles:"position:absolute;top:0;left:0;opacity:0;width:100%;height:100%"});const Fz=(0,c.forwardRef)((function(e,t){const{className:n,value:r,...o}=e,i=!Number.isFinite(r);return(0,wt.jsxs)(Dz,{className:n,children:[(0,wt.jsx)(zz,{style:{"--indicator-width":i?void 0:`${r}%`},isIndeterminate:i}),(0,wt.jsx)(Lz,{max:100,value:r,"aria-label":(0,a.__)("Loading …"),ref:t,...o})]})})),Bz=e=>e.every((e=>null!==e.parent));function Vz(e){const t=e.map((e=>({children:[],parent:null,...e,id:String(e.id)})));if(!Bz(t))return t;const n=t.reduce(((e,t)=>{const{parent:n}=t;return e[n]||(e[n]=[]),e[n].push(t),e}),{}),r=e=>e.map((e=>{const t=n[e.id];return{...e,children:t&&t.length?r(t):[]}}));return r(n[0]||[])}const $z=window.wp.htmlEntities,Hz={BaseControl:{_overrides:{__associatedWPComponentName:"TreeSelect"}}};function Wz(e,t=0){return e.flatMap((e=>[{value:e.id,label:" ".repeat(3*t)+(0,$z.decodeEntities)(e.name)},...Wz(e.children||[],t+1)]))}const Uz=function(e){const{label:t,noOptionLabel:n,onChange:r,selectedId:o,tree:i=[],...s}=_b(e),a=(0,c.useMemo)((()=>[n&&{value:"",label:n},...Wz(i)].filter((e=>!!e))),[n,i]);return(0,wt.jsx)(is,{value:Hz,children:(0,wt.jsx)(wS,{label:t,options:a,onChange:r,value:o,...s})})};function Gz({__next40pxDefaultSize:e,label:t,noOptionLabel:n,authorList:r,selectedAuthorId:o,onChange:i}){if(!r)return null;const s=Vz(r);return(0,wt.jsx)(Uz,{label:t,noOptionLabel:n,onChange:i,tree:s,selectedId:void 0!==o?String(o):void 0,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:e})}function Kz({__next40pxDefaultSize:e,label:t,noOptionLabel:n,categoriesList:r,selectedCategoryId:o,onChange:i,...s}){const a=(0,c.useMemo)((()=>Vz(r)),[r]);return(0,wt.jsx)(Uz,{label:t,noOptionLabel:n,onChange:i,tree:a,selectedId:void 0!==o?String(o):void 0,...s,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:e})}function qz(e){return"categoriesList"in e}function Yz(e){return"categorySuggestions"in e}const Xz=function({authorList:e,selectedAuthorId:t,numberOfItems:n,order:r,orderBy:o,maxItems:i=100,minItems:s=1,onAuthorChange:l,onNumberOfItemsChange:c,onOrderChange:u,onOrderByChange:d,...p}){return(0,wt.jsx)(jk,{spacing:"4",className:"components-query-controls",children:[u&&d&&(0,wt.jsx)(_S,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,a.__)("Order by"),value:void 0===o||void 0===r?void 0:`${o}/${r}`,options:[{label:(0,a.__)("Newest to oldest"),value:"date/desc"},{label:(0,a.__)("Oldest to newest"),value:"date/asc"},{label:(0,a.__)("A → Z"),value:"title/asc"},{label:(0,a.__)("Z → A"),value:"title/desc"}],onChange:e=>{if("string"!=typeof e)return;const[t,n]=e.split("/");n!==r&&u(n),t!==o&&d(t)}},"query-controls-order-select"),qz(p)&&p.categoriesList&&p.onCategoryChange&&(0,wt.jsx)(Kz,{__next40pxDefaultSize:!0,categoriesList:p.categoriesList,label:(0,a.__)("Category"),noOptionLabel:(0,a._x)("All","categories"),selectedCategoryId:p.selectedCategoryId,onChange:p.onCategoryChange},"query-controls-category-select"),Yz(p)&&p.categorySuggestions&&p.onCategoryChange&&(0,wt.jsx)(LD,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,a.__)("Categories"),value:p.selectedCategories&&p.selectedCategories.map((e=>({id:e.id,value:e.name||e.value}))),suggestions:Object.keys(p.categorySuggestions),onChange:p.onCategoryChange,maxSuggestions:20},"query-controls-categories-select"),l&&(0,wt.jsx)(Gz,{__next40pxDefaultSize:!0,authorList:e,label:(0,a.__)("Author"),noOptionLabel:(0,a._x)("All","authors"),selectedAuthorId:t,onChange:l},"query-controls-author-select"),c&&(0,wt.jsx)(dC,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,a.__)("Number of items"),value:n,onChange:c,min:s,max:i,required:!0},"query-controls-range-control")]})},Zz=(0,c.createContext)({store:void 0,disabled:void 0});const Qz=(0,c.forwardRef)((function({value:e,children:t,...n},r){const{store:o,disabled:i}=(0,c.useContext)(Zz),s=Qe(o,"value"),a=void 0!==s&&s===e;return(0,wt.jsx)(M_,{disabled:i,store:o,ref:r,value:e,render:(0,wt.jsx)(sy,{variant:a?"primary":"secondary",...n}),children:t||e})})),Jz=Qz;const eL=(0,c.forwardRef)((function({label:e,checked:t,defaultChecked:n,disabled:r,onChange:o,children:i,...s},a){const l=g_({value:t,defaultValue:n,setValue:e=>{o?.(null!=e?e:void 0)}}),u=(0,c.useMemo)((()=>({store:l,disabled:r})),[l,r]);return(0,wt.jsx)(Zz.Provider,{value:u,children:(0,wt.jsx)(__,{store:l,render:(0,wt.jsx)(CE,{children:i}),"aria-label":e,ref:a,...s})})})),tL=eL;function nL(e,t){return`${e}-${t}-option-description`}function rL(e,t){return`${e}-${t}`}function oL(e){return`${e}__help`}const iL=function e(t){const{label:n,className:r,selected:o,help:i,onChange:a,hideLabelFromVision:c,options:u=[],id:d,...p}=t,f=(0,l.useInstanceId)(e,"inspector-radio-control",d),h=e=>a(e.target.value);return u?.length?(0,wt.jsxs)("fieldset",{id:f,className:s(r,"components-radio-control"),"aria-describedby":i?oL(f):void 0,children:[c?(0,wt.jsx)(pl,{as:"legend",children:n}):(0,wt.jsx)(Qx.VisualLabel,{as:"legend",children:n}),(0,wt.jsx)(jk,{spacing:3,className:s("components-radio-control__group-wrapper",{"has-help":!!i}),children:u.map(((e,t)=>(0,wt.jsxs)("div",{className:"components-radio-control__option",children:[(0,wt.jsx)("input",{id:rL(f,t),className:"components-radio-control__input",type:"radio",name:f,value:e.value,onChange:h,checked:e.value===o,"aria-describedby":e.description?nL(f,t):void 0,...p}),(0,wt.jsx)("label",{className:"components-radio-control__label",htmlFor:rL(f,t),children:e.label}),e.description?(0,wt.jsx)(qx,{__nextHasNoMarginBottom:!0,id:nL(f,t),className:"components-radio-control__option-description",children:e.description}):null]},rL(f,t))))}),!!i&&(0,wt.jsx)(qx,{__nextHasNoMarginBottom:!0,id:oL(f),className:"components-base-control__help",children:i})]}):null};var sL=function(){var e=function(t,n){return e=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])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),aL=function(){return aL=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},aL.apply(this,arguments)},lL={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},cL={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},uL={width:"20px",height:"20px",position:"absolute"},dL={top:aL(aL({},lL),{top:"-5px"}),right:aL(aL({},cL),{left:void 0,right:"-5px"}),bottom:aL(aL({},lL),{top:void 0,bottom:"-5px"}),left:aL(aL({},cL),{left:"-5px"}),topRight:aL(aL({},uL),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:aL(aL({},uL),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:aL(aL({},uL),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:aL(aL({},uL),{left:"-10px",top:"-10px",cursor:"nw-resize"})},pL=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onMouseDown=function(e){t.props.onResizeStart(e,t.props.direction)},t.onTouchStart=function(e){t.props.onResizeStart(e,t.props.direction)},t}return sL(t,e),t.prototype.render=function(){return B.createElement("div",{className:this.props.className||"",style:aL(aL({position:"absolute",userSelect:"none"},dL[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},t}(B.PureComponent),fL=function(){var e=function(t,n){return e=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])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),hL=function(){return hL=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},hL.apply(this,arguments)},mL={width:"auto",height:"auto"},gL=function(e,t,n){return Math.max(Math.min(e,n),t)},vL=function(e,t){return Math.round(e/t)*t},bL=function(e,t){return new RegExp(e,"i").test(t)},xL=function(e){return Boolean(e.touches&&e.touches.length)},yL=function(e,t,n){void 0===n&&(n=0);var r=t.reduce((function(n,r,o){return Math.abs(r-e)<Math.abs(t[n]-e)?o:n}),0),o=Math.abs(t[r]-e);return 0===n||o<n?t[r]:e},wL=function(e){return"auto"===(e=e.toString())||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:e+"px"},_L=function(e,t,n,r){if(e&&"string"==typeof e){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%"))return t*(Number(e.replace("%",""))/100);if(e.endsWith("vw"))return n*(Number(e.replace("vw",""))/100);if(e.endsWith("vh"))return r*(Number(e.replace("vh",""))/100)}return e},SL=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],CL="__resizable_base__",kL=function(e){function t(t){var n=e.call(this,t)||this;return n.ratio=1,n.resizable=null,n.parentLeft=0,n.parentTop=0,n.resizableLeft=0,n.resizableRight=0,n.resizableTop=0,n.resizableBottom=0,n.targetLeft=0,n.targetTop=0,n.appendBase=function(){if(!n.resizable||!n.window)return null;var e=n.parentNode;if(!e)return null;var t=n.window.document.createElement("div");return t.style.width="100%",t.style.height="100%",t.style.position="absolute",t.style.transform="scale(0, 0)",t.style.left="0",t.style.flex="0 0 100%",t.classList?t.classList.add(CL):t.className+=CL,e.appendChild(t),t},n.removeBase=function(e){var t=n.parentNode;t&&t.removeChild(e)},n.ref=function(e){e&&(n.resizable=e)},n.state={isResizing:!1,width:void 0===(n.propsSize&&n.propsSize.width)?"auto":n.propsSize&&n.propsSize.width,height:void 0===(n.propsSize&&n.propsSize.height)?"auto":n.propsSize&&n.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},n.onResizeStart=n.onResizeStart.bind(n),n.onMouseMove=n.onMouseMove.bind(n),n.onMouseUp=n.onMouseUp.bind(n),n}return fL(t,e),Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||mL},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var e=0,t=0;if(this.resizable&&this.window){var n=this.resizable.offsetWidth,r=this.resizable.offsetHeight,o=this.resizable.style.position;"relative"!==o&&(this.resizable.style.position="relative"),e="auto"!==this.resizable.style.width?this.resizable.offsetWidth:n,t="auto"!==this.resizable.style.height?this.resizable.offsetHeight:r,this.resizable.style.position=o}return{width:e,height:t}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var e=this,t=this.props.size,n=function(t){if(void 0===e.state[t]||"auto"===e.state[t])return"auto";if(e.propsSize&&e.propsSize[t]&&e.propsSize[t].toString().endsWith("%")){if(e.state[t].toString().endsWith("%"))return e.state[t].toString();var n=e.getParentSize();return Number(e.state[t].toString().replace("px",""))/n[t]*100+"%"}return wL(e.state[t])};return{width:t&&void 0!==t.width&&!this.state.isResizing?wL(t.width):n("width"),height:t&&void 0!==t.height&&!this.state.isResizing?wL(t.height):n("height")}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var e=this.appendBase();if(!e)return{width:0,height:0};var t=!1,n=this.parentNode.style.flexWrap;"wrap"!==n&&(t=!0,this.parentNode.style.flexWrap="wrap"),e.style.position="relative",e.style.minWidth="100%",e.style.minHeight="100%";var r={width:e.offsetWidth,height:e.offsetHeight};return t&&(this.parentNode.style.flexWrap=n),this.removeBase(e),r},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(this.resizable&&this.window){var e=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==e.flexBasis?e.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(e,t){var n=this.propsSize&&this.propsSize[t];return"auto"!==this.state[t]||this.state.original[t]!==e||void 0!==n&&"auto"!==n?e:"auto"},t.prototype.calculateNewMaxFromBoundary=function(e,t){var n,r,o=this.props.boundsByDirection,i=this.state.direction,s=o&&bL("left",i),a=o&&bL("top",i);if("parent"===this.props.bounds){var l=this.parentNode;l&&(n=s?this.resizableRight-this.parentLeft:l.offsetWidth+(this.parentLeft-this.resizableLeft),r=a?this.resizableBottom-this.parentTop:l.offsetHeight+(this.parentTop-this.resizableTop))}else"window"===this.props.bounds?this.window&&(n=s?this.resizableRight:this.window.innerWidth-this.resizableLeft,r=a?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(n=s?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),r=a?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return n&&Number.isFinite(n)&&(e=e&&e<n?e:n),r&&Number.isFinite(r)&&(t=t&&t<r?t:r),{maxWidth:e,maxHeight:t}},t.prototype.calculateNewSizeFromDirection=function(e,t){var n=this.props.scale||1,r=this.props.resizeRatio||1,o=this.state,i=o.direction,s=o.original,a=this.props,l=a.lockAspectRatio,c=a.lockAspectRatioExtraHeight,u=a.lockAspectRatioExtraWidth,d=s.width,p=s.height,f=c||0,h=u||0;return bL("right",i)&&(d=s.width+(e-s.x)*r/n,l&&(p=(d-h)/this.ratio+f)),bL("left",i)&&(d=s.width-(e-s.x)*r/n,l&&(p=(d-h)/this.ratio+f)),bL("bottom",i)&&(p=s.height+(t-s.y)*r/n,l&&(d=(p-f)*this.ratio+h)),bL("top",i)&&(p=s.height-(t-s.y)*r/n,l&&(d=(p-f)*this.ratio+h)),{newWidth:d,newHeight:p}},t.prototype.calculateNewSizeFromAspectRatio=function(e,t,n,r){var o=this.props,i=o.lockAspectRatio,s=o.lockAspectRatioExtraHeight,a=o.lockAspectRatioExtraWidth,l=void 0===r.width?10:r.width,c=void 0===n.width||n.width<0?e:n.width,u=void 0===r.height?10:r.height,d=void 0===n.height||n.height<0?t:n.height,p=s||0,f=a||0;if(i){var h=(u-p)*this.ratio+f,m=(d-p)*this.ratio+f,g=(l-f)/this.ratio+p,v=(c-f)/this.ratio+p,b=Math.max(l,h),x=Math.min(c,m),y=Math.max(u,g),w=Math.min(d,v);e=gL(e,b,x),t=gL(t,y,w)}else e=gL(e,l,c),t=gL(t,u,d);return{newWidth:e,newHeight:t}},t.prototype.setBoundingClientRect=function(){if("parent"===this.props.bounds){var e=this.parentNode;if(e){var t=e.getBoundingClientRect();this.parentLeft=t.left,this.parentTop=t.top}}if(this.props.bounds&&"string"!=typeof this.props.bounds){var n=this.props.bounds.getBoundingClientRect();this.targetLeft=n.left,this.targetTop=n.top}if(this.resizable){var r=this.resizable.getBoundingClientRect(),o=r.left,i=r.top,s=r.right,a=r.bottom;this.resizableLeft=o,this.resizableRight=s,this.resizableTop=i,this.resizableBottom=a}},t.prototype.onResizeStart=function(e,t){if(this.resizable&&this.window){var n,r=0,o=0;if(e.nativeEvent&&function(e){return Boolean((e.clientX||0===e.clientX)&&(e.clientY||0===e.clientY))}(e.nativeEvent)?(r=e.nativeEvent.clientX,o=e.nativeEvent.clientY):e.nativeEvent&&xL(e.nativeEvent)&&(r=e.nativeEvent.touches[0].clientX,o=e.nativeEvent.touches[0].clientY),this.props.onResizeStart)if(this.resizable)if(!1===this.props.onResizeStart(e,t,this.resizable))return;this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio="number"==typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height;var i=this.window.getComputedStyle(this.resizable);if("auto"!==i.flexBasis){var s=this.parentNode;if(s){var a=this.window.getComputedStyle(s).flexDirection;this.flexDir=a.startsWith("row")?"row":"column",n=i.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var l={original:{x:r,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:hL(hL({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(e.target).cursor||"auto"}),direction:t,flexBasis:n};this.setState(l)}},t.prototype.onMouseMove=function(e){var t=this;if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&xL(e))try{e.preventDefault(),e.stopPropagation()}catch(e){}var n=this.props,r=n.maxWidth,o=n.maxHeight,i=n.minWidth,s=n.minHeight,a=xL(e)?e.touches[0].clientX:e.clientX,l=xL(e)?e.touches[0].clientY:e.clientY,c=this.state,u=c.direction,d=c.original,p=c.width,f=c.height,h=this.getParentSize(),m=function(e,t,n,r,o,i,s){return r=_L(r,e.width,t,n),o=_L(o,e.height,t,n),i=_L(i,e.width,t,n),s=_L(s,e.height,t,n),{maxWidth:void 0===r?void 0:Number(r),maxHeight:void 0===o?void 0:Number(o),minWidth:void 0===i?void 0:Number(i),minHeight:void 0===s?void 0:Number(s)}}(h,this.window.innerWidth,this.window.innerHeight,r,o,i,s);r=m.maxWidth,o=m.maxHeight,i=m.minWidth,s=m.minHeight;var g=this.calculateNewSizeFromDirection(a,l),v=g.newHeight,b=g.newWidth,x=this.calculateNewMaxFromBoundary(r,o);this.props.snap&&this.props.snap.x&&(b=yL(b,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(v=yL(v,this.props.snap.y,this.props.snapGap));var y=this.calculateNewSizeFromAspectRatio(b,v,{width:x.maxWidth,height:x.maxHeight},{width:i,height:s});if(b=y.newWidth,v=y.newHeight,this.props.grid){var w=vL(b,this.props.grid[0]),_=vL(v,this.props.grid[1]),S=this.props.snapGap||0;b=0===S||Math.abs(w-b)<=S?w:b,v=0===S||Math.abs(_-v)<=S?_:v}var C={width:b-d.width,height:v-d.height};if(p&&"string"==typeof p)if(p.endsWith("%"))b=b/h.width*100+"%";else if(p.endsWith("vw")){b=b/this.window.innerWidth*100+"vw"}else if(p.endsWith("vh")){b=b/this.window.innerHeight*100+"vh"}if(f&&"string"==typeof f)if(f.endsWith("%"))v=v/h.height*100+"%";else if(f.endsWith("vw")){v=v/this.window.innerWidth*100+"vw"}else if(f.endsWith("vh")){v=v/this.window.innerHeight*100+"vh"}var k={width:this.createSizeForCssProperty(b,"width"),height:this.createSizeForCssProperty(v,"height")};"row"===this.flexDir?k.flexBasis=k.width:"column"===this.flexDir&&(k.flexBasis=k.height),(0,Or.flushSync)((function(){t.setState(k)})),this.props.onResize&&this.props.onResize(e,u,this.resizable,C)}},t.prototype.onMouseUp=function(e){var t=this.state,n=t.isResizing,r=t.direction,o=t.original;if(n&&this.resizable){var i={width:this.size.width-o.width,height:this.size.height-o.height};this.props.onResizeStop&&this.props.onResizeStop(e,r,this.resizable,i),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:hL(hL({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(e){this.setState({width:e.width,height:e.height})},t.prototype.renderResizer=function(){var e=this,t=this.props,n=t.enable,r=t.handleStyles,o=t.handleClasses,i=t.handleWrapperStyle,s=t.handleWrapperClass,a=t.handleComponent;if(!n)return null;var l=Object.keys(n).map((function(t){return!1!==n[t]?B.createElement(pL,{key:t,direction:t,onResizeStart:e.onResizeStart,replaceStyles:r&&r[t],className:o&&o[t]},a&&a[t]?a[t]:null):null}));return B.createElement("div",{className:s,style:i},l)},t.prototype.render=function(){var e=this,t=Object.keys(this.props).reduce((function(t,n){return-1!==SL.indexOf(n)||(t[n]=e.props[n]),t}),{}),n=hL(hL(hL({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(n.flexBasis=this.state.flexBasis);var r=this.props.as||"div";return B.createElement(r,hL({ref:this.ref,style:n,className:this.props.className},t),this.state.isResizing&&B.createElement("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer())},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(B.PureComponent);const jL=()=>{},EL={bottom:"bottom",corner:"corner"};function PL({axis:e,fadeTimeout:t=180,onResize:n=jL,position:r=EL.bottom,showPx:o=!1}){const[i,s]=(0,l.useResizeObserver)(),a=!!e,[u,d]=(0,c.useState)(!1),[p,f]=(0,c.useState)(!1),{width:h,height:m}=s,g=(0,c.useRef)(m),v=(0,c.useRef)(h),b=(0,c.useRef)(),x=(0,c.useCallback)((()=>{b.current&&window.clearTimeout(b.current),b.current=window.setTimeout((()=>{a||(d(!1),f(!1))}),t)}),[t,a]);(0,c.useEffect)((()=>{if(!(null!==h||null!==m))return;const e=h!==v.current,t=m!==g.current;if(e||t){if(h&&!v.current&&m&&!g.current)return v.current=h,void(g.current=m);e&&(d(!0),v.current=h),t&&(f(!0),g.current=m),n({width:h,height:m}),x()}}),[h,m,n,x]);const y=function({axis:e,height:t,moveX:n=!1,moveY:r=!1,position:o=EL.bottom,showPx:i=!1,width:s}){if(!n&&!r)return;if(o===EL.corner)return`${s} x ${t}`;const a=i?" px":"";if(e){if("x"===e&&n)return`${s}${a}`;if("y"===e&&r)return`${t}${a}`}if(n&&r)return`${s} x ${t}`;if(n)return`${s}${a}`;if(r)return`${t}${a}`;return}({axis:e,height:m,moveX:u,moveY:p,position:r,showPx:o,width:h});return{label:y,resizeListener:i}}const TL=cl("div",{target:"e1wq7y4k3"})({name:"1cd7zoc",styles:"bottom:0;box-sizing:border-box;left:0;pointer-events:none;position:absolute;right:0;top:0"}),RL=cl("div",{target:"e1wq7y4k2"})({name:"ajymcs",styles:"align-items:center;box-sizing:border-box;display:inline-flex;justify-content:center;opacity:0;pointer-events:none;transition:opacity 120ms linear"}),IL=cl("div",{target:"e1wq7y4k1"})("background:",jl.theme.foreground,";border-radius:",Tl.radiusSmall,";box-sizing:border-box;font-family:",Fx("default.fontFamily"),";font-size:12px;color:",jl.theme.foregroundInverted,";padding:4px 8px;position:relative;"),NL=cl(Xv,{target:"e1wq7y4k0"})("&&&{color:",jl.theme.foregroundInverted,";display:block;font-size:13px;line-height:1.4;white-space:nowrap;}");const ML=(0,c.forwardRef)((function({label:e,position:t=EL.corner,zIndex:n=1e3,...r},o){const i=!!e,s=t===EL.bottom,l=t===EL.corner;if(!i)return null;let c={opacity:i?1:void 0,zIndex:n},u={};return s&&(c={...c,position:"absolute",bottom:-10,left:"50%",transform:"translate(-50%, 0)"},u={transform:"translate(0, 100%)"}),l&&(c={...c,position:"absolute",top:4,right:(0,a.isRTL)()?void 0:4,left:(0,a.isRTL)()?4:void 0}),(0,wt.jsx)(RL,{"aria-hidden":"true",className:"components-resizable-tooltip__tooltip-wrapper",ref:o,style:c,...r,children:(0,wt.jsx)(IL,{className:"components-resizable-tooltip__tooltip",style:u,children:(0,wt.jsx)(NL,{as:"span",children:e})})})})),AL=ML,DL=()=>{};const OL=(0,c.forwardRef)((function({axis:e,className:t,fadeTimeout:n=180,isVisible:r=!0,labelRef:o,onResize:i=DL,position:a=EL.bottom,showPx:l=!0,zIndex:c=1e3,...u},d){const{label:p,resizeListener:f}=PL({axis:e,fadeTimeout:n,onResize:i,showPx:l,position:a});if(!r)return null;const h=s("components-resize-tooltip",t);return(0,wt.jsxs)(TL,{"aria-hidden":"true",className:h,ref:d,...u,children:[f,(0,wt.jsx)(AL,{"aria-hidden":u["aria-hidden"],label:p,position:a,ref:o,zIndex:c})]})})),zL=OL,LL="components-resizable-box__handle",FL="components-resizable-box__side-handle",BL="components-resizable-box__corner-handle",VL={top:s(LL,FL,"components-resizable-box__handle-top"),right:s(LL,FL,"components-resizable-box__handle-right"),bottom:s(LL,FL,"components-resizable-box__handle-bottom"),left:s(LL,FL,"components-resizable-box__handle-left"),topLeft:s(LL,BL,"components-resizable-box__handle-top","components-resizable-box__handle-left"),topRight:s(LL,BL,"components-resizable-box__handle-top","components-resizable-box__handle-right"),bottomRight:s(LL,BL,"components-resizable-box__handle-bottom","components-resizable-box__handle-right"),bottomLeft:s(LL,BL,"components-resizable-box__handle-bottom","components-resizable-box__handle-left")},$L={width:void 0,height:void 0,top:void 0,right:void 0,bottom:void 0,left:void 0},HL={top:$L,right:$L,bottom:$L,left:$L,topLeft:$L,topRight:$L,bottomRight:$L,bottomLeft:$L};const WL=(0,c.forwardRef)((function({className:e,children:t,showHandle:n=!0,__experimentalShowTooltip:r=!1,__experimentalTooltipProps:o={},...i},a){return(0,wt.jsxs)(kL,{className:s("components-resizable-box__container",n&&"has-show-handle",e),handleClasses:VL,handleStyles:HL,ref:a,...i,children:[t,r&&(0,wt.jsx)(zL,{...o})]})}));const UL=function({naturalWidth:e,naturalHeight:t,children:n,isInline:r=!1}){if(1!==c.Children.count(n))return null;const o=r?"span":"div";let i;return e&&t&&(i=`${e} / ${t}`),(0,wt.jsx)(o,{className:"components-responsive-wrapper",children:(0,wt.jsx)("div",{children:(0,c.cloneElement)(n,{className:s("components-responsive-wrapper__content",n.props.className),style:{...n.props.style,aspectRatio:i}})})})},GL=function(){const{MutationObserver:e}=window;if(!e||!document.body||!window.parent)return;function t(){const e=document.body.getBoundingClientRect();window.parent.postMessage({action:"resize",width:e.width,height:e.height},"*")}function n(e){e.style&&["width","height","minHeight","maxHeight"].forEach((function(t){/^\\d+(vw|vh|svw|lvw|dvw|svh|lvh|dvh|vi|svi|lvi|dvi|vb|svb|lvb|dvb|vmin|svmin|lvmin|dvmin|vmax|svmax|lvmax|dvmax)$/.test(e.style[t])&&(e.style[t]="")}))}new e(t).observe(document.body,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0}),window.addEventListener("load",t,!0),Array.prototype.forEach.call(document.querySelectorAll("[style]"),n),Array.prototype.forEach.call(document.styleSheets,(function(e){Array.prototype.forEach.call(e.cssRules||e.rules,n)})),document.body.style.position="absolute",document.body.style.width="100%",document.body.setAttribute("data-resizable-iframe-connected",""),t(),window.addEventListener("resize",t,!0)};const KL=function({html:e="",title:t="",type:n,styles:r=[],scripts:o=[],onFocus:i,tabIndex:s}){const a=(0,c.useRef)(),[u,d]=(0,c.useState)(0),[p,f]=(0,c.useState)(0);function h(i=!1){if(!function(){try{return!!a.current?.contentDocument?.body}catch(e){return!1}}())return;const{contentDocument:s,ownerDocument:l}=a.current;if(!i&&null!==s?.body.getAttribute("data-resizable-iframe-connected"))return;const u=(0,wt.jsxs)("html",{lang:l.documentElement.lang,className:n,children:[(0,wt.jsxs)("head",{children:[(0,wt.jsx)("title",{children:t}),(0,wt.jsx)("style",{dangerouslySetInnerHTML:{__html:"\n\tbody {\n\t\tmargin: 0;\n\t}\n\thtml,\n\tbody,\n\tbody > div {\n\t\twidth: 100%;\n\t}\n\thtml.wp-has-aspect-ratio,\n\tbody.wp-has-aspect-ratio,\n\tbody.wp-has-aspect-ratio > div,\n\tbody.wp-has-aspect-ratio > div iframe {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\toverflow: hidden; /* If it has an aspect ratio, it shouldn't scroll. */\n\t}\n\tbody > div > * {\n\t\tmargin-top: 0 !important; /* Has to have !important to override inline styles. */\n\t\tmargin-bottom: 0 !important;\n\t}\n"}}),r.map(((e,t)=>(0,wt.jsx)("style",{dangerouslySetInnerHTML:{__html:e}},t)))]}),(0,wt.jsxs)("body",{"data-resizable-iframe-connected":"data-resizable-iframe-connected",className:n,children:[(0,wt.jsx)("div",{dangerouslySetInnerHTML:{__html:e}}),(0,wt.jsx)("script",{type:"text/javascript",dangerouslySetInnerHTML:{__html:`(${GL.toString()})();`}}),o.map((e=>(0,wt.jsx)("script",{src:e},e)))]})]});s.open(),s.write("<!DOCTYPE html>"+(0,c.renderToString)(u)),s.close()}return(0,c.useEffect)((()=>{function e(){h(!1)}function t(e){const t=a.current;if(!t||t.contentWindow!==e.source)return;let n=e.data||{};if("string"==typeof n)try{n=JSON.parse(n)}catch(e){}"resize"===n.action&&(d(n.width),f(n.height))}h();const n=a.current,r=n?.ownerDocument?.defaultView;return n?.addEventListener("load",e,!1),r?.addEventListener("message",t),()=>{n?.removeEventListener("load",e,!1),r?.removeEventListener("message",t)}}),[]),(0,c.useEffect)((()=>{h()}),[t,r,o]),(0,c.useEffect)((()=>{h(!0)}),[e,n]),(0,wt.jsx)("iframe",{ref:(0,l.useMergeRefs)([a,(0,l.useFocusableIframe)()]),title:t,tabIndex:s,className:"components-sandbox",sandbox:"allow-scripts allow-same-origin allow-presentation",onFocus:i,width:Math.ceil(u),height:Math.ceil(p)})};const qL=(0,c.forwardRef)((function({className:e,children:t,spokenMessage:n=t,politeness:r="polite",actions:o=[],onRemove:i,icon:l=null,explicitDismiss:u=!1,onDismiss:d,listRef:p},f){function h(e){e&&e.preventDefault&&e.preventDefault(),p?.current?.focus(),d?.(),i?.()}!function(e,t){const n="string"==typeof e?e:(0,c.renderToString)(e);(0,c.useEffect)((()=>{n&&(0,My.speak)(n,t)}),[n,t])}(n,r);const m=(0,c.useRef)({onDismiss:d,onRemove:i});(0,c.useLayoutEffect)((()=>{m.current={onDismiss:d,onRemove:i}})),(0,c.useEffect)((()=>{const e=setTimeout((()=>{u||(m.current.onDismiss?.(),m.current.onRemove?.())}),1e4);return()=>clearTimeout(e)}),[u]);const g=s(e,"components-snackbar",{"components-snackbar-explicit-dismiss":!!u});o&&o.length>1&&(o=[o[0]]);const v=s("components-snackbar__content",{"components-snackbar__content-with-icon":!!l});return(0,wt.jsx)("div",{ref:f,className:g,onClick:u?void 0:h,tabIndex:0,role:u?void 0:"button",onKeyPress:u?void 0:h,"aria-label":u?void 0:(0,a.__)("Dismiss this notice"),"data-testid":"snackbar",children:(0,wt.jsxs)("div",{className:v,children:[l&&(0,wt.jsx)("div",{className:"components-snackbar__icon",children:l}),t,o.map((({label:e,onClick:t,url:n},r)=>(0,wt.jsx)(sy,{href:n,variant:"tertiary",onClick:e=>function(e,t){e.stopPropagation(),i?.(),t&&t(e)}(e,t),className:"components-snackbar__action",children:e},r))),u&&(0,wt.jsx)("span",{role:"button","aria-label":(0,a.__)("Dismiss this notice"),tabIndex:0,className:"components-snackbar__dismiss-button",onClick:h,onKeyPress:h,children:"✕"})]})})})),YL=qL,XL={init:{height:0,opacity:0},open:{height:"auto",opacity:1,transition:{height:{type:"tween",duration:.3,ease:[0,0,.2,1]},opacity:{type:"tween",duration:.25,delay:.05,ease:[0,0,.2,1]}}},exit:{opacity:0,transition:{type:"tween",duration:.1,ease:[0,0,.2,1]}}};const ZL=function({notices:e,className:t,children:n,onRemove:r}){const o=(0,c.useRef)(null),i=(0,l.useReducedMotion)();t=s("components-snackbar-list",t);const a=e=>()=>r?.(e.id);return(0,wt.jsxs)("div",{className:t,tabIndex:-1,ref:o,"data-testid":"snackbar-list",children:[n,(0,wt.jsx)(xg,{children:e.map((e=>{const{content:t,...n}=e;return(0,wt.jsx)(dg.div,{layout:!i,initial:"init",animate:"open",exit:"exit",variants:i?void 0:XL,children:(0,wt.jsx)("div",{className:"components-snackbar-list__notice-container",children:(0,wt.jsx)(YL,{...n,onRemove:a(e),listRef:o,children:e.content})})},e.id)}))})]})};const QL=xl`
from {
transform: rotate(0deg);
}
diff --git a/wp-includes/js/dist/editor.js b/wp-includes/js/dist/editor.js
index 7ecd987561..66afe28049 100644
--- a/wp-includes/js/dist/editor.js
+++ b/wp-includes/js/dist/editor.js
@@ -7529,7 +7529,7 @@ const reorderPage = {
/* harmony default export */ const reorder_page = (reorderPage);
;// CONCATENATED MODULE: ./node_modules/client-zip/index.js
-"stream"in Blob.prototype||Object.defineProperty(Blob.prototype,"stream",{value(){return new Response(this).body}}),"setBigUint64"in DataView.prototype||Object.defineProperty(DataView.prototype,"setBigUint64",{value(e,n,t){const i=Number(0xffffffffn&n),r=Number(n>>32n);this.setUint32(e+(t?0:4),i,t),this.setUint32(e+(t?4:0),r,t)}});var e=e=>new DataView(new ArrayBuffer(e)),n=e=>new Uint8Array(e.buffer||e),t=e=>(new TextEncoder).encode(String(e)),i=e=>Math.min(4294967295,Number(e)),r=e=>Math.min(65535,Number(e));function f(e,i){if(void 0===i||i instanceof Date||(i=new Date(i)),e instanceof File)return{isFile:1,t:i||new Date(e.lastModified),i:e.stream()};if(e instanceof Response)return{isFile:1,t:i||new Date(e.headers.get("Last-Modified")||Date.now()),i:e.body};if(void 0===i)i=new Date;else if(isNaN(i))throw new Error("Invalid modification date.");if(void 0===e)return{isFile:0,t:i};if("string"==typeof e)return{isFile:1,t:i,i:t(e)};if(e instanceof Blob)return{isFile:1,t:i,i:e.stream()};if(e instanceof Uint8Array||e instanceof ReadableStream)return{isFile:1,t:i,i:e};if(e instanceof ArrayBuffer||ArrayBuffer.isView(e))return{isFile:1,t:i,i:n(e)};if(Symbol.asyncIterator in e)return{isFile:1,t:i,i:o(e[Symbol.asyncIterator]())};throw new TypeError("Unsupported input format.")}function o(e,n=e){return new ReadableStream({async pull(n){let t=0;for(;n.desiredSize>t;){const i=await e.next();if(!i.value){n.close();break}{const e=a(i.value);n.enqueue(e),t+=e.byteLength}}},cancel(e){n.throw?.(e)}})}function a(e){return"string"==typeof e?t(e):e instanceof Uint8Array?e:n(e)}function s(e,i,r){let[f,o]=function(e){return e?e instanceof Uint8Array?[e,1]:ArrayBuffer.isView(e)||e instanceof ArrayBuffer?[n(e),1]:[t(e),0]:[void 0,0]}(i);if(e instanceof File)return{o:d(f||t(e.name)),u:BigInt(e.size),l:o};if(e instanceof Response){const n=e.headers.get("content-disposition"),i=n&&n.match(/;\s*filename\*?=["']?(.*?)["']?$/i),a=i&&i[1]||e.url&&new URL(e.url).pathname.split("/").findLast(Boolean),s=a&&decodeURIComponent(a),u=r||+e.headers.get("content-length");return{o:d(f||t(s)),u:BigInt(u),l:o}}return f=d(f,void 0!==e||void 0!==r),"string"==typeof e?{o:f,u:BigInt(t(e).length),l:o}:e instanceof Blob?{o:f,u:BigInt(e.size),l:o}:e instanceof ArrayBuffer||ArrayBuffer.isView(e)?{o:f,u:BigInt(e.byteLength),l:o}:{o:f,u:u(e,r),l:o}}function u(e,n){return n>-1?BigInt(n):e?void 0:0n}function d(e,n=1){if(!e||e.every((c=>47===c)))throw new Error("The file must have a name.");if(n)for(;47===e[e.length-1];)e=e.subarray(0,-1);else 47!==e[e.length-1]&&(e=new Uint8Array([...e,47]));return e}var l=new Uint32Array(256);for(let e=0;e<256;++e){let n=e;for(let e=0;e<8;++e)n=n>>>1^(1&n&&3988292384);l[e]=n}function y(e,n=0){n^=-1;for(var t=0,i=e.length;t<i;t++)n=n>>>8^l[255&n^e[t]];return(-1^n)>>>0}function w(e,n,t=0){const i=e.getSeconds()>>1|e.getMinutes()<<5|e.getHours()<<11,r=e.getDate()|e.getMonth()+1<<5|e.getFullYear()-1980<<9;n.setUint16(t,i,1),n.setUint16(t+2,r,1)}function B({o:e,l:n},t){return 8*(!n||(t??function(e){try{b.decode(e)}catch{return 0}return 1}(e)))}var b=new TextDecoder("utf8",{fatal:1});function p(t,i=0){const r=e(30);return r.setUint32(0,1347093252),r.setUint32(4,754976768|i),w(t.t,r,10),r.setUint16(26,t.o.length,1),n(r)}async function*g(e){let{i:n}=e;if("then"in n&&(n=await n),n instanceof Uint8Array)yield n,e.m=y(n,0),e.u=BigInt(n.length);else{e.u=0n;const t=n.getReader();for(;;){const{value:n,done:i}=await t.read();if(i)break;e.m=y(n,e.m),e.u+=BigInt(n.length),yield n}}}function I(t,r){const f=e(16+(r?8:0));return f.setUint32(0,1347094280),f.setUint32(4,t.isFile?t.m:0,1),r?(f.setBigUint64(8,t.u,1),f.setBigUint64(16,t.u,1)):(f.setUint32(8,i(t.u),1),f.setUint32(12,i(t.u),1)),n(f)}function v(t,r,f=0,o=0){const a=e(46);return a.setUint32(0,1347092738),a.setUint32(4,755182848),a.setUint16(8,2048|f),w(t.t,a,12),a.setUint32(16,t.isFile?t.m:0,1),a.setUint32(20,i(t.u),1),a.setUint32(24,i(t.u),1),a.setUint16(28,t.o.length,1),a.setUint16(30,o,1),a.setUint16(40,t.isFile?33204:16893,1),a.setUint32(42,i(r),1),n(a)}function h(t,i,r){const f=e(r);return f.setUint16(0,1,1),f.setUint16(2,r-4,1),16&r&&(f.setBigUint64(4,t.u,1),f.setBigUint64(12,t.u,1)),f.setBigUint64(r-8,i,1),n(f)}function D(e){return e instanceof File||e instanceof Response?[[e],[e]]:[[e.input,e.name,e.size],[e.input,e.lastModified]]}var S=e=>function(e){let n=BigInt(22),t=0n,i=0;for(const r of e){if(!r.o)throw new Error("Every file must have a non-empty name.");if(void 0===r.u)throw new Error(`Missing size for file "${(new TextDecoder).decode(r.o)}".`);const e=r.u>=0xffffffffn,f=t>=0xffffffffn;t+=BigInt(46+r.o.length+(e&&8))+r.u,n+=BigInt(r.o.length+46+(12*f|28*e)),i||(i=e)}return(i||t>=0xffffffffn)&&(n+=BigInt(76)),n+t}(function*(e){for(const n of e)yield s(...D(n)[0])}(e));function A(e,n={}){const t={"Content-Type":"application/zip","Content-Disposition":"attachment"};return("bigint"==typeof n.length||Number.isInteger(n.length))&&n.length>0&&(t["Content-Length"]=String(n.length)),n.metadata&&(t["Content-Length"]=String(S(n.metadata))),new Response(N(e,n),{headers:t})}function N(t,a={}){const u=function(e){const n=e[Symbol.iterator in e?Symbol.iterator:Symbol.asyncIterator]();return{async next(){const e=await n.next();if(e.done)return e;const[t,i]=D(e.value);return{done:0,value:Object.assign(f(...i),s(...t))}},throw:n.throw?.bind(n),[Symbol.asyncIterator](){return this}}}(t);return o(async function*(t,f){const o=[];let a=0n,s=0n,u=0;for await(const e of t){const n=B(e,f.buffersAreUTF8);yield p(e,n),yield new Uint8Array(e.o),e.isFile&&(yield*g(e));const t=e.u>=0xffffffffn,i=12*(a>=0xffffffffn)|28*t;yield I(e,t),o.push(v(e,a,n,i)),o.push(e.o),i&&o.push(h(e,a,i)),t&&(a+=8n),s++,a+=BigInt(46+e.o.length)+e.u,u||(u=t)}let d=0n;for(const e of o)yield e,d+=BigInt(e.length);if(u||a>=0xffffffffn){const t=e(76);t.setUint32(0,1347094022),t.setBigUint64(4,BigInt(44),1),t.setUint32(12,755182848),t.setBigUint64(24,s,1),t.setBigUint64(32,s,1),t.setBigUint64(40,d,1),t.setBigUint64(48,a,1),t.setUint32(56,1347094023),t.setBigUint64(64,a+d,1),t.setUint32(72,1,1),yield n(t)}const l=e(22);l.setUint32(0,1347093766),l.setUint16(8,r(s),1),l.setUint16(10,r(s),1),l.setUint32(12,i(d),1),l.setUint32(16,i(a),1),yield n(l)}(u,a),u)}
+"stream"in Blob.prototype||Object.defineProperty(Blob.prototype,"stream",{value(){return new Response(this).body}}),"setBigUint64"in DataView.prototype||Object.defineProperty(DataView.prototype,"setBigUint64",{value(e,n,t){const i=Number(0xffffffffn&n),r=Number(n>>32n);this.setUint32(e+(t?0:4),i,t),this.setUint32(e+(t?4:0),r,t)}});var e=e=>new DataView(new ArrayBuffer(e)),n=e=>new Uint8Array(e.buffer||e),t=e=>(new TextEncoder).encode(String(e)),i=e=>Math.min(4294967295,Number(e)),r=e=>Math.min(65535,Number(e));function f(e,i){if(void 0===i||i instanceof Date||(i=new Date(i)),e instanceof File)return{isFile:1,t:i||new Date(e.lastModified),i:e.stream()};if(e instanceof Response)return{isFile:1,t:i||new Date(e.headers.get("Last-Modified")||Date.now()),i:e.body};if(void 0===i)i=new Date;else if(isNaN(i))throw new Error("Invalid modification date.");if(void 0===e)return{isFile:0,t:i};if("string"==typeof e)return{isFile:1,t:i,i:t(e)};if(e instanceof Blob)return{isFile:1,t:i,i:e.stream()};if(e instanceof Uint8Array||e instanceof ReadableStream)return{isFile:1,t:i,i:e};if(e instanceof ArrayBuffer||ArrayBuffer.isView(e))return{isFile:1,t:i,i:n(e)};if(Symbol.asyncIterator in e)return{isFile:1,t:i,i:o(e[Symbol.asyncIterator]())};throw new TypeError("Unsupported input format.")}function o(e,n=e){return new ReadableStream({async pull(n){let t=0;for(;n.desiredSize>t;){const i=await e.next();if(!i.value){n.close();break}{const e=a(i.value);n.enqueue(e),t+=e.byteLength}}},cancel(e){n.throw?.(e)}})}function a(e){return"string"==typeof e?t(e):e instanceof Uint8Array?e:n(e)}function s(e,i,r){let[f,o]=function(e){return e?e instanceof Uint8Array?[e,1]:ArrayBuffer.isView(e)||e instanceof ArrayBuffer?[n(e),1]:[t(e),0]:[void 0,0]}(i);if(e instanceof File)return{o:d(f||t(e.name)),u:BigInt(e.size),l:o};if(e instanceof Response){const n=e.headers.get("content-disposition"),i=n&&n.match(/;\s*filename\*?\s*=\s*(?:UTF-\d+''|)["']?([^;"'\r\n]*)["']?(?:;|$)/i),a=i&&i[1]||e.url&&new URL(e.url).pathname.split("/").findLast(Boolean),s=a&&decodeURIComponent(a),u=r||+e.headers.get("content-length");return{o:d(f||t(s)),u:BigInt(u),l:o}}return f=d(f,void 0!==e||void 0!==r),"string"==typeof e?{o:f,u:BigInt(t(e).length),l:o}:e instanceof Blob?{o:f,u:BigInt(e.size),l:o}:e instanceof ArrayBuffer||ArrayBuffer.isView(e)?{o:f,u:BigInt(e.byteLength),l:o}:{o:f,u:u(e,r),l:o}}function u(e,n){return n>-1?BigInt(n):e?void 0:0n}function d(e,n=1){if(!e||e.every((c=>47===c)))throw new Error("The file must have a name.");if(n)for(;47===e[e.length-1];)e=e.subarray(0,-1);else 47!==e[e.length-1]&&(e=new Uint8Array([...e,47]));return e}var l=new Uint32Array(256);for(let e=0;e<256;++e){let n=e;for(let e=0;e<8;++e)n=n>>>1^(1&n&&3988292384);l[e]=n}function y(e,n=0){n^=-1;for(var t=0,i=e.length;t<i;t++)n=n>>>8^l[255&n^e[t]];return(-1^n)>>>0}function w(e,n,t=0){const i=e.getSeconds()>>1|e.getMinutes()<<5|e.getHours()<<11,r=e.getDate()|e.getMonth()+1<<5|e.getFullYear()-1980<<9;n.setUint16(t,i,1),n.setUint16(t+2,r,1)}function B({o:e,l:n},t){return 8*(!n||(t??function(e){try{b.decode(e)}catch{return 0}return 1}(e)))}var b=new TextDecoder("utf8",{fatal:1});function p(t,i=0){const r=e(30);return r.setUint32(0,1347093252),r.setUint32(4,754976768|i),w(t.t,r,10),r.setUint16(26,t.o.length,1),n(r)}async function*g(e){let{i:n}=e;if("then"in n&&(n=await n),n instanceof Uint8Array)yield n,e.m=y(n,0),e.u=BigInt(n.length);else{e.u=0n;const t=n.getReader();for(;;){const{value:n,done:i}=await t.read();if(i)break;e.m=y(n,e.m),e.u+=BigInt(n.length),yield n}}}function I(t,r){const f=e(16+(r?8:0));return f.setUint32(0,1347094280),f.setUint32(4,t.isFile?t.m:0,1),r?(f.setBigUint64(8,t.u,1),f.setBigUint64(16,t.u,1)):(f.setUint32(8,i(t.u),1),f.setUint32(12,i(t.u),1)),n(f)}function v(t,r,f=0,o=0){const a=e(46);return a.setUint32(0,1347092738),a.setUint32(4,755182848),a.setUint16(8,2048|f),w(t.t,a,12),a.setUint32(16,t.isFile?t.m:0,1),a.setUint32(20,i(t.u),1),a.setUint32(24,i(t.u),1),a.setUint16(28,t.o.length,1),a.setUint16(30,o,1),a.setUint16(40,t.isFile?33204:16893,1),a.setUint32(42,i(r),1),n(a)}function h(t,i,r){const f=e(r);return f.setUint16(0,1,1),f.setUint16(2,r-4,1),16&r&&(f.setBigUint64(4,t.u,1),f.setBigUint64(12,t.u,1)),f.setBigUint64(r-8,i,1),n(f)}function D(e){return e instanceof File||e instanceof Response?[[e],[e]]:[[e.input,e.name,e.size],[e.input,e.lastModified]]}var S=e=>function(e){let n=BigInt(22),t=0n,i=0;for(const r of e){if(!r.o)throw new Error("Every file must have a non-empty name.");if(void 0===r.u)throw new Error(`Missing size for file "${(new TextDecoder).decode(r.o)}".`);const e=r.u>=0xffffffffn,f=t>=0xffffffffn;t+=BigInt(46+r.o.length+(e&&8))+r.u,n+=BigInt(r.o.length+46+(12*f|28*e)),i||(i=e)}return(i||t>=0xffffffffn)&&(n+=BigInt(76)),n+t}(function*(e){for(const n of e)yield s(...D(n)[0])}(e));function A(e,n={}){const t={"Content-Type":"application/zip","Content-Disposition":"attachment"};return("bigint"==typeof n.length||Number.isInteger(n.length))&&n.length>0&&(t["Content-Length"]=String(n.length)),n.metadata&&(t["Content-Length"]=String(S(n.metadata))),new Response(N(e,n),{headers:t})}function N(t,a={}){const u=function(e){const n=e[Symbol.iterator in e?Symbol.iterator:Symbol.asyncIterator]();return{async next(){const e=await n.next();if(e.done)return e;const[t,i]=D(e.value);return{done:0,value:Object.assign(f(...i),s(...t))}},throw:n.throw?.bind(n),[Symbol.asyncIterator](){return this}}}(t);return o(async function*(t,f){const o=[];let a=0n,s=0n,u=0;for await(const e of t){const n=B(e,f.buffersAreUTF8);yield p(e,n),yield new Uint8Array(e.o),e.isFile&&(yield*g(e));const t=e.u>=0xffffffffn,i=12*(a>=0xffffffffn)|28*t;yield I(e,t),o.push(v(e,a,n,i)),o.push(e.o),i&&o.push(h(e,a,i)),t&&(a+=8n),s++,a+=BigInt(46+e.o.length)+e.u,u||(u=t)}let d=0n;for(const e of o)yield e,d+=BigInt(e.length);if(u||a>=0xffffffffn){const t=e(76);t.setUint32(0,1347094022),t.setBigUint64(4,BigInt(44),1),t.setUint32(12,755182848),t.setBigUint64(24,s,1),t.setBigUint64(32,s,1),t.setBigUint64(40,d,1),t.setBigUint64(48,a,1),t.setUint32(56,1347094023),t.setBigUint64(64,a+d,1),t.setUint32(72,1,1),yield n(t)}const l=e(22);l.setUint32(0,1347093766),l.setUint16(8,r(s),1),l.setUint16(10,r(s),1),l.setUint32(12,i(d),1),l.setUint32(16,i(a),1),yield n(l)}(u,a),u)}
;// CONCATENATED MODULE: external ["wp","blob"]
const external_wp_blob_namespaceObject = window["wp"]["blob"];
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/download.js
diff --git a/wp-includes/js/dist/editor.min.js b/wp-includes/js/dist/editor.min.js
index 45dcea47e4..4e16e48379 100644
--- a/wp-includes/js/dist/editor.min.js
+++ b/wp-includes/js/dist/editor.min.js
@@ -4,7 +4,7 @@
autosize 4.0.4
license: MIT
http://www.jacklmoore.com/autosize
-*/o=[e,t],s=function(e,t){"use strict";var s,o,n="function"==typeof Map?new Map:(s=[],o=[],{has:function(e){return s.indexOf(e)>-1},get:function(e){return o[s.indexOf(e)]},set:function(e,t){-1===s.indexOf(e)&&(s.push(e),o.push(t))},delete:function(e){var t=s.indexOf(e);t>-1&&(s.splice(t,1),o.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 r(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!n.has(e)){var t=null,s=null,o=null,r=function(){e.clientWidth!==s&&p()},a=function(t){window.removeEventListener("resize",r,!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(s){e.style[s]=t[s]})),n.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",r,!1),e.addEventListener("input",p,!1),e.addEventListener("autosize:update",p,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",n.set(e,{destroy:a,update:p}),l()}function l(){var s=window.getComputedStyle(e,null);"vertical"===s.resize?e.style.resize="none":"both"===s.resize&&(e.style.resize="horizontal"),t="content-box"===s.boxSizing?-(parseFloat(s.paddingTop)+parseFloat(s.paddingBottom)):parseFloat(s.borderTopWidth)+parseFloat(s.borderBottomWidth),isNaN(t)&&(t=0),p()}function c(t){var s=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=s,e.style.overflowY=t}function d(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 u(){if(0!==e.scrollHeight){var o=d(e),n=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+t+"px",s=e.clientWidth,o.forEach((function(e){e.node.scrollTop=e.scrollTop})),n&&(document.documentElement.scrollTop=n)}}function p(){u();var t=Math.round(parseFloat(e.style.height)),s=window.getComputedStyle(e,null),n="content-box"===s.boxSizing?Math.round(parseFloat(s.height)):e.offsetHeight;if(n<t?"hidden"===s.overflowY&&(c("scroll"),u(),n="content-box"===s.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==s.overflowY&&(c("hidden"),u(),n="content-box"===s.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),o!==n){o=n;var r=i("autosize:resized");try{e.dispatchEvent(r)}catch(e){}}}}function a(e){var t=n.get(e);t&&t.destroy()}function l(e){var t=n.get(e);t&&t.update()}var c=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((c=function(e){return e}).destroy=function(e){return e},c.update=function(e){return e}):((c=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],(function(e){return r(e,t)})),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],a),e},c.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],l),e}),t.default=c,e.exports=t.default},void 0===(n="function"==typeof s?s.apply(t,o):s)||(e.exports=n)},6109:e=>{e.exports=function(e,t,s){return((s=window.getComputedStyle)?s(e):e.currentStyle)[t.replace(/-(\w)/gi,(function(e,t){return t.toUpperCase()}))]}},66:e=>{"use strict";var t=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===s}(e)}(e)};var s="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function o(e,t){return!1!==t.clone&&t.isMergeableObject(e)?l((s=e,Array.isArray(s)?[]:{}),e,t):e;var s}function n(e,t,s){return e.concat(t).map((function(e){return o(e,s)}))}function i(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return Object.propertyIsEnumerable.call(e,t)})):[]}(e))}function r(e,t){try{return t in e}catch(e){return!1}}function a(e,t,s){var n={};return s.isMergeableObject(e)&&i(e).forEach((function(t){n[t]=o(e[t],s)})),i(t).forEach((function(i){(function(e,t){return r(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,i)||(r(e,i)&&s.isMergeableObject(t[i])?n[i]=function(e,t){if(!t.customMerge)return l;var s=t.customMerge(e);return"function"==typeof s?s:l}(i,s)(e[i],t[i],s):n[i]=o(t[i],s))})),n}function l(e,s,i){(i=i||{}).arrayMerge=i.arrayMerge||n,i.isMergeableObject=i.isMergeableObject||t,i.cloneUnlessOtherwiseSpecified=o;var r=Array.isArray(s);return r===Array.isArray(e)?r?i.arrayMerge(e,s,i):a(e,s,i):o(s,i)}l.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,s){return l(e,s,t)}),{})};var c=l;e.exports=c},5215:e=>{"use strict";e.exports=function e(t,s){if(t===s)return!0;if(t&&s&&"object"==typeof t&&"object"==typeof s){if(t.constructor!==s.constructor)return!1;var o,n,i;if(Array.isArray(t)){if((o=t.length)!=s.length)return!1;for(n=o;0!=n--;)if(!e(t[n],s[n]))return!1;return!0}if(t.constructor===RegExp)return t.source===s.source&&t.flags===s.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===s.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===s.toString();if((o=(i=Object.keys(t)).length)!==Object.keys(s).length)return!1;for(n=o;0!=n--;)if(!Object.prototype.hasOwnProperty.call(s,i[n]))return!1;for(n=o;0!=n--;){var r=i[n];if(!e(t[r],s[r]))return!1}return!0}return t!=t&&s!=s}},461:(e,t,s)=>{var o=s(6109);e.exports=function(e){var t=o(e,"line-height"),s=parseFloat(t,10);if(t===s+""){var n=e.style.lineHeight;e.style.lineHeight=t+"em",t=o(e,"line-height"),s=parseFloat(t,10),n?e.style.lineHeight=n:delete e.style.lineHeight}if(-1!==t.indexOf("pt")?(s*=4,s/=3):-1!==t.indexOf("mm")?(s*=96,s/=25.4):-1!==t.indexOf("cm")?(s*=96,s/=2.54):-1!==t.indexOf("in")?s*=96:-1!==t.indexOf("pc")&&(s*=16),s=Math.round(s),"normal"===t){var i=e.nodeName,r=document.createElement(i);r.innerHTML=" ","TEXTAREA"===i.toUpperCase()&&r.setAttribute("rows","1");var a=o(e,"font-size");r.style.fontSize=a,r.style.padding="0px",r.style.border="0px";var l=document.body;l.appendChild(r),s=r.offsetHeight,l.removeChild(r)}return s}},628:(e,t,s)=>{"use strict";var o=s(4067);function n(){}function i(){}i.resetWarningCache=n,e.exports=function(){function e(e,t,s,n,i,r){if(r!==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 s={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:n};return s.PropTypes=s,s}},5826:(e,t,s)=>{e.exports=s(628)()},4067:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},4462:function(e,t,s){"use strict";var o,n=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])},function(e,t){function s(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)}),i=this&&this.__assign||Object.assign||function(e){for(var t,s=1,o=arguments.length;s<o;s++)for(var n in t=arguments[s])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},r=this&&this.__rest||function(e,t){var s={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(s[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&(s[o[n]]=e[o[n]])}return s};t.__esModule=!0;var a=s(1609),l=s(5826),c=s(4306),d=s(461),u="autosize:resized",p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={lineHeight:null},t.textarea=null,t.onResize=function(e){t.props.onResize&&t.props.onResize(e)},t.updateLineHeight=function(){t.textarea&&t.setState({lineHeight:d(t.textarea)})},t.onChange=function(e){var s=t.props.onChange;t.currentValue=e.currentTarget.value,s&&s(e)},t}return n(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,s=t.maxRows,o=t.async;"number"==typeof s&&this.updateLineHeight(),"number"==typeof s||o?setTimeout((function(){return e.textarea&&c(e.textarea)})):this.textarea&&c(this.textarea),this.textarea&&this.textarea.addEventListener(u,this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener(u,this.onResize),c.destroy(this.textarea))},t.prototype.render=function(){var e=this,t=this.props,s=(t.onResize,t.maxRows),o=(t.onChange,t.style),n=(t.innerRef,t.children),l=r(t,["onResize","maxRows","onChange","style","innerRef","children"]),c=this.state.lineHeight,d=s&&c?c*s:null;return a.createElement("textarea",i({},l,{onChange:this.onChange,style:d?i({},o,{maxHeight:d}):o,ref:function(t){e.textarea=t,"function"==typeof e.props.innerRef?e.props.innerRef(t):e.props.innerRef&&(e.props.innerRef.current=t)}}),n)},t.prototype.componentDidUpdate=function(){this.textarea&&c.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:l.number,maxRows:l.number,onResize:l.func,innerRef:l.any,async:l.bool},t}(a.Component);t.TextareaAutosize=a.forwardRef((function(e,t){return a.createElement(p,i({},e,{innerRef:t}))}))},4132:(e,t,s)=>{"use strict";var o=s(4462);t.A=o.TextareaAutosize},9681:e=>{var t={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ả:"A",Ạ:"A",Ẩ:"A",Ẫ:"A",Ậ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ẻ:"E",Ẽ:"E",Ẹ:"E",Ể:"E",Ễ:"E",Ệ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ỉ:"I",Ị:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ỏ:"O",Ọ:"O",Ổ:"O",Ỗ:"O",Ộ:"O",Ờ:"O",Ở:"O",Ỡ:"O",Ớ:"O",Ợ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ủ:"U",Ụ:"U",Ử:"U",Ữ:"U",Ự:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ả:"a",ạ:"a",ẩ:"a",ẫ:"a",ậ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ẻ:"e",ẽ:"e",ẹ:"e",ể:"e",ễ:"e",ệ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ỉ:"i",ị:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ỏ:"o",ọ:"o",ổ:"o",ỗ:"o",ộ:"o",ờ:"o",ở:"o",ỡ:"o",ớ:"o",ợ:"o",ù:"u",ú:"u",û:"u",ü:"u",ủ:"u",ụ:"u",ử:"u",ữ:"u",ự:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z",й:"и",Й:"И",ё:"е",Ё:"Е"},s=Object.keys(t).join("|"),o=new RegExp(s,"g"),n=new RegExp(s,"");function i(e){return t[e]}var r=function(e){return e.replace(o,i)};e.exports=r,e.exports.has=function(e){return!!e.match(n)},e.exports.remove=r},1609:e=>{"use strict";e.exports=window.React}},t={};function s(o){var n=t[o];if(void 0!==n)return n.exports;var i=t[o]={exports:{}};return e[o].call(i.exports,i,i.exports,s),i.exports}s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var o in t)s.o(t,o)&&!s.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};(()=>{"use strict";s.r(o),s.d(o,{AlignmentToolbar:()=>tm,Autocomplete:()=>em,AutosaveMonitor:()=>na,BlockAlignmentToolbar:()=>sm,BlockControls:()=>om,BlockEdit:()=>nm,BlockEditorKeyboardShortcuts:()=>im,BlockFormatControls:()=>rm,BlockIcon:()=>am,BlockInspector:()=>lm,BlockList:()=>cm,BlockMover:()=>dm,BlockNavigationDropdown:()=>um,BlockSelectionClearer:()=>pm,BlockSettingsMenu:()=>hm,BlockTitle:()=>mm,BlockToolbar:()=>gm,CharacterCount:()=>xp,ColorPalette:()=>_m,ContrastChecker:()=>fm,CopyHandler:()=>bm,DefaultBlockAppender:()=>ym,DocumentBar:()=>da,DocumentOutline:()=>xa,DocumentOutlineCheck:()=>va,EditorHistoryRedo:()=>Pa,EditorHistoryUndo:()=>Ca,EditorKeyboardShortcuts:()=>sa,EditorKeyboardShortcutsRegister:()=>wa,EditorNotices:()=>Ea,EditorProvider:()=>Yh,EditorSnackbars:()=>Ba,EntitiesSavedStates:()=>Fa,ErrorBoundary:()=>Ga,FontSizePicker:()=>xm,InnerBlocks:()=>wm,Inserter:()=>vm,InspectorAdvancedControls:()=>Sm,InspectorControls:()=>km,LocalAutosaveMonitor:()=>Ya,MediaPlaceholder:()=>Bm,MediaUpload:()=>Im,MediaUploadCheck:()=>Nm,MultiSelectScrollIntoView:()=>Am,NavigableToolbar:()=>Dm,ObserveTyping:()=>Rm,PageAttributesCheck:()=>Ka,PageAttributesOrder:()=>Xa,PageAttributesPanel:()=>ml,PageAttributesParent:()=>ul,PageTemplate:()=>Cl,PanelColorSettings:()=>Pm,PlainText:()=>Cm,PluginBlockSettingsMenuItem:()=>Ol,PluginDocumentSettingPanel:()=>Ml,PluginMoreMenuItem:()=>Ll,PluginPostPublishPanel:()=>Ul,PluginPostStatusInfo:()=>Wl,PluginPrePublishPanel:()=>ql,PluginPreviewMenuItem:()=>Ql,PluginSidebar:()=>Xl,PluginSidebarMoreMenuItem:()=>Jl,PostAuthor:()=>pc,PostAuthorCheck:()=>hc,PostAuthorPanel:()=>gc,PostComments:()=>fc,PostDiscussionPanel:()=>wc,PostExcerpt:()=>Sc,PostExcerptCheck:()=>kc,PostExcerptPanel:()=>Ic,PostFeaturedImage:()=>Uc,PostFeaturedImageCheck:()=>Rc,PostFeaturedImagePanel:()=>Gc,PostFormat:()=>Zc,PostFormatCheck:()=>$c,PostLastRevision:()=>Qc,PostLastRevisionCheck:()=>Yc,PostLastRevisionPanel:()=>Xc,PostLockedModal:()=>Jc,PostPendingStatus:()=>td,PostPendingStatusCheck:()=>ed,PostPingbacks:()=>bc,PostPreviewButton:()=>sd,PostPublishButton:()=>rd,PostPublishButtonLabel:()=>od,PostPublishPanel:()=>vu,PostSavedState:()=>Mu,PostSchedule:()=>Ed,PostScheduleCheck:()=>Ou,PostScheduleLabel:()=>Bd,PostSchedulePanel:()=>Fu,PostSlug:()=>Uu,PostSlugCheck:()=>Vu,PostSticky:()=>Iu,PostStickyCheck:()=>Bu,PostSwitchToDraftButton:()=>Hu,PostSyncStatus:()=>Gu,PostTaxonomies:()=>Wu,PostTaxonomiesCheck:()=>Zu,PostTaxonomiesFlatTermSelector:()=>Hd,PostTaxonomiesHierarchicalTermSelector:()=>Jd,PostTaxonomiesPanel:()=>Ku,PostTemplatePanel:()=>rc,PostTextEditor:()=>Qu,PostTitle:()=>op,PostTitleRaw:()=>np,PostTrash:()=>rp,PostTrashCheck:()=>ip,PostTypeSupportCheck:()=>qa,PostURL:()=>lp,PostURLCheck:()=>cp,PostURLLabel:()=>dp,PostURLPanel:()=>pp,PostVisibility:()=>cd,PostVisibilityCheck:()=>mp,PostVisibilityLabel:()=>ud,RichText:()=>Jh,RichTextShortcut:()=>jm,RichTextToolbarButton:()=>Em,ServerSideRender:()=>qh(),SkipToSelectedBlock:()=>Mm,TableOfContents:()=>wp,TextEditorGlobalKeyboardShortcuts:()=>Xm,ThemeSupportCheck:()=>Dc,TimeToRead:()=>yp,URLInput:()=>Om,URLInputButton:()=>Lm,URLPopover:()=>Fm,UnsavedChangesWarning:()=>Sp,VisualEditorGlobalKeyboardShortcuts:()=>Qm,Warning:()=>Vm,WordCount:()=>fp,WritingFlow:()=>zm,__unstableRichTextInputEvent:()=>Tm,cleanForSlug:()=>Jm,createCustomColorsHOC:()=>Um,getColorClassName:()=>Hm,getColorObjectByAttributeValues:()=>Gm,getColorObjectByColorValue:()=>$m,getFontSize:()=>Wm,getFontSizeClass:()=>Zm,getTemplatePartIcon:()=>W,mediaUpload:()=>Ip,privateApis:()=>bf,registerEntityAction:()=>yf,store:()=>qi,storeConfig:()=>Ki,transformStyles:()=>m.transformStyles,unregisterEntityAction:()=>xf,useEntitiesSavedStatesIsDirty:()=>Oa,usePostScheduleLabel:()=>Id,usePostURLLabel:()=>up,usePostVisibilityLabel:()=>pd,userAutocompleter:()=>Xi,withColorContext:()=>Ym,withColors:()=>Km,withFontSizes:()=>qm});var e={};s.r(e),s.d(e,{__experimentalGetDefaultTemplatePartAreas:()=>rs,__experimentalGetDefaultTemplateType:()=>as,__experimentalGetDefaultTemplateTypes:()=>is,__experimentalGetTemplateInfo:()=>ls,__unstableIsEditorReady:()=>Xe,canInsertBlockType:()=>ts,canUserUseUnfilteredHTML:()=>He,didPostSaveRequestFail:()=>Ce,didPostSaveRequestSucceed:()=>Pe,getActivePostLock:()=>Ue,getAdjacentBlockClientId:()=>Ct,getAutosaveAttribute:()=>ue,getBlock:()=>ut,getBlockAttributes:()=>dt,getBlockCount:()=>ft,getBlockHierarchyRootClientId:()=>Pt,getBlockIndex:()=>Vt,getBlockInsertionPoint:()=>qt,getBlockListSettings:()=>ns,getBlockMode:()=>Zt,getBlockName:()=>lt,getBlockOrder:()=>Ft,getBlockRootClientId:()=>kt,getBlockSelectionEnd:()=>yt,getBlockSelectionStart:()=>bt,getBlocks:()=>pt,getBlocksByClientId:()=>_t,getClientIdsOfDescendants:()=>ht,getClientIdsWithDescendants:()=>mt,getCurrentPost:()=>te,getCurrentPostAttribute:()=>le,getCurrentPostId:()=>oe,getCurrentPostLastRevisionId:()=>re,getCurrentPostRevisionsCount:()=>ie,getCurrentPostType:()=>se,getCurrentTemplateId:()=>ne,getDeviceType:()=>tt,getEditedPostAttribute:()=>de,getEditedPostContent:()=>Ie,getEditedPostPreviewLink:()=>Te,getEditedPostSlug:()=>Re,getEditedPostVisibility:()=>pe,getEditorBlocks:()=>$e,getEditorMode:()=>nt,getEditorSelection:()=>Qe,getEditorSelectionEnd:()=>qe,getEditorSelectionStart:()=>Ke,getEditorSettings:()=>Je,getFirstMultiSelectedBlockClientId:()=>Nt,getGlobalBlockCount:()=>gt,getInserterItems:()=>ss,getLastMultiSelectedBlockClientId:()=>At,getMultiSelectedBlockClientIds:()=>Bt,getMultiSelectedBlocks:()=>It,getMultiSelectedBlocksEndClientId:()=>Lt,getMultiSelectedBlocksStartClientId:()=>Ot,getNextBlockClientId:()=>Et,getPermalink:()=>De,getPermalinkParts:()=>Me,getPostEdits:()=>ae,getPostLockUser:()=>ze,getPostTypeLabel:()=>cs,getPreviousBlockClientId:()=>jt,getRenderingMode:()=>et,getSelectedBlock:()=>St,getSelectedBlockClientId:()=>wt,getSelectedBlockCount:()=>xt,getSelectedBlocksInitialCaretPosition:()=>Tt,getStateBeforeOptimisticTransaction:()=>it,getSuggestedPostFormat:()=>Be,getTemplate:()=>Jt,getTemplateLock:()=>es,hasChangedContent:()=>Q,hasEditorRedo:()=>K,hasEditorUndo:()=>Y,hasInserterItems:()=>os,hasMultiSelection:()=>Gt,hasNonPostEntityChanges:()=>J,hasSelectedBlock:()=>vt,hasSelectedInnerBlock:()=>Ut,inSomeHistory:()=>rt,isAncestorMultiSelected:()=>Mt,isAutosavingPost:()=>je,isBlockInsertionPointVisible:()=>Qt,isBlockMultiSelected:()=>Rt,isBlockSelected:()=>zt,isBlockValid:()=>ct,isBlockWithinSelection:()=>Ht,isCaretWithinFormattedText:()=>Kt,isCleanNewPost:()=>ee,isCurrentPostPending:()=>he,isCurrentPostPublished:()=>me,isCurrentPostScheduled:()=>ge,isDeletingPost:()=>we,isEditedPostAutosaveable:()=>ye,isEditedPostBeingScheduled:()=>xe,isEditedPostDateFloating:()=>ve,isEditedPostDirty:()=>X,isEditedPostEmpty:()=>be,isEditedPostNew:()=>q,isEditedPostPublishable:()=>_e,isEditedPostSaveable:()=>fe,isEditorPanelEnabled:()=>Ze,isEditorPanelOpened:()=>Ye,isEditorPanelRemoved:()=>We,isFirstMultiSelectedBlock:()=>Dt,isInserterOpened:()=>ot,isListViewOpened:()=>st,isMultiSelecting:()=>$t,isPermalinkEditable:()=>Ae,isPostAutosavingLocked:()=>Fe,isPostLockTakeover:()=>Ve,isPostLocked:()=>Oe,isPostSavingLocked:()=>Le,isPreviewingPost:()=>Ee,isPublishSidebarEnabled:()=>Ge,isPublishSidebarOpened:()=>ds,isPublishingPost:()=>Ne,isSavingNonPostEntityChanges:()=>ke,isSavingPost:()=>Se,isSelectionEnabled:()=>Wt,isTyping:()=>Yt,isValidTemplate:()=>Xt});var t={};s.r(t),s.d(t,{__experimentalTearDownEditor:()=>ys,__unstableSaveForPreview:()=>Ts,autosave:()=>Es,clearSelectedBlock:()=>co,closePublishSidebar:()=>Xs,createUndoLevel:()=>Ns,disablePublishSidebar:()=>Rs,editPost:()=>ks,enablePublishSidebar:()=>Ds,enterFormattedText:()=>To,exitFormattedText:()=>Bo,hideInsertionPoint:()=>xo,insertBlock:()=>fo,insertBlocks:()=>bo,insertDefaultBlock:()=>Io,lockPostAutosaving:()=>Ls,lockPostSaving:()=>Ms,mergeBlocks:()=>So,moveBlockToPosition:()=>_o,moveBlocksDown:()=>mo,moveBlocksUp:()=>go,multiSelect:()=>lo,openPublishSidebar:()=>Qs,receiveBlocks:()=>so,redo:()=>Bs,refreshPost:()=>Cs,removeBlock:()=>Po,removeBlocks:()=>ko,removeEditorPanel:()=>Ws,replaceBlock:()=>ho,replaceBlocks:()=>po,resetBlocks:()=>to,resetEditorBlocks:()=>Vs,resetPost:()=>xs,savePost:()=>Ps,selectBlock:()=>io,setDeviceType:()=>Hs,setEditedPost:()=>Ss,setIsInserterOpened:()=>Zs,setIsListViewOpened:()=>Ys,setRenderingMode:()=>Us,setTemplateValidity:()=>vo,setupEditor:()=>bs,setupEditorState:()=>ws,showInsertionPoint:()=>yo,startMultiSelect:()=>ro,startTyping:()=>jo,stopMultiSelect:()=>ao,stopTyping:()=>Eo,switchEditorMode:()=>qs,synchronizeTemplate:()=>wo,toggleBlockMode:()=>Co,toggleDistractionFree:()=>Ks,toggleEditorPanelEnabled:()=>Gs,toggleEditorPanelOpened:()=>$s,togglePublishSidebar:()=>Js,toggleSelection:()=>uo,trashPost:()=>js,undo:()=>Is,unlockPostAutosaving:()=>Fs,unlockPostSaving:()=>Os,updateBlock:()=>oo,updateBlockAttributes:()=>no,updateBlockListSettings:()=>No,updateEditorSettings:()=>zs,updatePost:()=>vs,updatePostLock:()=>As});var n={};s.r(n),s.d(n,{createTemplate:()=>Ci,hideBlockTypes:()=>Ei,registerEntityAction:()=>vi,registerPostTypeActions:()=>ki,removeTemplates:()=>Ii,revertTemplate:()=>Bi,saveDirtyEntities:()=>Ti,setCurrentTemplateId:()=>Pi,setIsReady:()=>Si,showBlockTypes:()=>ji,unregisterEntityAction:()=>wi});var i={};s.r(i),s.d(i,{getEntityActions:()=>Wi,getInserterSidebarToggleRef:()=>Ui,getInsertionPoint:()=>Vi,getListViewToggleRef:()=>zi,getPostBlocksByName:()=>Yi,getPostIcon:()=>Gi,hasPostMetaChanges:()=>$i,isEntityReady:()=>Zi});var r={};s.r(r),s.d(r,{closeModal:()=>Pr,disableComplementaryArea:()=>br,enableComplementaryArea:()=>fr,openModal:()=>kr,pinItem:()=>yr,setDefaultComplementaryArea:()=>_r,setFeatureDefaults:()=>Sr,setFeatureValue:()=>wr,toggleFeature:()=>vr,unpinItem:()=>xr});var a={};s.r(a),s.d(a,{getActiveComplementaryArea:()=>Cr,isComplementaryAreaLoading:()=>jr,isFeatureActive:()=>Tr,isItemPinned:()=>Er,isModalActive:()=>Br});var l={};s.r(l),s.d(l,{ActionItem:()=>Fr,ComplementaryArea:()=>Kr,ComplementaryAreaMoreMenuItem:()=>zr,FullscreenMode:()=>qr,InterfaceSkeleton:()=>ta,NavigableRegion:()=>Xr,PinnedItems:()=>Hr,store:()=>Nr});const c=window.wp.data,d=window.wp.coreData,u=window.wp.element,p=window.wp.compose,h=window.wp.hooks,m=window.wp.blockEditor,g={...m.SETTINGS_DEFAULTS,richEditingEnabled:!0,codeEditingEnabled:!0,fontLibraryEnabled:!0,enableCustomFields:void 0,defaultRenderingMode:"post-only"};const _=(0,c.combineReducers)({actions:function(e={},t){var s;switch(t.type){case"REGISTER_ENTITY_ACTION":return{...e,[t.kind]:{...e[t.kind],[t.name]:[...(null!==(s=e[t.kind]?.[t.name])&&void 0!==s?s:[]).filter((e=>e.id!==t.config.id)),t.config]}};case"UNREGISTER_ENTITY_ACTION":var o;return{...e,[t.kind]:{...e[t.kind],[t.name]:(null!==(o=e[t.kind]?.[t.name])&&void 0!==o?o:[]).filter((e=>e.id!==t.actionId))}}}return e},isReady:function(e={},t){return"SET_IS_READY"===t.type?{...e,[t.kind]:{...e[t.kind],[t.name]:!0}}:e}});function f(e){return e&&"object"==typeof e&&"raw"in e?e.raw:e}const b=(0,c.combineReducers)({postId:function(e=null,t){return"SET_EDITED_POST"===t.type?t.postId:e},postType:function(e=null,t){return"SET_EDITED_POST"===t.type?t.postType:e},templateId:function(e=null,t){return"SET_CURRENT_TEMPLATE_ID"===t.type?t.id:e},saving:function(e={},t){switch(t.type){case"REQUEST_POST_UPDATE_START":case"REQUEST_POST_UPDATE_FINISH":return{pending:"REQUEST_POST_UPDATE_START"===t.type,options:t.options||{}}}return e},deleting:function(e={},t){switch(t.type){case"REQUEST_POST_DELETE_START":case"REQUEST_POST_DELETE_FINISH":return{pending:"REQUEST_POST_DELETE_START"===t.type}}return e},postLock:function(e={isLocked:!1},t){return"UPDATE_POST_LOCK"===t.type?t.lock:e},template:function(e={isValid:!0},t){return"SET_TEMPLATE_VALIDITY"===t.type?{...e,isValid:t.isValid}:e},postSavingLock:function(e={},t){switch(t.type){case"LOCK_POST_SAVING":return{...e,[t.lockName]:!0};case"UNLOCK_POST_SAVING":{const{[t.lockName]:s,...o}=e;return o}}return e},editorSettings:function(e=g,t){return"UPDATE_EDITOR_SETTINGS"===t.type?{...e,...t.settings}:e},postAutosavingLock:function(e={},t){switch(t.type){case"LOCK_POST_AUTOSAVING":return{...e,[t.lockName]:!0};case"UNLOCK_POST_AUTOSAVING":{const{[t.lockName]:s,...o}=e;return o}}return e},renderingMode:function(e="post-only",t){return"SET_RENDERING_MODE"===t.type?t.mode:e},deviceType:function(e="Desktop",t){return"SET_DEVICE_TYPE"===t.type?t.deviceType:e},removedPanels:function(e=[],t){if("REMOVE_PANEL"===t.type)if(!e.includes(t.panelName))return[...e,t.panelName];return e},blockInserterPanel:function(e=!1,t){switch(t.type){case"SET_IS_LIST_VIEW_OPENED":return!t.isOpen&&e;case"SET_IS_INSERTER_OPENED":return t.value}return e},inserterSidebarToggleRef:function(e={current:null}){return e},listViewPanel:function(e=!1,t){switch(t.type){case"SET_IS_INSERTER_OPENED":return!t.value&&e;case"SET_IS_LIST_VIEW_OPENED":return t.isOpen}return e},listViewToggleRef:function(e={current:null}){return e},publishSidebarActive:function(e=!1,t){switch(t.type){case"OPEN_PUBLISH_SIDEBAR":return!0;case"CLOSE_PUBLISH_SIDEBAR":return!1;case"TOGGLE_PUBLISH_SIDEBAR":return!e}return e},dataviews:_}),y=window.wp.blocks,x=window.wp.date,v=window.wp.url,w=window.wp.deprecated;var S=s.n(w);const k=window.wp.primitives,P=window.ReactJSXRuntime,C=(0,P.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(k.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"})}),j=window.wp.preferences,E=new Set(["meta"]),T="SAVE_POST_NOTICE_ID",B="TRASH_POST_NOTICE_ID",I=/%(?:postname|pagename)%/,N=6e4,A=["title","excerpt","content"],D="uncategorized",R="wp_template",M="wp_template_part",O="wp_block",L="wp_navigation",F={custom:"custom",theme:"theme",plugin:"plugin"},V=["wp_template","wp_template_part"],z=[...V,"wp_block","wp_navigation"],U=(0,P.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(k.Path,{d:"M18.5 10.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"})}),H=(0,P.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(k.Path,{fillRule:"evenodd",d:"M18 5.5h-8v8h8.5V6a.5.5 0 00-.5-.5zm-9.5 8h-3V6a.5.5 0 01.5-.5h2.5v8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})}),G=(0,P.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(k.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.5zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})}),$=(0,P.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(k.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-17.6 1L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})});function W(e){return"header"===e?U:"footer"===e?H:"sidebar"===e?G:$}const Z={},Y=(0,c.createRegistrySelector)((e=>()=>e(d.store).hasUndo())),K=(0,c.createRegistrySelector)((e=>()=>e(d.store).hasRedo()));function q(e){return"auto-draft"===te(e).status}function Q(e){return"content"in ae(e)}const X=(0,c.createRegistrySelector)((e=>t=>{const s=se(t),o=oe(t);return e(d.store).hasEditsForEntityRecord("postType",s,o)})),J=(0,c.createRegistrySelector)((e=>t=>{const s=e(d.store).__experimentalGetDirtyEntityRecords(),{type:o,id:n}=te(t);return s.some((e=>"postType"!==e.kind||e.name!==o||e.key!==n))}));function ee(e){return!X(e)&&q(e)}const te=(0,c.createRegistrySelector)((e=>t=>{const s=oe(t),o=se(t),n=e(d.store).getRawEntityRecord("postType",o,s);return n||Z}));function se(e){return e.postType}function oe(e){return e.postId}function ne(e){return e.templateId}function ie(e){var t;return null!==(t=te(e)._links?.["version-history"]?.[0]?.count)&&void 0!==t?t:0}function re(e){var t;return null!==(t=te(e)._links?.["predecessor-version"]?.[0]?.id)&&void 0!==t?t:null}const ae=(0,c.createRegistrySelector)((e=>t=>{const s=se(t),o=oe(t);return e(d.store).getEntityRecordEdits("postType",s,o)||Z}));function le(e,t){switch(t){case"type":return se(e);case"id":return oe(e);default:const s=te(e);if(!s.hasOwnProperty(t))break;return f(s[t])}}const ce=(0,c.createSelector)(((e,t)=>{const s=ae(e);return s.hasOwnProperty(t)?{...le(e,t),...s[t]}:le(e,t)}),((e,t)=>[le(e,t),ae(e)[t]]));function de(e,t){if("content"===t)return Ie(e);const s=ae(e);return s.hasOwnProperty(t)?E.has(t)?ce(e,t):s[t]:le(e,t)}const ue=(0,c.createRegistrySelector)((e=>(t,s)=>{if(!A.includes(s)&&"preview_link"!==s)return;const o=se(t);if("wp_template"===o)return!1;const n=oe(t),i=e(d.store).getCurrentUser()?.id,r=e(d.store).getAutosave(o,n,i);return r?f(r[s]):void 0}));function pe(e){if("private"===de(e,"status"))return"private";return de(e,"password")?"password":"public"}function he(e){return"pending"===te(e).status}function me(e,t){const s=t||te(e);return-1!==["publish","private"].indexOf(s.status)||"future"===s.status&&!(0,x.isInTheFuture)(new Date(Number((0,x.getDate)(s.date))-N))}function ge(e){return"future"===te(e).status&&!me(e)}function _e(e){const t=te(e);return X(e)||-1===["publish","private","future"].indexOf(t.status)}function fe(e){return!Se(e)&&(!!de(e,"title")||!!de(e,"excerpt")||!be(e)||"native"===u.Platform.OS)}const be=(0,c.createRegistrySelector)((e=>t=>{const s=oe(t),o=se(t),n=e(d.store).getEditedEntityRecord("postType",o,s);if("function"!=typeof n.content)return!n.content;const i=de(t,"blocks");if(0===i.length)return!0;if(i.length>1)return!1;const r=i[0].name;return(r===(0,y.getDefaultBlockName)()||r===(0,y.getFreeformContentHandlerName)())&&!Ie(t)})),ye=(0,c.createRegistrySelector)((e=>t=>{if(!fe(t))return!1;if(Fe(t))return!1;const s=se(t);if("wp_template"===s)return!1;const o=oe(t),n=e(d.store).hasFetchedAutosaves(s,o),i=e(d.store).getCurrentUser()?.id,r=e(d.store).getAutosave(s,o,i);return!!n&&(!r||(!!Q(t)||["title","excerpt","meta"].some((e=>f(r[e])!==de(t,e)))))}));function xe(e){const t=de(e,"date"),s=new Date(Number((0,x.getDate)(t))-N);return(0,x.isInTheFuture)(s)}function ve(e){const t=de(e,"date"),s=de(e,"modified"),o=te(e).status;return("draft"===o||"auto-draft"===o||"pending"===o)&&(t===s||null===t)}function we(e){return!!e.deleting.pending}function Se(e){return!!e.saving.pending}const ke=(0,c.createRegistrySelector)((e=>t=>{const s=e(d.store).__experimentalGetEntitiesBeingSaved(),{type:o,id:n}=te(t);return s.some((e=>"postType"!==e.kind||e.name!==o||e.key!==n))})),Pe=(0,c.createRegistrySelector)((e=>t=>{const s=se(t),o=oe(t);return!e(d.store).getLastEntitySaveError("postType",s,o)})),Ce=(0,c.createRegistrySelector)((e=>t=>{const s=se(t),o=oe(t);return!!e(d.store).getLastEntitySaveError("postType",s,o)}));function je(e){return Se(e)&&Boolean(e.saving.options?.isAutosave)}function Ee(e){return Se(e)&&Boolean(e.saving.options?.isPreview)}function Te(e){if(e.saving.pending||Se(e))return;let t=ue(e,"preview_link");t&&"draft"!==te(e).status||(t=de(e,"link"),t&&(t=(0,v.addQueryArgs)(t,{preview:!0})));const s=de(e,"featured_media");return t&&s?(0,v.addQueryArgs)(t,{_thumbnail_id:s}):t}const Be=(0,c.createRegistrySelector)((e=>()=>{const t=e(m.store).getBlocks();if(t.length>2)return null;let s;if(1===t.length&&(s=t[0].name,"core/embed"===s)){const e=t[0].attributes?.providerNameSlug;["youtube","vimeo"].includes(e)?s="core/video":["spotify","soundcloud"].includes(e)&&(s="core/audio")}switch(2===t.length&&"core/paragraph"===t[1].name&&(s=t[0].name),s){case"core/image":return"image";case"core/quote":case"core/pullquote":return"quote";case"core/gallery":return"gallery";case"core/video":return"video";case"core/audio":return"audio";default:return null}})),Ie=(0,c.createRegistrySelector)((e=>t=>{const s=oe(t),o=se(t),n=e(d.store).getEditedEntityRecord("postType",o,s);if(n){if("function"==typeof n.content)return n.content(n);if(n.blocks)return(0,y.__unstableSerializeAndClean)(n.blocks);if(n.content)return n.content}return""}));function Ne(e){return Se(e)&&!me(e)&&"publish"===de(e,"status")}function Ae(e){const t=de(e,"permalink_template");return I.test(t)}function De(e){const t=Me(e);if(!t)return null;const{prefix:s,postName:o,suffix:n}=t;return Ae(e)?s+o+n:s}function Re(e){return de(e,"slug")||(0,v.cleanForSlug)(de(e,"title"))||oe(e)}function Me(e){const t=de(e,"permalink_template");if(!t)return null;const s=de(e,"slug")||de(e,"generated_slug"),[o,n]=t.split(I);return{prefix:o,postName:s,suffix:n}}function Oe(e){return e.postLock.isLocked}function Le(e){return Object.keys(e.postSavingLock).length>0}function Fe(e){return Object.keys(e.postAutosavingLock).length>0}function Ve(e){return e.postLock.isTakeover}function ze(e){return e.postLock.user}function Ue(e){return e.postLock.activePostLock}function He(e){return Boolean(te(e)._links?.hasOwnProperty("wp:action-unfiltered-html"))}const Ge=(0,c.createRegistrySelector)((e=>()=>!!e(j.store).get("core","isPublishSidebarEnabled"))),$e=(0,c.createSelector)((e=>de(e,"blocks")||(0,y.parse)(Ie(e))),(e=>[de(e,"blocks"),Ie(e)]));function We(e,t){return e.removedPanels.includes(t)}const Ze=(0,c.createRegistrySelector)((e=>(t,s)=>{const o=e(j.store).get("core","inactivePanels");return!We(t,s)&&!o?.includes(s)})),Ye=(0,c.createRegistrySelector)((e=>(t,s)=>{const o=e(j.store).get("core","openPanels");return!!o?.includes(s)}));function Ke(e){return S()("select('core/editor').getEditorSelectionStart",{since:"5.8",alternative:"select('core/editor').getEditorSelection"}),de(e,"selection")?.selectionStart}function qe(e){return S()("select('core/editor').getEditorSelectionStart",{since:"5.8",alternative:"select('core/editor').getEditorSelection"}),de(e,"selection")?.selectionEnd}function Qe(e){return de(e,"selection")}function Xe(e){return!!e.postId}function Je(e){return e.editorSettings}function et(e){return e.renderingMode}const tt=(0,c.createRegistrySelector)((e=>t=>"zoom-out"===e(m.store).__unstableGetEditorMode()?"Desktop":t.deviceType));function st(e){return e.listViewPanel}function ot(e){return!!e.blockInserterPanel}const nt=(0,c.createRegistrySelector)((e=>()=>{var t;return null!==(t=e(j.store).get("core","editorMode"))&&void 0!==t?t:"visual"}));function it(){return S()("select('core/editor').getStateBeforeOptimisticTransaction",{since:"5.7",hint:"No state history is kept on this store anymore"}),null}function rt(){return S()("select('core/editor').inSomeHistory",{since:"5.7",hint:"No state history is kept on this store anymore"}),!1}function at(e){return(0,c.createRegistrySelector)((t=>(s,...o)=>(S()("`wp.data.select( 'core/editor' )."+e+"`",{since:"5.3",alternative:"`wp.data.select( 'core/block-editor' )."+e+"`",version:"6.2"}),t(m.store)[e](...o))))}const lt=at("getBlockName"),ct=at("isBlockValid"),dt=at("getBlockAttributes"),ut=at("getBlock"),pt=at("getBlocks"),ht=at("getClientIdsOfDescendants"),mt=at("getClientIdsWithDescendants"),gt=at("getGlobalBlockCount"),_t=at("getBlocksByClientId"),ft=at("getBlockCount"),bt=at("getBlockSelectionStart"),yt=at("getBlockSelectionEnd"),xt=at("getSelectedBlockCount"),vt=at("hasSelectedBlock"),wt=at("getSelectedBlockClientId"),St=at("getSelectedBlock"),kt=at("getBlockRootClientId"),Pt=at("getBlockHierarchyRootClientId"),Ct=at("getAdjacentBlockClientId"),jt=at("getPreviousBlockClientId"),Et=at("getNextBlockClientId"),Tt=at("getSelectedBlocksInitialCaretPosition"),Bt=at("getMultiSelectedBlockClientIds"),It=at("getMultiSelectedBlocks"),Nt=at("getFirstMultiSelectedBlockClientId"),At=at("getLastMultiSelectedBlockClientId"),Dt=at("isFirstMultiSelectedBlock"),Rt=at("isBlockMultiSelected"),Mt=at("isAncestorMultiSelected"),Ot=at("getMultiSelectedBlocksStartClientId"),Lt=at("getMultiSelectedBlocksEndClientId"),Ft=at("getBlockOrder"),Vt=at("getBlockIndex"),zt=at("isBlockSelected"),Ut=at("hasSelectedInnerBlock"),Ht=at("isBlockWithinSelection"),Gt=at("hasMultiSelection"),$t=at("isMultiSelecting"),Wt=at("isSelectionEnabled"),Zt=at("getBlockMode"),Yt=at("isTyping"),Kt=at("isCaretWithinFormattedText"),qt=at("getBlockInsertionPoint"),Qt=at("isBlockInsertionPointVisible"),Xt=at("isValidTemplate"),Jt=at("getTemplate"),es=at("getTemplateLock"),ts=at("canInsertBlockType"),ss=at("getInserterItems"),os=at("hasInserterItems"),ns=at("getBlockListSettings");function is(e){return Je(e)?.defaultTemplateTypes}const rs=(0,c.createSelector)((e=>{var t;return(null!==(t=Je(e)?.defaultTemplatePartAreas)&&void 0!==t?t:[]).map((e=>({...e,icon:W(e.icon)})))}),(e=>[Je(e)?.defaultTemplatePartAreas])),as=(0,c.createSelector)(((e,t)=>{var s;const o=is(e);return o&&null!==(s=Object.values(o).find((e=>e.slug===t)))&&void 0!==s?s:Z}),(e=>[is(e)])),ls=(0,c.createSelector)(((e,t)=>{if(!t)return Z;const{description:s,slug:o,title:n,area:i}=t,{title:r,description:a}=as(e,o),l="string"==typeof n?n:n?.rendered;return{title:l&&l!==o?l:r||o,description:("string"==typeof s?s:s?.raw)||a,icon:rs(e).find((e=>i===e.area))?.icon||C}}),(e=>[is(e),rs(e)])),cs=(0,c.createRegistrySelector)((e=>t=>{const s=se(t),o=e(d.store).getPostType(s);return o?.labels?.singular_name}));function ds(e){return e.publishSidebarActive}const us=window.wp.a11y,ps=window.wp.apiFetch;var hs=s.n(ps);const ms=window.wp.notices,gs=window.wp.i18n;function _s(e,t){return`wp-autosave-block-editor-post-${t?"auto-draft":e}`}function fs(e,t){window.sessionStorage.removeItem(_s(e,t))}const bs=(e,t,s)=>({dispatch:o})=>{o.setEditedPost(e.type,e.id);if("auto-draft"===e.status&&s){let n;n="content"in t?t.content:e.content.raw;let i=(0,y.parse)(n);i=(0,y.synchronizeBlocksWithTemplate)(i,s),o.resetEditorBlocks(i,{__unstableShouldCreateUndoLevel:!1})}t&&Object.values(t).some((([t,s])=>{var o;return s!==(null!==(o=e[t]?.raw)&&void 0!==o?o:e[t])}))&&o.editPost(t)};function ys(){return S()("wp.data.dispatch( 'core/editor' ).__experimentalTearDownEditor",{since:"6.5"}),{type:"DO_NOTHING"}}function xs(){return S()("wp.data.dispatch( 'core/editor' ).resetPost",{since:"6.0",version:"6.3",alternative:"Initialize the editor with the setupEditorState action"}),{type:"DO_NOTHING"}}function vs(){return S()("wp.data.dispatch( 'core/editor' ).updatePost",{since:"5.7",alternative:"Use the core entities store instead"}),{type:"DO_NOTHING"}}function ws(e){return S()("wp.data.dispatch( 'core/editor' ).setupEditorState",{since:"6.5",alternative:"wp.data.dispatch( 'core/editor' ).setEditedPost"}),Ss(e.type,e.id)}function Ss(e,t){return{type:"SET_EDITED_POST",postType:e,postId:t}}const ks=(e,t)=>({select:s,registry:o})=>{const{id:n,type:i}=s.getCurrentPost();o.dispatch(d.store).editEntityRecord("postType",i,n,e,t)},Ps=(e={})=>async({select:t,dispatch:s,registry:o})=>{if(!t.isEditedPostSaveable())return;const n=t.getEditedPostContent();e.isAutosave||s.editPost({content:n},{undoIgnore:!0});const i=t.getCurrentPost();let r={id:i.id,...o.select(d.store).getEntityRecordNonTransientEdits("postType",i.type,i.id),content:n};s({type:"REQUEST_POST_UPDATE_START",options:e});let a=!1;try{r=await(0,h.applyFiltersAsync)("editor.preSavePost",r,e)}catch(e){a=e}if(!a)try{await o.dispatch(d.store).saveEntityRecord("postType",i.type,r,e)}catch(e){a=e.message&&"unknown_error"!==e.code?e.message:(0,gs.__)("An error occurred while updating.")}if(a||(a=o.select(d.store).getLastEntitySaveError("postType",i.type,i.id)),!a)try{await(0,h.applyFilters)("editor.__unstableSavePost",Promise.resolve(),e)}catch(e){a=e}if(!a)try{await(0,h.doActionAsync)("editor.savePost",{id:i.id},e)}catch(e){a=e}if(s({type:"REQUEST_POST_UPDATE_FINISH",options:e}),a){const e=function(e){const{post:t,edits:s,error:o}=e;if(o&&"rest_autosave_no_changes"===o.code)return[];const n=["publish","private","future"],i=-1!==n.indexOf(t.status),r={publish:(0,gs.__)("Publishing failed."),private:(0,gs.__)("Publishing failed."),future:(0,gs.__)("Scheduling failed.")};let a=i||-1===n.indexOf(s.status)?(0,gs.__)("Updating failed."):r[s.status];return o.message&&!/<\/?[^>]*>/.test(o.message)&&(a=[a,o.message].join(" ")),[a,{id:T}]}({post:i,edits:r,error:a});e.length&&o.dispatch(ms.store).createErrorNotice(...e)}else{const s=t.getCurrentPost(),n=function(e){var t;const{previousPost:s,post:o,postType:n}=e;if(e.options?.isAutosave)return[];const i=["publish","private","future"],r=i.includes(s.status),a=i.includes(o.status),l="trash"===o.status&&"trash"!==s.status;let c,d,u=null!==(t=n?.viewable)&&void 0!==t&&t;l?(c=n.labels.item_trashed,u=!1):r||a?r&&!a?(c=n.labels.item_reverted_to_draft,u=!1):c=!r&&a?{publish:n.labels.item_published,private:n.labels.item_published_privately,future:n.labels.item_scheduled}[o.status]:n.labels.item_updated:(c=(0,gs.__)("Draft saved."),d=!0);const p=[];return u&&p.push({label:d?(0,gs.__)("View Preview"):n.labels.view_item,url:o.link}),[c,{id:T,type:"snackbar",actions:p}]}({previousPost:i,post:s,postType:await o.resolveSelect(d.store).getPostType(s.type),options:e});n.length&&o.dispatch(ms.store).createSuccessNotice(...n),e.isAutosave||o.dispatch(m.store).__unstableMarkLastChangeAsPersistent()}};function Cs(){return S()("wp.data.dispatch( 'core/editor' ).refreshPost",{since:"6.0",version:"6.3",alternative:"Use the core entities store instead"}),{type:"DO_NOTHING"}}const js=()=>async({select:e,dispatch:t,registry:s})=>{const o=e.getCurrentPostType(),n=await s.resolveSelect(d.store).getPostType(o);s.dispatch(ms.store).removeNotice(B);const{rest_base:i,rest_namespace:r="wp/v2"}=n;t({type:"REQUEST_POST_DELETE_START"});try{const s=e.getCurrentPost();await hs()({path:`/${r}/${i}/${s.id}`,method:"DELETE"}),await t.savePost()}catch(e){s.dispatch(ms.store).createErrorNotice(...(a={error:e},[a.error.message&&"unknown_error"!==a.error.code?a.error.message:(0,gs.__)("Trashing failed"),{id:B}]))}var a;t({type:"REQUEST_POST_DELETE_FINISH"})},Es=({local:e=!1,...t}={})=>async({select:s,dispatch:o})=>{const n=s.getCurrentPost();if("wp_template"!==n.type)if(e){const e=s.isEditedPostNew(),t=s.getEditedPostAttribute("title"),o=s.getEditedPostAttribute("content"),i=s.getEditedPostAttribute("excerpt");!function(e,t,s,o,n){window.sessionStorage.setItem(_s(e,t),JSON.stringify({post_title:s,content:o,excerpt:n}))}(n.id,e,t,o,i)}else await o.savePost({isAutosave:!0,...t})},Ts=({forceIsAutosaveable:e}={})=>async({select:t,dispatch:s})=>{if((e||t.isEditedPostAutosaveable())&&!t.isPostLocked()){["draft","auto-draft"].includes(t.getEditedPostAttribute("status"))?await s.savePost({isPreview:!0}):await s.autosave({isPreview:!0})}return t.getEditedPostPreviewLink()},Bs=()=>({registry:e})=>{e.dispatch(d.store).redo()},Is=()=>({registry:e})=>{e.dispatch(d.store).undo()};function Ns(){return S()("wp.data.dispatch( 'core/editor' ).createUndoLevel",{since:"6.0",version:"6.3",alternative:"Use the core entities store instead"}),{type:"DO_NOTHING"}}function As(e){return{type:"UPDATE_POST_LOCK",lock:e}}const Ds=()=>({registry:e})=>{e.dispatch(j.store).set("core","isPublishSidebarEnabled",!0)},Rs=()=>({registry:e})=>{e.dispatch(j.store).set("core","isPublishSidebarEnabled",!1)};function Ms(e){return{type:"LOCK_POST_SAVING",lockName:e}}function Os(e){return{type:"UNLOCK_POST_SAVING",lockName:e}}function Ls(e){return{type:"LOCK_POST_AUTOSAVING",lockName:e}}function Fs(e){return{type:"UNLOCK_POST_AUTOSAVING",lockName:e}}const Vs=(e,t={})=>({select:s,dispatch:o,registry:n})=>{const{__unstableShouldCreateUndoLevel:i,selection:r}=t,a={blocks:e,selection:r};if(!1!==i){const{id:e,type:t}=s.getCurrentPost();if(n.select(d.store).getEditedEntityRecord("postType",t,e).blocks===a.blocks)return void n.dispatch(d.store).__unstableCreateUndoLevel("postType",t,e);a.content=({blocks:e=[]})=>(0,y.__unstableSerializeAndClean)(e)}o.editPost(a)};function zs(e){return{type:"UPDATE_EDITOR_SETTINGS",settings:e}}const Us=e=>({dispatch:t,registry:s,select:o})=>{o.__unstableIsEditorReady()&&(s.dispatch(m.store).clearSelectedBlock(),t.editPost({selection:void 0},{undoIgnore:!0})),t({type:"SET_RENDERING_MODE",mode:e})};function Hs(e){return{type:"SET_DEVICE_TYPE",deviceType:e}}const Gs=e=>({registry:t})=>{var s;const o=null!==(s=t.select(j.store).get("core","inactivePanels"))&&void 0!==s?s:[];let n;n=!!o?.includes(e)?o.filter((t=>t!==e)):[...o,e],t.dispatch(j.store).set("core","inactivePanels",n)},$s=e=>({registry:t})=>{var s;const o=null!==(s=t.select(j.store).get("core","openPanels"))&&void 0!==s?s:[];let n;n=!!o?.includes(e)?o.filter((t=>t!==e)):[...o,e],t.dispatch(j.store).set("core","openPanels",n)};function Ws(e){return{type:"REMOVE_PANEL",panelName:e}}function Zs(e){return{type:"SET_IS_INSERTER_OPENED",value:e}}function Ys(e){return{type:"SET_IS_LIST_VIEW_OPENED",isOpen:e}}const Ks=()=>({dispatch:e,registry:t})=>{const s=t.select(j.store).get("core","distractionFree");s&&t.dispatch(j.store).set("core","fixedToolbar",!1),s||t.batch((()=>{t.dispatch(j.store).set("core","fixedToolbar",!0),e.setIsInserterOpened(!1),e.setIsListViewOpened(!1)})),t.batch((()=>{t.dispatch(j.store).set("core","distractionFree",!s),t.dispatch(ms.store).createInfoNotice(s?(0,gs.__)("Distraction free off."):(0,gs.__)("Distraction free on."),{id:"core/editor/distraction-free-mode/notice",type:"snackbar",actions:[{label:(0,gs.__)("Undo"),onClick:()=>{t.batch((()=>{t.dispatch(j.store).set("core","fixedToolbar",!!s),t.dispatch(j.store).toggle("core","distractionFree")}))}}]})}))},qs=e=>({dispatch:t,registry:s})=>{if(s.dispatch(j.store).set("core","editorMode",e),"visual"!==e&&s.dispatch(m.store).clearSelectedBlock(),"visual"===e)(0,us.speak)((0,gs.__)("Visual editor selected"),"assertive");else if("text"===e){s.select(j.store).get("core","distractionFree")&&t.toggleDistractionFree(),(0,us.speak)((0,gs.__)("Code editor selected"),"assertive")}};function Qs(){return{type:"OPEN_PUBLISH_SIDEBAR"}}function Xs(){return{type:"CLOSE_PUBLISH_SIDEBAR"}}function Js(){return{type:"TOGGLE_PUBLISH_SIDEBAR"}}const eo=e=>(...t)=>({registry:s})=>{S()("`wp.data.dispatch( 'core/editor' )."+e+"`",{since:"5.3",alternative:"`wp.data.dispatch( 'core/block-editor' )."+e+"`",version:"6.2"}),s.dispatch(m.store)[e](...t)},to=eo("resetBlocks"),so=eo("receiveBlocks"),oo=eo("updateBlock"),no=eo("updateBlockAttributes"),io=eo("selectBlock"),ro=eo("startMultiSelect"),ao=eo("stopMultiSelect"),lo=eo("multiSelect"),co=eo("clearSelectedBlock"),uo=eo("toggleSelection"),po=eo("replaceBlocks"),ho=eo("replaceBlock"),mo=eo("moveBlocksDown"),go=eo("moveBlocksUp"),_o=eo("moveBlockToPosition"),fo=eo("insertBlock"),bo=eo("insertBlocks"),yo=eo("showInsertionPoint"),xo=eo("hideInsertionPoint"),vo=eo("setTemplateValidity"),wo=eo("synchronizeTemplate"),So=eo("mergeBlocks"),ko=eo("removeBlocks"),Po=eo("removeBlock"),Co=eo("toggleBlockMode"),jo=eo("startTyping"),Eo=eo("stopTyping"),To=eo("enterFormattedText"),Bo=eo("exitFormattedText"),Io=eo("insertDefaultBlock"),No=eo("updateBlockListSettings"),Ao=window.wp.htmlEntities;const Do=window.wp.components,Ro=(0,P.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(k.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})});var Mo=function(){return Mo=Object.assign||function(e){for(var t,s=1,o=arguments.length;s<o;s++)for(var n in t=arguments[s])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},Mo.apply(this,arguments)};Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError;function Oo(e){return e.toLowerCase()}var Lo=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],Fo=/[^A-Z0-9]+/gi;function Vo(e,t,s){return t instanceof RegExp?e.replace(t,s):t.reduce((function(e,t){return e.replace(t,s)}),e)}function zo(e,t){return void 0===t&&(t={}),function(e,t){void 0===t&&(t={});for(var s=t.splitRegexp,o=void 0===s?Lo:s,n=t.stripRegexp,i=void 0===n?Fo:n,r=t.transform,a=void 0===r?Oo:r,l=t.delimiter,c=void 0===l?" ":l,d=Vo(Vo(e,o,"$1\0$2"),i,"\0"),u=0,p=d.length;"\0"===d.charAt(u);)u++;for(;"\0"===d.charAt(p-1);)p--;return d.slice(u,p).split("\0").map(a).join(c)}(e,Mo({delimiter:"."},t))}function Uo(e,t){return void 0===t&&(t={}),zo(e,Mo({delimiter:"-"},t))}const Ho=()=>(0,c.useSelect)((e=>e(d.store).getEntityRecords("postType",M,{per_page:-1})),[]),Go=(e,t)=>{const s=e.toLowerCase(),o=t.map((e=>e.title.rendered.toLowerCase()));if(!o.includes(s))return e;let n=2;for(;o.includes(`${s} ${n}`);)n++;return`${e} ${n}`},$o=e=>Uo(e).replace(/[^\w-]+/g,"")||"wp-custom-part";function Wo({modalTitle:e,...t}){const s=(0,c.useSelect)((e=>e(d.store).getPostType(M)?.labels?.add_new_item),[]);return(0,P.jsx)(Do.Modal,{title:e||s,onRequestClose:t.closeModal,overlayClassName:"editor-create-template-part-modal",focusOnMount:"firstContentElement",size:"medium",children:(0,P.jsx)(Zo,{...t})})}function Zo({defaultArea:e=D,blocks:t=[],confirmLabel:s=(0,gs.__)("Add"),closeModal:o,onCreate:n,onError:i,defaultTitle:r=""}){const{createErrorNotice:a}=(0,c.useDispatch)(ms.store),{saveEntityRecord:l}=(0,c.useDispatch)(d.store),h=Ho(),[m,g]=(0,u.useState)(r),[_,f]=(0,u.useState)(e),[b,x]=(0,u.useState)(!1),v=(0,p.useInstanceId)(Wo),w=(0,c.useSelect)((e=>e(qi).__experimentalGetDefaultTemplatePartAreas()),[]);return(0,P.jsx)("form",{onSubmit:async e=>{e.preventDefault(),await async function(){if(m&&!b)try{x(!0);const e=Go(m,h),s=$o(e),o=await l("postType",M,{slug:s,title:e,content:(0,y.serialize)(t),area:_},{throwOnError:!0});await n(o)}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,gs.__)("An error occurred while creating the template part.");a(t,{type:"snackbar"}),i?.()}finally{x(!1)}}()},children:(0,P.jsxs)(Do.__experimentalVStack,{spacing:"4",children:[(0,P.jsx)(Do.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,gs.__)("Name"),value:m,onChange:g,required:!0}),(0,P.jsx)(Do.BaseControl,{__nextHasNoMarginBottom:!0,label:(0,gs.__)("Area"),id:`editor-create-template-part-modal__area-selection-${v}`,className:"editor-create-template-part-modal__area-base-control",children:(0,P.jsx)(Do.__experimentalRadioGroup,{label:(0,gs.__)("Area"),className:"editor-create-template-part-modal__area-radio-group",id:`editor-create-template-part-modal__area-selection-${v}`,onChange:f,checked:_,children:w.map((({icon:e,label:t,area:s,description:o})=>(0,P.jsx)(Do.__experimentalRadio,{value:s,className:"editor-create-template-part-modal__area-radio",children:(0,P.jsxs)(Do.Flex,{align:"start",justify:"start",children:[(0,P.jsx)(Do.FlexItem,{children:(0,P.jsx)(Do.Icon,{icon:e})}),(0,P.jsxs)(Do.FlexBlock,{className:"editor-create-template-part-modal__option-label",children:[t,(0,P.jsx)("div",{children:o})]}),(0,P.jsx)(Do.FlexItem,{className:"editor-create-template-part-modal__checkbox",children:_===s&&(0,P.jsx)(Do.Icon,{icon:Ro})})]})},t)))})}),(0,P.jsxs)(Do.__experimentalHStack,{justify:"right",children:[(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{o()},children:(0,gs.__)("Cancel")}),(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit","aria-disabled":!m||b,isBusy:b,children:s})]})]})})}function Yo(e){return e.type===R||e.type===M}function Ko(e){return"string"==typeof e.title?(0,Ao.decodeEntities)(e.title):"rendered"in e.title?(0,Ao.decodeEntities)(e.title.rendered):"raw"in e.title?(0,Ao.decodeEntities)(e.title.raw):""}function qo(e){return!!e&&([e.source,e.source].includes(F.custom)&&!Boolean("wp_template"===e.type&&e?.plugin)&&!e.has_theme_file)}const Qo={id:"duplicate-template-part",label:(0,gs._x)("Duplicate","action label"),isEligible:e=>e.type===M,modalHeader:(0,gs._x)("Duplicate template part","action label"),RenderModal:({items:e,closeModal:t})=>{const[s]=e,o=(0,u.useMemo)((()=>{var e;return null!==(e=s.blocks)&&void 0!==e?e:(0,y.parse)("string"==typeof s.content?s.content:s.content.raw,{__unstableSkipMigrationLogs:!0})}),[s.content,s.blocks]),{createSuccessNotice:n}=(0,c.useDispatch)(ms.store);return(0,P.jsx)(Zo,{blocks:o,defaultArea:s.area,defaultTitle:(0,gs.sprintf)((0,gs._x)("%s (Copy)","template part"),Ko(s)),onCreate:function(){n((0,gs.sprintf)((0,gs._x)('"%s" duplicated.',"template part"),Ko(s)),{type:"snackbar",id:"edit-site-patterns-success"}),t?.()},onError:t,confirmLabel:(0,gs._x)("Duplicate","action label"),closeModal:t})}},Xo=Qo,Jo=(0,P.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(k.Path,{d:"M5.5 12h1.75l-2.5 3-2.5-3H4a8 8 0 113.134 6.35l.907-1.194A6.5 6.5 0 105.5 12zm9.53 1.97l-2.28-2.28V8.5a.75.75 0 00-1.5 0V12a.747.747 0 00.218.529l1.282-.84-1.28.842 2.5 2.5a.75.75 0 101.06-1.061z"})}),en=window.wp.privateApis,{lock:tn,unlock:sn}=(0,en.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/editor"),on={id:"reset-post",label:(0,gs.__)("Reset"),isEligible:e=>Yo(e)&&e?.source===F.custom&&(Boolean("wp_template"===e.type&&e?.plugin)||e?.has_theme_file),icon:Jo,supportsBulk:!0,hideModalHeader:!0,RenderModal:({items:e,closeModal:t,onActionPerformed:s})=>{const[o,n]=(0,u.useState)(!1),{revertTemplate:i}=sn((0,c.useDispatch)(qi)),{saveEditedEntityRecord:r}=(0,c.useDispatch)(d.store),{createSuccessNotice:a,createErrorNotice:l}=(0,c.useDispatch)(ms.store);return(0,P.jsxs)(Do.__experimentalVStack,{spacing:"5",children:[(0,P.jsx)(Do.__experimentalText,{children:(0,gs.__)("Reset to default and clear all customizations?")}),(0,P.jsxs)(Do.__experimentalHStack,{justify:"right",children:[(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,disabled:o,accessibleWhenDisabled:!0,children:(0,gs.__)("Cancel")}),(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:async()=>{n(!0),await(async()=>{try{for(const t of e)await i(t,{allowUndo:!1}),await r("postType",t.type,t.id);a(e.length>1?(0,gs.sprintf)((0,gs.__)("%s items reset."),e.length):(0,gs.sprintf)((0,gs.__)('"%s" reset.'),Ko(e[0])),{type:"snackbar",id:"revert-template-action"})}catch(t){let s;s=e[0].type===R?1===e.length?(0,gs.__)("An error occurred while reverting the template."):(0,gs.__)("An error occurred while reverting the templates."):1===e.length?(0,gs.__)("An error occurred while reverting the template part."):(0,gs.__)("An error occurred while reverting the template parts.");const o=t,n=o.message&&"unknown_error"!==o.code?o.message:s;l(n,{type:"snackbar"})}})(),s?.(e),n(!1),t?.()},isBusy:o,disabled:o,accessibleWhenDisabled:!0,children:(0,gs.__)("Reset")})]})]})}},nn=on,rn=(0,P.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(k.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z"})}),an={id:"move-to-trash",label:(0,gs.__)("Move to trash"),isPrimary:!0,icon:rn,isEligible:e=>!Yo(e)&&"wp_block"!==e.type&&(!!e.status&&!["auto-draft","trash"].includes(e.status)&&e.permissions?.delete),supportsBulk:!0,hideModalHeader:!0,RenderModal:({items:e,closeModal:t,onActionPerformed:s})=>{const[o,n]=(0,u.useState)(!1),{createSuccessNotice:i,createErrorNotice:r}=(0,c.useDispatch)(ms.store),{deleteEntityRecord:a}=(0,c.useDispatch)(d.store);return(0,P.jsxs)(Do.__experimentalVStack,{spacing:"5",children:[(0,P.jsx)(Do.__experimentalText,{children:1===e.length?(0,gs.sprintf)((0,gs.__)('Are you sure you want to move "%s" to the trash?'),Ko(e[0])):(0,gs.sprintf)((0,gs._n)("Are you sure you want to move %d item to the trash ?","Are you sure you want to move %d items to the trash ?",e.length),e.length)}),(0,P.jsxs)(Do.__experimentalHStack,{justify:"right",children:[(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,disabled:o,accessibleWhenDisabled:!0,children:(0,gs.__)("Cancel")}),(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:async()=>{n(!0);const o=await Promise.allSettled(e.map((e=>a("postType",e.type,e.id.toString(),{},{throwOnError:!0}))));if(o.every((({status:e})=>"fulfilled"===e))){let t;t=1===o.length?(0,gs.sprintf)((0,gs.__)('"%s" moved to the trash.'),Ko(e[0])):(0,gs.sprintf)((0,gs._n)("%s item moved to the trash.","%s items moved to the trash.",e.length),e.length),i(t,{type:"snackbar",id:"move-to-trash-action"})}else{let e;if(1===o.length){const t=o[0];e=t.reason?.message?t.reason.message:(0,gs.__)("An error occurred while moving the item to the trash.")}else{const t=new Set,s=o.filter((({status:e})=>"rejected"===e));for(const e of s){const s=e;s.reason?.message&&t.add(s.reason.message)}e=0===t.size?(0,gs.__)("An error occurred while moving the items to the trash."):1===t.size?(0,gs.sprintf)((0,gs.__)("An error occurred while moving the item to the trash: %s"),[...t][0]):(0,gs.sprintf)((0,gs.__)("Some errors occurred while moving the items to the trash: %s"),[...t].join(","))}r(e,{type:"snackbar"})}s&&s(e),n(!1),t?.()},isBusy:o,disabled:o,accessibleWhenDisabled:!0,children:(0,gs._x)("Trash","verb")})]})]})}},ln=an,cn=window.wp.patterns,{PATTERN_TYPES:dn}=sn(cn.privateApis),un={id:"rename-post",label:(0,gs.__)("Rename"),isEligible:e=>"trash"!==e.status&&([R,M,...Object.values(dn)].includes(e.type)?function(e){return e.type===R}(e)?qo(e)&&e.is_custom&&e.permissions?.update:function(e){return e.type===M}(e)?e.source===F.custom&&!e?.has_theme_file&&e.permissions?.update:e.type===dn.user&&e.permissions?.update:e.permissions?.update),RenderModal:({items:e,closeModal:t,onActionPerformed:s})=>{const[o]=e,[n,i]=(0,u.useState)((()=>Ko(o))),{editEntityRecord:r,saveEditedEntityRecord:a}=(0,c.useDispatch)(d.store),{createSuccessNotice:l,createErrorNotice:p}=(0,c.useDispatch)(ms.store);return(0,P.jsx)("form",{onSubmit:async function(c){c.preventDefault();try{await r("postType",o.type,o.id,{title:n}),i(""),t?.(),await a("postType",o.type,o.id,{throwOnError:!0}),l((0,gs.__)("Name updated"),{type:"snackbar"}),s?.(e)}catch(e){const t=e,s=t.message&&"unknown_error"!==t.code?t.message:(0,gs.__)("An error occurred while updating the name");p(s,{type:"snackbar"})}},children:(0,P.jsxs)(Do.__experimentalVStack,{spacing:"5",children:[(0,P.jsx)(Do.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,gs.__)("Name"),value:n,onChange:i,required:!0}),(0,P.jsxs)(Do.__experimentalHStack,{justify:"right",children:[(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t?.()},children:(0,gs.__)("Cancel")}),(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,gs.__)("Save")})]})]})})}},pn=un,hn={id:"restore",label:(0,gs.__)("Restore"),isPrimary:!0,icon:Jo,supportsBulk:!0,isEligible:e=>!Yo(e)&&"wp_block"!==e.type&&"trash"===e.status&&e.permissions?.update,async callback(e,{registry:t,onActionPerformed:s}){const{createSuccessNotice:o,createErrorNotice:n}=t.dispatch(ms.store),{editEntityRecord:i,saveEditedEntityRecord:r}=t.dispatch(d.store);await Promise.allSettled(e.map((e=>i("postType",e.type,e.id,{status:"draft"}))));const a=await Promise.allSettled(e.map((e=>r("postType",e.type,e.id,{throwOnError:!0}))));if(a.every((({status:e})=>"fulfilled"===e))){let t;t=1===e.length?(0,gs.sprintf)((0,gs.__)('"%s" has been restored.'),Ko(e[0])):"page"===e[0].type?(0,gs.sprintf)((0,gs.__)("%d pages have been restored."),e.length):(0,gs.sprintf)((0,gs.__)("%d posts have been restored."),e.length),o(t,{type:"snackbar",id:"restore-post-action"}),s&&s(e)}else{let e;if(1===a.length){const t=a[0];e=t.reason?.message?t.reason.message:(0,gs.__)("An error occurred while restoring the post.")}else{const t=new Set,s=a.filter((({status:e})=>"rejected"===e));for(const e of s){const s=e;s.reason?.message&&t.add(s.reason.message)}e=0===t.size?(0,gs.__)("An error occurred while restoring the posts."):1===t.size?(0,gs.sprintf)((0,gs.__)("An error occurred while restoring the posts: %s"),[...t][0]):(0,gs.sprintf)((0,gs.__)("Some errors occurred while restoring the posts: %s"),[...t].join(","))}n(e,{type:"snackbar"})}}},mn=(0,P.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(k.Path,{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"})}),gn={id:"view-post",label:(0,gs._x)("View","verb"),isPrimary:!0,icon:mn,isEligible:e=>"trash"!==e.status,callback(e,{onActionPerformed:t}){const s=e[0];window.open(s?.link,"_blank"),t&&t(e)}},_n={id:"view-post-revisions",context:"list",label(e){var t;const s=null!==(t=e[0]._links?.["version-history"]?.[0]?.count)&&void 0!==t?t:0;return(0,gs.sprintf)((0,gs.__)("View revisions (%s)"),s)},isEligible(e){var t,s;if("trash"===e.status)return!1;const o=null!==(t=e?._links?.["predecessor-version"]?.[0]?.id)&&void 0!==t?t:null,n=null!==(s=e?._links?.["version-history"]?.[0]?.count)&&void 0!==s?s:0;return!!o&&n>1},callback(e,{onActionPerformed:t}){const s=e[0],o=(0,v.addQueryArgs)("revision.php",{revision:s?._links?.["predecessor-version"]?.[0]?.id});document.location.href=o,t&&t(e)}},{lock:fn,unlock:bn}=(0,en.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/fields"),{CreatePatternModalContents:yn,useDuplicatePatternProps:xn}=bn(cn.privateApis),vn={id:"duplicate-pattern",label:(0,gs._x)("Duplicate","action label"),isEligible:e=>"wp_template_part"!==e.type,modalHeader:(0,gs._x)("Duplicate pattern","action label"),RenderModal:({items:e,closeModal:t})=>{const[s]=e,o=xn({pattern:s,onSuccess:()=>t?.()});return(0,P.jsx)(yn,{onClose:t,confirmLabel:(0,gs._x)("Duplicate","action label"),...o})}},wn=vn;const Sn={sort:function(e,t,s){return"asc"===s?e-t:t-e},isValid:function(e,t){if(""===e)return!1;if(!Number.isInteger(Number(e)))return!1;if(t?.elements){const s=t?.elements.map((e=>e.value));if(!s.includes(Number(e)))return!1}return!0},Edit:"integer"};const kn={sort:function(e,t,s){return"asc"===s?e.localeCompare(t):t.localeCompare(e)},isValid:function(e,t){if(t?.elements){const s=t?.elements?.map((e=>e.value));if(!s.includes(e))return!1}return!0},Edit:"text"};const Pn={sort:function(e,t,s){const o=new Date(e).getTime(),n=new Date(t).getTime();return"asc"===s?o-n:n-o},isValid:function(e,t){if(t?.elements){const s=t?.elements.map((e=>e.value));if(!s.includes(e))return!1}return!0},Edit:"datetime"};const Cn={datetime:function({data:e,field:t,onChange:s,hideLabelFromVision:o}){const{id:n,label:i}=t,r=t.getValue({item:e}),a=(0,u.useCallback)((e=>s({[n]:e})),[n,s]);return(0,P.jsxs)("fieldset",{className:"dataviews-controls__datetime",children:[!o&&(0,P.jsx)(Do.BaseControl.VisualLabel,{as:"legend",children:i}),o&&(0,P.jsx)(Do.VisuallyHidden,{as:"legend",children:i}),(0,P.jsx)(Do.TimePicker,{currentTime:r,onChange:a,hideLabelFromVision:!0})]})},integer:function({data:e,field:t,onChange:s,hideLabelFromVision:o}){var n;const{id:i,label:r,description:a}=t,l=null!==(n=t.getValue({item:e}))&&void 0!==n?n:"",c=(0,u.useCallback)((e=>s({[i]:Number(e)})),[i,s]);return(0,P.jsx)(Do.__experimentalNumberControl,{label:r,help:a,value:l,onChange:c,__next40pxDefaultSize:!0,hideLabelFromVision:o})},radio:function({data:e,field:t,onChange:s,hideLabelFromVision:o}){const{id:n,label:i}=t,r=t.getValue({item:e}),a=(0,u.useCallback)((e=>s({[n]:e})),[n,s]);return t.elements?(0,P.jsx)(Do.RadioControl,{label:i,onChange:a,options:t.elements,selected:r,hideLabelFromVision:o}):null},select:function({data:e,field:t,onChange:s,hideLabelFromVision:o}){var n,i;const{id:r,label:a}=t,l=null!==(n=t.getValue({item:e}))&&void 0!==n?n:"",c=(0,u.useCallback)((e=>s({[r]:e})),[r,s]),d=[{label:(0,gs.__)("Select item"),value:""},...null!==(i=t?.elements)&&void 0!==i?i:[]];return(0,P.jsx)(Do.SelectControl,{label:a,value:l,options:d,onChange:c,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,hideLabelFromVision:o})},text:function({data:e,field:t,onChange:s,hideLabelFromVision:o}){const{id:n,label:i,placeholder:r}=t,a=t.getValue({item:e}),l=(0,u.useCallback)((e=>s({[n]:e})),[n,s]);return(0,P.jsx)(Do.TextControl,{label:i,placeholder:r,value:null!=a?a:"",onChange:l,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,hideLabelFromVision:o})}};function jn(e){if(Object.keys(Cn).includes(e))return Cn[e];throw"Control "+e+" not found"}function En(e){return e.map((e=>{var t,s,o,n;const i="integer"===(r=e.type)?Sn:"text"===r?kn:"datetime"===r?Pn:{sort:(e,t,s)=>"number"==typeof e&&"number"==typeof t?"asc"===s?e-t:t-e:"asc"===s?e.localeCompare(t):t.localeCompare(e),isValid:(e,t)=>{if(t?.elements){const s=t?.elements?.map((e=>e.value));if(!s.includes(e))return!1}return!0},Edit:()=>null};var r;const a=e.getValue||(({item:t})=>t[e.id]),l=null!==(t=e.sort)&&void 0!==t?t:function(e,t,s){return i.sort(a({item:e}),a({item:t}),s)},c=null!==(s=e.isValid)&&void 0!==s?s:function(e,t){return i.isValid(a({item:e}),t)},d=function(e,t){return"function"==typeof e.Edit?e.Edit:"string"==typeof e.Edit?jn(e.Edit):e.elements?jn("select"):"string"==typeof t.Edit?jn(t.Edit):t.Edit}(e,i),u=e.render||(e.elements?({item:t})=>{const s=a({item:t});return e?.elements?.find((e=>e.value===s))?.label||a({item:t})}:a);return{...e,label:e.label||e.id,header:e.header||e.label||e.id,getValue:a,render:u,sort:l,isValid:c,Edit:d,enableHiding:null===(o=e.enableHiding)||void 0===o||o,enableSorting:null===(n=e.enableSorting)||void 0===n||n}}))}function Tn(e,t,s){return En(t.filter((({id:e})=>!!s.fields?.includes(e)))).every((t=>t.isValid(e,{elements:t.elements})))}const Bn=(0,P.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(k.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 In({title:e,onClose:t}){return(0,P.jsx)(Do.__experimentalVStack,{className:"dataforms-layouts-panel__dropdown-header",spacing:4,children:(0,P.jsxs)(Do.__experimentalHStack,{alignment:"center",children:[(0,P.jsx)(Do.__experimentalHeading,{level:2,size:13,children:e}),(0,P.jsx)(Do.__experimentalSpacer,{}),t&&(0,P.jsx)(Do.Button,{label:(0,gs.__)("Close"),icon:Bn,onClick:t,size:"small"})]})})}function Nn({data:e,field:t,onChange:s}){const[o,n]=(0,u.useState)(null),i=(0,u.useMemo)((()=>({anchor:o,placement:"left-start",offset:36,shift:!0})),[o]);return(0,P.jsxs)(Do.__experimentalHStack,{ref:n,className:"dataforms-layouts-panel__field",children:[(0,P.jsx)("div",{className:"dataforms-layouts-panel__field-label",children:t.label}),(0,P.jsx)("div",{children:(0,P.jsx)(Do.Dropdown,{contentClassName:"dataforms-layouts-panel__field-dropdown",popoverProps:i,focusOnMount:!0,toggleProps:{size:"compact",variant:"tertiary",tooltipPosition:"middle left"},renderToggle:({isOpen:s,onToggle:o})=>(0,P.jsx)(Do.Button,{className:"dataforms-layouts-panel__field-control",size:"compact",variant:"tertiary","aria-expanded":s,"aria-label":(0,gs.sprintf)((0,gs._x)("Edit %s","field"),t.label),onClick:o,children:(0,P.jsx)(t.render,{item:e})}),renderContent:({onClose:o})=>(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(In,{title:t.label,onClose:o}),(0,P.jsx)(t.Edit,{data:e,field:t,onChange:s,hideLabelFromVision:!0},t.id)]})})})]})}const An=[{type:"regular",component:function({data:e,fields:t,form:s,onChange:o}){const n=(0,u.useMemo)((()=>{var e;return En((null!==(e=s.fields)&&void 0!==e?e:[]).map((e=>t.find((({id:t})=>t===e)))).filter((e=>!!e)))}),[t,s.fields]);return(0,P.jsx)(Do.__experimentalVStack,{spacing:4,children:n.map((t=>(0,P.jsx)(t.Edit,{data:e,field:t,onChange:o},t.id)))})}},{type:"panel",component:function({data:e,fields:t,form:s,onChange:o}){const n=(0,u.useMemo)((()=>{var e;return En((null!==(e=s.fields)&&void 0!==e?e:[]).map((e=>t.find((({id:t})=>t===e)))).filter((e=>!!e)))}),[t,s.fields]);return(0,P.jsx)(Do.__experimentalVStack,{spacing:2,children:n.map((t=>(0,P.jsx)(Nn,{data:e,field:t,onChange:o},t.id)))})}}];function Dn({form:e,...t}){var s;const o=(n=null!==(s=e.type)&&void 0!==s?s:"regular",An.find((e=>e.type===n)));var n;return o?(0,P.jsx)(o.component,{form:e,...t}):null}const Rn=[{type:"integer",id:"menu_order",label:(0,gs.__)("Order"),description:(0,gs.__)("Determines the order of pages.")}],Mn={fields:["menu_order"]};const On={id:"order-pages",label:(0,gs.__)("Order"),isEligible:({status:e})=>"trash"!==e,RenderModal:function({items:e,closeModal:t,onActionPerformed:s}){const[o,n]=(0,u.useState)(e[0]),i=o.menu_order,{editEntityRecord:r,saveEditedEntityRecord:a}=(0,c.useDispatch)(d.store),{createSuccessNotice:l,createErrorNotice:p}=(0,c.useDispatch)(ms.store),h=!Tn(o,Rn,Mn);return(0,P.jsx)("form",{onSubmit:async function(n){if(n.preventDefault(),Tn(o,Rn,Mn))try{await r("postType",o.type,o.id,{menu_order:i}),t?.(),await a("postType",o.type,o.id,{throwOnError:!0}),l((0,gs.__)("Order updated."),{type:"snackbar"}),s?.(e)}catch(e){const t=e,s=t.message&&"unknown_error"!==t.code?t.message:(0,gs.__)("An error occurred while updating the order");p(s,{type:"snackbar"})}},children:(0,P.jsxs)(Do.__experimentalVStack,{spacing:"5",children:[(0,P.jsx)("div",{children:(0,gs.__)("Determines the order of pages. Pages with the same order value are sorted alphabetically. Negative order values are supported.")}),(0,P.jsx)(Dn,{data:o,fields:Rn,form:Mn,onChange:e=>n({...o,...e})}),(0,P.jsxs)(Do.__experimentalHStack,{justify:"right",children:[(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t?.()},children:(0,gs.__)("Cancel")}),(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",accessibleWhenDisabled:!0,disabled:h,children:(0,gs.__)("Save")})]})]})})}},Ln=On;"stream"in Blob.prototype||Object.defineProperty(Blob.prototype,"stream",{value(){return new Response(this).body}}),"setBigUint64"in DataView.prototype||Object.defineProperty(DataView.prototype,"setBigUint64",{value(e,t,s){const o=Number(0xffffffffn&t),n=Number(t>>32n);this.setUint32(e+(s?0:4),o,s),this.setUint32(e+(s?4:0),n,s)}});var Fn=e=>new DataView(new ArrayBuffer(e)),Vn=e=>new Uint8Array(e.buffer||e),zn=e=>(new TextEncoder).encode(String(e)),Un=e=>Math.min(4294967295,Number(e)),Hn=e=>Math.min(65535,Number(e));function Gn(e,t){if(void 0===t||t instanceof Date||(t=new Date(t)),e instanceof File)return{isFile:1,t:t||new Date(e.lastModified),i:e.stream()};if(e instanceof Response)return{isFile:1,t:t||new Date(e.headers.get("Last-Modified")||Date.now()),i:e.body};if(void 0===t)t=new Date;else if(isNaN(t))throw new Error("Invalid modification date.");if(void 0===e)return{isFile:0,t};if("string"==typeof e)return{isFile:1,t,i:zn(e)};if(e instanceof Blob)return{isFile:1,t,i:e.stream()};if(e instanceof Uint8Array||e instanceof ReadableStream)return{isFile:1,t,i:e};if(e instanceof ArrayBuffer||ArrayBuffer.isView(e))return{isFile:1,t,i:Vn(e)};if(Symbol.asyncIterator in e)return{isFile:1,t,i:$n(e[Symbol.asyncIterator]())};throw new TypeError("Unsupported input format.")}function $n(e,t=e){return new ReadableStream({async pull(t){let s=0;for(;t.desiredSize>s;){const o=await e.next();if(!o.value){t.close();break}{const e=Wn(o.value);t.enqueue(e),s+=e.byteLength}}},cancel(e){t.throw?.(e)}})}function Wn(e){return"string"==typeof e?zn(e):e instanceof Uint8Array?e:Vn(e)}function Zn(e,t,s){let[o,n]=function(e){return e?e instanceof Uint8Array?[e,1]:ArrayBuffer.isView(e)||e instanceof ArrayBuffer?[Vn(e),1]:[zn(e),0]:[void 0,0]}(t);if(e instanceof File)return{o:Kn(o||zn(e.name)),u:BigInt(e.size),l:n};if(e instanceof Response){const t=e.headers.get("content-disposition"),i=t&&t.match(/;\s*filename\*?=["']?(.*?)["']?$/i),r=i&&i[1]||e.url&&new URL(e.url).pathname.split("/").findLast(Boolean),a=r&&decodeURIComponent(r),l=s||+e.headers.get("content-length");return{o:Kn(o||zn(a)),u:BigInt(l),l:n}}return o=Kn(o,void 0!==e||void 0!==s),"string"==typeof e?{o,u:BigInt(zn(e).length),l:n}:e instanceof Blob?{o,u:BigInt(e.size),l:n}:e instanceof ArrayBuffer||ArrayBuffer.isView(e)?{o,u:BigInt(e.byteLength),l:n}:{o,u:Yn(e,s),l:n}}function Yn(e,t){return t>-1?BigInt(t):e?void 0:0n}function Kn(e,t=1){if(!e||e.every((e=>47===e)))throw new Error("The file must have a name.");if(t)for(;47===e[e.length-1];)e=e.subarray(0,-1);else 47!==e[e.length-1]&&(e=new Uint8Array([...e,47]));return e}var qn=new Uint32Array(256);for(let e=0;e<256;++e){let t=e;for(let e=0;e<8;++e)t=t>>>1^(1&t&&3988292384);qn[e]=t}function Qn(e,t=0){t^=-1;for(var s=0,o=e.length;s<o;s++)t=t>>>8^qn[255&t^e[s]];return(-1^t)>>>0}function Xn(e,t,s=0){const o=e.getSeconds()>>1|e.getMinutes()<<5|e.getHours()<<11,n=e.getDate()|e.getMonth()+1<<5|e.getFullYear()-1980<<9;t.setUint16(s,o,1),t.setUint16(s+2,n,1)}function Jn({o:e,l:t},s){return 8*(!t||(s??function(e){try{ei.decode(e)}catch{return 0}return 1}(e)))}var ei=new TextDecoder("utf8",{fatal:1});function ti(e,t=0){const s=Fn(30);return s.setUint32(0,1347093252),s.setUint32(4,754976768|t),Xn(e.t,s,10),s.setUint16(26,e.o.length,1),Vn(s)}async function*si(e){let{i:t}=e;if("then"in t&&(t=await t),t instanceof Uint8Array)yield t,e.m=Qn(t,0),e.u=BigInt(t.length);else{e.u=0n;const s=t.getReader();for(;;){const{value:t,done:o}=await s.read();if(o)break;e.m=Qn(t,e.m),e.u+=BigInt(t.length),yield t}}}function oi(e,t){const s=Fn(16+(t?8:0));return s.setUint32(0,1347094280),s.setUint32(4,e.isFile?e.m:0,1),t?(s.setBigUint64(8,e.u,1),s.setBigUint64(16,e.u,1)):(s.setUint32(8,Un(e.u),1),s.setUint32(12,Un(e.u),1)),Vn(s)}function ni(e,t,s=0,o=0){const n=Fn(46);return n.setUint32(0,1347092738),n.setUint32(4,755182848),n.setUint16(8,2048|s),Xn(e.t,n,12),n.setUint32(16,e.isFile?e.m:0,1),n.setUint32(20,Un(e.u),1),n.setUint32(24,Un(e.u),1),n.setUint16(28,e.o.length,1),n.setUint16(30,o,1),n.setUint16(40,e.isFile?33204:16893,1),n.setUint32(42,Un(t),1),Vn(n)}function ii(e,t,s){const o=Fn(s);return o.setUint16(0,1,1),o.setUint16(2,s-4,1),16&s&&(o.setBigUint64(4,e.u,1),o.setBigUint64(12,e.u,1)),o.setBigUint64(s-8,t,1),Vn(o)}function ri(e){return e instanceof File||e instanceof Response?[[e],[e]]:[[e.input,e.name,e.size],[e.input,e.lastModified]]}function ai(e,t={}){const s={"Content-Type":"application/zip","Content-Disposition":"attachment"};return("bigint"==typeof t.length||Number.isInteger(t.length))&&t.length>0&&(s["Content-Length"]=String(t.length)),t.metadata&&(s["Content-Length"]=String((e=>function(e){let t=BigInt(22),s=0n,o=0;for(const n of e){if(!n.o)throw new Error("Every file must have a non-empty name.");if(void 0===n.u)throw new Error(`Missing size for file "${(new TextDecoder).decode(n.o)}".`);const e=n.u>=0xffffffffn,i=s>=0xffffffffn;s+=BigInt(46+n.o.length+(e&&8))+n.u,t+=BigInt(n.o.length+46+(12*i|28*e)),o||(o=e)}return(o||s>=0xffffffffn)&&(t+=BigInt(76)),t+s}(function*(e){for(const t of e)yield Zn(...ri(t)[0])}(e)))(t.metadata))),new Response(li(e,t),{headers:s})}function li(e,t={}){const s=function(e){const t=e[Symbol.iterator in e?Symbol.iterator:Symbol.asyncIterator]();return{async next(){const e=await t.next();if(e.done)return e;const[s,o]=ri(e.value);return{done:0,value:Object.assign(Gn(...o),Zn(...s))}},throw:t.throw?.bind(t),[Symbol.asyncIterator](){return this}}}(e);return $n(async function*(e,t){const s=[];let o=0n,n=0n,i=0;for await(const r of e){const e=Jn(r,t.buffersAreUTF8);yield ti(r,e),yield new Uint8Array(r.o),r.isFile&&(yield*si(r));const a=r.u>=0xffffffffn,l=12*(o>=0xffffffffn)|28*a;yield oi(r,a),s.push(ni(r,o,e,l)),s.push(r.o),l&&s.push(ii(r,o,l)),a&&(o+=8n),n++,o+=BigInt(46+r.o.length)+r.u,i||(i=a)}let r=0n;for(const e of s)yield e,r+=BigInt(e.length);if(i||o>=0xffffffffn){const e=Fn(76);e.setUint32(0,1347094022),e.setBigUint64(4,BigInt(44),1),e.setUint32(12,755182848),e.setBigUint64(24,n,1),e.setBigUint64(32,n,1),e.setBigUint64(40,r,1),e.setBigUint64(48,o,1),e.setUint32(56,1347094023),e.setBigUint64(64,o+r,1),e.setUint32(72,1,1),yield Vn(e)}const a=Fn(22);a.setUint32(0,1347093766),a.setUint16(8,Hn(n),1),a.setUint16(10,Hn(n),1),a.setUint32(12,Un(r),1),a.setUint32(16,Un(o),1),yield Vn(a)}(s,t),s)}const ci=window.wp.blob,di=(0,P.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(k.Path,{d:"M18 11.3l-1-1.1-4 4V3h-1.5v11.3L7 10.2l-1 1.1 6.2 5.8 5.8-5.8zm.5 3.7v3.5h-13V15H4v5h16v-5h-1.5z"})}),ui="wp_template",pi="wp_template_part";function hi(e){return"string"==typeof e.title?(0,Ao.decodeEntities)(e.title):"rendered"in e.title?(0,Ao.decodeEntities)(e.title.rendered):"raw"in e.title?(0,Ao.decodeEntities)(e.title.raw):""}function mi(e){return JSON.stringify({__file:e.type,title:hi(e),content:"string"==typeof e.content?e.content:e.content?.raw,syncStatus:e.wp_pattern_sync_status},null,2)}const gi={id:"export-pattern",label:(0,gs.__)("Export as JSON"),icon:di,supportsBulk:!0,isEligible:e=>"wp_block"===e.type,callback:async e=>{if(1===e.length)return(0,ci.downloadBlob)(`${Uo(hi(e[0])||e[0].slug)}.json`,mi(e[0]),"application/json");const t={},s=e.map((e=>{const s=Uo(hi(e)||e.slug);return t[s]=(t[s]||0)+1,{name:s+(t[s]>1?"-"+(t[s]-1):"")+".json",lastModified:new Date,input:mi(e)}}));return(0,ci.downloadBlob)((0,gs.__)("patterns-export")+".zip",await ai(s).blob(),"application/zip")}},_i={id:"permanently-delete",label:(0,gs.__)("Permanently delete"),supportsBulk:!0,icon:rn,isEligible(e){if(function(e){return e.type===ui||e.type===pi}(e)||"wp_block"===e.type)return!1;const{status:t,permissions:s}=e;return"trash"===t&&s?.delete},async callback(e,{registry:t,onActionPerformed:s}){const{createSuccessNotice:o,createErrorNotice:n}=t.dispatch(ms.store),{deleteEntityRecord:i}=t.dispatch(d.store),r=await Promise.allSettled(e.map((e=>i("postType",e.type,e.id,{force:!0},{throwOnError:!0}))));if(r.every((({status:e})=>"fulfilled"===e))){let t;t=1===r.length?(0,gs.sprintf)((0,gs.__)('"%s" permanently deleted.'),hi(e[0])):(0,gs.__)("The items were permanently deleted."),o(t,{type:"snackbar",id:"permanently-delete-post-action"}),s?.(e)}else{let e;if(1===r.length){const t=r[0];e=t.reason?.message?t.reason.message:(0,gs.__)("An error occurred while permanently deleting the item.")}else{const t=new Set,s=r.filter((({status:e})=>"rejected"===e));for(const e of s){const s=e;s.reason?.message&&t.add(s.reason.message)}e=0===t.size?(0,gs.__)("An error occurred while permanently deleting the items."):1===t.size?(0,gs.sprintf)((0,gs.__)("An error occurred while permanently deleting the items: %s"),[...t][0]):(0,gs.sprintf)((0,gs.__)("Some errors occurred while permanently deleting the items: %s"),[...t].join(","))}n(e,{type:"snackbar"})}}},fi=_i,{PATTERN_TYPES:bi}=sn(cn.privateApis),yi={id:"delete-post",label:(0,gs.__)("Delete"),isPrimary:!0,icon:rn,isEligible:e=>Yo(e)?qo(e):e.type===bi.user,supportsBulk:!0,hideModalHeader:!0,RenderModal:({items:e,closeModal:t,onActionPerformed:s})=>{const[o,n]=(0,u.useState)(!1),{removeTemplates:i}=sn((0,c.useDispatch)(qi));return(0,P.jsxs)(Do.__experimentalVStack,{spacing:"5",children:[(0,P.jsx)(Do.__experimentalText,{children:e.length>1?(0,gs.sprintf)((0,gs._n)("Delete %d item?","Delete %d items?",e.length),e.length):(0,gs.sprintf)((0,gs._x)('Delete "%s"?',"template part"),Ko(e[0]))}),(0,P.jsxs)(Do.__experimentalHStack,{justify:"right",children:[(0,P.jsx)(Do.Button,{variant:"tertiary",onClick:t,disabled:o,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,gs.__)("Cancel")}),(0,P.jsx)(Do.Button,{variant:"primary",onClick:async()=>{n(!0),await i(e,{allowUndo:!1}),s?.(e),n(!1),t?.()},isBusy:o,disabled:o,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,gs.__)("Delete")})]})]})}},xi=yi;function vi(e,t,s){return{type:"REGISTER_ENTITY_ACTION",kind:e,name:t,config:s}}function wi(e,t,s){return{type:"UNREGISTER_ENTITY_ACTION",kind:e,name:t,actionId:s}}function Si(e,t){return{type:"SET_IS_READY",kind:e,name:t}}const ki=e=>async({registry:t})=>{if(sn(t.select(qi)).isEntityReady("postType",e))return;sn(t.dispatch(qi)).setIsReady("postType",e);const s=await t.resolveSelect(d.store).getPostType(e),o=await t.resolveSelect(d.store).canUser("create",{kind:"postType",name:e}),n=await t.resolveSelect(d.store).getCurrentTheme(),i=[s.viewable?gn:void 0,s?.supports?.revisions?_n:void 0,void 0,"wp_template_part"===s.slug&&o&&n?.is_block_theme?Xo:void 0,o&&"wp_block"===s.slug?wn:void 0,s.supports?.title?pn:void 0,s?.supports?.["page-attributes"]?Ln:void 0,"wp_block"===s.slug?gi:void 0,nn,hn,xi,ln,fi];t.batch((()=>{i.forEach((s=>{s&&sn(t.dispatch(qi)).registerEntityAction("postType",e,s)}))})),(0,h.doAction)("core.registerPostTypeActions",e)};function Pi(e){return{type:"SET_CURRENT_TEMPLATE_ID",id:e}}const Ci=e=>async({select:t,dispatch:s,registry:o})=>{const n=await o.dispatch(d.store).saveEntityRecord("postType","wp_template",e);return o.dispatch(d.store).editEntityRecord("postType",t.getCurrentPostType(),t.getCurrentPostId(),{template:n.slug}),o.dispatch(ms.store).createSuccessNotice((0,gs.__)("Custom template created. You're in template mode now."),{type:"snackbar",actions:[{label:(0,gs.__)("Go back"),onClick:()=>s.setRenderingMode(t.getEditorSettings().defaultRenderingMode)}]}),n},ji=e=>({registry:t})=>{var s;const o=(null!==(s=t.select(j.store).get("core","hiddenBlockTypes"))&&void 0!==s?s:[]).filter((t=>!(Array.isArray(e)?e:[e]).includes(t)));t.dispatch(j.store).set("core","hiddenBlockTypes",o)},Ei=e=>({registry:t})=>{var s;const o=null!==(s=t.select(j.store).get("core","hiddenBlockTypes"))&&void 0!==s?s:[],n=new Set([...o,...Array.isArray(e)?e:[e]]);t.dispatch(j.store).set("core","hiddenBlockTypes",[...n])},Ti=({onSave:e,dirtyEntityRecords:t=[],entitiesToSkip:s=[],close:o}={})=>({registry:n})=>{const i=[{kind:"postType",name:"wp_navigation"}],r="site-editor-save-success",a=n.select(d.store).getEntityRecord("root","__unstableBase")?.home;n.dispatch(ms.store).removeNotice(r);const l=t.filter((({kind:e,name:t,key:o,property:n})=>!s.some((s=>s.kind===e&&s.name===t&&s.key===o&&s.property===n))));o?.(l);const c=[],u=[];l.forEach((({kind:e,name:t,key:s,property:o})=>{"root"===e&&"site"===t?c.push(o):(i.some((s=>s.kind===e&&s.name===t))&&n.dispatch(d.store).editEntityRecord(e,t,s,{status:"publish"}),u.push(n.dispatch(d.store).saveEditedEntityRecord(e,t,s)))})),c.length&&u.push(n.dispatch(d.store).__experimentalSaveSpecifiedEntityEdits("root","site",void 0,c)),n.dispatch(m.store).__unstableMarkLastChangeAsPersistent(),Promise.all(u).then((t=>e?e(t):t)).then((e=>{e.some((e=>void 0===e))?n.dispatch(ms.store).createErrorNotice((0,gs.__)("Saving failed.")):n.dispatch(ms.store).createSuccessNotice((0,gs.__)("Site updated."),{type:"snackbar",id:r,actions:[{label:(0,gs.__)("View site"),url:a}]})})).catch((e=>n.dispatch(ms.store).createErrorNotice(`${(0,gs.__)("Saving failed.")} ${e}`)))},Bi=(e,{allowUndo:t=!0}={})=>async({registry:s})=>{const o="edit-site-template-reverted";var n;if(s.dispatch(ms.store).removeNotice(o),(n=e)&&n.source===F.custom&&(Boolean(n?.plugin)||n?.has_theme_file))try{const n=s.select(d.store).getEntityConfig("postType",e.type);if(!n)return void s.dispatch(ms.store).createErrorNotice((0,gs.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});const i=(0,v.addQueryArgs)(`${n.baseURL}/${e.id}`,{context:"edit",source:e.origin}),r=await hs()({path:i});if(!r)return void s.dispatch(ms.store).createErrorNotice((0,gs.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});const a=({blocks:e=[]})=>(0,y.__unstableSerializeAndClean)(e),l=s.select(d.store).getEditedEntityRecord("postType",e.type,e.id);s.dispatch(d.store).editEntityRecord("postType",e.type,e.id,{content:a,blocks:l.blocks,source:"custom"},{undoIgnore:!0});const c=(0,y.parse)(r?.content?.raw);if(s.dispatch(d.store).editEntityRecord("postType",e.type,r.id,{content:a,blocks:c,source:"theme"}),t){const t=()=>{s.dispatch(d.store).editEntityRecord("postType",e.type,l.id,{content:a,blocks:l.blocks,source:"custom"})};s.dispatch(ms.store).createSuccessNotice((0,gs.__)("Template reset."),{type:"snackbar",id:o,actions:[{label:(0,gs.__)("Undo"),onClick:t}]})}}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,gs.__)("Template revert failed. Please reload.");s.dispatch(ms.store).createErrorNotice(t,{type:"snackbar"})}else s.dispatch(ms.store).createErrorNotice((0,gs.__)("This template is not revertable."),{type:"snackbar"})},Ii=e=>async({registry:t})=>{const s=e.every((e=>e?.has_theme_file)),o=await Promise.allSettled(e.map((e=>t.dispatch(d.store).deleteEntityRecord("postType",e.type,e.id,{force:!0},{throwOnError:!0}))));if(o.every((({status:e})=>"fulfilled"===e))){let o;if(1===e.length){let t;"string"==typeof e[0].title?t=e[0].title:"string"==typeof e[0].title?.rendered?t=e[0].title?.rendered:"string"==typeof e[0].title?.raw&&(t=e[0].title?.raw),o=s?(0,gs.sprintf)((0,gs.__)('"%s" reset.'),(0,Ao.decodeEntities)(t)):(0,gs.sprintf)((0,gs._x)('"%s" deleted.',"template part"),(0,Ao.decodeEntities)(t))}else o=s?(0,gs.__)("Items reset."):(0,gs.__)("Items deleted.");t.dispatch(ms.store).createSuccessNotice(o,{type:"snackbar",id:"editor-template-deleted-success"})}else{let e;if(1===o.length)e=o[0].reason?.message?o[0].reason.message:s?(0,gs.__)("An error occurred while reverting the item."):(0,gs.__)("An error occurred while deleting the item.");else{const t=new Set,n=o.filter((({status:e})=>"rejected"===e));for(const e of n)e.reason?.message&&t.add(e.reason.message);e=0===t.size?(0,gs.__)("An error occurred while deleting the items."):1===t.size?s?(0,gs.sprintf)((0,gs.__)("An error occurred while reverting the items: %s"),[...t][0]):(0,gs.sprintf)((0,gs.__)("An error occurred while deleting the items: %s"),[...t][0]):s?(0,gs.sprintf)((0,gs.__)("Some errors occurred while reverting the items: %s"),[...t].join(",")):(0,gs.sprintf)((0,gs.__)("Some errors occurred while deleting the items: %s"),[...t].join(","))}t.dispatch(ms.store).createErrorNotice(e,{type:"snackbar"})}};var Ni=s(5215),Ai=s.n(Ni);const Di=(0,P.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(k.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})}),Ri=(0,P.jsx)(k.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,P.jsx)(k.Path,{d:"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm0 14.5c-3.6 0-6.5-2.9-6.5-6.5S8.4 5.5 12 5.5s6.5 2.9 6.5 6.5-2.9 6.5-6.5 6.5zM9 16l4.5-3L15 8.4l-4.5 3L9 16z"})}),Mi=(0,P.jsxs)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,P.jsx)(k.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,P.jsx)(k.Path,{d:"M17 4H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2ZM7 5.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5Z"})]}),Oi=(0,P.jsx)(k.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,P.jsx)(k.Path,{d:"M17.8 2l-.9.3c-.1 0-3.6 1-5.2 2.1C10 5.5 9.3 6.5 8.9 7.1c-.6.9-1.7 4.7-1.7 6.3l-.9 2.3c-.2.4 0 .8.4 1 .1 0 .2.1.3.1.3 0 .6-.2.7-.5l.6-1.5c.3 0 .7-.1 1.2-.2.7-.1 1.4-.3 2.2-.5.8-.2 1.6-.5 2.4-.8.7-.3 1.4-.7 1.9-1.2s.8-1.2 1-1.9c.2-.7.3-1.6.4-2.4.1-.8.1-1.7.2-2.5 0-.8.1-1.5.2-2.1V2zm-1.9 5.6c-.1.8-.2 1.5-.3 2.1-.2.6-.4 1-.6 1.3-.3.3-.8.6-1.4.9-.7.3-1.4.5-2.2.8-.6.2-1.3.3-1.8.4L15 7.5c.3-.3.6-.7 1-1.1 0 .4 0 .8-.1 1.2zM6 20h8v-1.5H6V20z"})}),Li=[];const Fi={rootClientId:void 0,insertionIndex:void 0,filterValue:void 0},Vi=(0,c.createRegistrySelector)((e=>(0,c.createSelector)((t=>{if("object"==typeof t.blockInserterPanel)return t.blockInserterPanel;if("template-locked"===et(t)){const[t]=e(m.store).getBlocksByName("core/post-content");if(t)return{rootClientId:t,insertionIndex:void 0,filterValue:void 0}}return Fi}),(t=>{const[s]=e(m.store).getBlocksByName("core/post-content");return[t.blockInserterPanel,et(t),s]}))));function zi(e){return e.listViewToggleRef}function Ui(e){return e.inserterSidebarToggleRef}const Hi={wp_block:Di,wp_navigation:Ri,page:Mi,post:Oi},Gi=(0,c.createRegistrySelector)((e=>(t,s,o)=>{{if("wp_template_part"===s||"wp_template"===s)return rs(t).find((e=>o.area===e.area))?.icon||C;if(Hi[s])return Hi[s];const n=e(d.store).getPostType(s);return"string"==typeof n?.icon&&n.icon.startsWith("dashicons-")?n.icon.slice(10):Mi}})),$i=(0,c.createRegistrySelector)((e=>(t,s,o)=>{const{type:n,id:i}=te(t),r=e(d.store).getEntityRecordNonTransientEdits("postType",s||n,o||i);if(!r?.meta)return!1;const a=e(d.store).getEntityRecord("postType",s||n,o||i)?.meta;return!Ai()({...a,footnotes:void 0},{...r.meta,footnotes:void 0})}));function Wi(e,...t){return function(e,t,s){var o;return null!==(o=e.actions[t]?.[s])&&void 0!==o?o:Li}(e.dataviews,...t)}function Zi(e,...t){return function(e,t,s){return e.isReady[t]?.[s]}(e.dataviews,...t)}const Yi=(0,c.createRegistrySelector)((e=>(0,c.createSelector)(((t,s)=>{s=Array.isArray(s)?s:[s];const{getBlocksByName:o,getBlockParents:n,getBlockName:i}=e(m.store);return o(s).filter((e=>n(e).every((e=>{const t=i(e);return"core/query"!==t&&!s.includes(t)}))))}),(()=>[e(m.store).getBlocks()])))),Ki={reducer:b,selectors:e,actions:t},qi=(0,c.createReduxStore)("core/editor",{...Ki});(0,c.register)(qi),sn(qi).registerPrivateActions(n),sn(qi).registerPrivateSelectors(i);function Qi(e){const t=e.avatar_urls&&e.avatar_urls[24]?(0,P.jsx)("img",{className:"editor-autocompleters__user-avatar",alt:"",src:e.avatar_urls[24]}):(0,P.jsx)("span",{className:"editor-autocompleters__no-avatar"});return(0,P.jsxs)(P.Fragment,{children:[t,(0,P.jsx)("span",{className:"editor-autocompleters__user-name",children:e.name}),(0,P.jsx)("span",{className:"editor-autocompleters__user-slug",children:e.slug})]})}(0,h.addFilter)("blocks.registerBlockType","core/editor/custom-sources-backwards-compatibility/shim-attribute-source",(function(e){var t;const s=Object.fromEntries(Object.entries(null!==(t=e.attributes)&&void 0!==t?t:{}).filter((([,{source:e}])=>"meta"===e)).map((([e,{meta:t}])=>[e,t])));return Object.entries(s).length&&(e.edit=(e=>(0,p.createHigherOrderComponent)((t=>({attributes:s,setAttributes:o,...n})=>{const i=(0,c.useSelect)((e=>e(qi).getCurrentPostType()),[]),[r,a]=(0,d.useEntityProp)("postType",i,"meta"),l=(0,u.useMemo)((()=>({...s,...Object.fromEntries(Object.entries(e).map((([e,t])=>[e,r[t]])))})),[s,r]);return(0,P.jsx)(t,{attributes:l,setAttributes:t=>{const s=Object.fromEntries(Object.entries(null!=t?t:{}).filter((([t])=>t in e)).map((([t,s])=>[e[t],s])));Object.entries(s).length&&a(s),o(t)},...n})}),"withMetaAttributeSource"))(s)(e.edit)),e}));const Xi={name:"users",className:"editor-autocompleters__user",triggerPrefix:"@",useItems(e){const t=(0,c.useSelect)((t=>{const{getUsers:s}=t(d.store);return s({context:"view",search:encodeURIComponent(e)})}),[e]),s=(0,u.useMemo)((()=>t?t.map((e=>({key:`user-${e.slug}`,value:e,label:Qi(e)}))):[]),[t]);return[s]},getOptionCompletion:e=>`@${e.slug}`};(0,h.addFilter)("editor.Autocomplete.completers","editor/autocompleters/set-default-completers",(function(e=[]){return e.push({...Xi}),e}));const Ji=window.wp.mediaUtils;(0,h.addFilter)("editor.MediaUpload","core/editor/components/media-upload",(()=>Ji.MediaUpload));const{PatternOverridesControls:er,ResetOverridesControl:tr,PatternOverridesBlockControls:sr,PATTERN_TYPES:or,PARTIAL_SYNCING_SUPPORTED_BLOCKS:nr,PATTERN_SYNC_TYPES:ir}=sn(cn.privateApis),rr=(0,p.createHigherOrderComponent)((e=>t=>{const s=!!nr[t.name];return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(e,{...t},"edit"),t.isSelected&&s&&(0,P.jsx)(ar,{...t}),s&&(0,P.jsx)(sr,{})]})}),"withPatternOverrideControls");function ar(e){const t=(0,m.useBlockEditingMode)(),{hasPatternOverridesSource:s,isEditingSyncedPattern:o}=(0,c.useSelect)((e=>{const{getCurrentPostType:t,getEditedPostAttribute:s}=e(qi);return{hasPatternOverridesSource:!!(0,y.getBlockBindingsSource)("core/pattern-overrides"),isEditingSyncedPattern:t()===or.user&&s("meta")?.wp_pattern_sync_status!==ir.unsynced&&s("wp_pattern_sync_status")!==ir.unsynced}}),[]),n=e.attributes.metadata?.bindings,i=!!n&&Object.values(n).some((e=>"core/pattern-overrides"===e.source)),r=o&&"default"===t,a=!o&&!!e.attributes.metadata?.name&&"disabled"!==t&&i;return s?(0,P.jsxs)(P.Fragment,{children:[r&&(0,P.jsx)(er,{...e}),a&&(0,P.jsx)(tr,{...e})]}):null}(0,h.addFilter)("editor.BlockEdit","core/editor/with-pattern-override-controls",rr);const lr=window.wp.keyboardShortcuts;function cr(e){var t,s,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(s=cr(e[t]))&&(o&&(o+=" "),o+=s)}else for(s in e)e[s]&&(o&&(o+=" "),o+=s);return o}const dr=function(){for(var e,t,s=0,o="",n=arguments.length;s<n;s++)(e=arguments[s])&&(t=cr(e))&&(o&&(o+=" "),o+=t);return o},ur=(0,P.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(k.Path,{d:"M11.776 4.454a.25.25 0 01.448 0l2.069 4.192a.25.25 0 00.188.137l4.626.672a.25.25 0 01.139.426l-3.348 3.263a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.362.263l-4.138-2.175a.25.25 0 00-.232 0l-4.138 2.175a.25.25 0 01-.363-.263l.79-4.607a.25.25 0 00-.071-.222L4.754 9.881a.25.25 0 01.139-.426l4.626-.672a.25.25 0 00.188-.137l2.069-4.192z"})}),pr=(0,P.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(k.Path,{fillRule:"evenodd",d:"M9.706 8.646a.25.25 0 01-.188.137l-4.626.672a.25.25 0 00-.139.427l3.348 3.262a.25.25 0 01.072.222l-.79 4.607a.25.25 0 00.362.264l4.138-2.176a.25.25 0 01.233 0l4.137 2.175a.25.25 0 00.363-.263l-.79-4.607a.25.25 0 01.072-.222l3.347-3.262a.25.25 0 00-.139-.427l-4.626-.672a.25.25 0 01-.188-.137l-2.069-4.192a.25.25 0 00-.448 0L9.706 8.646zM12 7.39l-.948 1.921a1.75 1.75 0 01-1.317.957l-2.12.308 1.534 1.495c.412.402.6.982.503 1.55l-.362 2.11 1.896-.997a1.75 1.75 0 011.629 0l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39z",clipRule:"evenodd"})}),hr=window.wp.viewport;function mr(e){return["core/edit-post","core/edit-site"].includes(e)?(S()(`${e} interface scope`,{alternative:"core interface scope",hint:"core/edit-post and core/edit-site are merging.",version:"6.6"}),"core"):e}function gr(e,t){return"core"===e&&"edit-site/template"===t?(S()("edit-site/template sidebar",{alternative:"edit-post/document",version:"6.6"}),"edit-post/document"):"core"===e&&"edit-site/block-inspector"===t?(S()("edit-site/block-inspector sidebar",{alternative:"edit-post/block",version:"6.6"}),"edit-post/block"):t}const _r=(e,t)=>({type:"SET_DEFAULT_COMPLEMENTARY_AREA",scope:e=mr(e),area:t=gr(e,t)}),fr=(e,t)=>({registry:s,dispatch:o})=>{if(!t)return;e=mr(e),t=gr(e,t);s.select(j.store).get(e,"isComplementaryAreaVisible")||s.dispatch(j.store).set(e,"isComplementaryAreaVisible",!0),o({type:"ENABLE_COMPLEMENTARY_AREA",scope:e,area:t})},br=e=>({registry:t})=>{e=mr(e);t.select(j.store).get(e,"isComplementaryAreaVisible")&&t.dispatch(j.store).set(e,"isComplementaryAreaVisible",!1)},yr=(e,t)=>({registry:s})=>{if(!t)return;e=mr(e),t=gr(e,t);const o=s.select(j.store).get(e,"pinnedItems");!0!==o?.[t]&&s.dispatch(j.store).set(e,"pinnedItems",{...o,[t]:!0})},xr=(e,t)=>({registry:s})=>{if(!t)return;e=mr(e),t=gr(e,t);const o=s.select(j.store).get(e,"pinnedItems");s.dispatch(j.store).set(e,"pinnedItems",{...o,[t]:!1})};function vr(e,t){return function({registry:s}){S()("dispatch( 'core/interface' ).toggleFeature",{since:"6.0",alternative:"dispatch( 'core/preferences' ).toggle"}),s.dispatch(j.store).toggle(e,t)}}function wr(e,t,s){return function({registry:o}){S()("dispatch( 'core/interface' ).setFeatureValue",{since:"6.0",alternative:"dispatch( 'core/preferences' ).set"}),o.dispatch(j.store).set(e,t,!!s)}}function Sr(e,t){return function({registry:s}){S()("dispatch( 'core/interface' ).setFeatureDefaults",{since:"6.0",alternative:"dispatch( 'core/preferences' ).setDefaults"}),s.dispatch(j.store).setDefaults(e,t)}}function kr(e){return{type:"OPEN_MODAL",name:e}}function Pr(){return{type:"CLOSE_MODAL"}}const Cr=(0,c.createRegistrySelector)((e=>(t,s)=>{s=mr(s);const o=e(j.store).get(s,"isComplementaryAreaVisible");if(void 0!==o)return!1===o?null:t?.complementaryAreas?.[s]})),jr=(0,c.createRegistrySelector)((e=>(t,s)=>{s=mr(s);const o=e(j.store).get(s,"isComplementaryAreaVisible"),n=t?.complementaryAreas?.[s];return o&&void 0===n})),Er=(0,c.createRegistrySelector)((e=>(t,s,o)=>{var n;o=gr(s=mr(s),o);const i=e(j.store).get(s,"pinnedItems");return null===(n=i?.[o])||void 0===n||n})),Tr=(0,c.createRegistrySelector)((e=>(t,s,o)=>(S()("select( 'core/interface' ).isFeatureActive( scope, featureName )",{since:"6.0",alternative:"select( 'core/preferences' ).get( scope, featureName )"}),!!e(j.store).get(s,o))));function Br(e,t){return e.activeModal===t}const Ir=(0,c.combineReducers)({complementaryAreas:function(e={},t){switch(t.type){case"SET_DEFAULT_COMPLEMENTARY_AREA":{const{scope:s,area:o}=t;return e[s]?e:{...e,[s]:o}}case"ENABLE_COMPLEMENTARY_AREA":{const{scope:s,area:o}=t;return{...e,[s]:o}}}return e},activeModal:function(e=null,t){switch(t.type){case"OPEN_MODAL":return t.name;case"CLOSE_MODAL":return null}return e}}),Nr=(0,c.createReduxStore)("core/interface",{reducer:Ir,actions:r,selectors:a});(0,c.register)(Nr);const Ar=window.wp.plugins,Dr=(0,Ar.withPluginContext)(((e,t)=>({icon:t.icon||e.icon,identifier:t.identifier||`${e.name}/${t.name}`})));const Rr=Dr((function({as:e=Do.Button,scope:t,identifier:s,icon:o,selectedIcon:n,name:i,shortcut:r,...a}){const l=e,d=(0,c.useSelect)((e=>e(Nr).getActiveComplementaryArea(t)===s),[s,t]),{enableComplementaryArea:u,disableComplementaryArea:p}=(0,c.useDispatch)(Nr);return(0,P.jsx)(l,{icon:n&&d?n:o,"aria-controls":s.replace("/",":"),"aria-checked":(h=a.role,["checkbox","option","radio","switch","menuitemcheckbox","menuitemradio","treeitem"].includes(h)?d:void 0),onClick:()=>{d?p(t):u(t,s)},shortcut:r,...a});var h})),Mr=({smallScreenTitle:e,children:t,className:s,toggleButtonProps:o})=>{const n=(0,P.jsx)(Rr,{icon:Bn,...o});return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)("div",{className:"components-panel__header interface-complementary-area-header__small",children:[e&&(0,P.jsx)("h2",{className:"interface-complementary-area-header__small-title",children:e}),n]}),(0,P.jsxs)("div",{className:dr("components-panel__header","interface-complementary-area-header",s),tabIndex:-1,children:[t,n]})]})},Or=()=>{};function Lr({name:e,as:t=Do.Button,onClick:s,...o}){return(0,P.jsx)(Do.Fill,{name:e,children:({onClick:e})=>(0,P.jsx)(t,{onClick:s||e?(...t)=>{(s||Or)(...t),(e||Or)(...t)}:void 0,...o})})}Lr.Slot=function({name:e,as:t=Do.ButtonGroup,fillProps:s={},bubblesVirtually:o,...n}){return(0,P.jsx)(Do.Slot,{name:e,bubblesVirtually:o,fillProps:s,children:e=>{if(!u.Children.toArray(e).length)return null;const s=[];u.Children.forEach(e,(({props:{__unstableExplicitMenuItem:e,__unstableTarget:t}})=>{t&&e&&s.push(t)}));const o=u.Children.map(e,(e=>!e.props.__unstableExplicitMenuItem&&s.includes(e.props.__unstableTarget)?null:e));return(0,P.jsx)(t,{...n,children:o})}})};const Fr=Lr,Vr=({__unstableExplicitMenuItem:e,__unstableTarget:t,...s})=>(0,P.jsx)(Do.MenuItem,{...s});function zr({scope:e,target:t,__unstableExplicitMenuItem:s,...o}){return(0,P.jsx)(Rr,{as:o=>(0,P.jsx)(Fr,{__unstableExplicitMenuItem:s,__unstableTarget:`${e}/${t}`,as:Vr,name:`${e}/plugin-more-menu`,...o}),role:"menuitemcheckbox",selectedIcon:Ro,name:t,scope:e,...o})}function Ur({scope:e,...t}){return(0,P.jsx)(Do.Fill,{name:`PinnedItems/${e}`,...t})}Ur.Slot=function({scope:e,className:t,...s}){return(0,P.jsx)(Do.Slot,{name:`PinnedItems/${e}`,...s,children:e=>e?.length>0&&(0,P.jsx)("div",{className:dr(t,"interface-pinned-items"),children:e})})};const Hr=Ur,Gr=.3;const $r=280,Wr={open:{width:$r},closed:{width:0},mobileOpen:{width:"100vw"}};function Zr({activeArea:e,isActive:t,scope:s,children:o,className:n,id:i}){const r=(0,p.useReducedMotion)(),a=(0,p.useViewportMatch)("medium","<"),l=(0,p.usePrevious)(e),c=(0,p.usePrevious)(t),[,d]=(0,u.useState)({});(0,u.useEffect)((()=>{d({})}),[t]);const h={type:"tween",duration:r||a||l&&e&&e!==l?0:Gr,ease:[.6,0,.4,1]};return(0,P.jsx)(Do.Fill,{name:`ComplementaryArea/${s}`,children:(0,P.jsx)(Do.__unstableAnimatePresence,{initial:!1,children:(c||t)&&(0,P.jsx)(Do.__unstableMotion.div,{variants:Wr,initial:"closed",animate:a?"mobileOpen":"open",exit:"closed",transition:h,className:"interface-complementary-area__fill",children:(0,P.jsx)("div",{id:i,className:n,style:{width:a?"100vw":$r},children:o})})})})}const Yr=Dr((function({children:e,className:t,closeLabel:s=(0,gs.__)("Close plugin"),identifier:o,header:n,headerClassName:i,icon:r,isPinnable:a=!0,panelClassName:l,scope:d,name:p,smallScreenTitle:h,title:m,toggleShortcut:g,isActiveByDefault:_}){const[f,b]=(0,u.useState)(!1),{isLoading:y,isActive:x,isPinned:v,activeArea:w,isSmall:S,isLarge:k,showIconLabels:C}=(0,c.useSelect)((e=>{const{getActiveComplementaryArea:t,isComplementaryAreaLoading:s,isItemPinned:n}=e(Nr),{get:i}=e(j.store),r=t(d);return{isLoading:s(d),isActive:r===o,isPinned:n(d,o),activeArea:r,isSmall:e(hr.store).isViewportMatch("< medium"),isLarge:e(hr.store).isViewportMatch("large"),showIconLabels:i("core","showIconLabels")}}),[o,d]);!function(e,t,s,o,n){const i=(0,u.useRef)(!1),r=(0,u.useRef)(!1),{enableComplementaryArea:a,disableComplementaryArea:l}=(0,c.useDispatch)(Nr);(0,u.useEffect)((()=>{o&&n&&!i.current?(l(e),r.current=!0):r.current&&!n&&i.current?(r.current=!1,a(e,t)):r.current&&s&&s!==t&&(r.current=!1),n!==i.current&&(i.current=n)}),[o,n,e,t,s,l,a])}(d,o,w,x,S);const{enableComplementaryArea:E,disableComplementaryArea:T,pinItem:B,unpinItem:I}=(0,c.useDispatch)(Nr);if((0,u.useEffect)((()=>{_&&void 0===w&&!S?E(d,o):void 0===w&&S&&T(d,o),b(!0)}),[w,_,d,o,S,E,T]),f)return(0,P.jsxs)(P.Fragment,{children:[a&&(0,P.jsx)(Hr,{scope:d,children:v&&(0,P.jsx)(Rr,{scope:d,identifier:o,isPressed:x&&(!C||k),"aria-expanded":x,"aria-disabled":y,label:m,icon:C?Ro:r,showTooltip:!C,variant:C?"tertiary":void 0,size:"compact",shortcut:g})}),p&&a&&(0,P.jsx)(zr,{target:p,scope:d,icon:r,children:m}),(0,P.jsxs)(Zr,{activeArea:w,isActive:x,className:dr("interface-complementary-area",t),scope:d,id:o.replace("/",":"),children:[(0,P.jsx)(Mr,{className:i,closeLabel:s,onClose:()=>T(d),smallScreenTitle:h,toggleButtonProps:{label:s,size:"small",shortcut:g,scope:d,identifier:o},children:n||(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)("h2",{className:"interface-complementary-area-header__title",children:m}),a&&(0,P.jsx)(Do.Button,{className:"interface-complementary-area__pin-unpin-item",icon:v?ur:pr,label:v?(0,gs.__)("Unpin from toolbar"):(0,gs.__)("Pin to toolbar"),onClick:()=>(v?I:B)(d,o),isPressed:v,"aria-expanded":v,size:"compact"})]})}),(0,P.jsx)(Do.Panel,{className:l,children:e})]})]})}));Yr.Slot=function({scope:e,...t}){return(0,P.jsx)(Do.Slot,{name:`ComplementaryArea/${e}`,...t})};const Kr=Yr,qr=({isActive:e})=>((0,u.useEffect)((()=>{let e=!1;return document.body.classList.contains("sticky-menu")&&(e=!0,document.body.classList.remove("sticky-menu")),()=>{e&&document.body.classList.add("sticky-menu")}}),[]),(0,u.useEffect)((()=>(e?document.body.classList.add("is-fullscreen-mode"):document.body.classList.remove("is-fullscreen-mode"),()=>{e&&document.body.classList.remove("is-fullscreen-mode")})),[e]),null),Qr=(0,u.forwardRef)((({children:e,className:t,ariaLabel:s,as:o="div",...n},i)=>(0,P.jsx)(o,{ref:i,className:dr("interface-navigable-region",t),"aria-label":s,role:"region",tabIndex:"-1",...n,children:e})));Qr.displayName="NavigableRegion";const Xr=Qr,Jr={type:"tween",duration:.25,ease:[.6,0,.4,1]};const ea={hidden:{opacity:1,marginTop:-60},visible:{opacity:1,marginTop:0},distractionFreeHover:{opacity:1,marginTop:0,transition:{...Jr,delay:.2,delayChildren:.2}},distractionFreeHidden:{opacity:0,marginTop:-60},distractionFreeDisabled:{opacity:0,marginTop:0,transition:{...Jr,delay:.8,delayChildren:.8}}};const ta=(0,u.forwardRef)((function({isDistractionFree:e,footer:t,header:s,editorNotices:o,sidebar:n,secondarySidebar:i,content:r,actions:a,labels:l,className:c},d){const[h,m]=(0,p.useResizeObserver)(),g=(0,p.useViewportMatch)("medium","<"),_={type:"tween",duration:(0,p.useReducedMotion)()?0:.25,ease:[.6,0,.4,1]};!function(e){(0,u.useEffect)((()=>{const t=document&&document.querySelector(`html:not(.${e})`);if(t)return t.classList.toggle(e),()=>{t.classList.toggle(e)}}),[e])}("interface-interface-skeleton__html-container");const f={...{header:(0,gs._x)("Header","header landmark area"),body:(0,gs.__)("Content"),secondarySidebar:(0,gs.__)("Block Library"),sidebar:(0,gs._x)("Settings","settings landmark area"),actions:(0,gs.__)("Publish"),footer:(0,gs.__)("Footer")},...l};return(0,P.jsxs)("div",{ref:d,className:dr(c,"interface-interface-skeleton",!!t&&"has-footer"),children:[(0,P.jsxs)("div",{className:"interface-interface-skeleton__editor",children:[(0,P.jsx)(Do.__unstableAnimatePresence,{initial:!1,children:!!s&&(0,P.jsx)(Xr,{as:Do.__unstableMotion.div,className:"interface-interface-skeleton__header","aria-label":f.header,initial:e&&!g?"distractionFreeHidden":"hidden",whileHover:e&&!g?"distractionFreeHover":"visible",animate:e&&!g?"distractionFreeDisabled":"visible",exit:e&&!g?"distractionFreeHidden":"hidden",variants:ea,transition:_,children:s})}),e&&(0,P.jsx)("div",{className:"interface-interface-skeleton__header",children:o}),(0,P.jsxs)("div",{className:"interface-interface-skeleton__body",children:[(0,P.jsx)(Do.__unstableAnimatePresence,{initial:!1,children:!!i&&(0,P.jsx)(Xr,{className:"interface-interface-skeleton__secondary-sidebar",ariaLabel:f.secondarySidebar,as:Do.__unstableMotion.div,initial:"closed",animate:"open",exit:"closed",variants:{open:{width:m.width},closed:{width:0}},transition:_,children:(0,P.jsxs)(Do.__unstableMotion.div,{style:{position:"absolute",width:g?"100vw":"fit-content",height:"100%",left:0},variants:{open:{x:0},closed:{x:"-100%"}},transition:_,children:[h,i]})})}),(0,P.jsx)(Xr,{className:"interface-interface-skeleton__content",ariaLabel:f.body,children:r}),!!n&&(0,P.jsx)(Xr,{className:"interface-interface-skeleton__sidebar",ariaLabel:f.sidebar,children:n}),!!a&&(0,P.jsx)(Xr,{className:"interface-interface-skeleton__actions",ariaLabel:f.actions,children:a})]})]}),!!t&&(0,P.jsx)(Xr,{className:"interface-interface-skeleton__footer",ariaLabel:f.footer,children:t})]})}));function sa(){const e=(0,c.useSelect)((e=>{const{richEditingEnabled:t,codeEditingEnabled:s}=e(qi).getEditorSettings();return!t||!s}),[]),{getBlockSelectionStart:t}=(0,c.useSelect)(m.store),{getActiveComplementaryArea:s}=(0,c.useSelect)(Nr),{enableComplementaryArea:o,disableComplementaryArea:n}=(0,c.useDispatch)(Nr),{redo:i,undo:r,savePost:a,setIsListViewOpened:l,switchEditorMode:d,toggleDistractionFree:u}=(0,c.useDispatch)(qi),{isEditedPostDirty:p,isPostSavingLocked:h,isListViewOpened:g,getEditorMode:_}=(0,c.useSelect)(qi);return(0,lr.useShortcut)("core/editor/toggle-mode",(()=>{d("visual"===_()?"text":"visual")}),{isDisabled:e}),(0,lr.useShortcut)("core/editor/toggle-distraction-free",(()=>{u()})),(0,lr.useShortcut)("core/editor/undo",(e=>{r(),e.preventDefault()})),(0,lr.useShortcut)("core/editor/redo",(e=>{i(),e.preventDefault()})),(0,lr.useShortcut)("core/editor/save",(e=>{e.preventDefault(),h()||p()&&a()})),(0,lr.useShortcut)("core/editor/toggle-list-view",(e=>{g()||(e.preventDefault(),l(!0))})),(0,lr.useShortcut)("core/editor/toggle-sidebar",(e=>{e.preventDefault();if(["edit-post/document","edit-post/block"].includes(s("core")))n("core");else{const e=t()?"edit-post/block":"edit-post/document";o("core",e)}})),null}class oa extends u.Component{constructor(e){super(e),this.needsAutosave=!(!e.isDirty||!e.isAutosaveable)}componentDidMount(){this.props.disableIntervalChecks||this.setAutosaveTimer()}componentDidUpdate(e){this.props.disableIntervalChecks?this.props.editsReference!==e.editsReference&&this.props.autosave():(this.props.interval!==e.interval&&(clearTimeout(this.timerId),this.setAutosaveTimer()),this.props.isDirty&&(!this.props.isAutosaving||e.isAutosaving)?this.props.editsReference!==e.editsReference&&(this.needsAutosave=!0):this.needsAutosave=!1)}componentWillUnmount(){clearTimeout(this.timerId)}setAutosaveTimer(e=1e3*this.props.interval){this.timerId=setTimeout((()=>{this.autosaveTimerHandler()}),e)}autosaveTimerHandler(){this.props.isAutosaveable?(this.needsAutosave&&(this.needsAutosave=!1,this.props.autosave()),this.setAutosaveTimer()):this.setAutosaveTimer(1e3)}render(){return null}}const na=(0,p.compose)([(0,c.withSelect)(((e,t)=>{const{getReferenceByDistinctEdits:s}=e(d.store),{isEditedPostDirty:o,isEditedPostAutosaveable:n,isAutosavingPost:i,getEditorSettings:r}=e(qi),{interval:a=r().autosaveInterval}=t;return{editsReference:s(),isDirty:o(),isAutosaveable:n(),isAutosaving:i(),interval:a}})),(0,c.withDispatch)(((e,t)=>({autosave(){const{autosave:s=e(qi).autosave}=t;s()}})))])(oa),ia=(0,P.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(k.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"})}),ra=(0,P.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(k.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})}),aa=window.wp.keycodes,la=window.wp.commands,ca=(0,Do.__unstableMotion)(Do.Button);function da(e){const{postType:t,postTypeLabel:s,documentTitle:o,isNotFound:n,isUnsyncedPattern:i,templateTitle:r,onNavigateToPreviousEntityRecord:a}=(0,c.useSelect)((e=>{const{getCurrentPostType:t,getCurrentPostId:s,getEditorSettings:o,__experimentalGetTemplateInfo:n}=e(qi),{getEditedEntityRecord:i,getPostType:r,isResolving:a}=e(d.store),l=t(),c=s(),u=i("postType",l,c),p=n(u),h=r(l)?.labels?.singular_name;return{postType:l,postTypeLabel:h,documentTitle:u.title,isNotFound:!u&&!a("getEditedEntityRecord","postType",l,c),isUnsyncedPattern:"unsynced"===u?.wp_pattern_sync_status,templateTitle:p.title,onNavigateToPreviousEntityRecord:o().onNavigateToPreviousEntityRecord}}),[]),{open:l}=(0,c.useDispatch)(la.store),h=(0,p.useReducedMotion)(),g=V.includes(t),_=z.includes(t),f=!!a,b=g?r:o,y=e.title||b,x=e.icon,v=(0,u.useRef)(!1);return(0,u.useEffect)((()=>{v.current=!0}),[]),(0,P.jsxs)("div",{className:dr("editor-document-bar",{"has-back-button":f,"is-global":_&&!i}),children:[(0,P.jsx)(Do.__unstableAnimatePresence,{children:f&&(0,P.jsx)(ca,{className:"editor-document-bar__back",icon:(0,gs.isRTL)()?ia:ra,onClick:e=>{e.stopPropagation(),a()},size:"compact",initial:!!v.current&&{opacity:0,transform:"translateX(15%)"},animate:{opacity:1,transform:"translateX(0%)"},exit:{opacity:0,transform:"translateX(15%)"},transition:h?{duration:0}:void 0,children:(0,gs.__)("Back")})}),n?(0,P.jsx)(Do.__experimentalText,{children:(0,gs.__)("Document not found")}):(0,P.jsxs)(Do.Button,{className:"editor-document-bar__command",onClick:()=>l(),size:"compact",children:[(0,P.jsxs)(Do.__unstableMotion.div,{className:"editor-document-bar__title",initial:!!v.current&&{opacity:0,transform:f?"translateX(15%)":"translateX(-15%)"},animate:{opacity:1,transform:"translateX(0%)"},transition:h?{duration:0}:void 0,children:[x&&(0,P.jsx)(m.BlockIcon,{icon:x}),(0,P.jsxs)(Do.__experimentalText,{size:"body",as:"h1",children:[(0,P.jsx)("span",{className:"editor-document-bar__post-title",children:y?(0,Ao.decodeEntities)(y):(0,gs.__)("No title")}),s&&!e.title&&(0,P.jsx)("span",{className:"editor-document-bar__post-type-label",children:"· "+(0,Ao.decodeEntities)(s)})]})]},f),(0,P.jsx)("span",{className:"editor-document-bar__shortcut",children:aa.displayShortcut.primary("k")})]})]})}const ua=window.wp.richText,pa=({children:e,isValid:t,level:s,href:o,onSelect:n})=>(0,P.jsx)("li",{className:dr("document-outline__item",`is-${s.toLowerCase()}`,{"is-invalid":!t}),children:(0,P.jsxs)("a",{href:o,className:"document-outline__button",onClick:n,children:[(0,P.jsx)("span",{className:"document-outline__emdash","aria-hidden":"true"}),(0,P.jsx)("strong",{className:"document-outline__level",children:s}),(0,P.jsx)("span",{className:"document-outline__item-content",children:e})]})}),ha=(0,P.jsx)("em",{children:(0,gs.__)("(Empty heading)")}),ma=[(0,P.jsx)("br",{},"incorrect-break"),(0,P.jsx)("em",{children:(0,gs.__)("(Incorrect heading level)")},"incorrect-message")],ga=[(0,P.jsx)("br",{},"incorrect-break-h1"),(0,P.jsx)("em",{children:(0,gs.__)("(Your theme may already use a H1 for the post title)")},"incorrect-message-h1")],_a=[(0,P.jsx)("br",{},"incorrect-break-multiple-h1"),(0,P.jsx)("em",{children:(0,gs.__)("(Multiple H1 headings are not recommended)")},"incorrect-message-multiple-h1")];function fa(){return(0,P.jsxs)(Do.SVG,{width:"138",height:"148",viewBox:"0 0 138 148",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,P.jsx)(Do.Rect,{width:"138",height:"148",rx:"4",fill:"#F0F6FC"}),(0,P.jsx)(Do.Line,{x1:"44",y1:"28",x2:"24",y2:"28",stroke:"#DDDDDD"}),(0,P.jsx)(Do.Rect,{x:"48",y:"16",width:"27",height:"23",rx:"4",fill:"#DDDDDD"}),(0,P.jsx)(Do.Path,{d:"M54.7585 32V23.2727H56.6037V26.8736H60.3494V23.2727H62.1903V32H60.3494V28.3949H56.6037V32H54.7585ZM67.4574 23.2727V32H65.6122V25.0241H65.5611L63.5625 26.277V24.6406L65.723 23.2727H67.4574Z",fill:"black"}),(0,P.jsx)(Do.Line,{x1:"55",y1:"59",x2:"24",y2:"59",stroke:"#DDDDDD"}),(0,P.jsx)(Do.Rect,{x:"59",y:"47",width:"29",height:"23",rx:"4",fill:"#DDDDDD"}),(0,P.jsx)(Do.Path,{d:"M65.7585 63V54.2727H67.6037V57.8736H71.3494V54.2727H73.1903V63H71.3494V59.3949H67.6037V63H65.7585ZM74.6605 63V61.6705L77.767 58.794C78.0313 58.5384 78.2528 58.3082 78.4318 58.1037C78.6136 57.8991 78.7514 57.6989 78.8452 57.5028C78.9389 57.304 78.9858 57.0895 78.9858 56.8594C78.9858 56.6037 78.9276 56.3835 78.8111 56.1989C78.6946 56.0114 78.5355 55.8679 78.3338 55.7685C78.1321 55.6662 77.9034 55.6151 77.6477 55.6151C77.3807 55.6151 77.1477 55.669 76.9489 55.777C76.75 55.8849 76.5966 56.0398 76.4886 56.2415C76.3807 56.4432 76.3267 56.6832 76.3267 56.9616H74.5753C74.5753 56.3906 74.7045 55.8949 74.9631 55.4744C75.2216 55.054 75.5838 54.7287 76.0497 54.4986C76.5156 54.2685 77.0526 54.1534 77.6605 54.1534C78.2855 54.1534 78.8295 54.2642 79.2926 54.4858C79.7585 54.7045 80.1207 55.0085 80.3793 55.3977C80.6378 55.7869 80.767 56.233 80.767 56.7358C80.767 57.0653 80.7017 57.3906 80.571 57.7116C80.4432 58.0327 80.2145 58.3892 79.8849 58.7812C79.5554 59.1705 79.0909 59.6378 78.4915 60.1832L77.2173 61.4318V61.4915H80.8821V63H74.6605Z",fill:"black"}),(0,P.jsx)(Do.Line,{x1:"80",y1:"90",x2:"24",y2:"90",stroke:"#DDDDDD"}),(0,P.jsx)(Do.Rect,{x:"84",y:"78",width:"30",height:"23",rx:"4",fill:"#F0B849"}),(0,P.jsx)(Do.Path,{d:"M90.7585 94V85.2727H92.6037V88.8736H96.3494V85.2727H98.1903V94H96.3494V90.3949H92.6037V94H90.7585ZM99.5284 92.4659V91.0128L103.172 85.2727H104.425V87.2841H103.683L101.386 90.919V90.9872H106.564V92.4659H99.5284ZM103.717 94V92.0227L103.751 91.3793V85.2727H105.482V94H103.717Z",fill:"black"}),(0,P.jsx)(Do.Line,{x1:"66",y1:"121",x2:"24",y2:"121",stroke:"#DDDDDD"}),(0,P.jsx)(Do.Rect,{x:"70",y:"109",width:"29",height:"23",rx:"4",fill:"#DDDDDD"}),(0,P.jsx)(Do.Path,{d:"M76.7585 125V116.273H78.6037V119.874H82.3494V116.273H84.1903V125H82.3494V121.395H78.6037V125H76.7585ZM88.8864 125.119C88.25 125.119 87.6832 125.01 87.1861 124.791C86.6918 124.57 86.3011 124.266 86.0142 123.879C85.7301 123.49 85.5838 123.041 85.5753 122.533H87.4332C87.4446 122.746 87.5142 122.933 87.642 123.095C87.7727 123.254 87.946 123.378 88.1619 123.466C88.3778 123.554 88.6207 123.598 88.8906 123.598C89.1719 123.598 89.4205 123.548 89.6364 123.449C89.8523 123.349 90.0213 123.212 90.1435 123.036C90.2656 122.859 90.3267 122.656 90.3267 122.426C90.3267 122.193 90.2614 121.987 90.1307 121.808C90.0028 121.626 89.8182 121.484 89.5767 121.382C89.3381 121.28 89.054 121.229 88.7244 121.229H87.9105V119.874H88.7244C89.0028 119.874 89.2486 119.825 89.4616 119.729C89.6776 119.632 89.8452 119.499 89.9645 119.328C90.0838 119.155 90.1435 118.953 90.1435 118.723C90.1435 118.504 90.0909 118.312 89.9858 118.148C89.8835 117.98 89.7386 117.849 89.5511 117.756C89.3665 117.662 89.1506 117.615 88.9034 117.615C88.6534 117.615 88.4247 117.661 88.2173 117.751C88.0099 117.839 87.8438 117.966 87.7188 118.131C87.5938 118.295 87.527 118.489 87.5185 118.71H85.75C85.7585 118.207 85.902 117.764 86.1804 117.381C86.4588 116.997 86.8338 116.697 87.3054 116.482C87.7798 116.263 88.3153 116.153 88.9119 116.153C89.5142 116.153 90.0412 116.263 90.4929 116.482C90.9446 116.7 91.2955 116.996 91.5455 117.368C91.7983 117.737 91.9233 118.152 91.9205 118.612C91.9233 119.101 91.7713 119.509 91.4645 119.835C91.1605 120.162 90.7642 120.369 90.2756 120.457V120.526C90.9176 120.608 91.4063 120.831 91.7415 121.195C92.0795 121.555 92.2472 122.007 92.2443 122.55C92.2472 123.047 92.1037 123.489 91.8139 123.875C91.527 124.261 91.1307 124.565 90.625 124.787C90.1193 125.009 89.5398 125.119 88.8864 125.119Z",fill:"black"})]})}const ba=(e=[])=>e.flatMap(((e={})=>"core/heading"===e.name?{...e,level:e.attributes.level,isEmpty:ya(e)}:ba(e.innerBlocks))),ya=e=>!e.attributes.content||0===e.attributes.content.trim().length;function xa({onSelect:e,isTitleSupported:t,hasOutlineItemsDisabled:s}){const{selectBlock:o}=(0,c.useDispatch)(m.store),{blocks:n,title:i}=(0,c.useSelect)((e=>{var t;const{getBlocks:s}=e(m.store),{getEditedPostAttribute:o}=e(qi),{getPostType:n}=e(d.store),i=n(o("type"));return{title:o("title"),blocks:s(),isTitleSupported:null!==(t=i?.supports?.title)&&void 0!==t&&t}})),r=ba(n);if(r.length<1)return(0,P.jsxs)("div",{className:"editor-document-outline has-no-headings",children:[(0,P.jsx)(fa,{}),(0,P.jsx)("p",{children:(0,gs.__)("Navigate the structure of your document and address issues like empty or incorrect heading levels.")})]});let a=1;const l=document.querySelector(".editor-post-title__input"),u=t&&i&&l,p=r.reduce(((e,t)=>({...e,[t.level]:(e[t.level]||0)+1})),{})[1]>1;return(0,P.jsx)("div",{className:"document-outline",children:(0,P.jsxs)("ul",{children:[u&&(0,P.jsx)(pa,{level:(0,gs.__)("Title"),isValid:!0,onSelect:e,href:`#${l.id}`,isDisabled:s,children:i}),r.map(((t,n)=>{const i=t.level>a+1,r=!(t.isEmpty||i||!t.level||1===t.level&&(p||u));return a=t.level,(0,P.jsxs)(pa,{level:`H${t.level}`,isValid:r,isDisabled:s,href:`#block-${t.clientId}`,onSelect:()=>{o(t.clientId),e?.()},children:[t.isEmpty?ha:(0,ua.getTextContent)((0,ua.create)({html:t.attributes.content})),i&&ma,1===t.level&&p&&_a,u&&1===t.level&&!p&&ga]},n)}))]})})}function va({children:e}){const t=(0,c.useSelect)((e=>{const{getGlobalBlockCount:t}=e(m.store);return t("core/heading")>0}));return t?null:e}const wa=function(){const{registerShortcut:e}=(0,c.useDispatch)(lr.store);return(0,u.useEffect)((()=>{e({name:"core/editor/toggle-mode",category:"global",description:(0,gs.__)("Switch between visual editor and code editor."),keyCombination:{modifier:"secondary",character:"m"}}),e({name:"core/editor/save",category:"global",description:(0,gs.__)("Save your changes."),keyCombination:{modifier:"primary",character:"s"}}),e({name:"core/editor/undo",category:"global",description:(0,gs.__)("Undo your last changes."),keyCombination:{modifier:"primary",character:"z"}}),e({name:"core/editor/redo",category:"global",description:(0,gs.__)("Redo your last undo."),keyCombination:{modifier:"primaryShift",character:"z"},aliases:(0,aa.isAppleOS)()?[]:[{modifier:"primary",character:"y"}]}),e({name:"core/editor/toggle-list-view",category:"global",description:(0,gs.__)("Open the List View."),keyCombination:{modifier:"access",character:"o"}}),e({name:"core/editor/toggle-distraction-free",category:"global",description:(0,gs.__)("Toggle distraction free mode."),keyCombination:{modifier:"primaryShift",character:"\\"}}),e({name:"core/editor/toggle-sidebar",category:"global",description:(0,gs.__)("Show or hide the Settings sidebar."),keyCombination:{modifier:"primaryShift",character:","}}),e({name:"core/editor/keyboard-shortcuts",category:"main",description:(0,gs.__)("Display these keyboard shortcuts."),keyCombination:{modifier:"access",character:"h"}}),e({name:"core/editor/next-region",category:"global",description:(0,gs.__)("Navigate to the next part of the editor."),keyCombination:{modifier:"ctrl",character:"`"},aliases:[{modifier:"access",character:"n"}]}),e({name:"core/editor/previous-region",category:"global",description:(0,gs.__)("Navigate to the previous part of the editor."),keyCombination:{modifier:"ctrlShift",character:"`"},aliases:[{modifier:"access",character:"p"},{modifier:"ctrlShift",character:"~"}]})}),[e]),(0,P.jsx)(m.BlockEditorKeyboardShortcuts.Register,{})},Sa=(0,P.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(k.Path,{d:"M15.6 6.5l-1.1 1 2.9 3.3H8c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.3-.5h9.2L14.5 15l1.1 1.1 4.6-4.6-4.6-5z"})}),ka=(0,P.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(k.Path,{d:"M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z"})});const Pa=(0,u.forwardRef)((function(e,t){const s=(0,aa.isAppleOS)()?aa.displayShortcut.primaryShift("z"):aa.displayShortcut.primary("y"),o=(0,c.useSelect)((e=>e(qi).hasEditorRedo()),[]),{redo:n}=(0,c.useDispatch)(qi);return(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,...e,ref:t,icon:(0,gs.isRTL)()?ka:Sa,label:(0,gs.__)("Redo"),shortcut:s,"aria-disabled":!o,onClick:o?n:void 0,className:"editor-history__redo"})}));const Ca=(0,u.forwardRef)((function(e,t){const s=(0,c.useSelect)((e=>e(qi).hasEditorUndo()),[]),{undo:o}=(0,c.useDispatch)(qi);return(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,...e,ref:t,icon:(0,gs.isRTL)()?Sa:ka,label:(0,gs.__)("Undo"),shortcut:aa.displayShortcut.primary("z"),"aria-disabled":!s,onClick:s?o:void 0,className:"editor-history__undo"})}));function ja(){const[e,t]=(0,u.useState)(!1),s=(0,c.useSelect)((e=>e(m.store).isValidTemplate()),[]),{setTemplateValidity:o,synchronizeTemplate:n}=(0,c.useDispatch)(m.store);return s?null:(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(Do.Notice,{className:"editor-template-validation-notice",isDismissible:!1,status:"warning",actions:[{label:(0,gs.__)("Keep it as is"),onClick:()=>o(!0)},{label:(0,gs.__)("Reset the template"),onClick:()=>t(!0)}],children:(0,gs.__)("The content of your post doesn’t match the template assigned to your post type.")}),(0,P.jsx)(Do.__experimentalConfirmDialog,{isOpen:e,confirmButtonText:(0,gs.__)("Reset"),onConfirm:()=>{t(!1),n()},onCancel:()=>t(!1),size:"medium",children:(0,gs.__)("Resetting the template may result in loss of content, do you want to continue?")})]})}const Ea=function(){const{notices:e}=(0,c.useSelect)((e=>({notices:e(ms.store).getNotices()})),[]),{removeNotice:t}=(0,c.useDispatch)(ms.store),s=e.filter((({isDismissible:e,type:t})=>e&&"default"===t)),o=e.filter((({isDismissible:e,type:t})=>!e&&"default"===t));return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(Do.NoticeList,{notices:o,className:"components-editor-notices__pinned"}),(0,P.jsx)(Do.NoticeList,{notices:s,className:"components-editor-notices__dismissible",onRemove:t,children:(0,P.jsx)(ja,{})})]})},Ta=-3;function Ba(){const e=(0,c.useSelect)((e=>e(ms.store).getNotices()),[]),{removeNotice:t}=(0,c.useDispatch)(ms.store),s=e.filter((({type:e})=>"snackbar"===e)).slice(Ta);return(0,P.jsx)(Do.SnackbarList,{notices:s,className:"components-editor-notices__snackbar",onRemove:t})}function Ia({record:e,checked:t,onChange:s}){const{name:o,kind:n,title:i,key:r}=e,{entityRecordTitle:a,hasPostMetaChanges:l}=(0,c.useSelect)((e=>{if("postType"!==n||"wp_template"!==o)return{entityRecordTitle:i,hasPostMetaChanges:sn(e(qi)).hasPostMetaChanges(o,r)};const t=e(d.store).getEditedEntityRecord(n,o,r);return{entityRecordTitle:e(qi).__experimentalGetTemplateInfo(t).title,hasPostMetaChanges:sn(e(qi)).hasPostMetaChanges(o,r)}}),[o,n,i,r]);return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(Do.PanelRow,{children:(0,P.jsx)(Do.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,Ao.decodeEntities)(a)||(0,gs.__)("Untitled"),checked:t,onChange:s})}),l&&(0,P.jsx)("ul",{className:"entities-saved-states__changes",children:(0,P.jsx)("li",{children:(0,gs.__)("Post Meta.")})})]})}const{getGlobalStylesChanges:Na,GlobalStylesContext:Aa}=sn(m.privateApis);function Da({record:e}){const{user:t}=(0,u.useContext)(Aa),s=(0,c.useSelect)((t=>t(d.store).getEntityRecord(e.kind,e.name,e.key)),[e.kind,e.name,e.key]),o=Na(t,s,{maxResults:10});return o.length?(0,P.jsx)("ul",{className:"entities-saved-states__changes",children:o.map((e=>(0,P.jsx)("li",{children:e},e)))}):null}function Ra({record:e,count:t}){if("globalStyles"===e?.name)return null;const s=function(e,t){switch(e){case"site":return 1===t?(0,gs.__)("This change will affect your whole site."):(0,gs.__)("These changes will affect your whole site.");case"wp_template":return(0,gs.__)("This change will affect pages and posts that use this template.");case"page":case"post":return(0,gs.__)("The following has been modified.")}}(e?.name,t);return s?(0,P.jsx)(Do.PanelRow,{children:s}):null}function Ma({list:e,unselectedEntities:t,setUnselectedEntities:s}){const o=e.length,n=e[0];let i=(0,c.useSelect)((e=>e(d.store).getEntityConfig(n.kind,n.name)),[n.kind,n.name]).label;return"wp_template_part"===n?.name&&(i=1===o?(0,gs.__)("Template Part"):(0,gs.__)("Template Parts")),(0,P.jsxs)(Do.PanelBody,{title:i,initialOpen:!0,children:[(0,P.jsx)(Ra,{record:n,count:o}),e.map((e=>(0,P.jsx)(Ia,{record:e,checked:!t.some((t=>t.kind===e.kind&&t.name===e.name&&t.key===e.key&&t.property===e.property)),onChange:t=>s(e,t)},e.key||e.property))),"globalStyles"===n?.name&&(0,P.jsx)(Da,{record:n})]})}const Oa=()=>{const{editedEntities:e,siteEdits:t,siteEntityConfig:s}=(0,c.useSelect)((e=>{const{__experimentalGetDirtyEntityRecords:t,getEntityRecordEdits:s,getEntityConfig:o}=e(d.store);return{editedEntities:t(),siteEdits:s("root","site"),siteEntityConfig:o("root","site")}}),[]),o=(0,u.useMemo)((()=>{var o;const n=e.filter((e=>!("root"===e.kind&&"site"===e.name))),i=null!==(o=s?.meta?.labels)&&void 0!==o?o:{},r=[];for(const e in t)r.push({kind:"root",name:"site",title:i[e]||e,property:e});return[...n,...r]}),[e,t,s]),[n,i]=(0,u.useState)([]);return{dirtyEntityRecords:o,isDirty:o.length-n.length>0,setUnselectedEntities:({kind:e,name:t,key:s,property:o},r)=>{i(r?n.filter((n=>n.kind!==e||n.name!==t||n.key!==s||n.property!==o)):[...n,{kind:e,name:t,key:s,property:o}])},unselectedEntities:n}};function La(e){return e}function Fa({close:e,renderDialog:t}){const s=Oa();return(0,P.jsx)(Va,{close:e,renderDialog:t,...s})}function Va({additionalPrompt:e,close:t,onSave:s=La,saveEnabled:o,saveLabel:n=(0,gs.__)("Save"),renderDialog:i,dirtyEntityRecords:r,isDirty:a,setUnselectedEntities:l,unselectedEntities:d}){const h=(0,u.useRef)(),{saveDirtyEntities:m}=sn((0,c.useDispatch)(qi)),g=r.reduce(((e,t)=>{const{name:s}=t;return e[s]||(e[s]=[]),e[s].push(t),e}),{}),{site:_,wp_template:f,wp_template_part:b,...y}=g,x=[_,f,b,...Object.values(y)].filter(Array.isArray),v=null!=o?o:a,w=(0,u.useCallback)((()=>t()),[t]),[S,k]=(0,p.__experimentalUseDialog)({onClose:()=>w()}),C=(0,p.useInstanceId)(Va,"label"),j=(0,p.useInstanceId)(Va,"description");return(0,P.jsxs)("div",{ref:S,...k,className:"entities-saved-states__panel",role:i?"dialog":void 0,"aria-labelledby":i?C:void 0,"aria-describedby":i?j:void 0,children:[(0,P.jsxs)(Do.Flex,{className:"entities-saved-states__panel-header",gap:2,children:[(0,P.jsx)(Do.FlexItem,{isBlock:!0,as:Do.Button,variant:"secondary",size:"compact",onClick:w,children:(0,gs.__)("Cancel")}),(0,P.jsx)(Do.FlexItem,{isBlock:!0,as:Do.Button,ref:h,variant:"primary",size:"compact",disabled:!v,accessibleWhenDisabled:!0,onClick:()=>m({onSave:s,dirtyEntityRecords:r,entitiesToSkip:d,close:t}),className:"editor-entities-saved-states__save-button",children:n})]}),(0,P.jsxs)("div",{className:"entities-saved-states__text-prompt",children:[(0,P.jsxs)("div",{className:"entities-saved-states__text-prompt--header-wrapper",id:i?C:void 0,children:[(0,P.jsx)("strong",{className:"entities-saved-states__text-prompt--header",children:(0,gs.__)("Are you ready to save?")}),e]}),(0,P.jsx)("p",{id:i?j:void 0,children:a?(0,u.createInterpolateElement)((0,gs.sprintf)((0,gs._n)("There is <strong>%d site change</strong> waiting to be saved.","There are <strong>%d site changes</strong> waiting to be saved.",x.length),x.length),{strong:(0,P.jsx)("strong",{})}):(0,gs.__)("Select the items you want to save.")})]}),x.map((e=>(0,P.jsx)(Ma,{list:e,unselectedEntities:d,setUnselectedEntities:l},e[0].name)))]})}function za(){try{return(0,c.select)(qi).getEditedPostContent()}catch(e){}}function Ua({text:e,children:t}){const s=(0,p.useCopyToClipboard)(e);return(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,variant:"secondary",ref:s,children:t})}class Ha extends u.Component{constructor(){super(...arguments),this.state={error:null}}componentDidCatch(e){(0,h.doAction)("editor.ErrorBoundary.errorLogged",e)}static getDerivedStateFromError(e){return{error:e}}render(){const{error:e}=this.state;if(!e)return this.props.children;const t=[(0,P.jsx)(Ua,{text:za,children:(0,gs.__)("Copy Post Text")},"copy-post"),(0,P.jsx)(Ua,{text:e.stack,children:(0,gs.__)("Copy Error")},"copy-error")];return(0,P.jsx)(m.Warning,{className:"editor-error-boundary",actions:t,children:(0,gs.__)("The editor has encountered an unexpected error.")})}}const Ga=Ha,$a=window.requestIdleCallback?window.requestIdleCallback:window.requestAnimationFrame;let Wa;function Za(){const{postId:e,isEditedPostNew:t,hasRemoteAutosave:s}=(0,c.useSelect)((e=>({postId:e(qi).getCurrentPostId(),isEditedPostNew:e(qi).isEditedPostNew(),hasRemoteAutosave:!!e(qi).getEditorSettings().autosave})),[]),{getEditedPostAttribute:o}=(0,c.useSelect)(qi),{createWarningNotice:n,removeNotice:i}=(0,c.useDispatch)(ms.store),{editPost:r,resetEditorBlocks:a}=(0,c.useDispatch)(qi);(0,u.useEffect)((()=>{let l=function(e,t){return window.sessionStorage.getItem(_s(e,t))}(e,t);if(!l)return;try{l=JSON.parse(l)}catch{return}const{post_title:c,content:d,excerpt:u}=l,p={title:c,content:d,excerpt:u};if(!Object.keys(p).some((e=>p[e]!==o(e))))return void fs(e,t);if(s)return;const h="wpEditorAutosaveRestore";n((0,gs.__)("The backup of this post in your browser is different from the version below."),{id:h,actions:[{label:(0,gs.__)("Restore the backup"),onClick(){const{content:e,...t}=p;r(t),a((0,y.parse)(p.content)),i(h)}}]})}),[t,e])}const Ya=(0,p.ifCondition)((()=>{if(void 0!==Wa)return Wa;try{window.sessionStorage.setItem("__wpEditorTestSessionStorage",""),window.sessionStorage.removeItem("__wpEditorTestSessionStorage"),Wa=!0}catch{Wa=!1}return Wa}))((function(){const{autosave:e}=(0,c.useDispatch)(qi),t=(0,u.useCallback)((()=>{$a((()=>e({local:!0})))}),[]);Za(),function(){const{postId:e,isEditedPostNew:t,isDirty:s,isAutosaving:o,didError:n}=(0,c.useSelect)((e=>({postId:e(qi).getCurrentPostId(),isEditedPostNew:e(qi).isEditedPostNew(),isDirty:e(qi).isEditedPostDirty(),isAutosaving:e(qi).isAutosavingPost(),didError:e(qi).didPostSaveRequestFail()})),[]),i=(0,u.useRef)(s),r=(0,u.useRef)(o);(0,u.useEffect)((()=>{!n&&(r.current&&!o||i.current&&!s)&&fs(e,t),i.current=s,r.current=o}),[s,o,n]);const a=(0,p.usePrevious)(t),l=(0,p.usePrevious)(e);(0,u.useEffect)((()=>{l===e&&a&&!t&&fs(e,!0)}),[t,e])}();const s=(0,c.useSelect)((e=>e(qi).getEditorSettings().localAutosaveInterval),[]);return(0,P.jsx)(na,{interval:s,autosave:t})}));const Ka=function({children:e}){const t=(0,c.useSelect)((e=>{const{getEditedPostAttribute:t}=e(qi),{getPostType:s}=e(d.store),o=s(t("type"));return!!o?.supports?.["page-attributes"]}),[]);return t?e:null};const qa=function({children:e,supportKeys:t}){const s=(0,c.useSelect)((e=>{const{getEditedPostAttribute:t}=e(qi),{getPostType:s}=e(d.store);return s(t("type"))}),[]);let o=!!s;return s&&(o=(Array.isArray(t)?t:[t]).some((e=>!!s.supports[e]))),o?e:null};function Qa(){const e=(0,c.useSelect)((e=>{var t;return null!==(t=e(qi).getEditedPostAttribute("menu_order"))&&void 0!==t?t:0}),[]),{editPost:t}=(0,c.useDispatch)(qi),[s,o]=(0,u.useState)(null),n=null!=s?s:e;return(0,P.jsx)(Do.Flex,{children:(0,P.jsx)(Do.FlexBlock,{children:(0,P.jsx)(Do.__experimentalNumberControl,{__next40pxDefaultSize:!0,label:(0,gs.__)("Order"),help:(0,gs.__)("Set the page order."),value:n,onChange:e=>{o(e);const s=Number(e);Number.isInteger(s)&&""!==e.trim?.()&&t({menu_order:s})},hideLabelFromVision:!0,onBlur:()=>{o(null)}})})})}function Xa(){return(0,P.jsx)(qa,{supportKeys:"page-attributes",children:(0,P.jsx)(Qa,{})})}var Ja=s(9681),el=s.n(Ja);const tl=(0,u.forwardRef)((({className:e,label:t,children:s},o)=>(0,P.jsxs)(Do.__experimentalHStack,{className:dr("editor-post-panel__row",e),ref:o,children:[t&&(0,P.jsx)("div",{className:"editor-post-panel__row-label",children:t}),(0,P.jsx)("div",{className:"editor-post-panel__row-control",children:s})]})));function sl(e){const t=e.map((e=>({children:[],parent:null,...e})));if(t.some((({parent:e})=>null===e)))return t;const s=t.reduce(((e,t)=>{const{parent:s}=t;return e[s]||(e[s]=[]),e[s].push(t),e}),{}),o=e=>e.map((e=>{const t=s[e.id];return{...e,children:t&&t.length?o(t):[]}}));return o(s[0]||[])}const ol=e=>(0,Ao.decodeEntities)(e),nl=e=>({...e,name:ol(e.name)}),il=e=>(null!=e?e:[]).map(nl);function rl(e){return e?.title?.rendered?(0,Ao.decodeEntities)(e.title.rendered):`#${e.id} (${(0,gs.__)("no title")})`}const al=(e,t)=>{const s=el()(e||"").toLowerCase(),o=el()(t||"").toLowerCase();return s===o?0:s.startsWith(o)?s.length:1/0};function ll(){const{editPost:e}=(0,c.useDispatch)(qi),[t,s]=(0,u.useState)(!1),{isHierarchical:o,parentPostId:n,parentPostTitle:i,pageItems:r}=(0,c.useSelect)((e=>{var s;const{getPostType:o,getEntityRecords:n,getEntityRecord:i}=e(d.store),{getCurrentPostId:r,getEditedPostAttribute:a}=e(qi),l=a("type"),c=a("parent"),u=o(l),p=r(),h=null!==(s=u?.hierarchical)&&void 0!==s&&s,m={per_page:100,exclude:p,parent_exclude:p,orderby:"menu_order",order:"asc",_fields:"id,title,parent"};t&&(m.search=t);const g=c?i("postType",l,c):null;return{isHierarchical:h,parentPostId:c,parentPostTitle:g?rl(g):"",pageItems:h?n("postType",l,m):null}}),[t]),a=(0,u.useMemo)((()=>{const e=(s,o=0)=>{const n=s.map((t=>[{value:t.id,label:"— ".repeat(o)+(0,Ao.decodeEntities)(t.name),rawName:t.name},...e(t.children||[],o+1)])).sort((([e],[s])=>al(e.rawName,t)>=al(s.rawName,t)?1:-1));return n.flat()};if(!r)return[];let s=r.map((e=>({id:e.id,parent:e.parent,name:rl(e)})));t||(s=sl(s));const o=e(s),a=o.find((e=>e.value===n));return i&&!a&&o.unshift({value:n,label:i}),o}),[r,t,i,n]);if(!o)return null;return(0,P.jsx)(Do.ComboboxControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,className:"editor-page-attributes__parent",label:(0,gs.__)("Parent"),help:(0,gs.__)("Choose a parent page."),value:n,options:a,onFilterValueChange:(0,p.debounce)((e=>{s(e)}),300),onChange:t=>{e({parent:t})},hideLabelFromVision:!0})}function cl({isOpen:e,onClick:t}){const s=(0,c.useSelect)((e=>{const{getEditedPostAttribute:t}=e(qi),s=t("parent");if(!s)return null;const{getEntityRecord:o}=e(d.store);return o("postType",t("type"),s)}),[]),o=(0,u.useMemo)((()=>s?rl(s):(0,gs.__)("None")),[s]);return(0,P.jsx)(Do.Button,{size:"compact",className:"editor-post-parent__panel-toggle",variant:"tertiary","aria-expanded":e,"aria-label":(0,gs.sprintf)((0,gs.__)("Change parent: %s"),o),onClick:t,children:o})}function dl(){const e=(0,c.useSelect)((e=>e(d.store).getEntityRecord("root","__unstableBase")?.home),[]),[t,s]=(0,u.useState)(null),o=(0,u.useMemo)((()=>({anchor:t,placement:"left-start",offset:36,shift:!0})),[t]);return(0,P.jsx)(tl,{label:(0,gs.__)("Parent"),ref:s,children:(0,P.jsx)(Do.Dropdown,{popoverProps:o,className:"editor-post-parent__panel-dropdown",contentClassName:"editor-post-parent__panel-dialog",focusOnMount:!0,renderToggle:({isOpen:e,onToggle:t})=>(0,P.jsx)(cl,{isOpen:e,onClick:t}),renderContent:({onClose:t})=>(0,P.jsxs)("div",{className:"editor-post-parent",children:[(0,P.jsx)(m.__experimentalInspectorPopoverHeader,{title:(0,gs.__)("Parent"),onClose:t}),(0,P.jsxs)("div",{children:[(0,u.createInterpolateElement)((0,gs.sprintf)((0,gs.__)('Child pages inherit characteristics from their parent, such as URL structure. For instance, if "Pricing" is a child of "Services", its URL would be %s<wbr />/services<wbr />/pricing.'),(0,v.filterURLForDisplay)(e).replace(/([/.])/g,"<wbr />$1")),{wbr:(0,P.jsx)("wbr",{})}),(0,P.jsx)("p",{children:(0,u.createInterpolateElement)((0,gs.__)("They also show up as sub-items in the default navigation menu. <a>Learn more.</a>"),{a:(0,P.jsx)(Do.ExternalLink,{href:(0,gs.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#page-attributes")})})})]}),(0,P.jsx)(ll,{})]})})})}const ul=ll,pl="page-attributes";function hl(){const{isEnabled:e,postType:t}=(0,c.useSelect)((e=>{const{getEditedPostAttribute:t,isEditorPanelEnabled:s}=e(qi),{getPostType:o}=e(d.store);return{isEnabled:s(pl),postType:o(t("type"))}}),[]);return e&&t?(0,P.jsx)(dl,{}):null}function ml(){return(0,P.jsx)(Ka,{children:(0,P.jsx)(hl,{})})}const gl=(0,P.jsx)(k.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,P.jsx)(k.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18.5 5.5V8H20V5.5H22.5V4H20V1.5H18.5V4H16V5.5H18.5ZM13.9624 4H6C4.89543 4 4 4.89543 4 6V18C4 19.1046 4.89543 20 6 20H18C19.1046 20 20 19.1046 20 18V10.0391H18.5V18C18.5 18.2761 18.2761 18.5 18 18.5H10L10 10.4917L16.4589 10.5139L16.4641 9.01389L5.5 8.97618V6C5.5 5.72386 5.72386 5.5 6 5.5H13.9624V4ZM5.5 10.4762V18C5.5 18.2761 5.72386 18.5 6 18.5H8.5L8.5 10.4865L5.5 10.4762Z"})}),_l=(0,gs.__)("Custom Template");function fl({onClose:e}){const{defaultBlockTemplate:t,onNavigateToEntityRecord:s}=(0,c.useSelect)((e=>{const{getEditorSettings:t,getCurrentTemplateId:s}=e(qi);return{defaultBlockTemplate:t().defaultBlockTemplate,onNavigateToEntityRecord:t().onNavigateToEntityRecord,getTemplateId:s}})),{createTemplate:o}=sn((0,c.useDispatch)(qi)),[n,i]=(0,u.useState)(""),[r,a]=(0,u.useState)(!1),l=()=>{i(""),e()};return(0,P.jsx)(Do.Modal,{title:(0,gs.__)("Create custom template"),onRequestClose:l,focusOnMount:"firstContentElement",size:"small",children:(0,P.jsx)("form",{className:"editor-post-template__create-form",onSubmit:async e=>{if(e.preventDefault(),r)return;a(!0);const i=null!=t?t:(0,y.serialize)([(0,y.createBlock)("core/group",{tagName:"header",layout:{inherit:!0}},[(0,y.createBlock)("core/site-title"),(0,y.createBlock)("core/site-tagline")]),(0,y.createBlock)("core/separator"),(0,y.createBlock)("core/group",{tagName:"main"},[(0,y.createBlock)("core/group",{layout:{inherit:!0}},[(0,y.createBlock)("core/post-title")]),(0,y.createBlock)("core/post-content",{layout:{inherit:!0}})])]),c=await o({slug:(0,v.cleanForSlug)(n||_l),content:i,title:n||_l});a(!1),s({postId:c.id,postType:"wp_template"}),l()},children:(0,P.jsxs)(Do.__experimentalVStack,{spacing:"3",children:[(0,P.jsx)(Do.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,gs.__)("Name"),value:n,onChange:i,placeholder:_l,disabled:r,help:(0,gs.__)('Describe the template, e.g. "Post with sidebar". A custom template can be manually applied to any post or page.')}),(0,P.jsxs)(Do.__experimentalHStack,{justify:"right",children:[(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:l,children:(0,gs.__)("Cancel")}),(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",isBusy:r,"aria-disabled":r,children:(0,gs.__)("Create")})]})]})})})}function bl(){return(0,c.useSelect)((e=>{const{getCurrentPostId:t,getCurrentPostType:s}=e(qi);return{postId:t(),postType:s()}}),[])}function yl(){const{postType:e,postId:t}=bl();return(0,c.useSelect)((s=>{const{canUser:o,getEntityRecord:n,getEntityRecords:i}=s(d.store),r=o("read",{kind:"root",name:"site"})?n("root","site"):void 0,a=i("postType","wp_template",{per_page:-1}),l=+t===r?.page_for_posts,c="page"===e&&+t===r?.page_on_front&&a?.some((({slug:e})=>"front-page"===e));return!l&&!c}),[t,e])}function xl(e){return(0,c.useSelect)((t=>t(d.store).getEntityRecords("postType","wp_template",{per_page:-1,post_type:e})),[e])}function vl(e){const t=wl(),s=yl(),o=xl(e);return(0,u.useMemo)((()=>s&&o?.filter((e=>e.is_custom&&e.slug!==t&&!!e.content.raw))),[o,t,s])}function wl(){const{postType:e,postId:t}=bl(),s=xl(e),o=(0,c.useSelect)((s=>{const o=s(d.store).getEditedEntityRecord("postType",e,t);return o?.template}),[e,t]);if(o)return s?.find((e=>e.slug===o))?.slug}const Sl={className:"editor-post-template__dropdown",placement:"bottom-start"};function kl({isOpen:e,onClick:t}){const s=(0,c.useSelect)((e=>{const t=e(qi).getEditedPostAttribute("template"),{supportsTemplateMode:s,availableTemplates:o}=e(qi).getEditorSettings();if(!s&&o[t])return o[t];const n=e(d.store).canUser("create",{kind:"postType",name:"wp_template"})&&e(qi).getCurrentTemplateId();return n?.title||n?.slug||o?.[t]}),[]);return(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,variant:"tertiary","aria-expanded":e,"aria-label":(0,gs.__)("Template options"),onClick:t,children:null!=s?s:(0,gs.__)("Default template")})}function Pl({onClose:e}){var t,s;const o=yl(),{availableTemplates:n,fetchedTemplates:i,selectedTemplateSlug:r,canCreate:a,canEdit:l,currentTemplateId:p,onNavigateToEntityRecord:h,getEditorSettings:g}=(0,c.useSelect)((e=>{const{canUser:t,getEntityRecords:s}=e(d.store),n=e(qi).getEditorSettings(),i=t("create",{kind:"postType",name:"wp_template"}),r=e(qi).getCurrentTemplateId();return{availableTemplates:n.availableTemplates,fetchedTemplates:i?s("postType","wp_template",{post_type:e(qi).getCurrentPostType(),per_page:-1}):void 0,selectedTemplateSlug:e(qi).getEditedPostAttribute("template"),canCreate:o&&i&&n.supportsTemplateMode,canEdit:o&&i&&n.supportsTemplateMode&&!!r,currentTemplateId:r,onNavigateToEntityRecord:n.onNavigateToEntityRecord,getEditorSettings:e(qi).getEditorSettings}}),[o]),_=(0,u.useMemo)((()=>Object.entries({...n,...Object.fromEntries((null!=i?i:[]).map((({slug:e,title:t})=>[e,t.rendered])))}).map((([e,t])=>({value:e,label:t})))),[n,i]),f=null!==(t=_.find((e=>e.value===r)))&&void 0!==t?t:_.find((e=>!e.value)),{editPost:b}=(0,c.useDispatch)(qi),{createSuccessNotice:y}=(0,c.useDispatch)(ms.store),[x,v]=(0,u.useState)(!1);return(0,P.jsxs)("div",{className:"editor-post-template__classic-theme-dropdown",children:[(0,P.jsx)(m.__experimentalInspectorPopoverHeader,{title:(0,gs.__)("Template"),help:(0,gs.__)("Templates define the way content is displayed when viewing your site."),actions:a?[{icon:gl,label:(0,gs.__)("Add template"),onClick:()=>v(!0)}]:[],onClose:e}),o?(0,P.jsx)(Do.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,hideLabelFromVision:!0,label:(0,gs.__)("Template"),value:null!==(s=f?.value)&&void 0!==s?s:"",options:_,onChange:e=>b({template:e||""})}):(0,P.jsx)(Do.Notice,{status:"warning",isDismissible:!1,children:(0,gs.__)("The posts page template cannot be changed.")}),l&&h&&(0,P.jsx)("p",{children:(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!1,variant:"link",onClick:()=>{h({postId:p,postType:"wp_template"}),e(),y((0,gs.__)("Editing template. Changes made here affect all posts and pages that use the template."),{type:"snackbar",actions:[{label:(0,gs.__)("Go back"),onClick:()=>g().onNavigateToPreviousEntityRecord()}]})},children:(0,gs.__)("Edit template")})}),x&&(0,P.jsx)(fl,{onClose:()=>v(!1)})]})}const Cl=function(){return(0,P.jsx)(Do.Dropdown,{popoverProps:Sl,focusOnMount:!0,renderToggle:({isOpen:e,onToggle:t})=>(0,P.jsx)(kl,{isOpen:e,onClick:t}),renderContent:({onClose:e})=>(0,P.jsx)(Pl,{onClose:e})})},{PreferenceBaseOption:jl}=(window.wp.warning,sn(j.privateApis)),El=(0,p.compose)((0,c.withSelect)(((e,{panelName:t})=>{const{isEditorPanelEnabled:s,isEditorPanelRemoved:o}=e(qi);return{isRemoved:o(t),isChecked:s(t)}})),(0,p.ifCondition)((({isRemoved:e})=>!e)),(0,c.withDispatch)(((e,{panelName:t})=>({onChange:()=>e(qi).toggleEditorPanelEnabled(t)}))))(jl),{Fill:Tl,Slot:Bl}=(0,Do.createSlotFill)("EnablePluginDocumentSettingPanelOption"),Il=({label:e,panelName:t})=>(0,P.jsx)(Tl,{children:(0,P.jsx)(El,{label:e,panelName:t})});Il.Slot=Bl;const Nl=Il,{Fill:Al,Slot:Dl}=(0,Do.createSlotFill)("PluginDocumentSettingPanel"),Rl=({name:e,className:t,title:s,icon:o,children:n})=>{const{name:i}=(0,Ar.usePluginContext)(),r=`${i}/${e}`,{opened:a,isEnabled:l}=(0,c.useSelect)((e=>{const{isEditorPanelOpened:t,isEditorPanelEnabled:s}=e(qi);return{opened:t(r),isEnabled:s(r)}}),[r]),{toggleEditorPanelOpened:d}=(0,c.useDispatch)(qi);return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(Nl,{label:s,panelName:r}),(0,P.jsx)(Al,{children:l&&(0,P.jsx)(Do.PanelBody,{className:t,title:s,icon:o,opened:a,onToggle:()=>d(r),children:n})})]})};Rl.Slot=Dl;const Ml=Rl,Ol=({allowedBlocks:e,icon:t,label:s,onClick:o,small:n,role:i})=>(0,P.jsx)(m.BlockSettingsMenuControls,{children:({selectedBlocks:r,onClose:a})=>((e,t)=>{return!Array.isArray(t)||(s=t,0===e.filter((e=>!s.includes(e))).length);var s})(r,e)?(0,P.jsx)(Do.MenuItem,{onClick:(0,p.compose)(o,a),icon:t,label:n?s:void 0,role:i,children:!n&&s}):null}),Ll=(0,p.compose)((0,Ar.withPluginContext)(((e,t)=>{var s;return{as:null!==(s=t.as)&&void 0!==s?s:Do.MenuItem,icon:t.icon||e.icon,name:"core/plugin-more-menu"}})))(Fr),{Fill:Fl,Slot:Vl}=(0,Do.createSlotFill)("PluginPostPublishPanel"),zl=({children:e,className:t,title:s,initialOpen:o=!1,icon:n})=>{const{icon:i}=(0,Ar.usePluginContext)();return(0,P.jsx)(Fl,{children:(0,P.jsx)(Do.PanelBody,{className:t,initialOpen:o||!s,title:s,icon:null!=n?n:i,children:e})})};zl.Slot=Vl;const Ul=zl,{Fill:Hl,Slot:Gl}=(0,Do.createSlotFill)("PluginPostStatusInfo"),$l=({children:e,className:t})=>(0,P.jsx)(Hl,{children:(0,P.jsx)(Do.PanelRow,{className:t,children:e})});$l.Slot=Gl;const Wl=$l,{Fill:Zl,Slot:Yl}=(0,Do.createSlotFill)("PluginPrePublishPanel"),Kl=({children:e,className:t,title:s,initialOpen:o=!1,icon:n})=>{const{icon:i}=(0,Ar.usePluginContext)();return(0,P.jsx)(Zl,{children:(0,P.jsx)(Do.PanelBody,{className:t,initialOpen:o||!s,title:s,icon:null!=n?n:i,children:e})})};Kl.Slot=Yl;const ql=Kl,Ql=(0,p.compose)((0,Ar.withPluginContext)(((e,t)=>{var s;return{as:null!==(s=t.as)&&void 0!==s?s:Do.MenuItem,icon:t.icon||e.icon,name:"core/plugin-preview-menu"}})))(Fr);function Xl({className:e,...t}){const{postTitle:s}=(0,c.useSelect)((e=>({postTitle:e(qi).getEditedPostAttribute("title")})),[]);return(0,P.jsx)(Kr,{panelClassName:e,className:"editor-sidebar",smallScreenTitle:s||(0,gs.__)("(no title)"),scope:"core",...t})}function Jl(e){return(0,P.jsx)(zr,{__unstableExplicitMenuItem:!0,scope:"core",...e})}function ec({onClick:e}){const[t,s]=(0,u.useState)(!1),{postType:o,postId:n}=bl(),i=vl(o),{editEntityRecord:r}=(0,c.useDispatch)(d.store);if(!i?.length)return null;return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(Do.MenuItem,{onClick:()=>s(!0),children:(0,gs.__)("Swap template")}),t&&(0,P.jsx)(Do.Modal,{title:(0,gs.__)("Choose a template"),onRequestClose:()=>s(!1),overlayClassName:"editor-post-template__swap-template-modal",isFullScreen:!0,children:(0,P.jsx)("div",{className:"editor-post-template__swap-template-modal-content",children:(0,P.jsx)(tc,{postType:o,onSelect:async t=>{r("postType",o,n,{template:t.name},{undoIgnore:!0}),s(!1),e()}})})})]})}function tc({postType:e,onSelect:t}){const s=vl(e),o=(0,u.useMemo)((()=>s.map((e=>({name:e.slug,blocks:(0,y.parse)(e.content.raw),title:(0,Ao.decodeEntities)(e.title.rendered),id:e.id})))),[s]),n=(0,p.useAsyncList)(o);return(0,P.jsx)(m.__experimentalBlockPatternsList,{label:(0,gs.__)("Templates"),blockPatterns:o,shownPatterns:n,onClickPattern:t})}function sc({onClick:e}){const t=wl(),s=yl(),{postType:o,postId:n}=bl(),{editEntityRecord:i}=(0,c.useDispatch)(d.store);return t&&s?(0,P.jsx)(Do.MenuItem,{onClick:()=>{i("postType",o,n,{template:""},{undoIgnore:!0}),e()},children:(0,gs.__)("Use default template")}):null}function oc({onClick:e}){const{canCreateTemplates:t}=(0,c.useSelect)((e=>{const{canUser:t}=e(d.store);return{canCreateTemplates:t("create",{kind:"postType",name:"wp_template"})}}),[]),[s,o]=(0,u.useState)(!1),n=yl();return t&&n?(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(Do.MenuItem,{onClick:()=>{o(!0)},children:(0,gs.__)("Create new template")}),s&&(0,P.jsx)(fl,{onClose:()=>{o(!1),e()}})]}):null}const nc={className:"editor-post-template__dropdown",placement:"bottom-start"};function ic({id:e}){const{isTemplateHidden:t,onNavigateToEntityRecord:s,getEditorSettings:o,hasGoBack:n}=(0,c.useSelect)((e=>{const{getRenderingMode:t,getEditorSettings:s}=sn(e(qi)),o=s();return{isTemplateHidden:"post-only"===t(),onNavigateToEntityRecord:o.onNavigateToEntityRecord,getEditorSettings:s,hasGoBack:o.hasOwnProperty("onNavigateToPreviousEntityRecord")}}),[]),{get:i}=(0,c.useSelect)(j.store),{editedRecord:r,hasResolved:a}=(0,d.useEntityRecord)("postType","wp_template",e),{createSuccessNotice:l}=(0,c.useDispatch)(ms.store),{setRenderingMode:u}=(0,c.useDispatch)(qi),p=(0,c.useSelect)((e=>!!e(d.store).canUser("create",{kind:"postType",name:"wp_template"})),[]);if(!a)return null;const h=n?[{label:(0,gs.__)("Go back"),onClick:()=>o().onNavigateToPreviousEntityRecord()}]:void 0;return(0,P.jsx)(Do.DropdownMenu,{popoverProps:nc,focusOnMount:!0,toggleProps:{size:"compact",variant:"tertiary",tooltipPosition:"middle left"},label:(0,gs.__)("Template options"),text:(0,Ao.decodeEntities)(r.title),icon:null,children:({onClose:e})=>(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(Do.MenuGroup,{children:[p&&(0,P.jsx)(Do.MenuItem,{onClick:()=>{s({postId:r.id,postType:"wp_template"}),e(),i("core/edit-site","welcomeGuideTemplate")||l((0,gs.__)("Editing template. Changes made here affect all posts and pages that use the template."),{type:"snackbar",actions:h})},children:(0,gs.__)("Edit template")}),(0,P.jsx)(ec,{onClick:e}),(0,P.jsx)(sc,{onClick:e}),p&&(0,P.jsx)(oc,{onClick:e})]}),(0,P.jsx)(Do.MenuGroup,{children:(0,P.jsx)(Do.MenuItem,{icon:t?void 0:Ro,isSelected:!t,role:"menuitemcheckbox",onClick:()=>{u(t?"template-locked":"post-only")},children:(0,gs.__)("Show template")})})]})})}function rc(){const{templateId:e,isBlockTheme:t}=(0,c.useSelect)((e=>{const{getCurrentTemplateId:t,getEditorSettings:s}=e(qi);return{templateId:t(),isBlockTheme:s().__unstableIsBlockBasedTheme}}),[]),s=(0,c.useSelect)((e=>{var t;const s=e(qi).getCurrentPostType(),o=e(d.store).getPostType(s);if(!o?.viewable)return!1;const n=e(qi).getEditorSettings();if(!!n.availableTemplates&&Object.keys(n.availableTemplates).length>0)return!0;if(!n.supportsTemplateMode)return!1;return null!==(t=e(d.store).canUser("create",{kind:"postType",name:"wp_template"}))&&void 0!==t&&t}),[]),o=(0,c.useSelect)((e=>{var t;return null!==(t=e(d.store).canUser("read",{kind:"postType",name:"wp_template"}))&&void 0!==t&&t}),[]);return t&&o||!s?t&&e?(0,P.jsx)(tl,{label:(0,gs.__)("Template"),children:(0,P.jsx)(ic,{id:e})}):null:(0,P.jsx)(tl,{label:(0,gs.__)("Template"),children:(0,P.jsx)(Cl,{})})}const ac={_fields:"id,name",context:"view"},lc={who:"authors",per_page:50,...ac};function cc(e){const{authorId:t,authors:s,postAuthor:o}=(0,c.useSelect)((t=>{const{getUser:s,getUsers:o}=t(d.store),{getEditedPostAttribute:n}=t(qi),i=n("author"),r={...lc};return e&&(r.search=e),{authorId:i,authors:o(r),postAuthor:s(i,ac)}}),[e]);return{authorId:t,authorOptions:(0,u.useMemo)((()=>{const e=(null!=s?s:[]).map((e=>({value:e.id,label:(0,Ao.decodeEntities)(e.name)}))),t=e.findIndex((({value:e})=>o?.id===e));let n=[];return t<0&&o?n=[{value:o.id,label:(0,Ao.decodeEntities)(o.name)}]:t<0&&!o&&(n=[{value:0,label:(0,gs.__)("(No author)")}]),[...n,...e]}),[s,o]),postAuthor:o}}function dc(){const[e,t]=(0,u.useState)(),{editPost:s}=(0,c.useDispatch)(qi),{authorId:o,authorOptions:n}=cc(e);return(0,P.jsx)(Do.ComboboxControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,gs.__)("Author"),options:n,value:o,onFilterValueChange:(0,p.debounce)((e=>{t(e)}),300),onChange:e=>{e&&s({author:e})},allowReset:!1,hideLabelFromVision:!0})}function uc(){const{editPost:e}=(0,c.useDispatch)(qi),{authorId:t,authorOptions:s}=cc();return(0,P.jsx)(Do.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,className:"post-author-selector",label:(0,gs.__)("Author"),options:s,onChange:t=>{const s=Number(t);e({author:s})},value:t,hideLabelFromVision:!0})}const pc=function(){return(0,c.useSelect)((e=>{const t=e(d.store).getUsers(lc);return t?.length>=25}),[])?(0,P.jsx)(dc,{}):(0,P.jsx)(uc,{})};function hc({children:e}){const{hasAssignAuthorAction:t,hasAuthors:s}=(0,c.useSelect)((e=>{var t;const s=e(qi).getCurrentPost(),o=e(d.store).getUsers(lc);return{hasAssignAuthorAction:null!==(t=s._links?.["wp:action-assign-author"])&&void 0!==t&&t,hasAuthors:o?.length>=1}}),[]);return t&&s?(0,P.jsx)(qa,{supportKeys:"author",children:e}):null}function mc({isOpen:e,onClick:t}){const{postAuthor:s}=cc(),o=(0,Ao.decodeEntities)(s?.name)||(0,gs.__)("(No author)");return(0,P.jsx)(Do.Button,{size:"compact",className:"editor-post-author__panel-toggle",variant:"tertiary","aria-expanded":e,"aria-label":(0,gs.sprintf)((0,gs.__)("Change author: %s"),o),onClick:t,children:o})}const gc=function(){const[e,t]=(0,u.useState)(null),s=(0,u.useMemo)((()=>({anchor:e,placement:"left-start",offset:36,shift:!0})),[e]);return(0,P.jsx)(hc,{children:(0,P.jsx)(tl,{label:(0,gs.__)("Author"),ref:t,children:(0,P.jsx)(Do.Dropdown,{popoverProps:s,contentClassName:"editor-post-author__panel-dialog",focusOnMount:!0,renderToggle:({isOpen:e,onToggle:t})=>(0,P.jsx)(mc,{isOpen:e,onClick:t}),renderContent:({onClose:e})=>(0,P.jsxs)("div",{className:"editor-post-author",children:[(0,P.jsx)(m.__experimentalInspectorPopoverHeader,{title:(0,gs.__)("Author"),onClose:e}),(0,P.jsx)(pc,{onClose:e})]})})})})},_c=[{label:(0,gs._x)("Open",'Adjective: e.g. "Comments are open"'),value:"open",description:(0,gs.__)("Visitors can add new comments and replies.")},{label:(0,gs.__)("Closed"),value:"closed",description:[(0,gs.__)("Visitors cannot add new comments or replies."),(0,gs.__)("Existing comments remain visible.")].join(" ")}];const fc=function(){const e=(0,c.useSelect)((e=>{var t;return null!==(t=e(qi).getEditedPostAttribute("comment_status"))&&void 0!==t?t:"open"}),[]),{editPost:t}=(0,c.useDispatch)(qi);return(0,P.jsx)("form",{children:(0,P.jsx)(Do.__experimentalVStack,{spacing:4,children:(0,P.jsx)(Do.RadioControl,{className:"editor-change-status__options",hideLabelFromVision:!0,label:(0,gs.__)("Comment status"),options:_c,onChange:e=>t({comment_status:e}),selected:e})})})};const bc=function(){const e=(0,c.useSelect)((e=>{var t;return null!==(t=e(qi).getEditedPostAttribute("ping_status"))&&void 0!==t?t:"open"}),[]),{editPost:t}=(0,c.useDispatch)(qi);return(0,P.jsx)(Do.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,gs.__)("Enable pingbacks & trackbacks"),checked:"open"===e,onChange:()=>t({ping_status:"open"===e?"closed":"open"}),help:(0,P.jsx)(Do.ExternalLink,{href:(0,gs.__)("https://wordpress.org/documentation/article/trackbacks-and-pingbacks/"),children:(0,gs.__)("Learn more about pingbacks & trackbacks")})})},yc="discussion-panel";function xc({onClose:e}){return(0,P.jsxs)("div",{className:"editor-post-discussion",children:[(0,P.jsx)(m.__experimentalInspectorPopoverHeader,{title:(0,gs.__)("Discussion"),onClose:e}),(0,P.jsxs)(Do.__experimentalVStack,{spacing:4,children:[(0,P.jsx)(qa,{supportKeys:"comments",children:(0,P.jsx)(fc,{})}),(0,P.jsx)(qa,{supportKeys:"trackbacks",children:(0,P.jsx)(bc,{})})]})]})}function vc({isOpen:e,onClick:t}){const{commentStatus:s,pingStatus:o,commentsSupported:n,trackbacksSupported:i}=(0,c.useSelect)((e=>{var t,s;const{getEditedPostAttribute:o}=e(qi),{getPostType:n}=e(d.store),i=n(o("type"));return{commentStatus:null!==(t=o("comment_status"))&&void 0!==t?t:"open",pingStatus:null!==(s=o("ping_status"))&&void 0!==s?s:"open",commentsSupported:!!i.supports.comments,trackbacksSupported:!!i.supports.trackbacks}}),[]);let r;return r="open"===s?"open"===o?(0,gs._x)("Open",'Adjective: e.g. "Comments are open"'):i?(0,gs.__)("Comments only"):(0,gs._x)("Open",'Adjective: e.g. "Comments are open"'):"open"===o?n?(0,gs.__)("Pings only"):(0,gs.__)("Pings enabled"):(0,gs.__)("Closed"),(0,P.jsx)(Do.Button,{size:"compact",className:"editor-post-discussion__panel-toggle",variant:"tertiary","aria-label":(0,gs.__)("Change discussion options"),"aria-expanded":e,onClick:t,children:r})}function wc(){const{isEnabled:e}=(0,c.useSelect)((e=>{const{isEditorPanelEnabled:t}=e(qi);return{isEnabled:t(yc)}}),[]),[t,s]=(0,u.useState)(null),o=(0,u.useMemo)((()=>({anchor:t,placement:"left-start",offset:36,shift:!0})),[t]);return e?(0,P.jsx)(qa,{supportKeys:["comments","trackbacks"],children:(0,P.jsx)(tl,{label:(0,gs.__)("Discussion"),ref:s,children:(0,P.jsx)(Do.Dropdown,{popoverProps:o,className:"editor-post-discussion__panel-dropdown",contentClassName:"editor-post-discussion__panel-dialog",focusOnMount:!0,renderToggle:({isOpen:e,onToggle:t})=>(0,P.jsx)(vc,{isOpen:e,onClick:t}),renderContent:({onClose:e})=>(0,P.jsx)(xc,{onClose:e})})})}):null}function Sc({hideLabelFromVision:e=!1,updateOnBlur:t=!1}){const{excerpt:s,shouldUseDescriptionLabel:o,usedAttribute:n}=(0,c.useSelect)((e=>{const{getCurrentPostType:t,getEditedPostAttribute:s}=e(qi),o=t(),n=["wp_template","wp_template_part"].includes(o)?"description":"excerpt";return{excerpt:s(n),shouldUseDescriptionLabel:["wp_template","wp_template_part","wp_block"].includes(o),usedAttribute:n}}),[]),{editPost:i}=(0,c.useDispatch)(qi),[r,a]=(0,u.useState)((0,Ao.decodeEntities)(s)),l=e=>{i({[n]:e})},d=o?(0,gs.__)("Write a description (optional)"):(0,gs.__)("Write an excerpt (optional)");return(0,P.jsx)("div",{className:"editor-post-excerpt",children:(0,P.jsx)(Do.TextareaControl,{__nextHasNoMarginBottom:!0,label:d,hideLabelFromVision:e,className:"editor-post-excerpt__textarea",onChange:t?a:l,onBlur:t?()=>l(r):void 0,value:t?r:s,help:o?(0,gs.__)("Write a description"):(0,P.jsx)(Do.ExternalLink,{href:(0,gs.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#excerpt"),children:(0,gs.__)("Learn more about manual excerpts")})})})}const kc=function({children:e}){return(0,P.jsx)(qa,{supportKeys:"excerpt",children:e})},{Fill:Pc,Slot:Cc}=(0,Do.createSlotFill)("PluginPostExcerpt"),jc=({children:e,className:t})=>(0,P.jsx)(Pc,{children:(0,P.jsx)(Do.PanelRow,{className:t,children:e})});jc.Slot=Cc;const Ec=jc,Tc="post-excerpt";function Bc(){const{isOpened:e,isEnabled:t,postType:s}=(0,c.useSelect)((e=>{const{isEditorPanelOpened:t,isEditorPanelEnabled:s,getCurrentPostType:o}=e(qi);return{isOpened:t(Tc),isEnabled:s(Tc),postType:o()}}),[]),{toggleEditorPanelOpened:o}=(0,c.useDispatch)(qi);if(!t)return null;const n=["wp_template","wp_template_part","wp_block"].includes(s);return(0,P.jsx)(Do.PanelBody,{title:n?(0,gs.__)("Description"):(0,gs.__)("Excerpt"),opened:e,onToggle:()=>o(Tc),children:(0,P.jsx)(Ec.Slot,{children:e=>(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(Sc,{}),e]})})})}function Ic(){return(0,P.jsx)(kc,{children:(0,P.jsx)(Bc,{})})}function Nc(){return(0,P.jsx)(kc,{children:(0,P.jsx)(Ac,{})})}function Ac(){const{shouldRender:e,excerpt:t,shouldBeUsedAsDescription:s,allowEditing:o}=(0,c.useSelect)((e=>{const{getCurrentPostType:t,getCurrentPostId:s,getEditedPostAttribute:o,isEditorPanelEnabled:n}=e(qi),i=t(),r=["wp_template","wp_template_part"].includes(i),a="wp_block"===i,l=r||a,c=r?"description":"excerpt",u=r&&e(d.store).getEntityRecord("postType",i,s()),p=n(Tc)||l;return{excerpt:o(c),shouldRender:p,shouldBeUsedAsDescription:l,allowEditing:p&&(!l||a||u&&u.source===F.custom&&!u.has_theme_file&&u.is_custom)}}),[]),[n,i]=(0,u.useState)(null),r=s?(0,gs.__)("Description"):(0,gs.__)("Excerpt"),a=(0,u.useMemo)((()=>({anchor:n,"aria-label":r,headerTitle:r,placement:"left-start",offset:36,shift:!0})),[n,r]);if(!e)return!1;const l=!!t&&(0,P.jsx)(Do.__experimentalText,{align:"left",numberOfLines:4,truncate:o,children:(0,Ao.decodeEntities)(t)});if(!o)return l;const p=s?(0,gs.__)("Add a description…"):(0,gs.__)("Add an excerpt…"),h=s?(0,gs.__)("Edit description"):(0,gs.__)("Edit excerpt");return(0,P.jsxs)(Do.__experimentalVStack,{children:[l,(0,P.jsx)(Do.Dropdown,{className:"editor-post-excerpt__dropdown",contentClassName:"editor-post-excerpt__dropdown__content",popoverProps:a,focusOnMount:!0,ref:i,renderToggle:({onToggle:e})=>(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,onClick:e,variant:"link",children:l?h:p}),renderContent:({onClose:e})=>(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(m.__experimentalInspectorPopoverHeader,{title:r,onClose:e}),(0,P.jsx)(Do.__experimentalVStack,{spacing:4,children:(0,P.jsx)(Ec.Slot,{children:e=>(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(Sc,{hideLabelFromVision:!0,updateOnBlur:!0}),e]})})})]})})]})}function Dc({children:e,supportKeys:t}){const{postType:s,themeSupports:o}=(0,c.useSelect)((e=>({postType:e(qi).getEditedPostAttribute("type"),themeSupports:e(d.store).getThemeSupports()})),[]);return(Array.isArray(t)?t:[t]).some((e=>{var t;const n=null!==(t=o?.[e])&&void 0!==t&&t;return"post-thumbnails"===e&&Array.isArray(n)?n.includes(s):n}))?e:null}const Rc=function({children:e}){return(0,P.jsx)(Dc,{supportKeys:"post-thumbnails",children:(0,P.jsx)(qa,{supportKeys:"thumbnail",children:e})})},Mc=["image"],Oc=(0,gs.__)("Featured image"),Lc=(0,gs.__)("Add a featured image"),Fc=(0,P.jsx)("p",{children:(0,gs.__)("To edit the featured image, you need permission to upload media.")});const Vc=(0,c.withSelect)((e=>{const{getMedia:t,getPostType:s}=e(d.store),{getCurrentPostId:o,getEditedPostAttribute:n}=e(qi),i=n("featured_media");return{media:i?t(i,{context:"view"}):null,currentPostId:o(),postType:s(n("type")),featuredImageId:i}})),zc=(0,c.withDispatch)(((e,{noticeOperations:t},{select:s})=>{const{editPost:o}=e(qi);return{onUpdateImage(e){o({featured_media:e.id})},onDropImage(e){s(m.store).getSettings().mediaUpload({allowedTypes:["image"],filesList:e,onFileChange([e]){o({featured_media:e.id})},onError(e){t.removeAllNotices(),t.createErrorNotice(e)}})},onRemoveImage(){o({featured_media:0})}}})),Uc=(0,p.compose)(Do.withNotices,Vc,zc,(0,Do.withFilters)("editor.PostFeaturedImage"))((function({currentPostId:e,featuredImageId:t,onUpdateImage:s,onRemoveImage:o,media:n,postType:i,noticeUI:r,noticeOperations:a}){const l=(0,u.useRef)(),[d,p]=(0,u.useState)(!1),{getSettings:g}=(0,c.useSelect)(m.store),{mediaSourceUrl:_}=function(e,t){var s,o;if(!e)return{};const n=(0,h.applyFilters)("editor.PostFeaturedImage.imageSize","large",e.id,t);if(n in(null!==(s=e?.media_details?.sizes)&&void 0!==s?s:{}))return{mediaWidth:e.media_details.sizes[n].width,mediaHeight:e.media_details.sizes[n].height,mediaSourceUrl:e.media_details.sizes[n].source_url};const i=(0,h.applyFilters)("editor.PostFeaturedImage.imageSize","thumbnail",e.id,t);return i in(null!==(o=e?.media_details?.sizes)&&void 0!==o?o:{})?{mediaWidth:e.media_details.sizes[i].width,mediaHeight:e.media_details.sizes[i].height,mediaSourceUrl:e.media_details.sizes[i].source_url}:{mediaWidth:e.media_details.width,mediaHeight:e.media_details.height,mediaSourceUrl:e.source_url}}(n,e);function f(e){g().mediaUpload({allowedTypes:Mc,filesList:e,onFileChange([e]){(0,ci.isBlobURL)(e?.url)?p(!0):(e&&s(e),p(!1))},onError(e){a.removeAllNotices(),a.createErrorNotice(e)}})}return(0,P.jsxs)(Rc,{children:[r,(0,P.jsxs)("div",{className:"editor-post-featured-image",children:[n&&(0,P.jsxs)("div",{id:`editor-post-featured-image-${t}-describedby`,className:"hidden",children:[n.alt_text&&(0,gs.sprintf)((0,gs.__)("Current image: %s"),n.alt_text),!n.alt_text&&(0,gs.sprintf)((0,gs.__)("The current image has no alternative text. The file name is: %s"),n.media_details.sizes?.full?.file||n.slug)]}),(0,P.jsx)(m.MediaUploadCheck,{fallback:Fc,children:(0,P.jsx)(m.MediaUpload,{title:i?.labels?.featured_image||Oc,onSelect:s,unstableFeaturedImageFlow:!0,allowedTypes:Mc,modalClass:"editor-post-featured-image__media-modal",render:({open:e})=>(0,P.jsxs)("div",{className:"editor-post-featured-image__container",children:[(0,P.jsxs)(Do.Button,{__next40pxDefaultSize:!0,ref:l,className:t?"editor-post-featured-image__preview":"editor-post-featured-image__toggle",onClick:e,"aria-label":t?(0,gs.__)("Edit or replace the featured image"):null,"aria-describedby":t?`editor-post-featured-image-${t}-describedby`:null,"aria-haspopup":"dialog",disabled:d,accessibleWhenDisabled:!0,children:[!!t&&n&&(0,P.jsx)("img",{className:"editor-post-featured-image__preview-image",src:_,alt:""}),d&&(0,P.jsx)(Do.Spinner,{}),!t&&!d&&(i?.labels?.set_featured_image||Lc)]}),!!t&&(0,P.jsxs)(Do.__experimentalHStack,{className:"editor-post-featured-image__actions",children:[(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,className:"editor-post-featured-image__action",onClick:e,"aria-haspopup":"dialog",children:(0,gs.__)("Replace")}),(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,className:"editor-post-featured-image__action",onClick:()=>{o(),l.current.focus()},children:(0,gs.__)("Remove")})]}),(0,P.jsx)(Do.DropZone,{onFilesDrop:f})]}),value:t})})]})]})})),Hc="featured-image";function Gc({withPanelBody:e=!0}){var t;const{postType:s,isEnabled:o,isOpened:n}=(0,c.useSelect)((e=>{const{getEditedPostAttribute:t,isEditorPanelEnabled:s,isEditorPanelOpened:o}=e(qi),{getPostType:n}=e(d.store);return{postType:n(t("type")),isEnabled:s(Hc),isOpened:o(Hc)}}),[]),{toggleEditorPanelOpened:i}=(0,c.useDispatch)(qi);return o?e?(0,P.jsx)(Rc,{children:(0,P.jsx)(Do.PanelBody,{title:null!==(t=s?.labels?.featured_image)&&void 0!==t?t:(0,gs.__)("Featured image"),opened:n,onToggle:()=>i(Hc),children:(0,P.jsx)(Uc,{})})}):(0,P.jsx)(Rc,{children:(0,P.jsx)(Uc,{})}):null}const $c=function({children:e}){return(0,c.useSelect)((e=>e(qi).getEditorSettings().disablePostFormats),[])?null:(0,P.jsx)(qa,{supportKeys:"post-formats",children:e})},Wc=[{id:"aside",caption:(0,gs.__)("Aside")},{id:"audio",caption:(0,gs.__)("Audio")},{id:"chat",caption:(0,gs.__)("Chat")},{id:"gallery",caption:(0,gs.__)("Gallery")},{id:"image",caption:(0,gs.__)("Image")},{id:"link",caption:(0,gs.__)("Link")},{id:"quote",caption:(0,gs.__)("Quote")},{id:"standard",caption:(0,gs.__)("Standard")},{id:"status",caption:(0,gs.__)("Status")},{id:"video",caption:(0,gs.__)("Video")}].sort(((e,t)=>{const s=e.caption.toUpperCase(),o=t.caption.toUpperCase();return s<o?-1:s>o?1:0}));function Zc(){const e=`post-format-selector-${(0,p.useInstanceId)(Zc)}`,{postFormat:t,suggestedFormat:s,supportedFormats:o}=(0,c.useSelect)((e=>{const{getEditedPostAttribute:t,getSuggestedPostFormat:s}=e(qi),o=t("format"),n=e(d.store).getThemeSupports();return{postFormat:null!=o?o:"standard",suggestedFormat:s(),supportedFormats:n.formats}}),[]),n=Wc.filter((e=>o?.includes(e.id)||t===e.id)),i=n.find((e=>e.id===s)),{editPost:r}=(0,c.useDispatch)(qi),a=e=>r({format:e});return(0,P.jsx)($c,{children:(0,P.jsxs)("div",{className:"editor-post-format",children:[(0,P.jsx)(Do.RadioControl,{className:"editor-post-format__options",label:(0,gs.__)("Post Format"),selected:t,onChange:e=>a(e),id:e,options:n.map((e=>({label:e.caption,value:e.id}))),hideLabelFromVision:!0}),i&&i.id!==t&&(0,P.jsx)("p",{className:"editor-post-format__suggestion",children:(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>a(i.id),children:(0,gs.sprintf)((0,gs.__)("Apply suggested format: %s"),i.caption)})})]})})}const Yc=function({children:e}){const{lastRevisionId:t,revisionsCount:s}=(0,c.useSelect)((e=>{const{getCurrentPostLastRevisionId:t,getCurrentPostRevisionsCount:s}=e(qi);return{lastRevisionId:t(),revisionsCount:s()}}),[]);return!t||s<2?null:(0,P.jsx)(qa,{supportKeys:"revisions",children:e})};function Kc(){return(0,c.useSelect)((e=>{const{getCurrentPostLastRevisionId:t,getCurrentPostRevisionsCount:s}=e(qi);return{lastRevisionId:t(),revisionsCount:s()}}),[])}function qc(){const{lastRevisionId:e,revisionsCount:t}=Kc();return(0,P.jsx)(Yc,{children:(0,P.jsx)(tl,{label:(0,gs.__)("Revisions"),children:(0,P.jsx)(Do.Button,{href:(0,v.addQueryArgs)("revision.php",{revision:e}),className:"editor-private-post-last-revision__button",text:t,variant:"tertiary",size:"compact"})})})}const Qc=function(){const{lastRevisionId:e,revisionsCount:t}=Kc();return(0,P.jsx)(Yc,{children:(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,href:(0,v.addQueryArgs)("revision.php",{revision:e}),className:"editor-post-last-revision__title",icon:Jo,iconPosition:"right",text:(0,gs.sprintf)((0,gs.__)("Revisions (%s)"),t)})})};const Xc=function(){return(0,P.jsx)(Yc,{children:(0,P.jsx)(Do.PanelBody,{className:"editor-post-last-revision__panel",children:(0,P.jsx)(Qc,{})})})};function Jc(){const e="core/editor/post-locked-modal-"+(0,p.useInstanceId)(Jc),{autosave:t,updatePostLock:s}=(0,c.useDispatch)(qi),{isLocked:o,isTakeover:n,user:i,postId:r,postLockUtils:a,activePostLock:l,postType:m,previewLink:g}=(0,c.useSelect)((e=>{const{isPostLocked:t,isPostLockTakeover:s,getPostLockUser:o,getCurrentPostId:n,getActivePostLock:i,getEditedPostAttribute:r,getEditedPostPreviewLink:a,getEditorSettings:l}=e(qi),{getPostType:c}=e(d.store);return{isLocked:t(),isTakeover:s(),user:o(),postId:n(),postLockUtils:l().postLockUtils,activePostLock:i(),postType:c(r("type")),previewLink:a()}}),[]);if((0,u.useEffect)((()=>{function n(){if(o||!l)return;const e=new window.FormData;if(e.append("action","wp-remove-post-lock"),e.append("_wpnonce",a.unlockNonce),e.append("post_ID",r),e.append("active_post_lock",l),window.navigator.sendBeacon)window.navigator.sendBeacon(a.ajaxUrl,e);else{const t=new window.XMLHttpRequest;t.open("POST",a.ajaxUrl,!1),t.send(e)}}return(0,h.addAction)("heartbeat.send",e,(function(e){o||(e["wp-refresh-post-lock"]={lock:l,post_id:r})})),(0,h.addAction)("heartbeat.tick",e,(function(e){if(!e["wp-refresh-post-lock"])return;const o=e["wp-refresh-post-lock"];o.lock_error?(t(),s({isLocked:!0,isTakeover:!0,user:{name:o.lock_error.name,avatar:o.lock_error.avatar_src_2x}})):o.new_lock&&s({isLocked:!1,activePostLock:o.new_lock})})),window.addEventListener("beforeunload",n),()=>{(0,h.removeAction)("heartbeat.send",e),(0,h.removeAction)("heartbeat.tick",e),window.removeEventListener("beforeunload",n)}}),[]),!o)return null;const _=i.name,f=i.avatar,b=(0,v.addQueryArgs)("post.php",{"get-post-lock":"1",lockKey:!0,post:r,action:"edit",_wpnonce:a.nonce}),y=(0,v.addQueryArgs)("edit.php",{post_type:m?.slug}),x=(0,gs.__)("Exit editor");return(0,P.jsx)(Do.Modal,{title:n?(0,gs.__)("Someone else has taken over this post"):(0,gs.__)("This post is already being edited"),focusOnMount:!0,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,isDismissible:!1,className:"editor-post-locked-modal",size:"medium",children:(0,P.jsxs)(Do.__experimentalHStack,{alignment:"top",spacing:6,children:[!!f&&(0,P.jsx)("img",{src:f,alt:(0,gs.__)("Avatar"),className:"editor-post-locked-modal__avatar",width:64,height:64}),(0,P.jsxs)("div",{children:[!!n&&(0,P.jsx)("p",{children:(0,u.createInterpolateElement)(_?(0,gs.sprintf)((0,gs.__)("<strong>%s</strong> now has editing control of this post (<PreviewLink />). Don’t worry, your changes up to this moment have been saved."),_):(0,gs.__)("Another user now has editing control of this post (<PreviewLink />). Don’t worry, your changes up to this moment have been saved."),{strong:(0,P.jsx)("strong",{}),PreviewLink:(0,P.jsx)(Do.ExternalLink,{href:g,children:(0,gs.__)("preview")})})}),!n&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)("p",{children:(0,u.createInterpolateElement)(_?(0,gs.sprintf)((0,gs.__)("<strong>%s</strong> is currently working on this post (<PreviewLink />), which means you cannot make changes, unless you take over."),_):(0,gs.__)("Another user is currently working on this post (<PreviewLink />), which means you cannot make changes, unless you take over."),{strong:(0,P.jsx)("strong",{}),PreviewLink:(0,P.jsx)(Do.ExternalLink,{href:g,children:(0,gs.__)("preview")})})}),(0,P.jsx)("p",{children:(0,gs.__)("If you take over, the other user will lose editing control to the post, but their changes will be saved.")})]}),(0,P.jsxs)(Do.__experimentalHStack,{className:"editor-post-locked-modal__buttons",justify:"flex-end",children:[!n&&(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,variant:"tertiary",href:b,children:(0,gs.__)("Take over")}),(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,variant:"primary",href:y,children:x})]})]})]})})}const ed=function({children:e}){const{hasPublishAction:t,isPublished:s}=(0,c.useSelect)((e=>{var t;const{isCurrentPostPublished:s,getCurrentPost:o}=e(qi);return{hasPublishAction:null!==(t=o()._links?.["wp:action-publish"])&&void 0!==t&&t,isPublished:s()}}),[]);return s||!t?null:e};const td=function(){const e=(0,c.useSelect)((e=>e(qi).getEditedPostAttribute("status")),[]),{editPost:t}=(0,c.useDispatch)(qi);return(0,P.jsx)(ed,{children:(0,P.jsx)(Do.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,gs.__)("Pending review"),checked:"pending"===e,onChange:()=>{t({status:"pending"===e?"draft":"pending"})}})})};function sd({className:e,textContent:t,forceIsAutosaveable:s,role:o,onPreview:n}){const{postId:i,currentPostLink:r,previewLink:a,isSaveable:l,isViewable:p}=(0,c.useSelect)((e=>{var t;const s=e(qi),o=e(d.store).getPostType(s.getCurrentPostType("type"));return{postId:s.getCurrentPostId(),currentPostLink:s.getCurrentPostAttribute("link"),previewLink:s.getEditedPostPreviewLink(),isSaveable:s.isEditedPostSaveable(),isViewable:null!==(t=o?.viewable)&&void 0!==t&&t}}),[]),{__unstableSaveForPreview:m}=(0,c.useDispatch)(qi);if(!p)return null;const g=`wp-preview-${i}`,_=a||r;return(0,P.jsx)(Do.Button,{variant:e?void 0:"tertiary",className:e||"editor-post-preview",href:_,target:g,accessibleWhenDisabled:!0,disabled:!l,onClick:async e=>{e.preventDefault();const t=window.open("",g);t.focus(),function(e){let t=(0,u.renderToString)((0,P.jsxs)("div",{className:"editor-post-preview-button__interstitial-message",children:[(0,P.jsxs)(Do.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 96 96",children:[(0,P.jsx)(Do.Path,{className:"outer",d:"M48 12c19.9 0 36 16.1 36 36S67.9 84 48 84 12 67.9 12 48s16.1-36 36-36",fill:"none"}),(0,P.jsx)(Do.Path,{className:"inner",d:"M69.5 46.4c0-3.9-1.4-6.7-2.6-8.8-1.6-2.6-3.1-4.9-3.1-7.5 0-2.9 2.2-5.7 5.4-5.7h.4C63.9 19.2 56.4 16 48 16c-11.2 0-21 5.7-26.7 14.4h2.1c3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3L40 67.5l7-20.9L42 33c-1.7-.1-3.3-.3-3.3-.3-1.7-.1-1.5-2.7.2-2.6 0 0 5.3.4 8.4.4 3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3l11.5 34.3 3.3-10.4c1.6-4.5 2.4-7.8 2.4-10.5zM16.1 48c0 12.6 7.3 23.5 18 28.7L18.8 35c-1.7 4-2.7 8.4-2.7 13zm32.5 2.8L39 78.6c2.9.8 5.9 1.3 9 1.3 3.7 0 7.3-.6 10.6-1.8-.1-.1-.2-.3-.2-.4l-9.8-26.9zM76.2 36c0 3.2-.6 6.9-2.4 11.4L64 75.6c9.5-5.5 15.9-15.8 15.9-27.6 0-5.5-1.4-10.8-3.9-15.3.1 1 .2 2.1.2 3.3z",fill:"none"})]}),(0,P.jsx)("p",{children:(0,gs.__)("Generating preview…")})]}));t+='\n\t\t<style>\n\t\t\tbody {\n\t\t\t\tmargin: 0;\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message {\n\t\t\t\tdisplay: flex;\n\t\t\t\tflex-direction: column;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: center;\n\t\t\t\theight: 100vh;\n\t\t\t\twidth: 100vw;\n\t\t\t}\n\t\t\t@-webkit-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@-moz-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@-o-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message svg {\n\t\t\t\twidth: 192px;\n\t\t\t\theight: 192px;\n\t\t\t\tstroke: #555d66;\n\t\t\t\tstroke-width: 0.75;\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message svg .outer,\n\t\t\t.editor-post-preview-button__interstitial-message svg .inner {\n\t\t\t\tstroke-dasharray: 280;\n\t\t\t\tstroke-dashoffset: 280;\n\t\t\t\t-webkit-animation: paint 1.5s ease infinite alternate;\n\t\t\t\t-moz-animation: paint 1.5s ease infinite alternate;\n\t\t\t\t-o-animation: paint 1.5s ease infinite alternate;\n\t\t\t\tanimation: paint 1.5s ease infinite alternate;\n\t\t\t}\n\t\t\tp {\n\t\t\t\ttext-align: center;\n\t\t\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;\n\t\t\t}\n\t\t</style>\n\t',t=(0,h.applyFilters)("editor.PostPreview.interstitialMarkup",t),e.write(t),e.title=(0,gs.__)("Generating preview…"),e.close()}(t.document);const o=await m({forceIsAutosaveable:s});t.location=o,n?.()},role:o,size:"compact",children:t||(0,P.jsxs)(P.Fragment,{children:[(0,gs._x)("Preview","imperative verb"),(0,P.jsx)(Do.VisuallyHidden,{as:"span",children:(0,gs.__)("(opens in a new tab)")})]})})}function od(){const e=(0,p.useViewportMatch)("medium","<"),{isPublished:t,isBeingScheduled:s,isSaving:o,isPublishing:n,hasPublishAction:i,isAutosaving:r,hasNonPostEntityChanges:a,postStatusHasChanged:l,postStatus:d}=(0,c.useSelect)((e=>{var t;const{isCurrentPostPublished:s,isEditedPostBeingScheduled:o,isSavingPost:n,isPublishingPost:i,getCurrentPost:r,getCurrentPostType:a,isAutosavingPost:l,getPostEdits:c,getEditedPostAttribute:d}=e(qi);return{isPublished:s(),isBeingScheduled:o(),isSaving:n(),isPublishing:i(),hasPublishAction:null!==(t=r()._links?.["wp:action-publish"])&&void 0!==t&&t,postType:a(),isAutosaving:l(),hasNonPostEntityChanges:e(qi).hasNonPostEntityChanges(),postStatusHasChanged:!!c()?.status,postStatus:d("status")}}),[]);return n?(0,gs.__)("Publishing…"):(t||s)&&o&&!r?(0,gs.__)("Saving…"):i?a||t||l&&!["future","publish"].includes(d)||!l&&"future"===d?(0,gs.__)("Save"):s?(0,gs.__)("Schedule"):(0,gs.__)("Publish"):e?(0,gs.__)("Publish"):(0,gs.__)("Submit for Review")}const nd=()=>{};class id extends u.Component{constructor(e){super(e),this.createOnClick=this.createOnClick.bind(this),this.closeEntitiesSavedStates=this.closeEntitiesSavedStates.bind(this),this.state={entitiesSavedStatesCallback:!1}}createOnClick(e){return(...t)=>{const{hasNonPostEntityChanges:s,setEntitiesSavedStatesCallback:o}=this.props;return s&&o?(this.setState({entitiesSavedStatesCallback:()=>e(...t)}),o((()=>this.closeEntitiesSavedStates)),nd):e(...t)}}closeEntitiesSavedStates(e){const{postType:t,postId:s}=this.props,{entitiesSavedStatesCallback:o}=this.state;this.setState({entitiesSavedStatesCallback:!1},(()=>{e&&e.some((e=>"postType"===e.kind&&e.name===t&&e.key===s))&&o()}))}render(){const{forceIsDirty:e,hasPublishAction:t,isBeingScheduled:s,isOpen:o,isPostSavingLocked:n,isPublishable:i,isPublished:r,isSaveable:a,isSaving:l,isAutoSaving:c,isToggle:d,savePostStatus:u,onSubmit:p=nd,onToggle:h,visibility:m,hasNonPostEntityChanges:g,isSavingNonPostEntityChanges:_,postStatus:f,postStatusHasChanged:b}=this.props,y=(l||!a||n||!i&&!e)&&(!g||_),x=(r||l||!a||!i&&!e)&&(!g||_);let v="publish";b?v=f:t?"private"===m?v="private":s&&(v="future"):v="pending";const w={"aria-disabled":y,className:"editor-post-publish-button",isBusy:!c&&l,variant:"primary",onClick:this.createOnClick((()=>{y||(p(),u(v))}))},S={"aria-disabled":x,"aria-expanded":o,className:"editor-post-publish-panel__toggle",isBusy:l&&r,variant:"primary",size:"compact",onClick:this.createOnClick((()=>{x||h()}))},k=d?S:w;return(0,P.jsx)(P.Fragment,{children:(0,P.jsx)(Do.Button,{...k,className:`${k.className} editor-post-publish-button__button`,size:"compact",children:(0,P.jsx)(od,{})})})}}const rd=(0,p.compose)([(0,c.withSelect)((e=>{var t;const{isSavingPost:s,isAutosavingPost:o,isEditedPostBeingScheduled:n,getEditedPostVisibility:i,isCurrentPostPublished:r,isEditedPostSaveable:a,isEditedPostPublishable:l,isPostSavingLocked:c,getCurrentPost:d,getCurrentPostType:u,getCurrentPostId:p,hasNonPostEntityChanges:h,isSavingNonPostEntityChanges:m,getEditedPostAttribute:g,getPostEdits:_}=e(qi);return{isSaving:s(),isAutoSaving:o(),isBeingScheduled:n(),visibility:i(),isSaveable:a(),isPostSavingLocked:c(),isPublishable:l(),isPublished:r(),hasPublishAction:null!==(t=d()._links?.["wp:action-publish"])&&void 0!==t&&t,postType:u(),postId:p(),postStatus:g("status"),postStatusHasChanged:_()?.status,hasNonPostEntityChanges:h(),isSavingNonPostEntityChanges:m()}})),(0,c.withDispatch)((e=>{const{editPost:t,savePost:s}=e(qi);return{savePostStatus:e=>{t({status:e},{undoIgnore:!0}),s()}}}))])(id),ad=(0,P.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24",children:(0,P.jsx)(k.Path,{d:"M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z"})}),ld={public:{label:(0,gs.__)("Public"),info:(0,gs.__)("Visible to everyone.")},private:{label:(0,gs.__)("Private"),info:(0,gs.__)("Only visible to site admins and editors.")},password:{label:(0,gs.__)("Password protected"),info:(0,gs.__)("Only those with the password can view this post.")}};function cd({onClose:e}){const t=(0,p.useInstanceId)(cd),{status:s,visibility:o,password:n}=(0,c.useSelect)((e=>({status:e(qi).getEditedPostAttribute("status"),visibility:e(qi).getEditedPostVisibility(),password:e(qi).getEditedPostAttribute("password")}))),{editPost:i,savePost:r}=(0,c.useDispatch)(qi),[a,l]=(0,u.useState)(!!n),[d,h]=(0,u.useState)(!1);return(0,P.jsxs)("div",{className:"editor-post-visibility",children:[(0,P.jsx)(m.__experimentalInspectorPopoverHeader,{title:(0,gs.__)("Visibility"),help:(0,gs.__)("Control how this post is viewed."),onClose:e}),(0,P.jsxs)("fieldset",{className:"editor-post-visibility__fieldset",children:[(0,P.jsx)(Do.VisuallyHidden,{as:"legend",children:(0,gs.__)("Visibility")}),(0,P.jsx)(dd,{instanceId:t,value:"public",label:ld.public.label,info:ld.public.info,checked:"public"===o&&!a,onChange:()=>{i({status:"private"===o?"draft":s,password:""}),l(!1)}}),(0,P.jsx)(dd,{instanceId:t,value:"private",label:ld.private.label,info:ld.private.info,checked:"private"===o,onChange:()=>{h(!0)}}),(0,P.jsx)(dd,{instanceId:t,value:"password",label:ld.password.label,info:ld.password.info,checked:a,onChange:()=>{i({status:"private"===o?"draft":s,password:n||""}),l(!0)}}),a&&(0,P.jsxs)("div",{className:"editor-post-visibility__password",children:[(0,P.jsx)(Do.VisuallyHidden,{as:"label",htmlFor:`editor-post-visibility__password-input-${t}`,children:(0,gs.__)("Create password")}),(0,P.jsx)("input",{className:"editor-post-visibility__password-input",id:`editor-post-visibility__password-input-${t}`,type:"text",onChange:e=>{i({password:e.target.value})},value:n,placeholder:(0,gs.__)("Use a secure password")})]})]}),(0,P.jsx)(Do.__experimentalConfirmDialog,{isOpen:d,onConfirm:()=>{i({status:"private",password:""}),l(!1),h(!1),r()},onCancel:()=>{h(!1)},confirmButtonText:(0,gs.__)("Publish"),size:"medium",children:(0,gs.__)("Would you like to privately publish this post now?")})]})}function dd({instanceId:e,value:t,label:s,info:o,...n}){return(0,P.jsxs)("div",{className:"editor-post-visibility__choice",children:[(0,P.jsx)("input",{type:"radio",name:`editor-post-visibility__setting-${e}`,value:t,id:`editor-post-${t}-${e}`,"aria-describedby":`editor-post-${t}-${e}-description`,className:"editor-post-visibility__radio",...n}),(0,P.jsx)("label",{htmlFor:`editor-post-${t}-${e}`,className:"editor-post-visibility__label",children:s}),(0,P.jsx)("p",{id:`editor-post-${t}-${e}-description`,className:"editor-post-visibility__info",children:o})]})}function ud(){return pd()}function pd(){const e=(0,c.useSelect)((e=>e(qi).getEditedPostVisibility()));return ld[e]?.label}function hd(e){const t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):"number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?new Date(e):new Date(NaN)}function md(e){const t=hd(e);return t.setDate(1),t.setHours(0,0,0,0),t}function gd(e){const t=hd(e),s=t.getMonth();return t.setFullYear(t.getFullYear(),s+1,0),t.setHours(23,59,59,999),t}Math.pow(10,8);const _d=6e4,fd=36e5;function bd(e,t){const s=t?.additionalDigits??2,o=function(e){const t={},s=e.split(yd.dateTimeDelimiter);let o;if(s.length>2)return t;/:/.test(s[0])?o=s[0]:(t.date=s[0],o=s[1],yd.timeZoneDelimiter.test(t.date)&&(t.date=e.split(yd.timeZoneDelimiter)[0],o=e.substr(t.date.length,e.length)));if(o){const e=yd.timezone.exec(o);e?(t.time=o.replace(e[1],""),t.timezone=e[1]):t.time=o}return t}(e);let n;if(o.date){const e=function(e,t){const s=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),o=e.match(s);if(!o)return{year:NaN,restDateString:""};const n=o[1]?parseInt(o[1]):null,i=o[2]?parseInt(o[2]):null;return{year:null===i?n:100*i,restDateString:e.slice((o[1]||o[2]).length)}}(o.date,s);n=function(e,t){if(null===t)return new Date(NaN);const s=e.match(xd);if(!s)return new Date(NaN);const o=!!s[4],n=Sd(s[1]),i=Sd(s[2])-1,r=Sd(s[3]),a=Sd(s[4]),l=Sd(s[5])-1;if(o)return function(e,t,s){return t>=1&&t<=53&&s>=0&&s<=6}(0,a,l)?function(e,t,s){const o=new Date(0);o.setUTCFullYear(e,0,4);const n=o.getUTCDay()||7,i=7*(t-1)+s+1-n;return o.setUTCDate(o.getUTCDate()+i),o}(t,a,l):new Date(NaN);{const e=new Date(0);return function(e,t,s){return t>=0&&t<=11&&s>=1&&s<=(Pd[t]||(Cd(e)?29:28))}(t,i,r)&&function(e,t){return t>=1&&t<=(Cd(e)?366:365)}(t,n)?(e.setUTCFullYear(t,i,Math.max(n,r)),e):new Date(NaN)}}(e.restDateString,e.year)}if(!n||isNaN(n.getTime()))return new Date(NaN);const i=n.getTime();let r,a=0;if(o.time&&(a=function(e){const t=e.match(vd);if(!t)return NaN;const s=kd(t[1]),o=kd(t[2]),n=kd(t[3]);if(!function(e,t,s){if(24===e)return 0===t&&0===s;return s>=0&&s<60&&t>=0&&t<60&&e>=0&&e<25}(s,o,n))return NaN;return s*fd+o*_d+1e3*n}(o.time),isNaN(a)))return new Date(NaN);if(!o.timezone){const e=new Date(i+a),t=new Date(0);return t.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),t.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),t}return r=function(e){if("Z"===e)return 0;const t=e.match(wd);if(!t)return 0;const s="+"===t[1]?-1:1,o=parseInt(t[2]),n=t[3]&&parseInt(t[3])||0;if(!function(e,t){return t>=0&&t<=59}(0,n))return NaN;return s*(o*fd+n*_d)}(o.timezone),isNaN(r)?new Date(NaN):new Date(i+a+r)}const yd={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},xd=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,vd=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,wd=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Sd(e){return e?parseInt(e):1}function kd(e){return e&&parseFloat(e.replace(",","."))||0}const Pd=[31,null,31,30,31,30,31,31,30,31,30,31];function Cd(e){return e%400==0||e%4==0&&e%100!=0}const{PrivatePublishDateTimePicker:jd}=sn(m.privateApis);function Ed(e){return(0,P.jsx)(Td,{...e,showPopoverHeaderActions:!0,isCompact:!1})}function Td({onClose:e,showPopoverHeaderActions:t,isCompact:s}){const{postDate:o,postType:n}=(0,c.useSelect)((e=>({postDate:e(qi).getEditedPostAttribute("date"),postType:e(qi).getCurrentPostType()})),[]),{editPost:i}=(0,c.useDispatch)(qi),[r,a]=(0,u.useState)(md(new Date(o))),l=(0,c.useSelect)((e=>e(d.store).getEntityRecords("postType",n,{status:"publish,future",after:md(r).toISOString(),before:gd(r).toISOString(),exclude:[e(qi).getCurrentPostId()],per_page:100,_fields:"id,date"})),[r,n]),p=(0,u.useMemo)((()=>(l||[]).map((({date:e})=>({date:new Date(e)})))),[l]),h=(0,x.getSettings)(),m=/a(?!\\)/i.test(h.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,P.jsx)(jd,{currentDate:o,onChange:e=>i({date:e}),is12Hour:m,dateOrder:(0,gs._x)("dmy","date order"),events:p,onMonthPreviewed:e=>a(bd(e)),onClose:e,isCompact:s,showPopoverHeaderActions:t})}function Bd(e){return Id(e)}function Id({full:e=!1}={}){const{date:t,isFloating:s}=(0,c.useSelect)((e=>({date:e(qi).getEditedPostAttribute("date"),isFloating:e(qi).isEditedPostDateFloating()})),[]);return e?Nd(t):function(e,{isFloating:t=!1,now:s=new Date}={}){if(!e||t)return(0,gs.__)("Immediately");if(!function(e){const{timezone:t}=(0,x.getSettings)(),s=Number(t.offset),o=e.getTimezoneOffset()/60*-1;return s===o}(s))return Nd(e);const o=(0,x.getDate)(e);if(Ad(o,s))return(0,gs.sprintf)((0,gs.__)("Today at %s"),(0,x.dateI18n)((0,gs._x)("g:i a","post schedule time format"),o));const n=new Date(s);if(n.setDate(n.getDate()+1),Ad(o,n))return(0,gs.sprintf)((0,gs.__)("Tomorrow at %s"),(0,x.dateI18n)((0,gs._x)("g:i a","post schedule time format"),o));if(o.getFullYear()===s.getFullYear())return(0,x.dateI18n)((0,gs._x)("F j g:i a","post schedule date format without year"),o);return(0,x.dateI18n)((0,gs._x)("F j, Y g:i a","post schedule full date format"),o)}(t,{isFloating:s})}function Nd(e){const t=(0,x.getDate)(e),s=function(){const{timezone:e}=(0,x.getSettings)();if(e.abbr&&isNaN(Number(e.abbr)))return e.abbr;const t=e.offset<0?"":"+";return`UTC${t}${e.offsetFormatted}`}(),o=(0,x.dateI18n)((0,gs._x)("F j, Y g:i a","post schedule full date format"),t);return(0,gs.isRTL)()?`${s} ${o}`:`${o} ${s}`}function Ad(e,t){return e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}const Dd=3,Rd={per_page:10,orderby:"count",order:"desc",hide_empty:!0,_fields:"id,name,count",context:"view"};function Md({onSelect:e,taxonomy:t}){const{_terms:s,showTerms:o}=(0,c.useSelect)((e=>{const s=e(d.store).getEntityRecords("taxonomy",t.slug,Rd);return{_terms:s,showTerms:s?.length>=Dd}}),[t.slug]);if(!o)return null;const n=il(s);return(0,P.jsxs)("div",{className:"editor-post-taxonomies__flat-term-most-used",children:[(0,P.jsx)(Do.BaseControl.VisualLabel,{as:"h3",className:"editor-post-taxonomies__flat-term-most-used-label",children:t.labels.most_used}),(0,P.jsx)("ul",{role:"list",className:"editor-post-taxonomies__flat-term-most-used-list",children:n.map((t=>(0,P.jsx)("li",{children:(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>e(t),children:t.name})},t.id)))})]})}const Od=[],Ld=100,Fd={per_page:Ld,_fields:"id,name",context:"view"},Vd=(e,t)=>ol(e).toLowerCase()===ol(t).toLowerCase(),zd=(e,t)=>e.map((e=>t.find((t=>Vd(t.name,e)))?.id)).filter((e=>void 0!==e)),Ud=({children:e,__nextHasNoMarginBottom:t})=>t?(0,P.jsx)(Do.__experimentalVStack,{spacing:4,children:e}):(0,P.jsx)(u.Fragment,{children:e});function Hd({slug:e,__nextHasNoMarginBottom:t}){var s,o;const[n,i]=(0,u.useState)([]),[r,a]=(0,u.useState)(""),l=(0,p.useDebounce)(a,500);t||S()("Bottom margin styles for wp.editor.PostTaxonomiesFlatTermSelector",{since:"6.7",version:"7.0",hint:"Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version."});const{terms:h,termIds:m,taxonomy:g,hasAssignAction:_,hasCreateAction:f,hasResolvedTerms:b}=(0,c.useSelect)((t=>{var s,o;const{getCurrentPost:n,getEditedPostAttribute:i}=t(qi),{getEntityRecords:r,getTaxonomy:a,hasFinishedResolution:l}=t(d.store),c=n(),u=a(e),p=u?i(u.rest_base):Od,h={...Fd,include:p?.join(","),per_page:-1};return{hasCreateAction:!!u&&(null!==(s=c._links?.["wp:action-create-"+u.rest_base])&&void 0!==s&&s),hasAssignAction:!!u&&(null!==(o=c._links?.["wp:action-assign-"+u.rest_base])&&void 0!==o&&o),taxonomy:u,termIds:p,terms:p?.length?r("taxonomy",e,h):Od,hasResolvedTerms:l("getEntityRecords",["taxonomy",e,h])}}),[e]),{searchResults:y}=(0,c.useSelect)((t=>{const{getEntityRecords:s}=t(d.store);return{searchResults:r?s("taxonomy",e,{...Fd,search:r}):Od}}),[r,e]);(0,u.useEffect)((()=>{if(b){const e=(null!=h?h:[]).map((e=>ol(e.name)));i(e)}}),[h,b]);const x=(0,u.useMemo)((()=>(null!=y?y:[]).map((e=>ol(e.name)))),[y]),{editPost:v}=(0,c.useDispatch)(qi),{saveEntityRecord:w}=(0,c.useDispatch)(d.store),{createErrorNotice:k}=(0,c.useDispatch)(ms.store);if(!_)return null;function C(e){v({[g.rest_base]:e})}const j=null!==(s=g?.labels?.add_new_item)&&void 0!==s?s:"post_tag"===e?(0,gs.__)("Add new tag"):(0,gs.__)("Add new Term"),E=null!==(o=g?.labels?.singular_name)&&void 0!==o?o:"post_tag"===e?(0,gs.__)("Tag"):(0,gs.__)("Term"),T=(0,gs.sprintf)((0,gs._x)("%s added","term"),E),B=(0,gs.sprintf)((0,gs._x)("%s removed","term"),E),I=(0,gs.sprintf)((0,gs._x)("Remove %s","term"),E);return(0,P.jsxs)(Ud,{__nextHasNoMarginBottom:t,children:[(0,P.jsx)(Do.FormTokenField,{__next40pxDefaultSize:!0,value:n,suggestions:x,onChange:function(t){const s=[...null!=h?h:[],...null!=y?y:[]],o=t.reduce(((e,t)=>(e.some((e=>e.toLowerCase()===t.toLowerCase()))||e.push(t),e)),[]),n=o.filter((e=>!s.find((t=>Vd(t.name,e)))));i(o),0!==n.length?f&&Promise.all(n.map((t=>async function(t){try{const s=await w("taxonomy",e,t,{throwOnError:!0});return nl(s)}catch(e){if("term_exists"!==e.code)throw e;return{id:e.data.term_id,name:t.name}}}({name:t})))).then((e=>{const t=s.concat(e);C(zd(o,t))})).catch((e=>{k(e.message,{type:"snackbar"}),C(zd(o,s))})):C(zd(o,s))},onInputChange:l,maxSuggestions:Ld,label:j,messages:{added:T,removed:B,remove:I},__nextHasNoMarginBottom:t}),(0,P.jsx)(Md,{taxonomy:g,onSelect:function(t){var s;if(m.includes(t.id))return;const o=[...m,t.id],n="post_tag"===e?(0,gs.__)("Tag"):(0,gs.__)("Term"),i=(0,gs.sprintf)((0,gs._x)("%s added","term"),null!==(s=g?.labels?.singular_name)&&void 0!==s?s:n);(0,us.speak)(i,"assertive"),C(o)}})]})}const Gd=(0,Do.withFilters)("editor.PostTaxonomyType")(Hd),$d=()=>{const e=[(0,gs.__)("Suggestion:"),(0,P.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,gs.__)("Add tags")},"label")];return(0,P.jsxs)(Do.PanelBody,{initialOpen:!1,title:e,children:[(0,P.jsx)("p",{children:(0,gs.__)("Tags help users and search engines navigate your site and find your content. Add a few keywords to describe your post.")}),(0,P.jsx)(Gd,{slug:"post_tag",__nextHasNoMarginBottom:!0})]})},Wd=()=>{const{hasTags:e,isPostTypeSupported:t}=(0,c.useSelect)((e=>{const t=e(qi).getCurrentPostType(),s=e(d.store).getTaxonomy("post_tag"),o=s?.types?.includes(t),n=void 0!==s,i=s&&e(qi).getEditedPostAttribute(s.rest_base);return{hasTags:!!i?.length,isPostTypeSupported:n&&o}}),[]),[s]=(0,u.useState)(e);return t?s?null:(0,P.jsx)($d,{}):null},Zd=(e,t)=>Wc.filter((t=>e?.includes(t.id))).find((e=>e.id===t)),Yd=({suggestedPostFormat:e,suggestionText:t,onUpdatePostFormat:s})=>(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>s(e),children:t});function Kd(){const{currentPostFormat:e,suggestion:t}=(0,c.useSelect)((e=>{var t;const{getEditedPostAttribute:s,getSuggestedPostFormat:o}=e(qi),n=null!==(t=e(d.store).getThemeSupports().formats)&&void 0!==t?t:[];return{currentPostFormat:s("format"),suggestion:Zd(n,o())}}),[]),{editPost:s}=(0,c.useDispatch)(qi),o=[(0,gs.__)("Suggestion:"),(0,P.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,gs.__)("Use a post format")},"label")];return t&&t.id!==e?(0,P.jsxs)(Do.PanelBody,{initialOpen:!1,title:o,children:[(0,P.jsx)("p",{children:(0,gs.__)("Your theme uses post formats to highlight different kinds of content, like images or videos. Apply a post format to see this special styling.")}),(0,P.jsx)("p",{children:(0,P.jsx)(Yd,{onUpdatePostFormat:e=>s({format:e}),suggestedPostFormat:t.id,suggestionText:(0,gs.sprintf)((0,gs.__)('Apply the "%1$s" format.'),t.caption)})})]}):null}const qd={per_page:-1,orderby:"name",order:"asc",_fields:"id,name,parent",context:"view"},Qd=8,Xd=[];function Jd({slug:e}){var t,s;const[o,n]=(0,u.useState)(!1),[i,r]=(0,u.useState)(""),[a,l]=(0,u.useState)(""),[h,m]=(0,u.useState)(!1),[g,_]=(0,u.useState)(""),[f,b]=(0,u.useState)([]),y=(0,p.useDebounce)(us.speak,500),{hasCreateAction:x,hasAssignAction:v,terms:w,loading:S,availableTerms:k,taxonomy:C}=(0,c.useSelect)((t=>{var s,o;const{getCurrentPost:n,getEditedPostAttribute:i}=t(qi),{getTaxonomy:r,getEntityRecords:a,isResolving:l}=t(d.store),c=r(e),u=n();return{hasCreateAction:!!c&&(null!==(s=u._links?.["wp:action-create-"+c.rest_base])&&void 0!==s&&s),hasAssignAction:!!c&&(null!==(o=u._links?.["wp:action-assign-"+c.rest_base])&&void 0!==o&&o),terms:c?i(c.rest_base):Xd,loading:l("getEntityRecords",["taxonomy",e,qd]),availableTerms:a("taxonomy",e,qd)||Xd,taxonomy:c}}),[e]),{editPost:j}=(0,c.useDispatch)(qi),{saveEntityRecord:E}=(0,c.useDispatch)(d.store),T=(0,u.useMemo)((()=>function(e,t){const s=e=>-1!==t.indexOf(e.id)||void 0!==e.children&&e.children.map(s).filter((e=>e)).length>0,o=[...e];return o.sort(((e,t)=>{const o=s(e),n=s(t);return o===n?0:o&&!n?-1:!o&&n?1:0})),o}(sl(k),w)),[k]),{createErrorNotice:B}=(0,c.useDispatch)(ms.store);if(!v)return null;const I=e=>{j({[C.rest_base]:e})},N=e=>e.map((e=>(0,P.jsxs)("div",{className:"editor-post-taxonomies__hierarchical-terms-choice",children:[(0,P.jsx)(Do.CheckboxControl,{__nextHasNoMarginBottom:!0,checked:-1!==w.indexOf(e.id),onChange:()=>{(e=>{const t=w.includes(e)?w.filter((t=>t!==e)):[...w,e];I(t)})(parseInt(e.id,10))},label:(0,Ao.decodeEntities)(e.name)}),!!e.children.length&&(0,P.jsx)("div",{className:"editor-post-taxonomies__hierarchical-terms-subchoices",children:N(e.children)})]},e.id))),A=(t,s,o)=>{var n;return null!==(n=C?.labels?.[t])&&void 0!==n?n:"category"===e?s:o},D=A("add_new_item",(0,gs.__)("Add new category"),(0,gs.__)("Add new term")),R=A("new_item_name",(0,gs.__)("Add new category"),(0,gs.__)("Add new term")),M=A("parent_item",(0,gs.__)("Parent Category"),(0,gs.__)("Parent Term")),O=`— ${M} —`,L=D,F=null!==(t=C?.labels?.search_items)&&void 0!==t?t:(0,gs.__)("Search Terms"),V=null!==(s=C?.name)&&void 0!==s?s:(0,gs.__)("Terms"),z=k.length>=Qd;return(0,P.jsxs)(Do.Flex,{direction:"column",gap:"4",children:[z&&(0,P.jsx)(Do.SearchControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:F,value:g,onChange:e=>{const t=T.map(function(e){const t=s=>{if(""===e)return s;const o={...s};return o.children.length>0&&(o.children=o.children.map(t).filter((e=>e))),(-1!==o.name.toLowerCase().indexOf(e.toLowerCase())||o.children.length>0)&&o};return t}(e)).filter((e=>e)),s=e=>{let t=0;for(let o=0;o<e.length;o++)t++,void 0!==e[o].children&&(t+=s(e[o].children));return t};_(e),b(t);const o=s(t),n=(0,gs.sprintf)((0,gs._n)("%d result found.","%d results found.",o),o);y(n,"assertive")}}),(0,P.jsx)("div",{className:"editor-post-taxonomies__hierarchical-terms-list",tabIndex:"0",role:"group","aria-label":V,children:N(""!==g?f:T)}),!S&&x&&(0,P.jsx)(Do.FlexItem,{children:(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,onClick:()=>{m(!h)},className:"editor-post-taxonomies__hierarchical-terms-add","aria-expanded":h,variant:"link",children:D})}),h&&(0,P.jsx)("form",{onSubmit:async t=>{var s;if(t.preventDefault(),""===i||o)return;const c=function(e,t,s){return e.find((e=>(!e.parent&&!t||parseInt(e.parent)===parseInt(t))&&e.name.toLowerCase()===s.toLowerCase()))}(k,a,i);if(c)return w.some((e=>e===c.id))||I([...w,c.id]),r(""),void l("");let d;n(!0);try{d=await(u={name:i,parent:a||void 0},E("taxonomy",e,u,{throwOnError:!0}))}catch(e){return void B(e.message,{type:"snackbar"})}var u;const p="category"===e?(0,gs.__)("Category"):(0,gs.__)("Term"),h=(0,gs.sprintf)((0,gs._x)("%s added","term"),null!==(s=C?.labels?.singular_name)&&void 0!==s?s:p);(0,us.speak)(h,"assertive"),n(!1),r(""),l(""),I([...w,d.id])},children:(0,P.jsxs)(Do.Flex,{direction:"column",gap:"4",children:[(0,P.jsx)(Do.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,className:"editor-post-taxonomies__hierarchical-terms-input",label:R,value:i,onChange:e=>{r(e)},required:!0}),!!k.length&&(0,P.jsx)(Do.TreeSelect,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:M,noOptionLabel:O,onChange:e=>{l(e)},selectedId:a,tree:T}),(0,P.jsx)(Do.FlexItem,{children:(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,variant:"secondary",type:"submit",className:"editor-post-taxonomies__hierarchical-terms-submit",children:L})})]})})]})}const eu=(0,Do.withFilters)("editor.PostTaxonomyType")(Jd);const tu=function(){const e=(0,c.useSelect)((e=>{const t=e(qi).getCurrentPostType(),{canUser:s,getEntityRecord:o,getTaxonomy:n}=e(d.store),i=n("category"),r=s("read",{kind:"root",name:"site"})?o("root","site")?.default_category:void 0,a=r?o("taxonomy","category",r):void 0,l=i&&i.types.some((e=>e===t)),c=i&&e(qi).getEditedPostAttribute(i.rest_base);return!!i&&!!a&&l&&(0===c?.length||1===c?.length&&a?.id===c[0])}),[]),[t,s]=(0,u.useState)(!1);if((0,u.useEffect)((()=>{e&&s(!0)}),[e]),!t)return null;const o=[(0,gs.__)("Suggestion:"),(0,P.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,gs.__)("Assign a category")},"label")];return(0,P.jsxs)(Do.PanelBody,{initialOpen:!1,title:o,children:[(0,P.jsx)("p",{children:(0,gs.__)("Categories provide a helpful way to group related posts together and to quickly tell readers what a post is about.")}),(0,P.jsx)(eu,{slug:"category"})]})},su={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let ou;const nu=new Uint8Array(16);function iu(){if(!ou&&(ou="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ou))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ou(nu)}const ru=[];for(let e=0;e<256;++e)ru.push((e+256).toString(16).slice(1));function au(e,t=0){return ru[e[t+0]]+ru[e[t+1]]+ru[e[t+2]]+ru[e[t+3]]+"-"+ru[e[t+4]]+ru[e[t+5]]+"-"+ru[e[t+6]]+ru[e[t+7]]+"-"+ru[e[t+8]]+ru[e[t+9]]+"-"+ru[e[t+10]]+ru[e[t+11]]+ru[e[t+12]]+ru[e[t+13]]+ru[e[t+14]]+ru[e[t+15]]}const lu=function(e,t,s){if(su.randomUUID&&!t&&!e)return su.randomUUID();const o=(e=e||{}).random||(e.rng||iu)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){s=s||0;for(let e=0;e<16;++e)t[s+e]=o[e];return t}return au(o)};function cu(e){return Object.fromEntries(Object.entries(function(e){const t=new Set;return Object.fromEntries(e.map((e=>{const s=(0,v.getFilename)(e);let o="";if(s){const e=s.split(".");e.length>1&&e.pop(),o=e.join(".")}return o||(o=lu()),t.has(o)&&(o=`${o}-${lu()}`),t.add(o),[e,o]})))}(e)).map((([e,t])=>{const s=window.fetch(e.includes("?")?e:e+"?").then((e=>e.blob())).then((e=>new File([e],`${t}.png`,{type:e.type})));return[e,s]})))}function du(e){const t=[];return e.forEach((e=>{t.push(e),t.push(...du(e.innerBlocks))})),t}function uu(e){if("core/image"===e.name||"core/cover"===e.name){const{url:t,alt:s,id:o}=e.attributes;return{url:t,alt:s,id:o}}if("core/media-text"===e.name){const{mediaUrl:t,mediaAlt:s,mediaId:o}=e.attributes;return{url:t,alt:s,id:o}}return{}}function pu({clientId:e,alt:t,url:s}){const{selectBlock:o}=(0,c.useDispatch)(m.store);return(0,P.jsx)(Do.__unstableMotion.img,{tabIndex:0,role:"button","aria-label":(0,gs.__)("Select image block."),onClick:()=>{o(e)},onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||(o(e),t.preventDefault())},alt:t,src:s,animate:{opacity:1},exit:{opacity:0,scale:0},style:{width:"32px",height:"32px",objectFit:"cover",borderRadius:"2px",cursor:"pointer"},whileHover:{scale:1.08}},e)}function hu(){const[e,t]=(0,u.useState)(!1),[s,o]=(0,u.useState)(!1),[n,i]=(0,u.useState)(!1),{editorBlocks:r,mediaUpload:a}=(0,c.useSelect)((e=>({editorBlocks:e(m.store).getBlocks(),mediaUpload:e(m.store).getSettings().mediaUpload})),[]),l=du(r).filter((e=>function(e){return"core/image"===e.name||"core/cover"===e.name?e.attributes.url&&!e.attributes.id:"core/media-text"===e.name?e.attributes.mediaUrl&&!e.attributes.mediaId:void 0}(e))),{updateBlockAttributes:d}=(0,c.useDispatch)(m.store);if(!a||!l.length)return null;const p=[(0,gs.__)("Suggestion:"),(0,P.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,gs.__)("External media")},"label")];return(0,P.jsxs)(Do.PanelBody,{initialOpen:!0,title:p,children:[(0,P.jsx)("p",{children:(0,gs.__)("Upload external images to the Media Library. Images from different domains may load slowly, display incorrectly, or be removed unexpectedly.")}),(0,P.jsxs)("div",{style:{display:"inline-flex",flexWrap:"wrap",gap:"8px"},children:[(0,P.jsx)(Do.__unstableAnimatePresence,{onExitComplete:()=>o(!1),children:l.map((e=>{const{url:t,alt:s}=uu(e);return(0,P.jsx)(pu,{clientId:e.clientId,url:t,alt:s},e.clientId)}))}),e||s?(0,P.jsx)(Do.Spinner,{}):(0,P.jsx)(Do.Button,{size:"compact",variant:"primary",onClick:function(){t(!0),i(!1);const e=new Set(l.map((e=>{const{url:t}=uu(e);return t}))),s=Object.fromEntries(Object.entries(cu([...e])).map((([e,t])=>[e,t.then((e=>new Promise(((t,s)=>{a({filesList:[e],onFileChange:([e])=>{(0,ci.isBlobURL)(e.url)||t(e)},onError(){s()}})}))))])));Promise.allSettled(l.map((e=>{const{url:t}=uu(e);return s[t].then((t=>function(e,t){"core/image"!==e.name&&"core/cover"!==e.name||d(e.clientId,{id:t.id,url:t.url}),"core/media-text"===e.name&&d(e.clientId,{mediaId:t.id,mediaUrl:t.url})}(e,t))).then((()=>o(!0))).catch((()=>i(!0)))}))).finally((()=>{t(!1)}))},children:(0,gs.__)("Upload")})]}),n&&(0,P.jsx)("p",{children:(0,gs.__)("Upload failed, try again.")})]})}const mu=function({children:e}){const{isBeingScheduled:t,isRequestingSiteIcon:s,hasPublishAction:o,siteIconUrl:n,siteTitle:i,siteHome:r}=(0,c.useSelect)((e=>{var t;const{getCurrentPost:s,isEditedPostBeingScheduled:o}=e(qi),{getEntityRecord:n,isResolving:i}=e(d.store),r=n("root","__unstableBase",void 0)||{};return{hasPublishAction:null!==(t=s()._links?.["wp:action-publish"])&&void 0!==t&&t,isBeingScheduled:o(),isRequestingSiteIcon:i("getEntityRecord",["root","__unstableBase",void 0]),siteIconUrl:r.site_icon_url,siteTitle:r.name,siteHome:r.home&&(0,v.filterURLForDisplay)(r.home)}}),[]);let a,l,u=(0,P.jsx)(Do.Icon,{className:"components-site-icon",size:"36px",icon:ad});return n&&(u=(0,P.jsx)("img",{alt:(0,gs.__)("Site Icon"),className:"components-site-icon",src:n})),s&&(u=null),o?t?(a=(0,gs.__)("Are you ready to schedule?"),l=(0,gs.__)("Your work will be published at the specified date and time.")):(a=(0,gs.__)("Are you ready to publish?"),l=(0,gs.__)("Double-check your settings before publishing.")):(a=(0,gs.__)("Are you ready to submit for review?"),l=(0,gs.__)("When you’re ready, submit your work for review, and an Editor will be able to approve it for you.")),(0,P.jsxs)("div",{className:"editor-post-publish-panel__prepublish",children:[(0,P.jsx)("div",{children:(0,P.jsx)("strong",{children:a})}),(0,P.jsx)("p",{children:l}),(0,P.jsxs)("div",{className:"components-site-card",children:[u,(0,P.jsxs)("div",{className:"components-site-info",children:[(0,P.jsx)("span",{className:"components-site-name",children:(0,Ao.decodeEntities)(i)||(0,gs.__)("(Untitled)")}),(0,P.jsx)("span",{className:"components-site-home",children:r})]})]}),(0,P.jsx)(hu,{}),o&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(Do.PanelBody,{initialOpen:!1,title:[(0,gs.__)("Visibility:"),(0,P.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,P.jsx)(ud,{})},"label")],children:(0,P.jsx)(cd,{})}),(0,P.jsx)(Do.PanelBody,{initialOpen:!1,title:[(0,gs.__)("Publish:"),(0,P.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,P.jsx)(Bd,{})},"label")],children:(0,P.jsx)(Ed,{})})]}),(0,P.jsx)(Kd,{}),(0,P.jsx)(Wd,{}),(0,P.jsx)(tu,{}),e]})},gu="%postname%",_u="%pagename%";function fu({text:e,onCopy:t,children:s}){const o=(0,p.useCopyToClipboard)(e,t);return(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,variant:"secondary",ref:o,children:s})}class bu extends u.Component{constructor(){super(...arguments),this.state={showCopyConfirmation:!1},this.onCopy=this.onCopy.bind(this),this.onSelectInput=this.onSelectInput.bind(this),this.postLink=(0,u.createRef)()}componentDidMount(){this.props.focusOnMount&&this.postLink.current.focus()}componentWillUnmount(){clearTimeout(this.dismissCopyConfirmation)}onCopy(){this.setState({showCopyConfirmation:!0}),clearTimeout(this.dismissCopyConfirmation),this.dismissCopyConfirmation=setTimeout((()=>{this.setState({showCopyConfirmation:!1})}),4e3)}onSelectInput(e){e.target.select()}render(){const{children:e,isScheduled:t,post:s,postType:o}=this.props,n=o?.labels?.singular_name,i=o?.labels?.view_item,r=o?.labels?.add_new_item,a="future"===s.status?(e=>{const{slug:t}=e;return e.permalink_template.includes(gu)?e.permalink_template.replace(gu,t):e.permalink_template.includes(_u)?e.permalink_template.replace(_u,t):e.permalink_template})(s):s.link,l=(0,v.addQueryArgs)("post-new.php",{post_type:s.type}),c=t?(0,P.jsxs)(P.Fragment,{children:[(0,gs.__)("is now scheduled. It will go live on")," ",(0,P.jsx)(Bd,{}),"."]}):(0,gs.__)("is now live.");return(0,P.jsxs)("div",{className:"post-publish-panel__postpublish",children:[(0,P.jsxs)(Do.PanelBody,{className:"post-publish-panel__postpublish-header",children:[(0,P.jsx)("a",{ref:this.postLink,href:a,children:(0,Ao.decodeEntities)(s.title)||(0,gs.__)("(no title)")})," ",c]}),(0,P.jsxs)(Do.PanelBody,{children:[(0,P.jsx)("p",{className:"post-publish-panel__postpublish-subheader",children:(0,P.jsx)("strong",{children:(0,gs.__)("What’s next?")})}),(0,P.jsxs)("div",{className:"post-publish-panel__postpublish-post-address-container",children:[(0,P.jsx)(Do.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,className:"post-publish-panel__postpublish-post-address",readOnly:!0,label:(0,gs.sprintf)((0,gs.__)("%s address"),n),value:(0,v.safeDecodeURIComponent)(a),onFocus:this.onSelectInput}),(0,P.jsx)("div",{className:"post-publish-panel__postpublish-post-address__copy-button-wrap",children:(0,P.jsx)(fu,{text:a,onCopy:this.onCopy,children:this.state.showCopyConfirmation?(0,gs.__)("Copied!"):(0,gs.__)("Copy")})})]}),(0,P.jsxs)("div",{className:"post-publish-panel__postpublish-buttons",children:[!t&&(0,P.jsx)(Do.Button,{variant:"primary",href:a,__next40pxDefaultSize:!0,children:i}),(0,P.jsx)(Do.Button,{variant:t?"primary":"secondary",__next40pxDefaultSize:!0,href:l,children:r})]})]}),e]})}}const yu=(0,c.withSelect)((e=>{const{getEditedPostAttribute:t,getCurrentPost:s,isCurrentPostScheduled:o}=e(qi),{getPostType:n}=e(d.store);return{post:s(),postType:n(t("type")),isScheduled:o()}}))(bu);class xu extends u.Component{constructor(){super(...arguments),this.onSubmit=this.onSubmit.bind(this),this.cancelButtonNode=(0,u.createRef)()}componentDidMount(){this.timeoutID=setTimeout((()=>{this.cancelButtonNode.current.focus()}),0)}componentWillUnmount(){clearTimeout(this.timeoutID)}componentDidUpdate(e){e.isPublished&&!this.props.isSaving&&this.props.isDirty&&this.props.onClose()}onSubmit(){const{onClose:e,hasPublishAction:t,isPostTypeViewable:s}=this.props;t&&s||e()}render(){const{forceIsDirty:e,isBeingScheduled:t,isPublished:s,isPublishSidebarEnabled:o,isScheduled:n,isSaving:i,isSavingNonPostEntityChanges:r,onClose:a,onTogglePublishSidebar:l,PostPublishExtension:c,PrePublishExtension:d,...u}=this.props,{hasPublishAction:p,isDirty:h,isPostTypeViewable:m,...g}=u,_=s||n&&t,f=!_&&!i,b=_&&!i;return(0,P.jsxs)("div",{className:"editor-post-publish-panel",...g,children:[(0,P.jsx)("div",{className:"editor-post-publish-panel__header",children:b?(0,P.jsx)(Do.Button,{size:"compact",onClick:a,icon:Bn,label:(0,gs.__)("Close panel")}):(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)("div",{className:"editor-post-publish-panel__header-cancel-button",children:(0,P.jsx)(Do.Button,{ref:this.cancelButtonNode,accessibleWhenDisabled:!0,disabled:r,onClick:a,variant:"secondary",size:"compact",children:(0,gs.__)("Cancel")})}),(0,P.jsx)("div",{className:"editor-post-publish-panel__header-publish-button",children:(0,P.jsx)(rd,{onSubmit:this.onSubmit,forceIsDirty:e})})]})}),(0,P.jsxs)("div",{className:"editor-post-publish-panel__content",children:[f&&(0,P.jsx)(mu,{children:d&&(0,P.jsx)(d,{})}),b&&(0,P.jsx)(yu,{focusOnMount:!0,children:c&&(0,P.jsx)(c,{})}),i&&(0,P.jsx)(Do.Spinner,{})]}),(0,P.jsx)("div",{className:"editor-post-publish-panel__footer",children:(0,P.jsx)(Do.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,gs.__)("Always show pre-publish checks."),checked:o,onChange:l})})]})}}const vu=(0,p.compose)([(0,c.withSelect)((e=>{var t;const{getPostType:s}=e(d.store),{getCurrentPost:o,getEditedPostAttribute:n,isCurrentPostPublished:i,isCurrentPostScheduled:r,isEditedPostBeingScheduled:a,isEditedPostDirty:l,isAutosavingPost:c,isSavingPost:u,isSavingNonPostEntityChanges:p}=e(qi),{isPublishSidebarEnabled:h}=e(qi),m=s(n("type"));return{hasPublishAction:null!==(t=o()._links?.["wp:action-publish"])&&void 0!==t&&t,isPostTypeViewable:m?.viewable,isBeingScheduled:a(),isDirty:l(),isPublished:i(),isPublishSidebarEnabled:h(),isSaving:u()&&!c(),isSavingNonPostEntityChanges:p(),isScheduled:r()}})),(0,c.withDispatch)(((e,{isPublishSidebarEnabled:t})=>{const{disablePublishSidebar:s,enablePublishSidebar:o}=e(qi);return{onTogglePublishSidebar:()=>{t?s():o()}}})),Do.withFocusReturn,Do.withConstrainedTabbing])(xu),wu=(0,P.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(k.Path,{d:"M17.3 10.1c0-2.5-2.1-4.4-4.8-4.4-2.2 0-4.1 1.4-4.6 3.3h-.2C5.7 9 4 10.7 4 12.8c0 2.1 1.7 3.8 3.7 3.8h9c1.8 0 3.2-1.5 3.2-3.3.1-1.6-1.1-2.9-2.6-3.2zm-.5 5.1h-4v-2.4L14 14l1-1-3-3-3 3 1 1 1.2-1.2v2.4H7.7c-1.2 0-2.2-1.1-2.2-2.3s1-2.4 2.2-2.4H9l.3-1.1c.4-1.3 1.7-2.2 3.2-2.2 1.8 0 3.3 1.3 3.3 2.9v1.3l1.3.2c.8.1 1.4.9 1.4 1.8 0 1-.8 1.8-1.7 1.8z"})});const Su=(0,u.forwardRef)((function({icon:e,size:t=24,...s},o){return(0,u.cloneElement)(e,{width:t,height:t,...s,ref:o})})),ku=(0,P.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(k.Path,{d:"M17.3 10.1c0-2.5-2.1-4.4-4.8-4.4-2.2 0-4.1 1.4-4.6 3.3h-.2C5.7 9 4 10.7 4 12.8c0 2.1 1.7 3.8 3.7 3.8h9c1.8 0 3.2-1.5 3.2-3.3.1-1.6-1.1-2.9-2.6-3.2zm-.5 5.1h-9c-1.2 0-2.2-1.1-2.2-2.3s1-2.4 2.2-2.4h1.3l.3-1.1c.4-1.3 1.7-2.2 3.2-2.2 1.8 0 3.3 1.3 3.3 2.9v1.3l1.3.2c.8.1 1.4.9 1.4 1.8-.1 1-.9 1.8-1.8 1.8z"})}),Pu=(0,P.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(k.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm8 4a4 4 0 0 0 4-4H8a4 4 0 0 0 4 4Z"})}),Cu=(0,P.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(k.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm8 4a4 4 0 0 1-4-4h4V8a4 4 0 0 1 0 8Z"})}),ju=(0,P.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(k.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5A6.5 6.5 0 0 1 6.93 7.931l9.139 9.138A6.473 6.473 0 0 1 12 18.5Zm5.123-2.498a6.5 6.5 0 0 0-9.124-9.124l9.124 9.124ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Z"})}),Eu=(0,P.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(k.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm9 1V8h-1.5v3.5h-2V13H13Z"})}),Tu=(0,P.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(k.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm11.53-1.47-1.06-1.06L11 12.94l-1.47-1.47-1.06 1.06L11 15.06l4.53-4.53Z"})});function Bu({children:e}){const{hasStickyAction:t,postType:s}=(0,c.useSelect)((e=>{var t;const s=e(qi).getCurrentPost();return{hasStickyAction:null!==(t=s._links?.["wp:action-sticky"])&&void 0!==t&&t,postType:e(qi).getCurrentPostType()}}),[]);return"post"===s&&t?e:null}function Iu(){const e=(0,c.useSelect)((e=>{var t;return null!==(t=e(qi).getEditedPostAttribute("sticky"))&&void 0!==t&&t}),[]),{editPost:t}=(0,c.useDispatch)(qi);return(0,P.jsx)(Bu,{children:(0,P.jsx)(Do.CheckboxControl,{className:"editor-post-sticky__checkbox-control",label:(0,gs.__)("Sticky"),help:(0,gs.__)("Pin this post to the top of the blog"),checked:e,onChange:()=>t({sticky:!e}),__nextHasNoMarginBottom:!0})})}const Nu={"auto-draft":{label:(0,gs.__)("Draft"),icon:Pu},draft:{label:(0,gs.__)("Draft"),icon:Pu},pending:{label:(0,gs.__)("Pending"),icon:Cu},private:{label:(0,gs.__)("Private"),icon:ju},future:{label:(0,gs.__)("Scheduled"),icon:Eu},publish:{label:(0,gs.__)("Published"),icon:Tu}},Au=[{label:(0,gs.__)("Draft"),value:"draft",description:(0,gs.__)("Not ready to publish.")},{label:(0,gs.__)("Pending"),value:"pending",description:(0,gs.__)("Waiting for review before publishing.")},{label:(0,gs.__)("Private"),value:"private",description:(0,gs.__)("Only visible to site admins and editors.")},{label:(0,gs.__)("Scheduled"),value:"future",description:(0,gs.__)("Publish automatically on a chosen date.")},{label:(0,gs.__)("Published"),value:"publish",description:(0,gs.__)("Visible to everyone.")}],Du=[R,M,O,L];function Ru(){const{status:e,date:t,password:s,postId:o,postType:n,canEdit:i}=(0,c.useSelect)((e=>{var t;const{getEditedPostAttribute:s,getCurrentPostId:o,getCurrentPostType:n,getCurrentPost:i}=e(qi);return{status:s("status"),date:s("date"),password:s("password"),postId:o(),postType:n(),canEdit:null!==(t=i()._links?.["wp:action-publish"])&&void 0!==t&&t}}),[]),[r,a]=(0,u.useState)(!!s),l=(0,p.useInstanceId)(Ru,"editor-change-status__password-input"),{editEntityRecord:h}=(0,c.useDispatch)(d.store),[g,_]=(0,u.useState)(null),f=(0,u.useMemo)((()=>({anchor:g,"aria-label":(0,gs.__)("Status & visibility"),headerTitle:(0,gs.__)("Status & visibility"),placement:"left-start",offset:36,shift:!0})),[g]);if(Du.includes(n))return null;const b=({status:i=e,password:r=s,date:a=t})=>{h("postType",n,o,{status:i,date:a,password:r})},y=e=>{a(e),e||b({password:""})},x=o=>{let n=t,i=s;"future"===e&&new Date(t)>new Date&&(n=null),"private"===o&&s&&(i=""),b({status:o,date:n,password:i})};return(0,P.jsx)(tl,{label:(0,gs.__)("Status"),ref:_,children:i?(0,P.jsx)(Do.Dropdown,{className:"editor-post-status",contentClassName:"editor-change-status__content",popoverProps:f,focusOnMount:!0,renderToggle:({onToggle:t,isOpen:s})=>(0,P.jsx)(Do.Button,{className:"editor-post-status__toggle",variant:"tertiary",size:"compact",onClick:t,icon:Nu[e]?.icon,"aria-label":(0,gs.sprintf)((0,gs.__)("Change status: %s"),Nu[e]?.label),"aria-expanded":s,children:Nu[e]?.label}),renderContent:({onClose:t})=>(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(m.__experimentalInspectorPopoverHeader,{title:(0,gs.__)("Status & visibility"),onClose:t}),(0,P.jsx)("form",{children:(0,P.jsxs)(Do.__experimentalVStack,{spacing:4,children:[(0,P.jsx)(Do.RadioControl,{className:"editor-change-status__options",hideLabelFromVision:!0,label:(0,gs.__)("Status"),options:Au,onChange:x,selected:"auto-draft"===e?"draft":e}),"future"===e&&(0,P.jsx)("div",{className:"editor-change-status__publish-date-wrapper",children:(0,P.jsx)(Td,{showPopoverHeaderActions:!1,isCompact:!0})}),"private"!==e&&(0,P.jsxs)(Do.__experimentalVStack,{as:"fieldset",spacing:4,className:"editor-change-status__password-fieldset",children:[(0,P.jsx)(Do.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,gs.__)("Password protected"),help:(0,gs.__)("Only visible to those who know the password"),checked:r,onChange:y}),r&&(0,P.jsx)("div",{className:"editor-change-status__password-input",children:(0,P.jsx)(Do.TextControl,{label:(0,gs.__)("Password"),onChange:e=>b({password:e}),value:s,placeholder:(0,gs.__)("Use a secure password"),type:"text",id:l,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,maxLength:255})})]}),(0,P.jsx)(Iu,{})]})})]})}):(0,P.jsx)("div",{className:"editor-post-status is-read-only",children:Nu[e]?.label})})}function Mu({forceIsDirty:e}){const[t,s]=(0,u.useState)(!1),o=(0,p.useViewportMatch)("small"),{isAutosaving:n,isDirty:i,isNew:r,isPublished:a,isSaveable:l,isSaving:d,isScheduled:h,hasPublishAction:m,showIconLabels:g,postStatus:_,postStatusHasChanged:f}=(0,c.useSelect)((t=>{var s;const{isEditedPostNew:o,isCurrentPostPublished:n,isCurrentPostScheduled:i,isEditedPostDirty:r,isSavingPost:a,isEditedPostSaveable:l,getCurrentPost:c,isAutosavingPost:d,getEditedPostAttribute:u,getPostEdits:p}=t(qi),{get:h}=t(j.store);return{isAutosaving:d(),isDirty:e||r(),isNew:o(),isPublished:n(),isSaving:a(),isSaveable:l(),isScheduled:i(),hasPublishAction:null!==(s=c()?._links?.["wp:action-publish"])&&void 0!==s&&s,showIconLabels:h("core","showIconLabels"),postStatus:u("status"),postStatusHasChanged:!!p()?.status}}),[e]),b="pending"===_,{savePost:y}=(0,c.useDispatch)(qi),x=(0,p.usePrevious)(d);if((0,u.useEffect)((()=>{let e;return x&&!d&&(s(!0),e=setTimeout((()=>{s(!1)}),1e3)),()=>clearTimeout(e)}),[d]),!m&&b)return null;const v=!["pending","draft","auto-draft"].includes(_)&&Au.map((({value:e})=>e)).includes(_);if(a||h||v||f&&["pending","draft"].includes(_))return null;const w=b?(0,gs.__)("Save as pending"):(0,gs.__)("Save draft"),S=(0,gs.__)("Save"),k=t||!r&&!i,C=d||k,E=d||k||!l;let T;return d?T=n?(0,gs.__)("Autosaving"):(0,gs.__)("Saving"):k?T=(0,gs.__)("Saved"):o?T=w:g&&(T=S),(0,P.jsxs)(Do.Button,{className:l||d?dr({"editor-post-save-draft":!C,"editor-post-saved-state":C,"is-saving":d,"is-autosaving":n,"is-saved":k,[(0,Do.__unstableGetAnimateClassName)({type:"loading"})]:d}):void 0,onClick:E?void 0:()=>y(),shortcut:E?void 0:aa.displayShortcut.primary("s"),variant:"tertiary",size:"compact",icon:o?void 0:wu,label:T||w,"aria-disabled":E,children:[C&&(0,P.jsx)(Su,{icon:k?Ro:ku}),T]})}function Ou({children:e}){return(0,c.useSelect)((e=>{var t;return null!==(t=e(qi).getCurrentPost()._links?.["wp:action-publish"])&&void 0!==t&&t}),[])?e:null}const Lu=[R,M,O,L];function Fu(){const[e,t]=(0,u.useState)(null),s=(0,c.useSelect)((e=>e(qi).getCurrentPostType()),[]),o=(0,u.useMemo)((()=>({anchor:e,"aria-label":(0,gs.__)("Change publish date"),placement:"left-start",offset:36,shift:!0})),[e]),n=Id(),i=Id({full:!0});return Lu.includes(s)?null:(0,P.jsx)(Ou,{children:(0,P.jsx)(tl,{label:(0,gs.__)("Publish"),ref:t,children:(0,P.jsx)(Do.Dropdown,{popoverProps:o,focusOnMount:!0,className:"editor-post-schedule__panel-dropdown",contentClassName:"editor-post-schedule__dialog",renderToggle:({onToggle:e,isOpen:t})=>(0,P.jsx)(Do.Button,{size:"compact",className:"editor-post-schedule__dialog-toggle",variant:"tertiary",tooltipPosition:"middle left",onClick:e,"aria-label":(0,gs.sprintf)((0,gs.__)("Change date: %s"),n),label:i,showTooltip:n!==i,"aria-expanded":t,children:n}),renderContent:({onClose:e})=>(0,P.jsx)(Ed,{onClose:e})})})})}function Vu({children:e}){return(0,P.jsx)(qa,{supportKeys:"slug",children:e})}function zu(){const e=(0,c.useSelect)((e=>(0,v.safeDecodeURIComponent)(e(qi).getEditedPostSlug())),[]),{editPost:t}=(0,c.useDispatch)(qi),[s,o]=(0,u.useState)(!1);return(0,P.jsx)(Do.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,gs.__)("Slug"),autoComplete:"off",spellCheck:"false",value:s?"":e,onChange:e=>{t({slug:e}),e?s&&o(!1):s||o(!0)},onBlur:e=>{t({slug:(0,v.cleanForSlug)(e.target.value)}),s&&o(!1)},className:"editor-post-slug"})}function Uu(){return(0,P.jsx)(Vu,{children:(0,P.jsx)(zu,{})})}function Hu(){S()("wp.editor.PostSwitchToDraftButton",{since:"6.7",version:"6.9"});const[e,t]=(0,u.useState)(!1),{editPost:s,savePost:o}=(0,c.useDispatch)(qi),{isSaving:n,isPublished:i,isScheduled:r}=(0,c.useSelect)((e=>{const{isSavingPost:t,isCurrentPostPublished:s,isCurrentPostScheduled:o}=e(qi);return{isSaving:t(),isPublished:s(),isScheduled:o()}}),[]),a=n||!i&&!r;let l,d;i?(l=(0,gs.__)("Are you sure you want to unpublish this post?"),d=(0,gs.__)("Unpublish")):r&&(l=(0,gs.__)("Are you sure you want to unschedule this post?"),d=(0,gs.__)("Unschedule"));return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,className:"editor-post-switch-to-draft",onClick:()=>{a||t(!0)},"aria-disabled":a,variant:"secondary",style:{flexGrow:"1",justifyContent:"center"},children:(0,gs.__)("Switch to draft")}),(0,P.jsx)(Do.__experimentalConfirmDialog,{isOpen:e,onConfirm:()=>{t(!1),s({status:"draft"}),o()},onCancel:()=>t(!1),confirmButtonText:d,children:l})]})}function Gu(){const{syncStatus:e,postType:t}=(0,c.useSelect)((e=>{const{getEditedPostAttribute:t}=e(qi),s=t("meta");return{syncStatus:"unsynced"===s?.wp_pattern_sync_status?"unsynced":t("wp_pattern_sync_status"),postType:t("type")}}));return"wp_block"!==t?null:(0,P.jsx)(tl,{label:(0,gs.__)("Sync status"),children:(0,P.jsx)("div",{className:"editor-post-sync-status__value",children:"unsynced"===e?(0,gs._x)("Not synced","pattern (singular)"):(0,gs._x)("Synced","pattern (singular)")})})}const $u=e=>e;const Wu=function({taxonomyWrapper:e=$u}){const{postType:t,taxonomies:s}=(0,c.useSelect)((e=>({postType:e(qi).getCurrentPostType(),taxonomies:e(d.store).getTaxonomies({per_page:-1})})),[]);return(null!=s?s:[]).filter((e=>e.types.includes(t)&&e.visibility?.show_ui)).map((t=>{const s=t.hierarchical?eu:Gd,o={slug:t.slug,...t.hierarchical?{}:{__nextHasNoMarginBottom:!0}};return(0,P.jsx)(u.Fragment,{children:e((0,P.jsx)(s,{...o}),t)},`taxonomy-${t.slug}`)}))};function Zu({children:e}){const t=(0,c.useSelect)((e=>{const t=e(qi).getCurrentPostType(),s=e(d.store).getTaxonomies({per_page:-1});return s?.some((e=>e.types.includes(t)))}),[]);return t?e:null}function Yu({taxonomy:e,children:t}){const s=e?.slug,o=s?`taxonomy-panel-${s}`:"",{isEnabled:n,isOpened:i}=(0,c.useSelect)((e=>{const{isEditorPanelEnabled:t,isEditorPanelOpened:n}=e(qi);return{isEnabled:!!s&&t(o),isOpened:!!s&&n(o)}}),[o,s]),{toggleEditorPanelOpened:r}=(0,c.useDispatch)(qi);if(!n)return null;const a=e?.labels?.menu_name;return a?(0,P.jsx)(Do.PanelBody,{title:a,opened:i,onToggle:()=>r(o),children:t}):null}const Ku=function(){return(0,P.jsx)(Zu,{children:(0,P.jsx)(Wu,{taxonomyWrapper:(e,t)=>(0,P.jsx)(Yu,{taxonomy:t,children:e})})})};var qu=s(4132);function Qu(){const e=(0,p.useInstanceId)(Qu),{content:t,blocks:s,type:o,id:n}=(0,c.useSelect)((e=>{const{getEditedEntityRecord:t}=e(d.store),{getCurrentPostType:s,getCurrentPostId:o}=e(qi),n=s(),i=o(),r=t("postType",n,i);return{content:r?.content,blocks:r?.blocks,type:n,id:i}}),[]),{editEntityRecord:i}=(0,c.useDispatch)(d.store),r=(0,u.useMemo)((()=>t instanceof Function?t({blocks:s}):s?(0,y.__unstableSerializeAndClean)(s):t),[t,s]);return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(Do.VisuallyHidden,{as:"label",htmlFor:`post-content-${e}`,children:(0,gs.__)("Type text or HTML")}),(0,P.jsx)(qu.A,{autoComplete:"off",dir:"auto",value:r,onChange:e=>{i("postType",o,n,{content:e.target.value,blocks:void 0,selection:void 0})},className:"editor-post-text-editor",id:`post-content-${e}`,placeholder:(0,gs.__)("Start writing with text or HTML")})]})}const Xu=window.wp.dom,Ju="wp-block wp-block-post-title block-editor-block-list__block editor-post-title editor-post-title__input rich-text",ep=/[\r\n]+/g;function tp(e){const t=(0,u.useRef)(),{isCleanNewPost:s}=(0,c.useSelect)((e=>{const{isCleanNewPost:t}=e(qi);return{isCleanNewPost:t()}}),[]);return(0,u.useImperativeHandle)(e,(()=>({focus:()=>{t?.current?.focus()}}))),(0,u.useEffect)((()=>{if(!t.current)return;const{defaultView:e}=t.current.ownerDocument,{name:o,parent:n}=e,i="editor-canvas"===o?n.document:e.document,{activeElement:r,body:a}=i;!s||r&&a!==r||t.current.focus()}),[s]),{ref:t}}function sp(){const{editPost:e}=(0,c.useDispatch)(qi),{title:t}=(0,c.useSelect)((e=>{const{getEditedPostAttribute:t}=e(qi);return{title:t("title")}}),[]);return{title:t,setTitle:function(t){e({title:t})}}}const op=(0,u.forwardRef)((function(e,t){const{placeholder:s}=(0,c.useSelect)((e=>{const{getSettings:t}=e(m.store),{titlePlaceholder:s}=t();return{placeholder:s}}),[]),[o,n]=(0,u.useState)(!1),{ref:i}=tp(t),{title:r,setTitle:a}=sp(),[l,d]=(0,u.useState)({}),{clearSelectedBlock:h,insertBlocks:g,insertDefaultBlock:_}=(0,c.useDispatch)(m.store),f=(0,Ao.decodeEntities)(s)||(0,gs.__)("Add title"),{value:b,onChange:x,ref:v}=(0,ua.__unstableUseRichText)({value:r,onChange(e){a(e.replace(ep," "))},placeholder:f,selectionStart:l.start,selectionEnd:l.end,onSelectionChange(e,t){d((s=>{const{start:o,end:n}=s;return o===e&&n===t?s:{start:e,end:t}}))},__unstableDisableFormats:!1});function w(e){g(e,0)}const S=dr(Ju,{"is-selected":o});return(0,P.jsx)(qa,{supportKeys:"title",children:(0,P.jsx)("h1",{ref:(0,p.useMergeRefs)([v,i]),contentEditable:!0,className:S,"aria-label":f,role:"textbox","aria-multiline":"true",onFocus:function(){n(!0),h()},onBlur:function(){n(!1),d({})},onKeyDown:function(e){e.keyCode===aa.ENTER&&(e.preventDefault(),_(void 0,void 0,0))},onPaste:function(e){const t=e.clipboardData;let s="",o="";try{s=t.getData("text/plain"),o=t.getData("text/html")}catch(e){return}window.console.log("Received HTML:\n\n",o),window.console.log("Received plain text:\n\n",s);const n=(0,y.pasteHandler)({HTML:o,plainText:s});if(e.preventDefault(),n.length)if("string"!=typeof n){const[e]=n;if(r||"core/heading"!==e.name&&"core/paragraph"!==e.name)w(n);else{const t=(0,Xu.__unstableStripHTML)(e.attributes.content);a(t),w(n.slice(1))}}else{const e=(0,Xu.__unstableStripHTML)(n);x((0,ua.insert)(b,(0,ua.create)({html:e})))}}})})}));const np=(0,u.forwardRef)((function(e,t){const{placeholder:s}=(0,c.useSelect)((e=>{const{getSettings:t}=e(m.store),{titlePlaceholder:s}=t();return{placeholder:s}}),[]),[o,n]=(0,u.useState)(!1),{title:i,setTitle:r}=sp(),{ref:a}=tp(t),l=dr(Ju,{"is-selected":o,"is-raw-text":!0}),d=(0,Ao.decodeEntities)(s)||(0,gs.__)("Add title");return(0,P.jsx)(Do.TextareaControl,{ref:a,value:i,onChange:function(e){r(e.replace(ep," "))},onFocus:function(){n(!0)},onBlur:function(){n(!1)},label:s,className:l,placeholder:d,hideLabelFromVision:!0,autoComplete:"off",dir:"auto",rows:1,__nextHasNoMarginBottom:!0})}));function ip({children:e}){const{canTrashPost:t}=(0,c.useSelect)((e=>{const{isEditedPostNew:t,getCurrentPostId:s,getCurrentPostType:o}=e(qi),{canUser:n}=e(d.store),i=o(),r=s(),a=t(),l=!!r&&n("delete",{kind:"postType",name:i,id:r});return{canTrashPost:(!a||r)&&l&&!z.includes(i)}}),[]);return t?e:null}function rp({onActionPerformed:e}){const t=(0,c.useRegistry)(),{isNew:s,isDeleting:o,postId:n,title:i}=(0,c.useSelect)((e=>{const t=e(qi);return{isNew:t.isEditedPostNew(),isDeleting:t.isDeletingPost(),postId:t.getCurrentPostId(),title:t.getCurrentPostAttribute("title")}}),[]),{trashPost:r}=(0,c.useDispatch)(qi),[a,l]=(0,u.useState)(!1);if(s||!n)return null;return(0,P.jsxs)(ip,{children:[(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,className:"editor-post-trash",isDestructive:!0,variant:"secondary",isBusy:o,"aria-disabled":o,onClick:o?void 0:()=>l(!0),children:(0,gs.__)("Move to trash")}),(0,P.jsx)(Do.__experimentalConfirmDialog,{isOpen:a,onConfirm:async()=>{l(!1),await r();const s=await t.resolveSelect(qi).getCurrentPost();e?.("move-to-trash",[s])},onCancel:()=>l(!1),confirmButtonText:(0,gs.__)("Move to trash"),size:"small",children:(0,gs.sprintf)((0,gs.__)('Are you sure you want to move "%s" to the trash?'),i)})]})}const ap=(0,P.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(k.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.625 5.5h9.75c.069 0 .125.056.125.125v9.75a.125.125 0 0 1-.125.125h-9.75a.125.125 0 0 1-.125-.125v-9.75c0-.069.056-.125.125-.125ZM4 5.625C4 4.728 4.728 4 5.625 4h9.75C16.273 4 17 4.728 17 5.625v9.75c0 .898-.727 1.625-1.625 1.625h-9.75A1.625 1.625 0 0 1 4 15.375v-9.75Zm14.5 11.656v-9H20v9C20 18.8 18.77 20 17.251 20H6.25v-1.5h11.001c.69 0 1.249-.528 1.249-1.219Z"})});function lp({onClose:e}){const{isEditable:t,postSlug:s,postLink:o,permalinkPrefix:n,permalinkSuffix:i,permalink:r}=(0,c.useSelect)((e=>{var t;const s=e(qi).getCurrentPost(),o=e(qi).getCurrentPostType(),n=e(d.store).getPostType(o),i=e(qi).getPermalinkParts(),r=null!==(t=s?._links?.["wp:action-publish"])&&void 0!==t&&t;return{isEditable:e(qi).isPermalinkEditable()&&r,postSlug:(0,v.safeDecodeURIComponent)(e(qi).getEditedPostSlug()),viewPostLabel:n?.labels.view_item,postLink:s.link,permalinkPrefix:i?.prefix,permalinkSuffix:i?.suffix,permalink:(0,v.safeDecodeURIComponent)(e(qi).getPermalink())}}),[]),{editPost:a}=(0,c.useDispatch)(qi),{createNotice:l}=(0,c.useDispatch)(ms.store),[h,g]=(0,u.useState)(!1),_=(0,p.useCopyToClipboard)(r,(()=>{l("info",(0,gs.__)("Copied URL to clipboard."),{isDismissible:!0,type:"snackbar"})}));return(0,P.jsxs)("div",{className:"editor-post-url",children:[(0,P.jsx)(m.__experimentalInspectorPopoverHeader,{title:(0,gs.__)("Link"),onClose:e}),(0,P.jsxs)(Do.__experimentalVStack,{spacing:3,children:[t&&(0,P.jsx)("div",{children:(0,u.createInterpolateElement)((0,gs.__)("Customize the last part of the URL. <a>Learn more.</a>"),{a:(0,P.jsx)(Do.ExternalLink,{href:(0,gs.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#permalink")})})}),(0,P.jsxs)("div",{children:[t&&(0,P.jsx)(Do.__experimentalInputControl,{__next40pxDefaultSize:!0,prefix:(0,P.jsx)(Do.__experimentalInputControlPrefixWrapper,{children:"/"}),suffix:(0,P.jsx)(Do.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,P.jsx)(Do.Button,{icon:ap,ref:_,size:"small",label:"Copy"})}),label:(0,gs.__)("Link"),hideLabelFromVision:!0,value:h?"":s,autoComplete:"off",spellCheck:"false",type:"text",className:"editor-post-url__input",onChange:e=>{a({slug:e}),e?h&&g(!1):h||g(!0)},onBlur:e=>{a({slug:(0,v.cleanForSlug)(e.target.value)}),h&&g(!1)},help:(0,P.jsxs)(Do.ExternalLink,{className:"editor-post-url__link",href:o,target:"_blank",children:[(0,P.jsx)("span",{className:"editor-post-url__link-prefix",children:n}),(0,P.jsx)("span",{className:"editor-post-url__link-slug",children:s}),(0,P.jsx)("span",{className:"editor-post-url__link-suffix",children:i})]})}),!t&&(0,P.jsx)(Do.ExternalLink,{className:"editor-post-url__link",href:o,target:"_blank",children:o})]})]})]})}function cp({children:e}){const t=(0,c.useSelect)((e=>{const t=e(qi).getCurrentPostType(),s=e(d.store).getPostType(t);if(!s?.viewable)return!1;if(!e(qi).getCurrentPost().link)return!1;return!!e(qi).getPermalinkParts()}),[]);return t?e:null}function dp(){return up()}function up(){const e=(0,c.useSelect)((e=>e(qi).getPermalink()),[]);return(0,v.filterURLForDisplay)((0,v.safeDecodeURIComponent)(e))}function pp(){const[e,t]=(0,u.useState)(null),s=(0,u.useMemo)((()=>({anchor:e,placement:"left-start",offset:36,shift:!0})),[e]);return(0,P.jsx)(cp,{children:(0,P.jsx)(tl,{label:(0,gs.__)("Link"),ref:t,children:(0,P.jsx)(Do.Dropdown,{popoverProps:s,className:"editor-post-url__panel-dropdown",contentClassName:"editor-post-url__panel-dialog",focusOnMount:!0,renderToggle:({isOpen:e,onToggle:t})=>(0,P.jsx)(hp,{isOpen:e,onClick:t}),renderContent:({onClose:e})=>(0,P.jsx)(lp,{onClose:e})})})})}function hp({isOpen:e,onClick:t}){const{slug:s,isFrontPage:o,postLink:n}=(0,c.useSelect)((e=>{const{getCurrentPostId:t,getCurrentPost:s}=e(qi),{getEditedEntityRecord:o,canUser:n}=e(d.store),i=n("read",{kind:"root",name:"site"})?o("root","site"):void 0,r=t();return{slug:e(qi).getEditedPostSlug(),isFrontPage:i?.page_on_front===r,postLink:s()?.link}}),[]),i=(0,v.safeDecodeURIComponent)(s);return(0,P.jsx)(Do.Button,{size:"compact",className:"editor-post-url__panel-toggle",variant:"tertiary","aria-expanded":e,"aria-label":(0,gs.sprintf)((0,gs.__)("Change link: %s"),i),onClick:t,children:(0,P.jsx)(Do.__experimentalTruncate,{numberOfLines:1,children:o?n:`/${i}`})})}function mp({render:e}){return e({canEdit:(0,c.useSelect)((e=>{var t;return null!==(t=e(qi).getCurrentPost()._links?.["wp:action-publish"])&&void 0!==t&&t}))})}const gp=(0,P.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(k.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"})}),_p=window.wp.wordcount;function fp(){const e=(0,c.useSelect)((e=>e(qi).getEditedPostAttribute("content")),[]),t=(0,gs._x)("words","Word count type. Do not translate!");return(0,P.jsx)("span",{className:"word-count",children:(0,_p.count)(e,t)})}const bp=189;function yp(){const e=(0,c.useSelect)((e=>e(qi).getEditedPostAttribute("content")),[]),t=(0,gs._x)("words","Word count type. Do not translate!"),s=Math.round((0,_p.count)(e,t)/bp),o=0===s?(0,u.createInterpolateElement)((0,gs.__)("<span>< 1</span> minute"),{span:(0,P.jsx)("span",{})}):(0,u.createInterpolateElement)((0,gs.sprintf)((0,gs._n)("<span>%s</span> minute","<span>%s</span> minutes",s),s),{span:(0,P.jsx)("span",{})});return(0,P.jsx)("span",{className:"time-to-read",children:o})}function xp(){const e=(0,c.useSelect)((e=>e(qi).getEditedPostAttribute("content")),[]);return(0,_p.count)(e,"characters_including_spaces")}const vp=function({hasOutlineItemsDisabled:e,onRequestClose:t}){const{headingCount:s,paragraphCount:o,numberOfBlocks:n}=(0,c.useSelect)((e=>{const{getGlobalBlockCount:t}=e(m.store);return{headingCount:t("core/heading"),paragraphCount:t("core/paragraph"),numberOfBlocks:t()}}),[]);return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)("div",{className:"table-of-contents__wrapper",role:"note","aria-label":(0,gs.__)("Document Statistics"),tabIndex:"0",children:(0,P.jsxs)("ul",{role:"list",className:"table-of-contents__counts",children:[(0,P.jsxs)("li",{className:"table-of-contents__count",children:[(0,gs.__)("Words"),(0,P.jsx)(fp,{})]}),(0,P.jsxs)("li",{className:"table-of-contents__count",children:[(0,gs.__)("Characters"),(0,P.jsx)("span",{className:"table-of-contents__number",children:(0,P.jsx)(xp,{})})]}),(0,P.jsxs)("li",{className:"table-of-contents__count",children:[(0,gs.__)("Time to read"),(0,P.jsx)(yp,{})]}),(0,P.jsxs)("li",{className:"table-of-contents__count",children:[(0,gs.__)("Headings"),(0,P.jsx)("span",{className:"table-of-contents__number",children:s})]}),(0,P.jsxs)("li",{className:"table-of-contents__count",children:[(0,gs.__)("Paragraphs"),(0,P.jsx)("span",{className:"table-of-contents__number",children:o})]}),(0,P.jsxs)("li",{className:"table-of-contents__count",children:[(0,gs.__)("Blocks"),(0,P.jsx)("span",{className:"table-of-contents__number",children:n})]})]})}),s>0&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)("hr",{}),(0,P.jsx)("h2",{className:"table-of-contents__title",children:(0,gs.__)("Document Outline")}),(0,P.jsx)(xa,{onSelect:t,hasOutlineItemsDisabled:e})]})]})};const wp=(0,u.forwardRef)((function({hasOutlineItemsDisabled:e,repositionDropdown:t,...s},o){const n=(0,c.useSelect)((e=>!!e(m.store).getBlockCount()),[]);return(0,P.jsx)(Do.Dropdown,{popoverProps:{placement:t?"right":"bottom"},className:"table-of-contents",contentClassName:"table-of-contents__popover",renderToggle:({isOpen:e,onToggle:t})=>(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,...s,ref:o,onClick:n?t:void 0,icon:gp,"aria-expanded":e,"aria-haspopup":"true",label:(0,gs.__)("Details"),tooltipPosition:"bottom","aria-disabled":!n}),renderContent:({onClose:t})=>(0,P.jsx)(vp,{onRequestClose:t,hasOutlineItemsDisabled:e})})}));function Sp(){const{__experimentalGetDirtyEntityRecords:e}=(0,c.useSelect)(d.store);return(0,u.useEffect)((()=>{const t=t=>{if(e().length>0)return t.returnValue=(0,gs.__)("You have unsaved changes. If you proceed, they will be lost."),t.returnValue};return window.addEventListener("beforeunload",t),()=>{window.removeEventListener("beforeunload",t)}}),[e]),null}const kp=(0,p.createHigherOrderComponent)((e=>({useSubRegistry:t=!0,...s})=>{const o=(0,c.useRegistry)(),[n]=(0,u.useState)((()=>new WeakMap)),i=function(e,t,s){if(!s)return t;let o=e.get(t);return o||(o=(0,c.createRegistry)({"core/block-editor":m.storeConfig},t),o.registerStore("core/editor",Ki),e.set(t,o)),o}(n,o,t);return i===o?(0,P.jsx)(e,{registry:o,...s}):(0,P.jsx)(c.RegistryProvider,{value:i,children:(0,P.jsx)(e,{registry:i,...s})})}),"withRegistryProvider"),Pp=(e,t)=>`<a ${Cp(e)}>${t}</a>`,Cp=e=>`href="${e}" target="_blank" rel="noreferrer noopener"`,jp=e=>{const{title:t,foreign_landing_url:s,creator:o,creator_url:n,license:i,license_version:r,license_url:a}=e,l=((e,t)=>{let s=e.trim();return"pdm"!==e&&(s=e.toUpperCase().replace("SAMPLING","Sampling")),t&&(s+=` ${t}`),["pdm","cc0"].includes(e)||(s=`CC ${s}`),s})(i,r),c=(0,Ao.decodeEntities)(o);let d;return d=c?t?(0,gs.sprintf)((0,gs._x)('"%1$s" by %2$s/ %3$s',"caption"),Pp(s,(0,Ao.decodeEntities)(t)),n?Pp(n,c):c,a?Pp(`${a}?ref=openverse`,l):l):(0,gs.sprintf)((0,gs._x)("<a %1$s>Work</a> by %2$s/ %3$s","caption"),Cp(s),n?Pp(n,c):c,a?Pp(`${a}?ref=openverse`,l):l):t?(0,gs.sprintf)((0,gs._x)('"%1$s"/ %2$s',"caption"),Pp(s,(0,Ao.decodeEntities)(t)),a?Pp(`${a}?ref=openverse`,l):l):(0,gs.sprintf)((0,gs._x)("<a %1$s>Work</a>/ %2$s","caption"),Cp(s),a?Pp(`${a}?ref=openverse`,l):l),d.replace(/\s{2}/g," ")},Ep=async(e={})=>(await(0,c.resolveSelect)(d.store).getMediaItems({...e,orderBy:e?.search?"relevance":"date"})).map((e=>({...e,alt:e.alt_text,url:e.source_url,previewUrl:e.media_details?.sizes?.medium?.source_url,caption:e.caption?.raw}))),Tp=[{name:"images",labels:{name:(0,gs.__)("Images"),search_items:(0,gs.__)("Search images")},mediaType:"image",fetch:async(e={})=>Ep({...e,media_type:"image"})},{name:"videos",labels:{name:(0,gs.__)("Videos"),search_items:(0,gs.__)("Search videos")},mediaType:"video",fetch:async(e={})=>Ep({...e,media_type:"video"})},{name:"audio",labels:{name:(0,gs.__)("Audio"),search_items:(0,gs.__)("Search audio")},mediaType:"audio",fetch:async(e={})=>Ep({...e,media_type:"audio"})},{name:"openverse",labels:{name:(0,gs.__)("Openverse"),search_items:(0,gs.__)("Search Openverse")},mediaType:"image",async fetch(e={}){const t={...e,mature:!1,excluded_source:"flickr,inaturalist,wikimedia",license:"pdm,cc0"},s={per_page:"page_size",search:"q"},o=new URL("https://api.openverse.org/v1/images/");Object.entries(t).forEach((([e,t])=>{const n=s[e]||e;o.searchParams.set(n,t)}));const n=await window.fetch(o,{headers:{"User-Agent":"WordPress/inserter-media-fetch"}});return(await n.json()).results.map((e=>({...e,title:e.title?.toLowerCase().startsWith("file:")?e.title.slice(5):e.title,sourceId:e.id,id:void 0,caption:jp(e),previewUrl:e.thumbnail})))},getReportUrl:({sourceId:e})=>`https://wordpress.org/openverse/image/${e}/report/`,isExternalResource:!0}],Bp=()=>{};function Ip({additionalData:e={},allowedTypes:t,filesList:s,maxUploadFileSize:o,onError:n=Bp,onFileChange:i}){const{getCurrentPost:r,getEditorSettings:a}=(0,c.select)(qi),{lockPostAutosaving:l,unlockPostAutosaving:d,lockPostSaving:u,unlockPostSaving:p}=(0,c.dispatch)(qi),h=a().allowedMimeTypes,m=`image-upload-${lu()}`;let g=!1;o=o||a().maxUploadFileSize;const _=r(),f="number"==typeof _?.id?_.id:_?.wp_id,b=f?{post:f}:{},y=()=>{p(m),d(m),g=!1};(0,Ji.uploadMedia)({allowedTypes:t,filesList:s,onFileChange:e=>{g?y():(u(m),l(m),g=!0),i(e)},additionalData:{...b,...e},maxUploadFileSize:o,onError:({message:e})=>{y(),n(e)},wpAllowedMimeTypes:h})}var Np=s(66),Ap=s.n(Np);
+*/o=[e,t],s=function(e,t){"use strict";var s,o,n="function"==typeof Map?new Map:(s=[],o=[],{has:function(e){return s.indexOf(e)>-1},get:function(e){return o[s.indexOf(e)]},set:function(e,t){-1===s.indexOf(e)&&(s.push(e),o.push(t))},delete:function(e){var t=s.indexOf(e);t>-1&&(s.splice(t,1),o.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 r(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!n.has(e)){var t=null,s=null,o=null,r=function(){e.clientWidth!==s&&p()},a=function(t){window.removeEventListener("resize",r,!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(s){e.style[s]=t[s]})),n.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",r,!1),e.addEventListener("input",p,!1),e.addEventListener("autosize:update",p,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",n.set(e,{destroy:a,update:p}),l()}function l(){var s=window.getComputedStyle(e,null);"vertical"===s.resize?e.style.resize="none":"both"===s.resize&&(e.style.resize="horizontal"),t="content-box"===s.boxSizing?-(parseFloat(s.paddingTop)+parseFloat(s.paddingBottom)):parseFloat(s.borderTopWidth)+parseFloat(s.borderBottomWidth),isNaN(t)&&(t=0),p()}function c(t){var s=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=s,e.style.overflowY=t}function d(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 u(){if(0!==e.scrollHeight){var o=d(e),n=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+t+"px",s=e.clientWidth,o.forEach((function(e){e.node.scrollTop=e.scrollTop})),n&&(document.documentElement.scrollTop=n)}}function p(){u();var t=Math.round(parseFloat(e.style.height)),s=window.getComputedStyle(e,null),n="content-box"===s.boxSizing?Math.round(parseFloat(s.height)):e.offsetHeight;if(n<t?"hidden"===s.overflowY&&(c("scroll"),u(),n="content-box"===s.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==s.overflowY&&(c("hidden"),u(),n="content-box"===s.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),o!==n){o=n;var r=i("autosize:resized");try{e.dispatchEvent(r)}catch(e){}}}}function a(e){var t=n.get(e);t&&t.destroy()}function l(e){var t=n.get(e);t&&t.update()}var c=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((c=function(e){return e}).destroy=function(e){return e},c.update=function(e){return e}):((c=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],(function(e){return r(e,t)})),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],a),e},c.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],l),e}),t.default=c,e.exports=t.default},void 0===(n="function"==typeof s?s.apply(t,o):s)||(e.exports=n)},6109:e=>{e.exports=function(e,t,s){return((s=window.getComputedStyle)?s(e):e.currentStyle)[t.replace(/-(\w)/gi,(function(e,t){return t.toUpperCase()}))]}},66:e=>{"use strict";var t=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===s}(e)}(e)};var s="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function o(e,t){return!1!==t.clone&&t.isMergeableObject(e)?l((s=e,Array.isArray(s)?[]:{}),e,t):e;var s}function n(e,t,s){return e.concat(t).map((function(e){return o(e,s)}))}function i(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return Object.propertyIsEnumerable.call(e,t)})):[]}(e))}function r(e,t){try{return t in e}catch(e){return!1}}function a(e,t,s){var n={};return s.isMergeableObject(e)&&i(e).forEach((function(t){n[t]=o(e[t],s)})),i(t).forEach((function(i){(function(e,t){return r(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,i)||(r(e,i)&&s.isMergeableObject(t[i])?n[i]=function(e,t){if(!t.customMerge)return l;var s=t.customMerge(e);return"function"==typeof s?s:l}(i,s)(e[i],t[i],s):n[i]=o(t[i],s))})),n}function l(e,s,i){(i=i||{}).arrayMerge=i.arrayMerge||n,i.isMergeableObject=i.isMergeableObject||t,i.cloneUnlessOtherwiseSpecified=o;var r=Array.isArray(s);return r===Array.isArray(e)?r?i.arrayMerge(e,s,i):a(e,s,i):o(s,i)}l.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,s){return l(e,s,t)}),{})};var c=l;e.exports=c},5215:e=>{"use strict";e.exports=function e(t,s){if(t===s)return!0;if(t&&s&&"object"==typeof t&&"object"==typeof s){if(t.constructor!==s.constructor)return!1;var o,n,i;if(Array.isArray(t)){if((o=t.length)!=s.length)return!1;for(n=o;0!=n--;)if(!e(t[n],s[n]))return!1;return!0}if(t.constructor===RegExp)return t.source===s.source&&t.flags===s.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===s.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===s.toString();if((o=(i=Object.keys(t)).length)!==Object.keys(s).length)return!1;for(n=o;0!=n--;)if(!Object.prototype.hasOwnProperty.call(s,i[n]))return!1;for(n=o;0!=n--;){var r=i[n];if(!e(t[r],s[r]))return!1}return!0}return t!=t&&s!=s}},461:(e,t,s)=>{var o=s(6109);e.exports=function(e){var t=o(e,"line-height"),s=parseFloat(t,10);if(t===s+""){var n=e.style.lineHeight;e.style.lineHeight=t+"em",t=o(e,"line-height"),s=parseFloat(t,10),n?e.style.lineHeight=n:delete e.style.lineHeight}if(-1!==t.indexOf("pt")?(s*=4,s/=3):-1!==t.indexOf("mm")?(s*=96,s/=25.4):-1!==t.indexOf("cm")?(s*=96,s/=2.54):-1!==t.indexOf("in")?s*=96:-1!==t.indexOf("pc")&&(s*=16),s=Math.round(s),"normal"===t){var i=e.nodeName,r=document.createElement(i);r.innerHTML=" ","TEXTAREA"===i.toUpperCase()&&r.setAttribute("rows","1");var a=o(e,"font-size");r.style.fontSize=a,r.style.padding="0px",r.style.border="0px";var l=document.body;l.appendChild(r),s=r.offsetHeight,l.removeChild(r)}return s}},628:(e,t,s)=>{"use strict";var o=s(4067);function n(){}function i(){}i.resetWarningCache=n,e.exports=function(){function e(e,t,s,n,i,r){if(r!==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 s={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:n};return s.PropTypes=s,s}},5826:(e,t,s)=>{e.exports=s(628)()},4067:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},4462:function(e,t,s){"use strict";var o,n=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])},function(e,t){function s(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)}),i=this&&this.__assign||Object.assign||function(e){for(var t,s=1,o=arguments.length;s<o;s++)for(var n in t=arguments[s])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},r=this&&this.__rest||function(e,t){var s={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(s[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&(s[o[n]]=e[o[n]])}return s};t.__esModule=!0;var a=s(1609),l=s(5826),c=s(4306),d=s(461),u="autosize:resized",p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={lineHeight:null},t.textarea=null,t.onResize=function(e){t.props.onResize&&t.props.onResize(e)},t.updateLineHeight=function(){t.textarea&&t.setState({lineHeight:d(t.textarea)})},t.onChange=function(e){var s=t.props.onChange;t.currentValue=e.currentTarget.value,s&&s(e)},t}return n(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,s=t.maxRows,o=t.async;"number"==typeof s&&this.updateLineHeight(),"number"==typeof s||o?setTimeout((function(){return e.textarea&&c(e.textarea)})):this.textarea&&c(this.textarea),this.textarea&&this.textarea.addEventListener(u,this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener(u,this.onResize),c.destroy(this.textarea))},t.prototype.render=function(){var e=this,t=this.props,s=(t.onResize,t.maxRows),o=(t.onChange,t.style),n=(t.innerRef,t.children),l=r(t,["onResize","maxRows","onChange","style","innerRef","children"]),c=this.state.lineHeight,d=s&&c?c*s:null;return a.createElement("textarea",i({},l,{onChange:this.onChange,style:d?i({},o,{maxHeight:d}):o,ref:function(t){e.textarea=t,"function"==typeof e.props.innerRef?e.props.innerRef(t):e.props.innerRef&&(e.props.innerRef.current=t)}}),n)},t.prototype.componentDidUpdate=function(){this.textarea&&c.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:l.number,maxRows:l.number,onResize:l.func,innerRef:l.any,async:l.bool},t}(a.Component);t.TextareaAutosize=a.forwardRef((function(e,t){return a.createElement(p,i({},e,{innerRef:t}))}))},4132:(e,t,s)=>{"use strict";var o=s(4462);t.A=o.TextareaAutosize},9681:e=>{var t={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ả:"A",Ạ:"A",Ẩ:"A",Ẫ:"A",Ậ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ẻ:"E",Ẽ:"E",Ẹ:"E",Ể:"E",Ễ:"E",Ệ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ỉ:"I",Ị:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ỏ:"O",Ọ:"O",Ổ:"O",Ỗ:"O",Ộ:"O",Ờ:"O",Ở:"O",Ỡ:"O",Ớ:"O",Ợ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ủ:"U",Ụ:"U",Ử:"U",Ữ:"U",Ự:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ả:"a",ạ:"a",ẩ:"a",ẫ:"a",ậ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ẻ:"e",ẽ:"e",ẹ:"e",ể:"e",ễ:"e",ệ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ỉ:"i",ị:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ỏ:"o",ọ:"o",ổ:"o",ỗ:"o",ộ:"o",ờ:"o",ở:"o",ỡ:"o",ớ:"o",ợ:"o",ù:"u",ú:"u",û:"u",ü:"u",ủ:"u",ụ:"u",ử:"u",ữ:"u",ự:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z",й:"и",Й:"И",ё:"е",Ё:"Е"},s=Object.keys(t).join("|"),o=new RegExp(s,"g"),n=new RegExp(s,"");function i(e){return t[e]}var r=function(e){return e.replace(o,i)};e.exports=r,e.exports.has=function(e){return!!e.match(n)},e.exports.remove=r},1609:e=>{"use strict";e.exports=window.React}},t={};function s(o){var n=t[o];if(void 0!==n)return n.exports;var i=t[o]={exports:{}};return e[o].call(i.exports,i,i.exports,s),i.exports}s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var o in t)s.o(t,o)&&!s.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};(()=>{"use strict";s.r(o),s.d(o,{AlignmentToolbar:()=>tm,Autocomplete:()=>em,AutosaveMonitor:()=>na,BlockAlignmentToolbar:()=>sm,BlockControls:()=>om,BlockEdit:()=>nm,BlockEditorKeyboardShortcuts:()=>im,BlockFormatControls:()=>rm,BlockIcon:()=>am,BlockInspector:()=>lm,BlockList:()=>cm,BlockMover:()=>dm,BlockNavigationDropdown:()=>um,BlockSelectionClearer:()=>pm,BlockSettingsMenu:()=>hm,BlockTitle:()=>mm,BlockToolbar:()=>gm,CharacterCount:()=>xp,ColorPalette:()=>_m,ContrastChecker:()=>fm,CopyHandler:()=>bm,DefaultBlockAppender:()=>ym,DocumentBar:()=>da,DocumentOutline:()=>xa,DocumentOutlineCheck:()=>va,EditorHistoryRedo:()=>Pa,EditorHistoryUndo:()=>Ca,EditorKeyboardShortcuts:()=>sa,EditorKeyboardShortcutsRegister:()=>wa,EditorNotices:()=>Ea,EditorProvider:()=>Yh,EditorSnackbars:()=>Ba,EntitiesSavedStates:()=>Fa,ErrorBoundary:()=>Ga,FontSizePicker:()=>xm,InnerBlocks:()=>wm,Inserter:()=>vm,InspectorAdvancedControls:()=>Sm,InspectorControls:()=>km,LocalAutosaveMonitor:()=>Ya,MediaPlaceholder:()=>Bm,MediaUpload:()=>Im,MediaUploadCheck:()=>Nm,MultiSelectScrollIntoView:()=>Am,NavigableToolbar:()=>Dm,ObserveTyping:()=>Rm,PageAttributesCheck:()=>Ka,PageAttributesOrder:()=>Xa,PageAttributesPanel:()=>ml,PageAttributesParent:()=>ul,PageTemplate:()=>Cl,PanelColorSettings:()=>Pm,PlainText:()=>Cm,PluginBlockSettingsMenuItem:()=>Ol,PluginDocumentSettingPanel:()=>Ml,PluginMoreMenuItem:()=>Ll,PluginPostPublishPanel:()=>Ul,PluginPostStatusInfo:()=>Wl,PluginPrePublishPanel:()=>ql,PluginPreviewMenuItem:()=>Ql,PluginSidebar:()=>Xl,PluginSidebarMoreMenuItem:()=>Jl,PostAuthor:()=>pc,PostAuthorCheck:()=>hc,PostAuthorPanel:()=>gc,PostComments:()=>fc,PostDiscussionPanel:()=>wc,PostExcerpt:()=>Sc,PostExcerptCheck:()=>kc,PostExcerptPanel:()=>Ic,PostFeaturedImage:()=>Uc,PostFeaturedImageCheck:()=>Rc,PostFeaturedImagePanel:()=>Gc,PostFormat:()=>Zc,PostFormatCheck:()=>$c,PostLastRevision:()=>Qc,PostLastRevisionCheck:()=>Yc,PostLastRevisionPanel:()=>Xc,PostLockedModal:()=>Jc,PostPendingStatus:()=>td,PostPendingStatusCheck:()=>ed,PostPingbacks:()=>bc,PostPreviewButton:()=>sd,PostPublishButton:()=>rd,PostPublishButtonLabel:()=>od,PostPublishPanel:()=>vu,PostSavedState:()=>Mu,PostSchedule:()=>Ed,PostScheduleCheck:()=>Ou,PostScheduleLabel:()=>Bd,PostSchedulePanel:()=>Fu,PostSlug:()=>Uu,PostSlugCheck:()=>Vu,PostSticky:()=>Iu,PostStickyCheck:()=>Bu,PostSwitchToDraftButton:()=>Hu,PostSyncStatus:()=>Gu,PostTaxonomies:()=>Wu,PostTaxonomiesCheck:()=>Zu,PostTaxonomiesFlatTermSelector:()=>Hd,PostTaxonomiesHierarchicalTermSelector:()=>Jd,PostTaxonomiesPanel:()=>Ku,PostTemplatePanel:()=>rc,PostTextEditor:()=>Qu,PostTitle:()=>op,PostTitleRaw:()=>np,PostTrash:()=>rp,PostTrashCheck:()=>ip,PostTypeSupportCheck:()=>qa,PostURL:()=>lp,PostURLCheck:()=>cp,PostURLLabel:()=>dp,PostURLPanel:()=>pp,PostVisibility:()=>cd,PostVisibilityCheck:()=>mp,PostVisibilityLabel:()=>ud,RichText:()=>Jh,RichTextShortcut:()=>jm,RichTextToolbarButton:()=>Em,ServerSideRender:()=>qh(),SkipToSelectedBlock:()=>Mm,TableOfContents:()=>wp,TextEditorGlobalKeyboardShortcuts:()=>Xm,ThemeSupportCheck:()=>Dc,TimeToRead:()=>yp,URLInput:()=>Om,URLInputButton:()=>Lm,URLPopover:()=>Fm,UnsavedChangesWarning:()=>Sp,VisualEditorGlobalKeyboardShortcuts:()=>Qm,Warning:()=>Vm,WordCount:()=>fp,WritingFlow:()=>zm,__unstableRichTextInputEvent:()=>Tm,cleanForSlug:()=>Jm,createCustomColorsHOC:()=>Um,getColorClassName:()=>Hm,getColorObjectByAttributeValues:()=>Gm,getColorObjectByColorValue:()=>$m,getFontSize:()=>Wm,getFontSizeClass:()=>Zm,getTemplatePartIcon:()=>W,mediaUpload:()=>Ip,privateApis:()=>bf,registerEntityAction:()=>yf,store:()=>qi,storeConfig:()=>Ki,transformStyles:()=>m.transformStyles,unregisterEntityAction:()=>xf,useEntitiesSavedStatesIsDirty:()=>Oa,usePostScheduleLabel:()=>Id,usePostURLLabel:()=>up,usePostVisibilityLabel:()=>pd,userAutocompleter:()=>Xi,withColorContext:()=>Ym,withColors:()=>Km,withFontSizes:()=>qm});var e={};s.r(e),s.d(e,{__experimentalGetDefaultTemplatePartAreas:()=>rs,__experimentalGetDefaultTemplateType:()=>as,__experimentalGetDefaultTemplateTypes:()=>is,__experimentalGetTemplateInfo:()=>ls,__unstableIsEditorReady:()=>Xe,canInsertBlockType:()=>ts,canUserUseUnfilteredHTML:()=>He,didPostSaveRequestFail:()=>Ce,didPostSaveRequestSucceed:()=>Pe,getActivePostLock:()=>Ue,getAdjacentBlockClientId:()=>Ct,getAutosaveAttribute:()=>ue,getBlock:()=>ut,getBlockAttributes:()=>dt,getBlockCount:()=>ft,getBlockHierarchyRootClientId:()=>Pt,getBlockIndex:()=>Vt,getBlockInsertionPoint:()=>qt,getBlockListSettings:()=>ns,getBlockMode:()=>Zt,getBlockName:()=>lt,getBlockOrder:()=>Ft,getBlockRootClientId:()=>kt,getBlockSelectionEnd:()=>yt,getBlockSelectionStart:()=>bt,getBlocks:()=>pt,getBlocksByClientId:()=>_t,getClientIdsOfDescendants:()=>ht,getClientIdsWithDescendants:()=>mt,getCurrentPost:()=>te,getCurrentPostAttribute:()=>le,getCurrentPostId:()=>oe,getCurrentPostLastRevisionId:()=>re,getCurrentPostRevisionsCount:()=>ie,getCurrentPostType:()=>se,getCurrentTemplateId:()=>ne,getDeviceType:()=>tt,getEditedPostAttribute:()=>de,getEditedPostContent:()=>Ie,getEditedPostPreviewLink:()=>Te,getEditedPostSlug:()=>Re,getEditedPostVisibility:()=>pe,getEditorBlocks:()=>$e,getEditorMode:()=>nt,getEditorSelection:()=>Qe,getEditorSelectionEnd:()=>qe,getEditorSelectionStart:()=>Ke,getEditorSettings:()=>Je,getFirstMultiSelectedBlockClientId:()=>Nt,getGlobalBlockCount:()=>gt,getInserterItems:()=>ss,getLastMultiSelectedBlockClientId:()=>At,getMultiSelectedBlockClientIds:()=>Bt,getMultiSelectedBlocks:()=>It,getMultiSelectedBlocksEndClientId:()=>Lt,getMultiSelectedBlocksStartClientId:()=>Ot,getNextBlockClientId:()=>Et,getPermalink:()=>De,getPermalinkParts:()=>Me,getPostEdits:()=>ae,getPostLockUser:()=>ze,getPostTypeLabel:()=>cs,getPreviousBlockClientId:()=>jt,getRenderingMode:()=>et,getSelectedBlock:()=>St,getSelectedBlockClientId:()=>wt,getSelectedBlockCount:()=>xt,getSelectedBlocksInitialCaretPosition:()=>Tt,getStateBeforeOptimisticTransaction:()=>it,getSuggestedPostFormat:()=>Be,getTemplate:()=>Jt,getTemplateLock:()=>es,hasChangedContent:()=>Q,hasEditorRedo:()=>K,hasEditorUndo:()=>Y,hasInserterItems:()=>os,hasMultiSelection:()=>Gt,hasNonPostEntityChanges:()=>J,hasSelectedBlock:()=>vt,hasSelectedInnerBlock:()=>Ut,inSomeHistory:()=>rt,isAncestorMultiSelected:()=>Mt,isAutosavingPost:()=>je,isBlockInsertionPointVisible:()=>Qt,isBlockMultiSelected:()=>Rt,isBlockSelected:()=>zt,isBlockValid:()=>ct,isBlockWithinSelection:()=>Ht,isCaretWithinFormattedText:()=>Kt,isCleanNewPost:()=>ee,isCurrentPostPending:()=>he,isCurrentPostPublished:()=>me,isCurrentPostScheduled:()=>ge,isDeletingPost:()=>we,isEditedPostAutosaveable:()=>ye,isEditedPostBeingScheduled:()=>xe,isEditedPostDateFloating:()=>ve,isEditedPostDirty:()=>X,isEditedPostEmpty:()=>be,isEditedPostNew:()=>q,isEditedPostPublishable:()=>_e,isEditedPostSaveable:()=>fe,isEditorPanelEnabled:()=>Ze,isEditorPanelOpened:()=>Ye,isEditorPanelRemoved:()=>We,isFirstMultiSelectedBlock:()=>Dt,isInserterOpened:()=>ot,isListViewOpened:()=>st,isMultiSelecting:()=>$t,isPermalinkEditable:()=>Ae,isPostAutosavingLocked:()=>Fe,isPostLockTakeover:()=>Ve,isPostLocked:()=>Oe,isPostSavingLocked:()=>Le,isPreviewingPost:()=>Ee,isPublishSidebarEnabled:()=>Ge,isPublishSidebarOpened:()=>ds,isPublishingPost:()=>Ne,isSavingNonPostEntityChanges:()=>ke,isSavingPost:()=>Se,isSelectionEnabled:()=>Wt,isTyping:()=>Yt,isValidTemplate:()=>Xt});var t={};s.r(t),s.d(t,{__experimentalTearDownEditor:()=>ys,__unstableSaveForPreview:()=>Ts,autosave:()=>Es,clearSelectedBlock:()=>co,closePublishSidebar:()=>Xs,createUndoLevel:()=>Ns,disablePublishSidebar:()=>Rs,editPost:()=>ks,enablePublishSidebar:()=>Ds,enterFormattedText:()=>To,exitFormattedText:()=>Bo,hideInsertionPoint:()=>xo,insertBlock:()=>fo,insertBlocks:()=>bo,insertDefaultBlock:()=>Io,lockPostAutosaving:()=>Ls,lockPostSaving:()=>Ms,mergeBlocks:()=>So,moveBlockToPosition:()=>_o,moveBlocksDown:()=>mo,moveBlocksUp:()=>go,multiSelect:()=>lo,openPublishSidebar:()=>Qs,receiveBlocks:()=>so,redo:()=>Bs,refreshPost:()=>Cs,removeBlock:()=>Po,removeBlocks:()=>ko,removeEditorPanel:()=>Ws,replaceBlock:()=>ho,replaceBlocks:()=>po,resetBlocks:()=>to,resetEditorBlocks:()=>Vs,resetPost:()=>xs,savePost:()=>Ps,selectBlock:()=>io,setDeviceType:()=>Hs,setEditedPost:()=>Ss,setIsInserterOpened:()=>Zs,setIsListViewOpened:()=>Ys,setRenderingMode:()=>Us,setTemplateValidity:()=>vo,setupEditor:()=>bs,setupEditorState:()=>ws,showInsertionPoint:()=>yo,startMultiSelect:()=>ro,startTyping:()=>jo,stopMultiSelect:()=>ao,stopTyping:()=>Eo,switchEditorMode:()=>qs,synchronizeTemplate:()=>wo,toggleBlockMode:()=>Co,toggleDistractionFree:()=>Ks,toggleEditorPanelEnabled:()=>Gs,toggleEditorPanelOpened:()=>$s,togglePublishSidebar:()=>Js,toggleSelection:()=>uo,trashPost:()=>js,undo:()=>Is,unlockPostAutosaving:()=>Fs,unlockPostSaving:()=>Os,updateBlock:()=>oo,updateBlockAttributes:()=>no,updateBlockListSettings:()=>No,updateEditorSettings:()=>zs,updatePost:()=>vs,updatePostLock:()=>As});var n={};s.r(n),s.d(n,{createTemplate:()=>Ci,hideBlockTypes:()=>Ei,registerEntityAction:()=>vi,registerPostTypeActions:()=>ki,removeTemplates:()=>Ii,revertTemplate:()=>Bi,saveDirtyEntities:()=>Ti,setCurrentTemplateId:()=>Pi,setIsReady:()=>Si,showBlockTypes:()=>ji,unregisterEntityAction:()=>wi});var i={};s.r(i),s.d(i,{getEntityActions:()=>Wi,getInserterSidebarToggleRef:()=>Ui,getInsertionPoint:()=>Vi,getListViewToggleRef:()=>zi,getPostBlocksByName:()=>Yi,getPostIcon:()=>Gi,hasPostMetaChanges:()=>$i,isEntityReady:()=>Zi});var r={};s.r(r),s.d(r,{closeModal:()=>Pr,disableComplementaryArea:()=>br,enableComplementaryArea:()=>fr,openModal:()=>kr,pinItem:()=>yr,setDefaultComplementaryArea:()=>_r,setFeatureDefaults:()=>Sr,setFeatureValue:()=>wr,toggleFeature:()=>vr,unpinItem:()=>xr});var a={};s.r(a),s.d(a,{getActiveComplementaryArea:()=>Cr,isComplementaryAreaLoading:()=>jr,isFeatureActive:()=>Tr,isItemPinned:()=>Er,isModalActive:()=>Br});var l={};s.r(l),s.d(l,{ActionItem:()=>Fr,ComplementaryArea:()=>Kr,ComplementaryAreaMoreMenuItem:()=>zr,FullscreenMode:()=>qr,InterfaceSkeleton:()=>ta,NavigableRegion:()=>Xr,PinnedItems:()=>Hr,store:()=>Nr});const c=window.wp.data,d=window.wp.coreData,u=window.wp.element,p=window.wp.compose,h=window.wp.hooks,m=window.wp.blockEditor,g={...m.SETTINGS_DEFAULTS,richEditingEnabled:!0,codeEditingEnabled:!0,fontLibraryEnabled:!0,enableCustomFields:void 0,defaultRenderingMode:"post-only"};const _=(0,c.combineReducers)({actions:function(e={},t){var s;switch(t.type){case"REGISTER_ENTITY_ACTION":return{...e,[t.kind]:{...e[t.kind],[t.name]:[...(null!==(s=e[t.kind]?.[t.name])&&void 0!==s?s:[]).filter((e=>e.id!==t.config.id)),t.config]}};case"UNREGISTER_ENTITY_ACTION":var o;return{...e,[t.kind]:{...e[t.kind],[t.name]:(null!==(o=e[t.kind]?.[t.name])&&void 0!==o?o:[]).filter((e=>e.id!==t.actionId))}}}return e},isReady:function(e={},t){return"SET_IS_READY"===t.type?{...e,[t.kind]:{...e[t.kind],[t.name]:!0}}:e}});function f(e){return e&&"object"==typeof e&&"raw"in e?e.raw:e}const b=(0,c.combineReducers)({postId:function(e=null,t){return"SET_EDITED_POST"===t.type?t.postId:e},postType:function(e=null,t){return"SET_EDITED_POST"===t.type?t.postType:e},templateId:function(e=null,t){return"SET_CURRENT_TEMPLATE_ID"===t.type?t.id:e},saving:function(e={},t){switch(t.type){case"REQUEST_POST_UPDATE_START":case"REQUEST_POST_UPDATE_FINISH":return{pending:"REQUEST_POST_UPDATE_START"===t.type,options:t.options||{}}}return e},deleting:function(e={},t){switch(t.type){case"REQUEST_POST_DELETE_START":case"REQUEST_POST_DELETE_FINISH":return{pending:"REQUEST_POST_DELETE_START"===t.type}}return e},postLock:function(e={isLocked:!1},t){return"UPDATE_POST_LOCK"===t.type?t.lock:e},template:function(e={isValid:!0},t){return"SET_TEMPLATE_VALIDITY"===t.type?{...e,isValid:t.isValid}:e},postSavingLock:function(e={},t){switch(t.type){case"LOCK_POST_SAVING":return{...e,[t.lockName]:!0};case"UNLOCK_POST_SAVING":{const{[t.lockName]:s,...o}=e;return o}}return e},editorSettings:function(e=g,t){return"UPDATE_EDITOR_SETTINGS"===t.type?{...e,...t.settings}:e},postAutosavingLock:function(e={},t){switch(t.type){case"LOCK_POST_AUTOSAVING":return{...e,[t.lockName]:!0};case"UNLOCK_POST_AUTOSAVING":{const{[t.lockName]:s,...o}=e;return o}}return e},renderingMode:function(e="post-only",t){return"SET_RENDERING_MODE"===t.type?t.mode:e},deviceType:function(e="Desktop",t){return"SET_DEVICE_TYPE"===t.type?t.deviceType:e},removedPanels:function(e=[],t){if("REMOVE_PANEL"===t.type)if(!e.includes(t.panelName))return[...e,t.panelName];return e},blockInserterPanel:function(e=!1,t){switch(t.type){case"SET_IS_LIST_VIEW_OPENED":return!t.isOpen&&e;case"SET_IS_INSERTER_OPENED":return t.value}return e},inserterSidebarToggleRef:function(e={current:null}){return e},listViewPanel:function(e=!1,t){switch(t.type){case"SET_IS_INSERTER_OPENED":return!t.value&&e;case"SET_IS_LIST_VIEW_OPENED":return t.isOpen}return e},listViewToggleRef:function(e={current:null}){return e},publishSidebarActive:function(e=!1,t){switch(t.type){case"OPEN_PUBLISH_SIDEBAR":return!0;case"CLOSE_PUBLISH_SIDEBAR":return!1;case"TOGGLE_PUBLISH_SIDEBAR":return!e}return e},dataviews:_}),y=window.wp.blocks,x=window.wp.date,v=window.wp.url,w=window.wp.deprecated;var S=s.n(w);const k=window.wp.primitives,P=window.ReactJSXRuntime,C=(0,P.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(k.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"})}),j=window.wp.preferences,E=new Set(["meta"]),T="SAVE_POST_NOTICE_ID",B="TRASH_POST_NOTICE_ID",I=/%(?:postname|pagename)%/,N=6e4,A=["title","excerpt","content"],D="uncategorized",R="wp_template",M="wp_template_part",O="wp_block",L="wp_navigation",F={custom:"custom",theme:"theme",plugin:"plugin"},V=["wp_template","wp_template_part"],z=[...V,"wp_block","wp_navigation"],U=(0,P.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(k.Path,{d:"M18.5 10.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"})}),H=(0,P.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(k.Path,{fillRule:"evenodd",d:"M18 5.5h-8v8h8.5V6a.5.5 0 00-.5-.5zm-9.5 8h-3V6a.5.5 0 01.5-.5h2.5v8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})}),G=(0,P.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(k.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.5zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})}),$=(0,P.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(k.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-17.6 1L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})});function W(e){return"header"===e?U:"footer"===e?H:"sidebar"===e?G:$}const Z={},Y=(0,c.createRegistrySelector)((e=>()=>e(d.store).hasUndo())),K=(0,c.createRegistrySelector)((e=>()=>e(d.store).hasRedo()));function q(e){return"auto-draft"===te(e).status}function Q(e){return"content"in ae(e)}const X=(0,c.createRegistrySelector)((e=>t=>{const s=se(t),o=oe(t);return e(d.store).hasEditsForEntityRecord("postType",s,o)})),J=(0,c.createRegistrySelector)((e=>t=>{const s=e(d.store).__experimentalGetDirtyEntityRecords(),{type:o,id:n}=te(t);return s.some((e=>"postType"!==e.kind||e.name!==o||e.key!==n))}));function ee(e){return!X(e)&&q(e)}const te=(0,c.createRegistrySelector)((e=>t=>{const s=oe(t),o=se(t),n=e(d.store).getRawEntityRecord("postType",o,s);return n||Z}));function se(e){return e.postType}function oe(e){return e.postId}function ne(e){return e.templateId}function ie(e){var t;return null!==(t=te(e)._links?.["version-history"]?.[0]?.count)&&void 0!==t?t:0}function re(e){var t;return null!==(t=te(e)._links?.["predecessor-version"]?.[0]?.id)&&void 0!==t?t:null}const ae=(0,c.createRegistrySelector)((e=>t=>{const s=se(t),o=oe(t);return e(d.store).getEntityRecordEdits("postType",s,o)||Z}));function le(e,t){switch(t){case"type":return se(e);case"id":return oe(e);default:const s=te(e);if(!s.hasOwnProperty(t))break;return f(s[t])}}const ce=(0,c.createSelector)(((e,t)=>{const s=ae(e);return s.hasOwnProperty(t)?{...le(e,t),...s[t]}:le(e,t)}),((e,t)=>[le(e,t),ae(e)[t]]));function de(e,t){if("content"===t)return Ie(e);const s=ae(e);return s.hasOwnProperty(t)?E.has(t)?ce(e,t):s[t]:le(e,t)}const ue=(0,c.createRegistrySelector)((e=>(t,s)=>{if(!A.includes(s)&&"preview_link"!==s)return;const o=se(t);if("wp_template"===o)return!1;const n=oe(t),i=e(d.store).getCurrentUser()?.id,r=e(d.store).getAutosave(o,n,i);return r?f(r[s]):void 0}));function pe(e){if("private"===de(e,"status"))return"private";return de(e,"password")?"password":"public"}function he(e){return"pending"===te(e).status}function me(e,t){const s=t||te(e);return-1!==["publish","private"].indexOf(s.status)||"future"===s.status&&!(0,x.isInTheFuture)(new Date(Number((0,x.getDate)(s.date))-N))}function ge(e){return"future"===te(e).status&&!me(e)}function _e(e){const t=te(e);return X(e)||-1===["publish","private","future"].indexOf(t.status)}function fe(e){return!Se(e)&&(!!de(e,"title")||!!de(e,"excerpt")||!be(e)||"native"===u.Platform.OS)}const be=(0,c.createRegistrySelector)((e=>t=>{const s=oe(t),o=se(t),n=e(d.store).getEditedEntityRecord("postType",o,s);if("function"!=typeof n.content)return!n.content;const i=de(t,"blocks");if(0===i.length)return!0;if(i.length>1)return!1;const r=i[0].name;return(r===(0,y.getDefaultBlockName)()||r===(0,y.getFreeformContentHandlerName)())&&!Ie(t)})),ye=(0,c.createRegistrySelector)((e=>t=>{if(!fe(t))return!1;if(Fe(t))return!1;const s=se(t);if("wp_template"===s)return!1;const o=oe(t),n=e(d.store).hasFetchedAutosaves(s,o),i=e(d.store).getCurrentUser()?.id,r=e(d.store).getAutosave(s,o,i);return!!n&&(!r||(!!Q(t)||["title","excerpt","meta"].some((e=>f(r[e])!==de(t,e)))))}));function xe(e){const t=de(e,"date"),s=new Date(Number((0,x.getDate)(t))-N);return(0,x.isInTheFuture)(s)}function ve(e){const t=de(e,"date"),s=de(e,"modified"),o=te(e).status;return("draft"===o||"auto-draft"===o||"pending"===o)&&(t===s||null===t)}function we(e){return!!e.deleting.pending}function Se(e){return!!e.saving.pending}const ke=(0,c.createRegistrySelector)((e=>t=>{const s=e(d.store).__experimentalGetEntitiesBeingSaved(),{type:o,id:n}=te(t);return s.some((e=>"postType"!==e.kind||e.name!==o||e.key!==n))})),Pe=(0,c.createRegistrySelector)((e=>t=>{const s=se(t),o=oe(t);return!e(d.store).getLastEntitySaveError("postType",s,o)})),Ce=(0,c.createRegistrySelector)((e=>t=>{const s=se(t),o=oe(t);return!!e(d.store).getLastEntitySaveError("postType",s,o)}));function je(e){return Se(e)&&Boolean(e.saving.options?.isAutosave)}function Ee(e){return Se(e)&&Boolean(e.saving.options?.isPreview)}function Te(e){if(e.saving.pending||Se(e))return;let t=ue(e,"preview_link");t&&"draft"!==te(e).status||(t=de(e,"link"),t&&(t=(0,v.addQueryArgs)(t,{preview:!0})));const s=de(e,"featured_media");return t&&s?(0,v.addQueryArgs)(t,{_thumbnail_id:s}):t}const Be=(0,c.createRegistrySelector)((e=>()=>{const t=e(m.store).getBlocks();if(t.length>2)return null;let s;if(1===t.length&&(s=t[0].name,"core/embed"===s)){const e=t[0].attributes?.providerNameSlug;["youtube","vimeo"].includes(e)?s="core/video":["spotify","soundcloud"].includes(e)&&(s="core/audio")}switch(2===t.length&&"core/paragraph"===t[1].name&&(s=t[0].name),s){case"core/image":return"image";case"core/quote":case"core/pullquote":return"quote";case"core/gallery":return"gallery";case"core/video":return"video";case"core/audio":return"audio";default:return null}})),Ie=(0,c.createRegistrySelector)((e=>t=>{const s=oe(t),o=se(t),n=e(d.store).getEditedEntityRecord("postType",o,s);if(n){if("function"==typeof n.content)return n.content(n);if(n.blocks)return(0,y.__unstableSerializeAndClean)(n.blocks);if(n.content)return n.content}return""}));function Ne(e){return Se(e)&&!me(e)&&"publish"===de(e,"status")}function Ae(e){const t=de(e,"permalink_template");return I.test(t)}function De(e){const t=Me(e);if(!t)return null;const{prefix:s,postName:o,suffix:n}=t;return Ae(e)?s+o+n:s}function Re(e){return de(e,"slug")||(0,v.cleanForSlug)(de(e,"title"))||oe(e)}function Me(e){const t=de(e,"permalink_template");if(!t)return null;const s=de(e,"slug")||de(e,"generated_slug"),[o,n]=t.split(I);return{prefix:o,postName:s,suffix:n}}function Oe(e){return e.postLock.isLocked}function Le(e){return Object.keys(e.postSavingLock).length>0}function Fe(e){return Object.keys(e.postAutosavingLock).length>0}function Ve(e){return e.postLock.isTakeover}function ze(e){return e.postLock.user}function Ue(e){return e.postLock.activePostLock}function He(e){return Boolean(te(e)._links?.hasOwnProperty("wp:action-unfiltered-html"))}const Ge=(0,c.createRegistrySelector)((e=>()=>!!e(j.store).get("core","isPublishSidebarEnabled"))),$e=(0,c.createSelector)((e=>de(e,"blocks")||(0,y.parse)(Ie(e))),(e=>[de(e,"blocks"),Ie(e)]));function We(e,t){return e.removedPanels.includes(t)}const Ze=(0,c.createRegistrySelector)((e=>(t,s)=>{const o=e(j.store).get("core","inactivePanels");return!We(t,s)&&!o?.includes(s)})),Ye=(0,c.createRegistrySelector)((e=>(t,s)=>{const o=e(j.store).get("core","openPanels");return!!o?.includes(s)}));function Ke(e){return S()("select('core/editor').getEditorSelectionStart",{since:"5.8",alternative:"select('core/editor').getEditorSelection"}),de(e,"selection")?.selectionStart}function qe(e){return S()("select('core/editor').getEditorSelectionStart",{since:"5.8",alternative:"select('core/editor').getEditorSelection"}),de(e,"selection")?.selectionEnd}function Qe(e){return de(e,"selection")}function Xe(e){return!!e.postId}function Je(e){return e.editorSettings}function et(e){return e.renderingMode}const tt=(0,c.createRegistrySelector)((e=>t=>"zoom-out"===e(m.store).__unstableGetEditorMode()?"Desktop":t.deviceType));function st(e){return e.listViewPanel}function ot(e){return!!e.blockInserterPanel}const nt=(0,c.createRegistrySelector)((e=>()=>{var t;return null!==(t=e(j.store).get("core","editorMode"))&&void 0!==t?t:"visual"}));function it(){return S()("select('core/editor').getStateBeforeOptimisticTransaction",{since:"5.7",hint:"No state history is kept on this store anymore"}),null}function rt(){return S()("select('core/editor').inSomeHistory",{since:"5.7",hint:"No state history is kept on this store anymore"}),!1}function at(e){return(0,c.createRegistrySelector)((t=>(s,...o)=>(S()("`wp.data.select( 'core/editor' )."+e+"`",{since:"5.3",alternative:"`wp.data.select( 'core/block-editor' )."+e+"`",version:"6.2"}),t(m.store)[e](...o))))}const lt=at("getBlockName"),ct=at("isBlockValid"),dt=at("getBlockAttributes"),ut=at("getBlock"),pt=at("getBlocks"),ht=at("getClientIdsOfDescendants"),mt=at("getClientIdsWithDescendants"),gt=at("getGlobalBlockCount"),_t=at("getBlocksByClientId"),ft=at("getBlockCount"),bt=at("getBlockSelectionStart"),yt=at("getBlockSelectionEnd"),xt=at("getSelectedBlockCount"),vt=at("hasSelectedBlock"),wt=at("getSelectedBlockClientId"),St=at("getSelectedBlock"),kt=at("getBlockRootClientId"),Pt=at("getBlockHierarchyRootClientId"),Ct=at("getAdjacentBlockClientId"),jt=at("getPreviousBlockClientId"),Et=at("getNextBlockClientId"),Tt=at("getSelectedBlocksInitialCaretPosition"),Bt=at("getMultiSelectedBlockClientIds"),It=at("getMultiSelectedBlocks"),Nt=at("getFirstMultiSelectedBlockClientId"),At=at("getLastMultiSelectedBlockClientId"),Dt=at("isFirstMultiSelectedBlock"),Rt=at("isBlockMultiSelected"),Mt=at("isAncestorMultiSelected"),Ot=at("getMultiSelectedBlocksStartClientId"),Lt=at("getMultiSelectedBlocksEndClientId"),Ft=at("getBlockOrder"),Vt=at("getBlockIndex"),zt=at("isBlockSelected"),Ut=at("hasSelectedInnerBlock"),Ht=at("isBlockWithinSelection"),Gt=at("hasMultiSelection"),$t=at("isMultiSelecting"),Wt=at("isSelectionEnabled"),Zt=at("getBlockMode"),Yt=at("isTyping"),Kt=at("isCaretWithinFormattedText"),qt=at("getBlockInsertionPoint"),Qt=at("isBlockInsertionPointVisible"),Xt=at("isValidTemplate"),Jt=at("getTemplate"),es=at("getTemplateLock"),ts=at("canInsertBlockType"),ss=at("getInserterItems"),os=at("hasInserterItems"),ns=at("getBlockListSettings");function is(e){return Je(e)?.defaultTemplateTypes}const rs=(0,c.createSelector)((e=>{var t;return(null!==(t=Je(e)?.defaultTemplatePartAreas)&&void 0!==t?t:[]).map((e=>({...e,icon:W(e.icon)})))}),(e=>[Je(e)?.defaultTemplatePartAreas])),as=(0,c.createSelector)(((e,t)=>{var s;const o=is(e);return o&&null!==(s=Object.values(o).find((e=>e.slug===t)))&&void 0!==s?s:Z}),(e=>[is(e)])),ls=(0,c.createSelector)(((e,t)=>{if(!t)return Z;const{description:s,slug:o,title:n,area:i}=t,{title:r,description:a}=as(e,o),l="string"==typeof n?n:n?.rendered;return{title:l&&l!==o?l:r||o,description:("string"==typeof s?s:s?.raw)||a,icon:rs(e).find((e=>i===e.area))?.icon||C}}),(e=>[is(e),rs(e)])),cs=(0,c.createRegistrySelector)((e=>t=>{const s=se(t),o=e(d.store).getPostType(s);return o?.labels?.singular_name}));function ds(e){return e.publishSidebarActive}const us=window.wp.a11y,ps=window.wp.apiFetch;var hs=s.n(ps);const ms=window.wp.notices,gs=window.wp.i18n;function _s(e,t){return`wp-autosave-block-editor-post-${t?"auto-draft":e}`}function fs(e,t){window.sessionStorage.removeItem(_s(e,t))}const bs=(e,t,s)=>({dispatch:o})=>{o.setEditedPost(e.type,e.id);if("auto-draft"===e.status&&s){let n;n="content"in t?t.content:e.content.raw;let i=(0,y.parse)(n);i=(0,y.synchronizeBlocksWithTemplate)(i,s),o.resetEditorBlocks(i,{__unstableShouldCreateUndoLevel:!1})}t&&Object.values(t).some((([t,s])=>{var o;return s!==(null!==(o=e[t]?.raw)&&void 0!==o?o:e[t])}))&&o.editPost(t)};function ys(){return S()("wp.data.dispatch( 'core/editor' ).__experimentalTearDownEditor",{since:"6.5"}),{type:"DO_NOTHING"}}function xs(){return S()("wp.data.dispatch( 'core/editor' ).resetPost",{since:"6.0",version:"6.3",alternative:"Initialize the editor with the setupEditorState action"}),{type:"DO_NOTHING"}}function vs(){return S()("wp.data.dispatch( 'core/editor' ).updatePost",{since:"5.7",alternative:"Use the core entities store instead"}),{type:"DO_NOTHING"}}function ws(e){return S()("wp.data.dispatch( 'core/editor' ).setupEditorState",{since:"6.5",alternative:"wp.data.dispatch( 'core/editor' ).setEditedPost"}),Ss(e.type,e.id)}function Ss(e,t){return{type:"SET_EDITED_POST",postType:e,postId:t}}const ks=(e,t)=>({select:s,registry:o})=>{const{id:n,type:i}=s.getCurrentPost();o.dispatch(d.store).editEntityRecord("postType",i,n,e,t)},Ps=(e={})=>async({select:t,dispatch:s,registry:o})=>{if(!t.isEditedPostSaveable())return;const n=t.getEditedPostContent();e.isAutosave||s.editPost({content:n},{undoIgnore:!0});const i=t.getCurrentPost();let r={id:i.id,...o.select(d.store).getEntityRecordNonTransientEdits("postType",i.type,i.id),content:n};s({type:"REQUEST_POST_UPDATE_START",options:e});let a=!1;try{r=await(0,h.applyFiltersAsync)("editor.preSavePost",r,e)}catch(e){a=e}if(!a)try{await o.dispatch(d.store).saveEntityRecord("postType",i.type,r,e)}catch(e){a=e.message&&"unknown_error"!==e.code?e.message:(0,gs.__)("An error occurred while updating.")}if(a||(a=o.select(d.store).getLastEntitySaveError("postType",i.type,i.id)),!a)try{await(0,h.applyFilters)("editor.__unstableSavePost",Promise.resolve(),e)}catch(e){a=e}if(!a)try{await(0,h.doActionAsync)("editor.savePost",{id:i.id},e)}catch(e){a=e}if(s({type:"REQUEST_POST_UPDATE_FINISH",options:e}),a){const e=function(e){const{post:t,edits:s,error:o}=e;if(o&&"rest_autosave_no_changes"===o.code)return[];const n=["publish","private","future"],i=-1!==n.indexOf(t.status),r={publish:(0,gs.__)("Publishing failed."),private:(0,gs.__)("Publishing failed."),future:(0,gs.__)("Scheduling failed.")};let a=i||-1===n.indexOf(s.status)?(0,gs.__)("Updating failed."):r[s.status];return o.message&&!/<\/?[^>]*>/.test(o.message)&&(a=[a,o.message].join(" ")),[a,{id:T}]}({post:i,edits:r,error:a});e.length&&o.dispatch(ms.store).createErrorNotice(...e)}else{const s=t.getCurrentPost(),n=function(e){var t;const{previousPost:s,post:o,postType:n}=e;if(e.options?.isAutosave)return[];const i=["publish","private","future"],r=i.includes(s.status),a=i.includes(o.status),l="trash"===o.status&&"trash"!==s.status;let c,d,u=null!==(t=n?.viewable)&&void 0!==t&&t;l?(c=n.labels.item_trashed,u=!1):r||a?r&&!a?(c=n.labels.item_reverted_to_draft,u=!1):c=!r&&a?{publish:n.labels.item_published,private:n.labels.item_published_privately,future:n.labels.item_scheduled}[o.status]:n.labels.item_updated:(c=(0,gs.__)("Draft saved."),d=!0);const p=[];return u&&p.push({label:d?(0,gs.__)("View Preview"):n.labels.view_item,url:o.link}),[c,{id:T,type:"snackbar",actions:p}]}({previousPost:i,post:s,postType:await o.resolveSelect(d.store).getPostType(s.type),options:e});n.length&&o.dispatch(ms.store).createSuccessNotice(...n),e.isAutosave||o.dispatch(m.store).__unstableMarkLastChangeAsPersistent()}};function Cs(){return S()("wp.data.dispatch( 'core/editor' ).refreshPost",{since:"6.0",version:"6.3",alternative:"Use the core entities store instead"}),{type:"DO_NOTHING"}}const js=()=>async({select:e,dispatch:t,registry:s})=>{const o=e.getCurrentPostType(),n=await s.resolveSelect(d.store).getPostType(o);s.dispatch(ms.store).removeNotice(B);const{rest_base:i,rest_namespace:r="wp/v2"}=n;t({type:"REQUEST_POST_DELETE_START"});try{const s=e.getCurrentPost();await hs()({path:`/${r}/${i}/${s.id}`,method:"DELETE"}),await t.savePost()}catch(e){s.dispatch(ms.store).createErrorNotice(...(a={error:e},[a.error.message&&"unknown_error"!==a.error.code?a.error.message:(0,gs.__)("Trashing failed"),{id:B}]))}var a;t({type:"REQUEST_POST_DELETE_FINISH"})},Es=({local:e=!1,...t}={})=>async({select:s,dispatch:o})=>{const n=s.getCurrentPost();if("wp_template"!==n.type)if(e){const e=s.isEditedPostNew(),t=s.getEditedPostAttribute("title"),o=s.getEditedPostAttribute("content"),i=s.getEditedPostAttribute("excerpt");!function(e,t,s,o,n){window.sessionStorage.setItem(_s(e,t),JSON.stringify({post_title:s,content:o,excerpt:n}))}(n.id,e,t,o,i)}else await o.savePost({isAutosave:!0,...t})},Ts=({forceIsAutosaveable:e}={})=>async({select:t,dispatch:s})=>{if((e||t.isEditedPostAutosaveable())&&!t.isPostLocked()){["draft","auto-draft"].includes(t.getEditedPostAttribute("status"))?await s.savePost({isPreview:!0}):await s.autosave({isPreview:!0})}return t.getEditedPostPreviewLink()},Bs=()=>({registry:e})=>{e.dispatch(d.store).redo()},Is=()=>({registry:e})=>{e.dispatch(d.store).undo()};function Ns(){return S()("wp.data.dispatch( 'core/editor' ).createUndoLevel",{since:"6.0",version:"6.3",alternative:"Use the core entities store instead"}),{type:"DO_NOTHING"}}function As(e){return{type:"UPDATE_POST_LOCK",lock:e}}const Ds=()=>({registry:e})=>{e.dispatch(j.store).set("core","isPublishSidebarEnabled",!0)},Rs=()=>({registry:e})=>{e.dispatch(j.store).set("core","isPublishSidebarEnabled",!1)};function Ms(e){return{type:"LOCK_POST_SAVING",lockName:e}}function Os(e){return{type:"UNLOCK_POST_SAVING",lockName:e}}function Ls(e){return{type:"LOCK_POST_AUTOSAVING",lockName:e}}function Fs(e){return{type:"UNLOCK_POST_AUTOSAVING",lockName:e}}const Vs=(e,t={})=>({select:s,dispatch:o,registry:n})=>{const{__unstableShouldCreateUndoLevel:i,selection:r}=t,a={blocks:e,selection:r};if(!1!==i){const{id:e,type:t}=s.getCurrentPost();if(n.select(d.store).getEditedEntityRecord("postType",t,e).blocks===a.blocks)return void n.dispatch(d.store).__unstableCreateUndoLevel("postType",t,e);a.content=({blocks:e=[]})=>(0,y.__unstableSerializeAndClean)(e)}o.editPost(a)};function zs(e){return{type:"UPDATE_EDITOR_SETTINGS",settings:e}}const Us=e=>({dispatch:t,registry:s,select:o})=>{o.__unstableIsEditorReady()&&(s.dispatch(m.store).clearSelectedBlock(),t.editPost({selection:void 0},{undoIgnore:!0})),t({type:"SET_RENDERING_MODE",mode:e})};function Hs(e){return{type:"SET_DEVICE_TYPE",deviceType:e}}const Gs=e=>({registry:t})=>{var s;const o=null!==(s=t.select(j.store).get("core","inactivePanels"))&&void 0!==s?s:[];let n;n=!!o?.includes(e)?o.filter((t=>t!==e)):[...o,e],t.dispatch(j.store).set("core","inactivePanels",n)},$s=e=>({registry:t})=>{var s;const o=null!==(s=t.select(j.store).get("core","openPanels"))&&void 0!==s?s:[];let n;n=!!o?.includes(e)?o.filter((t=>t!==e)):[...o,e],t.dispatch(j.store).set("core","openPanels",n)};function Ws(e){return{type:"REMOVE_PANEL",panelName:e}}function Zs(e){return{type:"SET_IS_INSERTER_OPENED",value:e}}function Ys(e){return{type:"SET_IS_LIST_VIEW_OPENED",isOpen:e}}const Ks=()=>({dispatch:e,registry:t})=>{const s=t.select(j.store).get("core","distractionFree");s&&t.dispatch(j.store).set("core","fixedToolbar",!1),s||t.batch((()=>{t.dispatch(j.store).set("core","fixedToolbar",!0),e.setIsInserterOpened(!1),e.setIsListViewOpened(!1)})),t.batch((()=>{t.dispatch(j.store).set("core","distractionFree",!s),t.dispatch(ms.store).createInfoNotice(s?(0,gs.__)("Distraction free off."):(0,gs.__)("Distraction free on."),{id:"core/editor/distraction-free-mode/notice",type:"snackbar",actions:[{label:(0,gs.__)("Undo"),onClick:()=>{t.batch((()=>{t.dispatch(j.store).set("core","fixedToolbar",!!s),t.dispatch(j.store).toggle("core","distractionFree")}))}}]})}))},qs=e=>({dispatch:t,registry:s})=>{if(s.dispatch(j.store).set("core","editorMode",e),"visual"!==e&&s.dispatch(m.store).clearSelectedBlock(),"visual"===e)(0,us.speak)((0,gs.__)("Visual editor selected"),"assertive");else if("text"===e){s.select(j.store).get("core","distractionFree")&&t.toggleDistractionFree(),(0,us.speak)((0,gs.__)("Code editor selected"),"assertive")}};function Qs(){return{type:"OPEN_PUBLISH_SIDEBAR"}}function Xs(){return{type:"CLOSE_PUBLISH_SIDEBAR"}}function Js(){return{type:"TOGGLE_PUBLISH_SIDEBAR"}}const eo=e=>(...t)=>({registry:s})=>{S()("`wp.data.dispatch( 'core/editor' )."+e+"`",{since:"5.3",alternative:"`wp.data.dispatch( 'core/block-editor' )."+e+"`",version:"6.2"}),s.dispatch(m.store)[e](...t)},to=eo("resetBlocks"),so=eo("receiveBlocks"),oo=eo("updateBlock"),no=eo("updateBlockAttributes"),io=eo("selectBlock"),ro=eo("startMultiSelect"),ao=eo("stopMultiSelect"),lo=eo("multiSelect"),co=eo("clearSelectedBlock"),uo=eo("toggleSelection"),po=eo("replaceBlocks"),ho=eo("replaceBlock"),mo=eo("moveBlocksDown"),go=eo("moveBlocksUp"),_o=eo("moveBlockToPosition"),fo=eo("insertBlock"),bo=eo("insertBlocks"),yo=eo("showInsertionPoint"),xo=eo("hideInsertionPoint"),vo=eo("setTemplateValidity"),wo=eo("synchronizeTemplate"),So=eo("mergeBlocks"),ko=eo("removeBlocks"),Po=eo("removeBlock"),Co=eo("toggleBlockMode"),jo=eo("startTyping"),Eo=eo("stopTyping"),To=eo("enterFormattedText"),Bo=eo("exitFormattedText"),Io=eo("insertDefaultBlock"),No=eo("updateBlockListSettings"),Ao=window.wp.htmlEntities;const Do=window.wp.components,Ro=(0,P.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(k.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})});var Mo=function(){return Mo=Object.assign||function(e){for(var t,s=1,o=arguments.length;s<o;s++)for(var n in t=arguments[s])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},Mo.apply(this,arguments)};Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError;function Oo(e){return e.toLowerCase()}var Lo=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],Fo=/[^A-Z0-9]+/gi;function Vo(e,t,s){return t instanceof RegExp?e.replace(t,s):t.reduce((function(e,t){return e.replace(t,s)}),e)}function zo(e,t){return void 0===t&&(t={}),function(e,t){void 0===t&&(t={});for(var s=t.splitRegexp,o=void 0===s?Lo:s,n=t.stripRegexp,i=void 0===n?Fo:n,r=t.transform,a=void 0===r?Oo:r,l=t.delimiter,c=void 0===l?" ":l,d=Vo(Vo(e,o,"$1\0$2"),i,"\0"),u=0,p=d.length;"\0"===d.charAt(u);)u++;for(;"\0"===d.charAt(p-1);)p--;return d.slice(u,p).split("\0").map(a).join(c)}(e,Mo({delimiter:"."},t))}function Uo(e,t){return void 0===t&&(t={}),zo(e,Mo({delimiter:"-"},t))}const Ho=()=>(0,c.useSelect)((e=>e(d.store).getEntityRecords("postType",M,{per_page:-1})),[]),Go=(e,t)=>{const s=e.toLowerCase(),o=t.map((e=>e.title.rendered.toLowerCase()));if(!o.includes(s))return e;let n=2;for(;o.includes(`${s} ${n}`);)n++;return`${e} ${n}`},$o=e=>Uo(e).replace(/[^\w-]+/g,"")||"wp-custom-part";function Wo({modalTitle:e,...t}){const s=(0,c.useSelect)((e=>e(d.store).getPostType(M)?.labels?.add_new_item),[]);return(0,P.jsx)(Do.Modal,{title:e||s,onRequestClose:t.closeModal,overlayClassName:"editor-create-template-part-modal",focusOnMount:"firstContentElement",size:"medium",children:(0,P.jsx)(Zo,{...t})})}function Zo({defaultArea:e=D,blocks:t=[],confirmLabel:s=(0,gs.__)("Add"),closeModal:o,onCreate:n,onError:i,defaultTitle:r=""}){const{createErrorNotice:a}=(0,c.useDispatch)(ms.store),{saveEntityRecord:l}=(0,c.useDispatch)(d.store),h=Ho(),[m,g]=(0,u.useState)(r),[_,f]=(0,u.useState)(e),[b,x]=(0,u.useState)(!1),v=(0,p.useInstanceId)(Wo),w=(0,c.useSelect)((e=>e(qi).__experimentalGetDefaultTemplatePartAreas()),[]);return(0,P.jsx)("form",{onSubmit:async e=>{e.preventDefault(),await async function(){if(m&&!b)try{x(!0);const e=Go(m,h),s=$o(e),o=await l("postType",M,{slug:s,title:e,content:(0,y.serialize)(t),area:_},{throwOnError:!0});await n(o)}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,gs.__)("An error occurred while creating the template part.");a(t,{type:"snackbar"}),i?.()}finally{x(!1)}}()},children:(0,P.jsxs)(Do.__experimentalVStack,{spacing:"4",children:[(0,P.jsx)(Do.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,gs.__)("Name"),value:m,onChange:g,required:!0}),(0,P.jsx)(Do.BaseControl,{__nextHasNoMarginBottom:!0,label:(0,gs.__)("Area"),id:`editor-create-template-part-modal__area-selection-${v}`,className:"editor-create-template-part-modal__area-base-control",children:(0,P.jsx)(Do.__experimentalRadioGroup,{label:(0,gs.__)("Area"),className:"editor-create-template-part-modal__area-radio-group",id:`editor-create-template-part-modal__area-selection-${v}`,onChange:f,checked:_,children:w.map((({icon:e,label:t,area:s,description:o})=>(0,P.jsx)(Do.__experimentalRadio,{value:s,className:"editor-create-template-part-modal__area-radio",children:(0,P.jsxs)(Do.Flex,{align:"start",justify:"start",children:[(0,P.jsx)(Do.FlexItem,{children:(0,P.jsx)(Do.Icon,{icon:e})}),(0,P.jsxs)(Do.FlexBlock,{className:"editor-create-template-part-modal__option-label",children:[t,(0,P.jsx)("div",{children:o})]}),(0,P.jsx)(Do.FlexItem,{className:"editor-create-template-part-modal__checkbox",children:_===s&&(0,P.jsx)(Do.Icon,{icon:Ro})})]})},t)))})}),(0,P.jsxs)(Do.__experimentalHStack,{justify:"right",children:[(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{o()},children:(0,gs.__)("Cancel")}),(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit","aria-disabled":!m||b,isBusy:b,children:s})]})]})})}function Yo(e){return e.type===R||e.type===M}function Ko(e){return"string"==typeof e.title?(0,Ao.decodeEntities)(e.title):"rendered"in e.title?(0,Ao.decodeEntities)(e.title.rendered):"raw"in e.title?(0,Ao.decodeEntities)(e.title.raw):""}function qo(e){return!!e&&([e.source,e.source].includes(F.custom)&&!Boolean("wp_template"===e.type&&e?.plugin)&&!e.has_theme_file)}const Qo={id:"duplicate-template-part",label:(0,gs._x)("Duplicate","action label"),isEligible:e=>e.type===M,modalHeader:(0,gs._x)("Duplicate template part","action label"),RenderModal:({items:e,closeModal:t})=>{const[s]=e,o=(0,u.useMemo)((()=>{var e;return null!==(e=s.blocks)&&void 0!==e?e:(0,y.parse)("string"==typeof s.content?s.content:s.content.raw,{__unstableSkipMigrationLogs:!0})}),[s.content,s.blocks]),{createSuccessNotice:n}=(0,c.useDispatch)(ms.store);return(0,P.jsx)(Zo,{blocks:o,defaultArea:s.area,defaultTitle:(0,gs.sprintf)((0,gs._x)("%s (Copy)","template part"),Ko(s)),onCreate:function(){n((0,gs.sprintf)((0,gs._x)('"%s" duplicated.',"template part"),Ko(s)),{type:"snackbar",id:"edit-site-patterns-success"}),t?.()},onError:t,confirmLabel:(0,gs._x)("Duplicate","action label"),closeModal:t})}},Xo=Qo,Jo=(0,P.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(k.Path,{d:"M5.5 12h1.75l-2.5 3-2.5-3H4a8 8 0 113.134 6.35l.907-1.194A6.5 6.5 0 105.5 12zm9.53 1.97l-2.28-2.28V8.5a.75.75 0 00-1.5 0V12a.747.747 0 00.218.529l1.282-.84-1.28.842 2.5 2.5a.75.75 0 101.06-1.061z"})}),en=window.wp.privateApis,{lock:tn,unlock:sn}=(0,en.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/editor"),on={id:"reset-post",label:(0,gs.__)("Reset"),isEligible:e=>Yo(e)&&e?.source===F.custom&&(Boolean("wp_template"===e.type&&e?.plugin)||e?.has_theme_file),icon:Jo,supportsBulk:!0,hideModalHeader:!0,RenderModal:({items:e,closeModal:t,onActionPerformed:s})=>{const[o,n]=(0,u.useState)(!1),{revertTemplate:i}=sn((0,c.useDispatch)(qi)),{saveEditedEntityRecord:r}=(0,c.useDispatch)(d.store),{createSuccessNotice:a,createErrorNotice:l}=(0,c.useDispatch)(ms.store);return(0,P.jsxs)(Do.__experimentalVStack,{spacing:"5",children:[(0,P.jsx)(Do.__experimentalText,{children:(0,gs.__)("Reset to default and clear all customizations?")}),(0,P.jsxs)(Do.__experimentalHStack,{justify:"right",children:[(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,disabled:o,accessibleWhenDisabled:!0,children:(0,gs.__)("Cancel")}),(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:async()=>{n(!0),await(async()=>{try{for(const t of e)await i(t,{allowUndo:!1}),await r("postType",t.type,t.id);a(e.length>1?(0,gs.sprintf)((0,gs.__)("%s items reset."),e.length):(0,gs.sprintf)((0,gs.__)('"%s" reset.'),Ko(e[0])),{type:"snackbar",id:"revert-template-action"})}catch(t){let s;s=e[0].type===R?1===e.length?(0,gs.__)("An error occurred while reverting the template."):(0,gs.__)("An error occurred while reverting the templates."):1===e.length?(0,gs.__)("An error occurred while reverting the template part."):(0,gs.__)("An error occurred while reverting the template parts.");const o=t,n=o.message&&"unknown_error"!==o.code?o.message:s;l(n,{type:"snackbar"})}})(),s?.(e),n(!1),t?.()},isBusy:o,disabled:o,accessibleWhenDisabled:!0,children:(0,gs.__)("Reset")})]})]})}},nn=on,rn=(0,P.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(k.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z"})}),an={id:"move-to-trash",label:(0,gs.__)("Move to trash"),isPrimary:!0,icon:rn,isEligible:e=>!Yo(e)&&"wp_block"!==e.type&&(!!e.status&&!["auto-draft","trash"].includes(e.status)&&e.permissions?.delete),supportsBulk:!0,hideModalHeader:!0,RenderModal:({items:e,closeModal:t,onActionPerformed:s})=>{const[o,n]=(0,u.useState)(!1),{createSuccessNotice:i,createErrorNotice:r}=(0,c.useDispatch)(ms.store),{deleteEntityRecord:a}=(0,c.useDispatch)(d.store);return(0,P.jsxs)(Do.__experimentalVStack,{spacing:"5",children:[(0,P.jsx)(Do.__experimentalText,{children:1===e.length?(0,gs.sprintf)((0,gs.__)('Are you sure you want to move "%s" to the trash?'),Ko(e[0])):(0,gs.sprintf)((0,gs._n)("Are you sure you want to move %d item to the trash ?","Are you sure you want to move %d items to the trash ?",e.length),e.length)}),(0,P.jsxs)(Do.__experimentalHStack,{justify:"right",children:[(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,disabled:o,accessibleWhenDisabled:!0,children:(0,gs.__)("Cancel")}),(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:async()=>{n(!0);const o=await Promise.allSettled(e.map((e=>a("postType",e.type,e.id.toString(),{},{throwOnError:!0}))));if(o.every((({status:e})=>"fulfilled"===e))){let t;t=1===o.length?(0,gs.sprintf)((0,gs.__)('"%s" moved to the trash.'),Ko(e[0])):(0,gs.sprintf)((0,gs._n)("%s item moved to the trash.","%s items moved to the trash.",e.length),e.length),i(t,{type:"snackbar",id:"move-to-trash-action"})}else{let e;if(1===o.length){const t=o[0];e=t.reason?.message?t.reason.message:(0,gs.__)("An error occurred while moving the item to the trash.")}else{const t=new Set,s=o.filter((({status:e})=>"rejected"===e));for(const e of s){const s=e;s.reason?.message&&t.add(s.reason.message)}e=0===t.size?(0,gs.__)("An error occurred while moving the items to the trash."):1===t.size?(0,gs.sprintf)((0,gs.__)("An error occurred while moving the item to the trash: %s"),[...t][0]):(0,gs.sprintf)((0,gs.__)("Some errors occurred while moving the items to the trash: %s"),[...t].join(","))}r(e,{type:"snackbar"})}s&&s(e),n(!1),t?.()},isBusy:o,disabled:o,accessibleWhenDisabled:!0,children:(0,gs._x)("Trash","verb")})]})]})}},ln=an,cn=window.wp.patterns,{PATTERN_TYPES:dn}=sn(cn.privateApis),un={id:"rename-post",label:(0,gs.__)("Rename"),isEligible:e=>"trash"!==e.status&&([R,M,...Object.values(dn)].includes(e.type)?function(e){return e.type===R}(e)?qo(e)&&e.is_custom&&e.permissions?.update:function(e){return e.type===M}(e)?e.source===F.custom&&!e?.has_theme_file&&e.permissions?.update:e.type===dn.user&&e.permissions?.update:e.permissions?.update),RenderModal:({items:e,closeModal:t,onActionPerformed:s})=>{const[o]=e,[n,i]=(0,u.useState)((()=>Ko(o))),{editEntityRecord:r,saveEditedEntityRecord:a}=(0,c.useDispatch)(d.store),{createSuccessNotice:l,createErrorNotice:p}=(0,c.useDispatch)(ms.store);return(0,P.jsx)("form",{onSubmit:async function(c){c.preventDefault();try{await r("postType",o.type,o.id,{title:n}),i(""),t?.(),await a("postType",o.type,o.id,{throwOnError:!0}),l((0,gs.__)("Name updated"),{type:"snackbar"}),s?.(e)}catch(e){const t=e,s=t.message&&"unknown_error"!==t.code?t.message:(0,gs.__)("An error occurred while updating the name");p(s,{type:"snackbar"})}},children:(0,P.jsxs)(Do.__experimentalVStack,{spacing:"5",children:[(0,P.jsx)(Do.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,gs.__)("Name"),value:n,onChange:i,required:!0}),(0,P.jsxs)(Do.__experimentalHStack,{justify:"right",children:[(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t?.()},children:(0,gs.__)("Cancel")}),(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,gs.__)("Save")})]})]})})}},pn=un,hn={id:"restore",label:(0,gs.__)("Restore"),isPrimary:!0,icon:Jo,supportsBulk:!0,isEligible:e=>!Yo(e)&&"wp_block"!==e.type&&"trash"===e.status&&e.permissions?.update,async callback(e,{registry:t,onActionPerformed:s}){const{createSuccessNotice:o,createErrorNotice:n}=t.dispatch(ms.store),{editEntityRecord:i,saveEditedEntityRecord:r}=t.dispatch(d.store);await Promise.allSettled(e.map((e=>i("postType",e.type,e.id,{status:"draft"}))));const a=await Promise.allSettled(e.map((e=>r("postType",e.type,e.id,{throwOnError:!0}))));if(a.every((({status:e})=>"fulfilled"===e))){let t;t=1===e.length?(0,gs.sprintf)((0,gs.__)('"%s" has been restored.'),Ko(e[0])):"page"===e[0].type?(0,gs.sprintf)((0,gs.__)("%d pages have been restored."),e.length):(0,gs.sprintf)((0,gs.__)("%d posts have been restored."),e.length),o(t,{type:"snackbar",id:"restore-post-action"}),s&&s(e)}else{let e;if(1===a.length){const t=a[0];e=t.reason?.message?t.reason.message:(0,gs.__)("An error occurred while restoring the post.")}else{const t=new Set,s=a.filter((({status:e})=>"rejected"===e));for(const e of s){const s=e;s.reason?.message&&t.add(s.reason.message)}e=0===t.size?(0,gs.__)("An error occurred while restoring the posts."):1===t.size?(0,gs.sprintf)((0,gs.__)("An error occurred while restoring the posts: %s"),[...t][0]):(0,gs.sprintf)((0,gs.__)("Some errors occurred while restoring the posts: %s"),[...t].join(","))}n(e,{type:"snackbar"})}}},mn=(0,P.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(k.Path,{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"})}),gn={id:"view-post",label:(0,gs._x)("View","verb"),isPrimary:!0,icon:mn,isEligible:e=>"trash"!==e.status,callback(e,{onActionPerformed:t}){const s=e[0];window.open(s?.link,"_blank"),t&&t(e)}},_n={id:"view-post-revisions",context:"list",label(e){var t;const s=null!==(t=e[0]._links?.["version-history"]?.[0]?.count)&&void 0!==t?t:0;return(0,gs.sprintf)((0,gs.__)("View revisions (%s)"),s)},isEligible(e){var t,s;if("trash"===e.status)return!1;const o=null!==(t=e?._links?.["predecessor-version"]?.[0]?.id)&&void 0!==t?t:null,n=null!==(s=e?._links?.["version-history"]?.[0]?.count)&&void 0!==s?s:0;return!!o&&n>1},callback(e,{onActionPerformed:t}){const s=e[0],o=(0,v.addQueryArgs)("revision.php",{revision:s?._links?.["predecessor-version"]?.[0]?.id});document.location.href=o,t&&t(e)}},{lock:fn,unlock:bn}=(0,en.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/fields"),{CreatePatternModalContents:yn,useDuplicatePatternProps:xn}=bn(cn.privateApis),vn={id:"duplicate-pattern",label:(0,gs._x)("Duplicate","action label"),isEligible:e=>"wp_template_part"!==e.type,modalHeader:(0,gs._x)("Duplicate pattern","action label"),RenderModal:({items:e,closeModal:t})=>{const[s]=e,o=xn({pattern:s,onSuccess:()=>t?.()});return(0,P.jsx)(yn,{onClose:t,confirmLabel:(0,gs._x)("Duplicate","action label"),...o})}},wn=vn;const Sn={sort:function(e,t,s){return"asc"===s?e-t:t-e},isValid:function(e,t){if(""===e)return!1;if(!Number.isInteger(Number(e)))return!1;if(t?.elements){const s=t?.elements.map((e=>e.value));if(!s.includes(Number(e)))return!1}return!0},Edit:"integer"};const kn={sort:function(e,t,s){return"asc"===s?e.localeCompare(t):t.localeCompare(e)},isValid:function(e,t){if(t?.elements){const s=t?.elements?.map((e=>e.value));if(!s.includes(e))return!1}return!0},Edit:"text"};const Pn={sort:function(e,t,s){const o=new Date(e).getTime(),n=new Date(t).getTime();return"asc"===s?o-n:n-o},isValid:function(e,t){if(t?.elements){const s=t?.elements.map((e=>e.value));if(!s.includes(e))return!1}return!0},Edit:"datetime"};const Cn={datetime:function({data:e,field:t,onChange:s,hideLabelFromVision:o}){const{id:n,label:i}=t,r=t.getValue({item:e}),a=(0,u.useCallback)((e=>s({[n]:e})),[n,s]);return(0,P.jsxs)("fieldset",{className:"dataviews-controls__datetime",children:[!o&&(0,P.jsx)(Do.BaseControl.VisualLabel,{as:"legend",children:i}),o&&(0,P.jsx)(Do.VisuallyHidden,{as:"legend",children:i}),(0,P.jsx)(Do.TimePicker,{currentTime:r,onChange:a,hideLabelFromVision:!0})]})},integer:function({data:e,field:t,onChange:s,hideLabelFromVision:o}){var n;const{id:i,label:r,description:a}=t,l=null!==(n=t.getValue({item:e}))&&void 0!==n?n:"",c=(0,u.useCallback)((e=>s({[i]:Number(e)})),[i,s]);return(0,P.jsx)(Do.__experimentalNumberControl,{label:r,help:a,value:l,onChange:c,__next40pxDefaultSize:!0,hideLabelFromVision:o})},radio:function({data:e,field:t,onChange:s,hideLabelFromVision:o}){const{id:n,label:i}=t,r=t.getValue({item:e}),a=(0,u.useCallback)((e=>s({[n]:e})),[n,s]);return t.elements?(0,P.jsx)(Do.RadioControl,{label:i,onChange:a,options:t.elements,selected:r,hideLabelFromVision:o}):null},select:function({data:e,field:t,onChange:s,hideLabelFromVision:o}){var n,i;const{id:r,label:a}=t,l=null!==(n=t.getValue({item:e}))&&void 0!==n?n:"",c=(0,u.useCallback)((e=>s({[r]:e})),[r,s]),d=[{label:(0,gs.__)("Select item"),value:""},...null!==(i=t?.elements)&&void 0!==i?i:[]];return(0,P.jsx)(Do.SelectControl,{label:a,value:l,options:d,onChange:c,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,hideLabelFromVision:o})},text:function({data:e,field:t,onChange:s,hideLabelFromVision:o}){const{id:n,label:i,placeholder:r}=t,a=t.getValue({item:e}),l=(0,u.useCallback)((e=>s({[n]:e})),[n,s]);return(0,P.jsx)(Do.TextControl,{label:i,placeholder:r,value:null!=a?a:"",onChange:l,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,hideLabelFromVision:o})}};function jn(e){if(Object.keys(Cn).includes(e))return Cn[e];throw"Control "+e+" not found"}function En(e){return e.map((e=>{var t,s,o,n;const i="integer"===(r=e.type)?Sn:"text"===r?kn:"datetime"===r?Pn:{sort:(e,t,s)=>"number"==typeof e&&"number"==typeof t?"asc"===s?e-t:t-e:"asc"===s?e.localeCompare(t):t.localeCompare(e),isValid:(e,t)=>{if(t?.elements){const s=t?.elements?.map((e=>e.value));if(!s.includes(e))return!1}return!0},Edit:()=>null};var r;const a=e.getValue||(({item:t})=>t[e.id]),l=null!==(t=e.sort)&&void 0!==t?t:function(e,t,s){return i.sort(a({item:e}),a({item:t}),s)},c=null!==(s=e.isValid)&&void 0!==s?s:function(e,t){return i.isValid(a({item:e}),t)},d=function(e,t){return"function"==typeof e.Edit?e.Edit:"string"==typeof e.Edit?jn(e.Edit):e.elements?jn("select"):"string"==typeof t.Edit?jn(t.Edit):t.Edit}(e,i),u=e.render||(e.elements?({item:t})=>{const s=a({item:t});return e?.elements?.find((e=>e.value===s))?.label||a({item:t})}:a);return{...e,label:e.label||e.id,header:e.header||e.label||e.id,getValue:a,render:u,sort:l,isValid:c,Edit:d,enableHiding:null===(o=e.enableHiding)||void 0===o||o,enableSorting:null===(n=e.enableSorting)||void 0===n||n}}))}function Tn(e,t,s){return En(t.filter((({id:e})=>!!s.fields?.includes(e)))).every((t=>t.isValid(e,{elements:t.elements})))}const Bn=(0,P.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(k.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 In({title:e,onClose:t}){return(0,P.jsx)(Do.__experimentalVStack,{className:"dataforms-layouts-panel__dropdown-header",spacing:4,children:(0,P.jsxs)(Do.__experimentalHStack,{alignment:"center",children:[(0,P.jsx)(Do.__experimentalHeading,{level:2,size:13,children:e}),(0,P.jsx)(Do.__experimentalSpacer,{}),t&&(0,P.jsx)(Do.Button,{label:(0,gs.__)("Close"),icon:Bn,onClick:t,size:"small"})]})})}function Nn({data:e,field:t,onChange:s}){const[o,n]=(0,u.useState)(null),i=(0,u.useMemo)((()=>({anchor:o,placement:"left-start",offset:36,shift:!0})),[o]);return(0,P.jsxs)(Do.__experimentalHStack,{ref:n,className:"dataforms-layouts-panel__field",children:[(0,P.jsx)("div",{className:"dataforms-layouts-panel__field-label",children:t.label}),(0,P.jsx)("div",{children:(0,P.jsx)(Do.Dropdown,{contentClassName:"dataforms-layouts-panel__field-dropdown",popoverProps:i,focusOnMount:!0,toggleProps:{size:"compact",variant:"tertiary",tooltipPosition:"middle left"},renderToggle:({isOpen:s,onToggle:o})=>(0,P.jsx)(Do.Button,{className:"dataforms-layouts-panel__field-control",size:"compact",variant:"tertiary","aria-expanded":s,"aria-label":(0,gs.sprintf)((0,gs._x)("Edit %s","field"),t.label),onClick:o,children:(0,P.jsx)(t.render,{item:e})}),renderContent:({onClose:o})=>(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(In,{title:t.label,onClose:o}),(0,P.jsx)(t.Edit,{data:e,field:t,onChange:s,hideLabelFromVision:!0},t.id)]})})})]})}const An=[{type:"regular",component:function({data:e,fields:t,form:s,onChange:o}){const n=(0,u.useMemo)((()=>{var e;return En((null!==(e=s.fields)&&void 0!==e?e:[]).map((e=>t.find((({id:t})=>t===e)))).filter((e=>!!e)))}),[t,s.fields]);return(0,P.jsx)(Do.__experimentalVStack,{spacing:4,children:n.map((t=>(0,P.jsx)(t.Edit,{data:e,field:t,onChange:o},t.id)))})}},{type:"panel",component:function({data:e,fields:t,form:s,onChange:o}){const n=(0,u.useMemo)((()=>{var e;return En((null!==(e=s.fields)&&void 0!==e?e:[]).map((e=>t.find((({id:t})=>t===e)))).filter((e=>!!e)))}),[t,s.fields]);return(0,P.jsx)(Do.__experimentalVStack,{spacing:2,children:n.map((t=>(0,P.jsx)(Nn,{data:e,field:t,onChange:o},t.id)))})}}];function Dn({form:e,...t}){var s;const o=(n=null!==(s=e.type)&&void 0!==s?s:"regular",An.find((e=>e.type===n)));var n;return o?(0,P.jsx)(o.component,{form:e,...t}):null}const Rn=[{type:"integer",id:"menu_order",label:(0,gs.__)("Order"),description:(0,gs.__)("Determines the order of pages.")}],Mn={fields:["menu_order"]};const On={id:"order-pages",label:(0,gs.__)("Order"),isEligible:({status:e})=>"trash"!==e,RenderModal:function({items:e,closeModal:t,onActionPerformed:s}){const[o,n]=(0,u.useState)(e[0]),i=o.menu_order,{editEntityRecord:r,saveEditedEntityRecord:a}=(0,c.useDispatch)(d.store),{createSuccessNotice:l,createErrorNotice:p}=(0,c.useDispatch)(ms.store),h=!Tn(o,Rn,Mn);return(0,P.jsx)("form",{onSubmit:async function(n){if(n.preventDefault(),Tn(o,Rn,Mn))try{await r("postType",o.type,o.id,{menu_order:i}),t?.(),await a("postType",o.type,o.id,{throwOnError:!0}),l((0,gs.__)("Order updated."),{type:"snackbar"}),s?.(e)}catch(e){const t=e,s=t.message&&"unknown_error"!==t.code?t.message:(0,gs.__)("An error occurred while updating the order");p(s,{type:"snackbar"})}},children:(0,P.jsxs)(Do.__experimentalVStack,{spacing:"5",children:[(0,P.jsx)("div",{children:(0,gs.__)("Determines the order of pages. Pages with the same order value are sorted alphabetically. Negative order values are supported.")}),(0,P.jsx)(Dn,{data:o,fields:Rn,form:Mn,onChange:e=>n({...o,...e})}),(0,P.jsxs)(Do.__experimentalHStack,{justify:"right",children:[(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t?.()},children:(0,gs.__)("Cancel")}),(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",accessibleWhenDisabled:!0,disabled:h,children:(0,gs.__)("Save")})]})]})})}},Ln=On;"stream"in Blob.prototype||Object.defineProperty(Blob.prototype,"stream",{value(){return new Response(this).body}}),"setBigUint64"in DataView.prototype||Object.defineProperty(DataView.prototype,"setBigUint64",{value(e,t,s){const o=Number(0xffffffffn&t),n=Number(t>>32n);this.setUint32(e+(s?0:4),o,s),this.setUint32(e+(s?4:0),n,s)}});var Fn=e=>new DataView(new ArrayBuffer(e)),Vn=e=>new Uint8Array(e.buffer||e),zn=e=>(new TextEncoder).encode(String(e)),Un=e=>Math.min(4294967295,Number(e)),Hn=e=>Math.min(65535,Number(e));function Gn(e,t){if(void 0===t||t instanceof Date||(t=new Date(t)),e instanceof File)return{isFile:1,t:t||new Date(e.lastModified),i:e.stream()};if(e instanceof Response)return{isFile:1,t:t||new Date(e.headers.get("Last-Modified")||Date.now()),i:e.body};if(void 0===t)t=new Date;else if(isNaN(t))throw new Error("Invalid modification date.");if(void 0===e)return{isFile:0,t};if("string"==typeof e)return{isFile:1,t,i:zn(e)};if(e instanceof Blob)return{isFile:1,t,i:e.stream()};if(e instanceof Uint8Array||e instanceof ReadableStream)return{isFile:1,t,i:e};if(e instanceof ArrayBuffer||ArrayBuffer.isView(e))return{isFile:1,t,i:Vn(e)};if(Symbol.asyncIterator in e)return{isFile:1,t,i:$n(e[Symbol.asyncIterator]())};throw new TypeError("Unsupported input format.")}function $n(e,t=e){return new ReadableStream({async pull(t){let s=0;for(;t.desiredSize>s;){const o=await e.next();if(!o.value){t.close();break}{const e=Wn(o.value);t.enqueue(e),s+=e.byteLength}}},cancel(e){t.throw?.(e)}})}function Wn(e){return"string"==typeof e?zn(e):e instanceof Uint8Array?e:Vn(e)}function Zn(e,t,s){let[o,n]=function(e){return e?e instanceof Uint8Array?[e,1]:ArrayBuffer.isView(e)||e instanceof ArrayBuffer?[Vn(e),1]:[zn(e),0]:[void 0,0]}(t);if(e instanceof File)return{o:Kn(o||zn(e.name)),u:BigInt(e.size),l:n};if(e instanceof Response){const t=e.headers.get("content-disposition"),i=t&&t.match(/;\s*filename\*?\s*=\s*(?:UTF-\d+''|)["']?([^;"'\r\n]*)["']?(?:;|$)/i),r=i&&i[1]||e.url&&new URL(e.url).pathname.split("/").findLast(Boolean),a=r&&decodeURIComponent(r),l=s||+e.headers.get("content-length");return{o:Kn(o||zn(a)),u:BigInt(l),l:n}}return o=Kn(o,void 0!==e||void 0!==s),"string"==typeof e?{o,u:BigInt(zn(e).length),l:n}:e instanceof Blob?{o,u:BigInt(e.size),l:n}:e instanceof ArrayBuffer||ArrayBuffer.isView(e)?{o,u:BigInt(e.byteLength),l:n}:{o,u:Yn(e,s),l:n}}function Yn(e,t){return t>-1?BigInt(t):e?void 0:0n}function Kn(e,t=1){if(!e||e.every((e=>47===e)))throw new Error("The file must have a name.");if(t)for(;47===e[e.length-1];)e=e.subarray(0,-1);else 47!==e[e.length-1]&&(e=new Uint8Array([...e,47]));return e}var qn=new Uint32Array(256);for(let e=0;e<256;++e){let t=e;for(let e=0;e<8;++e)t=t>>>1^(1&t&&3988292384);qn[e]=t}function Qn(e,t=0){t^=-1;for(var s=0,o=e.length;s<o;s++)t=t>>>8^qn[255&t^e[s]];return(-1^t)>>>0}function Xn(e,t,s=0){const o=e.getSeconds()>>1|e.getMinutes()<<5|e.getHours()<<11,n=e.getDate()|e.getMonth()+1<<5|e.getFullYear()-1980<<9;t.setUint16(s,o,1),t.setUint16(s+2,n,1)}function Jn({o:e,l:t},s){return 8*(!t||(s??function(e){try{ei.decode(e)}catch{return 0}return 1}(e)))}var ei=new TextDecoder("utf8",{fatal:1});function ti(e,t=0){const s=Fn(30);return s.setUint32(0,1347093252),s.setUint32(4,754976768|t),Xn(e.t,s,10),s.setUint16(26,e.o.length,1),Vn(s)}async function*si(e){let{i:t}=e;if("then"in t&&(t=await t),t instanceof Uint8Array)yield t,e.m=Qn(t,0),e.u=BigInt(t.length);else{e.u=0n;const s=t.getReader();for(;;){const{value:t,done:o}=await s.read();if(o)break;e.m=Qn(t,e.m),e.u+=BigInt(t.length),yield t}}}function oi(e,t){const s=Fn(16+(t?8:0));return s.setUint32(0,1347094280),s.setUint32(4,e.isFile?e.m:0,1),t?(s.setBigUint64(8,e.u,1),s.setBigUint64(16,e.u,1)):(s.setUint32(8,Un(e.u),1),s.setUint32(12,Un(e.u),1)),Vn(s)}function ni(e,t,s=0,o=0){const n=Fn(46);return n.setUint32(0,1347092738),n.setUint32(4,755182848),n.setUint16(8,2048|s),Xn(e.t,n,12),n.setUint32(16,e.isFile?e.m:0,1),n.setUint32(20,Un(e.u),1),n.setUint32(24,Un(e.u),1),n.setUint16(28,e.o.length,1),n.setUint16(30,o,1),n.setUint16(40,e.isFile?33204:16893,1),n.setUint32(42,Un(t),1),Vn(n)}function ii(e,t,s){const o=Fn(s);return o.setUint16(0,1,1),o.setUint16(2,s-4,1),16&s&&(o.setBigUint64(4,e.u,1),o.setBigUint64(12,e.u,1)),o.setBigUint64(s-8,t,1),Vn(o)}function ri(e){return e instanceof File||e instanceof Response?[[e],[e]]:[[e.input,e.name,e.size],[e.input,e.lastModified]]}function ai(e,t={}){const s={"Content-Type":"application/zip","Content-Disposition":"attachment"};return("bigint"==typeof t.length||Number.isInteger(t.length))&&t.length>0&&(s["Content-Length"]=String(t.length)),t.metadata&&(s["Content-Length"]=String((e=>function(e){let t=BigInt(22),s=0n,o=0;for(const n of e){if(!n.o)throw new Error("Every file must have a non-empty name.");if(void 0===n.u)throw new Error(`Missing size for file "${(new TextDecoder).decode(n.o)}".`);const e=n.u>=0xffffffffn,i=s>=0xffffffffn;s+=BigInt(46+n.o.length+(e&&8))+n.u,t+=BigInt(n.o.length+46+(12*i|28*e)),o||(o=e)}return(o||s>=0xffffffffn)&&(t+=BigInt(76)),t+s}(function*(e){for(const t of e)yield Zn(...ri(t)[0])}(e)))(t.metadata))),new Response(li(e,t),{headers:s})}function li(e,t={}){const s=function(e){const t=e[Symbol.iterator in e?Symbol.iterator:Symbol.asyncIterator]();return{async next(){const e=await t.next();if(e.done)return e;const[s,o]=ri(e.value);return{done:0,value:Object.assign(Gn(...o),Zn(...s))}},throw:t.throw?.bind(t),[Symbol.asyncIterator](){return this}}}(e);return $n(async function*(e,t){const s=[];let o=0n,n=0n,i=0;for await(const r of e){const e=Jn(r,t.buffersAreUTF8);yield ti(r,e),yield new Uint8Array(r.o),r.isFile&&(yield*si(r));const a=r.u>=0xffffffffn,l=12*(o>=0xffffffffn)|28*a;yield oi(r,a),s.push(ni(r,o,e,l)),s.push(r.o),l&&s.push(ii(r,o,l)),a&&(o+=8n),n++,o+=BigInt(46+r.o.length)+r.u,i||(i=a)}let r=0n;for(const e of s)yield e,r+=BigInt(e.length);if(i||o>=0xffffffffn){const e=Fn(76);e.setUint32(0,1347094022),e.setBigUint64(4,BigInt(44),1),e.setUint32(12,755182848),e.setBigUint64(24,n,1),e.setBigUint64(32,n,1),e.setBigUint64(40,r,1),e.setBigUint64(48,o,1),e.setUint32(56,1347094023),e.setBigUint64(64,o+r,1),e.setUint32(72,1,1),yield Vn(e)}const a=Fn(22);a.setUint32(0,1347093766),a.setUint16(8,Hn(n),1),a.setUint16(10,Hn(n),1),a.setUint32(12,Un(r),1),a.setUint32(16,Un(o),1),yield Vn(a)}(s,t),s)}const ci=window.wp.blob,di=(0,P.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(k.Path,{d:"M18 11.3l-1-1.1-4 4V3h-1.5v11.3L7 10.2l-1 1.1 6.2 5.8 5.8-5.8zm.5 3.7v3.5h-13V15H4v5h16v-5h-1.5z"})}),ui="wp_template",pi="wp_template_part";function hi(e){return"string"==typeof e.title?(0,Ao.decodeEntities)(e.title):"rendered"in e.title?(0,Ao.decodeEntities)(e.title.rendered):"raw"in e.title?(0,Ao.decodeEntities)(e.title.raw):""}function mi(e){return JSON.stringify({__file:e.type,title:hi(e),content:"string"==typeof e.content?e.content:e.content?.raw,syncStatus:e.wp_pattern_sync_status},null,2)}const gi={id:"export-pattern",label:(0,gs.__)("Export as JSON"),icon:di,supportsBulk:!0,isEligible:e=>"wp_block"===e.type,callback:async e=>{if(1===e.length)return(0,ci.downloadBlob)(`${Uo(hi(e[0])||e[0].slug)}.json`,mi(e[0]),"application/json");const t={},s=e.map((e=>{const s=Uo(hi(e)||e.slug);return t[s]=(t[s]||0)+1,{name:s+(t[s]>1?"-"+(t[s]-1):"")+".json",lastModified:new Date,input:mi(e)}}));return(0,ci.downloadBlob)((0,gs.__)("patterns-export")+".zip",await ai(s).blob(),"application/zip")}},_i={id:"permanently-delete",label:(0,gs.__)("Permanently delete"),supportsBulk:!0,icon:rn,isEligible(e){if(function(e){return e.type===ui||e.type===pi}(e)||"wp_block"===e.type)return!1;const{status:t,permissions:s}=e;return"trash"===t&&s?.delete},async callback(e,{registry:t,onActionPerformed:s}){const{createSuccessNotice:o,createErrorNotice:n}=t.dispatch(ms.store),{deleteEntityRecord:i}=t.dispatch(d.store),r=await Promise.allSettled(e.map((e=>i("postType",e.type,e.id,{force:!0},{throwOnError:!0}))));if(r.every((({status:e})=>"fulfilled"===e))){let t;t=1===r.length?(0,gs.sprintf)((0,gs.__)('"%s" permanently deleted.'),hi(e[0])):(0,gs.__)("The items were permanently deleted."),o(t,{type:"snackbar",id:"permanently-delete-post-action"}),s?.(e)}else{let e;if(1===r.length){const t=r[0];e=t.reason?.message?t.reason.message:(0,gs.__)("An error occurred while permanently deleting the item.")}else{const t=new Set,s=r.filter((({status:e})=>"rejected"===e));for(const e of s){const s=e;s.reason?.message&&t.add(s.reason.message)}e=0===t.size?(0,gs.__)("An error occurred while permanently deleting the items."):1===t.size?(0,gs.sprintf)((0,gs.__)("An error occurred while permanently deleting the items: %s"),[...t][0]):(0,gs.sprintf)((0,gs.__)("Some errors occurred while permanently deleting the items: %s"),[...t].join(","))}n(e,{type:"snackbar"})}}},fi=_i,{PATTERN_TYPES:bi}=sn(cn.privateApis),yi={id:"delete-post",label:(0,gs.__)("Delete"),isPrimary:!0,icon:rn,isEligible:e=>Yo(e)?qo(e):e.type===bi.user,supportsBulk:!0,hideModalHeader:!0,RenderModal:({items:e,closeModal:t,onActionPerformed:s})=>{const[o,n]=(0,u.useState)(!1),{removeTemplates:i}=sn((0,c.useDispatch)(qi));return(0,P.jsxs)(Do.__experimentalVStack,{spacing:"5",children:[(0,P.jsx)(Do.__experimentalText,{children:e.length>1?(0,gs.sprintf)((0,gs._n)("Delete %d item?","Delete %d items?",e.length),e.length):(0,gs.sprintf)((0,gs._x)('Delete "%s"?',"template part"),Ko(e[0]))}),(0,P.jsxs)(Do.__experimentalHStack,{justify:"right",children:[(0,P.jsx)(Do.Button,{variant:"tertiary",onClick:t,disabled:o,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,gs.__)("Cancel")}),(0,P.jsx)(Do.Button,{variant:"primary",onClick:async()=>{n(!0),await i(e,{allowUndo:!1}),s?.(e),n(!1),t?.()},isBusy:o,disabled:o,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,gs.__)("Delete")})]})]})}},xi=yi;function vi(e,t,s){return{type:"REGISTER_ENTITY_ACTION",kind:e,name:t,config:s}}function wi(e,t,s){return{type:"UNREGISTER_ENTITY_ACTION",kind:e,name:t,actionId:s}}function Si(e,t){return{type:"SET_IS_READY",kind:e,name:t}}const ki=e=>async({registry:t})=>{if(sn(t.select(qi)).isEntityReady("postType",e))return;sn(t.dispatch(qi)).setIsReady("postType",e);const s=await t.resolveSelect(d.store).getPostType(e),o=await t.resolveSelect(d.store).canUser("create",{kind:"postType",name:e}),n=await t.resolveSelect(d.store).getCurrentTheme(),i=[s.viewable?gn:void 0,s?.supports?.revisions?_n:void 0,void 0,"wp_template_part"===s.slug&&o&&n?.is_block_theme?Xo:void 0,o&&"wp_block"===s.slug?wn:void 0,s.supports?.title?pn:void 0,s?.supports?.["page-attributes"]?Ln:void 0,"wp_block"===s.slug?gi:void 0,nn,hn,xi,ln,fi];t.batch((()=>{i.forEach((s=>{s&&sn(t.dispatch(qi)).registerEntityAction("postType",e,s)}))})),(0,h.doAction)("core.registerPostTypeActions",e)};function Pi(e){return{type:"SET_CURRENT_TEMPLATE_ID",id:e}}const Ci=e=>async({select:t,dispatch:s,registry:o})=>{const n=await o.dispatch(d.store).saveEntityRecord("postType","wp_template",e);return o.dispatch(d.store).editEntityRecord("postType",t.getCurrentPostType(),t.getCurrentPostId(),{template:n.slug}),o.dispatch(ms.store).createSuccessNotice((0,gs.__)("Custom template created. You're in template mode now."),{type:"snackbar",actions:[{label:(0,gs.__)("Go back"),onClick:()=>s.setRenderingMode(t.getEditorSettings().defaultRenderingMode)}]}),n},ji=e=>({registry:t})=>{var s;const o=(null!==(s=t.select(j.store).get("core","hiddenBlockTypes"))&&void 0!==s?s:[]).filter((t=>!(Array.isArray(e)?e:[e]).includes(t)));t.dispatch(j.store).set("core","hiddenBlockTypes",o)},Ei=e=>({registry:t})=>{var s;const o=null!==(s=t.select(j.store).get("core","hiddenBlockTypes"))&&void 0!==s?s:[],n=new Set([...o,...Array.isArray(e)?e:[e]]);t.dispatch(j.store).set("core","hiddenBlockTypes",[...n])},Ti=({onSave:e,dirtyEntityRecords:t=[],entitiesToSkip:s=[],close:o}={})=>({registry:n})=>{const i=[{kind:"postType",name:"wp_navigation"}],r="site-editor-save-success",a=n.select(d.store).getEntityRecord("root","__unstableBase")?.home;n.dispatch(ms.store).removeNotice(r);const l=t.filter((({kind:e,name:t,key:o,property:n})=>!s.some((s=>s.kind===e&&s.name===t&&s.key===o&&s.property===n))));o?.(l);const c=[],u=[];l.forEach((({kind:e,name:t,key:s,property:o})=>{"root"===e&&"site"===t?c.push(o):(i.some((s=>s.kind===e&&s.name===t))&&n.dispatch(d.store).editEntityRecord(e,t,s,{status:"publish"}),u.push(n.dispatch(d.store).saveEditedEntityRecord(e,t,s)))})),c.length&&u.push(n.dispatch(d.store).__experimentalSaveSpecifiedEntityEdits("root","site",void 0,c)),n.dispatch(m.store).__unstableMarkLastChangeAsPersistent(),Promise.all(u).then((t=>e?e(t):t)).then((e=>{e.some((e=>void 0===e))?n.dispatch(ms.store).createErrorNotice((0,gs.__)("Saving failed.")):n.dispatch(ms.store).createSuccessNotice((0,gs.__)("Site updated."),{type:"snackbar",id:r,actions:[{label:(0,gs.__)("View site"),url:a}]})})).catch((e=>n.dispatch(ms.store).createErrorNotice(`${(0,gs.__)("Saving failed.")} ${e}`)))},Bi=(e,{allowUndo:t=!0}={})=>async({registry:s})=>{const o="edit-site-template-reverted";var n;if(s.dispatch(ms.store).removeNotice(o),(n=e)&&n.source===F.custom&&(Boolean(n?.plugin)||n?.has_theme_file))try{const n=s.select(d.store).getEntityConfig("postType",e.type);if(!n)return void s.dispatch(ms.store).createErrorNotice((0,gs.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});const i=(0,v.addQueryArgs)(`${n.baseURL}/${e.id}`,{context:"edit",source:e.origin}),r=await hs()({path:i});if(!r)return void s.dispatch(ms.store).createErrorNotice((0,gs.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});const a=({blocks:e=[]})=>(0,y.__unstableSerializeAndClean)(e),l=s.select(d.store).getEditedEntityRecord("postType",e.type,e.id);s.dispatch(d.store).editEntityRecord("postType",e.type,e.id,{content:a,blocks:l.blocks,source:"custom"},{undoIgnore:!0});const c=(0,y.parse)(r?.content?.raw);if(s.dispatch(d.store).editEntityRecord("postType",e.type,r.id,{content:a,blocks:c,source:"theme"}),t){const t=()=>{s.dispatch(d.store).editEntityRecord("postType",e.type,l.id,{content:a,blocks:l.blocks,source:"custom"})};s.dispatch(ms.store).createSuccessNotice((0,gs.__)("Template reset."),{type:"snackbar",id:o,actions:[{label:(0,gs.__)("Undo"),onClick:t}]})}}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,gs.__)("Template revert failed. Please reload.");s.dispatch(ms.store).createErrorNotice(t,{type:"snackbar"})}else s.dispatch(ms.store).createErrorNotice((0,gs.__)("This template is not revertable."),{type:"snackbar"})},Ii=e=>async({registry:t})=>{const s=e.every((e=>e?.has_theme_file)),o=await Promise.allSettled(e.map((e=>t.dispatch(d.store).deleteEntityRecord("postType",e.type,e.id,{force:!0},{throwOnError:!0}))));if(o.every((({status:e})=>"fulfilled"===e))){let o;if(1===e.length){let t;"string"==typeof e[0].title?t=e[0].title:"string"==typeof e[0].title?.rendered?t=e[0].title?.rendered:"string"==typeof e[0].title?.raw&&(t=e[0].title?.raw),o=s?(0,gs.sprintf)((0,gs.__)('"%s" reset.'),(0,Ao.decodeEntities)(t)):(0,gs.sprintf)((0,gs._x)('"%s" deleted.',"template part"),(0,Ao.decodeEntities)(t))}else o=s?(0,gs.__)("Items reset."):(0,gs.__)("Items deleted.");t.dispatch(ms.store).createSuccessNotice(o,{type:"snackbar",id:"editor-template-deleted-success"})}else{let e;if(1===o.length)e=o[0].reason?.message?o[0].reason.message:s?(0,gs.__)("An error occurred while reverting the item."):(0,gs.__)("An error occurred while deleting the item.");else{const t=new Set,n=o.filter((({status:e})=>"rejected"===e));for(const e of n)e.reason?.message&&t.add(e.reason.message);e=0===t.size?(0,gs.__)("An error occurred while deleting the items."):1===t.size?s?(0,gs.sprintf)((0,gs.__)("An error occurred while reverting the items: %s"),[...t][0]):(0,gs.sprintf)((0,gs.__)("An error occurred while deleting the items: %s"),[...t][0]):s?(0,gs.sprintf)((0,gs.__)("Some errors occurred while reverting the items: %s"),[...t].join(",")):(0,gs.sprintf)((0,gs.__)("Some errors occurred while deleting the items: %s"),[...t].join(","))}t.dispatch(ms.store).createErrorNotice(e,{type:"snackbar"})}};var Ni=s(5215),Ai=s.n(Ni);const Di=(0,P.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(k.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})}),Ri=(0,P.jsx)(k.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,P.jsx)(k.Path,{d:"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm0 14.5c-3.6 0-6.5-2.9-6.5-6.5S8.4 5.5 12 5.5s6.5 2.9 6.5 6.5-2.9 6.5-6.5 6.5zM9 16l4.5-3L15 8.4l-4.5 3L9 16z"})}),Mi=(0,P.jsxs)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,P.jsx)(k.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,P.jsx)(k.Path,{d:"M17 4H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2ZM7 5.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5Z"})]}),Oi=(0,P.jsx)(k.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,P.jsx)(k.Path,{d:"M17.8 2l-.9.3c-.1 0-3.6 1-5.2 2.1C10 5.5 9.3 6.5 8.9 7.1c-.6.9-1.7 4.7-1.7 6.3l-.9 2.3c-.2.4 0 .8.4 1 .1 0 .2.1.3.1.3 0 .6-.2.7-.5l.6-1.5c.3 0 .7-.1 1.2-.2.7-.1 1.4-.3 2.2-.5.8-.2 1.6-.5 2.4-.8.7-.3 1.4-.7 1.9-1.2s.8-1.2 1-1.9c.2-.7.3-1.6.4-2.4.1-.8.1-1.7.2-2.5 0-.8.1-1.5.2-2.1V2zm-1.9 5.6c-.1.8-.2 1.5-.3 2.1-.2.6-.4 1-.6 1.3-.3.3-.8.6-1.4.9-.7.3-1.4.5-2.2.8-.6.2-1.3.3-1.8.4L15 7.5c.3-.3.6-.7 1-1.1 0 .4 0 .8-.1 1.2zM6 20h8v-1.5H6V20z"})}),Li=[];const Fi={rootClientId:void 0,insertionIndex:void 0,filterValue:void 0},Vi=(0,c.createRegistrySelector)((e=>(0,c.createSelector)((t=>{if("object"==typeof t.blockInserterPanel)return t.blockInserterPanel;if("template-locked"===et(t)){const[t]=e(m.store).getBlocksByName("core/post-content");if(t)return{rootClientId:t,insertionIndex:void 0,filterValue:void 0}}return Fi}),(t=>{const[s]=e(m.store).getBlocksByName("core/post-content");return[t.blockInserterPanel,et(t),s]}))));function zi(e){return e.listViewToggleRef}function Ui(e){return e.inserterSidebarToggleRef}const Hi={wp_block:Di,wp_navigation:Ri,page:Mi,post:Oi},Gi=(0,c.createRegistrySelector)((e=>(t,s,o)=>{{if("wp_template_part"===s||"wp_template"===s)return rs(t).find((e=>o.area===e.area))?.icon||C;if(Hi[s])return Hi[s];const n=e(d.store).getPostType(s);return"string"==typeof n?.icon&&n.icon.startsWith("dashicons-")?n.icon.slice(10):Mi}})),$i=(0,c.createRegistrySelector)((e=>(t,s,o)=>{const{type:n,id:i}=te(t),r=e(d.store).getEntityRecordNonTransientEdits("postType",s||n,o||i);if(!r?.meta)return!1;const a=e(d.store).getEntityRecord("postType",s||n,o||i)?.meta;return!Ai()({...a,footnotes:void 0},{...r.meta,footnotes:void 0})}));function Wi(e,...t){return function(e,t,s){var o;return null!==(o=e.actions[t]?.[s])&&void 0!==o?o:Li}(e.dataviews,...t)}function Zi(e,...t){return function(e,t,s){return e.isReady[t]?.[s]}(e.dataviews,...t)}const Yi=(0,c.createRegistrySelector)((e=>(0,c.createSelector)(((t,s)=>{s=Array.isArray(s)?s:[s];const{getBlocksByName:o,getBlockParents:n,getBlockName:i}=e(m.store);return o(s).filter((e=>n(e).every((e=>{const t=i(e);return"core/query"!==t&&!s.includes(t)}))))}),(()=>[e(m.store).getBlocks()])))),Ki={reducer:b,selectors:e,actions:t},qi=(0,c.createReduxStore)("core/editor",{...Ki});(0,c.register)(qi),sn(qi).registerPrivateActions(n),sn(qi).registerPrivateSelectors(i);function Qi(e){const t=e.avatar_urls&&e.avatar_urls[24]?(0,P.jsx)("img",{className:"editor-autocompleters__user-avatar",alt:"",src:e.avatar_urls[24]}):(0,P.jsx)("span",{className:"editor-autocompleters__no-avatar"});return(0,P.jsxs)(P.Fragment,{children:[t,(0,P.jsx)("span",{className:"editor-autocompleters__user-name",children:e.name}),(0,P.jsx)("span",{className:"editor-autocompleters__user-slug",children:e.slug})]})}(0,h.addFilter)("blocks.registerBlockType","core/editor/custom-sources-backwards-compatibility/shim-attribute-source",(function(e){var t;const s=Object.fromEntries(Object.entries(null!==(t=e.attributes)&&void 0!==t?t:{}).filter((([,{source:e}])=>"meta"===e)).map((([e,{meta:t}])=>[e,t])));return Object.entries(s).length&&(e.edit=(e=>(0,p.createHigherOrderComponent)((t=>({attributes:s,setAttributes:o,...n})=>{const i=(0,c.useSelect)((e=>e(qi).getCurrentPostType()),[]),[r,a]=(0,d.useEntityProp)("postType",i,"meta"),l=(0,u.useMemo)((()=>({...s,...Object.fromEntries(Object.entries(e).map((([e,t])=>[e,r[t]])))})),[s,r]);return(0,P.jsx)(t,{attributes:l,setAttributes:t=>{const s=Object.fromEntries(Object.entries(null!=t?t:{}).filter((([t])=>t in e)).map((([t,s])=>[e[t],s])));Object.entries(s).length&&a(s),o(t)},...n})}),"withMetaAttributeSource"))(s)(e.edit)),e}));const Xi={name:"users",className:"editor-autocompleters__user",triggerPrefix:"@",useItems(e){const t=(0,c.useSelect)((t=>{const{getUsers:s}=t(d.store);return s({context:"view",search:encodeURIComponent(e)})}),[e]),s=(0,u.useMemo)((()=>t?t.map((e=>({key:`user-${e.slug}`,value:e,label:Qi(e)}))):[]),[t]);return[s]},getOptionCompletion:e=>`@${e.slug}`};(0,h.addFilter)("editor.Autocomplete.completers","editor/autocompleters/set-default-completers",(function(e=[]){return e.push({...Xi}),e}));const Ji=window.wp.mediaUtils;(0,h.addFilter)("editor.MediaUpload","core/editor/components/media-upload",(()=>Ji.MediaUpload));const{PatternOverridesControls:er,ResetOverridesControl:tr,PatternOverridesBlockControls:sr,PATTERN_TYPES:or,PARTIAL_SYNCING_SUPPORTED_BLOCKS:nr,PATTERN_SYNC_TYPES:ir}=sn(cn.privateApis),rr=(0,p.createHigherOrderComponent)((e=>t=>{const s=!!nr[t.name];return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(e,{...t},"edit"),t.isSelected&&s&&(0,P.jsx)(ar,{...t}),s&&(0,P.jsx)(sr,{})]})}),"withPatternOverrideControls");function ar(e){const t=(0,m.useBlockEditingMode)(),{hasPatternOverridesSource:s,isEditingSyncedPattern:o}=(0,c.useSelect)((e=>{const{getCurrentPostType:t,getEditedPostAttribute:s}=e(qi);return{hasPatternOverridesSource:!!(0,y.getBlockBindingsSource)("core/pattern-overrides"),isEditingSyncedPattern:t()===or.user&&s("meta")?.wp_pattern_sync_status!==ir.unsynced&&s("wp_pattern_sync_status")!==ir.unsynced}}),[]),n=e.attributes.metadata?.bindings,i=!!n&&Object.values(n).some((e=>"core/pattern-overrides"===e.source)),r=o&&"default"===t,a=!o&&!!e.attributes.metadata?.name&&"disabled"!==t&&i;return s?(0,P.jsxs)(P.Fragment,{children:[r&&(0,P.jsx)(er,{...e}),a&&(0,P.jsx)(tr,{...e})]}):null}(0,h.addFilter)("editor.BlockEdit","core/editor/with-pattern-override-controls",rr);const lr=window.wp.keyboardShortcuts;function cr(e){var t,s,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(s=cr(e[t]))&&(o&&(o+=" "),o+=s)}else for(s in e)e[s]&&(o&&(o+=" "),o+=s);return o}const dr=function(){for(var e,t,s=0,o="",n=arguments.length;s<n;s++)(e=arguments[s])&&(t=cr(e))&&(o&&(o+=" "),o+=t);return o},ur=(0,P.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(k.Path,{d:"M11.776 4.454a.25.25 0 01.448 0l2.069 4.192a.25.25 0 00.188.137l4.626.672a.25.25 0 01.139.426l-3.348 3.263a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.362.263l-4.138-2.175a.25.25 0 00-.232 0l-4.138 2.175a.25.25 0 01-.363-.263l.79-4.607a.25.25 0 00-.071-.222L4.754 9.881a.25.25 0 01.139-.426l4.626-.672a.25.25 0 00.188-.137l2.069-4.192z"})}),pr=(0,P.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(k.Path,{fillRule:"evenodd",d:"M9.706 8.646a.25.25 0 01-.188.137l-4.626.672a.25.25 0 00-.139.427l3.348 3.262a.25.25 0 01.072.222l-.79 4.607a.25.25 0 00.362.264l4.138-2.176a.25.25 0 01.233 0l4.137 2.175a.25.25 0 00.363-.263l-.79-4.607a.25.25 0 01.072-.222l3.347-3.262a.25.25 0 00-.139-.427l-4.626-.672a.25.25 0 01-.188-.137l-2.069-4.192a.25.25 0 00-.448 0L9.706 8.646zM12 7.39l-.948 1.921a1.75 1.75 0 01-1.317.957l-2.12.308 1.534 1.495c.412.402.6.982.503 1.55l-.362 2.11 1.896-.997a1.75 1.75 0 011.629 0l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39z",clipRule:"evenodd"})}),hr=window.wp.viewport;function mr(e){return["core/edit-post","core/edit-site"].includes(e)?(S()(`${e} interface scope`,{alternative:"core interface scope",hint:"core/edit-post and core/edit-site are merging.",version:"6.6"}),"core"):e}function gr(e,t){return"core"===e&&"edit-site/template"===t?(S()("edit-site/template sidebar",{alternative:"edit-post/document",version:"6.6"}),"edit-post/document"):"core"===e&&"edit-site/block-inspector"===t?(S()("edit-site/block-inspector sidebar",{alternative:"edit-post/block",version:"6.6"}),"edit-post/block"):t}const _r=(e,t)=>({type:"SET_DEFAULT_COMPLEMENTARY_AREA",scope:e=mr(e),area:t=gr(e,t)}),fr=(e,t)=>({registry:s,dispatch:o})=>{if(!t)return;e=mr(e),t=gr(e,t);s.select(j.store).get(e,"isComplementaryAreaVisible")||s.dispatch(j.store).set(e,"isComplementaryAreaVisible",!0),o({type:"ENABLE_COMPLEMENTARY_AREA",scope:e,area:t})},br=e=>({registry:t})=>{e=mr(e);t.select(j.store).get(e,"isComplementaryAreaVisible")&&t.dispatch(j.store).set(e,"isComplementaryAreaVisible",!1)},yr=(e,t)=>({registry:s})=>{if(!t)return;e=mr(e),t=gr(e,t);const o=s.select(j.store).get(e,"pinnedItems");!0!==o?.[t]&&s.dispatch(j.store).set(e,"pinnedItems",{...o,[t]:!0})},xr=(e,t)=>({registry:s})=>{if(!t)return;e=mr(e),t=gr(e,t);const o=s.select(j.store).get(e,"pinnedItems");s.dispatch(j.store).set(e,"pinnedItems",{...o,[t]:!1})};function vr(e,t){return function({registry:s}){S()("dispatch( 'core/interface' ).toggleFeature",{since:"6.0",alternative:"dispatch( 'core/preferences' ).toggle"}),s.dispatch(j.store).toggle(e,t)}}function wr(e,t,s){return function({registry:o}){S()("dispatch( 'core/interface' ).setFeatureValue",{since:"6.0",alternative:"dispatch( 'core/preferences' ).set"}),o.dispatch(j.store).set(e,t,!!s)}}function Sr(e,t){return function({registry:s}){S()("dispatch( 'core/interface' ).setFeatureDefaults",{since:"6.0",alternative:"dispatch( 'core/preferences' ).setDefaults"}),s.dispatch(j.store).setDefaults(e,t)}}function kr(e){return{type:"OPEN_MODAL",name:e}}function Pr(){return{type:"CLOSE_MODAL"}}const Cr=(0,c.createRegistrySelector)((e=>(t,s)=>{s=mr(s);const o=e(j.store).get(s,"isComplementaryAreaVisible");if(void 0!==o)return!1===o?null:t?.complementaryAreas?.[s]})),jr=(0,c.createRegistrySelector)((e=>(t,s)=>{s=mr(s);const o=e(j.store).get(s,"isComplementaryAreaVisible"),n=t?.complementaryAreas?.[s];return o&&void 0===n})),Er=(0,c.createRegistrySelector)((e=>(t,s,o)=>{var n;o=gr(s=mr(s),o);const i=e(j.store).get(s,"pinnedItems");return null===(n=i?.[o])||void 0===n||n})),Tr=(0,c.createRegistrySelector)((e=>(t,s,o)=>(S()("select( 'core/interface' ).isFeatureActive( scope, featureName )",{since:"6.0",alternative:"select( 'core/preferences' ).get( scope, featureName )"}),!!e(j.store).get(s,o))));function Br(e,t){return e.activeModal===t}const Ir=(0,c.combineReducers)({complementaryAreas:function(e={},t){switch(t.type){case"SET_DEFAULT_COMPLEMENTARY_AREA":{const{scope:s,area:o}=t;return e[s]?e:{...e,[s]:o}}case"ENABLE_COMPLEMENTARY_AREA":{const{scope:s,area:o}=t;return{...e,[s]:o}}}return e},activeModal:function(e=null,t){switch(t.type){case"OPEN_MODAL":return t.name;case"CLOSE_MODAL":return null}return e}}),Nr=(0,c.createReduxStore)("core/interface",{reducer:Ir,actions:r,selectors:a});(0,c.register)(Nr);const Ar=window.wp.plugins,Dr=(0,Ar.withPluginContext)(((e,t)=>({icon:t.icon||e.icon,identifier:t.identifier||`${e.name}/${t.name}`})));const Rr=Dr((function({as:e=Do.Button,scope:t,identifier:s,icon:o,selectedIcon:n,name:i,shortcut:r,...a}){const l=e,d=(0,c.useSelect)((e=>e(Nr).getActiveComplementaryArea(t)===s),[s,t]),{enableComplementaryArea:u,disableComplementaryArea:p}=(0,c.useDispatch)(Nr);return(0,P.jsx)(l,{icon:n&&d?n:o,"aria-controls":s.replace("/",":"),"aria-checked":(h=a.role,["checkbox","option","radio","switch","menuitemcheckbox","menuitemradio","treeitem"].includes(h)?d:void 0),onClick:()=>{d?p(t):u(t,s)},shortcut:r,...a});var h})),Mr=({smallScreenTitle:e,children:t,className:s,toggleButtonProps:o})=>{const n=(0,P.jsx)(Rr,{icon:Bn,...o});return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)("div",{className:"components-panel__header interface-complementary-area-header__small",children:[e&&(0,P.jsx)("h2",{className:"interface-complementary-area-header__small-title",children:e}),n]}),(0,P.jsxs)("div",{className:dr("components-panel__header","interface-complementary-area-header",s),tabIndex:-1,children:[t,n]})]})},Or=()=>{};function Lr({name:e,as:t=Do.Button,onClick:s,...o}){return(0,P.jsx)(Do.Fill,{name:e,children:({onClick:e})=>(0,P.jsx)(t,{onClick:s||e?(...t)=>{(s||Or)(...t),(e||Or)(...t)}:void 0,...o})})}Lr.Slot=function({name:e,as:t=Do.ButtonGroup,fillProps:s={},bubblesVirtually:o,...n}){return(0,P.jsx)(Do.Slot,{name:e,bubblesVirtually:o,fillProps:s,children:e=>{if(!u.Children.toArray(e).length)return null;const s=[];u.Children.forEach(e,(({props:{__unstableExplicitMenuItem:e,__unstableTarget:t}})=>{t&&e&&s.push(t)}));const o=u.Children.map(e,(e=>!e.props.__unstableExplicitMenuItem&&s.includes(e.props.__unstableTarget)?null:e));return(0,P.jsx)(t,{...n,children:o})}})};const Fr=Lr,Vr=({__unstableExplicitMenuItem:e,__unstableTarget:t,...s})=>(0,P.jsx)(Do.MenuItem,{...s});function zr({scope:e,target:t,__unstableExplicitMenuItem:s,...o}){return(0,P.jsx)(Rr,{as:o=>(0,P.jsx)(Fr,{__unstableExplicitMenuItem:s,__unstableTarget:`${e}/${t}`,as:Vr,name:`${e}/plugin-more-menu`,...o}),role:"menuitemcheckbox",selectedIcon:Ro,name:t,scope:e,...o})}function Ur({scope:e,...t}){return(0,P.jsx)(Do.Fill,{name:`PinnedItems/${e}`,...t})}Ur.Slot=function({scope:e,className:t,...s}){return(0,P.jsx)(Do.Slot,{name:`PinnedItems/${e}`,...s,children:e=>e?.length>0&&(0,P.jsx)("div",{className:dr(t,"interface-pinned-items"),children:e})})};const Hr=Ur,Gr=.3;const $r=280,Wr={open:{width:$r},closed:{width:0},mobileOpen:{width:"100vw"}};function Zr({activeArea:e,isActive:t,scope:s,children:o,className:n,id:i}){const r=(0,p.useReducedMotion)(),a=(0,p.useViewportMatch)("medium","<"),l=(0,p.usePrevious)(e),c=(0,p.usePrevious)(t),[,d]=(0,u.useState)({});(0,u.useEffect)((()=>{d({})}),[t]);const h={type:"tween",duration:r||a||l&&e&&e!==l?0:Gr,ease:[.6,0,.4,1]};return(0,P.jsx)(Do.Fill,{name:`ComplementaryArea/${s}`,children:(0,P.jsx)(Do.__unstableAnimatePresence,{initial:!1,children:(c||t)&&(0,P.jsx)(Do.__unstableMotion.div,{variants:Wr,initial:"closed",animate:a?"mobileOpen":"open",exit:"closed",transition:h,className:"interface-complementary-area__fill",children:(0,P.jsx)("div",{id:i,className:n,style:{width:a?"100vw":$r},children:o})})})})}const Yr=Dr((function({children:e,className:t,closeLabel:s=(0,gs.__)("Close plugin"),identifier:o,header:n,headerClassName:i,icon:r,isPinnable:a=!0,panelClassName:l,scope:d,name:p,smallScreenTitle:h,title:m,toggleShortcut:g,isActiveByDefault:_}){const[f,b]=(0,u.useState)(!1),{isLoading:y,isActive:x,isPinned:v,activeArea:w,isSmall:S,isLarge:k,showIconLabels:C}=(0,c.useSelect)((e=>{const{getActiveComplementaryArea:t,isComplementaryAreaLoading:s,isItemPinned:n}=e(Nr),{get:i}=e(j.store),r=t(d);return{isLoading:s(d),isActive:r===o,isPinned:n(d,o),activeArea:r,isSmall:e(hr.store).isViewportMatch("< medium"),isLarge:e(hr.store).isViewportMatch("large"),showIconLabels:i("core","showIconLabels")}}),[o,d]);!function(e,t,s,o,n){const i=(0,u.useRef)(!1),r=(0,u.useRef)(!1),{enableComplementaryArea:a,disableComplementaryArea:l}=(0,c.useDispatch)(Nr);(0,u.useEffect)((()=>{o&&n&&!i.current?(l(e),r.current=!0):r.current&&!n&&i.current?(r.current=!1,a(e,t)):r.current&&s&&s!==t&&(r.current=!1),n!==i.current&&(i.current=n)}),[o,n,e,t,s,l,a])}(d,o,w,x,S);const{enableComplementaryArea:E,disableComplementaryArea:T,pinItem:B,unpinItem:I}=(0,c.useDispatch)(Nr);if((0,u.useEffect)((()=>{_&&void 0===w&&!S?E(d,o):void 0===w&&S&&T(d,o),b(!0)}),[w,_,d,o,S,E,T]),f)return(0,P.jsxs)(P.Fragment,{children:[a&&(0,P.jsx)(Hr,{scope:d,children:v&&(0,P.jsx)(Rr,{scope:d,identifier:o,isPressed:x&&(!C||k),"aria-expanded":x,"aria-disabled":y,label:m,icon:C?Ro:r,showTooltip:!C,variant:C?"tertiary":void 0,size:"compact",shortcut:g})}),p&&a&&(0,P.jsx)(zr,{target:p,scope:d,icon:r,children:m}),(0,P.jsxs)(Zr,{activeArea:w,isActive:x,className:dr("interface-complementary-area",t),scope:d,id:o.replace("/",":"),children:[(0,P.jsx)(Mr,{className:i,closeLabel:s,onClose:()=>T(d),smallScreenTitle:h,toggleButtonProps:{label:s,size:"small",shortcut:g,scope:d,identifier:o},children:n||(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)("h2",{className:"interface-complementary-area-header__title",children:m}),a&&(0,P.jsx)(Do.Button,{className:"interface-complementary-area__pin-unpin-item",icon:v?ur:pr,label:v?(0,gs.__)("Unpin from toolbar"):(0,gs.__)("Pin to toolbar"),onClick:()=>(v?I:B)(d,o),isPressed:v,"aria-expanded":v,size:"compact"})]})}),(0,P.jsx)(Do.Panel,{className:l,children:e})]})]})}));Yr.Slot=function({scope:e,...t}){return(0,P.jsx)(Do.Slot,{name:`ComplementaryArea/${e}`,...t})};const Kr=Yr,qr=({isActive:e})=>((0,u.useEffect)((()=>{let e=!1;return document.body.classList.contains("sticky-menu")&&(e=!0,document.body.classList.remove("sticky-menu")),()=>{e&&document.body.classList.add("sticky-menu")}}),[]),(0,u.useEffect)((()=>(e?document.body.classList.add("is-fullscreen-mode"):document.body.classList.remove("is-fullscreen-mode"),()=>{e&&document.body.classList.remove("is-fullscreen-mode")})),[e]),null),Qr=(0,u.forwardRef)((({children:e,className:t,ariaLabel:s,as:o="div",...n},i)=>(0,P.jsx)(o,{ref:i,className:dr("interface-navigable-region",t),"aria-label":s,role:"region",tabIndex:"-1",...n,children:e})));Qr.displayName="NavigableRegion";const Xr=Qr,Jr={type:"tween",duration:.25,ease:[.6,0,.4,1]};const ea={hidden:{opacity:1,marginTop:-60},visible:{opacity:1,marginTop:0},distractionFreeHover:{opacity:1,marginTop:0,transition:{...Jr,delay:.2,delayChildren:.2}},distractionFreeHidden:{opacity:0,marginTop:-60},distractionFreeDisabled:{opacity:0,marginTop:0,transition:{...Jr,delay:.8,delayChildren:.8}}};const ta=(0,u.forwardRef)((function({isDistractionFree:e,footer:t,header:s,editorNotices:o,sidebar:n,secondarySidebar:i,content:r,actions:a,labels:l,className:c},d){const[h,m]=(0,p.useResizeObserver)(),g=(0,p.useViewportMatch)("medium","<"),_={type:"tween",duration:(0,p.useReducedMotion)()?0:.25,ease:[.6,0,.4,1]};!function(e){(0,u.useEffect)((()=>{const t=document&&document.querySelector(`html:not(.${e})`);if(t)return t.classList.toggle(e),()=>{t.classList.toggle(e)}}),[e])}("interface-interface-skeleton__html-container");const f={...{header:(0,gs._x)("Header","header landmark area"),body:(0,gs.__)("Content"),secondarySidebar:(0,gs.__)("Block Library"),sidebar:(0,gs._x)("Settings","settings landmark area"),actions:(0,gs.__)("Publish"),footer:(0,gs.__)("Footer")},...l};return(0,P.jsxs)("div",{ref:d,className:dr(c,"interface-interface-skeleton",!!t&&"has-footer"),children:[(0,P.jsxs)("div",{className:"interface-interface-skeleton__editor",children:[(0,P.jsx)(Do.__unstableAnimatePresence,{initial:!1,children:!!s&&(0,P.jsx)(Xr,{as:Do.__unstableMotion.div,className:"interface-interface-skeleton__header","aria-label":f.header,initial:e&&!g?"distractionFreeHidden":"hidden",whileHover:e&&!g?"distractionFreeHover":"visible",animate:e&&!g?"distractionFreeDisabled":"visible",exit:e&&!g?"distractionFreeHidden":"hidden",variants:ea,transition:_,children:s})}),e&&(0,P.jsx)("div",{className:"interface-interface-skeleton__header",children:o}),(0,P.jsxs)("div",{className:"interface-interface-skeleton__body",children:[(0,P.jsx)(Do.__unstableAnimatePresence,{initial:!1,children:!!i&&(0,P.jsx)(Xr,{className:"interface-interface-skeleton__secondary-sidebar",ariaLabel:f.secondarySidebar,as:Do.__unstableMotion.div,initial:"closed",animate:"open",exit:"closed",variants:{open:{width:m.width},closed:{width:0}},transition:_,children:(0,P.jsxs)(Do.__unstableMotion.div,{style:{position:"absolute",width:g?"100vw":"fit-content",height:"100%",left:0},variants:{open:{x:0},closed:{x:"-100%"}},transition:_,children:[h,i]})})}),(0,P.jsx)(Xr,{className:"interface-interface-skeleton__content",ariaLabel:f.body,children:r}),!!n&&(0,P.jsx)(Xr,{className:"interface-interface-skeleton__sidebar",ariaLabel:f.sidebar,children:n}),!!a&&(0,P.jsx)(Xr,{className:"interface-interface-skeleton__actions",ariaLabel:f.actions,children:a})]})]}),!!t&&(0,P.jsx)(Xr,{className:"interface-interface-skeleton__footer",ariaLabel:f.footer,children:t})]})}));function sa(){const e=(0,c.useSelect)((e=>{const{richEditingEnabled:t,codeEditingEnabled:s}=e(qi).getEditorSettings();return!t||!s}),[]),{getBlockSelectionStart:t}=(0,c.useSelect)(m.store),{getActiveComplementaryArea:s}=(0,c.useSelect)(Nr),{enableComplementaryArea:o,disableComplementaryArea:n}=(0,c.useDispatch)(Nr),{redo:i,undo:r,savePost:a,setIsListViewOpened:l,switchEditorMode:d,toggleDistractionFree:u}=(0,c.useDispatch)(qi),{isEditedPostDirty:p,isPostSavingLocked:h,isListViewOpened:g,getEditorMode:_}=(0,c.useSelect)(qi);return(0,lr.useShortcut)("core/editor/toggle-mode",(()=>{d("visual"===_()?"text":"visual")}),{isDisabled:e}),(0,lr.useShortcut)("core/editor/toggle-distraction-free",(()=>{u()})),(0,lr.useShortcut)("core/editor/undo",(e=>{r(),e.preventDefault()})),(0,lr.useShortcut)("core/editor/redo",(e=>{i(),e.preventDefault()})),(0,lr.useShortcut)("core/editor/save",(e=>{e.preventDefault(),h()||p()&&a()})),(0,lr.useShortcut)("core/editor/toggle-list-view",(e=>{g()||(e.preventDefault(),l(!0))})),(0,lr.useShortcut)("core/editor/toggle-sidebar",(e=>{e.preventDefault();if(["edit-post/document","edit-post/block"].includes(s("core")))n("core");else{const e=t()?"edit-post/block":"edit-post/document";o("core",e)}})),null}class oa extends u.Component{constructor(e){super(e),this.needsAutosave=!(!e.isDirty||!e.isAutosaveable)}componentDidMount(){this.props.disableIntervalChecks||this.setAutosaveTimer()}componentDidUpdate(e){this.props.disableIntervalChecks?this.props.editsReference!==e.editsReference&&this.props.autosave():(this.props.interval!==e.interval&&(clearTimeout(this.timerId),this.setAutosaveTimer()),this.props.isDirty&&(!this.props.isAutosaving||e.isAutosaving)?this.props.editsReference!==e.editsReference&&(this.needsAutosave=!0):this.needsAutosave=!1)}componentWillUnmount(){clearTimeout(this.timerId)}setAutosaveTimer(e=1e3*this.props.interval){this.timerId=setTimeout((()=>{this.autosaveTimerHandler()}),e)}autosaveTimerHandler(){this.props.isAutosaveable?(this.needsAutosave&&(this.needsAutosave=!1,this.props.autosave()),this.setAutosaveTimer()):this.setAutosaveTimer(1e3)}render(){return null}}const na=(0,p.compose)([(0,c.withSelect)(((e,t)=>{const{getReferenceByDistinctEdits:s}=e(d.store),{isEditedPostDirty:o,isEditedPostAutosaveable:n,isAutosavingPost:i,getEditorSettings:r}=e(qi),{interval:a=r().autosaveInterval}=t;return{editsReference:s(),isDirty:o(),isAutosaveable:n(),isAutosaving:i(),interval:a}})),(0,c.withDispatch)(((e,t)=>({autosave(){const{autosave:s=e(qi).autosave}=t;s()}})))])(oa),ia=(0,P.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(k.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"})}),ra=(0,P.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(k.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})}),aa=window.wp.keycodes,la=window.wp.commands,ca=(0,Do.__unstableMotion)(Do.Button);function da(e){const{postType:t,postTypeLabel:s,documentTitle:o,isNotFound:n,isUnsyncedPattern:i,templateTitle:r,onNavigateToPreviousEntityRecord:a}=(0,c.useSelect)((e=>{const{getCurrentPostType:t,getCurrentPostId:s,getEditorSettings:o,__experimentalGetTemplateInfo:n}=e(qi),{getEditedEntityRecord:i,getPostType:r,isResolving:a}=e(d.store),l=t(),c=s(),u=i("postType",l,c),p=n(u),h=r(l)?.labels?.singular_name;return{postType:l,postTypeLabel:h,documentTitle:u.title,isNotFound:!u&&!a("getEditedEntityRecord","postType",l,c),isUnsyncedPattern:"unsynced"===u?.wp_pattern_sync_status,templateTitle:p.title,onNavigateToPreviousEntityRecord:o().onNavigateToPreviousEntityRecord}}),[]),{open:l}=(0,c.useDispatch)(la.store),h=(0,p.useReducedMotion)(),g=V.includes(t),_=z.includes(t),f=!!a,b=g?r:o,y=e.title||b,x=e.icon,v=(0,u.useRef)(!1);return(0,u.useEffect)((()=>{v.current=!0}),[]),(0,P.jsxs)("div",{className:dr("editor-document-bar",{"has-back-button":f,"is-global":_&&!i}),children:[(0,P.jsx)(Do.__unstableAnimatePresence,{children:f&&(0,P.jsx)(ca,{className:"editor-document-bar__back",icon:(0,gs.isRTL)()?ia:ra,onClick:e=>{e.stopPropagation(),a()},size:"compact",initial:!!v.current&&{opacity:0,transform:"translateX(15%)"},animate:{opacity:1,transform:"translateX(0%)"},exit:{opacity:0,transform:"translateX(15%)"},transition:h?{duration:0}:void 0,children:(0,gs.__)("Back")})}),n?(0,P.jsx)(Do.__experimentalText,{children:(0,gs.__)("Document not found")}):(0,P.jsxs)(Do.Button,{className:"editor-document-bar__command",onClick:()=>l(),size:"compact",children:[(0,P.jsxs)(Do.__unstableMotion.div,{className:"editor-document-bar__title",initial:!!v.current&&{opacity:0,transform:f?"translateX(15%)":"translateX(-15%)"},animate:{opacity:1,transform:"translateX(0%)"},transition:h?{duration:0}:void 0,children:[x&&(0,P.jsx)(m.BlockIcon,{icon:x}),(0,P.jsxs)(Do.__experimentalText,{size:"body",as:"h1",children:[(0,P.jsx)("span",{className:"editor-document-bar__post-title",children:y?(0,Ao.decodeEntities)(y):(0,gs.__)("No title")}),s&&!e.title&&(0,P.jsx)("span",{className:"editor-document-bar__post-type-label",children:"· "+(0,Ao.decodeEntities)(s)})]})]},f),(0,P.jsx)("span",{className:"editor-document-bar__shortcut",children:aa.displayShortcut.primary("k")})]})]})}const ua=window.wp.richText,pa=({children:e,isValid:t,level:s,href:o,onSelect:n})=>(0,P.jsx)("li",{className:dr("document-outline__item",`is-${s.toLowerCase()}`,{"is-invalid":!t}),children:(0,P.jsxs)("a",{href:o,className:"document-outline__button",onClick:n,children:[(0,P.jsx)("span",{className:"document-outline__emdash","aria-hidden":"true"}),(0,P.jsx)("strong",{className:"document-outline__level",children:s}),(0,P.jsx)("span",{className:"document-outline__item-content",children:e})]})}),ha=(0,P.jsx)("em",{children:(0,gs.__)("(Empty heading)")}),ma=[(0,P.jsx)("br",{},"incorrect-break"),(0,P.jsx)("em",{children:(0,gs.__)("(Incorrect heading level)")},"incorrect-message")],ga=[(0,P.jsx)("br",{},"incorrect-break-h1"),(0,P.jsx)("em",{children:(0,gs.__)("(Your theme may already use a H1 for the post title)")},"incorrect-message-h1")],_a=[(0,P.jsx)("br",{},"incorrect-break-multiple-h1"),(0,P.jsx)("em",{children:(0,gs.__)("(Multiple H1 headings are not recommended)")},"incorrect-message-multiple-h1")];function fa(){return(0,P.jsxs)(Do.SVG,{width:"138",height:"148",viewBox:"0 0 138 148",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,P.jsx)(Do.Rect,{width:"138",height:"148",rx:"4",fill:"#F0F6FC"}),(0,P.jsx)(Do.Line,{x1:"44",y1:"28",x2:"24",y2:"28",stroke:"#DDDDDD"}),(0,P.jsx)(Do.Rect,{x:"48",y:"16",width:"27",height:"23",rx:"4",fill:"#DDDDDD"}),(0,P.jsx)(Do.Path,{d:"M54.7585 32V23.2727H56.6037V26.8736H60.3494V23.2727H62.1903V32H60.3494V28.3949H56.6037V32H54.7585ZM67.4574 23.2727V32H65.6122V25.0241H65.5611L63.5625 26.277V24.6406L65.723 23.2727H67.4574Z",fill:"black"}),(0,P.jsx)(Do.Line,{x1:"55",y1:"59",x2:"24",y2:"59",stroke:"#DDDDDD"}),(0,P.jsx)(Do.Rect,{x:"59",y:"47",width:"29",height:"23",rx:"4",fill:"#DDDDDD"}),(0,P.jsx)(Do.Path,{d:"M65.7585 63V54.2727H67.6037V57.8736H71.3494V54.2727H73.1903V63H71.3494V59.3949H67.6037V63H65.7585ZM74.6605 63V61.6705L77.767 58.794C78.0313 58.5384 78.2528 58.3082 78.4318 58.1037C78.6136 57.8991 78.7514 57.6989 78.8452 57.5028C78.9389 57.304 78.9858 57.0895 78.9858 56.8594C78.9858 56.6037 78.9276 56.3835 78.8111 56.1989C78.6946 56.0114 78.5355 55.8679 78.3338 55.7685C78.1321 55.6662 77.9034 55.6151 77.6477 55.6151C77.3807 55.6151 77.1477 55.669 76.9489 55.777C76.75 55.8849 76.5966 56.0398 76.4886 56.2415C76.3807 56.4432 76.3267 56.6832 76.3267 56.9616H74.5753C74.5753 56.3906 74.7045 55.8949 74.9631 55.4744C75.2216 55.054 75.5838 54.7287 76.0497 54.4986C76.5156 54.2685 77.0526 54.1534 77.6605 54.1534C78.2855 54.1534 78.8295 54.2642 79.2926 54.4858C79.7585 54.7045 80.1207 55.0085 80.3793 55.3977C80.6378 55.7869 80.767 56.233 80.767 56.7358C80.767 57.0653 80.7017 57.3906 80.571 57.7116C80.4432 58.0327 80.2145 58.3892 79.8849 58.7812C79.5554 59.1705 79.0909 59.6378 78.4915 60.1832L77.2173 61.4318V61.4915H80.8821V63H74.6605Z",fill:"black"}),(0,P.jsx)(Do.Line,{x1:"80",y1:"90",x2:"24",y2:"90",stroke:"#DDDDDD"}),(0,P.jsx)(Do.Rect,{x:"84",y:"78",width:"30",height:"23",rx:"4",fill:"#F0B849"}),(0,P.jsx)(Do.Path,{d:"M90.7585 94V85.2727H92.6037V88.8736H96.3494V85.2727H98.1903V94H96.3494V90.3949H92.6037V94H90.7585ZM99.5284 92.4659V91.0128L103.172 85.2727H104.425V87.2841H103.683L101.386 90.919V90.9872H106.564V92.4659H99.5284ZM103.717 94V92.0227L103.751 91.3793V85.2727H105.482V94H103.717Z",fill:"black"}),(0,P.jsx)(Do.Line,{x1:"66",y1:"121",x2:"24",y2:"121",stroke:"#DDDDDD"}),(0,P.jsx)(Do.Rect,{x:"70",y:"109",width:"29",height:"23",rx:"4",fill:"#DDDDDD"}),(0,P.jsx)(Do.Path,{d:"M76.7585 125V116.273H78.6037V119.874H82.3494V116.273H84.1903V125H82.3494V121.395H78.6037V125H76.7585ZM88.8864 125.119C88.25 125.119 87.6832 125.01 87.1861 124.791C86.6918 124.57 86.3011 124.266 86.0142 123.879C85.7301 123.49 85.5838 123.041 85.5753 122.533H87.4332C87.4446 122.746 87.5142 122.933 87.642 123.095C87.7727 123.254 87.946 123.378 88.1619 123.466C88.3778 123.554 88.6207 123.598 88.8906 123.598C89.1719 123.598 89.4205 123.548 89.6364 123.449C89.8523 123.349 90.0213 123.212 90.1435 123.036C90.2656 122.859 90.3267 122.656 90.3267 122.426C90.3267 122.193 90.2614 121.987 90.1307 121.808C90.0028 121.626 89.8182 121.484 89.5767 121.382C89.3381 121.28 89.054 121.229 88.7244 121.229H87.9105V119.874H88.7244C89.0028 119.874 89.2486 119.825 89.4616 119.729C89.6776 119.632 89.8452 119.499 89.9645 119.328C90.0838 119.155 90.1435 118.953 90.1435 118.723C90.1435 118.504 90.0909 118.312 89.9858 118.148C89.8835 117.98 89.7386 117.849 89.5511 117.756C89.3665 117.662 89.1506 117.615 88.9034 117.615C88.6534 117.615 88.4247 117.661 88.2173 117.751C88.0099 117.839 87.8438 117.966 87.7188 118.131C87.5938 118.295 87.527 118.489 87.5185 118.71H85.75C85.7585 118.207 85.902 117.764 86.1804 117.381C86.4588 116.997 86.8338 116.697 87.3054 116.482C87.7798 116.263 88.3153 116.153 88.9119 116.153C89.5142 116.153 90.0412 116.263 90.4929 116.482C90.9446 116.7 91.2955 116.996 91.5455 117.368C91.7983 117.737 91.9233 118.152 91.9205 118.612C91.9233 119.101 91.7713 119.509 91.4645 119.835C91.1605 120.162 90.7642 120.369 90.2756 120.457V120.526C90.9176 120.608 91.4063 120.831 91.7415 121.195C92.0795 121.555 92.2472 122.007 92.2443 122.55C92.2472 123.047 92.1037 123.489 91.8139 123.875C91.527 124.261 91.1307 124.565 90.625 124.787C90.1193 125.009 89.5398 125.119 88.8864 125.119Z",fill:"black"})]})}const ba=(e=[])=>e.flatMap(((e={})=>"core/heading"===e.name?{...e,level:e.attributes.level,isEmpty:ya(e)}:ba(e.innerBlocks))),ya=e=>!e.attributes.content||0===e.attributes.content.trim().length;function xa({onSelect:e,isTitleSupported:t,hasOutlineItemsDisabled:s}){const{selectBlock:o}=(0,c.useDispatch)(m.store),{blocks:n,title:i}=(0,c.useSelect)((e=>{var t;const{getBlocks:s}=e(m.store),{getEditedPostAttribute:o}=e(qi),{getPostType:n}=e(d.store),i=n(o("type"));return{title:o("title"),blocks:s(),isTitleSupported:null!==(t=i?.supports?.title)&&void 0!==t&&t}})),r=ba(n);if(r.length<1)return(0,P.jsxs)("div",{className:"editor-document-outline has-no-headings",children:[(0,P.jsx)(fa,{}),(0,P.jsx)("p",{children:(0,gs.__)("Navigate the structure of your document and address issues like empty or incorrect heading levels.")})]});let a=1;const l=document.querySelector(".editor-post-title__input"),u=t&&i&&l,p=r.reduce(((e,t)=>({...e,[t.level]:(e[t.level]||0)+1})),{})[1]>1;return(0,P.jsx)("div",{className:"document-outline",children:(0,P.jsxs)("ul",{children:[u&&(0,P.jsx)(pa,{level:(0,gs.__)("Title"),isValid:!0,onSelect:e,href:`#${l.id}`,isDisabled:s,children:i}),r.map(((t,n)=>{const i=t.level>a+1,r=!(t.isEmpty||i||!t.level||1===t.level&&(p||u));return a=t.level,(0,P.jsxs)(pa,{level:`H${t.level}`,isValid:r,isDisabled:s,href:`#block-${t.clientId}`,onSelect:()=>{o(t.clientId),e?.()},children:[t.isEmpty?ha:(0,ua.getTextContent)((0,ua.create)({html:t.attributes.content})),i&&ma,1===t.level&&p&&_a,u&&1===t.level&&!p&&ga]},n)}))]})})}function va({children:e}){const t=(0,c.useSelect)((e=>{const{getGlobalBlockCount:t}=e(m.store);return t("core/heading")>0}));return t?null:e}const wa=function(){const{registerShortcut:e}=(0,c.useDispatch)(lr.store);return(0,u.useEffect)((()=>{e({name:"core/editor/toggle-mode",category:"global",description:(0,gs.__)("Switch between visual editor and code editor."),keyCombination:{modifier:"secondary",character:"m"}}),e({name:"core/editor/save",category:"global",description:(0,gs.__)("Save your changes."),keyCombination:{modifier:"primary",character:"s"}}),e({name:"core/editor/undo",category:"global",description:(0,gs.__)("Undo your last changes."),keyCombination:{modifier:"primary",character:"z"}}),e({name:"core/editor/redo",category:"global",description:(0,gs.__)("Redo your last undo."),keyCombination:{modifier:"primaryShift",character:"z"},aliases:(0,aa.isAppleOS)()?[]:[{modifier:"primary",character:"y"}]}),e({name:"core/editor/toggle-list-view",category:"global",description:(0,gs.__)("Open the List View."),keyCombination:{modifier:"access",character:"o"}}),e({name:"core/editor/toggle-distraction-free",category:"global",description:(0,gs.__)("Toggle distraction free mode."),keyCombination:{modifier:"primaryShift",character:"\\"}}),e({name:"core/editor/toggle-sidebar",category:"global",description:(0,gs.__)("Show or hide the Settings sidebar."),keyCombination:{modifier:"primaryShift",character:","}}),e({name:"core/editor/keyboard-shortcuts",category:"main",description:(0,gs.__)("Display these keyboard shortcuts."),keyCombination:{modifier:"access",character:"h"}}),e({name:"core/editor/next-region",category:"global",description:(0,gs.__)("Navigate to the next part of the editor."),keyCombination:{modifier:"ctrl",character:"`"},aliases:[{modifier:"access",character:"n"}]}),e({name:"core/editor/previous-region",category:"global",description:(0,gs.__)("Navigate to the previous part of the editor."),keyCombination:{modifier:"ctrlShift",character:"`"},aliases:[{modifier:"access",character:"p"},{modifier:"ctrlShift",character:"~"}]})}),[e]),(0,P.jsx)(m.BlockEditorKeyboardShortcuts.Register,{})},Sa=(0,P.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(k.Path,{d:"M15.6 6.5l-1.1 1 2.9 3.3H8c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.3-.5h9.2L14.5 15l1.1 1.1 4.6-4.6-4.6-5z"})}),ka=(0,P.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(k.Path,{d:"M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z"})});const Pa=(0,u.forwardRef)((function(e,t){const s=(0,aa.isAppleOS)()?aa.displayShortcut.primaryShift("z"):aa.displayShortcut.primary("y"),o=(0,c.useSelect)((e=>e(qi).hasEditorRedo()),[]),{redo:n}=(0,c.useDispatch)(qi);return(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,...e,ref:t,icon:(0,gs.isRTL)()?ka:Sa,label:(0,gs.__)("Redo"),shortcut:s,"aria-disabled":!o,onClick:o?n:void 0,className:"editor-history__redo"})}));const Ca=(0,u.forwardRef)((function(e,t){const s=(0,c.useSelect)((e=>e(qi).hasEditorUndo()),[]),{undo:o}=(0,c.useDispatch)(qi);return(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,...e,ref:t,icon:(0,gs.isRTL)()?Sa:ka,label:(0,gs.__)("Undo"),shortcut:aa.displayShortcut.primary("z"),"aria-disabled":!s,onClick:s?o:void 0,className:"editor-history__undo"})}));function ja(){const[e,t]=(0,u.useState)(!1),s=(0,c.useSelect)((e=>e(m.store).isValidTemplate()),[]),{setTemplateValidity:o,synchronizeTemplate:n}=(0,c.useDispatch)(m.store);return s?null:(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(Do.Notice,{className:"editor-template-validation-notice",isDismissible:!1,status:"warning",actions:[{label:(0,gs.__)("Keep it as is"),onClick:()=>o(!0)},{label:(0,gs.__)("Reset the template"),onClick:()=>t(!0)}],children:(0,gs.__)("The content of your post doesn’t match the template assigned to your post type.")}),(0,P.jsx)(Do.__experimentalConfirmDialog,{isOpen:e,confirmButtonText:(0,gs.__)("Reset"),onConfirm:()=>{t(!1),n()},onCancel:()=>t(!1),size:"medium",children:(0,gs.__)("Resetting the template may result in loss of content, do you want to continue?")})]})}const Ea=function(){const{notices:e}=(0,c.useSelect)((e=>({notices:e(ms.store).getNotices()})),[]),{removeNotice:t}=(0,c.useDispatch)(ms.store),s=e.filter((({isDismissible:e,type:t})=>e&&"default"===t)),o=e.filter((({isDismissible:e,type:t})=>!e&&"default"===t));return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(Do.NoticeList,{notices:o,className:"components-editor-notices__pinned"}),(0,P.jsx)(Do.NoticeList,{notices:s,className:"components-editor-notices__dismissible",onRemove:t,children:(0,P.jsx)(ja,{})})]})},Ta=-3;function Ba(){const e=(0,c.useSelect)((e=>e(ms.store).getNotices()),[]),{removeNotice:t}=(0,c.useDispatch)(ms.store),s=e.filter((({type:e})=>"snackbar"===e)).slice(Ta);return(0,P.jsx)(Do.SnackbarList,{notices:s,className:"components-editor-notices__snackbar",onRemove:t})}function Ia({record:e,checked:t,onChange:s}){const{name:o,kind:n,title:i,key:r}=e,{entityRecordTitle:a,hasPostMetaChanges:l}=(0,c.useSelect)((e=>{if("postType"!==n||"wp_template"!==o)return{entityRecordTitle:i,hasPostMetaChanges:sn(e(qi)).hasPostMetaChanges(o,r)};const t=e(d.store).getEditedEntityRecord(n,o,r);return{entityRecordTitle:e(qi).__experimentalGetTemplateInfo(t).title,hasPostMetaChanges:sn(e(qi)).hasPostMetaChanges(o,r)}}),[o,n,i,r]);return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(Do.PanelRow,{children:(0,P.jsx)(Do.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,Ao.decodeEntities)(a)||(0,gs.__)("Untitled"),checked:t,onChange:s})}),l&&(0,P.jsx)("ul",{className:"entities-saved-states__changes",children:(0,P.jsx)("li",{children:(0,gs.__)("Post Meta.")})})]})}const{getGlobalStylesChanges:Na,GlobalStylesContext:Aa}=sn(m.privateApis);function Da({record:e}){const{user:t}=(0,u.useContext)(Aa),s=(0,c.useSelect)((t=>t(d.store).getEntityRecord(e.kind,e.name,e.key)),[e.kind,e.name,e.key]),o=Na(t,s,{maxResults:10});return o.length?(0,P.jsx)("ul",{className:"entities-saved-states__changes",children:o.map((e=>(0,P.jsx)("li",{children:e},e)))}):null}function Ra({record:e,count:t}){if("globalStyles"===e?.name)return null;const s=function(e,t){switch(e){case"site":return 1===t?(0,gs.__)("This change will affect your whole site."):(0,gs.__)("These changes will affect your whole site.");case"wp_template":return(0,gs.__)("This change will affect pages and posts that use this template.");case"page":case"post":return(0,gs.__)("The following has been modified.")}}(e?.name,t);return s?(0,P.jsx)(Do.PanelRow,{children:s}):null}function Ma({list:e,unselectedEntities:t,setUnselectedEntities:s}){const o=e.length,n=e[0];let i=(0,c.useSelect)((e=>e(d.store).getEntityConfig(n.kind,n.name)),[n.kind,n.name]).label;return"wp_template_part"===n?.name&&(i=1===o?(0,gs.__)("Template Part"):(0,gs.__)("Template Parts")),(0,P.jsxs)(Do.PanelBody,{title:i,initialOpen:!0,children:[(0,P.jsx)(Ra,{record:n,count:o}),e.map((e=>(0,P.jsx)(Ia,{record:e,checked:!t.some((t=>t.kind===e.kind&&t.name===e.name&&t.key===e.key&&t.property===e.property)),onChange:t=>s(e,t)},e.key||e.property))),"globalStyles"===n?.name&&(0,P.jsx)(Da,{record:n})]})}const Oa=()=>{const{editedEntities:e,siteEdits:t,siteEntityConfig:s}=(0,c.useSelect)((e=>{const{__experimentalGetDirtyEntityRecords:t,getEntityRecordEdits:s,getEntityConfig:o}=e(d.store);return{editedEntities:t(),siteEdits:s("root","site"),siteEntityConfig:o("root","site")}}),[]),o=(0,u.useMemo)((()=>{var o;const n=e.filter((e=>!("root"===e.kind&&"site"===e.name))),i=null!==(o=s?.meta?.labels)&&void 0!==o?o:{},r=[];for(const e in t)r.push({kind:"root",name:"site",title:i[e]||e,property:e});return[...n,...r]}),[e,t,s]),[n,i]=(0,u.useState)([]);return{dirtyEntityRecords:o,isDirty:o.length-n.length>0,setUnselectedEntities:({kind:e,name:t,key:s,property:o},r)=>{i(r?n.filter((n=>n.kind!==e||n.name!==t||n.key!==s||n.property!==o)):[...n,{kind:e,name:t,key:s,property:o}])},unselectedEntities:n}};function La(e){return e}function Fa({close:e,renderDialog:t}){const s=Oa();return(0,P.jsx)(Va,{close:e,renderDialog:t,...s})}function Va({additionalPrompt:e,close:t,onSave:s=La,saveEnabled:o,saveLabel:n=(0,gs.__)("Save"),renderDialog:i,dirtyEntityRecords:r,isDirty:a,setUnselectedEntities:l,unselectedEntities:d}){const h=(0,u.useRef)(),{saveDirtyEntities:m}=sn((0,c.useDispatch)(qi)),g=r.reduce(((e,t)=>{const{name:s}=t;return e[s]||(e[s]=[]),e[s].push(t),e}),{}),{site:_,wp_template:f,wp_template_part:b,...y}=g,x=[_,f,b,...Object.values(y)].filter(Array.isArray),v=null!=o?o:a,w=(0,u.useCallback)((()=>t()),[t]),[S,k]=(0,p.__experimentalUseDialog)({onClose:()=>w()}),C=(0,p.useInstanceId)(Va,"label"),j=(0,p.useInstanceId)(Va,"description");return(0,P.jsxs)("div",{ref:S,...k,className:"entities-saved-states__panel",role:i?"dialog":void 0,"aria-labelledby":i?C:void 0,"aria-describedby":i?j:void 0,children:[(0,P.jsxs)(Do.Flex,{className:"entities-saved-states__panel-header",gap:2,children:[(0,P.jsx)(Do.FlexItem,{isBlock:!0,as:Do.Button,variant:"secondary",size:"compact",onClick:w,children:(0,gs.__)("Cancel")}),(0,P.jsx)(Do.FlexItem,{isBlock:!0,as:Do.Button,ref:h,variant:"primary",size:"compact",disabled:!v,accessibleWhenDisabled:!0,onClick:()=>m({onSave:s,dirtyEntityRecords:r,entitiesToSkip:d,close:t}),className:"editor-entities-saved-states__save-button",children:n})]}),(0,P.jsxs)("div",{className:"entities-saved-states__text-prompt",children:[(0,P.jsxs)("div",{className:"entities-saved-states__text-prompt--header-wrapper",id:i?C:void 0,children:[(0,P.jsx)("strong",{className:"entities-saved-states__text-prompt--header",children:(0,gs.__)("Are you ready to save?")}),e]}),(0,P.jsx)("p",{id:i?j:void 0,children:a?(0,u.createInterpolateElement)((0,gs.sprintf)((0,gs._n)("There is <strong>%d site change</strong> waiting to be saved.","There are <strong>%d site changes</strong> waiting to be saved.",x.length),x.length),{strong:(0,P.jsx)("strong",{})}):(0,gs.__)("Select the items you want to save.")})]}),x.map((e=>(0,P.jsx)(Ma,{list:e,unselectedEntities:d,setUnselectedEntities:l},e[0].name)))]})}function za(){try{return(0,c.select)(qi).getEditedPostContent()}catch(e){}}function Ua({text:e,children:t}){const s=(0,p.useCopyToClipboard)(e);return(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,variant:"secondary",ref:s,children:t})}class Ha extends u.Component{constructor(){super(...arguments),this.state={error:null}}componentDidCatch(e){(0,h.doAction)("editor.ErrorBoundary.errorLogged",e)}static getDerivedStateFromError(e){return{error:e}}render(){const{error:e}=this.state;if(!e)return this.props.children;const t=[(0,P.jsx)(Ua,{text:za,children:(0,gs.__)("Copy Post Text")},"copy-post"),(0,P.jsx)(Ua,{text:e.stack,children:(0,gs.__)("Copy Error")},"copy-error")];return(0,P.jsx)(m.Warning,{className:"editor-error-boundary",actions:t,children:(0,gs.__)("The editor has encountered an unexpected error.")})}}const Ga=Ha,$a=window.requestIdleCallback?window.requestIdleCallback:window.requestAnimationFrame;let Wa;function Za(){const{postId:e,isEditedPostNew:t,hasRemoteAutosave:s}=(0,c.useSelect)((e=>({postId:e(qi).getCurrentPostId(),isEditedPostNew:e(qi).isEditedPostNew(),hasRemoteAutosave:!!e(qi).getEditorSettings().autosave})),[]),{getEditedPostAttribute:o}=(0,c.useSelect)(qi),{createWarningNotice:n,removeNotice:i}=(0,c.useDispatch)(ms.store),{editPost:r,resetEditorBlocks:a}=(0,c.useDispatch)(qi);(0,u.useEffect)((()=>{let l=function(e,t){return window.sessionStorage.getItem(_s(e,t))}(e,t);if(!l)return;try{l=JSON.parse(l)}catch{return}const{post_title:c,content:d,excerpt:u}=l,p={title:c,content:d,excerpt:u};if(!Object.keys(p).some((e=>p[e]!==o(e))))return void fs(e,t);if(s)return;const h="wpEditorAutosaveRestore";n((0,gs.__)("The backup of this post in your browser is different from the version below."),{id:h,actions:[{label:(0,gs.__)("Restore the backup"),onClick(){const{content:e,...t}=p;r(t),a((0,y.parse)(p.content)),i(h)}}]})}),[t,e])}const Ya=(0,p.ifCondition)((()=>{if(void 0!==Wa)return Wa;try{window.sessionStorage.setItem("__wpEditorTestSessionStorage",""),window.sessionStorage.removeItem("__wpEditorTestSessionStorage"),Wa=!0}catch{Wa=!1}return Wa}))((function(){const{autosave:e}=(0,c.useDispatch)(qi),t=(0,u.useCallback)((()=>{$a((()=>e({local:!0})))}),[]);Za(),function(){const{postId:e,isEditedPostNew:t,isDirty:s,isAutosaving:o,didError:n}=(0,c.useSelect)((e=>({postId:e(qi).getCurrentPostId(),isEditedPostNew:e(qi).isEditedPostNew(),isDirty:e(qi).isEditedPostDirty(),isAutosaving:e(qi).isAutosavingPost(),didError:e(qi).didPostSaveRequestFail()})),[]),i=(0,u.useRef)(s),r=(0,u.useRef)(o);(0,u.useEffect)((()=>{!n&&(r.current&&!o||i.current&&!s)&&fs(e,t),i.current=s,r.current=o}),[s,o,n]);const a=(0,p.usePrevious)(t),l=(0,p.usePrevious)(e);(0,u.useEffect)((()=>{l===e&&a&&!t&&fs(e,!0)}),[t,e])}();const s=(0,c.useSelect)((e=>e(qi).getEditorSettings().localAutosaveInterval),[]);return(0,P.jsx)(na,{interval:s,autosave:t})}));const Ka=function({children:e}){const t=(0,c.useSelect)((e=>{const{getEditedPostAttribute:t}=e(qi),{getPostType:s}=e(d.store),o=s(t("type"));return!!o?.supports?.["page-attributes"]}),[]);return t?e:null};const qa=function({children:e,supportKeys:t}){const s=(0,c.useSelect)((e=>{const{getEditedPostAttribute:t}=e(qi),{getPostType:s}=e(d.store);return s(t("type"))}),[]);let o=!!s;return s&&(o=(Array.isArray(t)?t:[t]).some((e=>!!s.supports[e]))),o?e:null};function Qa(){const e=(0,c.useSelect)((e=>{var t;return null!==(t=e(qi).getEditedPostAttribute("menu_order"))&&void 0!==t?t:0}),[]),{editPost:t}=(0,c.useDispatch)(qi),[s,o]=(0,u.useState)(null),n=null!=s?s:e;return(0,P.jsx)(Do.Flex,{children:(0,P.jsx)(Do.FlexBlock,{children:(0,P.jsx)(Do.__experimentalNumberControl,{__next40pxDefaultSize:!0,label:(0,gs.__)("Order"),help:(0,gs.__)("Set the page order."),value:n,onChange:e=>{o(e);const s=Number(e);Number.isInteger(s)&&""!==e.trim?.()&&t({menu_order:s})},hideLabelFromVision:!0,onBlur:()=>{o(null)}})})})}function Xa(){return(0,P.jsx)(qa,{supportKeys:"page-attributes",children:(0,P.jsx)(Qa,{})})}var Ja=s(9681),el=s.n(Ja);const tl=(0,u.forwardRef)((({className:e,label:t,children:s},o)=>(0,P.jsxs)(Do.__experimentalHStack,{className:dr("editor-post-panel__row",e),ref:o,children:[t&&(0,P.jsx)("div",{className:"editor-post-panel__row-label",children:t}),(0,P.jsx)("div",{className:"editor-post-panel__row-control",children:s})]})));function sl(e){const t=e.map((e=>({children:[],parent:null,...e})));if(t.some((({parent:e})=>null===e)))return t;const s=t.reduce(((e,t)=>{const{parent:s}=t;return e[s]||(e[s]=[]),e[s].push(t),e}),{}),o=e=>e.map((e=>{const t=s[e.id];return{...e,children:t&&t.length?o(t):[]}}));return o(s[0]||[])}const ol=e=>(0,Ao.decodeEntities)(e),nl=e=>({...e,name:ol(e.name)}),il=e=>(null!=e?e:[]).map(nl);function rl(e){return e?.title?.rendered?(0,Ao.decodeEntities)(e.title.rendered):`#${e.id} (${(0,gs.__)("no title")})`}const al=(e,t)=>{const s=el()(e||"").toLowerCase(),o=el()(t||"").toLowerCase();return s===o?0:s.startsWith(o)?s.length:1/0};function ll(){const{editPost:e}=(0,c.useDispatch)(qi),[t,s]=(0,u.useState)(!1),{isHierarchical:o,parentPostId:n,parentPostTitle:i,pageItems:r}=(0,c.useSelect)((e=>{var s;const{getPostType:o,getEntityRecords:n,getEntityRecord:i}=e(d.store),{getCurrentPostId:r,getEditedPostAttribute:a}=e(qi),l=a("type"),c=a("parent"),u=o(l),p=r(),h=null!==(s=u?.hierarchical)&&void 0!==s&&s,m={per_page:100,exclude:p,parent_exclude:p,orderby:"menu_order",order:"asc",_fields:"id,title,parent"};t&&(m.search=t);const g=c?i("postType",l,c):null;return{isHierarchical:h,parentPostId:c,parentPostTitle:g?rl(g):"",pageItems:h?n("postType",l,m):null}}),[t]),a=(0,u.useMemo)((()=>{const e=(s,o=0)=>{const n=s.map((t=>[{value:t.id,label:"— ".repeat(o)+(0,Ao.decodeEntities)(t.name),rawName:t.name},...e(t.children||[],o+1)])).sort((([e],[s])=>al(e.rawName,t)>=al(s.rawName,t)?1:-1));return n.flat()};if(!r)return[];let s=r.map((e=>({id:e.id,parent:e.parent,name:rl(e)})));t||(s=sl(s));const o=e(s),a=o.find((e=>e.value===n));return i&&!a&&o.unshift({value:n,label:i}),o}),[r,t,i,n]);if(!o)return null;return(0,P.jsx)(Do.ComboboxControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,className:"editor-page-attributes__parent",label:(0,gs.__)("Parent"),help:(0,gs.__)("Choose a parent page."),value:n,options:a,onFilterValueChange:(0,p.debounce)((e=>{s(e)}),300),onChange:t=>{e({parent:t})},hideLabelFromVision:!0})}function cl({isOpen:e,onClick:t}){const s=(0,c.useSelect)((e=>{const{getEditedPostAttribute:t}=e(qi),s=t("parent");if(!s)return null;const{getEntityRecord:o}=e(d.store);return o("postType",t("type"),s)}),[]),o=(0,u.useMemo)((()=>s?rl(s):(0,gs.__)("None")),[s]);return(0,P.jsx)(Do.Button,{size:"compact",className:"editor-post-parent__panel-toggle",variant:"tertiary","aria-expanded":e,"aria-label":(0,gs.sprintf)((0,gs.__)("Change parent: %s"),o),onClick:t,children:o})}function dl(){const e=(0,c.useSelect)((e=>e(d.store).getEntityRecord("root","__unstableBase")?.home),[]),[t,s]=(0,u.useState)(null),o=(0,u.useMemo)((()=>({anchor:t,placement:"left-start",offset:36,shift:!0})),[t]);return(0,P.jsx)(tl,{label:(0,gs.__)("Parent"),ref:s,children:(0,P.jsx)(Do.Dropdown,{popoverProps:o,className:"editor-post-parent__panel-dropdown",contentClassName:"editor-post-parent__panel-dialog",focusOnMount:!0,renderToggle:({isOpen:e,onToggle:t})=>(0,P.jsx)(cl,{isOpen:e,onClick:t}),renderContent:({onClose:t})=>(0,P.jsxs)("div",{className:"editor-post-parent",children:[(0,P.jsx)(m.__experimentalInspectorPopoverHeader,{title:(0,gs.__)("Parent"),onClose:t}),(0,P.jsxs)("div",{children:[(0,u.createInterpolateElement)((0,gs.sprintf)((0,gs.__)('Child pages inherit characteristics from their parent, such as URL structure. For instance, if "Pricing" is a child of "Services", its URL would be %s<wbr />/services<wbr />/pricing.'),(0,v.filterURLForDisplay)(e).replace(/([/.])/g,"<wbr />$1")),{wbr:(0,P.jsx)("wbr",{})}),(0,P.jsx)("p",{children:(0,u.createInterpolateElement)((0,gs.__)("They also show up as sub-items in the default navigation menu. <a>Learn more.</a>"),{a:(0,P.jsx)(Do.ExternalLink,{href:(0,gs.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#page-attributes")})})})]}),(0,P.jsx)(ll,{})]})})})}const ul=ll,pl="page-attributes";function hl(){const{isEnabled:e,postType:t}=(0,c.useSelect)((e=>{const{getEditedPostAttribute:t,isEditorPanelEnabled:s}=e(qi),{getPostType:o}=e(d.store);return{isEnabled:s(pl),postType:o(t("type"))}}),[]);return e&&t?(0,P.jsx)(dl,{}):null}function ml(){return(0,P.jsx)(Ka,{children:(0,P.jsx)(hl,{})})}const gl=(0,P.jsx)(k.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,P.jsx)(k.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18.5 5.5V8H20V5.5H22.5V4H20V1.5H18.5V4H16V5.5H18.5ZM13.9624 4H6C4.89543 4 4 4.89543 4 6V18C4 19.1046 4.89543 20 6 20H18C19.1046 20 20 19.1046 20 18V10.0391H18.5V18C18.5 18.2761 18.2761 18.5 18 18.5H10L10 10.4917L16.4589 10.5139L16.4641 9.01389L5.5 8.97618V6C5.5 5.72386 5.72386 5.5 6 5.5H13.9624V4ZM5.5 10.4762V18C5.5 18.2761 5.72386 18.5 6 18.5H8.5L8.5 10.4865L5.5 10.4762Z"})}),_l=(0,gs.__)("Custom Template");function fl({onClose:e}){const{defaultBlockTemplate:t,onNavigateToEntityRecord:s}=(0,c.useSelect)((e=>{const{getEditorSettings:t,getCurrentTemplateId:s}=e(qi);return{defaultBlockTemplate:t().defaultBlockTemplate,onNavigateToEntityRecord:t().onNavigateToEntityRecord,getTemplateId:s}})),{createTemplate:o}=sn((0,c.useDispatch)(qi)),[n,i]=(0,u.useState)(""),[r,a]=(0,u.useState)(!1),l=()=>{i(""),e()};return(0,P.jsx)(Do.Modal,{title:(0,gs.__)("Create custom template"),onRequestClose:l,focusOnMount:"firstContentElement",size:"small",children:(0,P.jsx)("form",{className:"editor-post-template__create-form",onSubmit:async e=>{if(e.preventDefault(),r)return;a(!0);const i=null!=t?t:(0,y.serialize)([(0,y.createBlock)("core/group",{tagName:"header",layout:{inherit:!0}},[(0,y.createBlock)("core/site-title"),(0,y.createBlock)("core/site-tagline")]),(0,y.createBlock)("core/separator"),(0,y.createBlock)("core/group",{tagName:"main"},[(0,y.createBlock)("core/group",{layout:{inherit:!0}},[(0,y.createBlock)("core/post-title")]),(0,y.createBlock)("core/post-content",{layout:{inherit:!0}})])]),c=await o({slug:(0,v.cleanForSlug)(n||_l),content:i,title:n||_l});a(!1),s({postId:c.id,postType:"wp_template"}),l()},children:(0,P.jsxs)(Do.__experimentalVStack,{spacing:"3",children:[(0,P.jsx)(Do.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,gs.__)("Name"),value:n,onChange:i,placeholder:_l,disabled:r,help:(0,gs.__)('Describe the template, e.g. "Post with sidebar". A custom template can be manually applied to any post or page.')}),(0,P.jsxs)(Do.__experimentalHStack,{justify:"right",children:[(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:l,children:(0,gs.__)("Cancel")}),(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",isBusy:r,"aria-disabled":r,children:(0,gs.__)("Create")})]})]})})})}function bl(){return(0,c.useSelect)((e=>{const{getCurrentPostId:t,getCurrentPostType:s}=e(qi);return{postId:t(),postType:s()}}),[])}function yl(){const{postType:e,postId:t}=bl();return(0,c.useSelect)((s=>{const{canUser:o,getEntityRecord:n,getEntityRecords:i}=s(d.store),r=o("read",{kind:"root",name:"site"})?n("root","site"):void 0,a=i("postType","wp_template",{per_page:-1}),l=+t===r?.page_for_posts,c="page"===e&&+t===r?.page_on_front&&a?.some((({slug:e})=>"front-page"===e));return!l&&!c}),[t,e])}function xl(e){return(0,c.useSelect)((t=>t(d.store).getEntityRecords("postType","wp_template",{per_page:-1,post_type:e})),[e])}function vl(e){const t=wl(),s=yl(),o=xl(e);return(0,u.useMemo)((()=>s&&o?.filter((e=>e.is_custom&&e.slug!==t&&!!e.content.raw))),[o,t,s])}function wl(){const{postType:e,postId:t}=bl(),s=xl(e),o=(0,c.useSelect)((s=>{const o=s(d.store).getEditedEntityRecord("postType",e,t);return o?.template}),[e,t]);if(o)return s?.find((e=>e.slug===o))?.slug}const Sl={className:"editor-post-template__dropdown",placement:"bottom-start"};function kl({isOpen:e,onClick:t}){const s=(0,c.useSelect)((e=>{const t=e(qi).getEditedPostAttribute("template"),{supportsTemplateMode:s,availableTemplates:o}=e(qi).getEditorSettings();if(!s&&o[t])return o[t];const n=e(d.store).canUser("create",{kind:"postType",name:"wp_template"})&&e(qi).getCurrentTemplateId();return n?.title||n?.slug||o?.[t]}),[]);return(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,variant:"tertiary","aria-expanded":e,"aria-label":(0,gs.__)("Template options"),onClick:t,children:null!=s?s:(0,gs.__)("Default template")})}function Pl({onClose:e}){var t,s;const o=yl(),{availableTemplates:n,fetchedTemplates:i,selectedTemplateSlug:r,canCreate:a,canEdit:l,currentTemplateId:p,onNavigateToEntityRecord:h,getEditorSettings:g}=(0,c.useSelect)((e=>{const{canUser:t,getEntityRecords:s}=e(d.store),n=e(qi).getEditorSettings(),i=t("create",{kind:"postType",name:"wp_template"}),r=e(qi).getCurrentTemplateId();return{availableTemplates:n.availableTemplates,fetchedTemplates:i?s("postType","wp_template",{post_type:e(qi).getCurrentPostType(),per_page:-1}):void 0,selectedTemplateSlug:e(qi).getEditedPostAttribute("template"),canCreate:o&&i&&n.supportsTemplateMode,canEdit:o&&i&&n.supportsTemplateMode&&!!r,currentTemplateId:r,onNavigateToEntityRecord:n.onNavigateToEntityRecord,getEditorSettings:e(qi).getEditorSettings}}),[o]),_=(0,u.useMemo)((()=>Object.entries({...n,...Object.fromEntries((null!=i?i:[]).map((({slug:e,title:t})=>[e,t.rendered])))}).map((([e,t])=>({value:e,label:t})))),[n,i]),f=null!==(t=_.find((e=>e.value===r)))&&void 0!==t?t:_.find((e=>!e.value)),{editPost:b}=(0,c.useDispatch)(qi),{createSuccessNotice:y}=(0,c.useDispatch)(ms.store),[x,v]=(0,u.useState)(!1);return(0,P.jsxs)("div",{className:"editor-post-template__classic-theme-dropdown",children:[(0,P.jsx)(m.__experimentalInspectorPopoverHeader,{title:(0,gs.__)("Template"),help:(0,gs.__)("Templates define the way content is displayed when viewing your site."),actions:a?[{icon:gl,label:(0,gs.__)("Add template"),onClick:()=>v(!0)}]:[],onClose:e}),o?(0,P.jsx)(Do.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,hideLabelFromVision:!0,label:(0,gs.__)("Template"),value:null!==(s=f?.value)&&void 0!==s?s:"",options:_,onChange:e=>b({template:e||""})}):(0,P.jsx)(Do.Notice,{status:"warning",isDismissible:!1,children:(0,gs.__)("The posts page template cannot be changed.")}),l&&h&&(0,P.jsx)("p",{children:(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!1,variant:"link",onClick:()=>{h({postId:p,postType:"wp_template"}),e(),y((0,gs.__)("Editing template. Changes made here affect all posts and pages that use the template."),{type:"snackbar",actions:[{label:(0,gs.__)("Go back"),onClick:()=>g().onNavigateToPreviousEntityRecord()}]})},children:(0,gs.__)("Edit template")})}),x&&(0,P.jsx)(fl,{onClose:()=>v(!1)})]})}const Cl=function(){return(0,P.jsx)(Do.Dropdown,{popoverProps:Sl,focusOnMount:!0,renderToggle:({isOpen:e,onToggle:t})=>(0,P.jsx)(kl,{isOpen:e,onClick:t}),renderContent:({onClose:e})=>(0,P.jsx)(Pl,{onClose:e})})},{PreferenceBaseOption:jl}=(window.wp.warning,sn(j.privateApis)),El=(0,p.compose)((0,c.withSelect)(((e,{panelName:t})=>{const{isEditorPanelEnabled:s,isEditorPanelRemoved:o}=e(qi);return{isRemoved:o(t),isChecked:s(t)}})),(0,p.ifCondition)((({isRemoved:e})=>!e)),(0,c.withDispatch)(((e,{panelName:t})=>({onChange:()=>e(qi).toggleEditorPanelEnabled(t)}))))(jl),{Fill:Tl,Slot:Bl}=(0,Do.createSlotFill)("EnablePluginDocumentSettingPanelOption"),Il=({label:e,panelName:t})=>(0,P.jsx)(Tl,{children:(0,P.jsx)(El,{label:e,panelName:t})});Il.Slot=Bl;const Nl=Il,{Fill:Al,Slot:Dl}=(0,Do.createSlotFill)("PluginDocumentSettingPanel"),Rl=({name:e,className:t,title:s,icon:o,children:n})=>{const{name:i}=(0,Ar.usePluginContext)(),r=`${i}/${e}`,{opened:a,isEnabled:l}=(0,c.useSelect)((e=>{const{isEditorPanelOpened:t,isEditorPanelEnabled:s}=e(qi);return{opened:t(r),isEnabled:s(r)}}),[r]),{toggleEditorPanelOpened:d}=(0,c.useDispatch)(qi);return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(Nl,{label:s,panelName:r}),(0,P.jsx)(Al,{children:l&&(0,P.jsx)(Do.PanelBody,{className:t,title:s,icon:o,opened:a,onToggle:()=>d(r),children:n})})]})};Rl.Slot=Dl;const Ml=Rl,Ol=({allowedBlocks:e,icon:t,label:s,onClick:o,small:n,role:i})=>(0,P.jsx)(m.BlockSettingsMenuControls,{children:({selectedBlocks:r,onClose:a})=>((e,t)=>{return!Array.isArray(t)||(s=t,0===e.filter((e=>!s.includes(e))).length);var s})(r,e)?(0,P.jsx)(Do.MenuItem,{onClick:(0,p.compose)(o,a),icon:t,label:n?s:void 0,role:i,children:!n&&s}):null}),Ll=(0,p.compose)((0,Ar.withPluginContext)(((e,t)=>{var s;return{as:null!==(s=t.as)&&void 0!==s?s:Do.MenuItem,icon:t.icon||e.icon,name:"core/plugin-more-menu"}})))(Fr),{Fill:Fl,Slot:Vl}=(0,Do.createSlotFill)("PluginPostPublishPanel"),zl=({children:e,className:t,title:s,initialOpen:o=!1,icon:n})=>{const{icon:i}=(0,Ar.usePluginContext)();return(0,P.jsx)(Fl,{children:(0,P.jsx)(Do.PanelBody,{className:t,initialOpen:o||!s,title:s,icon:null!=n?n:i,children:e})})};zl.Slot=Vl;const Ul=zl,{Fill:Hl,Slot:Gl}=(0,Do.createSlotFill)("PluginPostStatusInfo"),$l=({children:e,className:t})=>(0,P.jsx)(Hl,{children:(0,P.jsx)(Do.PanelRow,{className:t,children:e})});$l.Slot=Gl;const Wl=$l,{Fill:Zl,Slot:Yl}=(0,Do.createSlotFill)("PluginPrePublishPanel"),Kl=({children:e,className:t,title:s,initialOpen:o=!1,icon:n})=>{const{icon:i}=(0,Ar.usePluginContext)();return(0,P.jsx)(Zl,{children:(0,P.jsx)(Do.PanelBody,{className:t,initialOpen:o||!s,title:s,icon:null!=n?n:i,children:e})})};Kl.Slot=Yl;const ql=Kl,Ql=(0,p.compose)((0,Ar.withPluginContext)(((e,t)=>{var s;return{as:null!==(s=t.as)&&void 0!==s?s:Do.MenuItem,icon:t.icon||e.icon,name:"core/plugin-preview-menu"}})))(Fr);function Xl({className:e,...t}){const{postTitle:s}=(0,c.useSelect)((e=>({postTitle:e(qi).getEditedPostAttribute("title")})),[]);return(0,P.jsx)(Kr,{panelClassName:e,className:"editor-sidebar",smallScreenTitle:s||(0,gs.__)("(no title)"),scope:"core",...t})}function Jl(e){return(0,P.jsx)(zr,{__unstableExplicitMenuItem:!0,scope:"core",...e})}function ec({onClick:e}){const[t,s]=(0,u.useState)(!1),{postType:o,postId:n}=bl(),i=vl(o),{editEntityRecord:r}=(0,c.useDispatch)(d.store);if(!i?.length)return null;return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(Do.MenuItem,{onClick:()=>s(!0),children:(0,gs.__)("Swap template")}),t&&(0,P.jsx)(Do.Modal,{title:(0,gs.__)("Choose a template"),onRequestClose:()=>s(!1),overlayClassName:"editor-post-template__swap-template-modal",isFullScreen:!0,children:(0,P.jsx)("div",{className:"editor-post-template__swap-template-modal-content",children:(0,P.jsx)(tc,{postType:o,onSelect:async t=>{r("postType",o,n,{template:t.name},{undoIgnore:!0}),s(!1),e()}})})})]})}function tc({postType:e,onSelect:t}){const s=vl(e),o=(0,u.useMemo)((()=>s.map((e=>({name:e.slug,blocks:(0,y.parse)(e.content.raw),title:(0,Ao.decodeEntities)(e.title.rendered),id:e.id})))),[s]),n=(0,p.useAsyncList)(o);return(0,P.jsx)(m.__experimentalBlockPatternsList,{label:(0,gs.__)("Templates"),blockPatterns:o,shownPatterns:n,onClickPattern:t})}function sc({onClick:e}){const t=wl(),s=yl(),{postType:o,postId:n}=bl(),{editEntityRecord:i}=(0,c.useDispatch)(d.store);return t&&s?(0,P.jsx)(Do.MenuItem,{onClick:()=>{i("postType",o,n,{template:""},{undoIgnore:!0}),e()},children:(0,gs.__)("Use default template")}):null}function oc({onClick:e}){const{canCreateTemplates:t}=(0,c.useSelect)((e=>{const{canUser:t}=e(d.store);return{canCreateTemplates:t("create",{kind:"postType",name:"wp_template"})}}),[]),[s,o]=(0,u.useState)(!1),n=yl();return t&&n?(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(Do.MenuItem,{onClick:()=>{o(!0)},children:(0,gs.__)("Create new template")}),s&&(0,P.jsx)(fl,{onClose:()=>{o(!1),e()}})]}):null}const nc={className:"editor-post-template__dropdown",placement:"bottom-start"};function ic({id:e}){const{isTemplateHidden:t,onNavigateToEntityRecord:s,getEditorSettings:o,hasGoBack:n}=(0,c.useSelect)((e=>{const{getRenderingMode:t,getEditorSettings:s}=sn(e(qi)),o=s();return{isTemplateHidden:"post-only"===t(),onNavigateToEntityRecord:o.onNavigateToEntityRecord,getEditorSettings:s,hasGoBack:o.hasOwnProperty("onNavigateToPreviousEntityRecord")}}),[]),{get:i}=(0,c.useSelect)(j.store),{editedRecord:r,hasResolved:a}=(0,d.useEntityRecord)("postType","wp_template",e),{createSuccessNotice:l}=(0,c.useDispatch)(ms.store),{setRenderingMode:u}=(0,c.useDispatch)(qi),p=(0,c.useSelect)((e=>!!e(d.store).canUser("create",{kind:"postType",name:"wp_template"})),[]);if(!a)return null;const h=n?[{label:(0,gs.__)("Go back"),onClick:()=>o().onNavigateToPreviousEntityRecord()}]:void 0;return(0,P.jsx)(Do.DropdownMenu,{popoverProps:nc,focusOnMount:!0,toggleProps:{size:"compact",variant:"tertiary",tooltipPosition:"middle left"},label:(0,gs.__)("Template options"),text:(0,Ao.decodeEntities)(r.title),icon:null,children:({onClose:e})=>(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(Do.MenuGroup,{children:[p&&(0,P.jsx)(Do.MenuItem,{onClick:()=>{s({postId:r.id,postType:"wp_template"}),e(),i("core/edit-site","welcomeGuideTemplate")||l((0,gs.__)("Editing template. Changes made here affect all posts and pages that use the template."),{type:"snackbar",actions:h})},children:(0,gs.__)("Edit template")}),(0,P.jsx)(ec,{onClick:e}),(0,P.jsx)(sc,{onClick:e}),p&&(0,P.jsx)(oc,{onClick:e})]}),(0,P.jsx)(Do.MenuGroup,{children:(0,P.jsx)(Do.MenuItem,{icon:t?void 0:Ro,isSelected:!t,role:"menuitemcheckbox",onClick:()=>{u(t?"template-locked":"post-only")},children:(0,gs.__)("Show template")})})]})})}function rc(){const{templateId:e,isBlockTheme:t}=(0,c.useSelect)((e=>{const{getCurrentTemplateId:t,getEditorSettings:s}=e(qi);return{templateId:t(),isBlockTheme:s().__unstableIsBlockBasedTheme}}),[]),s=(0,c.useSelect)((e=>{var t;const s=e(qi).getCurrentPostType(),o=e(d.store).getPostType(s);if(!o?.viewable)return!1;const n=e(qi).getEditorSettings();if(!!n.availableTemplates&&Object.keys(n.availableTemplates).length>0)return!0;if(!n.supportsTemplateMode)return!1;return null!==(t=e(d.store).canUser("create",{kind:"postType",name:"wp_template"}))&&void 0!==t&&t}),[]),o=(0,c.useSelect)((e=>{var t;return null!==(t=e(d.store).canUser("read",{kind:"postType",name:"wp_template"}))&&void 0!==t&&t}),[]);return t&&o||!s?t&&e?(0,P.jsx)(tl,{label:(0,gs.__)("Template"),children:(0,P.jsx)(ic,{id:e})}):null:(0,P.jsx)(tl,{label:(0,gs.__)("Template"),children:(0,P.jsx)(Cl,{})})}const ac={_fields:"id,name",context:"view"},lc={who:"authors",per_page:50,...ac};function cc(e){const{authorId:t,authors:s,postAuthor:o}=(0,c.useSelect)((t=>{const{getUser:s,getUsers:o}=t(d.store),{getEditedPostAttribute:n}=t(qi),i=n("author"),r={...lc};return e&&(r.search=e),{authorId:i,authors:o(r),postAuthor:s(i,ac)}}),[e]);return{authorId:t,authorOptions:(0,u.useMemo)((()=>{const e=(null!=s?s:[]).map((e=>({value:e.id,label:(0,Ao.decodeEntities)(e.name)}))),t=e.findIndex((({value:e})=>o?.id===e));let n=[];return t<0&&o?n=[{value:o.id,label:(0,Ao.decodeEntities)(o.name)}]:t<0&&!o&&(n=[{value:0,label:(0,gs.__)("(No author)")}]),[...n,...e]}),[s,o]),postAuthor:o}}function dc(){const[e,t]=(0,u.useState)(),{editPost:s}=(0,c.useDispatch)(qi),{authorId:o,authorOptions:n}=cc(e);return(0,P.jsx)(Do.ComboboxControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,gs.__)("Author"),options:n,value:o,onFilterValueChange:(0,p.debounce)((e=>{t(e)}),300),onChange:e=>{e&&s({author:e})},allowReset:!1,hideLabelFromVision:!0})}function uc(){const{editPost:e}=(0,c.useDispatch)(qi),{authorId:t,authorOptions:s}=cc();return(0,P.jsx)(Do.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,className:"post-author-selector",label:(0,gs.__)("Author"),options:s,onChange:t=>{const s=Number(t);e({author:s})},value:t,hideLabelFromVision:!0})}const pc=function(){return(0,c.useSelect)((e=>{const t=e(d.store).getUsers(lc);return t?.length>=25}),[])?(0,P.jsx)(dc,{}):(0,P.jsx)(uc,{})};function hc({children:e}){const{hasAssignAuthorAction:t,hasAuthors:s}=(0,c.useSelect)((e=>{var t;const s=e(qi).getCurrentPost(),o=e(d.store).getUsers(lc);return{hasAssignAuthorAction:null!==(t=s._links?.["wp:action-assign-author"])&&void 0!==t&&t,hasAuthors:o?.length>=1}}),[]);return t&&s?(0,P.jsx)(qa,{supportKeys:"author",children:e}):null}function mc({isOpen:e,onClick:t}){const{postAuthor:s}=cc(),o=(0,Ao.decodeEntities)(s?.name)||(0,gs.__)("(No author)");return(0,P.jsx)(Do.Button,{size:"compact",className:"editor-post-author__panel-toggle",variant:"tertiary","aria-expanded":e,"aria-label":(0,gs.sprintf)((0,gs.__)("Change author: %s"),o),onClick:t,children:o})}const gc=function(){const[e,t]=(0,u.useState)(null),s=(0,u.useMemo)((()=>({anchor:e,placement:"left-start",offset:36,shift:!0})),[e]);return(0,P.jsx)(hc,{children:(0,P.jsx)(tl,{label:(0,gs.__)("Author"),ref:t,children:(0,P.jsx)(Do.Dropdown,{popoverProps:s,contentClassName:"editor-post-author__panel-dialog",focusOnMount:!0,renderToggle:({isOpen:e,onToggle:t})=>(0,P.jsx)(mc,{isOpen:e,onClick:t}),renderContent:({onClose:e})=>(0,P.jsxs)("div",{className:"editor-post-author",children:[(0,P.jsx)(m.__experimentalInspectorPopoverHeader,{title:(0,gs.__)("Author"),onClose:e}),(0,P.jsx)(pc,{onClose:e})]})})})})},_c=[{label:(0,gs._x)("Open",'Adjective: e.g. "Comments are open"'),value:"open",description:(0,gs.__)("Visitors can add new comments and replies.")},{label:(0,gs.__)("Closed"),value:"closed",description:[(0,gs.__)("Visitors cannot add new comments or replies."),(0,gs.__)("Existing comments remain visible.")].join(" ")}];const fc=function(){const e=(0,c.useSelect)((e=>{var t;return null!==(t=e(qi).getEditedPostAttribute("comment_status"))&&void 0!==t?t:"open"}),[]),{editPost:t}=(0,c.useDispatch)(qi);return(0,P.jsx)("form",{children:(0,P.jsx)(Do.__experimentalVStack,{spacing:4,children:(0,P.jsx)(Do.RadioControl,{className:"editor-change-status__options",hideLabelFromVision:!0,label:(0,gs.__)("Comment status"),options:_c,onChange:e=>t({comment_status:e}),selected:e})})})};const bc=function(){const e=(0,c.useSelect)((e=>{var t;return null!==(t=e(qi).getEditedPostAttribute("ping_status"))&&void 0!==t?t:"open"}),[]),{editPost:t}=(0,c.useDispatch)(qi);return(0,P.jsx)(Do.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,gs.__)("Enable pingbacks & trackbacks"),checked:"open"===e,onChange:()=>t({ping_status:"open"===e?"closed":"open"}),help:(0,P.jsx)(Do.ExternalLink,{href:(0,gs.__)("https://wordpress.org/documentation/article/trackbacks-and-pingbacks/"),children:(0,gs.__)("Learn more about pingbacks & trackbacks")})})},yc="discussion-panel";function xc({onClose:e}){return(0,P.jsxs)("div",{className:"editor-post-discussion",children:[(0,P.jsx)(m.__experimentalInspectorPopoverHeader,{title:(0,gs.__)("Discussion"),onClose:e}),(0,P.jsxs)(Do.__experimentalVStack,{spacing:4,children:[(0,P.jsx)(qa,{supportKeys:"comments",children:(0,P.jsx)(fc,{})}),(0,P.jsx)(qa,{supportKeys:"trackbacks",children:(0,P.jsx)(bc,{})})]})]})}function vc({isOpen:e,onClick:t}){const{commentStatus:s,pingStatus:o,commentsSupported:n,trackbacksSupported:i}=(0,c.useSelect)((e=>{var t,s;const{getEditedPostAttribute:o}=e(qi),{getPostType:n}=e(d.store),i=n(o("type"));return{commentStatus:null!==(t=o("comment_status"))&&void 0!==t?t:"open",pingStatus:null!==(s=o("ping_status"))&&void 0!==s?s:"open",commentsSupported:!!i.supports.comments,trackbacksSupported:!!i.supports.trackbacks}}),[]);let r;return r="open"===s?"open"===o?(0,gs._x)("Open",'Adjective: e.g. "Comments are open"'):i?(0,gs.__)("Comments only"):(0,gs._x)("Open",'Adjective: e.g. "Comments are open"'):"open"===o?n?(0,gs.__)("Pings only"):(0,gs.__)("Pings enabled"):(0,gs.__)("Closed"),(0,P.jsx)(Do.Button,{size:"compact",className:"editor-post-discussion__panel-toggle",variant:"tertiary","aria-label":(0,gs.__)("Change discussion options"),"aria-expanded":e,onClick:t,children:r})}function wc(){const{isEnabled:e}=(0,c.useSelect)((e=>{const{isEditorPanelEnabled:t}=e(qi);return{isEnabled:t(yc)}}),[]),[t,s]=(0,u.useState)(null),o=(0,u.useMemo)((()=>({anchor:t,placement:"left-start",offset:36,shift:!0})),[t]);return e?(0,P.jsx)(qa,{supportKeys:["comments","trackbacks"],children:(0,P.jsx)(tl,{label:(0,gs.__)("Discussion"),ref:s,children:(0,P.jsx)(Do.Dropdown,{popoverProps:o,className:"editor-post-discussion__panel-dropdown",contentClassName:"editor-post-discussion__panel-dialog",focusOnMount:!0,renderToggle:({isOpen:e,onToggle:t})=>(0,P.jsx)(vc,{isOpen:e,onClick:t}),renderContent:({onClose:e})=>(0,P.jsx)(xc,{onClose:e})})})}):null}function Sc({hideLabelFromVision:e=!1,updateOnBlur:t=!1}){const{excerpt:s,shouldUseDescriptionLabel:o,usedAttribute:n}=(0,c.useSelect)((e=>{const{getCurrentPostType:t,getEditedPostAttribute:s}=e(qi),o=t(),n=["wp_template","wp_template_part"].includes(o)?"description":"excerpt";return{excerpt:s(n),shouldUseDescriptionLabel:["wp_template","wp_template_part","wp_block"].includes(o),usedAttribute:n}}),[]),{editPost:i}=(0,c.useDispatch)(qi),[r,a]=(0,u.useState)((0,Ao.decodeEntities)(s)),l=e=>{i({[n]:e})},d=o?(0,gs.__)("Write a description (optional)"):(0,gs.__)("Write an excerpt (optional)");return(0,P.jsx)("div",{className:"editor-post-excerpt",children:(0,P.jsx)(Do.TextareaControl,{__nextHasNoMarginBottom:!0,label:d,hideLabelFromVision:e,className:"editor-post-excerpt__textarea",onChange:t?a:l,onBlur:t?()=>l(r):void 0,value:t?r:s,help:o?(0,gs.__)("Write a description"):(0,P.jsx)(Do.ExternalLink,{href:(0,gs.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#excerpt"),children:(0,gs.__)("Learn more about manual excerpts")})})})}const kc=function({children:e}){return(0,P.jsx)(qa,{supportKeys:"excerpt",children:e})},{Fill:Pc,Slot:Cc}=(0,Do.createSlotFill)("PluginPostExcerpt"),jc=({children:e,className:t})=>(0,P.jsx)(Pc,{children:(0,P.jsx)(Do.PanelRow,{className:t,children:e})});jc.Slot=Cc;const Ec=jc,Tc="post-excerpt";function Bc(){const{isOpened:e,isEnabled:t,postType:s}=(0,c.useSelect)((e=>{const{isEditorPanelOpened:t,isEditorPanelEnabled:s,getCurrentPostType:o}=e(qi);return{isOpened:t(Tc),isEnabled:s(Tc),postType:o()}}),[]),{toggleEditorPanelOpened:o}=(0,c.useDispatch)(qi);if(!t)return null;const n=["wp_template","wp_template_part","wp_block"].includes(s);return(0,P.jsx)(Do.PanelBody,{title:n?(0,gs.__)("Description"):(0,gs.__)("Excerpt"),opened:e,onToggle:()=>o(Tc),children:(0,P.jsx)(Ec.Slot,{children:e=>(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(Sc,{}),e]})})})}function Ic(){return(0,P.jsx)(kc,{children:(0,P.jsx)(Bc,{})})}function Nc(){return(0,P.jsx)(kc,{children:(0,P.jsx)(Ac,{})})}function Ac(){const{shouldRender:e,excerpt:t,shouldBeUsedAsDescription:s,allowEditing:o}=(0,c.useSelect)((e=>{const{getCurrentPostType:t,getCurrentPostId:s,getEditedPostAttribute:o,isEditorPanelEnabled:n}=e(qi),i=t(),r=["wp_template","wp_template_part"].includes(i),a="wp_block"===i,l=r||a,c=r?"description":"excerpt",u=r&&e(d.store).getEntityRecord("postType",i,s()),p=n(Tc)||l;return{excerpt:o(c),shouldRender:p,shouldBeUsedAsDescription:l,allowEditing:p&&(!l||a||u&&u.source===F.custom&&!u.has_theme_file&&u.is_custom)}}),[]),[n,i]=(0,u.useState)(null),r=s?(0,gs.__)("Description"):(0,gs.__)("Excerpt"),a=(0,u.useMemo)((()=>({anchor:n,"aria-label":r,headerTitle:r,placement:"left-start",offset:36,shift:!0})),[n,r]);if(!e)return!1;const l=!!t&&(0,P.jsx)(Do.__experimentalText,{align:"left",numberOfLines:4,truncate:o,children:(0,Ao.decodeEntities)(t)});if(!o)return l;const p=s?(0,gs.__)("Add a description…"):(0,gs.__)("Add an excerpt…"),h=s?(0,gs.__)("Edit description"):(0,gs.__)("Edit excerpt");return(0,P.jsxs)(Do.__experimentalVStack,{children:[l,(0,P.jsx)(Do.Dropdown,{className:"editor-post-excerpt__dropdown",contentClassName:"editor-post-excerpt__dropdown__content",popoverProps:a,focusOnMount:!0,ref:i,renderToggle:({onToggle:e})=>(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,onClick:e,variant:"link",children:l?h:p}),renderContent:({onClose:e})=>(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(m.__experimentalInspectorPopoverHeader,{title:r,onClose:e}),(0,P.jsx)(Do.__experimentalVStack,{spacing:4,children:(0,P.jsx)(Ec.Slot,{children:e=>(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(Sc,{hideLabelFromVision:!0,updateOnBlur:!0}),e]})})})]})})]})}function Dc({children:e,supportKeys:t}){const{postType:s,themeSupports:o}=(0,c.useSelect)((e=>({postType:e(qi).getEditedPostAttribute("type"),themeSupports:e(d.store).getThemeSupports()})),[]);return(Array.isArray(t)?t:[t]).some((e=>{var t;const n=null!==(t=o?.[e])&&void 0!==t&&t;return"post-thumbnails"===e&&Array.isArray(n)?n.includes(s):n}))?e:null}const Rc=function({children:e}){return(0,P.jsx)(Dc,{supportKeys:"post-thumbnails",children:(0,P.jsx)(qa,{supportKeys:"thumbnail",children:e})})},Mc=["image"],Oc=(0,gs.__)("Featured image"),Lc=(0,gs.__)("Add a featured image"),Fc=(0,P.jsx)("p",{children:(0,gs.__)("To edit the featured image, you need permission to upload media.")});const Vc=(0,c.withSelect)((e=>{const{getMedia:t,getPostType:s}=e(d.store),{getCurrentPostId:o,getEditedPostAttribute:n}=e(qi),i=n("featured_media");return{media:i?t(i,{context:"view"}):null,currentPostId:o(),postType:s(n("type")),featuredImageId:i}})),zc=(0,c.withDispatch)(((e,{noticeOperations:t},{select:s})=>{const{editPost:o}=e(qi);return{onUpdateImage(e){o({featured_media:e.id})},onDropImage(e){s(m.store).getSettings().mediaUpload({allowedTypes:["image"],filesList:e,onFileChange([e]){o({featured_media:e.id})},onError(e){t.removeAllNotices(),t.createErrorNotice(e)}})},onRemoveImage(){o({featured_media:0})}}})),Uc=(0,p.compose)(Do.withNotices,Vc,zc,(0,Do.withFilters)("editor.PostFeaturedImage"))((function({currentPostId:e,featuredImageId:t,onUpdateImage:s,onRemoveImage:o,media:n,postType:i,noticeUI:r,noticeOperations:a}){const l=(0,u.useRef)(),[d,p]=(0,u.useState)(!1),{getSettings:g}=(0,c.useSelect)(m.store),{mediaSourceUrl:_}=function(e,t){var s,o;if(!e)return{};const n=(0,h.applyFilters)("editor.PostFeaturedImage.imageSize","large",e.id,t);if(n in(null!==(s=e?.media_details?.sizes)&&void 0!==s?s:{}))return{mediaWidth:e.media_details.sizes[n].width,mediaHeight:e.media_details.sizes[n].height,mediaSourceUrl:e.media_details.sizes[n].source_url};const i=(0,h.applyFilters)("editor.PostFeaturedImage.imageSize","thumbnail",e.id,t);return i in(null!==(o=e?.media_details?.sizes)&&void 0!==o?o:{})?{mediaWidth:e.media_details.sizes[i].width,mediaHeight:e.media_details.sizes[i].height,mediaSourceUrl:e.media_details.sizes[i].source_url}:{mediaWidth:e.media_details.width,mediaHeight:e.media_details.height,mediaSourceUrl:e.source_url}}(n,e);function f(e){g().mediaUpload({allowedTypes:Mc,filesList:e,onFileChange([e]){(0,ci.isBlobURL)(e?.url)?p(!0):(e&&s(e),p(!1))},onError(e){a.removeAllNotices(),a.createErrorNotice(e)}})}return(0,P.jsxs)(Rc,{children:[r,(0,P.jsxs)("div",{className:"editor-post-featured-image",children:[n&&(0,P.jsxs)("div",{id:`editor-post-featured-image-${t}-describedby`,className:"hidden",children:[n.alt_text&&(0,gs.sprintf)((0,gs.__)("Current image: %s"),n.alt_text),!n.alt_text&&(0,gs.sprintf)((0,gs.__)("The current image has no alternative text. The file name is: %s"),n.media_details.sizes?.full?.file||n.slug)]}),(0,P.jsx)(m.MediaUploadCheck,{fallback:Fc,children:(0,P.jsx)(m.MediaUpload,{title:i?.labels?.featured_image||Oc,onSelect:s,unstableFeaturedImageFlow:!0,allowedTypes:Mc,modalClass:"editor-post-featured-image__media-modal",render:({open:e})=>(0,P.jsxs)("div",{className:"editor-post-featured-image__container",children:[(0,P.jsxs)(Do.Button,{__next40pxDefaultSize:!0,ref:l,className:t?"editor-post-featured-image__preview":"editor-post-featured-image__toggle",onClick:e,"aria-label":t?(0,gs.__)("Edit or replace the featured image"):null,"aria-describedby":t?`editor-post-featured-image-${t}-describedby`:null,"aria-haspopup":"dialog",disabled:d,accessibleWhenDisabled:!0,children:[!!t&&n&&(0,P.jsx)("img",{className:"editor-post-featured-image__preview-image",src:_,alt:""}),d&&(0,P.jsx)(Do.Spinner,{}),!t&&!d&&(i?.labels?.set_featured_image||Lc)]}),!!t&&(0,P.jsxs)(Do.__experimentalHStack,{className:"editor-post-featured-image__actions",children:[(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,className:"editor-post-featured-image__action",onClick:e,"aria-haspopup":"dialog",children:(0,gs.__)("Replace")}),(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,className:"editor-post-featured-image__action",onClick:()=>{o(),l.current.focus()},children:(0,gs.__)("Remove")})]}),(0,P.jsx)(Do.DropZone,{onFilesDrop:f})]}),value:t})})]})]})})),Hc="featured-image";function Gc({withPanelBody:e=!0}){var t;const{postType:s,isEnabled:o,isOpened:n}=(0,c.useSelect)((e=>{const{getEditedPostAttribute:t,isEditorPanelEnabled:s,isEditorPanelOpened:o}=e(qi),{getPostType:n}=e(d.store);return{postType:n(t("type")),isEnabled:s(Hc),isOpened:o(Hc)}}),[]),{toggleEditorPanelOpened:i}=(0,c.useDispatch)(qi);return o?e?(0,P.jsx)(Rc,{children:(0,P.jsx)(Do.PanelBody,{title:null!==(t=s?.labels?.featured_image)&&void 0!==t?t:(0,gs.__)("Featured image"),opened:n,onToggle:()=>i(Hc),children:(0,P.jsx)(Uc,{})})}):(0,P.jsx)(Rc,{children:(0,P.jsx)(Uc,{})}):null}const $c=function({children:e}){return(0,c.useSelect)((e=>e(qi).getEditorSettings().disablePostFormats),[])?null:(0,P.jsx)(qa,{supportKeys:"post-formats",children:e})},Wc=[{id:"aside",caption:(0,gs.__)("Aside")},{id:"audio",caption:(0,gs.__)("Audio")},{id:"chat",caption:(0,gs.__)("Chat")},{id:"gallery",caption:(0,gs.__)("Gallery")},{id:"image",caption:(0,gs.__)("Image")},{id:"link",caption:(0,gs.__)("Link")},{id:"quote",caption:(0,gs.__)("Quote")},{id:"standard",caption:(0,gs.__)("Standard")},{id:"status",caption:(0,gs.__)("Status")},{id:"video",caption:(0,gs.__)("Video")}].sort(((e,t)=>{const s=e.caption.toUpperCase(),o=t.caption.toUpperCase();return s<o?-1:s>o?1:0}));function Zc(){const e=`post-format-selector-${(0,p.useInstanceId)(Zc)}`,{postFormat:t,suggestedFormat:s,supportedFormats:o}=(0,c.useSelect)((e=>{const{getEditedPostAttribute:t,getSuggestedPostFormat:s}=e(qi),o=t("format"),n=e(d.store).getThemeSupports();return{postFormat:null!=o?o:"standard",suggestedFormat:s(),supportedFormats:n.formats}}),[]),n=Wc.filter((e=>o?.includes(e.id)||t===e.id)),i=n.find((e=>e.id===s)),{editPost:r}=(0,c.useDispatch)(qi),a=e=>r({format:e});return(0,P.jsx)($c,{children:(0,P.jsxs)("div",{className:"editor-post-format",children:[(0,P.jsx)(Do.RadioControl,{className:"editor-post-format__options",label:(0,gs.__)("Post Format"),selected:t,onChange:e=>a(e),id:e,options:n.map((e=>({label:e.caption,value:e.id}))),hideLabelFromVision:!0}),i&&i.id!==t&&(0,P.jsx)("p",{className:"editor-post-format__suggestion",children:(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>a(i.id),children:(0,gs.sprintf)((0,gs.__)("Apply suggested format: %s"),i.caption)})})]})})}const Yc=function({children:e}){const{lastRevisionId:t,revisionsCount:s}=(0,c.useSelect)((e=>{const{getCurrentPostLastRevisionId:t,getCurrentPostRevisionsCount:s}=e(qi);return{lastRevisionId:t(),revisionsCount:s()}}),[]);return!t||s<2?null:(0,P.jsx)(qa,{supportKeys:"revisions",children:e})};function Kc(){return(0,c.useSelect)((e=>{const{getCurrentPostLastRevisionId:t,getCurrentPostRevisionsCount:s}=e(qi);return{lastRevisionId:t(),revisionsCount:s()}}),[])}function qc(){const{lastRevisionId:e,revisionsCount:t}=Kc();return(0,P.jsx)(Yc,{children:(0,P.jsx)(tl,{label:(0,gs.__)("Revisions"),children:(0,P.jsx)(Do.Button,{href:(0,v.addQueryArgs)("revision.php",{revision:e}),className:"editor-private-post-last-revision__button",text:t,variant:"tertiary",size:"compact"})})})}const Qc=function(){const{lastRevisionId:e,revisionsCount:t}=Kc();return(0,P.jsx)(Yc,{children:(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,href:(0,v.addQueryArgs)("revision.php",{revision:e}),className:"editor-post-last-revision__title",icon:Jo,iconPosition:"right",text:(0,gs.sprintf)((0,gs.__)("Revisions (%s)"),t)})})};const Xc=function(){return(0,P.jsx)(Yc,{children:(0,P.jsx)(Do.PanelBody,{className:"editor-post-last-revision__panel",children:(0,P.jsx)(Qc,{})})})};function Jc(){const e="core/editor/post-locked-modal-"+(0,p.useInstanceId)(Jc),{autosave:t,updatePostLock:s}=(0,c.useDispatch)(qi),{isLocked:o,isTakeover:n,user:i,postId:r,postLockUtils:a,activePostLock:l,postType:m,previewLink:g}=(0,c.useSelect)((e=>{const{isPostLocked:t,isPostLockTakeover:s,getPostLockUser:o,getCurrentPostId:n,getActivePostLock:i,getEditedPostAttribute:r,getEditedPostPreviewLink:a,getEditorSettings:l}=e(qi),{getPostType:c}=e(d.store);return{isLocked:t(),isTakeover:s(),user:o(),postId:n(),postLockUtils:l().postLockUtils,activePostLock:i(),postType:c(r("type")),previewLink:a()}}),[]);if((0,u.useEffect)((()=>{function n(){if(o||!l)return;const e=new window.FormData;if(e.append("action","wp-remove-post-lock"),e.append("_wpnonce",a.unlockNonce),e.append("post_ID",r),e.append("active_post_lock",l),window.navigator.sendBeacon)window.navigator.sendBeacon(a.ajaxUrl,e);else{const t=new window.XMLHttpRequest;t.open("POST",a.ajaxUrl,!1),t.send(e)}}return(0,h.addAction)("heartbeat.send",e,(function(e){o||(e["wp-refresh-post-lock"]={lock:l,post_id:r})})),(0,h.addAction)("heartbeat.tick",e,(function(e){if(!e["wp-refresh-post-lock"])return;const o=e["wp-refresh-post-lock"];o.lock_error?(t(),s({isLocked:!0,isTakeover:!0,user:{name:o.lock_error.name,avatar:o.lock_error.avatar_src_2x}})):o.new_lock&&s({isLocked:!1,activePostLock:o.new_lock})})),window.addEventListener("beforeunload",n),()=>{(0,h.removeAction)("heartbeat.send",e),(0,h.removeAction)("heartbeat.tick",e),window.removeEventListener("beforeunload",n)}}),[]),!o)return null;const _=i.name,f=i.avatar,b=(0,v.addQueryArgs)("post.php",{"get-post-lock":"1",lockKey:!0,post:r,action:"edit",_wpnonce:a.nonce}),y=(0,v.addQueryArgs)("edit.php",{post_type:m?.slug}),x=(0,gs.__)("Exit editor");return(0,P.jsx)(Do.Modal,{title:n?(0,gs.__)("Someone else has taken over this post"):(0,gs.__)("This post is already being edited"),focusOnMount:!0,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,isDismissible:!1,className:"editor-post-locked-modal",size:"medium",children:(0,P.jsxs)(Do.__experimentalHStack,{alignment:"top",spacing:6,children:[!!f&&(0,P.jsx)("img",{src:f,alt:(0,gs.__)("Avatar"),className:"editor-post-locked-modal__avatar",width:64,height:64}),(0,P.jsxs)("div",{children:[!!n&&(0,P.jsx)("p",{children:(0,u.createInterpolateElement)(_?(0,gs.sprintf)((0,gs.__)("<strong>%s</strong> now has editing control of this post (<PreviewLink />). Don’t worry, your changes up to this moment have been saved."),_):(0,gs.__)("Another user now has editing control of this post (<PreviewLink />). Don’t worry, your changes up to this moment have been saved."),{strong:(0,P.jsx)("strong",{}),PreviewLink:(0,P.jsx)(Do.ExternalLink,{href:g,children:(0,gs.__)("preview")})})}),!n&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)("p",{children:(0,u.createInterpolateElement)(_?(0,gs.sprintf)((0,gs.__)("<strong>%s</strong> is currently working on this post (<PreviewLink />), which means you cannot make changes, unless you take over."),_):(0,gs.__)("Another user is currently working on this post (<PreviewLink />), which means you cannot make changes, unless you take over."),{strong:(0,P.jsx)("strong",{}),PreviewLink:(0,P.jsx)(Do.ExternalLink,{href:g,children:(0,gs.__)("preview")})})}),(0,P.jsx)("p",{children:(0,gs.__)("If you take over, the other user will lose editing control to the post, but their changes will be saved.")})]}),(0,P.jsxs)(Do.__experimentalHStack,{className:"editor-post-locked-modal__buttons",justify:"flex-end",children:[!n&&(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,variant:"tertiary",href:b,children:(0,gs.__)("Take over")}),(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,variant:"primary",href:y,children:x})]})]})]})})}const ed=function({children:e}){const{hasPublishAction:t,isPublished:s}=(0,c.useSelect)((e=>{var t;const{isCurrentPostPublished:s,getCurrentPost:o}=e(qi);return{hasPublishAction:null!==(t=o()._links?.["wp:action-publish"])&&void 0!==t&&t,isPublished:s()}}),[]);return s||!t?null:e};const td=function(){const e=(0,c.useSelect)((e=>e(qi).getEditedPostAttribute("status")),[]),{editPost:t}=(0,c.useDispatch)(qi);return(0,P.jsx)(ed,{children:(0,P.jsx)(Do.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,gs.__)("Pending review"),checked:"pending"===e,onChange:()=>{t({status:"pending"===e?"draft":"pending"})}})})};function sd({className:e,textContent:t,forceIsAutosaveable:s,role:o,onPreview:n}){const{postId:i,currentPostLink:r,previewLink:a,isSaveable:l,isViewable:p}=(0,c.useSelect)((e=>{var t;const s=e(qi),o=e(d.store).getPostType(s.getCurrentPostType("type"));return{postId:s.getCurrentPostId(),currentPostLink:s.getCurrentPostAttribute("link"),previewLink:s.getEditedPostPreviewLink(),isSaveable:s.isEditedPostSaveable(),isViewable:null!==(t=o?.viewable)&&void 0!==t&&t}}),[]),{__unstableSaveForPreview:m}=(0,c.useDispatch)(qi);if(!p)return null;const g=`wp-preview-${i}`,_=a||r;return(0,P.jsx)(Do.Button,{variant:e?void 0:"tertiary",className:e||"editor-post-preview",href:_,target:g,accessibleWhenDisabled:!0,disabled:!l,onClick:async e=>{e.preventDefault();const t=window.open("",g);t.focus(),function(e){let t=(0,u.renderToString)((0,P.jsxs)("div",{className:"editor-post-preview-button__interstitial-message",children:[(0,P.jsxs)(Do.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 96 96",children:[(0,P.jsx)(Do.Path,{className:"outer",d:"M48 12c19.9 0 36 16.1 36 36S67.9 84 48 84 12 67.9 12 48s16.1-36 36-36",fill:"none"}),(0,P.jsx)(Do.Path,{className:"inner",d:"M69.5 46.4c0-3.9-1.4-6.7-2.6-8.8-1.6-2.6-3.1-4.9-3.1-7.5 0-2.9 2.2-5.7 5.4-5.7h.4C63.9 19.2 56.4 16 48 16c-11.2 0-21 5.7-26.7 14.4h2.1c3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3L40 67.5l7-20.9L42 33c-1.7-.1-3.3-.3-3.3-.3-1.7-.1-1.5-2.7.2-2.6 0 0 5.3.4 8.4.4 3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3l11.5 34.3 3.3-10.4c1.6-4.5 2.4-7.8 2.4-10.5zM16.1 48c0 12.6 7.3 23.5 18 28.7L18.8 35c-1.7 4-2.7 8.4-2.7 13zm32.5 2.8L39 78.6c2.9.8 5.9 1.3 9 1.3 3.7 0 7.3-.6 10.6-1.8-.1-.1-.2-.3-.2-.4l-9.8-26.9zM76.2 36c0 3.2-.6 6.9-2.4 11.4L64 75.6c9.5-5.5 15.9-15.8 15.9-27.6 0-5.5-1.4-10.8-3.9-15.3.1 1 .2 2.1.2 3.3z",fill:"none"})]}),(0,P.jsx)("p",{children:(0,gs.__)("Generating preview…")})]}));t+='\n\t\t<style>\n\t\t\tbody {\n\t\t\t\tmargin: 0;\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message {\n\t\t\t\tdisplay: flex;\n\t\t\t\tflex-direction: column;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: center;\n\t\t\t\theight: 100vh;\n\t\t\t\twidth: 100vw;\n\t\t\t}\n\t\t\t@-webkit-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@-moz-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@-o-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message svg {\n\t\t\t\twidth: 192px;\n\t\t\t\theight: 192px;\n\t\t\t\tstroke: #555d66;\n\t\t\t\tstroke-width: 0.75;\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message svg .outer,\n\t\t\t.editor-post-preview-button__interstitial-message svg .inner {\n\t\t\t\tstroke-dasharray: 280;\n\t\t\t\tstroke-dashoffset: 280;\n\t\t\t\t-webkit-animation: paint 1.5s ease infinite alternate;\n\t\t\t\t-moz-animation: paint 1.5s ease infinite alternate;\n\t\t\t\t-o-animation: paint 1.5s ease infinite alternate;\n\t\t\t\tanimation: paint 1.5s ease infinite alternate;\n\t\t\t}\n\t\t\tp {\n\t\t\t\ttext-align: center;\n\t\t\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;\n\t\t\t}\n\t\t</style>\n\t',t=(0,h.applyFilters)("editor.PostPreview.interstitialMarkup",t),e.write(t),e.title=(0,gs.__)("Generating preview…"),e.close()}(t.document);const o=await m({forceIsAutosaveable:s});t.location=o,n?.()},role:o,size:"compact",children:t||(0,P.jsxs)(P.Fragment,{children:[(0,gs._x)("Preview","imperative verb"),(0,P.jsx)(Do.VisuallyHidden,{as:"span",children:(0,gs.__)("(opens in a new tab)")})]})})}function od(){const e=(0,p.useViewportMatch)("medium","<"),{isPublished:t,isBeingScheduled:s,isSaving:o,isPublishing:n,hasPublishAction:i,isAutosaving:r,hasNonPostEntityChanges:a,postStatusHasChanged:l,postStatus:d}=(0,c.useSelect)((e=>{var t;const{isCurrentPostPublished:s,isEditedPostBeingScheduled:o,isSavingPost:n,isPublishingPost:i,getCurrentPost:r,getCurrentPostType:a,isAutosavingPost:l,getPostEdits:c,getEditedPostAttribute:d}=e(qi);return{isPublished:s(),isBeingScheduled:o(),isSaving:n(),isPublishing:i(),hasPublishAction:null!==(t=r()._links?.["wp:action-publish"])&&void 0!==t&&t,postType:a(),isAutosaving:l(),hasNonPostEntityChanges:e(qi).hasNonPostEntityChanges(),postStatusHasChanged:!!c()?.status,postStatus:d("status")}}),[]);return n?(0,gs.__)("Publishing…"):(t||s)&&o&&!r?(0,gs.__)("Saving…"):i?a||t||l&&!["future","publish"].includes(d)||!l&&"future"===d?(0,gs.__)("Save"):s?(0,gs.__)("Schedule"):(0,gs.__)("Publish"):e?(0,gs.__)("Publish"):(0,gs.__)("Submit for Review")}const nd=()=>{};class id extends u.Component{constructor(e){super(e),this.createOnClick=this.createOnClick.bind(this),this.closeEntitiesSavedStates=this.closeEntitiesSavedStates.bind(this),this.state={entitiesSavedStatesCallback:!1}}createOnClick(e){return(...t)=>{const{hasNonPostEntityChanges:s,setEntitiesSavedStatesCallback:o}=this.props;return s&&o?(this.setState({entitiesSavedStatesCallback:()=>e(...t)}),o((()=>this.closeEntitiesSavedStates)),nd):e(...t)}}closeEntitiesSavedStates(e){const{postType:t,postId:s}=this.props,{entitiesSavedStatesCallback:o}=this.state;this.setState({entitiesSavedStatesCallback:!1},(()=>{e&&e.some((e=>"postType"===e.kind&&e.name===t&&e.key===s))&&o()}))}render(){const{forceIsDirty:e,hasPublishAction:t,isBeingScheduled:s,isOpen:o,isPostSavingLocked:n,isPublishable:i,isPublished:r,isSaveable:a,isSaving:l,isAutoSaving:c,isToggle:d,savePostStatus:u,onSubmit:p=nd,onToggle:h,visibility:m,hasNonPostEntityChanges:g,isSavingNonPostEntityChanges:_,postStatus:f,postStatusHasChanged:b}=this.props,y=(l||!a||n||!i&&!e)&&(!g||_),x=(r||l||!a||!i&&!e)&&(!g||_);let v="publish";b?v=f:t?"private"===m?v="private":s&&(v="future"):v="pending";const w={"aria-disabled":y,className:"editor-post-publish-button",isBusy:!c&&l,variant:"primary",onClick:this.createOnClick((()=>{y||(p(),u(v))}))},S={"aria-disabled":x,"aria-expanded":o,className:"editor-post-publish-panel__toggle",isBusy:l&&r,variant:"primary",size:"compact",onClick:this.createOnClick((()=>{x||h()}))},k=d?S:w;return(0,P.jsx)(P.Fragment,{children:(0,P.jsx)(Do.Button,{...k,className:`${k.className} editor-post-publish-button__button`,size:"compact",children:(0,P.jsx)(od,{})})})}}const rd=(0,p.compose)([(0,c.withSelect)((e=>{var t;const{isSavingPost:s,isAutosavingPost:o,isEditedPostBeingScheduled:n,getEditedPostVisibility:i,isCurrentPostPublished:r,isEditedPostSaveable:a,isEditedPostPublishable:l,isPostSavingLocked:c,getCurrentPost:d,getCurrentPostType:u,getCurrentPostId:p,hasNonPostEntityChanges:h,isSavingNonPostEntityChanges:m,getEditedPostAttribute:g,getPostEdits:_}=e(qi);return{isSaving:s(),isAutoSaving:o(),isBeingScheduled:n(),visibility:i(),isSaveable:a(),isPostSavingLocked:c(),isPublishable:l(),isPublished:r(),hasPublishAction:null!==(t=d()._links?.["wp:action-publish"])&&void 0!==t&&t,postType:u(),postId:p(),postStatus:g("status"),postStatusHasChanged:_()?.status,hasNonPostEntityChanges:h(),isSavingNonPostEntityChanges:m()}})),(0,c.withDispatch)((e=>{const{editPost:t,savePost:s}=e(qi);return{savePostStatus:e=>{t({status:e},{undoIgnore:!0}),s()}}}))])(id),ad=(0,P.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24",children:(0,P.jsx)(k.Path,{d:"M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z"})}),ld={public:{label:(0,gs.__)("Public"),info:(0,gs.__)("Visible to everyone.")},private:{label:(0,gs.__)("Private"),info:(0,gs.__)("Only visible to site admins and editors.")},password:{label:(0,gs.__)("Password protected"),info:(0,gs.__)("Only those with the password can view this post.")}};function cd({onClose:e}){const t=(0,p.useInstanceId)(cd),{status:s,visibility:o,password:n}=(0,c.useSelect)((e=>({status:e(qi).getEditedPostAttribute("status"),visibility:e(qi).getEditedPostVisibility(),password:e(qi).getEditedPostAttribute("password")}))),{editPost:i,savePost:r}=(0,c.useDispatch)(qi),[a,l]=(0,u.useState)(!!n),[d,h]=(0,u.useState)(!1);return(0,P.jsxs)("div",{className:"editor-post-visibility",children:[(0,P.jsx)(m.__experimentalInspectorPopoverHeader,{title:(0,gs.__)("Visibility"),help:(0,gs.__)("Control how this post is viewed."),onClose:e}),(0,P.jsxs)("fieldset",{className:"editor-post-visibility__fieldset",children:[(0,P.jsx)(Do.VisuallyHidden,{as:"legend",children:(0,gs.__)("Visibility")}),(0,P.jsx)(dd,{instanceId:t,value:"public",label:ld.public.label,info:ld.public.info,checked:"public"===o&&!a,onChange:()=>{i({status:"private"===o?"draft":s,password:""}),l(!1)}}),(0,P.jsx)(dd,{instanceId:t,value:"private",label:ld.private.label,info:ld.private.info,checked:"private"===o,onChange:()=>{h(!0)}}),(0,P.jsx)(dd,{instanceId:t,value:"password",label:ld.password.label,info:ld.password.info,checked:a,onChange:()=>{i({status:"private"===o?"draft":s,password:n||""}),l(!0)}}),a&&(0,P.jsxs)("div",{className:"editor-post-visibility__password",children:[(0,P.jsx)(Do.VisuallyHidden,{as:"label",htmlFor:`editor-post-visibility__password-input-${t}`,children:(0,gs.__)("Create password")}),(0,P.jsx)("input",{className:"editor-post-visibility__password-input",id:`editor-post-visibility__password-input-${t}`,type:"text",onChange:e=>{i({password:e.target.value})},value:n,placeholder:(0,gs.__)("Use a secure password")})]})]}),(0,P.jsx)(Do.__experimentalConfirmDialog,{isOpen:d,onConfirm:()=>{i({status:"private",password:""}),l(!1),h(!1),r()},onCancel:()=>{h(!1)},confirmButtonText:(0,gs.__)("Publish"),size:"medium",children:(0,gs.__)("Would you like to privately publish this post now?")})]})}function dd({instanceId:e,value:t,label:s,info:o,...n}){return(0,P.jsxs)("div",{className:"editor-post-visibility__choice",children:[(0,P.jsx)("input",{type:"radio",name:`editor-post-visibility__setting-${e}`,value:t,id:`editor-post-${t}-${e}`,"aria-describedby":`editor-post-${t}-${e}-description`,className:"editor-post-visibility__radio",...n}),(0,P.jsx)("label",{htmlFor:`editor-post-${t}-${e}`,className:"editor-post-visibility__label",children:s}),(0,P.jsx)("p",{id:`editor-post-${t}-${e}-description`,className:"editor-post-visibility__info",children:o})]})}function ud(){return pd()}function pd(){const e=(0,c.useSelect)((e=>e(qi).getEditedPostVisibility()));return ld[e]?.label}function hd(e){const t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):"number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?new Date(e):new Date(NaN)}function md(e){const t=hd(e);return t.setDate(1),t.setHours(0,0,0,0),t}function gd(e){const t=hd(e),s=t.getMonth();return t.setFullYear(t.getFullYear(),s+1,0),t.setHours(23,59,59,999),t}Math.pow(10,8);const _d=6e4,fd=36e5;function bd(e,t){const s=t?.additionalDigits??2,o=function(e){const t={},s=e.split(yd.dateTimeDelimiter);let o;if(s.length>2)return t;/:/.test(s[0])?o=s[0]:(t.date=s[0],o=s[1],yd.timeZoneDelimiter.test(t.date)&&(t.date=e.split(yd.timeZoneDelimiter)[0],o=e.substr(t.date.length,e.length)));if(o){const e=yd.timezone.exec(o);e?(t.time=o.replace(e[1],""),t.timezone=e[1]):t.time=o}return t}(e);let n;if(o.date){const e=function(e,t){const s=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),o=e.match(s);if(!o)return{year:NaN,restDateString:""};const n=o[1]?parseInt(o[1]):null,i=o[2]?parseInt(o[2]):null;return{year:null===i?n:100*i,restDateString:e.slice((o[1]||o[2]).length)}}(o.date,s);n=function(e,t){if(null===t)return new Date(NaN);const s=e.match(xd);if(!s)return new Date(NaN);const o=!!s[4],n=Sd(s[1]),i=Sd(s[2])-1,r=Sd(s[3]),a=Sd(s[4]),l=Sd(s[5])-1;if(o)return function(e,t,s){return t>=1&&t<=53&&s>=0&&s<=6}(0,a,l)?function(e,t,s){const o=new Date(0);o.setUTCFullYear(e,0,4);const n=o.getUTCDay()||7,i=7*(t-1)+s+1-n;return o.setUTCDate(o.getUTCDate()+i),o}(t,a,l):new Date(NaN);{const e=new Date(0);return function(e,t,s){return t>=0&&t<=11&&s>=1&&s<=(Pd[t]||(Cd(e)?29:28))}(t,i,r)&&function(e,t){return t>=1&&t<=(Cd(e)?366:365)}(t,n)?(e.setUTCFullYear(t,i,Math.max(n,r)),e):new Date(NaN)}}(e.restDateString,e.year)}if(!n||isNaN(n.getTime()))return new Date(NaN);const i=n.getTime();let r,a=0;if(o.time&&(a=function(e){const t=e.match(vd);if(!t)return NaN;const s=kd(t[1]),o=kd(t[2]),n=kd(t[3]);if(!function(e,t,s){if(24===e)return 0===t&&0===s;return s>=0&&s<60&&t>=0&&t<60&&e>=0&&e<25}(s,o,n))return NaN;return s*fd+o*_d+1e3*n}(o.time),isNaN(a)))return new Date(NaN);if(!o.timezone){const e=new Date(i+a),t=new Date(0);return t.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),t.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),t}return r=function(e){if("Z"===e)return 0;const t=e.match(wd);if(!t)return 0;const s="+"===t[1]?-1:1,o=parseInt(t[2]),n=t[3]&&parseInt(t[3])||0;if(!function(e,t){return t>=0&&t<=59}(0,n))return NaN;return s*(o*fd+n*_d)}(o.timezone),isNaN(r)?new Date(NaN):new Date(i+a+r)}const yd={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},xd=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,vd=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,wd=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Sd(e){return e?parseInt(e):1}function kd(e){return e&&parseFloat(e.replace(",","."))||0}const Pd=[31,null,31,30,31,30,31,31,30,31,30,31];function Cd(e){return e%400==0||e%4==0&&e%100!=0}const{PrivatePublishDateTimePicker:jd}=sn(m.privateApis);function Ed(e){return(0,P.jsx)(Td,{...e,showPopoverHeaderActions:!0,isCompact:!1})}function Td({onClose:e,showPopoverHeaderActions:t,isCompact:s}){const{postDate:o,postType:n}=(0,c.useSelect)((e=>({postDate:e(qi).getEditedPostAttribute("date"),postType:e(qi).getCurrentPostType()})),[]),{editPost:i}=(0,c.useDispatch)(qi),[r,a]=(0,u.useState)(md(new Date(o))),l=(0,c.useSelect)((e=>e(d.store).getEntityRecords("postType",n,{status:"publish,future",after:md(r).toISOString(),before:gd(r).toISOString(),exclude:[e(qi).getCurrentPostId()],per_page:100,_fields:"id,date"})),[r,n]),p=(0,u.useMemo)((()=>(l||[]).map((({date:e})=>({date:new Date(e)})))),[l]),h=(0,x.getSettings)(),m=/a(?!\\)/i.test(h.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,P.jsx)(jd,{currentDate:o,onChange:e=>i({date:e}),is12Hour:m,dateOrder:(0,gs._x)("dmy","date order"),events:p,onMonthPreviewed:e=>a(bd(e)),onClose:e,isCompact:s,showPopoverHeaderActions:t})}function Bd(e){return Id(e)}function Id({full:e=!1}={}){const{date:t,isFloating:s}=(0,c.useSelect)((e=>({date:e(qi).getEditedPostAttribute("date"),isFloating:e(qi).isEditedPostDateFloating()})),[]);return e?Nd(t):function(e,{isFloating:t=!1,now:s=new Date}={}){if(!e||t)return(0,gs.__)("Immediately");if(!function(e){const{timezone:t}=(0,x.getSettings)(),s=Number(t.offset),o=e.getTimezoneOffset()/60*-1;return s===o}(s))return Nd(e);const o=(0,x.getDate)(e);if(Ad(o,s))return(0,gs.sprintf)((0,gs.__)("Today at %s"),(0,x.dateI18n)((0,gs._x)("g:i a","post schedule time format"),o));const n=new Date(s);if(n.setDate(n.getDate()+1),Ad(o,n))return(0,gs.sprintf)((0,gs.__)("Tomorrow at %s"),(0,x.dateI18n)((0,gs._x)("g:i a","post schedule time format"),o));if(o.getFullYear()===s.getFullYear())return(0,x.dateI18n)((0,gs._x)("F j g:i a","post schedule date format without year"),o);return(0,x.dateI18n)((0,gs._x)("F j, Y g:i a","post schedule full date format"),o)}(t,{isFloating:s})}function Nd(e){const t=(0,x.getDate)(e),s=function(){const{timezone:e}=(0,x.getSettings)();if(e.abbr&&isNaN(Number(e.abbr)))return e.abbr;const t=e.offset<0?"":"+";return`UTC${t}${e.offsetFormatted}`}(),o=(0,x.dateI18n)((0,gs._x)("F j, Y g:i a","post schedule full date format"),t);return(0,gs.isRTL)()?`${s} ${o}`:`${o} ${s}`}function Ad(e,t){return e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}const Dd=3,Rd={per_page:10,orderby:"count",order:"desc",hide_empty:!0,_fields:"id,name,count",context:"view"};function Md({onSelect:e,taxonomy:t}){const{_terms:s,showTerms:o}=(0,c.useSelect)((e=>{const s=e(d.store).getEntityRecords("taxonomy",t.slug,Rd);return{_terms:s,showTerms:s?.length>=Dd}}),[t.slug]);if(!o)return null;const n=il(s);return(0,P.jsxs)("div",{className:"editor-post-taxonomies__flat-term-most-used",children:[(0,P.jsx)(Do.BaseControl.VisualLabel,{as:"h3",className:"editor-post-taxonomies__flat-term-most-used-label",children:t.labels.most_used}),(0,P.jsx)("ul",{role:"list",className:"editor-post-taxonomies__flat-term-most-used-list",children:n.map((t=>(0,P.jsx)("li",{children:(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>e(t),children:t.name})},t.id)))})]})}const Od=[],Ld=100,Fd={per_page:Ld,_fields:"id,name",context:"view"},Vd=(e,t)=>ol(e).toLowerCase()===ol(t).toLowerCase(),zd=(e,t)=>e.map((e=>t.find((t=>Vd(t.name,e)))?.id)).filter((e=>void 0!==e)),Ud=({children:e,__nextHasNoMarginBottom:t})=>t?(0,P.jsx)(Do.__experimentalVStack,{spacing:4,children:e}):(0,P.jsx)(u.Fragment,{children:e});function Hd({slug:e,__nextHasNoMarginBottom:t}){var s,o;const[n,i]=(0,u.useState)([]),[r,a]=(0,u.useState)(""),l=(0,p.useDebounce)(a,500);t||S()("Bottom margin styles for wp.editor.PostTaxonomiesFlatTermSelector",{since:"6.7",version:"7.0",hint:"Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version."});const{terms:h,termIds:m,taxonomy:g,hasAssignAction:_,hasCreateAction:f,hasResolvedTerms:b}=(0,c.useSelect)((t=>{var s,o;const{getCurrentPost:n,getEditedPostAttribute:i}=t(qi),{getEntityRecords:r,getTaxonomy:a,hasFinishedResolution:l}=t(d.store),c=n(),u=a(e),p=u?i(u.rest_base):Od,h={...Fd,include:p?.join(","),per_page:-1};return{hasCreateAction:!!u&&(null!==(s=c._links?.["wp:action-create-"+u.rest_base])&&void 0!==s&&s),hasAssignAction:!!u&&(null!==(o=c._links?.["wp:action-assign-"+u.rest_base])&&void 0!==o&&o),taxonomy:u,termIds:p,terms:p?.length?r("taxonomy",e,h):Od,hasResolvedTerms:l("getEntityRecords",["taxonomy",e,h])}}),[e]),{searchResults:y}=(0,c.useSelect)((t=>{const{getEntityRecords:s}=t(d.store);return{searchResults:r?s("taxonomy",e,{...Fd,search:r}):Od}}),[r,e]);(0,u.useEffect)((()=>{if(b){const e=(null!=h?h:[]).map((e=>ol(e.name)));i(e)}}),[h,b]);const x=(0,u.useMemo)((()=>(null!=y?y:[]).map((e=>ol(e.name)))),[y]),{editPost:v}=(0,c.useDispatch)(qi),{saveEntityRecord:w}=(0,c.useDispatch)(d.store),{createErrorNotice:k}=(0,c.useDispatch)(ms.store);if(!_)return null;function C(e){v({[g.rest_base]:e})}const j=null!==(s=g?.labels?.add_new_item)&&void 0!==s?s:"post_tag"===e?(0,gs.__)("Add new tag"):(0,gs.__)("Add new Term"),E=null!==(o=g?.labels?.singular_name)&&void 0!==o?o:"post_tag"===e?(0,gs.__)("Tag"):(0,gs.__)("Term"),T=(0,gs.sprintf)((0,gs._x)("%s added","term"),E),B=(0,gs.sprintf)((0,gs._x)("%s removed","term"),E),I=(0,gs.sprintf)((0,gs._x)("Remove %s","term"),E);return(0,P.jsxs)(Ud,{__nextHasNoMarginBottom:t,children:[(0,P.jsx)(Do.FormTokenField,{__next40pxDefaultSize:!0,value:n,suggestions:x,onChange:function(t){const s=[...null!=h?h:[],...null!=y?y:[]],o=t.reduce(((e,t)=>(e.some((e=>e.toLowerCase()===t.toLowerCase()))||e.push(t),e)),[]),n=o.filter((e=>!s.find((t=>Vd(t.name,e)))));i(o),0!==n.length?f&&Promise.all(n.map((t=>async function(t){try{const s=await w("taxonomy",e,t,{throwOnError:!0});return nl(s)}catch(e){if("term_exists"!==e.code)throw e;return{id:e.data.term_id,name:t.name}}}({name:t})))).then((e=>{const t=s.concat(e);C(zd(o,t))})).catch((e=>{k(e.message,{type:"snackbar"}),C(zd(o,s))})):C(zd(o,s))},onInputChange:l,maxSuggestions:Ld,label:j,messages:{added:T,removed:B,remove:I},__nextHasNoMarginBottom:t}),(0,P.jsx)(Md,{taxonomy:g,onSelect:function(t){var s;if(m.includes(t.id))return;const o=[...m,t.id],n="post_tag"===e?(0,gs.__)("Tag"):(0,gs.__)("Term"),i=(0,gs.sprintf)((0,gs._x)("%s added","term"),null!==(s=g?.labels?.singular_name)&&void 0!==s?s:n);(0,us.speak)(i,"assertive"),C(o)}})]})}const Gd=(0,Do.withFilters)("editor.PostTaxonomyType")(Hd),$d=()=>{const e=[(0,gs.__)("Suggestion:"),(0,P.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,gs.__)("Add tags")},"label")];return(0,P.jsxs)(Do.PanelBody,{initialOpen:!1,title:e,children:[(0,P.jsx)("p",{children:(0,gs.__)("Tags help users and search engines navigate your site and find your content. Add a few keywords to describe your post.")}),(0,P.jsx)(Gd,{slug:"post_tag",__nextHasNoMarginBottom:!0})]})},Wd=()=>{const{hasTags:e,isPostTypeSupported:t}=(0,c.useSelect)((e=>{const t=e(qi).getCurrentPostType(),s=e(d.store).getTaxonomy("post_tag"),o=s?.types?.includes(t),n=void 0!==s,i=s&&e(qi).getEditedPostAttribute(s.rest_base);return{hasTags:!!i?.length,isPostTypeSupported:n&&o}}),[]),[s]=(0,u.useState)(e);return t?s?null:(0,P.jsx)($d,{}):null},Zd=(e,t)=>Wc.filter((t=>e?.includes(t.id))).find((e=>e.id===t)),Yd=({suggestedPostFormat:e,suggestionText:t,onUpdatePostFormat:s})=>(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>s(e),children:t});function Kd(){const{currentPostFormat:e,suggestion:t}=(0,c.useSelect)((e=>{var t;const{getEditedPostAttribute:s,getSuggestedPostFormat:o}=e(qi),n=null!==(t=e(d.store).getThemeSupports().formats)&&void 0!==t?t:[];return{currentPostFormat:s("format"),suggestion:Zd(n,o())}}),[]),{editPost:s}=(0,c.useDispatch)(qi),o=[(0,gs.__)("Suggestion:"),(0,P.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,gs.__)("Use a post format")},"label")];return t&&t.id!==e?(0,P.jsxs)(Do.PanelBody,{initialOpen:!1,title:o,children:[(0,P.jsx)("p",{children:(0,gs.__)("Your theme uses post formats to highlight different kinds of content, like images or videos. Apply a post format to see this special styling.")}),(0,P.jsx)("p",{children:(0,P.jsx)(Yd,{onUpdatePostFormat:e=>s({format:e}),suggestedPostFormat:t.id,suggestionText:(0,gs.sprintf)((0,gs.__)('Apply the "%1$s" format.'),t.caption)})})]}):null}const qd={per_page:-1,orderby:"name",order:"asc",_fields:"id,name,parent",context:"view"},Qd=8,Xd=[];function Jd({slug:e}){var t,s;const[o,n]=(0,u.useState)(!1),[i,r]=(0,u.useState)(""),[a,l]=(0,u.useState)(""),[h,m]=(0,u.useState)(!1),[g,_]=(0,u.useState)(""),[f,b]=(0,u.useState)([]),y=(0,p.useDebounce)(us.speak,500),{hasCreateAction:x,hasAssignAction:v,terms:w,loading:S,availableTerms:k,taxonomy:C}=(0,c.useSelect)((t=>{var s,o;const{getCurrentPost:n,getEditedPostAttribute:i}=t(qi),{getTaxonomy:r,getEntityRecords:a,isResolving:l}=t(d.store),c=r(e),u=n();return{hasCreateAction:!!c&&(null!==(s=u._links?.["wp:action-create-"+c.rest_base])&&void 0!==s&&s),hasAssignAction:!!c&&(null!==(o=u._links?.["wp:action-assign-"+c.rest_base])&&void 0!==o&&o),terms:c?i(c.rest_base):Xd,loading:l("getEntityRecords",["taxonomy",e,qd]),availableTerms:a("taxonomy",e,qd)||Xd,taxonomy:c}}),[e]),{editPost:j}=(0,c.useDispatch)(qi),{saveEntityRecord:E}=(0,c.useDispatch)(d.store),T=(0,u.useMemo)((()=>function(e,t){const s=e=>-1!==t.indexOf(e.id)||void 0!==e.children&&e.children.map(s).filter((e=>e)).length>0,o=[...e];return o.sort(((e,t)=>{const o=s(e),n=s(t);return o===n?0:o&&!n?-1:!o&&n?1:0})),o}(sl(k),w)),[k]),{createErrorNotice:B}=(0,c.useDispatch)(ms.store);if(!v)return null;const I=e=>{j({[C.rest_base]:e})},N=e=>e.map((e=>(0,P.jsxs)("div",{className:"editor-post-taxonomies__hierarchical-terms-choice",children:[(0,P.jsx)(Do.CheckboxControl,{__nextHasNoMarginBottom:!0,checked:-1!==w.indexOf(e.id),onChange:()=>{(e=>{const t=w.includes(e)?w.filter((t=>t!==e)):[...w,e];I(t)})(parseInt(e.id,10))},label:(0,Ao.decodeEntities)(e.name)}),!!e.children.length&&(0,P.jsx)("div",{className:"editor-post-taxonomies__hierarchical-terms-subchoices",children:N(e.children)})]},e.id))),A=(t,s,o)=>{var n;return null!==(n=C?.labels?.[t])&&void 0!==n?n:"category"===e?s:o},D=A("add_new_item",(0,gs.__)("Add new category"),(0,gs.__)("Add new term")),R=A("new_item_name",(0,gs.__)("Add new category"),(0,gs.__)("Add new term")),M=A("parent_item",(0,gs.__)("Parent Category"),(0,gs.__)("Parent Term")),O=`— ${M} —`,L=D,F=null!==(t=C?.labels?.search_items)&&void 0!==t?t:(0,gs.__)("Search Terms"),V=null!==(s=C?.name)&&void 0!==s?s:(0,gs.__)("Terms"),z=k.length>=Qd;return(0,P.jsxs)(Do.Flex,{direction:"column",gap:"4",children:[z&&(0,P.jsx)(Do.SearchControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:F,value:g,onChange:e=>{const t=T.map(function(e){const t=s=>{if(""===e)return s;const o={...s};return o.children.length>0&&(o.children=o.children.map(t).filter((e=>e))),(-1!==o.name.toLowerCase().indexOf(e.toLowerCase())||o.children.length>0)&&o};return t}(e)).filter((e=>e)),s=e=>{let t=0;for(let o=0;o<e.length;o++)t++,void 0!==e[o].children&&(t+=s(e[o].children));return t};_(e),b(t);const o=s(t),n=(0,gs.sprintf)((0,gs._n)("%d result found.","%d results found.",o),o);y(n,"assertive")}}),(0,P.jsx)("div",{className:"editor-post-taxonomies__hierarchical-terms-list",tabIndex:"0",role:"group","aria-label":V,children:N(""!==g?f:T)}),!S&&x&&(0,P.jsx)(Do.FlexItem,{children:(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,onClick:()=>{m(!h)},className:"editor-post-taxonomies__hierarchical-terms-add","aria-expanded":h,variant:"link",children:D})}),h&&(0,P.jsx)("form",{onSubmit:async t=>{var s;if(t.preventDefault(),""===i||o)return;const c=function(e,t,s){return e.find((e=>(!e.parent&&!t||parseInt(e.parent)===parseInt(t))&&e.name.toLowerCase()===s.toLowerCase()))}(k,a,i);if(c)return w.some((e=>e===c.id))||I([...w,c.id]),r(""),void l("");let d;n(!0);try{d=await(u={name:i,parent:a||void 0},E("taxonomy",e,u,{throwOnError:!0}))}catch(e){return void B(e.message,{type:"snackbar"})}var u;const p="category"===e?(0,gs.__)("Category"):(0,gs.__)("Term"),h=(0,gs.sprintf)((0,gs._x)("%s added","term"),null!==(s=C?.labels?.singular_name)&&void 0!==s?s:p);(0,us.speak)(h,"assertive"),n(!1),r(""),l(""),I([...w,d.id])},children:(0,P.jsxs)(Do.Flex,{direction:"column",gap:"4",children:[(0,P.jsx)(Do.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,className:"editor-post-taxonomies__hierarchical-terms-input",label:R,value:i,onChange:e=>{r(e)},required:!0}),!!k.length&&(0,P.jsx)(Do.TreeSelect,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:M,noOptionLabel:O,onChange:e=>{l(e)},selectedId:a,tree:T}),(0,P.jsx)(Do.FlexItem,{children:(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,variant:"secondary",type:"submit",className:"editor-post-taxonomies__hierarchical-terms-submit",children:L})})]})})]})}const eu=(0,Do.withFilters)("editor.PostTaxonomyType")(Jd);const tu=function(){const e=(0,c.useSelect)((e=>{const t=e(qi).getCurrentPostType(),{canUser:s,getEntityRecord:o,getTaxonomy:n}=e(d.store),i=n("category"),r=s("read",{kind:"root",name:"site"})?o("root","site")?.default_category:void 0,a=r?o("taxonomy","category",r):void 0,l=i&&i.types.some((e=>e===t)),c=i&&e(qi).getEditedPostAttribute(i.rest_base);return!!i&&!!a&&l&&(0===c?.length||1===c?.length&&a?.id===c[0])}),[]),[t,s]=(0,u.useState)(!1);if((0,u.useEffect)((()=>{e&&s(!0)}),[e]),!t)return null;const o=[(0,gs.__)("Suggestion:"),(0,P.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,gs.__)("Assign a category")},"label")];return(0,P.jsxs)(Do.PanelBody,{initialOpen:!1,title:o,children:[(0,P.jsx)("p",{children:(0,gs.__)("Categories provide a helpful way to group related posts together and to quickly tell readers what a post is about.")}),(0,P.jsx)(eu,{slug:"category"})]})},su={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let ou;const nu=new Uint8Array(16);function iu(){if(!ou&&(ou="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ou))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ou(nu)}const ru=[];for(let e=0;e<256;++e)ru.push((e+256).toString(16).slice(1));function au(e,t=0){return ru[e[t+0]]+ru[e[t+1]]+ru[e[t+2]]+ru[e[t+3]]+"-"+ru[e[t+4]]+ru[e[t+5]]+"-"+ru[e[t+6]]+ru[e[t+7]]+"-"+ru[e[t+8]]+ru[e[t+9]]+"-"+ru[e[t+10]]+ru[e[t+11]]+ru[e[t+12]]+ru[e[t+13]]+ru[e[t+14]]+ru[e[t+15]]}const lu=function(e,t,s){if(su.randomUUID&&!t&&!e)return su.randomUUID();const o=(e=e||{}).random||(e.rng||iu)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){s=s||0;for(let e=0;e<16;++e)t[s+e]=o[e];return t}return au(o)};function cu(e){return Object.fromEntries(Object.entries(function(e){const t=new Set;return Object.fromEntries(e.map((e=>{const s=(0,v.getFilename)(e);let o="";if(s){const e=s.split(".");e.length>1&&e.pop(),o=e.join(".")}return o||(o=lu()),t.has(o)&&(o=`${o}-${lu()}`),t.add(o),[e,o]})))}(e)).map((([e,t])=>{const s=window.fetch(e.includes("?")?e:e+"?").then((e=>e.blob())).then((e=>new File([e],`${t}.png`,{type:e.type})));return[e,s]})))}function du(e){const t=[];return e.forEach((e=>{t.push(e),t.push(...du(e.innerBlocks))})),t}function uu(e){if("core/image"===e.name||"core/cover"===e.name){const{url:t,alt:s,id:o}=e.attributes;return{url:t,alt:s,id:o}}if("core/media-text"===e.name){const{mediaUrl:t,mediaAlt:s,mediaId:o}=e.attributes;return{url:t,alt:s,id:o}}return{}}function pu({clientId:e,alt:t,url:s}){const{selectBlock:o}=(0,c.useDispatch)(m.store);return(0,P.jsx)(Do.__unstableMotion.img,{tabIndex:0,role:"button","aria-label":(0,gs.__)("Select image block."),onClick:()=>{o(e)},onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||(o(e),t.preventDefault())},alt:t,src:s,animate:{opacity:1},exit:{opacity:0,scale:0},style:{width:"32px",height:"32px",objectFit:"cover",borderRadius:"2px",cursor:"pointer"},whileHover:{scale:1.08}},e)}function hu(){const[e,t]=(0,u.useState)(!1),[s,o]=(0,u.useState)(!1),[n,i]=(0,u.useState)(!1),{editorBlocks:r,mediaUpload:a}=(0,c.useSelect)((e=>({editorBlocks:e(m.store).getBlocks(),mediaUpload:e(m.store).getSettings().mediaUpload})),[]),l=du(r).filter((e=>function(e){return"core/image"===e.name||"core/cover"===e.name?e.attributes.url&&!e.attributes.id:"core/media-text"===e.name?e.attributes.mediaUrl&&!e.attributes.mediaId:void 0}(e))),{updateBlockAttributes:d}=(0,c.useDispatch)(m.store);if(!a||!l.length)return null;const p=[(0,gs.__)("Suggestion:"),(0,P.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,gs.__)("External media")},"label")];return(0,P.jsxs)(Do.PanelBody,{initialOpen:!0,title:p,children:[(0,P.jsx)("p",{children:(0,gs.__)("Upload external images to the Media Library. Images from different domains may load slowly, display incorrectly, or be removed unexpectedly.")}),(0,P.jsxs)("div",{style:{display:"inline-flex",flexWrap:"wrap",gap:"8px"},children:[(0,P.jsx)(Do.__unstableAnimatePresence,{onExitComplete:()=>o(!1),children:l.map((e=>{const{url:t,alt:s}=uu(e);return(0,P.jsx)(pu,{clientId:e.clientId,url:t,alt:s},e.clientId)}))}),e||s?(0,P.jsx)(Do.Spinner,{}):(0,P.jsx)(Do.Button,{size:"compact",variant:"primary",onClick:function(){t(!0),i(!1);const e=new Set(l.map((e=>{const{url:t}=uu(e);return t}))),s=Object.fromEntries(Object.entries(cu([...e])).map((([e,t])=>[e,t.then((e=>new Promise(((t,s)=>{a({filesList:[e],onFileChange:([e])=>{(0,ci.isBlobURL)(e.url)||t(e)},onError(){s()}})}))))])));Promise.allSettled(l.map((e=>{const{url:t}=uu(e);return s[t].then((t=>function(e,t){"core/image"!==e.name&&"core/cover"!==e.name||d(e.clientId,{id:t.id,url:t.url}),"core/media-text"===e.name&&d(e.clientId,{mediaId:t.id,mediaUrl:t.url})}(e,t))).then((()=>o(!0))).catch((()=>i(!0)))}))).finally((()=>{t(!1)}))},children:(0,gs.__)("Upload")})]}),n&&(0,P.jsx)("p",{children:(0,gs.__)("Upload failed, try again.")})]})}const mu=function({children:e}){const{isBeingScheduled:t,isRequestingSiteIcon:s,hasPublishAction:o,siteIconUrl:n,siteTitle:i,siteHome:r}=(0,c.useSelect)((e=>{var t;const{getCurrentPost:s,isEditedPostBeingScheduled:o}=e(qi),{getEntityRecord:n,isResolving:i}=e(d.store),r=n("root","__unstableBase",void 0)||{};return{hasPublishAction:null!==(t=s()._links?.["wp:action-publish"])&&void 0!==t&&t,isBeingScheduled:o(),isRequestingSiteIcon:i("getEntityRecord",["root","__unstableBase",void 0]),siteIconUrl:r.site_icon_url,siteTitle:r.name,siteHome:r.home&&(0,v.filterURLForDisplay)(r.home)}}),[]);let a,l,u=(0,P.jsx)(Do.Icon,{className:"components-site-icon",size:"36px",icon:ad});return n&&(u=(0,P.jsx)("img",{alt:(0,gs.__)("Site Icon"),className:"components-site-icon",src:n})),s&&(u=null),o?t?(a=(0,gs.__)("Are you ready to schedule?"),l=(0,gs.__)("Your work will be published at the specified date and time.")):(a=(0,gs.__)("Are you ready to publish?"),l=(0,gs.__)("Double-check your settings before publishing.")):(a=(0,gs.__)("Are you ready to submit for review?"),l=(0,gs.__)("When you’re ready, submit your work for review, and an Editor will be able to approve it for you.")),(0,P.jsxs)("div",{className:"editor-post-publish-panel__prepublish",children:[(0,P.jsx)("div",{children:(0,P.jsx)("strong",{children:a})}),(0,P.jsx)("p",{children:l}),(0,P.jsxs)("div",{className:"components-site-card",children:[u,(0,P.jsxs)("div",{className:"components-site-info",children:[(0,P.jsx)("span",{className:"components-site-name",children:(0,Ao.decodeEntities)(i)||(0,gs.__)("(Untitled)")}),(0,P.jsx)("span",{className:"components-site-home",children:r})]})]}),(0,P.jsx)(hu,{}),o&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(Do.PanelBody,{initialOpen:!1,title:[(0,gs.__)("Visibility:"),(0,P.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,P.jsx)(ud,{})},"label")],children:(0,P.jsx)(cd,{})}),(0,P.jsx)(Do.PanelBody,{initialOpen:!1,title:[(0,gs.__)("Publish:"),(0,P.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,P.jsx)(Bd,{})},"label")],children:(0,P.jsx)(Ed,{})})]}),(0,P.jsx)(Kd,{}),(0,P.jsx)(Wd,{}),(0,P.jsx)(tu,{}),e]})},gu="%postname%",_u="%pagename%";function fu({text:e,onCopy:t,children:s}){const o=(0,p.useCopyToClipboard)(e,t);return(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,variant:"secondary",ref:o,children:s})}class bu extends u.Component{constructor(){super(...arguments),this.state={showCopyConfirmation:!1},this.onCopy=this.onCopy.bind(this),this.onSelectInput=this.onSelectInput.bind(this),this.postLink=(0,u.createRef)()}componentDidMount(){this.props.focusOnMount&&this.postLink.current.focus()}componentWillUnmount(){clearTimeout(this.dismissCopyConfirmation)}onCopy(){this.setState({showCopyConfirmation:!0}),clearTimeout(this.dismissCopyConfirmation),this.dismissCopyConfirmation=setTimeout((()=>{this.setState({showCopyConfirmation:!1})}),4e3)}onSelectInput(e){e.target.select()}render(){const{children:e,isScheduled:t,post:s,postType:o}=this.props,n=o?.labels?.singular_name,i=o?.labels?.view_item,r=o?.labels?.add_new_item,a="future"===s.status?(e=>{const{slug:t}=e;return e.permalink_template.includes(gu)?e.permalink_template.replace(gu,t):e.permalink_template.includes(_u)?e.permalink_template.replace(_u,t):e.permalink_template})(s):s.link,l=(0,v.addQueryArgs)("post-new.php",{post_type:s.type}),c=t?(0,P.jsxs)(P.Fragment,{children:[(0,gs.__)("is now scheduled. It will go live on")," ",(0,P.jsx)(Bd,{}),"."]}):(0,gs.__)("is now live.");return(0,P.jsxs)("div",{className:"post-publish-panel__postpublish",children:[(0,P.jsxs)(Do.PanelBody,{className:"post-publish-panel__postpublish-header",children:[(0,P.jsx)("a",{ref:this.postLink,href:a,children:(0,Ao.decodeEntities)(s.title)||(0,gs.__)("(no title)")})," ",c]}),(0,P.jsxs)(Do.PanelBody,{children:[(0,P.jsx)("p",{className:"post-publish-panel__postpublish-subheader",children:(0,P.jsx)("strong",{children:(0,gs.__)("What’s next?")})}),(0,P.jsxs)("div",{className:"post-publish-panel__postpublish-post-address-container",children:[(0,P.jsx)(Do.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,className:"post-publish-panel__postpublish-post-address",readOnly:!0,label:(0,gs.sprintf)((0,gs.__)("%s address"),n),value:(0,v.safeDecodeURIComponent)(a),onFocus:this.onSelectInput}),(0,P.jsx)("div",{className:"post-publish-panel__postpublish-post-address__copy-button-wrap",children:(0,P.jsx)(fu,{text:a,onCopy:this.onCopy,children:this.state.showCopyConfirmation?(0,gs.__)("Copied!"):(0,gs.__)("Copy")})})]}),(0,P.jsxs)("div",{className:"post-publish-panel__postpublish-buttons",children:[!t&&(0,P.jsx)(Do.Button,{variant:"primary",href:a,__next40pxDefaultSize:!0,children:i}),(0,P.jsx)(Do.Button,{variant:t?"primary":"secondary",__next40pxDefaultSize:!0,href:l,children:r})]})]}),e]})}}const yu=(0,c.withSelect)((e=>{const{getEditedPostAttribute:t,getCurrentPost:s,isCurrentPostScheduled:o}=e(qi),{getPostType:n}=e(d.store);return{post:s(),postType:n(t("type")),isScheduled:o()}}))(bu);class xu extends u.Component{constructor(){super(...arguments),this.onSubmit=this.onSubmit.bind(this),this.cancelButtonNode=(0,u.createRef)()}componentDidMount(){this.timeoutID=setTimeout((()=>{this.cancelButtonNode.current.focus()}),0)}componentWillUnmount(){clearTimeout(this.timeoutID)}componentDidUpdate(e){e.isPublished&&!this.props.isSaving&&this.props.isDirty&&this.props.onClose()}onSubmit(){const{onClose:e,hasPublishAction:t,isPostTypeViewable:s}=this.props;t&&s||e()}render(){const{forceIsDirty:e,isBeingScheduled:t,isPublished:s,isPublishSidebarEnabled:o,isScheduled:n,isSaving:i,isSavingNonPostEntityChanges:r,onClose:a,onTogglePublishSidebar:l,PostPublishExtension:c,PrePublishExtension:d,...u}=this.props,{hasPublishAction:p,isDirty:h,isPostTypeViewable:m,...g}=u,_=s||n&&t,f=!_&&!i,b=_&&!i;return(0,P.jsxs)("div",{className:"editor-post-publish-panel",...g,children:[(0,P.jsx)("div",{className:"editor-post-publish-panel__header",children:b?(0,P.jsx)(Do.Button,{size:"compact",onClick:a,icon:Bn,label:(0,gs.__)("Close panel")}):(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)("div",{className:"editor-post-publish-panel__header-cancel-button",children:(0,P.jsx)(Do.Button,{ref:this.cancelButtonNode,accessibleWhenDisabled:!0,disabled:r,onClick:a,variant:"secondary",size:"compact",children:(0,gs.__)("Cancel")})}),(0,P.jsx)("div",{className:"editor-post-publish-panel__header-publish-button",children:(0,P.jsx)(rd,{onSubmit:this.onSubmit,forceIsDirty:e})})]})}),(0,P.jsxs)("div",{className:"editor-post-publish-panel__content",children:[f&&(0,P.jsx)(mu,{children:d&&(0,P.jsx)(d,{})}),b&&(0,P.jsx)(yu,{focusOnMount:!0,children:c&&(0,P.jsx)(c,{})}),i&&(0,P.jsx)(Do.Spinner,{})]}),(0,P.jsx)("div",{className:"editor-post-publish-panel__footer",children:(0,P.jsx)(Do.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,gs.__)("Always show pre-publish checks."),checked:o,onChange:l})})]})}}const vu=(0,p.compose)([(0,c.withSelect)((e=>{var t;const{getPostType:s}=e(d.store),{getCurrentPost:o,getEditedPostAttribute:n,isCurrentPostPublished:i,isCurrentPostScheduled:r,isEditedPostBeingScheduled:a,isEditedPostDirty:l,isAutosavingPost:c,isSavingPost:u,isSavingNonPostEntityChanges:p}=e(qi),{isPublishSidebarEnabled:h}=e(qi),m=s(n("type"));return{hasPublishAction:null!==(t=o()._links?.["wp:action-publish"])&&void 0!==t&&t,isPostTypeViewable:m?.viewable,isBeingScheduled:a(),isDirty:l(),isPublished:i(),isPublishSidebarEnabled:h(),isSaving:u()&&!c(),isSavingNonPostEntityChanges:p(),isScheduled:r()}})),(0,c.withDispatch)(((e,{isPublishSidebarEnabled:t})=>{const{disablePublishSidebar:s,enablePublishSidebar:o}=e(qi);return{onTogglePublishSidebar:()=>{t?s():o()}}})),Do.withFocusReturn,Do.withConstrainedTabbing])(xu),wu=(0,P.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(k.Path,{d:"M17.3 10.1c0-2.5-2.1-4.4-4.8-4.4-2.2 0-4.1 1.4-4.6 3.3h-.2C5.7 9 4 10.7 4 12.8c0 2.1 1.7 3.8 3.7 3.8h9c1.8 0 3.2-1.5 3.2-3.3.1-1.6-1.1-2.9-2.6-3.2zm-.5 5.1h-4v-2.4L14 14l1-1-3-3-3 3 1 1 1.2-1.2v2.4H7.7c-1.2 0-2.2-1.1-2.2-2.3s1-2.4 2.2-2.4H9l.3-1.1c.4-1.3 1.7-2.2 3.2-2.2 1.8 0 3.3 1.3 3.3 2.9v1.3l1.3.2c.8.1 1.4.9 1.4 1.8 0 1-.8 1.8-1.7 1.8z"})});const Su=(0,u.forwardRef)((function({icon:e,size:t=24,...s},o){return(0,u.cloneElement)(e,{width:t,height:t,...s,ref:o})})),ku=(0,P.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(k.Path,{d:"M17.3 10.1c0-2.5-2.1-4.4-4.8-4.4-2.2 0-4.1 1.4-4.6 3.3h-.2C5.7 9 4 10.7 4 12.8c0 2.1 1.7 3.8 3.7 3.8h9c1.8 0 3.2-1.5 3.2-3.3.1-1.6-1.1-2.9-2.6-3.2zm-.5 5.1h-9c-1.2 0-2.2-1.1-2.2-2.3s1-2.4 2.2-2.4h1.3l.3-1.1c.4-1.3 1.7-2.2 3.2-2.2 1.8 0 3.3 1.3 3.3 2.9v1.3l1.3.2c.8.1 1.4.9 1.4 1.8-.1 1-.9 1.8-1.8 1.8z"})}),Pu=(0,P.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(k.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm8 4a4 4 0 0 0 4-4H8a4 4 0 0 0 4 4Z"})}),Cu=(0,P.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(k.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm8 4a4 4 0 0 1-4-4h4V8a4 4 0 0 1 0 8Z"})}),ju=(0,P.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(k.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5A6.5 6.5 0 0 1 6.93 7.931l9.139 9.138A6.473 6.473 0 0 1 12 18.5Zm5.123-2.498a6.5 6.5 0 0 0-9.124-9.124l9.124 9.124ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Z"})}),Eu=(0,P.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(k.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm9 1V8h-1.5v3.5h-2V13H13Z"})}),Tu=(0,P.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(k.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm11.53-1.47-1.06-1.06L11 12.94l-1.47-1.47-1.06 1.06L11 15.06l4.53-4.53Z"})});function Bu({children:e}){const{hasStickyAction:t,postType:s}=(0,c.useSelect)((e=>{var t;const s=e(qi).getCurrentPost();return{hasStickyAction:null!==(t=s._links?.["wp:action-sticky"])&&void 0!==t&&t,postType:e(qi).getCurrentPostType()}}),[]);return"post"===s&&t?e:null}function Iu(){const e=(0,c.useSelect)((e=>{var t;return null!==(t=e(qi).getEditedPostAttribute("sticky"))&&void 0!==t&&t}),[]),{editPost:t}=(0,c.useDispatch)(qi);return(0,P.jsx)(Bu,{children:(0,P.jsx)(Do.CheckboxControl,{className:"editor-post-sticky__checkbox-control",label:(0,gs.__)("Sticky"),help:(0,gs.__)("Pin this post to the top of the blog"),checked:e,onChange:()=>t({sticky:!e}),__nextHasNoMarginBottom:!0})})}const Nu={"auto-draft":{label:(0,gs.__)("Draft"),icon:Pu},draft:{label:(0,gs.__)("Draft"),icon:Pu},pending:{label:(0,gs.__)("Pending"),icon:Cu},private:{label:(0,gs.__)("Private"),icon:ju},future:{label:(0,gs.__)("Scheduled"),icon:Eu},publish:{label:(0,gs.__)("Published"),icon:Tu}},Au=[{label:(0,gs.__)("Draft"),value:"draft",description:(0,gs.__)("Not ready to publish.")},{label:(0,gs.__)("Pending"),value:"pending",description:(0,gs.__)("Waiting for review before publishing.")},{label:(0,gs.__)("Private"),value:"private",description:(0,gs.__)("Only visible to site admins and editors.")},{label:(0,gs.__)("Scheduled"),value:"future",description:(0,gs.__)("Publish automatically on a chosen date.")},{label:(0,gs.__)("Published"),value:"publish",description:(0,gs.__)("Visible to everyone.")}],Du=[R,M,O,L];function Ru(){const{status:e,date:t,password:s,postId:o,postType:n,canEdit:i}=(0,c.useSelect)((e=>{var t;const{getEditedPostAttribute:s,getCurrentPostId:o,getCurrentPostType:n,getCurrentPost:i}=e(qi);return{status:s("status"),date:s("date"),password:s("password"),postId:o(),postType:n(),canEdit:null!==(t=i()._links?.["wp:action-publish"])&&void 0!==t&&t}}),[]),[r,a]=(0,u.useState)(!!s),l=(0,p.useInstanceId)(Ru,"editor-change-status__password-input"),{editEntityRecord:h}=(0,c.useDispatch)(d.store),[g,_]=(0,u.useState)(null),f=(0,u.useMemo)((()=>({anchor:g,"aria-label":(0,gs.__)("Status & visibility"),headerTitle:(0,gs.__)("Status & visibility"),placement:"left-start",offset:36,shift:!0})),[g]);if(Du.includes(n))return null;const b=({status:i=e,password:r=s,date:a=t})=>{h("postType",n,o,{status:i,date:a,password:r})},y=e=>{a(e),e||b({password:""})},x=o=>{let n=t,i=s;"future"===e&&new Date(t)>new Date&&(n=null),"private"===o&&s&&(i=""),b({status:o,date:n,password:i})};return(0,P.jsx)(tl,{label:(0,gs.__)("Status"),ref:_,children:i?(0,P.jsx)(Do.Dropdown,{className:"editor-post-status",contentClassName:"editor-change-status__content",popoverProps:f,focusOnMount:!0,renderToggle:({onToggle:t,isOpen:s})=>(0,P.jsx)(Do.Button,{className:"editor-post-status__toggle",variant:"tertiary",size:"compact",onClick:t,icon:Nu[e]?.icon,"aria-label":(0,gs.sprintf)((0,gs.__)("Change status: %s"),Nu[e]?.label),"aria-expanded":s,children:Nu[e]?.label}),renderContent:({onClose:t})=>(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(m.__experimentalInspectorPopoverHeader,{title:(0,gs.__)("Status & visibility"),onClose:t}),(0,P.jsx)("form",{children:(0,P.jsxs)(Do.__experimentalVStack,{spacing:4,children:[(0,P.jsx)(Do.RadioControl,{className:"editor-change-status__options",hideLabelFromVision:!0,label:(0,gs.__)("Status"),options:Au,onChange:x,selected:"auto-draft"===e?"draft":e}),"future"===e&&(0,P.jsx)("div",{className:"editor-change-status__publish-date-wrapper",children:(0,P.jsx)(Td,{showPopoverHeaderActions:!1,isCompact:!0})}),"private"!==e&&(0,P.jsxs)(Do.__experimentalVStack,{as:"fieldset",spacing:4,className:"editor-change-status__password-fieldset",children:[(0,P.jsx)(Do.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,gs.__)("Password protected"),help:(0,gs.__)("Only visible to those who know the password"),checked:r,onChange:y}),r&&(0,P.jsx)("div",{className:"editor-change-status__password-input",children:(0,P.jsx)(Do.TextControl,{label:(0,gs.__)("Password"),onChange:e=>b({password:e}),value:s,placeholder:(0,gs.__)("Use a secure password"),type:"text",id:l,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,maxLength:255})})]}),(0,P.jsx)(Iu,{})]})})]})}):(0,P.jsx)("div",{className:"editor-post-status is-read-only",children:Nu[e]?.label})})}function Mu({forceIsDirty:e}){const[t,s]=(0,u.useState)(!1),o=(0,p.useViewportMatch)("small"),{isAutosaving:n,isDirty:i,isNew:r,isPublished:a,isSaveable:l,isSaving:d,isScheduled:h,hasPublishAction:m,showIconLabels:g,postStatus:_,postStatusHasChanged:f}=(0,c.useSelect)((t=>{var s;const{isEditedPostNew:o,isCurrentPostPublished:n,isCurrentPostScheduled:i,isEditedPostDirty:r,isSavingPost:a,isEditedPostSaveable:l,getCurrentPost:c,isAutosavingPost:d,getEditedPostAttribute:u,getPostEdits:p}=t(qi),{get:h}=t(j.store);return{isAutosaving:d(),isDirty:e||r(),isNew:o(),isPublished:n(),isSaving:a(),isSaveable:l(),isScheduled:i(),hasPublishAction:null!==(s=c()?._links?.["wp:action-publish"])&&void 0!==s&&s,showIconLabels:h("core","showIconLabels"),postStatus:u("status"),postStatusHasChanged:!!p()?.status}}),[e]),b="pending"===_,{savePost:y}=(0,c.useDispatch)(qi),x=(0,p.usePrevious)(d);if((0,u.useEffect)((()=>{let e;return x&&!d&&(s(!0),e=setTimeout((()=>{s(!1)}),1e3)),()=>clearTimeout(e)}),[d]),!m&&b)return null;const v=!["pending","draft","auto-draft"].includes(_)&&Au.map((({value:e})=>e)).includes(_);if(a||h||v||f&&["pending","draft"].includes(_))return null;const w=b?(0,gs.__)("Save as pending"):(0,gs.__)("Save draft"),S=(0,gs.__)("Save"),k=t||!r&&!i,C=d||k,E=d||k||!l;let T;return d?T=n?(0,gs.__)("Autosaving"):(0,gs.__)("Saving"):k?T=(0,gs.__)("Saved"):o?T=w:g&&(T=S),(0,P.jsxs)(Do.Button,{className:l||d?dr({"editor-post-save-draft":!C,"editor-post-saved-state":C,"is-saving":d,"is-autosaving":n,"is-saved":k,[(0,Do.__unstableGetAnimateClassName)({type:"loading"})]:d}):void 0,onClick:E?void 0:()=>y(),shortcut:E?void 0:aa.displayShortcut.primary("s"),variant:"tertiary",size:"compact",icon:o?void 0:wu,label:T||w,"aria-disabled":E,children:[C&&(0,P.jsx)(Su,{icon:k?Ro:ku}),T]})}function Ou({children:e}){return(0,c.useSelect)((e=>{var t;return null!==(t=e(qi).getCurrentPost()._links?.["wp:action-publish"])&&void 0!==t&&t}),[])?e:null}const Lu=[R,M,O,L];function Fu(){const[e,t]=(0,u.useState)(null),s=(0,c.useSelect)((e=>e(qi).getCurrentPostType()),[]),o=(0,u.useMemo)((()=>({anchor:e,"aria-label":(0,gs.__)("Change publish date"),placement:"left-start",offset:36,shift:!0})),[e]),n=Id(),i=Id({full:!0});return Lu.includes(s)?null:(0,P.jsx)(Ou,{children:(0,P.jsx)(tl,{label:(0,gs.__)("Publish"),ref:t,children:(0,P.jsx)(Do.Dropdown,{popoverProps:o,focusOnMount:!0,className:"editor-post-schedule__panel-dropdown",contentClassName:"editor-post-schedule__dialog",renderToggle:({onToggle:e,isOpen:t})=>(0,P.jsx)(Do.Button,{size:"compact",className:"editor-post-schedule__dialog-toggle",variant:"tertiary",tooltipPosition:"middle left",onClick:e,"aria-label":(0,gs.sprintf)((0,gs.__)("Change date: %s"),n),label:i,showTooltip:n!==i,"aria-expanded":t,children:n}),renderContent:({onClose:e})=>(0,P.jsx)(Ed,{onClose:e})})})})}function Vu({children:e}){return(0,P.jsx)(qa,{supportKeys:"slug",children:e})}function zu(){const e=(0,c.useSelect)((e=>(0,v.safeDecodeURIComponent)(e(qi).getEditedPostSlug())),[]),{editPost:t}=(0,c.useDispatch)(qi),[s,o]=(0,u.useState)(!1);return(0,P.jsx)(Do.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,gs.__)("Slug"),autoComplete:"off",spellCheck:"false",value:s?"":e,onChange:e=>{t({slug:e}),e?s&&o(!1):s||o(!0)},onBlur:e=>{t({slug:(0,v.cleanForSlug)(e.target.value)}),s&&o(!1)},className:"editor-post-slug"})}function Uu(){return(0,P.jsx)(Vu,{children:(0,P.jsx)(zu,{})})}function Hu(){S()("wp.editor.PostSwitchToDraftButton",{since:"6.7",version:"6.9"});const[e,t]=(0,u.useState)(!1),{editPost:s,savePost:o}=(0,c.useDispatch)(qi),{isSaving:n,isPublished:i,isScheduled:r}=(0,c.useSelect)((e=>{const{isSavingPost:t,isCurrentPostPublished:s,isCurrentPostScheduled:o}=e(qi);return{isSaving:t(),isPublished:s(),isScheduled:o()}}),[]),a=n||!i&&!r;let l,d;i?(l=(0,gs.__)("Are you sure you want to unpublish this post?"),d=(0,gs.__)("Unpublish")):r&&(l=(0,gs.__)("Are you sure you want to unschedule this post?"),d=(0,gs.__)("Unschedule"));return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,className:"editor-post-switch-to-draft",onClick:()=>{a||t(!0)},"aria-disabled":a,variant:"secondary",style:{flexGrow:"1",justifyContent:"center"},children:(0,gs.__)("Switch to draft")}),(0,P.jsx)(Do.__experimentalConfirmDialog,{isOpen:e,onConfirm:()=>{t(!1),s({status:"draft"}),o()},onCancel:()=>t(!1),confirmButtonText:d,children:l})]})}function Gu(){const{syncStatus:e,postType:t}=(0,c.useSelect)((e=>{const{getEditedPostAttribute:t}=e(qi),s=t("meta");return{syncStatus:"unsynced"===s?.wp_pattern_sync_status?"unsynced":t("wp_pattern_sync_status"),postType:t("type")}}));return"wp_block"!==t?null:(0,P.jsx)(tl,{label:(0,gs.__)("Sync status"),children:(0,P.jsx)("div",{className:"editor-post-sync-status__value",children:"unsynced"===e?(0,gs._x)("Not synced","pattern (singular)"):(0,gs._x)("Synced","pattern (singular)")})})}const $u=e=>e;const Wu=function({taxonomyWrapper:e=$u}){const{postType:t,taxonomies:s}=(0,c.useSelect)((e=>({postType:e(qi).getCurrentPostType(),taxonomies:e(d.store).getTaxonomies({per_page:-1})})),[]);return(null!=s?s:[]).filter((e=>e.types.includes(t)&&e.visibility?.show_ui)).map((t=>{const s=t.hierarchical?eu:Gd,o={slug:t.slug,...t.hierarchical?{}:{__nextHasNoMarginBottom:!0}};return(0,P.jsx)(u.Fragment,{children:e((0,P.jsx)(s,{...o}),t)},`taxonomy-${t.slug}`)}))};function Zu({children:e}){const t=(0,c.useSelect)((e=>{const t=e(qi).getCurrentPostType(),s=e(d.store).getTaxonomies({per_page:-1});return s?.some((e=>e.types.includes(t)))}),[]);return t?e:null}function Yu({taxonomy:e,children:t}){const s=e?.slug,o=s?`taxonomy-panel-${s}`:"",{isEnabled:n,isOpened:i}=(0,c.useSelect)((e=>{const{isEditorPanelEnabled:t,isEditorPanelOpened:n}=e(qi);return{isEnabled:!!s&&t(o),isOpened:!!s&&n(o)}}),[o,s]),{toggleEditorPanelOpened:r}=(0,c.useDispatch)(qi);if(!n)return null;const a=e?.labels?.menu_name;return a?(0,P.jsx)(Do.PanelBody,{title:a,opened:i,onToggle:()=>r(o),children:t}):null}const Ku=function(){return(0,P.jsx)(Zu,{children:(0,P.jsx)(Wu,{taxonomyWrapper:(e,t)=>(0,P.jsx)(Yu,{taxonomy:t,children:e})})})};var qu=s(4132);function Qu(){const e=(0,p.useInstanceId)(Qu),{content:t,blocks:s,type:o,id:n}=(0,c.useSelect)((e=>{const{getEditedEntityRecord:t}=e(d.store),{getCurrentPostType:s,getCurrentPostId:o}=e(qi),n=s(),i=o(),r=t("postType",n,i);return{content:r?.content,blocks:r?.blocks,type:n,id:i}}),[]),{editEntityRecord:i}=(0,c.useDispatch)(d.store),r=(0,u.useMemo)((()=>t instanceof Function?t({blocks:s}):s?(0,y.__unstableSerializeAndClean)(s):t),[t,s]);return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(Do.VisuallyHidden,{as:"label",htmlFor:`post-content-${e}`,children:(0,gs.__)("Type text or HTML")}),(0,P.jsx)(qu.A,{autoComplete:"off",dir:"auto",value:r,onChange:e=>{i("postType",o,n,{content:e.target.value,blocks:void 0,selection:void 0})},className:"editor-post-text-editor",id:`post-content-${e}`,placeholder:(0,gs.__)("Start writing with text or HTML")})]})}const Xu=window.wp.dom,Ju="wp-block wp-block-post-title block-editor-block-list__block editor-post-title editor-post-title__input rich-text",ep=/[\r\n]+/g;function tp(e){const t=(0,u.useRef)(),{isCleanNewPost:s}=(0,c.useSelect)((e=>{const{isCleanNewPost:t}=e(qi);return{isCleanNewPost:t()}}),[]);return(0,u.useImperativeHandle)(e,(()=>({focus:()=>{t?.current?.focus()}}))),(0,u.useEffect)((()=>{if(!t.current)return;const{defaultView:e}=t.current.ownerDocument,{name:o,parent:n}=e,i="editor-canvas"===o?n.document:e.document,{activeElement:r,body:a}=i;!s||r&&a!==r||t.current.focus()}),[s]),{ref:t}}function sp(){const{editPost:e}=(0,c.useDispatch)(qi),{title:t}=(0,c.useSelect)((e=>{const{getEditedPostAttribute:t}=e(qi);return{title:t("title")}}),[]);return{title:t,setTitle:function(t){e({title:t})}}}const op=(0,u.forwardRef)((function(e,t){const{placeholder:s}=(0,c.useSelect)((e=>{const{getSettings:t}=e(m.store),{titlePlaceholder:s}=t();return{placeholder:s}}),[]),[o,n]=(0,u.useState)(!1),{ref:i}=tp(t),{title:r,setTitle:a}=sp(),[l,d]=(0,u.useState)({}),{clearSelectedBlock:h,insertBlocks:g,insertDefaultBlock:_}=(0,c.useDispatch)(m.store),f=(0,Ao.decodeEntities)(s)||(0,gs.__)("Add title"),{value:b,onChange:x,ref:v}=(0,ua.__unstableUseRichText)({value:r,onChange(e){a(e.replace(ep," "))},placeholder:f,selectionStart:l.start,selectionEnd:l.end,onSelectionChange(e,t){d((s=>{const{start:o,end:n}=s;return o===e&&n===t?s:{start:e,end:t}}))},__unstableDisableFormats:!1});function w(e){g(e,0)}const S=dr(Ju,{"is-selected":o});return(0,P.jsx)(qa,{supportKeys:"title",children:(0,P.jsx)("h1",{ref:(0,p.useMergeRefs)([v,i]),contentEditable:!0,className:S,"aria-label":f,role:"textbox","aria-multiline":"true",onFocus:function(){n(!0),h()},onBlur:function(){n(!1),d({})},onKeyDown:function(e){e.keyCode===aa.ENTER&&(e.preventDefault(),_(void 0,void 0,0))},onPaste:function(e){const t=e.clipboardData;let s="",o="";try{s=t.getData("text/plain"),o=t.getData("text/html")}catch(e){return}window.console.log("Received HTML:\n\n",o),window.console.log("Received plain text:\n\n",s);const n=(0,y.pasteHandler)({HTML:o,plainText:s});if(e.preventDefault(),n.length)if("string"!=typeof n){const[e]=n;if(r||"core/heading"!==e.name&&"core/paragraph"!==e.name)w(n);else{const t=(0,Xu.__unstableStripHTML)(e.attributes.content);a(t),w(n.slice(1))}}else{const e=(0,Xu.__unstableStripHTML)(n);x((0,ua.insert)(b,(0,ua.create)({html:e})))}}})})}));const np=(0,u.forwardRef)((function(e,t){const{placeholder:s}=(0,c.useSelect)((e=>{const{getSettings:t}=e(m.store),{titlePlaceholder:s}=t();return{placeholder:s}}),[]),[o,n]=(0,u.useState)(!1),{title:i,setTitle:r}=sp(),{ref:a}=tp(t),l=dr(Ju,{"is-selected":o,"is-raw-text":!0}),d=(0,Ao.decodeEntities)(s)||(0,gs.__)("Add title");return(0,P.jsx)(Do.TextareaControl,{ref:a,value:i,onChange:function(e){r(e.replace(ep," "))},onFocus:function(){n(!0)},onBlur:function(){n(!1)},label:s,className:l,placeholder:d,hideLabelFromVision:!0,autoComplete:"off",dir:"auto",rows:1,__nextHasNoMarginBottom:!0})}));function ip({children:e}){const{canTrashPost:t}=(0,c.useSelect)((e=>{const{isEditedPostNew:t,getCurrentPostId:s,getCurrentPostType:o}=e(qi),{canUser:n}=e(d.store),i=o(),r=s(),a=t(),l=!!r&&n("delete",{kind:"postType",name:i,id:r});return{canTrashPost:(!a||r)&&l&&!z.includes(i)}}),[]);return t?e:null}function rp({onActionPerformed:e}){const t=(0,c.useRegistry)(),{isNew:s,isDeleting:o,postId:n,title:i}=(0,c.useSelect)((e=>{const t=e(qi);return{isNew:t.isEditedPostNew(),isDeleting:t.isDeletingPost(),postId:t.getCurrentPostId(),title:t.getCurrentPostAttribute("title")}}),[]),{trashPost:r}=(0,c.useDispatch)(qi),[a,l]=(0,u.useState)(!1);if(s||!n)return null;return(0,P.jsxs)(ip,{children:[(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,className:"editor-post-trash",isDestructive:!0,variant:"secondary",isBusy:o,"aria-disabled":o,onClick:o?void 0:()=>l(!0),children:(0,gs.__)("Move to trash")}),(0,P.jsx)(Do.__experimentalConfirmDialog,{isOpen:a,onConfirm:async()=>{l(!1),await r();const s=await t.resolveSelect(qi).getCurrentPost();e?.("move-to-trash",[s])},onCancel:()=>l(!1),confirmButtonText:(0,gs.__)("Move to trash"),size:"small",children:(0,gs.sprintf)((0,gs.__)('Are you sure you want to move "%s" to the trash?'),i)})]})}const ap=(0,P.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(k.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.625 5.5h9.75c.069 0 .125.056.125.125v9.75a.125.125 0 0 1-.125.125h-9.75a.125.125 0 0 1-.125-.125v-9.75c0-.069.056-.125.125-.125ZM4 5.625C4 4.728 4.728 4 5.625 4h9.75C16.273 4 17 4.728 17 5.625v9.75c0 .898-.727 1.625-1.625 1.625h-9.75A1.625 1.625 0 0 1 4 15.375v-9.75Zm14.5 11.656v-9H20v9C20 18.8 18.77 20 17.251 20H6.25v-1.5h11.001c.69 0 1.249-.528 1.249-1.219Z"})});function lp({onClose:e}){const{isEditable:t,postSlug:s,postLink:o,permalinkPrefix:n,permalinkSuffix:i,permalink:r}=(0,c.useSelect)((e=>{var t;const s=e(qi).getCurrentPost(),o=e(qi).getCurrentPostType(),n=e(d.store).getPostType(o),i=e(qi).getPermalinkParts(),r=null!==(t=s?._links?.["wp:action-publish"])&&void 0!==t&&t;return{isEditable:e(qi).isPermalinkEditable()&&r,postSlug:(0,v.safeDecodeURIComponent)(e(qi).getEditedPostSlug()),viewPostLabel:n?.labels.view_item,postLink:s.link,permalinkPrefix:i?.prefix,permalinkSuffix:i?.suffix,permalink:(0,v.safeDecodeURIComponent)(e(qi).getPermalink())}}),[]),{editPost:a}=(0,c.useDispatch)(qi),{createNotice:l}=(0,c.useDispatch)(ms.store),[h,g]=(0,u.useState)(!1),_=(0,p.useCopyToClipboard)(r,(()=>{l("info",(0,gs.__)("Copied URL to clipboard."),{isDismissible:!0,type:"snackbar"})}));return(0,P.jsxs)("div",{className:"editor-post-url",children:[(0,P.jsx)(m.__experimentalInspectorPopoverHeader,{title:(0,gs.__)("Link"),onClose:e}),(0,P.jsxs)(Do.__experimentalVStack,{spacing:3,children:[t&&(0,P.jsx)("div",{children:(0,u.createInterpolateElement)((0,gs.__)("Customize the last part of the URL. <a>Learn more.</a>"),{a:(0,P.jsx)(Do.ExternalLink,{href:(0,gs.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#permalink")})})}),(0,P.jsxs)("div",{children:[t&&(0,P.jsx)(Do.__experimentalInputControl,{__next40pxDefaultSize:!0,prefix:(0,P.jsx)(Do.__experimentalInputControlPrefixWrapper,{children:"/"}),suffix:(0,P.jsx)(Do.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,P.jsx)(Do.Button,{icon:ap,ref:_,size:"small",label:"Copy"})}),label:(0,gs.__)("Link"),hideLabelFromVision:!0,value:h?"":s,autoComplete:"off",spellCheck:"false",type:"text",className:"editor-post-url__input",onChange:e=>{a({slug:e}),e?h&&g(!1):h||g(!0)},onBlur:e=>{a({slug:(0,v.cleanForSlug)(e.target.value)}),h&&g(!1)},help:(0,P.jsxs)(Do.ExternalLink,{className:"editor-post-url__link",href:o,target:"_blank",children:[(0,P.jsx)("span",{className:"editor-post-url__link-prefix",children:n}),(0,P.jsx)("span",{className:"editor-post-url__link-slug",children:s}),(0,P.jsx)("span",{className:"editor-post-url__link-suffix",children:i})]})}),!t&&(0,P.jsx)(Do.ExternalLink,{className:"editor-post-url__link",href:o,target:"_blank",children:o})]})]})]})}function cp({children:e}){const t=(0,c.useSelect)((e=>{const t=e(qi).getCurrentPostType(),s=e(d.store).getPostType(t);if(!s?.viewable)return!1;if(!e(qi).getCurrentPost().link)return!1;return!!e(qi).getPermalinkParts()}),[]);return t?e:null}function dp(){return up()}function up(){const e=(0,c.useSelect)((e=>e(qi).getPermalink()),[]);return(0,v.filterURLForDisplay)((0,v.safeDecodeURIComponent)(e))}function pp(){const[e,t]=(0,u.useState)(null),s=(0,u.useMemo)((()=>({anchor:e,placement:"left-start",offset:36,shift:!0})),[e]);return(0,P.jsx)(cp,{children:(0,P.jsx)(tl,{label:(0,gs.__)("Link"),ref:t,children:(0,P.jsx)(Do.Dropdown,{popoverProps:s,className:"editor-post-url__panel-dropdown",contentClassName:"editor-post-url__panel-dialog",focusOnMount:!0,renderToggle:({isOpen:e,onToggle:t})=>(0,P.jsx)(hp,{isOpen:e,onClick:t}),renderContent:({onClose:e})=>(0,P.jsx)(lp,{onClose:e})})})})}function hp({isOpen:e,onClick:t}){const{slug:s,isFrontPage:o,postLink:n}=(0,c.useSelect)((e=>{const{getCurrentPostId:t,getCurrentPost:s}=e(qi),{getEditedEntityRecord:o,canUser:n}=e(d.store),i=n("read",{kind:"root",name:"site"})?o("root","site"):void 0,r=t();return{slug:e(qi).getEditedPostSlug(),isFrontPage:i?.page_on_front===r,postLink:s()?.link}}),[]),i=(0,v.safeDecodeURIComponent)(s);return(0,P.jsx)(Do.Button,{size:"compact",className:"editor-post-url__panel-toggle",variant:"tertiary","aria-expanded":e,"aria-label":(0,gs.sprintf)((0,gs.__)("Change link: %s"),i),onClick:t,children:(0,P.jsx)(Do.__experimentalTruncate,{numberOfLines:1,children:o?n:`/${i}`})})}function mp({render:e}){return e({canEdit:(0,c.useSelect)((e=>{var t;return null!==(t=e(qi).getCurrentPost()._links?.["wp:action-publish"])&&void 0!==t&&t}))})}const gp=(0,P.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(k.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"})}),_p=window.wp.wordcount;function fp(){const e=(0,c.useSelect)((e=>e(qi).getEditedPostAttribute("content")),[]),t=(0,gs._x)("words","Word count type. Do not translate!");return(0,P.jsx)("span",{className:"word-count",children:(0,_p.count)(e,t)})}const bp=189;function yp(){const e=(0,c.useSelect)((e=>e(qi).getEditedPostAttribute("content")),[]),t=(0,gs._x)("words","Word count type. Do not translate!"),s=Math.round((0,_p.count)(e,t)/bp),o=0===s?(0,u.createInterpolateElement)((0,gs.__)("<span>< 1</span> minute"),{span:(0,P.jsx)("span",{})}):(0,u.createInterpolateElement)((0,gs.sprintf)((0,gs._n)("<span>%s</span> minute","<span>%s</span> minutes",s),s),{span:(0,P.jsx)("span",{})});return(0,P.jsx)("span",{className:"time-to-read",children:o})}function xp(){const e=(0,c.useSelect)((e=>e(qi).getEditedPostAttribute("content")),[]);return(0,_p.count)(e,"characters_including_spaces")}const vp=function({hasOutlineItemsDisabled:e,onRequestClose:t}){const{headingCount:s,paragraphCount:o,numberOfBlocks:n}=(0,c.useSelect)((e=>{const{getGlobalBlockCount:t}=e(m.store);return{headingCount:t("core/heading"),paragraphCount:t("core/paragraph"),numberOfBlocks:t()}}),[]);return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)("div",{className:"table-of-contents__wrapper",role:"note","aria-label":(0,gs.__)("Document Statistics"),tabIndex:"0",children:(0,P.jsxs)("ul",{role:"list",className:"table-of-contents__counts",children:[(0,P.jsxs)("li",{className:"table-of-contents__count",children:[(0,gs.__)("Words"),(0,P.jsx)(fp,{})]}),(0,P.jsxs)("li",{className:"table-of-contents__count",children:[(0,gs.__)("Characters"),(0,P.jsx)("span",{className:"table-of-contents__number",children:(0,P.jsx)(xp,{})})]}),(0,P.jsxs)("li",{className:"table-of-contents__count",children:[(0,gs.__)("Time to read"),(0,P.jsx)(yp,{})]}),(0,P.jsxs)("li",{className:"table-of-contents__count",children:[(0,gs.__)("Headings"),(0,P.jsx)("span",{className:"table-of-contents__number",children:s})]}),(0,P.jsxs)("li",{className:"table-of-contents__count",children:[(0,gs.__)("Paragraphs"),(0,P.jsx)("span",{className:"table-of-contents__number",children:o})]}),(0,P.jsxs)("li",{className:"table-of-contents__count",children:[(0,gs.__)("Blocks"),(0,P.jsx)("span",{className:"table-of-contents__number",children:n})]})]})}),s>0&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)("hr",{}),(0,P.jsx)("h2",{className:"table-of-contents__title",children:(0,gs.__)("Document Outline")}),(0,P.jsx)(xa,{onSelect:t,hasOutlineItemsDisabled:e})]})]})};const wp=(0,u.forwardRef)((function({hasOutlineItemsDisabled:e,repositionDropdown:t,...s},o){const n=(0,c.useSelect)((e=>!!e(m.store).getBlockCount()),[]);return(0,P.jsx)(Do.Dropdown,{popoverProps:{placement:t?"right":"bottom"},className:"table-of-contents",contentClassName:"table-of-contents__popover",renderToggle:({isOpen:e,onToggle:t})=>(0,P.jsx)(Do.Button,{__next40pxDefaultSize:!0,...s,ref:o,onClick:n?t:void 0,icon:gp,"aria-expanded":e,"aria-haspopup":"true",label:(0,gs.__)("Details"),tooltipPosition:"bottom","aria-disabled":!n}),renderContent:({onClose:t})=>(0,P.jsx)(vp,{onRequestClose:t,hasOutlineItemsDisabled:e})})}));function Sp(){const{__experimentalGetDirtyEntityRecords:e}=(0,c.useSelect)(d.store);return(0,u.useEffect)((()=>{const t=t=>{if(e().length>0)return t.returnValue=(0,gs.__)("You have unsaved changes. If you proceed, they will be lost."),t.returnValue};return window.addEventListener("beforeunload",t),()=>{window.removeEventListener("beforeunload",t)}}),[e]),null}const kp=(0,p.createHigherOrderComponent)((e=>({useSubRegistry:t=!0,...s})=>{const o=(0,c.useRegistry)(),[n]=(0,u.useState)((()=>new WeakMap)),i=function(e,t,s){if(!s)return t;let o=e.get(t);return o||(o=(0,c.createRegistry)({"core/block-editor":m.storeConfig},t),o.registerStore("core/editor",Ki),e.set(t,o)),o}(n,o,t);return i===o?(0,P.jsx)(e,{registry:o,...s}):(0,P.jsx)(c.RegistryProvider,{value:i,children:(0,P.jsx)(e,{registry:i,...s})})}),"withRegistryProvider"),Pp=(e,t)=>`<a ${Cp(e)}>${t}</a>`,Cp=e=>`href="${e}" target="_blank" rel="noreferrer noopener"`,jp=e=>{const{title:t,foreign_landing_url:s,creator:o,creator_url:n,license:i,license_version:r,license_url:a}=e,l=((e,t)=>{let s=e.trim();return"pdm"!==e&&(s=e.toUpperCase().replace("SAMPLING","Sampling")),t&&(s+=` ${t}`),["pdm","cc0"].includes(e)||(s=`CC ${s}`),s})(i,r),c=(0,Ao.decodeEntities)(o);let d;return d=c?t?(0,gs.sprintf)((0,gs._x)('"%1$s" by %2$s/ %3$s',"caption"),Pp(s,(0,Ao.decodeEntities)(t)),n?Pp(n,c):c,a?Pp(`${a}?ref=openverse`,l):l):(0,gs.sprintf)((0,gs._x)("<a %1$s>Work</a> by %2$s/ %3$s","caption"),Cp(s),n?Pp(n,c):c,a?Pp(`${a}?ref=openverse`,l):l):t?(0,gs.sprintf)((0,gs._x)('"%1$s"/ %2$s',"caption"),Pp(s,(0,Ao.decodeEntities)(t)),a?Pp(`${a}?ref=openverse`,l):l):(0,gs.sprintf)((0,gs._x)("<a %1$s>Work</a>/ %2$s","caption"),Cp(s),a?Pp(`${a}?ref=openverse`,l):l),d.replace(/\s{2}/g," ")},Ep=async(e={})=>(await(0,c.resolveSelect)(d.store).getMediaItems({...e,orderBy:e?.search?"relevance":"date"})).map((e=>({...e,alt:e.alt_text,url:e.source_url,previewUrl:e.media_details?.sizes?.medium?.source_url,caption:e.caption?.raw}))),Tp=[{name:"images",labels:{name:(0,gs.__)("Images"),search_items:(0,gs.__)("Search images")},mediaType:"image",fetch:async(e={})=>Ep({...e,media_type:"image"})},{name:"videos",labels:{name:(0,gs.__)("Videos"),search_items:(0,gs.__)("Search videos")},mediaType:"video",fetch:async(e={})=>Ep({...e,media_type:"video"})},{name:"audio",labels:{name:(0,gs.__)("Audio"),search_items:(0,gs.__)("Search audio")},mediaType:"audio",fetch:async(e={})=>Ep({...e,media_type:"audio"})},{name:"openverse",labels:{name:(0,gs.__)("Openverse"),search_items:(0,gs.__)("Search Openverse")},mediaType:"image",async fetch(e={}){const t={...e,mature:!1,excluded_source:"flickr,inaturalist,wikimedia",license:"pdm,cc0"},s={per_page:"page_size",search:"q"},o=new URL("https://api.openverse.org/v1/images/");Object.entries(t).forEach((([e,t])=>{const n=s[e]||e;o.searchParams.set(n,t)}));const n=await window.fetch(o,{headers:{"User-Agent":"WordPress/inserter-media-fetch"}});return(await n.json()).results.map((e=>({...e,title:e.title?.toLowerCase().startsWith("file:")?e.title.slice(5):e.title,sourceId:e.id,id:void 0,caption:jp(e),previewUrl:e.thumbnail})))},getReportUrl:({sourceId:e})=>`https://wordpress.org/openverse/image/${e}/report/`,isExternalResource:!0}],Bp=()=>{};function Ip({additionalData:e={},allowedTypes:t,filesList:s,maxUploadFileSize:o,onError:n=Bp,onFileChange:i}){const{getCurrentPost:r,getEditorSettings:a}=(0,c.select)(qi),{lockPostAutosaving:l,unlockPostAutosaving:d,lockPostSaving:u,unlockPostSaving:p}=(0,c.dispatch)(qi),h=a().allowedMimeTypes,m=`image-upload-${lu()}`;let g=!1;o=o||a().maxUploadFileSize;const _=r(),f="number"==typeof _?.id?_.id:_?.wp_id,b=f?{post:f}:{},y=()=>{p(m),d(m),g=!1};(0,Ji.uploadMedia)({allowedTypes:t,filesList:s,onFileChange:e=>{g?y():(u(m),l(m),g=!0),i(e)},additionalData:{...b,...e},maxUploadFileSize:o,onError:({message:e})=>{y(),n(e)},wpAllowedMimeTypes:h})}var Np=s(66),Ap=s.n(Np);
/*!
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
*
diff --git a/wp-includes/js/dist/fields.js b/wp-includes/js/dist/fields.js
index 4ce3b765a1..8d5d71acb8 100644
--- a/wp-includes/js/dist/fields.js
+++ b/wp-includes/js/dist/fields.js
@@ -1858,7 +1858,7 @@ function paramCase(input, options) {
}
;// CONCATENATED MODULE: ./node_modules/client-zip/index.js
-"stream"in Blob.prototype||Object.defineProperty(Blob.prototype,"stream",{value(){return new Response(this).body}}),"setBigUint64"in DataView.prototype||Object.defineProperty(DataView.prototype,"setBigUint64",{value(e,n,t){const i=Number(0xffffffffn&n),r=Number(n>>32n);this.setUint32(e+(t?0:4),i,t),this.setUint32(e+(t?4:0),r,t)}});var e=e=>new DataView(new ArrayBuffer(e)),n=e=>new Uint8Array(e.buffer||e),t=e=>(new TextEncoder).encode(String(e)),i=e=>Math.min(4294967295,Number(e)),r=e=>Math.min(65535,Number(e));function f(e,i){if(void 0===i||i instanceof Date||(i=new Date(i)),e instanceof File)return{isFile:1,t:i||new Date(e.lastModified),i:e.stream()};if(e instanceof Response)return{isFile:1,t:i||new Date(e.headers.get("Last-Modified")||Date.now()),i:e.body};if(void 0===i)i=new Date;else if(isNaN(i))throw new Error("Invalid modification date.");if(void 0===e)return{isFile:0,t:i};if("string"==typeof e)return{isFile:1,t:i,i:t(e)};if(e instanceof Blob)return{isFile:1,t:i,i:e.stream()};if(e instanceof Uint8Array||e instanceof ReadableStream)return{isFile:1,t:i,i:e};if(e instanceof ArrayBuffer||ArrayBuffer.isView(e))return{isFile:1,t:i,i:n(e)};if(Symbol.asyncIterator in e)return{isFile:1,t:i,i:o(e[Symbol.asyncIterator]())};throw new TypeError("Unsupported input format.")}function o(e,n=e){return new ReadableStream({async pull(n){let t=0;for(;n.desiredSize>t;){const i=await e.next();if(!i.value){n.close();break}{const e=a(i.value);n.enqueue(e),t+=e.byteLength}}},cancel(e){n.throw?.(e)}})}function a(e){return"string"==typeof e?t(e):e instanceof Uint8Array?e:n(e)}function s(e,i,r){let[f,o]=function(e){return e?e instanceof Uint8Array?[e,1]:ArrayBuffer.isView(e)||e instanceof ArrayBuffer?[n(e),1]:[t(e),0]:[void 0,0]}(i);if(e instanceof File)return{o:d(f||t(e.name)),u:BigInt(e.size),l:o};if(e instanceof Response){const n=e.headers.get("content-disposition"),i=n&&n.match(/;\s*filename\*?=["']?(.*?)["']?$/i),a=i&&i[1]||e.url&&new URL(e.url).pathname.split("/").findLast(Boolean),s=a&&decodeURIComponent(a),u=r||+e.headers.get("content-length");return{o:d(f||t(s)),u:BigInt(u),l:o}}return f=d(f,void 0!==e||void 0!==r),"string"==typeof e?{o:f,u:BigInt(t(e).length),l:o}:e instanceof Blob?{o:f,u:BigInt(e.size),l:o}:e instanceof ArrayBuffer||ArrayBuffer.isView(e)?{o:f,u:BigInt(e.byteLength),l:o}:{o:f,u:u(e,r),l:o}}function u(e,n){return n>-1?BigInt(n):e?void 0:0n}function d(e,n=1){if(!e||e.every((c=>47===c)))throw new Error("The file must have a name.");if(n)for(;47===e[e.length-1];)e=e.subarray(0,-1);else 47!==e[e.length-1]&&(e=new Uint8Array([...e,47]));return e}var l=new Uint32Array(256);for(let e=0;e<256;++e){let n=e;for(let e=0;e<8;++e)n=n>>>1^(1&n&&3988292384);l[e]=n}function y(e,n=0){n^=-1;for(var t=0,i=e.length;t<i;t++)n=n>>>8^l[255&n^e[t]];return(-1^n)>>>0}function w(e,n,t=0){const i=e.getSeconds()>>1|e.getMinutes()<<5|e.getHours()<<11,r=e.getDate()|e.getMonth()+1<<5|e.getFullYear()-1980<<9;n.setUint16(t,i,1),n.setUint16(t+2,r,1)}function B({o:e,l:n},t){return 8*(!n||(t??function(e){try{b.decode(e)}catch{return 0}return 1}(e)))}var b=new TextDecoder("utf8",{fatal:1});function p(t,i=0){const r=e(30);return r.setUint32(0,1347093252),r.setUint32(4,754976768|i),w(t.t,r,10),r.setUint16(26,t.o.length,1),n(r)}async function*g(e){let{i:n}=e;if("then"in n&&(n=await n),n instanceof Uint8Array)yield n,e.m=y(n,0),e.u=BigInt(n.length);else{e.u=0n;const t=n.getReader();for(;;){const{value:n,done:i}=await t.read();if(i)break;e.m=y(n,e.m),e.u+=BigInt(n.length),yield n}}}function I(t,r){const f=e(16+(r?8:0));return f.setUint32(0,1347094280),f.setUint32(4,t.isFile?t.m:0,1),r?(f.setBigUint64(8,t.u,1),f.setBigUint64(16,t.u,1)):(f.setUint32(8,i(t.u),1),f.setUint32(12,i(t.u),1)),n(f)}function v(t,r,f=0,o=0){const a=e(46);return a.setUint32(0,1347092738),a.setUint32(4,755182848),a.setUint16(8,2048|f),w(t.t,a,12),a.setUint32(16,t.isFile?t.m:0,1),a.setUint32(20,i(t.u),1),a.setUint32(24,i(t.u),1),a.setUint16(28,t.o.length,1),a.setUint16(30,o,1),a.setUint16(40,t.isFile?33204:16893,1),a.setUint32(42,i(r),1),n(a)}function h(t,i,r){const f=e(r);return f.setUint16(0,1,1),f.setUint16(2,r-4,1),16&r&&(f.setBigUint64(4,t.u,1),f.setBigUint64(12,t.u,1)),f.setBigUint64(r-8,i,1),n(f)}function D(e){return e instanceof File||e instanceof Response?[[e],[e]]:[[e.input,e.name,e.size],[e.input,e.lastModified]]}var S=e=>function(e){let n=BigInt(22),t=0n,i=0;for(const r of e){if(!r.o)throw new Error("Every file must have a non-empty name.");if(void 0===r.u)throw new Error(`Missing size for file "${(new TextDecoder).decode(r.o)}".`);const e=r.u>=0xffffffffn,f=t>=0xffffffffn;t+=BigInt(46+r.o.length+(e&&8))+r.u,n+=BigInt(r.o.length+46+(12*f|28*e)),i||(i=e)}return(i||t>=0xffffffffn)&&(n+=BigInt(76)),n+t}(function*(e){for(const n of e)yield s(...D(n)[0])}(e));function A(e,n={}){const t={"Content-Type":"application/zip","Content-Disposition":"attachment"};return("bigint"==typeof n.length||Number.isInteger(n.length))&&n.length>0&&(t["Content-Length"]=String(n.length)),n.metadata&&(t["Content-Length"]=String(S(n.metadata))),new Response(N(e,n),{headers:t})}function N(t,a={}){const u=function(e){const n=e[Symbol.iterator in e?Symbol.iterator:Symbol.asyncIterator]();return{async next(){const e=await n.next();if(e.done)return e;const[t,i]=D(e.value);return{done:0,value:Object.assign(f(...i),s(...t))}},throw:n.throw?.bind(n),[Symbol.asyncIterator](){return this}}}(t);return o(async function*(t,f){const o=[];let a=0n,s=0n,u=0;for await(const e of t){const n=B(e,f.buffersAreUTF8);yield p(e,n),yield new Uint8Array(e.o),e.isFile&&(yield*g(e));const t=e.u>=0xffffffffn,i=12*(a>=0xffffffffn)|28*t;yield I(e,t),o.push(v(e,a,n,i)),o.push(e.o),i&&o.push(h(e,a,i)),t&&(a+=8n),s++,a+=BigInt(46+e.o.length)+e.u,u||(u=t)}let d=0n;for(const e of o)yield e,d+=BigInt(e.length);if(u||a>=0xffffffffn){const t=e(76);t.setUint32(0,1347094022),t.setBigUint64(4,BigInt(44),1),t.setUint32(12,755182848),t.setBigUint64(24,s,1),t.setBigUint64(32,s,1),t.setBigUint64(40,d,1),t.setBigUint64(48,a,1),t.setUint32(56,1347094023),t.setBigUint64(64,a+d,1),t.setUint32(72,1,1),yield n(t)}const l=e(22);l.setUint32(0,1347093766),l.setUint16(8,r(s),1),l.setUint16(10,r(s),1),l.setUint32(12,i(d),1),l.setUint32(16,i(a),1),yield n(l)}(u,a),u)}
+"stream"in Blob.prototype||Object.defineProperty(Blob.prototype,"stream",{value(){return new Response(this).body}}),"setBigUint64"in DataView.prototype||Object.defineProperty(DataView.prototype,"setBigUint64",{value(e,n,t){const i=Number(0xffffffffn&n),r=Number(n>>32n);this.setUint32(e+(t?0:4),i,t),this.setUint32(e+(t?4:0),r,t)}});var e=e=>new DataView(new ArrayBuffer(e)),n=e=>new Uint8Array(e.buffer||e),t=e=>(new TextEncoder).encode(String(e)),i=e=>Math.min(4294967295,Number(e)),r=e=>Math.min(65535,Number(e));function f(e,i){if(void 0===i||i instanceof Date||(i=new Date(i)),e instanceof File)return{isFile:1,t:i||new Date(e.lastModified),i:e.stream()};if(e instanceof Response)return{isFile:1,t:i||new Date(e.headers.get("Last-Modified")||Date.now()),i:e.body};if(void 0===i)i=new Date;else if(isNaN(i))throw new Error("Invalid modification date.");if(void 0===e)return{isFile:0,t:i};if("string"==typeof e)return{isFile:1,t:i,i:t(e)};if(e instanceof Blob)return{isFile:1,t:i,i:e.stream()};if(e instanceof Uint8Array||e instanceof ReadableStream)return{isFile:1,t:i,i:e};if(e instanceof ArrayBuffer||ArrayBuffer.isView(e))return{isFile:1,t:i,i:n(e)};if(Symbol.asyncIterator in e)return{isFile:1,t:i,i:o(e[Symbol.asyncIterator]())};throw new TypeError("Unsupported input format.")}function o(e,n=e){return new ReadableStream({async pull(n){let t=0;for(;n.desiredSize>t;){const i=await e.next();if(!i.value){n.close();break}{const e=a(i.value);n.enqueue(e),t+=e.byteLength}}},cancel(e){n.throw?.(e)}})}function a(e){return"string"==typeof e?t(e):e instanceof Uint8Array?e:n(e)}function s(e,i,r){let[f,o]=function(e){return e?e instanceof Uint8Array?[e,1]:ArrayBuffer.isView(e)||e instanceof ArrayBuffer?[n(e),1]:[t(e),0]:[void 0,0]}(i);if(e instanceof File)return{o:d(f||t(e.name)),u:BigInt(e.size),l:o};if(e instanceof Response){const n=e.headers.get("content-disposition"),i=n&&n.match(/;\s*filename\*?\s*=\s*(?:UTF-\d+''|)["']?([^;"'\r\n]*)["']?(?:;|$)/i),a=i&&i[1]||e.url&&new URL(e.url).pathname.split("/").findLast(Boolean),s=a&&decodeURIComponent(a),u=r||+e.headers.get("content-length");return{o:d(f||t(s)),u:BigInt(u),l:o}}return f=d(f,void 0!==e||void 0!==r),"string"==typeof e?{o:f,u:BigInt(t(e).length),l:o}:e instanceof Blob?{o:f,u:BigInt(e.size),l:o}:e instanceof ArrayBuffer||ArrayBuffer.isView(e)?{o:f,u:BigInt(e.byteLength),l:o}:{o:f,u:u(e,r),l:o}}function u(e,n){return n>-1?BigInt(n):e?void 0:0n}function d(e,n=1){if(!e||e.every((c=>47===c)))throw new Error("The file must have a name.");if(n)for(;47===e[e.length-1];)e=e.subarray(0,-1);else 47!==e[e.length-1]&&(e=new Uint8Array([...e,47]));return e}var l=new Uint32Array(256);for(let e=0;e<256;++e){let n=e;for(let e=0;e<8;++e)n=n>>>1^(1&n&&3988292384);l[e]=n}function y(e,n=0){n^=-1;for(var t=0,i=e.length;t<i;t++)n=n>>>8^l[255&n^e[t]];return(-1^n)>>>0}function w(e,n,t=0){const i=e.getSeconds()>>1|e.getMinutes()<<5|e.getHours()<<11,r=e.getDate()|e.getMonth()+1<<5|e.getFullYear()-1980<<9;n.setUint16(t,i,1),n.setUint16(t+2,r,1)}function B({o:e,l:n},t){return 8*(!n||(t??function(e){try{b.decode(e)}catch{return 0}return 1}(e)))}var b=new TextDecoder("utf8",{fatal:1});function p(t,i=0){const r=e(30);return r.setUint32(0,1347093252),r.setUint32(4,754976768|i),w(t.t,r,10),r.setUint16(26,t.o.length,1),n(r)}async function*g(e){let{i:n}=e;if("then"in n&&(n=await n),n instanceof Uint8Array)yield n,e.m=y(n,0),e.u=BigInt(n.length);else{e.u=0n;const t=n.getReader();for(;;){const{value:n,done:i}=await t.read();if(i)break;e.m=y(n,e.m),e.u+=BigInt(n.length),yield n}}}function I(t,r){const f=e(16+(r?8:0));return f.setUint32(0,1347094280),f.setUint32(4,t.isFile?t.m:0,1),r?(f.setBigUint64(8,t.u,1),f.setBigUint64(16,t.u,1)):(f.setUint32(8,i(t.u),1),f.setUint32(12,i(t.u),1)),n(f)}function v(t,r,f=0,o=0){const a=e(46);return a.setUint32(0,1347092738),a.setUint32(4,755182848),a.setUint16(8,2048|f),w(t.t,a,12),a.setUint32(16,t.isFile?t.m:0,1),a.setUint32(20,i(t.u),1),a.setUint32(24,i(t.u),1),a.setUint16(28,t.o.length,1),a.setUint16(30,o,1),a.setUint16(40,t.isFile?33204:16893,1),a.setUint32(42,i(r),1),n(a)}function h(t,i,r){const f=e(r);return f.setUint16(0,1,1),f.setUint16(2,r-4,1),16&r&&(f.setBigUint64(4,t.u,1),f.setBigUint64(12,t.u,1)),f.setBigUint64(r-8,i,1),n(f)}function D(e){return e instanceof File||e instanceof Response?[[e],[e]]:[[e.input,e.name,e.size],[e.input,e.lastModified]]}var S=e=>function(e){let n=BigInt(22),t=0n,i=0;for(const r of e){if(!r.o)throw new Error("Every file must have a non-empty name.");if(void 0===r.u)throw new Error(`Missing size for file "${(new TextDecoder).decode(r.o)}".`);const e=r.u>=0xffffffffn,f=t>=0xffffffffn;t+=BigInt(46+r.o.length+(e&&8))+r.u,n+=BigInt(r.o.length+46+(12*f|28*e)),i||(i=e)}return(i||t>=0xffffffffn)&&(n+=BigInt(76)),n+t}(function*(e){for(const n of e)yield s(...D(n)[0])}(e));function A(e,n={}){const t={"Content-Type":"application/zip","Content-Disposition":"attachment"};return("bigint"==typeof n.length||Number.isInteger(n.length))&&n.length>0&&(t["Content-Length"]=String(n.length)),n.metadata&&(t["Content-Length"]=String(S(n.metadata))),new Response(N(e,n),{headers:t})}function N(t,a={}){const u=function(e){const n=e[Symbol.iterator in e?Symbol.iterator:Symbol.asyncIterator]();return{async next(){const e=await n.next();if(e.done)return e;const[t,i]=D(e.value);return{done:0,value:Object.assign(f(...i),s(...t))}},throw:n.throw?.bind(n),[Symbol.asyncIterator](){return this}}}(t);return o(async function*(t,f){const o=[];let a=0n,s=0n,u=0;for await(const e of t){const n=B(e,f.buffersAreUTF8);yield p(e,n),yield new Uint8Array(e.o),e.isFile&&(yield*g(e));const t=e.u>=0xffffffffn,i=12*(a>=0xffffffffn)|28*t;yield I(e,t),o.push(v(e,a,n,i)),o.push(e.o),i&&o.push(h(e,a,i)),t&&(a+=8n),s++,a+=BigInt(46+e.o.length)+e.u,u||(u=t)}let d=0n;for(const e of o)yield e,d+=BigInt(e.length);if(u||a>=0xffffffffn){const t=e(76);t.setUint32(0,1347094022),t.setBigUint64(4,BigInt(44),1),t.setUint32(12,755182848),t.setBigUint64(24,s,1),t.setBigUint64(32,s,1),t.setBigUint64(40,d,1),t.setBigUint64(48,a,1),t.setUint32(56,1347094023),t.setBigUint64(64,a+d,1),t.setUint32(72,1,1),yield n(t)}const l=e(22);l.setUint32(0,1347093766),l.setUint16(8,r(s),1),l.setUint16(10,r(s),1),l.setUint32(12,i(d),1),l.setUint32(16,i(a),1),yield n(l)}(u,a),u)}
;// CONCATENATED MODULE: external ["wp","blob"]
const external_wp_blob_namespaceObject = window["wp"]["blob"];
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/download.js
diff --git a/wp-includes/js/dist/fields.min.js b/wp-includes/js/dist/fields.min.js
index 0b10627310..825ee09253 100644
--- a/wp-includes/js/dist/fields.min.js
+++ b/wp-includes/js/dist/fields.min.js
@@ -1,2 +1,2 @@
/*! This file is auto-generated */
-(()=>{"use strict";var e={d:(t,n)=>{for(var i in n)e.o(n,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:n[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{duplicatePattern:()=>q,duplicatePost:()=>M,duplicatePostNative:()=>L,exportPattern:()=>Ee,exportPatternNative:()=>De,orderField:()=>l,permanentlyDeletePost:()=>T,reorderPage:()=>P,reorderPageNative:()=>A,titleField:()=>s,viewPost:()=>f,viewPostRevisions:()=>z});const n=window.wp.i18n,i=window.wp.htmlEntities,r="wp_template",o="wp_template_part";function a(e){return"string"==typeof e.title?(0,i.decodeEntities)(e.title):"rendered"in e.title?(0,i.decodeEntities)(e.title.rendered):"raw"in e.title?(0,i.decodeEntities)(e.title.raw):""}const s={type:"text",id:"title",label:(0,n.__)("Title"),placeholder:(0,n.__)("No title"),getValue:({item:e})=>a(e)},l={type:"integer",id:"menu_order",label:(0,n.__)("Order"),description:(0,n.__)("Determines the order of pages.")},c=window.wp.primitives,d=window.ReactJSXRuntime,u=(0,d.jsx)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(c.Path,{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"})}),f={id:"view-post",label:(0,n._x)("View","verb"),isPrimary:!0,icon:u,isEligible:e=>"trash"!==e.status,callback(e,{onActionPerformed:t}){const n=e[0];window.open(n?.link,"_blank"),t&&t(e)}},p=window.wp.data,m=window.wp.coreData,g=window.wp.notices,h=window.wp.element;const w={sort:function(e,t,n){return"asc"===n?e-t:t-e},isValid:function(e,t){if(""===e)return!1;if(!Number.isInteger(Number(e)))return!1;if(t?.elements){const n=t?.elements.map((e=>e.value));if(!n.includes(Number(e)))return!1}return!0},Edit:"integer"};const y={sort:function(e,t,n){return"asc"===n?e.localeCompare(t):t.localeCompare(e)},isValid:function(e,t){if(t?.elements){const n=t?.elements?.map((e=>e.value));if(!n.includes(e))return!1}return!0},Edit:"text"};const _={sort:function(e,t,n){const i=new Date(e).getTime(),r=new Date(t).getTime();return"asc"===n?i-r:r-i},isValid:function(e,t){if(t?.elements){const n=t?.elements.map((e=>e.value));if(!n.includes(e))return!1}return!0},Edit:"datetime"};const b=window.wp.components;const v={datetime:function({data:e,field:t,onChange:n,hideLabelFromVision:i}){const{id:r,label:o}=t,a=t.getValue({item:e}),s=(0,h.useCallback)((e=>n({[r]:e})),[r,n]);return(0,d.jsxs)("fieldset",{className:"dataviews-controls__datetime",children:[!i&&(0,d.jsx)(b.BaseControl.VisualLabel,{as:"legend",children:o}),i&&(0,d.jsx)(b.VisuallyHidden,{as:"legend",children:o}),(0,d.jsx)(b.TimePicker,{currentTime:a,onChange:s,hideLabelFromVision:!0})]})},integer:function({data:e,field:t,onChange:n,hideLabelFromVision:i}){var r;const{id:o,label:a,description:s}=t,l=null!==(r=t.getValue({item:e}))&&void 0!==r?r:"",c=(0,h.useCallback)((e=>n({[o]:Number(e)})),[o,n]);return(0,d.jsx)(b.__experimentalNumberControl,{label:a,help:s,value:l,onChange:c,__next40pxDefaultSize:!0,hideLabelFromVision:i})},radio:function({data:e,field:t,onChange:n,hideLabelFromVision:i}){const{id:r,label:o}=t,a=t.getValue({item:e}),s=(0,h.useCallback)((e=>n({[r]:e})),[r,n]);return t.elements?(0,d.jsx)(b.RadioControl,{label:o,onChange:s,options:t.elements,selected:a,hideLabelFromVision:i}):null},select:function({data:e,field:t,onChange:i,hideLabelFromVision:r}){var o,a;const{id:s,label:l}=t,c=null!==(o=t.getValue({item:e}))&&void 0!==o?o:"",u=(0,h.useCallback)((e=>i({[s]:e})),[s,i]),f=[{label:(0,n.__)("Select item"),value:""},...null!==(a=t?.elements)&&void 0!==a?a:[]];return(0,d.jsx)(b.SelectControl,{label:l,value:c,options:f,onChange:u,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,hideLabelFromVision:r})},text:function({data:e,field:t,onChange:n,hideLabelFromVision:i}){const{id:r,label:o,placeholder:a}=t,s=t.getValue({item:e}),l=(0,h.useCallback)((e=>n({[r]:e})),[r,n]);return(0,d.jsx)(b.TextControl,{label:o,placeholder:a,value:null!=s?s:"",onChange:l,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,hideLabelFromVision:i})}};function x(e){if(Object.keys(v).includes(e))return v[e];throw"Control "+e+" not found"}function j(e){return e.map((e=>{var t,n,i,r;const o="integer"===(a=e.type)?w:"text"===a?y:"datetime"===a?_:{sort:(e,t,n)=>"number"==typeof e&&"number"==typeof t?"asc"===n?e-t:t-e:"asc"===n?e.localeCompare(t):t.localeCompare(e),isValid:(e,t)=>{if(t?.elements){const n=t?.elements?.map((e=>e.value));if(!n.includes(e))return!1}return!0},Edit:()=>null};var a;const s=e.getValue||(({item:t})=>t[e.id]),l=null!==(t=e.sort)&&void 0!==t?t:function(e,t,n){return o.sort(s({item:e}),s({item:t}),n)},c=null!==(n=e.isValid)&&void 0!==n?n:function(e,t){return o.isValid(s({item:e}),t)},d=function(e,t){return"function"==typeof e.Edit?e.Edit:"string"==typeof e.Edit?x(e.Edit):e.elements?x("select"):"string"==typeof t.Edit?x(t.Edit):t.Edit}(e,o),u=e.render||(e.elements?({item:t})=>{const n=s({item:t});return e?.elements?.find((e=>e.value===n))?.label||s({item:t})}:s);return{...e,label:e.label||e.id,header:e.header||e.label||e.id,getValue:s,render:u,sort:l,isValid:c,Edit:d,enableHiding:null===(i=e.enableHiding)||void 0===i||i,enableSorting:null===(r=e.enableSorting)||void 0===r||r}}))}function S(e,t,n){return j(t.filter((({id:e})=>!!n.fields?.includes(e)))).every((t=>t.isValid(e,{elements:t.elements})))}const B=(0,d.jsx)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(c.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 U({title:e,onClose:t}){return(0,d.jsx)(b.__experimentalVStack,{className:"dataforms-layouts-panel__dropdown-header",spacing:4,children:(0,d.jsxs)(b.__experimentalHStack,{alignment:"center",children:[(0,d.jsx)(b.__experimentalHeading,{level:2,size:13,children:e}),(0,d.jsx)(b.__experimentalSpacer,{}),t&&(0,d.jsx)(b.Button,{label:(0,n.__)("Close"),icon:B,onClick:t,size:"small"})]})})}function C({data:e,field:t,onChange:i}){const[r,o]=(0,h.useState)(null),a=(0,h.useMemo)((()=>({anchor:r,placement:"left-start",offset:36,shift:!0})),[r]);return(0,d.jsxs)(b.__experimentalHStack,{ref:o,className:"dataforms-layouts-panel__field",children:[(0,d.jsx)("div",{className:"dataforms-layouts-panel__field-label",children:t.label}),(0,d.jsx)("div",{children:(0,d.jsx)(b.Dropdown,{contentClassName:"dataforms-layouts-panel__field-dropdown",popoverProps:a,focusOnMount:!0,toggleProps:{size:"compact",variant:"tertiary",tooltipPosition:"middle left"},renderToggle:({isOpen:i,onToggle:r})=>(0,d.jsx)(b.Button,{className:"dataforms-layouts-panel__field-control",size:"compact",variant:"tertiary","aria-expanded":i,"aria-label":(0,n.sprintf)((0,n._x)("Edit %s","field"),t.label),onClick:r,children:(0,d.jsx)(t.render,{item:e})}),renderContent:({onClose:n})=>(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(U,{title:t.label,onClose:n}),(0,d.jsx)(t.Edit,{data:e,field:t,onChange:i,hideLabelFromVision:!0},t.id)]})})})]})}const V=[{type:"regular",component:function({data:e,fields:t,form:n,onChange:i}){const r=(0,h.useMemo)((()=>{var e;return j((null!==(e=n.fields)&&void 0!==e?e:[]).map((e=>t.find((({id:t})=>t===e)))).filter((e=>!!e)))}),[t,n.fields]);return(0,d.jsx)(b.__experimentalVStack,{spacing:4,children:r.map((t=>(0,d.jsx)(t.Edit,{data:e,field:t,onChange:i},t.id)))})}},{type:"panel",component:function({data:e,fields:t,form:n,onChange:i}){const r=(0,h.useMemo)((()=>{var e;return j((null!==(e=n.fields)&&void 0!==e?e:[]).map((e=>t.find((({id:t})=>t===e)))).filter((e=>!!e)))}),[t,n.fields]);return(0,d.jsx)(b.__experimentalVStack,{spacing:2,children:r.map((t=>(0,d.jsx)(C,{data:e,field:t,onChange:i},t.id)))})}}];function k({form:e,...t}){var n;const i=(r=null!==(n=e.type)&&void 0!==n?n:"regular",V.find((e=>e.type===r)));var r;return i?(0,d.jsx)(i.component,{form:e,...t}):null}const E=[l],D={fields:["menu_order"]};const P={id:"order-pages",label:(0,n.__)("Order"),isEligible:({status:e})=>"trash"!==e,RenderModal:function({items:e,closeModal:t,onActionPerformed:i}){const[r,o]=(0,h.useState)(e[0]),a=r.menu_order,{editEntityRecord:s,saveEditedEntityRecord:l}=(0,p.useDispatch)(m.store),{createSuccessNotice:c,createErrorNotice:u}=(0,p.useDispatch)(g.store),f=!S(r,E,D);return(0,d.jsx)("form",{onSubmit:async function(o){if(o.preventDefault(),S(r,E,D))try{await s("postType",r.type,r.id,{menu_order:a}),t?.(),await l("postType",r.type,r.id,{throwOnError:!0}),c((0,n.__)("Order updated."),{type:"snackbar"}),i?.(e)}catch(e){const t=e,i=t.message&&"unknown_error"!==t.code?t.message:(0,n.__)("An error occurred while updating the order");u(i,{type:"snackbar"})}},children:(0,d.jsxs)(b.__experimentalVStack,{spacing:"5",children:[(0,d.jsx)("div",{children:(0,n.__)("Determines the order of pages. Pages with the same order value are sorted alphabetically. Negative order values are supported.")}),(0,d.jsx)(k,{data:r,fields:E,form:D,onChange:e=>o({...r,...e})}),(0,d.jsxs)(b.__experimentalHStack,{justify:"right",children:[(0,d.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t?.()},children:(0,n.__)("Cancel")}),(0,d.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",accessibleWhenDisabled:!0,disabled:f,children:(0,n.__)("Save")})]})]})})}},A=undefined,N=[s],F={fields:["title"]},M={id:"duplicate-post",label:(0,n._x)("Duplicate","action label"),isEligible:({status:e})=>"trash"!==e,RenderModal:({items:e,closeModal:t,onActionPerformed:r})=>{const[o,s]=(0,h.useState)({...e[0],title:(0,n.sprintf)((0,n._x)("%s (Copy)","template"),a(e[0]))}),[l,c]=(0,h.useState)(!1),{saveEntityRecord:u}=(0,p.useDispatch)(m.store),{createSuccessNotice:f,createErrorNotice:w}=(0,p.useDispatch)(g.store);return(0,d.jsx)("form",{onSubmit:async function(e){if(e.preventDefault(),l)return;const a={status:"draft",title:o.title,slug:o.title||(0,n.__)("No title"),comment_status:o.comment_status,content:"string"==typeof o.content?o.content:o.content.raw,excerpt:"string"==typeof o.excerpt?o.excerpt:o.excerpt?.raw,meta:o.meta,parent:o.parent,password:o.password,template:o.template,format:o.format,featured_media:o.featured_media,menu_order:o.menu_order,ping_status:o.ping_status},s="wp:action-assign-";Object.keys(o?._links||{}).filter((e=>e.startsWith(s))).map((e=>e.slice(17))).forEach((e=>{o.hasOwnProperty(e)&&(a[e]=o[e])})),c(!0);try{const e=await u("postType",o.type,a,{throwOnError:!0});f((0,n.sprintf)((0,n.__)('"%s" successfully created.'),(0,i.decodeEntities)(e.title?.rendered||o.title)),{id:"duplicate-post-action",type:"snackbar"}),r&&r([e])}catch(e){const t=e,i=t.message&&"unknown_error"!==t.code?t.message:(0,n.__)("An error occurred while duplicating the page.");w(i,{type:"snackbar"})}finally{c(!1),t?.()}},children:(0,d.jsxs)(b.__experimentalVStack,{spacing:3,children:[(0,d.jsx)(k,{data:o,fields:N,form:F,onChange:e=>s((t=>({...t,...e})))}),(0,d.jsxs)(b.__experimentalHStack,{spacing:2,justify:"end",children:[(0,d.jsx)(b.Button,{variant:"tertiary",onClick:t,__next40pxDefaultSize:!0,children:(0,n.__)("Cancel")}),(0,d.jsx)(b.Button,{variant:"primary",type:"submit",isBusy:l,"aria-disabled":l,__next40pxDefaultSize:!0,children:(0,n._x)("Duplicate","action label")})]})]})})}},L=undefined,O=window.wp.url,z={id:"view-post-revisions",context:"list",label(e){var t;const i=null!==(t=e[0]._links?.["version-history"]?.[0]?.count)&&void 0!==t?t:0;return(0,n.sprintf)((0,n.__)("View revisions (%s)"),i)},isEligible(e){var t,n;if("trash"===e.status)return!1;const i=null!==(t=e?._links?.["predecessor-version"]?.[0]?.id)&&void 0!==t?t:null,r=null!==(n=e?._links?.["version-history"]?.[0]?.count)&&void 0!==n?n:0;return!!i&&r>1},callback(e,{onActionPerformed:t}){const n=e[0],i=(0,O.addQueryArgs)("revision.php",{revision:n?._links?.["predecessor-version"]?.[0]?.id});document.location.href=i,t&&t(e)}},I=(0,d.jsx)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(c.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z"})}),R={id:"permanently-delete",label:(0,n.__)("Permanently delete"),supportsBulk:!0,icon:I,isEligible(e){if(function(e){return e.type===r||e.type===o}(e)||"wp_block"===e.type)return!1;const{status:t,permissions:n}=e;return"trash"===t&&n?.delete},async callback(e,{registry:t,onActionPerformed:i}){const{createSuccessNotice:r,createErrorNotice:o}=t.dispatch(g.store),{deleteEntityRecord:s}=t.dispatch(m.store),l=await Promise.allSettled(e.map((e=>s("postType",e.type,e.id,{force:!0},{throwOnError:!0}))));if(l.every((({status:e})=>"fulfilled"===e))){let t;t=1===l.length?(0,n.sprintf)((0,n.__)('"%s" permanently deleted.'),a(e[0])):(0,n.__)("The items were permanently deleted."),r(t,{type:"snackbar",id:"permanently-delete-post-action"}),i?.(e)}else{let e;if(1===l.length){const t=l[0];e=t.reason?.message?t.reason.message:(0,n.__)("An error occurred while permanently deleting the item.")}else{const t=new Set,i=l.filter((({status:e})=>"rejected"===e));for(const e of i){const n=e;n.reason?.message&&t.add(n.reason.message)}e=0===t.size?(0,n.__)("An error occurred while permanently deleting the items."):1===t.size?(0,n.sprintf)((0,n.__)("An error occurred while permanently deleting the items: %s"),[...t][0]):(0,n.sprintf)((0,n.__)("Some errors occurred while permanently deleting the items: %s"),[...t].join(","))}o(e,{type:"snackbar"})}}},T=R,H=window.wp.patterns,Z=window.wp.privateApis,{lock:$,unlock:G}=(0,Z.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/fields"),{CreatePatternModalContents:J,useDuplicatePatternProps:W}=G(H.privateApis),q={id:"duplicate-pattern",label:(0,n._x)("Duplicate","action label"),isEligible:e=>"wp_template_part"!==e.type,modalHeader:(0,n._x)("Duplicate pattern","action label"),RenderModal:({items:e,closeModal:t})=>{const[i]=e,r=W({pattern:i,onSuccess:()=>t?.()});return(0,d.jsx)(J,{onClose:t,confirmLabel:(0,n._x)("Duplicate","action label"),...r})}};var Q=function(){return Q=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},Q.apply(this,arguments)};Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError;function X(e){return e.toLowerCase()}var Y=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],K=/[^A-Z0-9]+/gi;function ee(e,t,n){return t instanceof RegExp?e.replace(t,n):t.reduce((function(e,t){return e.replace(t,n)}),e)}function te(e,t){return void 0===t&&(t={}),function(e,t){void 0===t&&(t={});for(var n=t.splitRegexp,i=void 0===n?Y:n,r=t.stripRegexp,o=void 0===r?K:r,a=t.transform,s=void 0===a?X:a,l=t.delimiter,c=void 0===l?" ":l,d=ee(ee(e,i,"$1\0$2"),o,"\0"),u=0,f=d.length;"\0"===d.charAt(u);)u++;for(;"\0"===d.charAt(f-1);)f--;return d.slice(u,f).split("\0").map(s).join(c)}(e,Q({delimiter:"."},t))}function ne(e,t){return void 0===t&&(t={}),te(e,Q({delimiter:"-"},t))}"stream"in Blob.prototype||Object.defineProperty(Blob.prototype,"stream",{value(){return new Response(this).body}}),"setBigUint64"in DataView.prototype||Object.defineProperty(DataView.prototype,"setBigUint64",{value(e,t,n){const i=Number(0xffffffffn&t),r=Number(t>>32n);this.setUint32(e+(n?0:4),i,n),this.setUint32(e+(n?4:0),r,n)}});var ie=e=>new DataView(new ArrayBuffer(e)),re=e=>new Uint8Array(e.buffer||e),oe=e=>(new TextEncoder).encode(String(e)),ae=e=>Math.min(4294967295,Number(e)),se=e=>Math.min(65535,Number(e));function le(e,t){if(void 0===t||t instanceof Date||(t=new Date(t)),e instanceof File)return{isFile:1,t:t||new Date(e.lastModified),i:e.stream()};if(e instanceof Response)return{isFile:1,t:t||new Date(e.headers.get("Last-Modified")||Date.now()),i:e.body};if(void 0===t)t=new Date;else if(isNaN(t))throw new Error("Invalid modification date.");if(void 0===e)return{isFile:0,t};if("string"==typeof e)return{isFile:1,t,i:oe(e)};if(e instanceof Blob)return{isFile:1,t,i:e.stream()};if(e instanceof Uint8Array||e instanceof ReadableStream)return{isFile:1,t,i:e};if(e instanceof ArrayBuffer||ArrayBuffer.isView(e))return{isFile:1,t,i:re(e)};if(Symbol.asyncIterator in e)return{isFile:1,t,i:ce(e[Symbol.asyncIterator]())};throw new TypeError("Unsupported input format.")}function ce(e,t=e){return new ReadableStream({async pull(t){let n=0;for(;t.desiredSize>n;){const i=await e.next();if(!i.value){t.close();break}{const e=de(i.value);t.enqueue(e),n+=e.byteLength}}},cancel(e){t.throw?.(e)}})}function de(e){return"string"==typeof e?oe(e):e instanceof Uint8Array?e:re(e)}function ue(e,t,n){let[i,r]=function(e){return e?e instanceof Uint8Array?[e,1]:ArrayBuffer.isView(e)||e instanceof ArrayBuffer?[re(e),1]:[oe(e),0]:[void 0,0]}(t);if(e instanceof File)return{o:pe(i||oe(e.name)),u:BigInt(e.size),l:r};if(e instanceof Response){const t=e.headers.get("content-disposition"),o=t&&t.match(/;\s*filename\*?=["']?(.*?)["']?$/i),a=o&&o[1]||e.url&&new URL(e.url).pathname.split("/").findLast(Boolean),s=a&&decodeURIComponent(a),l=n||+e.headers.get("content-length");return{o:pe(i||oe(s)),u:BigInt(l),l:r}}return i=pe(i,void 0!==e||void 0!==n),"string"==typeof e?{o:i,u:BigInt(oe(e).length),l:r}:e instanceof Blob?{o:i,u:BigInt(e.size),l:r}:e instanceof ArrayBuffer||ArrayBuffer.isView(e)?{o:i,u:BigInt(e.byteLength),l:r}:{o:i,u:fe(e,n),l:r}}function fe(e,t){return t>-1?BigInt(t):e?void 0:0n}function pe(e,t=1){if(!e||e.every((e=>47===e)))throw new Error("The file must have a name.");if(t)for(;47===e[e.length-1];)e=e.subarray(0,-1);else 47!==e[e.length-1]&&(e=new Uint8Array([...e,47]));return e}var me=new Uint32Array(256);for(let e=0;e<256;++e){let t=e;for(let e=0;e<8;++e)t=t>>>1^(1&t&&3988292384);me[e]=t}function ge(e,t=0){t^=-1;for(var n=0,i=e.length;n<i;n++)t=t>>>8^me[255&t^e[n]];return(-1^t)>>>0}function he(e,t,n=0){const i=e.getSeconds()>>1|e.getMinutes()<<5|e.getHours()<<11,r=e.getDate()|e.getMonth()+1<<5|e.getFullYear()-1980<<9;t.setUint16(n,i,1),t.setUint16(n+2,r,1)}function we({o:e,l:t},n){return 8*(!t||(n??function(e){try{ye.decode(e)}catch{return 0}return 1}(e)))}var ye=new TextDecoder("utf8",{fatal:1});function _e(e,t=0){const n=ie(30);return n.setUint32(0,1347093252),n.setUint32(4,754976768|t),he(e.t,n,10),n.setUint16(26,e.o.length,1),re(n)}async function*be(e){let{i:t}=e;if("then"in t&&(t=await t),t instanceof Uint8Array)yield t,e.m=ge(t,0),e.u=BigInt(t.length);else{e.u=0n;const n=t.getReader();for(;;){const{value:t,done:i}=await n.read();if(i)break;e.m=ge(t,e.m),e.u+=BigInt(t.length),yield t}}}function ve(e,t){const n=ie(16+(t?8:0));return n.setUint32(0,1347094280),n.setUint32(4,e.isFile?e.m:0,1),t?(n.setBigUint64(8,e.u,1),n.setBigUint64(16,e.u,1)):(n.setUint32(8,ae(e.u),1),n.setUint32(12,ae(e.u),1)),re(n)}function xe(e,t,n=0,i=0){const r=ie(46);return r.setUint32(0,1347092738),r.setUint32(4,755182848),r.setUint16(8,2048|n),he(e.t,r,12),r.setUint32(16,e.isFile?e.m:0,1),r.setUint32(20,ae(e.u),1),r.setUint32(24,ae(e.u),1),r.setUint16(28,e.o.length,1),r.setUint16(30,i,1),r.setUint16(40,e.isFile?33204:16893,1),r.setUint32(42,ae(t),1),re(r)}function je(e,t,n){const i=ie(n);return i.setUint16(0,1,1),i.setUint16(2,n-4,1),16&n&&(i.setBigUint64(4,e.u,1),i.setBigUint64(12,e.u,1)),i.setBigUint64(n-8,t,1),re(i)}function Se(e){return e instanceof File||e instanceof Response?[[e],[e]]:[[e.input,e.name,e.size],[e.input,e.lastModified]]}function Be(e,t={}){const n={"Content-Type":"application/zip","Content-Disposition":"attachment"};return("bigint"==typeof t.length||Number.isInteger(t.length))&&t.length>0&&(n["Content-Length"]=String(t.length)),t.metadata&&(n["Content-Length"]=String((e=>function(e){let t=BigInt(22),n=0n,i=0;for(const r of e){if(!r.o)throw new Error("Every file must have a non-empty name.");if(void 0===r.u)throw new Error(`Missing size for file "${(new TextDecoder).decode(r.o)}".`);const e=r.u>=0xffffffffn,o=n>=0xffffffffn;n+=BigInt(46+r.o.length+(e&&8))+r.u,t+=BigInt(r.o.length+46+(12*o|28*e)),i||(i=e)}return(i||n>=0xffffffffn)&&(t+=BigInt(76)),t+n}(function*(e){for(const t of e)yield ue(...Se(t)[0])}(e)))(t.metadata))),new Response(Ue(e,t),{headers:n})}function Ue(e,t={}){const n=function(e){const t=e[Symbol.iterator in e?Symbol.iterator:Symbol.asyncIterator]();return{async next(){const e=await t.next();if(e.done)return e;const[n,i]=Se(e.value);return{done:0,value:Object.assign(le(...i),ue(...n))}},throw:t.throw?.bind(t),[Symbol.asyncIterator](){return this}}}(e);return ce(async function*(e,t){const n=[];let i=0n,r=0n,o=0;for await(const a of e){const e=we(a,t.buffersAreUTF8);yield _e(a,e),yield new Uint8Array(a.o),a.isFile&&(yield*be(a));const s=a.u>=0xffffffffn,l=12*(i>=0xffffffffn)|28*s;yield ve(a,s),n.push(xe(a,i,e,l)),n.push(a.o),l&&n.push(je(a,i,l)),s&&(i+=8n),r++,i+=BigInt(46+a.o.length)+a.u,o||(o=s)}let a=0n;for(const e of n)yield e,a+=BigInt(e.length);if(o||i>=0xffffffffn){const e=ie(76);e.setUint32(0,1347094022),e.setBigUint64(4,BigInt(44),1),e.setUint32(12,755182848),e.setBigUint64(24,r,1),e.setBigUint64(32,r,1),e.setBigUint64(40,a,1),e.setBigUint64(48,i,1),e.setUint32(56,1347094023),e.setBigUint64(64,i+a,1),e.setUint32(72,1,1),yield re(e)}const s=ie(22);s.setUint32(0,1347093766),s.setUint16(8,se(r),1),s.setUint16(10,se(r),1),s.setUint32(12,ae(a),1),s.setUint32(16,ae(i),1),yield re(s)}(n,t),n)}const Ce=window.wp.blob,Ve=(0,d.jsx)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(c.Path,{d:"M18 11.3l-1-1.1-4 4V3h-1.5v11.3L7 10.2l-1 1.1 6.2 5.8 5.8-5.8zm.5 3.7v3.5h-13V15H4v5h16v-5h-1.5z"})});function ke(e){return JSON.stringify({__file:e.type,title:a(e),content:"string"==typeof e.content?e.content:e.content?.raw,syncStatus:e.wp_pattern_sync_status},null,2)}const Ee={id:"export-pattern",label:(0,n.__)("Export as JSON"),icon:Ve,supportsBulk:!0,isEligible:e=>"wp_block"===e.type,callback:async e=>{if(1===e.length)return(0,Ce.downloadBlob)(`${ne(a(e[0])||e[0].slug)}.json`,ke(e[0]),"application/json");const t={},i=e.map((e=>{const n=ne(a(e)||e.slug);return t[n]=(t[n]||0)+1,{name:n+(t[n]>1?"-"+(t[n]-1):"")+".json",lastModified:new Date,input:ke(e)}}));return(0,Ce.downloadBlob)((0,n.__)("patterns-export")+".zip",await Be(i).blob(),"application/zip")}},De=undefined;(window.wp=window.wp||{}).fields=t})();
\ No newline at end of file
+(()=>{"use strict";var e={d:(t,n)=>{for(var i in n)e.o(n,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:n[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{duplicatePattern:()=>q,duplicatePost:()=>M,duplicatePostNative:()=>L,exportPattern:()=>Ee,exportPatternNative:()=>De,orderField:()=>l,permanentlyDeletePost:()=>T,reorderPage:()=>P,reorderPageNative:()=>A,titleField:()=>s,viewPost:()=>f,viewPostRevisions:()=>z});const n=window.wp.i18n,i=window.wp.htmlEntities,r="wp_template",o="wp_template_part";function a(e){return"string"==typeof e.title?(0,i.decodeEntities)(e.title):"rendered"in e.title?(0,i.decodeEntities)(e.title.rendered):"raw"in e.title?(0,i.decodeEntities)(e.title.raw):""}const s={type:"text",id:"title",label:(0,n.__)("Title"),placeholder:(0,n.__)("No title"),getValue:({item:e})=>a(e)},l={type:"integer",id:"menu_order",label:(0,n.__)("Order"),description:(0,n.__)("Determines the order of pages.")},c=window.wp.primitives,d=window.ReactJSXRuntime,u=(0,d.jsx)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(c.Path,{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"})}),f={id:"view-post",label:(0,n._x)("View","verb"),isPrimary:!0,icon:u,isEligible:e=>"trash"!==e.status,callback(e,{onActionPerformed:t}){const n=e[0];window.open(n?.link,"_blank"),t&&t(e)}},p=window.wp.data,m=window.wp.coreData,g=window.wp.notices,h=window.wp.element;const w={sort:function(e,t,n){return"asc"===n?e-t:t-e},isValid:function(e,t){if(""===e)return!1;if(!Number.isInteger(Number(e)))return!1;if(t?.elements){const n=t?.elements.map((e=>e.value));if(!n.includes(Number(e)))return!1}return!0},Edit:"integer"};const y={sort:function(e,t,n){return"asc"===n?e.localeCompare(t):t.localeCompare(e)},isValid:function(e,t){if(t?.elements){const n=t?.elements?.map((e=>e.value));if(!n.includes(e))return!1}return!0},Edit:"text"};const _={sort:function(e,t,n){const i=new Date(e).getTime(),r=new Date(t).getTime();return"asc"===n?i-r:r-i},isValid:function(e,t){if(t?.elements){const n=t?.elements.map((e=>e.value));if(!n.includes(e))return!1}return!0},Edit:"datetime"};const b=window.wp.components;const v={datetime:function({data:e,field:t,onChange:n,hideLabelFromVision:i}){const{id:r,label:o}=t,a=t.getValue({item:e}),s=(0,h.useCallback)((e=>n({[r]:e})),[r,n]);return(0,d.jsxs)("fieldset",{className:"dataviews-controls__datetime",children:[!i&&(0,d.jsx)(b.BaseControl.VisualLabel,{as:"legend",children:o}),i&&(0,d.jsx)(b.VisuallyHidden,{as:"legend",children:o}),(0,d.jsx)(b.TimePicker,{currentTime:a,onChange:s,hideLabelFromVision:!0})]})},integer:function({data:e,field:t,onChange:n,hideLabelFromVision:i}){var r;const{id:o,label:a,description:s}=t,l=null!==(r=t.getValue({item:e}))&&void 0!==r?r:"",c=(0,h.useCallback)((e=>n({[o]:Number(e)})),[o,n]);return(0,d.jsx)(b.__experimentalNumberControl,{label:a,help:s,value:l,onChange:c,__next40pxDefaultSize:!0,hideLabelFromVision:i})},radio:function({data:e,field:t,onChange:n,hideLabelFromVision:i}){const{id:r,label:o}=t,a=t.getValue({item:e}),s=(0,h.useCallback)((e=>n({[r]:e})),[r,n]);return t.elements?(0,d.jsx)(b.RadioControl,{label:o,onChange:s,options:t.elements,selected:a,hideLabelFromVision:i}):null},select:function({data:e,field:t,onChange:i,hideLabelFromVision:r}){var o,a;const{id:s,label:l}=t,c=null!==(o=t.getValue({item:e}))&&void 0!==o?o:"",u=(0,h.useCallback)((e=>i({[s]:e})),[s,i]),f=[{label:(0,n.__)("Select item"),value:""},...null!==(a=t?.elements)&&void 0!==a?a:[]];return(0,d.jsx)(b.SelectControl,{label:l,value:c,options:f,onChange:u,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,hideLabelFromVision:r})},text:function({data:e,field:t,onChange:n,hideLabelFromVision:i}){const{id:r,label:o,placeholder:a}=t,s=t.getValue({item:e}),l=(0,h.useCallback)((e=>n({[r]:e})),[r,n]);return(0,d.jsx)(b.TextControl,{label:o,placeholder:a,value:null!=s?s:"",onChange:l,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,hideLabelFromVision:i})}};function x(e){if(Object.keys(v).includes(e))return v[e];throw"Control "+e+" not found"}function j(e){return e.map((e=>{var t,n,i,r;const o="integer"===(a=e.type)?w:"text"===a?y:"datetime"===a?_:{sort:(e,t,n)=>"number"==typeof e&&"number"==typeof t?"asc"===n?e-t:t-e:"asc"===n?e.localeCompare(t):t.localeCompare(e),isValid:(e,t)=>{if(t?.elements){const n=t?.elements?.map((e=>e.value));if(!n.includes(e))return!1}return!0},Edit:()=>null};var a;const s=e.getValue||(({item:t})=>t[e.id]),l=null!==(t=e.sort)&&void 0!==t?t:function(e,t,n){return o.sort(s({item:e}),s({item:t}),n)},c=null!==(n=e.isValid)&&void 0!==n?n:function(e,t){return o.isValid(s({item:e}),t)},d=function(e,t){return"function"==typeof e.Edit?e.Edit:"string"==typeof e.Edit?x(e.Edit):e.elements?x("select"):"string"==typeof t.Edit?x(t.Edit):t.Edit}(e,o),u=e.render||(e.elements?({item:t})=>{const n=s({item:t});return e?.elements?.find((e=>e.value===n))?.label||s({item:t})}:s);return{...e,label:e.label||e.id,header:e.header||e.label||e.id,getValue:s,render:u,sort:l,isValid:c,Edit:d,enableHiding:null===(i=e.enableHiding)||void 0===i||i,enableSorting:null===(r=e.enableSorting)||void 0===r||r}}))}function S(e,t,n){return j(t.filter((({id:e})=>!!n.fields?.includes(e)))).every((t=>t.isValid(e,{elements:t.elements})))}const U=(0,d.jsx)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(c.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 B({title:e,onClose:t}){return(0,d.jsx)(b.__experimentalVStack,{className:"dataforms-layouts-panel__dropdown-header",spacing:4,children:(0,d.jsxs)(b.__experimentalHStack,{alignment:"center",children:[(0,d.jsx)(b.__experimentalHeading,{level:2,size:13,children:e}),(0,d.jsx)(b.__experimentalSpacer,{}),t&&(0,d.jsx)(b.Button,{label:(0,n.__)("Close"),icon:U,onClick:t,size:"small"})]})})}function C({data:e,field:t,onChange:i}){const[r,o]=(0,h.useState)(null),a=(0,h.useMemo)((()=>({anchor:r,placement:"left-start",offset:36,shift:!0})),[r]);return(0,d.jsxs)(b.__experimentalHStack,{ref:o,className:"dataforms-layouts-panel__field",children:[(0,d.jsx)("div",{className:"dataforms-layouts-panel__field-label",children:t.label}),(0,d.jsx)("div",{children:(0,d.jsx)(b.Dropdown,{contentClassName:"dataforms-layouts-panel__field-dropdown",popoverProps:a,focusOnMount:!0,toggleProps:{size:"compact",variant:"tertiary",tooltipPosition:"middle left"},renderToggle:({isOpen:i,onToggle:r})=>(0,d.jsx)(b.Button,{className:"dataforms-layouts-panel__field-control",size:"compact",variant:"tertiary","aria-expanded":i,"aria-label":(0,n.sprintf)((0,n._x)("Edit %s","field"),t.label),onClick:r,children:(0,d.jsx)(t.render,{item:e})}),renderContent:({onClose:n})=>(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(B,{title:t.label,onClose:n}),(0,d.jsx)(t.Edit,{data:e,field:t,onChange:i,hideLabelFromVision:!0},t.id)]})})})]})}const V=[{type:"regular",component:function({data:e,fields:t,form:n,onChange:i}){const r=(0,h.useMemo)((()=>{var e;return j((null!==(e=n.fields)&&void 0!==e?e:[]).map((e=>t.find((({id:t})=>t===e)))).filter((e=>!!e)))}),[t,n.fields]);return(0,d.jsx)(b.__experimentalVStack,{spacing:4,children:r.map((t=>(0,d.jsx)(t.Edit,{data:e,field:t,onChange:i},t.id)))})}},{type:"panel",component:function({data:e,fields:t,form:n,onChange:i}){const r=(0,h.useMemo)((()=>{var e;return j((null!==(e=n.fields)&&void 0!==e?e:[]).map((e=>t.find((({id:t})=>t===e)))).filter((e=>!!e)))}),[t,n.fields]);return(0,d.jsx)(b.__experimentalVStack,{spacing:2,children:r.map((t=>(0,d.jsx)(C,{data:e,field:t,onChange:i},t.id)))})}}];function k({form:e,...t}){var n;const i=(r=null!==(n=e.type)&&void 0!==n?n:"regular",V.find((e=>e.type===r)));var r;return i?(0,d.jsx)(i.component,{form:e,...t}):null}const E=[l],D={fields:["menu_order"]};const P={id:"order-pages",label:(0,n.__)("Order"),isEligible:({status:e})=>"trash"!==e,RenderModal:function({items:e,closeModal:t,onActionPerformed:i}){const[r,o]=(0,h.useState)(e[0]),a=r.menu_order,{editEntityRecord:s,saveEditedEntityRecord:l}=(0,p.useDispatch)(m.store),{createSuccessNotice:c,createErrorNotice:u}=(0,p.useDispatch)(g.store),f=!S(r,E,D);return(0,d.jsx)("form",{onSubmit:async function(o){if(o.preventDefault(),S(r,E,D))try{await s("postType",r.type,r.id,{menu_order:a}),t?.(),await l("postType",r.type,r.id,{throwOnError:!0}),c((0,n.__)("Order updated."),{type:"snackbar"}),i?.(e)}catch(e){const t=e,i=t.message&&"unknown_error"!==t.code?t.message:(0,n.__)("An error occurred while updating the order");u(i,{type:"snackbar"})}},children:(0,d.jsxs)(b.__experimentalVStack,{spacing:"5",children:[(0,d.jsx)("div",{children:(0,n.__)("Determines the order of pages. Pages with the same order value are sorted alphabetically. Negative order values are supported.")}),(0,d.jsx)(k,{data:r,fields:E,form:D,onChange:e=>o({...r,...e})}),(0,d.jsxs)(b.__experimentalHStack,{justify:"right",children:[(0,d.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t?.()},children:(0,n.__)("Cancel")}),(0,d.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",accessibleWhenDisabled:!0,disabled:f,children:(0,n.__)("Save")})]})]})})}},A=undefined,N=[s],F={fields:["title"]},M={id:"duplicate-post",label:(0,n._x)("Duplicate","action label"),isEligible:({status:e})=>"trash"!==e,RenderModal:({items:e,closeModal:t,onActionPerformed:r})=>{const[o,s]=(0,h.useState)({...e[0],title:(0,n.sprintf)((0,n._x)("%s (Copy)","template"),a(e[0]))}),[l,c]=(0,h.useState)(!1),{saveEntityRecord:u}=(0,p.useDispatch)(m.store),{createSuccessNotice:f,createErrorNotice:w}=(0,p.useDispatch)(g.store);return(0,d.jsx)("form",{onSubmit:async function(e){if(e.preventDefault(),l)return;const a={status:"draft",title:o.title,slug:o.title||(0,n.__)("No title"),comment_status:o.comment_status,content:"string"==typeof o.content?o.content:o.content.raw,excerpt:"string"==typeof o.excerpt?o.excerpt:o.excerpt?.raw,meta:o.meta,parent:o.parent,password:o.password,template:o.template,format:o.format,featured_media:o.featured_media,menu_order:o.menu_order,ping_status:o.ping_status},s="wp:action-assign-";Object.keys(o?._links||{}).filter((e=>e.startsWith(s))).map((e=>e.slice(17))).forEach((e=>{o.hasOwnProperty(e)&&(a[e]=o[e])})),c(!0);try{const e=await u("postType",o.type,a,{throwOnError:!0});f((0,n.sprintf)((0,n.__)('"%s" successfully created.'),(0,i.decodeEntities)(e.title?.rendered||o.title)),{id:"duplicate-post-action",type:"snackbar"}),r&&r([e])}catch(e){const t=e,i=t.message&&"unknown_error"!==t.code?t.message:(0,n.__)("An error occurred while duplicating the page.");w(i,{type:"snackbar"})}finally{c(!1),t?.()}},children:(0,d.jsxs)(b.__experimentalVStack,{spacing:3,children:[(0,d.jsx)(k,{data:o,fields:N,form:F,onChange:e=>s((t=>({...t,...e})))}),(0,d.jsxs)(b.__experimentalHStack,{spacing:2,justify:"end",children:[(0,d.jsx)(b.Button,{variant:"tertiary",onClick:t,__next40pxDefaultSize:!0,children:(0,n.__)("Cancel")}),(0,d.jsx)(b.Button,{variant:"primary",type:"submit",isBusy:l,"aria-disabled":l,__next40pxDefaultSize:!0,children:(0,n._x)("Duplicate","action label")})]})]})})}},L=undefined,O=window.wp.url,z={id:"view-post-revisions",context:"list",label(e){var t;const i=null!==(t=e[0]._links?.["version-history"]?.[0]?.count)&&void 0!==t?t:0;return(0,n.sprintf)((0,n.__)("View revisions (%s)"),i)},isEligible(e){var t,n;if("trash"===e.status)return!1;const i=null!==(t=e?._links?.["predecessor-version"]?.[0]?.id)&&void 0!==t?t:null,r=null!==(n=e?._links?.["version-history"]?.[0]?.count)&&void 0!==n?n:0;return!!i&&r>1},callback(e,{onActionPerformed:t}){const n=e[0],i=(0,O.addQueryArgs)("revision.php",{revision:n?._links?.["predecessor-version"]?.[0]?.id});document.location.href=i,t&&t(e)}},I=(0,d.jsx)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(c.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z"})}),R={id:"permanently-delete",label:(0,n.__)("Permanently delete"),supportsBulk:!0,icon:I,isEligible(e){if(function(e){return e.type===r||e.type===o}(e)||"wp_block"===e.type)return!1;const{status:t,permissions:n}=e;return"trash"===t&&n?.delete},async callback(e,{registry:t,onActionPerformed:i}){const{createSuccessNotice:r,createErrorNotice:o}=t.dispatch(g.store),{deleteEntityRecord:s}=t.dispatch(m.store),l=await Promise.allSettled(e.map((e=>s("postType",e.type,e.id,{force:!0},{throwOnError:!0}))));if(l.every((({status:e})=>"fulfilled"===e))){let t;t=1===l.length?(0,n.sprintf)((0,n.__)('"%s" permanently deleted.'),a(e[0])):(0,n.__)("The items were permanently deleted."),r(t,{type:"snackbar",id:"permanently-delete-post-action"}),i?.(e)}else{let e;if(1===l.length){const t=l[0];e=t.reason?.message?t.reason.message:(0,n.__)("An error occurred while permanently deleting the item.")}else{const t=new Set,i=l.filter((({status:e})=>"rejected"===e));for(const e of i){const n=e;n.reason?.message&&t.add(n.reason.message)}e=0===t.size?(0,n.__)("An error occurred while permanently deleting the items."):1===t.size?(0,n.sprintf)((0,n.__)("An error occurred while permanently deleting the items: %s"),[...t][0]):(0,n.sprintf)((0,n.__)("Some errors occurred while permanently deleting the items: %s"),[...t].join(","))}o(e,{type:"snackbar"})}}},T=R,H=window.wp.patterns,Z=window.wp.privateApis,{lock:$,unlock:G}=(0,Z.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/fields"),{CreatePatternModalContents:J,useDuplicatePatternProps:W}=G(H.privateApis),q={id:"duplicate-pattern",label:(0,n._x)("Duplicate","action label"),isEligible:e=>"wp_template_part"!==e.type,modalHeader:(0,n._x)("Duplicate pattern","action label"),RenderModal:({items:e,closeModal:t})=>{const[i]=e,r=W({pattern:i,onSuccess:()=>t?.()});return(0,d.jsx)(J,{onClose:t,confirmLabel:(0,n._x)("Duplicate","action label"),...r})}};var Q=function(){return Q=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},Q.apply(this,arguments)};Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError;function X(e){return e.toLowerCase()}var Y=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],K=/[^A-Z0-9]+/gi;function ee(e,t,n){return t instanceof RegExp?e.replace(t,n):t.reduce((function(e,t){return e.replace(t,n)}),e)}function te(e,t){return void 0===t&&(t={}),function(e,t){void 0===t&&(t={});for(var n=t.splitRegexp,i=void 0===n?Y:n,r=t.stripRegexp,o=void 0===r?K:r,a=t.transform,s=void 0===a?X:a,l=t.delimiter,c=void 0===l?" ":l,d=ee(ee(e,i,"$1\0$2"),o,"\0"),u=0,f=d.length;"\0"===d.charAt(u);)u++;for(;"\0"===d.charAt(f-1);)f--;return d.slice(u,f).split("\0").map(s).join(c)}(e,Q({delimiter:"."},t))}function ne(e,t){return void 0===t&&(t={}),te(e,Q({delimiter:"-"},t))}"stream"in Blob.prototype||Object.defineProperty(Blob.prototype,"stream",{value(){return new Response(this).body}}),"setBigUint64"in DataView.prototype||Object.defineProperty(DataView.prototype,"setBigUint64",{value(e,t,n){const i=Number(0xffffffffn&t),r=Number(t>>32n);this.setUint32(e+(n?0:4),i,n),this.setUint32(e+(n?4:0),r,n)}});var ie=e=>new DataView(new ArrayBuffer(e)),re=e=>new Uint8Array(e.buffer||e),oe=e=>(new TextEncoder).encode(String(e)),ae=e=>Math.min(4294967295,Number(e)),se=e=>Math.min(65535,Number(e));function le(e,t){if(void 0===t||t instanceof Date||(t=new Date(t)),e instanceof File)return{isFile:1,t:t||new Date(e.lastModified),i:e.stream()};if(e instanceof Response)return{isFile:1,t:t||new Date(e.headers.get("Last-Modified")||Date.now()),i:e.body};if(void 0===t)t=new Date;else if(isNaN(t))throw new Error("Invalid modification date.");if(void 0===e)return{isFile:0,t};if("string"==typeof e)return{isFile:1,t,i:oe(e)};if(e instanceof Blob)return{isFile:1,t,i:e.stream()};if(e instanceof Uint8Array||e instanceof ReadableStream)return{isFile:1,t,i:e};if(e instanceof ArrayBuffer||ArrayBuffer.isView(e))return{isFile:1,t,i:re(e)};if(Symbol.asyncIterator in e)return{isFile:1,t,i:ce(e[Symbol.asyncIterator]())};throw new TypeError("Unsupported input format.")}function ce(e,t=e){return new ReadableStream({async pull(t){let n=0;for(;t.desiredSize>n;){const i=await e.next();if(!i.value){t.close();break}{const e=de(i.value);t.enqueue(e),n+=e.byteLength}}},cancel(e){t.throw?.(e)}})}function de(e){return"string"==typeof e?oe(e):e instanceof Uint8Array?e:re(e)}function ue(e,t,n){let[i,r]=function(e){return e?e instanceof Uint8Array?[e,1]:ArrayBuffer.isView(e)||e instanceof ArrayBuffer?[re(e),1]:[oe(e),0]:[void 0,0]}(t);if(e instanceof File)return{o:pe(i||oe(e.name)),u:BigInt(e.size),l:r};if(e instanceof Response){const t=e.headers.get("content-disposition"),o=t&&t.match(/;\s*filename\*?\s*=\s*(?:UTF-\d+''|)["']?([^;"'\r\n]*)["']?(?:;|$)/i),a=o&&o[1]||e.url&&new URL(e.url).pathname.split("/").findLast(Boolean),s=a&&decodeURIComponent(a),l=n||+e.headers.get("content-length");return{o:pe(i||oe(s)),u:BigInt(l),l:r}}return i=pe(i,void 0!==e||void 0!==n),"string"==typeof e?{o:i,u:BigInt(oe(e).length),l:r}:e instanceof Blob?{o:i,u:BigInt(e.size),l:r}:e instanceof ArrayBuffer||ArrayBuffer.isView(e)?{o:i,u:BigInt(e.byteLength),l:r}:{o:i,u:fe(e,n),l:r}}function fe(e,t){return t>-1?BigInt(t):e?void 0:0n}function pe(e,t=1){if(!e||e.every((e=>47===e)))throw new Error("The file must have a name.");if(t)for(;47===e[e.length-1];)e=e.subarray(0,-1);else 47!==e[e.length-1]&&(e=new Uint8Array([...e,47]));return e}var me=new Uint32Array(256);for(let e=0;e<256;++e){let t=e;for(let e=0;e<8;++e)t=t>>>1^(1&t&&3988292384);me[e]=t}function ge(e,t=0){t^=-1;for(var n=0,i=e.length;n<i;n++)t=t>>>8^me[255&t^e[n]];return(-1^t)>>>0}function he(e,t,n=0){const i=e.getSeconds()>>1|e.getMinutes()<<5|e.getHours()<<11,r=e.getDate()|e.getMonth()+1<<5|e.getFullYear()-1980<<9;t.setUint16(n,i,1),t.setUint16(n+2,r,1)}function we({o:e,l:t},n){return 8*(!t||(n??function(e){try{ye.decode(e)}catch{return 0}return 1}(e)))}var ye=new TextDecoder("utf8",{fatal:1});function _e(e,t=0){const n=ie(30);return n.setUint32(0,1347093252),n.setUint32(4,754976768|t),he(e.t,n,10),n.setUint16(26,e.o.length,1),re(n)}async function*be(e){let{i:t}=e;if("then"in t&&(t=await t),t instanceof Uint8Array)yield t,e.m=ge(t,0),e.u=BigInt(t.length);else{e.u=0n;const n=t.getReader();for(;;){const{value:t,done:i}=await n.read();if(i)break;e.m=ge(t,e.m),e.u+=BigInt(t.length),yield t}}}function ve(e,t){const n=ie(16+(t?8:0));return n.setUint32(0,1347094280),n.setUint32(4,e.isFile?e.m:0,1),t?(n.setBigUint64(8,e.u,1),n.setBigUint64(16,e.u,1)):(n.setUint32(8,ae(e.u),1),n.setUint32(12,ae(e.u),1)),re(n)}function xe(e,t,n=0,i=0){const r=ie(46);return r.setUint32(0,1347092738),r.setUint32(4,755182848),r.setUint16(8,2048|n),he(e.t,r,12),r.setUint32(16,e.isFile?e.m:0,1),r.setUint32(20,ae(e.u),1),r.setUint32(24,ae(e.u),1),r.setUint16(28,e.o.length,1),r.setUint16(30,i,1),r.setUint16(40,e.isFile?33204:16893,1),r.setUint32(42,ae(t),1),re(r)}function je(e,t,n){const i=ie(n);return i.setUint16(0,1,1),i.setUint16(2,n-4,1),16&n&&(i.setBigUint64(4,e.u,1),i.setBigUint64(12,e.u,1)),i.setBigUint64(n-8,t,1),re(i)}function Se(e){return e instanceof File||e instanceof Response?[[e],[e]]:[[e.input,e.name,e.size],[e.input,e.lastModified]]}function Ue(e,t={}){const n={"Content-Type":"application/zip","Content-Disposition":"attachment"};return("bigint"==typeof t.length||Number.isInteger(t.length))&&t.length>0&&(n["Content-Length"]=String(t.length)),t.metadata&&(n["Content-Length"]=String((e=>function(e){let t=BigInt(22),n=0n,i=0;for(const r of e){if(!r.o)throw new Error("Every file must have a non-empty name.");if(void 0===r.u)throw new Error(`Missing size for file "${(new TextDecoder).decode(r.o)}".`);const e=r.u>=0xffffffffn,o=n>=0xffffffffn;n+=BigInt(46+r.o.length+(e&&8))+r.u,t+=BigInt(r.o.length+46+(12*o|28*e)),i||(i=e)}return(i||n>=0xffffffffn)&&(t+=BigInt(76)),t+n}(function*(e){for(const t of e)yield ue(...Se(t)[0])}(e)))(t.metadata))),new Response(Be(e,t),{headers:n})}function Be(e,t={}){const n=function(e){const t=e[Symbol.iterator in e?Symbol.iterator:Symbol.asyncIterator]();return{async next(){const e=await t.next();if(e.done)return e;const[n,i]=Se(e.value);return{done:0,value:Object.assign(le(...i),ue(...n))}},throw:t.throw?.bind(t),[Symbol.asyncIterator](){return this}}}(e);return ce(async function*(e,t){const n=[];let i=0n,r=0n,o=0;for await(const a of e){const e=we(a,t.buffersAreUTF8);yield _e(a,e),yield new Uint8Array(a.o),a.isFile&&(yield*be(a));const s=a.u>=0xffffffffn,l=12*(i>=0xffffffffn)|28*s;yield ve(a,s),n.push(xe(a,i,e,l)),n.push(a.o),l&&n.push(je(a,i,l)),s&&(i+=8n),r++,i+=BigInt(46+a.o.length)+a.u,o||(o=s)}let a=0n;for(const e of n)yield e,a+=BigInt(e.length);if(o||i>=0xffffffffn){const e=ie(76);e.setUint32(0,1347094022),e.setBigUint64(4,BigInt(44),1),e.setUint32(12,755182848),e.setBigUint64(24,r,1),e.setBigUint64(32,r,1),e.setBigUint64(40,a,1),e.setBigUint64(48,i,1),e.setUint32(56,1347094023),e.setBigUint64(64,i+a,1),e.setUint32(72,1,1),yield re(e)}const s=ie(22);s.setUint32(0,1347093766),s.setUint16(8,se(r),1),s.setUint16(10,se(r),1),s.setUint32(12,ae(a),1),s.setUint32(16,ae(i),1),yield re(s)}(n,t),n)}const Ce=window.wp.blob,Ve=(0,d.jsx)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(c.Path,{d:"M18 11.3l-1-1.1-4 4V3h-1.5v11.3L7 10.2l-1 1.1 6.2 5.8 5.8-5.8zm.5 3.7v3.5h-13V15H4v5h16v-5h-1.5z"})});function ke(e){return JSON.stringify({__file:e.type,title:a(e),content:"string"==typeof e.content?e.content:e.content?.raw,syncStatus:e.wp_pattern_sync_status},null,2)}const Ee={id:"export-pattern",label:(0,n.__)("Export as JSON"),icon:Ve,supportsBulk:!0,isEligible:e=>"wp_block"===e.type,callback:async e=>{if(1===e.length)return(0,Ce.downloadBlob)(`${ne(a(e[0])||e[0].slug)}.json`,ke(e[0]),"application/json");const t={},i=e.map((e=>{const n=ne(a(e)||e.slug);return t[n]=(t[n]||0)+1,{name:n+(t[n]>1?"-"+(t[n]-1):"")+".json",lastModified:new Date,input:ke(e)}}));return(0,Ce.downloadBlob)((0,n.__)("patterns-export")+".zip",await Ue(i).blob(),"application/zip")}},De=undefined;(window.wp=window.wp||{}).fields=t})();
\ No newline at end of file
diff --git a/wp-includes/js/dist/patterns.js b/wp-includes/js/dist/patterns.js
index 0a19045b98..5f77f8042b 100644
--- a/wp-includes/js/dist/patterns.js
+++ b/wp-includes/js/dist/patterns.js
@@ -683,7 +683,7 @@ function CreatePatternModalContents({
function getTermLabels(pattern, categories) {
// Theme patterns rely on core pattern categories.
if (pattern.type !== PATTERN_TYPES.user) {
- return categories.core?.filter(category => pattern.categories.includes(category.name)).map(category => category.label);
+ return categories.core?.filter(category => pattern.categories?.includes(category.name)).map(category => category.label);
}
return categories.user?.filter(category => pattern.wp_pattern_category.includes(category.id)).map(category => category.label);
}
diff --git a/wp-includes/js/dist/patterns.min.js b/wp-includes/js/dist/patterns.min.js
index 4f0d6c2523..5aafa72bc6 100644
--- a/wp-includes/js/dist/patterns.min.js
+++ b/wp-includes/js/dist/patterns.min.js
@@ -1,2 +1,2 @@
/*! This file is auto-generated */
-(()=>{"use strict";var e={d:(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{privateApis:()=>ee,store:()=>k});var n={};e.r(n),e.d(n,{convertSyncedPatternToStatic:()=>h,createPattern:()=>m,createPatternFromFile:()=>g,setEditingPattern:()=>y});var r={};e.r(r),e.d(r,{isEditingPattern:()=>f});const a=window.wp.data;const s=(0,a.combineReducers)({isEditingPattern:function(e={},t){return"SET_EDITING_PATTERN"===t?.type?{...e,[t.clientId]:t.isEditing}:e}}),o=window.wp.blocks,i=window.wp.coreData,c=window.wp.blockEditor,l={theme:"pattern",user:"wp_block"},d="all-patterns",u={full:"fully",unsynced:"unsynced"},p={"core/paragraph":["content"],"core/heading":["content"],"core/button":["text","url","linkTarget","rel"],"core/image":["id","url","title","alt"]},_="core/pattern-overrides",m=(e,t,n,r)=>async({registry:a})=>{const s=t===u.unsynced?{wp_pattern_sync_status:t}:void 0,o={title:e,content:n,status:"publish",meta:s,wp_pattern_category:r};return await a.dispatch(i.store).saveEntityRecord("postType","wp_block",o)},g=(e,t)=>async({dispatch:n})=>{const r=await e.text();let a;try{a=JSON.parse(r)}catch(e){throw new Error("Invalid JSON file")}if("wp_block"!==a.__file||!a.title||!a.content||"string"!=typeof a.title||"string"!=typeof a.content||a.syncStatus&&"string"!=typeof a.syncStatus)throw new Error("Invalid pattern JSON file");return await n.createPattern(a.title,a.syncStatus,a.content,t)},h=e=>({registry:t})=>{const n=t.select(c.store).getBlock(e),r=n.attributes?.content;const a=t.select(c.store).getBlocks(n.clientId);t.dispatch(c.store).replaceBlocks(n.clientId,function e(t){return t.map((t=>{let n=t.attributes.metadata;if(n&&(n={...n},delete n.id,delete n.bindings,r?.[n.name]))for(const[e,a]of Object.entries(r[n.name]))(0,o.getBlockType)(t.name)?.attributes[e]&&(t.attributes[e]=a);return(0,o.cloneBlock)(t,{metadata:n&&Object.keys(n).length>0?n:void 0},e(t.innerBlocks))}))}(a))};function y(e,t){return{type:"SET_EDITING_PATTERN",clientId:e,isEditing:t}}function f(e,t){return e.isEditingPattern[t]}const x=window.wp.privateApis,{lock:b,unlock:v}=(0,x.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/patterns"),w={reducer:s},k=(0,a.createReduxStore)("core/patterns",{...w});(0,a.register)(k),v(k).registerPrivateActions(n),v(k).registerPrivateSelectors(r);const S=window.wp.components,C=window.wp.element,j=window.wp.i18n;function B(e){return Object.keys(p).includes(e.name)&&!!e.attributes.metadata?.name&&!!e.attributes.metadata?.bindings&&Object.values(e.attributes.metadata.bindings).some((e=>"core/pattern-overrides"===e.source))}const P=window.ReactJSXRuntime,{BlockQuickNavigation:T}=v(c.privateApis);const E=window.wp.notices,D=window.wp.compose,I=window.wp.htmlEntities,N=e=>(0,I.decodeEntities)(e),R="wp_pattern_category";function M({categoryTerms:e,onChange:t,categoryMap:n}){const[r,a]=(0,C.useState)(""),s=(0,D.useDebounce)(a,500),o=(0,C.useMemo)((()=>Array.from(n.values()).map((e=>N(e.label))).filter((e=>""===r||e.toLowerCase().includes(r.toLowerCase()))).sort(((e,t)=>e.localeCompare(t)))),[r,n]);return(0,P.jsx)(S.FormTokenField,{className:"patterns-menu-items__convert-modal-categories",value:e,suggestions:o,onChange:function(e){const n=e.reduce(((e,t)=>(e.some((e=>e.toLowerCase()===t.toLowerCase()))||e.push(t),e)),[]);t(n)},onInputChange:s,label:(0,j.__)("Categories"),tokenizeOnBlur:!0,__experimentalExpandOnFocus:!0,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})}function O(){const{saveEntityRecord:e,invalidateResolution:t}=(0,a.useDispatch)(i.store),{corePatternCategories:n,userPatternCategories:r}=(0,a.useSelect)((e=>{const{getUserPatternCategories:t,getBlockPatternCategories:n}=e(i.store);return{corePatternCategories:n(),userPatternCategories:t()}}),[]),s=(0,C.useMemo)((()=>{const e=new Map;return r.forEach((t=>{e.set(t.label.toLowerCase(),{label:t.label,name:t.name,id:t.id})})),n.forEach((t=>{e.has(t.label.toLowerCase())||"query"===t.name||e.set(t.label.toLowerCase(),{label:t.label,name:t.name})})),e}),[r,n]);return{categoryMap:s,findOrCreateTerm:async function(n){try{const r=s.get(n.toLowerCase());if(r?.id)return r.id;const a=r?{name:r.label,slug:r.name}:{name:n},o=await e("taxonomy",R,a,{throwOnError:!0});return t("getUserPatternCategories"),o.id}catch(e){if("term_exists"!==e.code)throw e;return e.data.term_id}}}}function A({className:e="patterns-menu-items__convert-modal",modalTitle:t,...n}){const r=(0,a.useSelect)((e=>e(i.store).getPostType(l.user)?.labels?.add_new_item),[]);return(0,P.jsx)(S.Modal,{title:t||r,onRequestClose:n.onClose,overlayClassName:e,focusOnMount:"firstContentElement",size:"small",children:(0,P.jsx)(z,{...n})})}function z({confirmLabel:e=(0,j.__)("Add"),defaultCategories:t=[],content:n,onClose:r,onError:s,onSuccess:o,defaultSyncType:i=u.full,defaultTitle:c=""}){const[l,p]=(0,C.useState)(i),[_,m]=(0,C.useState)(t),[g,h]=(0,C.useState)(c),[y,f]=(0,C.useState)(!1),{createPattern:x}=v((0,a.useDispatch)(k)),{createErrorNotice:b}=(0,a.useDispatch)(E.store),{categoryMap:w,findOrCreateTerm:B}=O();return(0,P.jsx)("form",{onSubmit:e=>{e.preventDefault(),async function(e,t){if(g&&!y)try{f(!0);const r=await Promise.all(_.map((e=>B(e)))),a=await x(e,t,"function"==typeof n?n():n,r);o({pattern:a,categoryId:d})}catch(e){b(e.message,{type:"snackbar",id:"pattern-create"}),s?.()}finally{f(!1),m([]),h("")}}(g,l)},children:(0,P.jsxs)(S.__experimentalVStack,{spacing:"5",children:[(0,P.jsx)(S.TextControl,{label:(0,j.__)("Name"),value:g,onChange:h,placeholder:(0,j.__)("My pattern"),className:"patterns-create-modal__name-input",__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,P.jsx)(M,{categoryTerms:_,onChange:m,categoryMap:w}),(0,P.jsx)(S.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,j._x)("Synced","pattern (singular)"),help:(0,j.__)("Sync this pattern across multiple locations."),checked:l===u.full,onChange:()=>{p(l===u.full?u.unsynced:u.full)}}),(0,P.jsxs)(S.__experimentalHStack,{justify:"right",children:[(0,P.jsx)(S.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{r(),h("")},children:(0,j.__)("Cancel")}),(0,P.jsx)(S.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit","aria-disabled":!g||y,isBusy:y,children:e})]})]})})}function L(e,t){return e.type!==l.user?t.core?.filter((t=>e.categories.includes(t.name))).map((e=>e.label)):t.user?.filter((t=>e.wp_pattern_category.includes(t.id))).map((e=>e.label))}function U({pattern:e,onSuccess:t}){const{createSuccessNotice:n}=(0,a.useDispatch)(E.store),r=(0,a.useSelect)((e=>{const{getUserPatternCategories:t,getBlockPatternCategories:n}=e(i.store);return{core:n(),user:t()}}));return e?{content:e.content,defaultCategories:L(e,r),defaultSyncType:e.type!==l.user?u.unsynced:e.wp_pattern_sync_status||u.full,defaultTitle:(0,j.sprintf)((0,j._x)("%s (Copy)","pattern"),"string"==typeof e.title?e.title:e.title.raw),onSuccess:({pattern:e})=>{n((0,j.sprintf)((0,j._x)('"%s" duplicated.',"pattern"),e.title.raw),{type:"snackbar",id:"patterns-create"}),t?.({pattern:e})}}:null}const H=window.wp.primitives,V=(0,P.jsx)(H.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(H.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})});function F({clientIds:e,rootClientId:t,closeBlockSettingsMenu:n}){const{createSuccessNotice:r}=(0,a.useDispatch)(E.store),{replaceBlocks:s}=(0,a.useDispatch)(c.store),{setEditingPattern:l}=v((0,a.useDispatch)(k)),[d,p]=(0,C.useState)(!1),_=(0,a.useSelect)((n=>{var r;const{canUser:a}=n(i.store),{getBlocksByClientId:s,canInsertBlockType:l,getBlockRootClientId:d}=n(c.store),u=t||(e.length>0?d(e[0]):void 0),p=null!==(r=s(e))&&void 0!==r?r:[];return!(1===p.length&&p[0]&&(0,o.isReusableBlock)(p[0])&&!!n(i.store).getEntityRecord("postType","wp_block",p[0].attributes.ref))&&l("core/block",u)&&p.every((e=>!!e&&e.isValid&&(0,o.hasBlockSupport)(e.name,"reusable",!0)))&&!!a("create",{kind:"postType",name:"wp_block"})}),[e,t]),{getBlocksByClientId:m}=(0,a.useSelect)(c.store),g=(0,C.useCallback)((()=>(0,o.serialize)(m(e))),[m,e]);if(!_)return null;return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(S.MenuItem,{icon:V,onClick:()=>p(!0),"aria-expanded":d,"aria-haspopup":"dialog",children:(0,j.__)("Create pattern")}),d&&(0,P.jsx)(A,{content:g,onSuccess:t=>{(({pattern:t})=>{if(t.wp_pattern_sync_status!==u.unsynced){const r=(0,o.createBlock)("core/block",{ref:t.id});s(e,r),l(r.clientId,!0),n()}r(t.wp_pattern_sync_status===u.unsynced?(0,j.sprintf)((0,j.__)("Unsynced pattern created: %s"),t.title.raw):(0,j.sprintf)((0,j.__)("Synced pattern created: %s"),t.title.raw),{type:"snackbar",id:"convert-to-pattern-success"}),p(!1)})(t)},onError:()=>{p(!1)},onClose:()=>{p(!1)}})]})}const q=window.wp.url;const G=function({clientId:e}){const{canRemove:t,isVisible:n,managePatternsUrl:r}=(0,a.useSelect)((t=>{const{getBlock:n,canRemoveBlock:r,getBlockCount:a}=t(c.store),{canUser:s}=t(i.store),l=n(e);return{canRemove:r(e),isVisible:!!l&&(0,o.isReusableBlock)(l)&&!!s("update",{kind:"postType",name:"wp_block",id:l.attributes.ref}),innerBlockCount:a(e),managePatternsUrl:s("create",{kind:"postType",name:"wp_template"})?(0,q.addQueryArgs)("site-editor.php",{path:"/patterns"}):(0,q.addQueryArgs)("edit.php",{post_type:"wp_block"})}}),[e]),{convertSyncedPatternToStatic:s}=v((0,a.useDispatch)(k));return n?(0,P.jsxs)(P.Fragment,{children:[t&&(0,P.jsx)(S.MenuItem,{onClick:()=>s(e),children:(0,j.__)("Detach")}),(0,P.jsx)(S.MenuItem,{href:r,children:(0,j.__)("Manage patterns")})]}):null};const Y=window.wp.a11y;function J({placeholder:e,initialName:t="",onClose:n,onSave:r}){const[a,s]=(0,C.useState)(t),o=(0,C.useId)(),i=!!a.trim();return(0,P.jsx)(S.Modal,{title:(0,j.__)("Enable overrides"),onRequestClose:n,focusOnMount:"firstContentElement",aria:{describedby:o},size:"small",children:(0,P.jsx)("form",{onSubmit:e=>{e.preventDefault(),i&&(()=>{if(a!==t){const e=(0,j.sprintf)((0,j.__)('Block name changed to: "%s".'),a);(0,Y.speak)(e,"assertive")}r(a),n()})()},children:(0,P.jsxs)(S.__experimentalVStack,{spacing:"6",children:[(0,P.jsx)(S.__experimentalText,{id:o,children:(0,j.__)("Overrides are changes you make to a block within a synced pattern instance. Use overrides to customize a synced pattern instance to suit its new context. Name this block to specify an override.")}),(0,P.jsx)(S.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:a,label:(0,j.__)("Name"),help:(0,j.__)('For example, if you are creating a recipe pattern, you use "Recipe Title", "Recipe Description", etc.'),placeholder:e,onChange:s}),(0,P.jsxs)(S.__experimentalHStack,{justify:"right",children:[(0,P.jsx)(S.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:n,children:(0,j.__)("Cancel")}),(0,P.jsx)(S.Button,{__next40pxDefaultSize:!0,"aria-disabled":!i,variant:"primary",type:"submit",children:(0,j.__)("Enable")})]})]})})})}function Q({onClose:e,onSave:t}){const n=(0,C.useId)();return(0,P.jsx)(S.Modal,{title:(0,j.__)("Disable overrides"),onRequestClose:e,aria:{describedby:n},size:"small",children:(0,P.jsx)("form",{onSubmit:n=>{n.preventDefault(),t(),e()},children:(0,P.jsxs)(S.__experimentalVStack,{spacing:"6",children:[(0,P.jsx)(S.__experimentalText,{id:n,children:(0,j.__)("Are you sure you want to disable overrides? Disabling overrides will revert all applied overrides for this block throughout instances of this pattern.")}),(0,P.jsxs)(S.__experimentalHStack,{justify:"right",children:[(0,P.jsx)(S.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:e,children:(0,j.__)("Cancel")}),(0,P.jsx)(S.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,j.__)("Disable")})]})]})})})}const W=function({attributes:e,setAttributes:t,name:n}){const r=(0,C.useId)(),[a,s]=(0,C.useState)(!1),[o,i]=(0,C.useState)(!1),l=!!e.metadata?.name,d=e.metadata?.bindings?.__default,u=l&&d?.source===_,p=d?.source&&d.source!==_,{updateBlockBindings:m}=(0,c.useBlockBindingsUtils)();function g(n,r){r&&t({metadata:{...e.metadata,name:r}}),m({__default:n?{source:_}:void 0})}if(p)return null;const h=!("core/image"!==n||!e.caption?.length&&!e.href?.length),y=!u&&h?(0,j.__)("Overrides currently don't support image captions or links. Remove the caption or link first before enabling overrides."):(0,j.__)("Allow changes to this block throughout instances of this pattern.");return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(c.InspectorControls,{group:"advanced",children:(0,P.jsx)(S.BaseControl,{__nextHasNoMarginBottom:!0,id:r,label:(0,j.__)("Overrides"),help:y,children:(0,P.jsx)(S.Button,{__next40pxDefaultSize:!0,className:"pattern-overrides-control__allow-overrides-button",variant:"secondary","aria-haspopup":"dialog",onClick:()=>{u?i(!0):s(!0)},disabled:!u&&h,accessibleWhenDisabled:!0,children:u?(0,j.__)("Disable overrides"):(0,j.__)("Enable overrides")})})}),a&&(0,P.jsx)(J,{initialName:e.metadata?.name,onClose:()=>s(!1),onSave:e=>{g(!0,e)}}),o&&(0,P.jsx)(Q,{onClose:()=>i(!1),onSave:()=>g(!1)})]})},Z="content";const $=(0,P.jsx)(H.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(H.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5 4.5h11a.5.5 0 0 1 .5.5v11a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V5a.5.5 0 0 1 .5-.5ZM3 5a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5Zm17 3v10.75c0 .69-.56 1.25-1.25 1.25H6v1.5h12.75a2.75 2.75 0 0 0 2.75-2.75V8H20Z"})}),{useBlockDisplayTitle:X}=v(c.privateApis);function K({clientIds:e}){const t=1===e.length,{icon:n,firstBlockName:r}=(0,a.useSelect)((n=>{const{getBlockAttributes:r,getBlockNamesByClientId:a}=n(c.store),{getBlockType:s,getActiveBlockVariation:i}=n(o.store),l=a(e),d=l[0],u=s(d);let p;if(t){const t=i(d,r(e[0]));p=t?.icon||u.icon}else{p=1===new Set(l).size?u.icon:$}return{icon:p,firstBlockName:r(e[0]).metadata.name}}),[e,t]),s=X({clientId:e[0],maximumLength:35}),i=t?(0,j.sprintf)((0,j.__)('This %1$s is editable using the "%2$s" override.'),s.toLowerCase(),r):(0,j.__)("These blocks are editable using overrides."),l=(0,C.useId)();return(0,P.jsx)(S.ToolbarItem,{children:e=>(0,P.jsx)(S.DropdownMenu,{className:"patterns-pattern-overrides-toolbar-indicator",label:s,popoverProps:{placement:"bottom-start",className:"patterns-pattern-overrides-toolbar-indicator__popover"},icon:(0,P.jsx)(P.Fragment,{children:(0,P.jsx)(c.BlockIcon,{icon:n,className:"patterns-pattern-overrides-toolbar-indicator-icon",showColors:!0})}),toggleProps:{description:i,...e},menuProps:{orientation:"both","aria-describedby":l},children:()=>(0,P.jsx)(S.__experimentalText,{id:l,children:i})})})}const ee={};b(ee,{OverridesPanel:function(){const e=(0,a.useSelect)((e=>e(c.store).getClientIdsWithDescendants()),[]),{getBlock:t}=(0,a.useSelect)(c.store),n=(0,C.useMemo)((()=>e.filter((e=>B(t(e))))),[e,t]);return n?.length?(0,P.jsx)(S.PanelBody,{title:(0,j.__)("Overrides"),children:(0,P.jsx)(T,{clientIds:n})}):null},CreatePatternModal:A,CreatePatternModalContents:z,DuplicatePatternModal:function({pattern:e,onClose:t,onSuccess:n}){const r=U({pattern:e,onSuccess:n});return e?(0,P.jsx)(A,{modalTitle:(0,j.__)("Duplicate pattern"),confirmLabel:(0,j.__)("Duplicate"),onClose:t,onError:t,...r}):null},isOverridableBlock:B,hasOverridableBlocks:function e(t){return t.some((t=>!!B(t)||e(t.innerBlocks)))},useDuplicatePatternProps:U,RenamePatternModal:function({onClose:e,onError:t,onSuccess:n,pattern:r,...s}){const o=(0,I.decodeEntities)(r.title),[c,l]=(0,C.useState)(o),[d,u]=(0,C.useState)(!1),{editEntityRecord:p,__experimentalSaveSpecifiedEntityEdits:_}=(0,a.useDispatch)(i.store),{createSuccessNotice:m,createErrorNotice:g}=(0,a.useDispatch)(E.store);return(0,P.jsx)(S.Modal,{title:(0,j.__)("Rename"),...s,onRequestClose:e,focusOnMount:"firstContentElement",size:"small",children:(0,P.jsx)("form",{onSubmit:async a=>{if(a.preventDefault(),c&&c!==r.title&&!d)try{await p("postType",r.type,r.id,{title:c}),u(!0),l(""),e?.();const t=await _("postType",r.type,r.id,["title"],{throwOnError:!0});n?.(t),m((0,j.__)("Pattern renamed"),{type:"snackbar",id:"pattern-update"})}catch(e){t?.();const n=e.message&&"unknown_error"!==e.code?e.message:(0,j.__)("An error occurred while renaming the pattern.");g(n,{type:"snackbar",id:"pattern-update"})}finally{u(!1),l("")}},children:(0,P.jsxs)(S.__experimentalVStack,{spacing:"5",children:[(0,P.jsx)(S.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,j.__)("Name"),value:c,onChange:l,required:!0}),(0,P.jsxs)(S.__experimentalHStack,{justify:"right",children:[(0,P.jsx)(S.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{e?.(),l("")},children:(0,j.__)("Cancel")}),(0,P.jsx)(S.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,j.__)("Save")})]})]})})})},PatternsMenuItems:function({rootClientId:e}){return(0,P.jsx)(c.BlockSettingsMenuControls,{children:({selectedClientIds:t,onClose:n})=>(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(F,{clientIds:t,rootClientId:e,closeBlockSettingsMenu:n}),1===t.length&&(0,P.jsx)(G,{clientId:t[0]})]})})},RenamePatternCategoryModal:function({category:e,existingCategories:t,onClose:n,onError:r,onSuccess:s,...o}){const c=(0,C.useId)(),l=(0,C.useRef)(),[d,u]=(0,C.useState)((0,I.decodeEntities)(e.name)),[p,_]=(0,C.useState)(!1),[m,g]=(0,C.useState)(!1),h=m?`patterns-rename-pattern-category-modal__validation-message-${c}`:void 0,{saveEntityRecord:y,invalidateResolution:f}=(0,a.useDispatch)(i.store),{createErrorNotice:x,createSuccessNotice:b}=(0,a.useDispatch)(E.store),v=()=>{n(),u("")};return(0,P.jsx)(S.Modal,{title:(0,j.__)("Rename"),onRequestClose:v,...o,children:(0,P.jsx)("form",{onSubmit:async a=>{if(a.preventDefault(),!p){if(!d||d===e.name){const e=(0,j.__)("Please enter a new name for this category.");return(0,Y.speak)(e,"assertive"),g(e),void l.current?.focus()}if(t.patternCategories.find((t=>t.id!==e.id&&t.label.toLowerCase()===d.toLowerCase()))){const e=(0,j.__)("This category already exists. Please use a different name.");return(0,Y.speak)(e,"assertive"),g(e),void l.current?.focus()}try{_(!0);const t=await y("taxonomy",R,{id:e.id,slug:e.slug,name:d});f("getUserPatternCategories"),s?.(t),n(),b((0,j.__)("Pattern category renamed."),{type:"snackbar",id:"pattern-category-update"})}catch(e){r?.(),x(e.message,{type:"snackbar",id:"pattern-category-update"})}finally{_(!1),u("")}}},children:(0,P.jsxs)(S.__experimentalVStack,{spacing:"5",children:[(0,P.jsxs)(S.__experimentalVStack,{spacing:"2",children:[(0,P.jsx)(S.TextControl,{ref:l,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,j.__)("Name"),value:d,onChange:e=>{m&&g(void 0),u(e)},"aria-describedby":h,required:!0}),m&&(0,P.jsx)("span",{className:"patterns-rename-pattern-category-modal__validation-message",id:h,children:m})]}),(0,P.jsxs)(S.__experimentalHStack,{justify:"right",children:[(0,P.jsx)(S.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:v,children:(0,j.__)("Cancel")}),(0,P.jsx)(S.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit","aria-disabled":!d||d===e.name||p,isBusy:p,children:(0,j.__)("Save")})]})]})})})},PatternOverridesControls:W,ResetOverridesControl:function(e){const t=e.attributes.metadata?.name,n=(0,a.useRegistry)(),r=(0,a.useSelect)((n=>{if(!t)return;const{getBlockAttributes:r,getBlockParentsByBlockName:a}=n(c.store),[s]=a(e.clientId,"core/block",!0);if(!s)return;const o=r(s)[Z];return o?o.hasOwnProperty(t):void 0}),[e.clientId,t]);return(0,P.jsx)(c.__unstableBlockToolbarLastItem,{children:(0,P.jsx)(S.ToolbarGroup,{children:(0,P.jsx)(S.ToolbarButton,{onClick:function(){const{getBlockAttributes:r,getBlockParentsByBlockName:a}=n.select(c.store),[s]=a(e.clientId,"core/block",!0);if(!s)return;const o=r(s)[Z];if(!o.hasOwnProperty(t))return;const{updateBlockAttributes:i,__unstableMarkLastChangeAsPersistent:l}=n.dispatch(c.store);l();let d={...o};delete d[t],Object.keys(d).length||(d=void 0),i(s,{[Z]:d})},disabled:!r,children:(0,j.__)("Reset")})})})},PatternOverridesBlockControls:function(){const{clientIds:e,hasPatternOverrides:t,hasParentPattern:n}=(0,a.useSelect)((e=>{const{getBlockAttributes:t,getSelectedBlockClientIds:n,getBlockParentsByBlockName:r}=e(c.store),a=n(),s=a.every((e=>{var n;return Object.values(null!==(n=t(e)?.metadata?.bindings)&&void 0!==n?n:{}).some((e=>e?.source===_))})),o=a.every((e=>r(e,"core/block",!0).length>0));return{clientIds:a,hasPatternOverrides:s,hasParentPattern:o}}),[]);return t&&n?(0,P.jsx)(c.BlockControls,{group:"parent",children:(0,P.jsx)(K,{clientIds:e})}):null},useAddPatternCategory:O,PATTERN_TYPES:l,PATTERN_DEFAULT_CATEGORY:d,PATTERN_USER_CATEGORY:"my-patterns",EXCLUDED_PATTERN_SOURCES:["core","pattern-directory/core","pattern-directory/featured"],PATTERN_SYNC_TYPES:u,PARTIAL_SYNCING_SUPPORTED_BLOCKS:p}),(window.wp=window.wp||{}).patterns=t})();
\ No newline at end of file
+(()=>{"use strict";var e={d:(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{privateApis:()=>ee,store:()=>k});var n={};e.r(n),e.d(n,{convertSyncedPatternToStatic:()=>h,createPattern:()=>m,createPatternFromFile:()=>g,setEditingPattern:()=>y});var r={};e.r(r),e.d(r,{isEditingPattern:()=>f});const a=window.wp.data;const s=(0,a.combineReducers)({isEditingPattern:function(e={},t){return"SET_EDITING_PATTERN"===t?.type?{...e,[t.clientId]:t.isEditing}:e}}),o=window.wp.blocks,i=window.wp.coreData,c=window.wp.blockEditor,l={theme:"pattern",user:"wp_block"},d="all-patterns",u={full:"fully",unsynced:"unsynced"},p={"core/paragraph":["content"],"core/heading":["content"],"core/button":["text","url","linkTarget","rel"],"core/image":["id","url","title","alt"]},_="core/pattern-overrides",m=(e,t,n,r)=>async({registry:a})=>{const s=t===u.unsynced?{wp_pattern_sync_status:t}:void 0,o={title:e,content:n,status:"publish",meta:s,wp_pattern_category:r};return await a.dispatch(i.store).saveEntityRecord("postType","wp_block",o)},g=(e,t)=>async({dispatch:n})=>{const r=await e.text();let a;try{a=JSON.parse(r)}catch(e){throw new Error("Invalid JSON file")}if("wp_block"!==a.__file||!a.title||!a.content||"string"!=typeof a.title||"string"!=typeof a.content||a.syncStatus&&"string"!=typeof a.syncStatus)throw new Error("Invalid pattern JSON file");return await n.createPattern(a.title,a.syncStatus,a.content,t)},h=e=>({registry:t})=>{const n=t.select(c.store).getBlock(e),r=n.attributes?.content;const a=t.select(c.store).getBlocks(n.clientId);t.dispatch(c.store).replaceBlocks(n.clientId,function e(t){return t.map((t=>{let n=t.attributes.metadata;if(n&&(n={...n},delete n.id,delete n.bindings,r?.[n.name]))for(const[e,a]of Object.entries(r[n.name]))(0,o.getBlockType)(t.name)?.attributes[e]&&(t.attributes[e]=a);return(0,o.cloneBlock)(t,{metadata:n&&Object.keys(n).length>0?n:void 0},e(t.innerBlocks))}))}(a))};function y(e,t){return{type:"SET_EDITING_PATTERN",clientId:e,isEditing:t}}function f(e,t){return e.isEditingPattern[t]}const x=window.wp.privateApis,{lock:b,unlock:v}=(0,x.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/patterns"),w={reducer:s},k=(0,a.createReduxStore)("core/patterns",{...w});(0,a.register)(k),v(k).registerPrivateActions(n),v(k).registerPrivateSelectors(r);const S=window.wp.components,C=window.wp.element,j=window.wp.i18n;function B(e){return Object.keys(p).includes(e.name)&&!!e.attributes.metadata?.name&&!!e.attributes.metadata?.bindings&&Object.values(e.attributes.metadata.bindings).some((e=>"core/pattern-overrides"===e.source))}const P=window.ReactJSXRuntime,{BlockQuickNavigation:T}=v(c.privateApis);const E=window.wp.notices,D=window.wp.compose,I=window.wp.htmlEntities,N=e=>(0,I.decodeEntities)(e),R="wp_pattern_category";function M({categoryTerms:e,onChange:t,categoryMap:n}){const[r,a]=(0,C.useState)(""),s=(0,D.useDebounce)(a,500),o=(0,C.useMemo)((()=>Array.from(n.values()).map((e=>N(e.label))).filter((e=>""===r||e.toLowerCase().includes(r.toLowerCase()))).sort(((e,t)=>e.localeCompare(t)))),[r,n]);return(0,P.jsx)(S.FormTokenField,{className:"patterns-menu-items__convert-modal-categories",value:e,suggestions:o,onChange:function(e){const n=e.reduce(((e,t)=>(e.some((e=>e.toLowerCase()===t.toLowerCase()))||e.push(t),e)),[]);t(n)},onInputChange:s,label:(0,j.__)("Categories"),tokenizeOnBlur:!0,__experimentalExpandOnFocus:!0,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})}function O(){const{saveEntityRecord:e,invalidateResolution:t}=(0,a.useDispatch)(i.store),{corePatternCategories:n,userPatternCategories:r}=(0,a.useSelect)((e=>{const{getUserPatternCategories:t,getBlockPatternCategories:n}=e(i.store);return{corePatternCategories:n(),userPatternCategories:t()}}),[]),s=(0,C.useMemo)((()=>{const e=new Map;return r.forEach((t=>{e.set(t.label.toLowerCase(),{label:t.label,name:t.name,id:t.id})})),n.forEach((t=>{e.has(t.label.toLowerCase())||"query"===t.name||e.set(t.label.toLowerCase(),{label:t.label,name:t.name})})),e}),[r,n]);return{categoryMap:s,findOrCreateTerm:async function(n){try{const r=s.get(n.toLowerCase());if(r?.id)return r.id;const a=r?{name:r.label,slug:r.name}:{name:n},o=await e("taxonomy",R,a,{throwOnError:!0});return t("getUserPatternCategories"),o.id}catch(e){if("term_exists"!==e.code)throw e;return e.data.term_id}}}}function A({className:e="patterns-menu-items__convert-modal",modalTitle:t,...n}){const r=(0,a.useSelect)((e=>e(i.store).getPostType(l.user)?.labels?.add_new_item),[]);return(0,P.jsx)(S.Modal,{title:t||r,onRequestClose:n.onClose,overlayClassName:e,focusOnMount:"firstContentElement",size:"small",children:(0,P.jsx)(z,{...n})})}function z({confirmLabel:e=(0,j.__)("Add"),defaultCategories:t=[],content:n,onClose:r,onError:s,onSuccess:o,defaultSyncType:i=u.full,defaultTitle:c=""}){const[l,p]=(0,C.useState)(i),[_,m]=(0,C.useState)(t),[g,h]=(0,C.useState)(c),[y,f]=(0,C.useState)(!1),{createPattern:x}=v((0,a.useDispatch)(k)),{createErrorNotice:b}=(0,a.useDispatch)(E.store),{categoryMap:w,findOrCreateTerm:B}=O();return(0,P.jsx)("form",{onSubmit:e=>{e.preventDefault(),async function(e,t){if(g&&!y)try{f(!0);const r=await Promise.all(_.map((e=>B(e)))),a=await x(e,t,"function"==typeof n?n():n,r);o({pattern:a,categoryId:d})}catch(e){b(e.message,{type:"snackbar",id:"pattern-create"}),s?.()}finally{f(!1),m([]),h("")}}(g,l)},children:(0,P.jsxs)(S.__experimentalVStack,{spacing:"5",children:[(0,P.jsx)(S.TextControl,{label:(0,j.__)("Name"),value:g,onChange:h,placeholder:(0,j.__)("My pattern"),className:"patterns-create-modal__name-input",__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,P.jsx)(M,{categoryTerms:_,onChange:m,categoryMap:w}),(0,P.jsx)(S.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,j._x)("Synced","pattern (singular)"),help:(0,j.__)("Sync this pattern across multiple locations."),checked:l===u.full,onChange:()=>{p(l===u.full?u.unsynced:u.full)}}),(0,P.jsxs)(S.__experimentalHStack,{justify:"right",children:[(0,P.jsx)(S.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{r(),h("")},children:(0,j.__)("Cancel")}),(0,P.jsx)(S.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit","aria-disabled":!g||y,isBusy:y,children:e})]})]})})}function L(e,t){return e.type!==l.user?t.core?.filter((t=>e.categories?.includes(t.name))).map((e=>e.label)):t.user?.filter((t=>e.wp_pattern_category.includes(t.id))).map((e=>e.label))}function U({pattern:e,onSuccess:t}){const{createSuccessNotice:n}=(0,a.useDispatch)(E.store),r=(0,a.useSelect)((e=>{const{getUserPatternCategories:t,getBlockPatternCategories:n}=e(i.store);return{core:n(),user:t()}}));return e?{content:e.content,defaultCategories:L(e,r),defaultSyncType:e.type!==l.user?u.unsynced:e.wp_pattern_sync_status||u.full,defaultTitle:(0,j.sprintf)((0,j._x)("%s (Copy)","pattern"),"string"==typeof e.title?e.title:e.title.raw),onSuccess:({pattern:e})=>{n((0,j.sprintf)((0,j._x)('"%s" duplicated.',"pattern"),e.title.raw),{type:"snackbar",id:"patterns-create"}),t?.({pattern:e})}}:null}const H=window.wp.primitives,V=(0,P.jsx)(H.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(H.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})});function F({clientIds:e,rootClientId:t,closeBlockSettingsMenu:n}){const{createSuccessNotice:r}=(0,a.useDispatch)(E.store),{replaceBlocks:s}=(0,a.useDispatch)(c.store),{setEditingPattern:l}=v((0,a.useDispatch)(k)),[d,p]=(0,C.useState)(!1),_=(0,a.useSelect)((n=>{var r;const{canUser:a}=n(i.store),{getBlocksByClientId:s,canInsertBlockType:l,getBlockRootClientId:d}=n(c.store),u=t||(e.length>0?d(e[0]):void 0),p=null!==(r=s(e))&&void 0!==r?r:[];return!(1===p.length&&p[0]&&(0,o.isReusableBlock)(p[0])&&!!n(i.store).getEntityRecord("postType","wp_block",p[0].attributes.ref))&&l("core/block",u)&&p.every((e=>!!e&&e.isValid&&(0,o.hasBlockSupport)(e.name,"reusable",!0)))&&!!a("create",{kind:"postType",name:"wp_block"})}),[e,t]),{getBlocksByClientId:m}=(0,a.useSelect)(c.store),g=(0,C.useCallback)((()=>(0,o.serialize)(m(e))),[m,e]);if(!_)return null;return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(S.MenuItem,{icon:V,onClick:()=>p(!0),"aria-expanded":d,"aria-haspopup":"dialog",children:(0,j.__)("Create pattern")}),d&&(0,P.jsx)(A,{content:g,onSuccess:t=>{(({pattern:t})=>{if(t.wp_pattern_sync_status!==u.unsynced){const r=(0,o.createBlock)("core/block",{ref:t.id});s(e,r),l(r.clientId,!0),n()}r(t.wp_pattern_sync_status===u.unsynced?(0,j.sprintf)((0,j.__)("Unsynced pattern created: %s"),t.title.raw):(0,j.sprintf)((0,j.__)("Synced pattern created: %s"),t.title.raw),{type:"snackbar",id:"convert-to-pattern-success"}),p(!1)})(t)},onError:()=>{p(!1)},onClose:()=>{p(!1)}})]})}const q=window.wp.url;const G=function({clientId:e}){const{canRemove:t,isVisible:n,managePatternsUrl:r}=(0,a.useSelect)((t=>{const{getBlock:n,canRemoveBlock:r,getBlockCount:a}=t(c.store),{canUser:s}=t(i.store),l=n(e);return{canRemove:r(e),isVisible:!!l&&(0,o.isReusableBlock)(l)&&!!s("update",{kind:"postType",name:"wp_block",id:l.attributes.ref}),innerBlockCount:a(e),managePatternsUrl:s("create",{kind:"postType",name:"wp_template"})?(0,q.addQueryArgs)("site-editor.php",{path:"/patterns"}):(0,q.addQueryArgs)("edit.php",{post_type:"wp_block"})}}),[e]),{convertSyncedPatternToStatic:s}=v((0,a.useDispatch)(k));return n?(0,P.jsxs)(P.Fragment,{children:[t&&(0,P.jsx)(S.MenuItem,{onClick:()=>s(e),children:(0,j.__)("Detach")}),(0,P.jsx)(S.MenuItem,{href:r,children:(0,j.__)("Manage patterns")})]}):null};const Y=window.wp.a11y;function J({placeholder:e,initialName:t="",onClose:n,onSave:r}){const[a,s]=(0,C.useState)(t),o=(0,C.useId)(),i=!!a.trim();return(0,P.jsx)(S.Modal,{title:(0,j.__)("Enable overrides"),onRequestClose:n,focusOnMount:"firstContentElement",aria:{describedby:o},size:"small",children:(0,P.jsx)("form",{onSubmit:e=>{e.preventDefault(),i&&(()=>{if(a!==t){const e=(0,j.sprintf)((0,j.__)('Block name changed to: "%s".'),a);(0,Y.speak)(e,"assertive")}r(a),n()})()},children:(0,P.jsxs)(S.__experimentalVStack,{spacing:"6",children:[(0,P.jsx)(S.__experimentalText,{id:o,children:(0,j.__)("Overrides are changes you make to a block within a synced pattern instance. Use overrides to customize a synced pattern instance to suit its new context. Name this block to specify an override.")}),(0,P.jsx)(S.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:a,label:(0,j.__)("Name"),help:(0,j.__)('For example, if you are creating a recipe pattern, you use "Recipe Title", "Recipe Description", etc.'),placeholder:e,onChange:s}),(0,P.jsxs)(S.__experimentalHStack,{justify:"right",children:[(0,P.jsx)(S.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:n,children:(0,j.__)("Cancel")}),(0,P.jsx)(S.Button,{__next40pxDefaultSize:!0,"aria-disabled":!i,variant:"primary",type:"submit",children:(0,j.__)("Enable")})]})]})})})}function Q({onClose:e,onSave:t}){const n=(0,C.useId)();return(0,P.jsx)(S.Modal,{title:(0,j.__)("Disable overrides"),onRequestClose:e,aria:{describedby:n},size:"small",children:(0,P.jsx)("form",{onSubmit:n=>{n.preventDefault(),t(),e()},children:(0,P.jsxs)(S.__experimentalVStack,{spacing:"6",children:[(0,P.jsx)(S.__experimentalText,{id:n,children:(0,j.__)("Are you sure you want to disable overrides? Disabling overrides will revert all applied overrides for this block throughout instances of this pattern.")}),(0,P.jsxs)(S.__experimentalHStack,{justify:"right",children:[(0,P.jsx)(S.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:e,children:(0,j.__)("Cancel")}),(0,P.jsx)(S.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,j.__)("Disable")})]})]})})})}const W=function({attributes:e,setAttributes:t,name:n}){const r=(0,C.useId)(),[a,s]=(0,C.useState)(!1),[o,i]=(0,C.useState)(!1),l=!!e.metadata?.name,d=e.metadata?.bindings?.__default,u=l&&d?.source===_,p=d?.source&&d.source!==_,{updateBlockBindings:m}=(0,c.useBlockBindingsUtils)();function g(n,r){r&&t({metadata:{...e.metadata,name:r}}),m({__default:n?{source:_}:void 0})}if(p)return null;const h=!("core/image"!==n||!e.caption?.length&&!e.href?.length),y=!u&&h?(0,j.__)("Overrides currently don't support image captions or links. Remove the caption or link first before enabling overrides."):(0,j.__)("Allow changes to this block throughout instances of this pattern.");return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(c.InspectorControls,{group:"advanced",children:(0,P.jsx)(S.BaseControl,{__nextHasNoMarginBottom:!0,id:r,label:(0,j.__)("Overrides"),help:y,children:(0,P.jsx)(S.Button,{__next40pxDefaultSize:!0,className:"pattern-overrides-control__allow-overrides-button",variant:"secondary","aria-haspopup":"dialog",onClick:()=>{u?i(!0):s(!0)},disabled:!u&&h,accessibleWhenDisabled:!0,children:u?(0,j.__)("Disable overrides"):(0,j.__)("Enable overrides")})})}),a&&(0,P.jsx)(J,{initialName:e.metadata?.name,onClose:()=>s(!1),onSave:e=>{g(!0,e)}}),o&&(0,P.jsx)(Q,{onClose:()=>i(!1),onSave:()=>g(!1)})]})},Z="content";const $=(0,P.jsx)(H.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(H.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5 4.5h11a.5.5 0 0 1 .5.5v11a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V5a.5.5 0 0 1 .5-.5ZM3 5a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5Zm17 3v10.75c0 .69-.56 1.25-1.25 1.25H6v1.5h12.75a2.75 2.75 0 0 0 2.75-2.75V8H20Z"})}),{useBlockDisplayTitle:X}=v(c.privateApis);function K({clientIds:e}){const t=1===e.length,{icon:n,firstBlockName:r}=(0,a.useSelect)((n=>{const{getBlockAttributes:r,getBlockNamesByClientId:a}=n(c.store),{getBlockType:s,getActiveBlockVariation:i}=n(o.store),l=a(e),d=l[0],u=s(d);let p;if(t){const t=i(d,r(e[0]));p=t?.icon||u.icon}else{p=1===new Set(l).size?u.icon:$}return{icon:p,firstBlockName:r(e[0]).metadata.name}}),[e,t]),s=X({clientId:e[0],maximumLength:35}),i=t?(0,j.sprintf)((0,j.__)('This %1$s is editable using the "%2$s" override.'),s.toLowerCase(),r):(0,j.__)("These blocks are editable using overrides."),l=(0,C.useId)();return(0,P.jsx)(S.ToolbarItem,{children:e=>(0,P.jsx)(S.DropdownMenu,{className:"patterns-pattern-overrides-toolbar-indicator",label:s,popoverProps:{placement:"bottom-start",className:"patterns-pattern-overrides-toolbar-indicator__popover"},icon:(0,P.jsx)(P.Fragment,{children:(0,P.jsx)(c.BlockIcon,{icon:n,className:"patterns-pattern-overrides-toolbar-indicator-icon",showColors:!0})}),toggleProps:{description:i,...e},menuProps:{orientation:"both","aria-describedby":l},children:()=>(0,P.jsx)(S.__experimentalText,{id:l,children:i})})})}const ee={};b(ee,{OverridesPanel:function(){const e=(0,a.useSelect)((e=>e(c.store).getClientIdsWithDescendants()),[]),{getBlock:t}=(0,a.useSelect)(c.store),n=(0,C.useMemo)((()=>e.filter((e=>B(t(e))))),[e,t]);return n?.length?(0,P.jsx)(S.PanelBody,{title:(0,j.__)("Overrides"),children:(0,P.jsx)(T,{clientIds:n})}):null},CreatePatternModal:A,CreatePatternModalContents:z,DuplicatePatternModal:function({pattern:e,onClose:t,onSuccess:n}){const r=U({pattern:e,onSuccess:n});return e?(0,P.jsx)(A,{modalTitle:(0,j.__)("Duplicate pattern"),confirmLabel:(0,j.__)("Duplicate"),onClose:t,onError:t,...r}):null},isOverridableBlock:B,hasOverridableBlocks:function e(t){return t.some((t=>!!B(t)||e(t.innerBlocks)))},useDuplicatePatternProps:U,RenamePatternModal:function({onClose:e,onError:t,onSuccess:n,pattern:r,...s}){const o=(0,I.decodeEntities)(r.title),[c,l]=(0,C.useState)(o),[d,u]=(0,C.useState)(!1),{editEntityRecord:p,__experimentalSaveSpecifiedEntityEdits:_}=(0,a.useDispatch)(i.store),{createSuccessNotice:m,createErrorNotice:g}=(0,a.useDispatch)(E.store);return(0,P.jsx)(S.Modal,{title:(0,j.__)("Rename"),...s,onRequestClose:e,focusOnMount:"firstContentElement",size:"small",children:(0,P.jsx)("form",{onSubmit:async a=>{if(a.preventDefault(),c&&c!==r.title&&!d)try{await p("postType",r.type,r.id,{title:c}),u(!0),l(""),e?.();const t=await _("postType",r.type,r.id,["title"],{throwOnError:!0});n?.(t),m((0,j.__)("Pattern renamed"),{type:"snackbar",id:"pattern-update"})}catch(e){t?.();const n=e.message&&"unknown_error"!==e.code?e.message:(0,j.__)("An error occurred while renaming the pattern.");g(n,{type:"snackbar",id:"pattern-update"})}finally{u(!1),l("")}},children:(0,P.jsxs)(S.__experimentalVStack,{spacing:"5",children:[(0,P.jsx)(S.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,j.__)("Name"),value:c,onChange:l,required:!0}),(0,P.jsxs)(S.__experimentalHStack,{justify:"right",children:[(0,P.jsx)(S.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{e?.(),l("")},children:(0,j.__)("Cancel")}),(0,P.jsx)(S.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,j.__)("Save")})]})]})})})},PatternsMenuItems:function({rootClientId:e}){return(0,P.jsx)(c.BlockSettingsMenuControls,{children:({selectedClientIds:t,onClose:n})=>(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(F,{clientIds:t,rootClientId:e,closeBlockSettingsMenu:n}),1===t.length&&(0,P.jsx)(G,{clientId:t[0]})]})})},RenamePatternCategoryModal:function({category:e,existingCategories:t,onClose:n,onError:r,onSuccess:s,...o}){const c=(0,C.useId)(),l=(0,C.useRef)(),[d,u]=(0,C.useState)((0,I.decodeEntities)(e.name)),[p,_]=(0,C.useState)(!1),[m,g]=(0,C.useState)(!1),h=m?`patterns-rename-pattern-category-modal__validation-message-${c}`:void 0,{saveEntityRecord:y,invalidateResolution:f}=(0,a.useDispatch)(i.store),{createErrorNotice:x,createSuccessNotice:b}=(0,a.useDispatch)(E.store),v=()=>{n(),u("")};return(0,P.jsx)(S.Modal,{title:(0,j.__)("Rename"),onRequestClose:v,...o,children:(0,P.jsx)("form",{onSubmit:async a=>{if(a.preventDefault(),!p){if(!d||d===e.name){const e=(0,j.__)("Please enter a new name for this category.");return(0,Y.speak)(e,"assertive"),g(e),void l.current?.focus()}if(t.patternCategories.find((t=>t.id!==e.id&&t.label.toLowerCase()===d.toLowerCase()))){const e=(0,j.__)("This category already exists. Please use a different name.");return(0,Y.speak)(e,"assertive"),g(e),void l.current?.focus()}try{_(!0);const t=await y("taxonomy",R,{id:e.id,slug:e.slug,name:d});f("getUserPatternCategories"),s?.(t),n(),b((0,j.__)("Pattern category renamed."),{type:"snackbar",id:"pattern-category-update"})}catch(e){r?.(),x(e.message,{type:"snackbar",id:"pattern-category-update"})}finally{_(!1),u("")}}},children:(0,P.jsxs)(S.__experimentalVStack,{spacing:"5",children:[(0,P.jsxs)(S.__experimentalVStack,{spacing:"2",children:[(0,P.jsx)(S.TextControl,{ref:l,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,j.__)("Name"),value:d,onChange:e=>{m&&g(void 0),u(e)},"aria-describedby":h,required:!0}),m&&(0,P.jsx)("span",{className:"patterns-rename-pattern-category-modal__validation-message",id:h,children:m})]}),(0,P.jsxs)(S.__experimentalHStack,{justify:"right",children:[(0,P.jsx)(S.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:v,children:(0,j.__)("Cancel")}),(0,P.jsx)(S.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit","aria-disabled":!d||d===e.name||p,isBusy:p,children:(0,j.__)("Save")})]})]})})})},PatternOverridesControls:W,ResetOverridesControl:function(e){const t=e.attributes.metadata?.name,n=(0,a.useRegistry)(),r=(0,a.useSelect)((n=>{if(!t)return;const{getBlockAttributes:r,getBlockParentsByBlockName:a}=n(c.store),[s]=a(e.clientId,"core/block",!0);if(!s)return;const o=r(s)[Z];return o?o.hasOwnProperty(t):void 0}),[e.clientId,t]);return(0,P.jsx)(c.__unstableBlockToolbarLastItem,{children:(0,P.jsx)(S.ToolbarGroup,{children:(0,P.jsx)(S.ToolbarButton,{onClick:function(){const{getBlockAttributes:r,getBlockParentsByBlockName:a}=n.select(c.store),[s]=a(e.clientId,"core/block",!0);if(!s)return;const o=r(s)[Z];if(!o.hasOwnProperty(t))return;const{updateBlockAttributes:i,__unstableMarkLastChangeAsPersistent:l}=n.dispatch(c.store);l();let d={...o};delete d[t],Object.keys(d).length||(d=void 0),i(s,{[Z]:d})},disabled:!r,children:(0,j.__)("Reset")})})})},PatternOverridesBlockControls:function(){const{clientIds:e,hasPatternOverrides:t,hasParentPattern:n}=(0,a.useSelect)((e=>{const{getBlockAttributes:t,getSelectedBlockClientIds:n,getBlockParentsByBlockName:r}=e(c.store),a=n(),s=a.every((e=>{var n;return Object.values(null!==(n=t(e)?.metadata?.bindings)&&void 0!==n?n:{}).some((e=>e?.source===_))})),o=a.every((e=>r(e,"core/block",!0).length>0));return{clientIds:a,hasPatternOverrides:s,hasParentPattern:o}}),[]);return t&&n?(0,P.jsx)(c.BlockControls,{group:"parent",children:(0,P.jsx)(K,{clientIds:e})}):null},useAddPatternCategory:O,PATTERN_TYPES:l,PATTERN_DEFAULT_CATEGORY:d,PATTERN_USER_CATEGORY:"my-patterns",EXCLUDED_PATTERN_SOURCES:["core","pattern-directory/core","pattern-directory/featured"],PATTERN_SYNC_TYPES:u,PARTIAL_SYNCING_SUPPORTED_BLOCKS:p}),(window.wp=window.wp||{}).patterns=t})();
\ No newline at end of file
diff --git a/wp-includes/version.php b/wp-includes/version.php
index 00b68bf4c6..b915fbe4b0 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
-$wp_version = '6.8-alpha-59431';
+$wp_version = '6.8-alpha-59438';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.