diff --git a/.gitignore b/.gitignore index fa5edc8a9d7f8..15876fa47fee8 100644 --- a/.gitignore +++ b/.gitignore @@ -33,15 +33,16 @@ wp-tests-config.php /src/wp-admin/css/colors/*/*.css /src/wp-admin/js /src/wp-includes/assets/* +!/src/wp-includes/assets/icon-library-manifest.php +!/src/wp-includes/assets/script-loader-packages.php +!/src/wp-includes/assets/script-modules-packages.php /src/wp-includes/js /src/wp-includes/css/dist /src/wp-includes/css/*.min.css /src/wp-includes/css/*-rtl.css -/src/wp-includes/blocks/* -!/src/wp-includes/blocks/index.php -/src/wp-includes/images/icon-library -/src/wp-includes/build -/src/wp-includes/theme.json +/src/wp-includes/blocks/**/*.css +/src/wp-includes/blocks/**/*.js +/src/wp-includes/blocks/**/*.js.map /packagehash.txt /.gutenberg-hash /artifacts diff --git a/src/wp-includes/assets/icon-library-manifest.php b/src/wp-includes/assets/icon-library-manifest.php new file mode 100644 index 0000000000000..af72a1c00499c --- /dev/null +++ b/src/wp-includes/assets/icon-library-manifest.php @@ -0,0 +1,360 @@ + array( + 'label' => _x( 'Arrow Down Left', 'icon label' ), + 'filePath' => 'arrow-down-left.svg', + ), + 'arrow-down-right' => array( + 'label' => _x( 'Arrow Down Right', 'icon label' ), + 'filePath' => 'arrow-down-right.svg', + ), + 'arrow-down' => array( + 'label' => _x( 'Arrow Down', 'icon label' ), + 'filePath' => 'arrow-down.svg', + ), + 'arrow-left' => array( + 'label' => _x( 'Arrow Left', 'icon label' ), + 'filePath' => 'arrow-left.svg', + ), + 'arrow-right' => array( + 'label' => _x( 'Arrow Right', 'icon label' ), + 'filePath' => 'arrow-right.svg', + ), + 'arrow-up-left' => array( + 'label' => _x( 'Arrow Up Left', 'icon label' ), + 'filePath' => 'arrow-up-left.svg', + ), + 'arrow-up-right' => array( + 'label' => _x( 'Arrow Up Right', 'icon label' ), + 'filePath' => 'arrow-up-right.svg', + ), + 'arrow-up' => array( + 'label' => _x( 'Arrow Up', 'icon label' ), + 'filePath' => 'arrow-up.svg', + ), + 'at-symbol' => array( + 'label' => _x( 'At Symbol (@)', 'icon label' ), + 'filePath' => 'at-symbol.svg', + ), + 'audio' => array( + 'label' => _x( 'Audio', 'icon label' ), + 'filePath' => 'audio.svg', + ), + 'bell' => array( + 'label' => _x( 'Bell', 'icon label' ), + 'filePath' => 'bell.svg', + ), + 'block-default' => array( + 'label' => _x( 'Block Default', 'icon label' ), + 'filePath' => 'block-default.svg', + ), + 'block-meta' => array( + 'label' => _x( 'Block Meta', 'icon label' ), + 'filePath' => 'block-meta.svg', + ), + 'block-table' => array( + 'label' => _x( 'Block Table', 'icon label' ), + 'filePath' => 'block-table.svg', + ), + 'calendar' => array( + 'label' => _x( 'Calendar', 'icon label' ), + 'filePath' => 'calendar.svg', + ), + 'capture-photo' => array( + 'label' => _x( 'Capture Photo', 'icon label' ), + 'filePath' => 'capture-photo.svg', + ), + 'capture-video' => array( + 'label' => _x( 'Capture Video', 'icon label' ), + 'filePath' => 'capture-video.svg', + ), + 'cart' => array( + 'label' => _x( 'Cart', 'icon label' ), + 'filePath' => 'cart.svg', + ), + 'category' => array( + 'label' => _x( 'Category', 'icon label' ), + 'filePath' => 'category.svg', + ), + 'caution' => array( + 'label' => _x( 'Caution', 'icon label' ), + 'filePath' => 'caution.svg', + ), + 'chart-bar' => array( + 'label' => _x( 'Chart Bar', 'icon label' ), + 'filePath' => 'chart-bar.svg', + ), + 'check' => array( + 'label' => _x( 'Check', 'icon label' ), + 'filePath' => 'check.svg', + ), + 'chevron-down' => array( + 'label' => _x( 'Chevron Down', 'icon label' ), + 'filePath' => 'chevron-down.svg', + ), + 'chevron-down-small' => array( + 'label' => _x( 'Chevron Down Small', 'icon label' ), + 'filePath' => 'chevron-down-small.svg', + ), + 'chevron-left' => array( + 'label' => _x( 'Chevron Left', 'icon label' ), + 'filePath' => 'chevron-left.svg', + ), + 'chevron-left-small' => array( + 'label' => _x( 'Chevron Left Small', 'icon label' ), + 'filePath' => 'chevron-left-small.svg', + ), + 'chevron-right' => array( + 'label' => _x( 'Chevron Right', 'icon label' ), + 'filePath' => 'chevron-right.svg', + ), + 'chevron-right-small' => array( + 'label' => _x( 'Chevron Right Small', 'icon label' ), + 'filePath' => 'chevron-right-small.svg', + ), + 'chevron-up' => array( + 'label' => _x( 'Chevron Up', 'icon label' ), + 'filePath' => 'chevron-up.svg', + ), + 'chevron-up-down' => array( + 'label' => _x( 'Chevron Up Down', 'icon label' ), + 'filePath' => 'chevron-up-down.svg', + ), + 'chevron-up-small' => array( + 'label' => _x( 'Chevron Up Small', 'icon label' ), + 'filePath' => 'chevron-up-small.svg', + ), + 'comment' => array( + 'label' => _x( 'Comment', 'icon label' ), + 'filePath' => 'comment.svg', + ), + 'cover' => array( + 'label' => _x( 'Cover', 'icon label' ), + 'filePath' => 'cover.svg', + ), + 'create' => array( + 'label' => _x( 'Create', 'icon label' ), + 'filePath' => 'create.svg', + ), + 'desktop' => array( + 'label' => _x( 'Desktop', 'icon label' ), + 'filePath' => 'desktop.svg', + ), + 'download' => array( + 'label' => _x( 'Download', 'icon label' ), + 'filePath' => 'download.svg', + ), + 'drawer-left' => array( + 'label' => _x( 'Drawer Left', 'icon label' ), + 'filePath' => 'drawer-left.svg', + ), + 'drawer-right' => array( + 'label' => _x( 'Drawer Right', 'icon label' ), + 'filePath' => 'drawer-right.svg', + ), + 'envelope' => array( + 'label' => _x( 'Envelope', 'icon label' ), + 'filePath' => 'envelope.svg', + ), + 'error' => array( + 'label' => _x( 'Error', 'icon label' ), + 'filePath' => 'error.svg', + ), + 'external' => array( + 'label' => _x( 'External', 'icon label' ), + 'filePath' => 'external.svg', + ), + 'file' => array( + 'label' => _x( 'File', 'icon label' ), + 'filePath' => 'file.svg', + ), + 'gallery' => array( + 'label' => _x( 'Gallery', 'icon label' ), + 'filePath' => 'gallery.svg', + ), + 'group' => array( + 'label' => _x( 'Group', 'icon label' ), + 'filePath' => 'group.svg', + ), + 'heading' => array( + 'label' => _x( 'Heading', 'icon label' ), + 'filePath' => 'heading.svg', + ), + 'help' => array( + 'label' => _x( 'Help', 'icon label' ), + 'filePath' => 'help.svg', + ), + 'home' => array( + 'label' => _x( 'Home', 'icon label' ), + 'filePath' => 'home.svg', + ), + 'image' => array( + 'label' => _x( 'Image', 'icon label' ), + 'filePath' => 'image.svg', + ), + 'info' => array( + 'label' => _x( 'Info', 'icon label' ), + 'filePath' => 'info.svg', + ), + 'key' => array( + 'label' => _x( 'Key', 'icon label' ), + 'filePath' => 'key.svg', + ), + 'language' => array( + 'label' => _x( 'Language', 'icon label' ), + 'filePath' => 'language.svg', + ), + 'map-marker' => array( + 'label' => _x( 'Map Marker', 'icon label' ), + 'filePath' => 'map-marker.svg', + ), + 'menu' => array( + 'label' => _x( 'Menu', 'icon label' ), + 'filePath' => 'menu.svg', + ), + 'mobile' => array( + 'label' => _x( 'Mobile', 'icon label' ), + 'filePath' => 'mobile.svg', + ), + 'more-horizontal' => array( + 'label' => _x( 'More Horizontal', 'icon label' ), + 'filePath' => 'more-horizontal.svg', + ), + 'more-vertical' => array( + 'label' => _x( 'More Vertical', 'icon label' ), + 'filePath' => 'more-vertical.svg', + ), + 'next' => array( + 'label' => _x( 'Next', 'icon label' ), + 'filePath' => 'next.svg', + ), + 'paragraph' => array( + 'label' => _x( 'Paragraph', 'icon label' ), + 'filePath' => 'paragraph.svg', + ), + 'payment' => array( + 'label' => _x( 'Payment', 'icon label' ), + 'filePath' => 'payment.svg', + ), + 'pencil' => array( + 'label' => _x( 'Pencil', 'icon label' ), + 'filePath' => 'pencil.svg', + ), + 'people' => array( + 'label' => _x( 'People', 'icon label' ), + 'filePath' => 'people.svg', + ), + 'plus' => array( + 'label' => _x( 'Plus', 'icon label' ), + 'filePath' => 'plus.svg', + ), + 'plus-circle' => array( + 'label' => _x( 'Plus Circle', 'icon label' ), + 'filePath' => 'plus-circle.svg', + ), + 'previous' => array( + 'label' => _x( 'Previous', 'icon label' ), + 'filePath' => 'previous.svg', + ), + 'published' => array( + 'label' => _x( 'Published', 'icon label' ), + 'filePath' => 'published.svg', + ), + 'quote' => array( + 'label' => _x( 'Quote', 'icon label' ), + 'filePath' => 'quote.svg', + ), + 'receipt' => array( + 'label' => _x( 'Receipt', 'icon label' ), + 'filePath' => 'receipt.svg', + ), + 'rss' => array( + 'label' => _x( 'RSS', 'icon label' ), + 'filePath' => 'rss.svg', + ), + 'scheduled' => array( + 'label' => _x( 'Scheduled', 'icon label' ), + 'filePath' => 'scheduled.svg', + ), + 'search' => array( + 'label' => _x( 'Search', 'icon label' ), + 'filePath' => 'search.svg', + ), + 'settings' => array( + 'label' => _x( 'Settings', 'icon label' ), + 'filePath' => 'settings.svg', + ), + 'shadow' => array( + 'label' => _x( 'Shadow', 'icon label' ), + 'filePath' => 'shadow.svg', + ), + 'share' => array( + 'label' => _x( 'Share', 'icon label' ), + 'filePath' => 'share.svg', + ), + 'shield' => array( + 'label' => _x( 'Shield', 'icon label' ), + 'filePath' => 'shield.svg', + ), + 'shuffle' => array( + 'label' => _x( 'Shuffle', 'icon label' ), + 'filePath' => 'shuffle.svg', + ), + 'star-empty' => array( + 'label' => _x( 'Star Empty', 'icon label' ), + 'filePath' => 'star-empty.svg', + ), + 'star-filled' => array( + 'label' => _x( 'Star Filled', 'icon label' ), + 'filePath' => 'star-filled.svg', + ), + 'star-half' => array( + 'label' => _x( 'Star Half', 'icon label' ), + 'filePath' => 'star-half.svg', + ), + 'store' => array( + 'label' => _x( 'Store', 'icon label' ), + 'filePath' => 'store.svg', + ), + 'styles' => array( + 'label' => _x( 'Styles', 'icon label' ), + 'filePath' => 'styles.svg', + ), + 'symbol' => array( + 'label' => _x( 'Symbol', 'icon label' ), + 'filePath' => 'symbol.svg', + ), + 'symbol-filled' => array( + 'label' => _x( 'Symbol Filled', 'icon label' ), + 'filePath' => 'symbol-filled.svg', + ), + 'table' => array( + 'label' => _x( 'Table', 'icon label' ), + 'filePath' => 'table.svg', + ), + 'tablet' => array( + 'label' => _x( 'Tablet', 'icon label' ), + 'filePath' => 'tablet.svg', + ), + 'tag' => array( + 'label' => _x( 'Tag', 'icon label' ), + 'filePath' => 'tag.svg', + ), + 'tip' => array( + 'label' => _x( 'Tip', 'icon label' ), + 'filePath' => 'tip.svg', + ), + 'upload' => array( + 'label' => _x( 'Upload', 'icon label' ), + 'filePath' => 'upload.svg', + ), + 'verse' => array( + 'label' => _x( 'Verse', 'icon label' ), + 'filePath' => 'verse.svg', + ), +); diff --git a/src/wp-includes/assets/script-loader-packages.php b/src/wp-includes/assets/script-loader-packages.php new file mode 100644 index 0000000000000..76a11f86cbc67 --- /dev/null +++ b/src/wp-includes/assets/script-loader-packages.php @@ -0,0 +1,901 @@ + array( + 'dependencies' => array( + 'wp-dom-ready', + 'wp-i18n' + ), + 'version' => 'af934e5259bc51b8718e' + ), + 'annotations.js' => array( + 'dependencies' => array( + 'wp-data', + 'wp-hooks', + 'wp-i18n', + 'wp-rich-text' + ), + 'version' => '4b07d06c67c3b5ea590c' + ), + 'api-fetch.js' => array( + 'dependencies' => array( + 'wp-i18n', + 'wp-url' + ), + 'version' => 'd7efe4dc1468d36c39b8' + ), + 'autop.js' => array( + 'dependencies' => array( + + ), + 'version' => '9d0d0901b46f0a9027c9' + ), + 'base-styles.js' => array( + 'dependencies' => array( + + ), + 'version' => '8ebe97b095beb7e9279b' + ), + 'blob.js' => array( + 'dependencies' => array( + + ), + 'version' => '198af75fe06d924090d8' + ), + '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' => '23207f52d0d266f6e1c4' + ), + '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-preferences', + 'wp-primitives', + 'wp-priority-queue', + 'wp-private-apis', + 'wp-rich-text', + 'wp-style-engine', + 'wp-theme', + 'wp-token-list', + 'wp-upload-media', + 'wp-url', + 'wp-warning' + ), + 'version' => 'afd696e3eb4ece940110' + ), + 'block-library.js' => array( + 'dependencies' => array( + 'react', + '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-primitives', + 'wp-private-apis', + 'wp-rich-text', + 'wp-server-side-render', + 'wp-upload-media', + 'wp-url', + 'wp-wordcount' + ), + 'module_dependencies' => array( + array( + 'id' => '@wordpress/latex-to-mathml', + 'import' => 'dynamic' + ) + ), + 'version' => 'd72ed53f961f90f21ed4' + ), + 'block-serialization-default-parser.js' => array( + 'dependencies' => array( + + ), + 'version' => 'bff55bd3f1ce9df0c99c' + ), + 'block-serialization-spec-parser.js' => array( + 'dependencies' => array( + + ), + 'version' => '9ebc5e95e1de1cabd1e6' + ), + '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-private-apis', + 'wp-rich-text', + 'wp-shortcode', + 'wp-warning' + ), + 'version' => 'ef38e42500165bfda301' + ), + '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' => 'e3d8bba53f4ffea4fcd2' + ), + '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' => 'e4a2b31831c0887fbe70' + ), + 'compose.js' => array( + 'dependencies' => array( + 'react', + 'react-jsx-runtime', + 'wp-deprecated', + 'wp-dom', + 'wp-element', + 'wp-is-shallow-equal', + 'wp-keycodes', + 'wp-priority-queue', + 'wp-undo-manager' + ), + 'version' => 'edb5a8c0b5bf71686403' + ), + '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-primitives', + 'wp-private-apis', + 'wp-router', + 'wp-url' + ), + 'version' => 'b209152e7e51279d7c28' + ), + '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-private-apis', + 'wp-rich-text', + 'wp-sync', + 'wp-undo-manager', + 'wp-url', + 'wp-warning' + ), + 'version' => '4d15c0f82a9fb01a04ed' + ), + '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' => '524dc7a4326b77064831' + ), + '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' => 'dc7feb6ad8da53887680' + ), + 'data-controls.js' => array( + 'dependencies' => array( + 'wp-api-fetch', + 'wp-data', + 'wp-deprecated' + ), + 'version' => '730061ade69d7f341014' + ), + 'date.js' => array( + 'dependencies' => array( + 'moment', + 'wp-deprecated' + ), + 'version' => 'c9f8e7dd3232716f34e9' + ), + 'deprecated.js' => array( + 'dependencies' => array( + 'wp-hooks' + ), + 'version' => '990e85f234fee8f7d446' + ), + 'dom.js' => array( + 'dependencies' => array( + 'wp-deprecated' + ), + 'version' => '66a6cf58e0c4cd128af0' + ), + 'dom-ready.js' => array( + 'dependencies' => array( + + ), + 'version' => 'a06281ae5cf5500e9317' + ), + 'edit-post.js' => array( + 'dependencies' => array( + 'media-models', + 'media-views', + 'postbox', + 'react', + 'react-dom', + 'react-jsx-runtime', + 'wp-a11y', + 'wp-api-fetch', + 'wp-block-editor', + 'wp-block-library', + 'wp-blocks', + 'wp-commands', + 'wp-components', + 'wp-compose', + 'wp-core-data', + 'wp-data', + 'wp-deprecated', + 'wp-editor', + 'wp-element', + 'wp-hooks', + 'wp-html-entities', + 'wp-i18n', + 'wp-keyboard-shortcuts', + 'wp-keycodes', + 'wp-notices', + 'wp-plugins', + 'wp-preferences', + 'wp-primitives', + 'wp-private-apis', + 'wp-style-engine', + 'wp-theme', + 'wp-url', + 'wp-widgets' + ), + 'module_dependencies' => array( + array( + 'id' => '@wordpress/route', + 'import' => 'static' + ) + ), + 'version' => 'f84d20a8526b3463e9ff' + ), + '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-data', + 'wp-data', + 'wp-date', + 'wp-deprecated', + 'wp-dom', + 'wp-dom-ready', + 'wp-editor', + 'wp-element', + 'wp-html-entities', + 'wp-i18n', + 'wp-keyboard-shortcuts', + 'wp-keycodes', + 'wp-notices', + 'wp-patterns', + 'wp-plugins', + 'wp-preferences', + 'wp-primitives', + 'wp-private-apis', + 'wp-router', + 'wp-style-engine', + 'wp-theme', + 'wp-url', + 'wp-warning', + 'wp-widgets' + ), + 'module_dependencies' => array( + array( + 'id' => '@wordpress/route', + 'import' => 'static' + ) + ), + 'version' => 'a688ac97344ffdfcca99' + ), + 'edit-widgets.js' => array( + 'dependencies' => array( + 'react', + 'react-dom', + 'react-jsx-runtime', + 'wp-a11y', + 'wp-api-fetch', + 'wp-block-editor', + 'wp-block-library', + 'wp-blocks', + 'wp-components', + 'wp-compose', + 'wp-core-data', + 'wp-data', + 'wp-deprecated', + 'wp-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-theme', + 'wp-url', + 'wp-viewport', + 'wp-widgets' + ), + 'module_dependencies' => array( + array( + 'id' => '@wordpress/route', + 'import' => 'static' + ) + ), + 'version' => '899c5ac5dcb94e19d378' + ), + 'editor.js' => array( + 'dependencies' => array( + 'react', + 'react-dom', + 'react-jsx-runtime', + 'wp-a11y', + 'wp-api-fetch', + 'wp-blob', + 'wp-block-editor', + 'wp-block-serialization-default-parser', + '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-preferences', + 'wp-primitives', + 'wp-private-apis', + 'wp-rich-text', + 'wp-server-side-render', + 'wp-style-engine', + 'wp-theme', + 'wp-upload-media', + 'wp-url', + 'wp-viewport', + 'wp-warning', + 'wp-wordcount' + ), + 'module_dependencies' => array( + array( + 'id' => '@wordpress/route', + 'import' => 'static' + ) + ), + 'version' => 'e69206b7021374eb713a' + ), + 'element.js' => array( + 'dependencies' => array( + 'react', + 'react-dom', + 'wp-escape-html' + ), + 'version' => '15ba804677f72a8db97b' + ), + 'escape-html.js' => array( + 'dependencies' => array( + + ), + 'version' => '3f093e5cca67aa0f8b56' + ), + 'format-library.js' => array( + 'dependencies' => array( + 'react-jsx-runtime', + 'wp-a11y', + 'wp-block-editor', + 'wp-components', + 'wp-compose', + 'wp-data', + 'wp-element', + 'wp-html-entities', + 'wp-i18n', + 'wp-primitives', + 'wp-private-apis', + 'wp-rich-text', + 'wp-url' + ), + 'module_dependencies' => array( + array( + 'id' => '@wordpress/latex-to-mathml', + 'import' => 'dynamic' + ) + ), + 'version' => 'f89be9586f2d9ce4545a' + ), + 'hooks.js' => array( + 'dependencies' => array( + + ), + 'version' => '7496969728ca0f95732d' + ), + 'html-entities.js' => array( + 'dependencies' => array( + + ), + 'version' => '8c6fa5b869dfeadc4af2' + ), + 'i18n.js' => array( + 'dependencies' => array( + 'wp-hooks' + ), + 'version' => '781d11515ad3d91786ec' + ), + 'is-shallow-equal.js' => array( + 'dependencies' => array( + + ), + 'version' => '5d84b9f3cb50d2ce7d04' + ), + 'keyboard-shortcuts.js' => array( + 'dependencies' => array( + 'react-jsx-runtime', + 'wp-data', + 'wp-element', + 'wp-keycodes' + ), + 'version' => '2ed78d3b4c23f38804e0' + ), + 'keycodes.js' => array( + 'dependencies' => array( + 'wp-i18n' + ), + 'version' => 'aa1a141e3468afe7f852' + ), + 'list-reusable-blocks.js' => array( + 'dependencies' => array( + 'react-jsx-runtime', + 'wp-api-fetch', + 'wp-blob', + 'wp-components', + 'wp-compose', + 'wp-element', + 'wp-i18n' + ), + 'version' => '2e35ebd5dbaccb5a90c5' + ), + 'media-utils.js' => array( + 'dependencies' => array( + 'react', + 'react-dom', + 'react-jsx-runtime', + 'wp-a11y', + 'wp-api-fetch', + 'wp-blob', + 'wp-components', + 'wp-compose', + 'wp-core-data', + 'wp-data', + 'wp-date', + 'wp-deprecated', + 'wp-element', + 'wp-i18n', + 'wp-keycodes', + 'wp-notices', + 'wp-primitives', + 'wp-private-apis', + 'wp-theme', + 'wp-url', + 'wp-warning' + ), + 'version' => '85f1375ab5f23cd5d13c' + ), + 'notices.js' => array( + 'dependencies' => array( + 'react-jsx-runtime', + 'wp-components', + 'wp-data' + ), + 'version' => '218d0173a31ae7269246' + ), + 'nux.js' => array( + 'dependencies' => array( + 'react-jsx-runtime', + 'wp-components', + 'wp-compose', + 'wp-data', + 'wp-deprecated', + 'wp-element', + 'wp-i18n', + 'wp-primitives' + ), + 'version' => '14d2335a0007b36b9112' + ), + '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' => '4b640c092eb654d2bd78' + ), + 'plugins.js' => array( + 'dependencies' => array( + 'react-jsx-runtime', + 'wp-compose', + 'wp-deprecated', + 'wp-element', + 'wp-hooks', + 'wp-is-shallow-equal', + 'wp-primitives' + ), + 'version' => '72e3cf01c2b3535a9432' + ), + 'preferences.js' => array( + 'dependencies' => array( + 'react-jsx-runtime', + 'wp-a11y', + 'wp-components', + 'wp-compose', + 'wp-data', + 'wp-deprecated', + 'wp-element', + 'wp-i18n', + 'wp-preferences-persistence', + 'wp-primitives', + 'wp-private-apis' + ), + 'version' => '035813168e404aa30193' + ), + 'preferences-persistence.js' => array( + 'dependencies' => array( + 'wp-api-fetch' + ), + 'version' => 'e8033be98338d1861bca' + ), + 'primitives.js' => array( + 'dependencies' => array( + 'react-jsx-runtime', + 'wp-element' + ), + 'version' => 'a5c905ec27bcd76ef287' + ), + 'priority-queue.js' => array( + 'dependencies' => array( + + ), + 'version' => '1f0e89e247bc0bd3f9b9' + ), + 'private-apis.js' => array( + 'dependencies' => array( + + ), + 'version' => '835912f0086b9e59aed4' + ), + 'react-i18n.js' => array( + 'dependencies' => array( + 'react-jsx-runtime', + 'wp-element', + 'wp-i18n' + ), + 'version' => '9b74577dbd7e50f6b77b' + ), + 'redux-routine.js' => array( + 'dependencies' => array( + + ), + 'version' => '64f9f5001aabc046c605' + ), + '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' => 'c72d27a8ac4e33cb74d6' + ), + 'rich-text.js' => array( + 'dependencies' => array( + 'wp-a11y', + 'wp-compose', + 'wp-data', + 'wp-deprecated', + 'wp-dom', + 'wp-element', + 'wp-escape-html', + 'wp-i18n', + 'wp-keycodes', + 'wp-private-apis' + ), + 'version' => '16449e6108f48327f368' + ), + 'router.js' => array( + 'dependencies' => array( + 'react-jsx-runtime', + 'wp-compose', + 'wp-element', + 'wp-private-apis', + 'wp-url' + ), + 'version' => '0249e6724784b1c2583b' + ), + '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' => '10a51bf05ced35b78092' + ), + 'shortcode.js' => array( + 'dependencies' => array( + + ), + 'version' => '11742fe18cc215d3d5ab' + ), + 'style-engine.js' => array( + 'dependencies' => array( + + ), + 'version' => 'faa37ce61b7ec8394b2a' + ), + 'sync.js' => array( + 'dependencies' => array( + 'wp-api-fetch', + 'wp-hooks', + 'wp-private-apis' + ), + 'version' => '1689dd817b0c6fd5ab4d' + ), + 'theme.js' => array( + 'dependencies' => array( + 'react-jsx-runtime', + 'wp-element', + 'wp-private-apis' + ), + 'version' => 'e22ce547a4420507b323' + ), + 'token-list.js' => array( + 'dependencies' => array( + + ), + 'version' => '16f0aebdd39d87c2a84b' + ), + 'undo-manager.js' => array( + 'dependencies' => array( + 'wp-is-shallow-equal' + ), + 'version' => '27bb0ae036a2c9d4a1b5' + ), + 'upload-media.js' => array( + 'dependencies' => array( + 'react-jsx-runtime', + 'wp-blob', + 'wp-compose', + 'wp-data', + 'wp-element', + 'wp-i18n', + 'wp-private-apis', + 'wp-url' + ), + 'module_dependencies' => array( + + ), + 'version' => 'd359c2cccf866d7082d2' + ), + 'url.js' => array( + 'dependencies' => array( + + ), + 'version' => 'bb0f766c3d2efe497871' + ), + 'viewport.js' => array( + 'dependencies' => array( + 'react-jsx-runtime', + 'wp-compose', + 'wp-data' + ), + 'version' => '8614025b8075d220d78f' + ), + 'warning.js' => array( + 'dependencies' => array( + + ), + 'version' => '36fdbdc984d93aee8a97' + ), + '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-primitives' + ), + 'version' => '02b8dd683bc610f979fa' + ), + 'wordcount.js' => array( + 'dependencies' => array( + + ), + 'version' => '3b928d5db8724a8614dd' + ) +); \ No newline at end of file diff --git a/src/wp-includes/assets/script-modules-packages.php b/src/wp-includes/assets/script-modules-packages.php new file mode 100644 index 0000000000000..3e08056d7ecac --- /dev/null +++ b/src/wp-includes/assets/script-modules-packages.php @@ -0,0 +1,308 @@ + array( + 'dependencies' => array( + + ), + 'version' => '1c371cb517a97cdbcb9f' + ), + 'abilities/index.js' => array( + 'dependencies' => array( + 'wp-data', + 'wp-i18n' + ), + 'version' => 'f3475bc77a30dcc5b38d' + ), + 'block-editor/utils/fit-text-frontend.js' => array( + 'dependencies' => array( + + ), + 'module_dependencies' => array( + array( + 'id' => '@wordpress/interactivity', + 'import' => 'static' + ) + ), + 'version' => '383c7a8bd24a1f2fd9b9' + ), + 'block-library/accordion/view.js' => array( + 'dependencies' => array( + + ), + 'module_dependencies' => array( + array( + 'id' => '@wordpress/interactivity', + 'import' => 'static' + ) + ), + 'version' => '2af01b43d30739c3fb8d' + ), + 'block-library/file/view.js' => array( + 'dependencies' => array( + + ), + 'module_dependencies' => array( + array( + 'id' => '@wordpress/interactivity', + 'import' => 'static' + ) + ), + 'version' => '7d4d261d10dca47ebecb' + ), + 'block-library/form/view.js' => array( + 'dependencies' => array( + + ), + 'version' => '5542f8ad251fe43ef09e' + ), + 'block-library/image/view.js' => array( + 'dependencies' => array( + + ), + 'module_dependencies' => array( + array( + 'id' => '@wordpress/interactivity', + 'import' => 'static' + ) + ), + 'version' => '25ee935fd6c67371d0f3' + ), + 'block-library/navigation/view.js' => array( + 'dependencies' => array( + + ), + 'module_dependencies' => array( + array( + 'id' => '@wordpress/interactivity', + 'import' => 'static' + ) + ), + 'version' => '96a846e1d7b789c39ab9' + ), + 'block-library/playlist/view.js' => array( + 'dependencies' => array( + + ), + 'module_dependencies' => array( + array( + 'id' => '@wordpress/interactivity', + 'import' => 'static' + ) + ), + 'version' => '99f747d731f80246db11' + ), + 'block-library/query/view.js' => array( + 'dependencies' => array( + + ), + 'module_dependencies' => array( + array( + 'id' => '@wordpress/interactivity', + 'import' => 'static' + ), + array( + 'id' => '@wordpress/interactivity-router', + 'import' => 'dynamic' + ) + ), + 'version' => '7a4ec5bfb61a7137cf4b' + ), + 'block-library/search/view.js' => array( + 'dependencies' => array( + + ), + 'module_dependencies' => array( + array( + 'id' => '@wordpress/interactivity', + 'import' => 'static' + ) + ), + 'version' => '38bd0e230eaffa354d2a' + ), + 'block-library/tabs/view.js' => array( + 'dependencies' => array( + + ), + 'module_dependencies' => array( + array( + 'id' => '@wordpress/interactivity', + 'import' => 'static' + ) + ), + 'version' => '1f60dd5e3fa56c6b2e2e' + ), + 'boot/index.js' => array( + 'dependencies' => array( + 'react', + 'react-dom', + 'react-jsx-runtime', + 'wp-commands', + 'wp-components', + 'wp-compose', + 'wp-core-data', + 'wp-data', + 'wp-editor', + 'wp-element', + 'wp-html-entities', + 'wp-i18n', + 'wp-keyboard-shortcuts', + 'wp-keycodes', + 'wp-notices', + 'wp-primitives', + 'wp-private-apis', + 'wp-theme', + 'wp-url' + ), + 'module_dependencies' => array( + array( + 'id' => '@wordpress/a11y', + 'import' => 'static' + ), + array( + 'id' => '@wordpress/lazy-editor', + 'import' => 'dynamic' + ), + array( + 'id' => '@wordpress/route', + 'import' => 'static' + ) + ), + 'version' => '105defe2f1526f8a43e8' + ), + 'connectors/index.js' => array( + 'dependencies' => array( + 'react-jsx-runtime', + 'wp-components', + 'wp-data', + 'wp-element', + 'wp-i18n', + 'wp-private-apis' + ), + 'version' => 'c9991cd0656dfe1c46e9' + ), + 'core-abilities/index.js' => array( + 'dependencies' => array( + 'wp-api-fetch', + 'wp-url' + ), + 'module_dependencies' => array( + array( + 'id' => '@wordpress/abilities', + 'import' => 'static' + ) + ), + 'version' => '7cd8fe3a80dded97579b' + ), + 'edit-site-init/index.js' => array( + 'dependencies' => array( + 'react-jsx-runtime', + 'wp-data', + 'wp-element', + 'wp-primitives' + ), + 'module_dependencies' => array( + array( + 'id' => '@wordpress/boot', + 'import' => 'static' + ) + ), + 'version' => 'e57f44d1a9f69e75d2d9' + ), + 'interactivity/index.js' => array( + 'dependencies' => array( + + ), + 'version' => '4d2a3a72c7410d548881' + ), + 'interactivity-router/full-page.js' => array( + 'dependencies' => array( + + ), + 'module_dependencies' => array( + array( + 'id' => '@wordpress/interactivity-router', + 'import' => 'dynamic' + ) + ), + 'version' => '5c07cd7a12ae073c5241' + ), + 'interactivity-router/index.js' => array( + 'dependencies' => array( + + ), + 'module_dependencies' => array( + array( + 'id' => '@wordpress/a11y', + 'import' => 'dynamic' + ), + array( + 'id' => '@wordpress/interactivity', + 'import' => 'static' + ) + ), + 'version' => '71aa17bac91628a0f874' + ), + 'latex-to-mathml/index.js' => array( + 'dependencies' => array( + + ), + 'version' => 'e5fd3ae6d2c3b6e669da' + ), + 'latex-to-mathml/loader.js' => array( + 'dependencies' => array( + + ), + 'module_dependencies' => array( + array( + 'id' => '@wordpress/latex-to-mathml', + 'import' => 'dynamic' + ) + ), + 'version' => '4f37456af539bd3d2351' + ), + 'lazy-editor/index.js' => array( + 'dependencies' => array( + 'react-jsx-runtime', + 'wp-block-editor', + 'wp-blocks', + 'wp-components', + 'wp-core-data', + 'wp-data', + 'wp-editor', + 'wp-element', + 'wp-i18n', + 'wp-private-apis', + 'wp-style-engine' + ), + 'version' => '30ab62f45bfe9f971ea0' + ), + 'route/index.js' => array( + 'dependencies' => array( + 'react', + 'react-dom', + 'react-jsx-runtime', + 'wp-private-apis' + ), + 'version' => 'c5843b6c5e84b352f43b' + ), + 'workflow/index.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' + ), + 'module_dependencies' => array( + array( + 'id' => '@wordpress/abilities', + 'import' => 'static' + ) + ), + 'version' => '13556bc597bbf2a8d620' + ) +); \ No newline at end of file diff --git a/src/wp-includes/blocks/accordion-heading/block.json b/src/wp-includes/blocks/accordion-heading/block.json new file mode 100644 index 0000000000000..e1ccf83dd3c1b --- /dev/null +++ b/src/wp-includes/blocks/accordion-heading/block.json @@ -0,0 +1,94 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/accordion-heading", + "title": "Accordion Heading", + "category": "design", + "description": "Displays a heading that toggles the accordion panel.", + "parent": [ "core/accordion-item" ], + "usesContext": [ + "core/accordion-icon-position", + "core/accordion-show-icon", + "core/accordion-heading-level" + ], + "supports": { + "anchor": true, + "color": { + "background": true, + "gradients": true + }, + "align": false, + "interactivity": true, + "spacing": { + "padding": true, + "__experimentalDefaultControls": { + "padding": true + }, + "__experimentalSkipSerialization": true, + "__experimentalSelector": ".wp-block-accordion-heading__toggle" + }, + "__experimentalBorder": { + "color": true, + "radius": true, + "style": true, + "width": true, + "__experimentalDefaultControls": { + "color": true, + "radius": true, + "style": true, + "width": true + } + }, + "typography": { + "__experimentalSkipSerialization": [ + "textDecoration", + "letterSpacing" + ], + "fontSize": true, + "__experimentalFontFamily": true, + "__experimentalFontWeight": true, + "__experimentalFontStyle": true, + "__experimentalTextTransform": true, + "__experimentalTextDecoration": true, + "__experimentalLetterSpacing": true, + "__experimentalDefaultControls": { + "fontSize": true, + "fontFamily": true + } + }, + "shadow": true, + "visibility": false, + "lock": false + }, + "selectors": { + "typography": { + "letterSpacing": ".wp-block-accordion-heading .wp-block-accordion-heading__toggle-title", + "textDecoration": ".wp-block-accordion-heading .wp-block-accordion-heading__toggle-title" + } + }, + "attributes": { + "openByDefault": { + "type": "boolean", + "default": false + }, + "title": { + "type": "rich-text", + "source": "rich-text", + "selector": ".wp-block-accordion-heading__toggle-title", + "role": "content" + }, + "level": { + "type": "number" + }, + "iconPosition": { + "type": "string", + "enum": [ "left", "right" ], + "default": "right" + }, + "showIcon": { + "type": "boolean", + "default": true + } + }, + "textdomain": "default" +} diff --git a/src/wp-includes/blocks/accordion-item.php b/src/wp-includes/blocks/accordion-item.php new file mode 100644 index 0000000000000..a16a1426e346d --- /dev/null +++ b/src/wp-includes/blocks/accordion-item.php @@ -0,0 +1,87 @@ + function () { + $context = wp_interactivity_get_context(); + return $context['openByDefault']; + }, + ) + ); + + if ( $p->next_tag( array( 'class_name' => 'wp-block-accordion-item' ) ) ) { + $open_by_default = $attributes['openByDefault'] ? 'true' : 'false'; + $p->set_attribute( 'data-wp-context', '{ "id": "' . $unique_id . '", "openByDefault": ' . $open_by_default . ' }' ); + $p->set_attribute( 'data-wp-class--is-open', 'state.isOpen' ); + $p->set_attribute( 'data-wp-init', 'callbacks.initAccordionItems' ); + $p->set_attribute( 'data-wp-on-window--hashchange', 'callbacks.hashChange' ); + + if ( $p->next_tag( array( 'class_name' => 'wp-block-accordion-heading__toggle' ) ) ) { + $p->set_attribute( 'data-wp-on--click', 'actions.toggle' ); + $p->set_attribute( 'data-wp-on--keydown', 'actions.handleKeyDown' ); + $p->set_attribute( 'id', $unique_id ); + $p->set_attribute( 'aria-controls', $unique_id . '-panel' ); + $p->set_attribute( 'data-wp-bind--aria-expanded', 'state.isOpen' ); + + if ( $p->next_tag( array( 'class_name' => 'wp-block-accordion-panel' ) ) ) { + $p->set_attribute( 'id', $unique_id . '-panel' ); + $p->set_attribute( 'aria-labelledby', $unique_id ); + $p->set_attribute( 'data-wp-bind--inert', '!state.isOpen' ); + + // Only modify content if all directives have been set. + $content = $p->get_updated_html(); + } + } + } + + /* + * If an Accordion Item is collapsed by default, ensure any contained IMG has fetchpriority=low to deprioritize it + * from contending with resources in the critical rendering path. In contrast, remove the loading attribute to + * prevent the image from not being available when the item is expanded. + */ + if ( ! $attributes['openByDefault'] ) { + $processor = new WP_HTML_Tag_Processor( $content ); + while ( $processor->next_tag( 'IMG' ) ) { + $processor->set_attribute( 'fetchpriority', 'low' ); + } + $content = $processor->get_updated_html(); + } + + return $content; +} + +/** + * Registers the `core/accordion-item` block on server. + * + * @since 6.9.0 + */ +function register_block_core_accordion_item() { + register_block_type_from_metadata( + __DIR__ . '/accordion-item', + array( + 'render_callback' => 'block_core_accordion_item_render', + ) + ); +} +add_action( 'init', 'register_block_core_accordion_item' ); diff --git a/src/wp-includes/blocks/accordion-item/block.json b/src/wp-includes/blocks/accordion-item/block.json new file mode 100644 index 0000000000000..74bfddde0e68b --- /dev/null +++ b/src/wp-includes/blocks/accordion-item/block.json @@ -0,0 +1,63 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/accordion-item", + "title": "Accordion Item", + "category": "design", + "description": "Wraps the heading and panel in one unit.", + "parent": [ "core/accordion" ], + "allowedBlocks": [ "core/accordion-heading", "core/accordion-panel" ], + "supports": { + "html": false, + "color": { + "background": true, + "gradients": true + }, + "interactivity": true, + "spacing": { + "margin": [ "top", "bottom" ], + "blockGap": true + }, + "__experimentalBorder": { + "color": true, + "radius": true, + "style": true, + "width": true, + "__experimentalDefaultControls": { + "color": true, + "radius": true, + "style": true, + "width": true + } + }, + "shadow": true, + "layout": { + "allowEditing": false + }, + "typography": { + "fontSize": true, + "lineHeight": true, + "__experimentalFontFamily": true, + "__experimentalFontWeight": true, + "__experimentalFontStyle": true, + "__experimentalTextTransform": true, + "__experimentalTextDecoration": true, + "__experimentalLetterSpacing": true, + "__experimentalDefaultControls": { + "fontSize": true + } + }, + "contentRole": true + }, + "attributes": { + "openByDefault": { + "type": "boolean", + "default": false + } + }, + "providesContext": { + "core/accordion-open-by-default": "openByDefault" + }, + "textdomain": "default", + "style": "wp-block-accordion-item" +} diff --git a/src/wp-includes/blocks/accordion-panel/block.json b/src/wp-includes/blocks/accordion-panel/block.json new file mode 100644 index 0000000000000..b868ac8019b0d --- /dev/null +++ b/src/wp-includes/blocks/accordion-panel/block.json @@ -0,0 +1,68 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/accordion-panel", + "title": "Accordion Panel", + "category": "design", + "description": "Contains the hidden or revealed content beneath the heading.", + "parent": [ "core/accordion-item" ], + "usesContext": [ "core/accordion-open-by-default" ], + "supports": { + "html": false, + "color": { + "background": true, + "gradients": true + }, + "interactivity": true, + "spacing": { + "padding": true, + "blockGap": true, + "__experimentalDefaultControls": { + "padding": true, + "blockGap": true + } + }, + "__experimentalBorder": { + "color": true, + "radius": true, + "style": true, + "width": true, + "__experimentalDefaultControls": { + "color": true, + "radius": true, + "style": true, + "width": true + } + }, + "typography": { + "fontSize": true, + "lineHeight": true, + "__experimentalFontFamily": true, + "__experimentalFontWeight": true, + "__experimentalFontStyle": true, + "__experimentalTextTransform": true, + "__experimentalTextDecoration": true, + "__experimentalLetterSpacing": true, + "__experimentalDefaultControls": { + "fontSize": true + } + }, + "shadow": true, + "layout": { + "allowEditing": false + }, + "visibility": false, + "contentRole": true, + "allowedBlocks": true, + "lock": false + }, + "attributes": { + "templateLock": { + "type": [ "string", "boolean" ], + "enum": [ "all", "insert", "contentOnly", false ], + "default": false + } + }, + "textdomain": "default", + "style": "wp-block-accordion-panel" +} diff --git a/src/wp-includes/blocks/accordion.php b/src/wp-includes/blocks/accordion.php new file mode 100644 index 0000000000000..537904a6e402d --- /dev/null +++ b/src/wp-includes/blocks/accordion.php @@ -0,0 +1,45 @@ +next_tag( array( 'class_name' => 'wp-block-accordion' ) ) ) { + $p->set_attribute( 'data-wp-interactive', 'core/accordion' ); + $p->set_attribute( 'data-wp-context', '{ "autoclose": ' . $autoclose . ', "accordionItems": [] }' ); + + // Only modify content if directives have been set. + $content = $p->get_updated_html(); + } + + return $content; +} + +/** + * Registers the `core/accordion` block on server. + * + * @since 6.9.0 + */ +function register_block_core_accordion() { + register_block_type_from_metadata( + __DIR__ . '/accordion', + array( + 'render_callback' => 'render_block_core_accordion', + ) + ); +} +add_action( 'init', 'register_block_core_accordion' ); diff --git a/src/wp-includes/blocks/accordion/block.json b/src/wp-includes/blocks/accordion/block.json new file mode 100644 index 0000000000000..69923748a553f --- /dev/null +++ b/src/wp-includes/blocks/accordion/block.json @@ -0,0 +1,90 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/accordion", + "title": "Accordion", + "category": "design", + "description": "Displays a foldable layout that groups content in collapsible sections.", + "example": {}, + "supports": { + "anchor": true, + "html": false, + "align": [ "wide", "full" ], + "background": { + "backgroundImage": true, + "backgroundSize": true, + "__experimentalDefaultControls": { + "backgroundImage": true + } + }, + "color": { + "background": true, + "gradients": true + }, + "__experimentalBorder": { + "color": true, + "radius": true, + "style": true, + "width": true, + "__experimentalDefaultControls": { + "color": true, + "radius": true, + "style": true, + "width": true + } + }, + "spacing": { + "padding": true, + "margin": [ "top", "bottom" ], + "blockGap": true + }, + "shadow": true, + "layout": true, + "ariaLabel": true, + "interactivity": true, + "typography": { + "fontSize": true, + "lineHeight": true, + "__experimentalFontFamily": true, + "__experimentalFontWeight": true, + "__experimentalFontStyle": true, + "__experimentalTextTransform": true, + "__experimentalTextDecoration": true, + "__experimentalLetterSpacing": true, + "__experimentalDefaultControls": { + "fontSize": true + } + }, + "contentRole": true, + "listView": true + }, + "attributes": { + "iconPosition": { + "type": "string", + "default": "right" + }, + "showIcon": { + "type": "boolean", + "default": true + }, + "autoclose": { + "type": "boolean", + "default": false + }, + "headingLevel": { + "type": "number", + "default": 3 + }, + "levelOptions": { + "type": "array" + } + }, + "providesContext": { + "core/accordion-icon-position": "iconPosition", + "core/accordion-show-icon": "showIcon", + "core/accordion-heading-level": "headingLevel" + }, + "allowedBlocks": [ "core/accordion-item" ], + "textdomain": "default", + "viewScriptModule": "@wordpress/block-library/accordion/view" +} diff --git a/src/wp-includes/blocks/archives.php b/src/wp-includes/blocks/archives.php new file mode 100644 index 0000000000000..cead720f7fb80 --- /dev/null +++ b/src/wp-includes/blocks/archives.php @@ -0,0 +1,174 @@ + $type, + 'format' => 'option', + 'show_post_count' => $show_post_count, + ) + ); + + $dropdown_args['echo'] = 0; + + $archives = wp_get_archives( $dropdown_args ); + + $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $class ) ); + + switch ( $dropdown_args['type'] ) { + case 'yearly': + $label = __( 'Select Year' ); + break; + case 'monthly': + $label = __( 'Select Month' ); + break; + case 'daily': + $label = __( 'Select Day' ); + break; + case 'weekly': + $label = __( 'Select Week' ); + break; + default: + $label = __( 'Select Post' ); + break; + } + + $show_label = empty( $attributes['showLabel'] ) ? ' screen-reader-text' : ''; + + $block_content = ' + '; + + // Inject the dropdown script immediately after the select dropdown. + $block_content .= block_core_archives_build_dropdown_script( $dropdown_id ); + + return sprintf( + '
%2$s
', + $wrapper_attributes, + $block_content + ); + } + + /** This filter is documented in wp-includes/widgets/class-wp-widget-archives.php */ + $archives_args = apply_filters( + 'widget_archives_args', + array( + 'type' => $type, + 'show_post_count' => $show_post_count, + ) + ); + + $archives_args['echo'] = 0; + + $archives = wp_get_archives( $archives_args ); + + $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $class ) ); + + if ( empty( $archives ) ) { + return sprintf( + '
%2$s
', + $wrapper_attributes, + __( 'No archives to show.' ) + ); + } + + return sprintf( + '', + $wrapper_attributes, + $archives + ); +} + +/** + * Generates the inline script for an archives dropdown field. + * + * @since 6.9.0 + * + * @param string $dropdown_id ID of the dropdown field. + * + * @return string Returns the dropdown onChange redirection script. + */ +function block_core_archives_build_dropdown_script( $dropdown_id ) { + ob_start(); + + $exports = array( $dropdown_id, home_url() ); + ?> + + ', '' ), '', ob_get_clean() ) ) . + "\n//# sourceURL=" . rawurlencode( __FUNCTION__ ) + ); +} + +/** + * Register archives block. + * + * @since 5.0.0 + */ +function register_block_core_archives() { + register_block_type_from_metadata( + __DIR__ . '/archives', + array( + 'render_callback' => 'render_block_core_archives', + ) + ); +} +add_action( 'init', 'register_block_core_archives' ); diff --git a/src/wp-includes/blocks/archives/block.json b/src/wp-includes/blocks/archives/block.json new file mode 100644 index 0000000000000..c689b34ba9d24 --- /dev/null +++ b/src/wp-includes/blocks/archives/block.json @@ -0,0 +1,71 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/archives", + "title": "Archives", + "category": "widgets", + "description": "Display a date archive of your posts.", + "textdomain": "default", + "attributes": { + "displayAsDropdown": { + "type": "boolean", + "default": false + }, + "showLabel": { + "type": "boolean", + "default": true + }, + "showPostCounts": { + "type": "boolean", + "default": false + }, + "type": { + "type": "string", + "default": "monthly" + } + }, + "supports": { + "anchor": true, + "align": true, + "__experimentalBorder": { + "radius": true, + "color": true, + "width": true, + "style": true + }, + "html": false, + "spacing": { + "margin": true, + "padding": true, + "__experimentalDefaultControls": { + "margin": false, + "padding": false + } + }, + "typography": { + "fontSize": true, + "lineHeight": true, + "__experimentalFontFamily": true, + "__experimentalFontWeight": true, + "__experimentalFontStyle": true, + "__experimentalTextTransform": true, + "__experimentalTextDecoration": true, + "__experimentalLetterSpacing": true, + "__experimentalDefaultControls": { + "fontSize": true + } + }, + "color": { + "gradients": true, + "link": true, + "__experimentalDefaultControls": { + "background": true, + "text": true, + "link": true + } + }, + "interactivity": { + "clientNavigation": true + } + } +} diff --git a/src/wp-includes/blocks/audio/block.json b/src/wp-includes/blocks/audio/block.json new file mode 100644 index 0000000000000..9b77efee23cce --- /dev/null +++ b/src/wp-includes/blocks/audio/block.json @@ -0,0 +1,68 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/audio", + "title": "Audio", + "category": "media", + "description": "Embed a simple audio player.", + "keywords": [ "music", "sound", "podcast", "recording" ], + "textdomain": "default", + "attributes": { + "blob": { + "type": "string", + "role": "local" + }, + "src": { + "type": "string", + "source": "attribute", + "selector": "audio", + "attribute": "src", + "role": "content" + }, + "caption": { + "type": "rich-text", + "source": "rich-text", + "selector": "figcaption", + "role": "content" + }, + "id": { + "type": "number", + "role": "content" + }, + "autoplay": { + "type": "boolean", + "source": "attribute", + "selector": "audio", + "attribute": "autoplay" + }, + "loop": { + "type": "boolean", + "source": "attribute", + "selector": "audio", + "attribute": "loop" + }, + "preload": { + "type": "string", + "source": "attribute", + "selector": "audio", + "attribute": "preload" + } + }, + "supports": { + "anchor": true, + "align": true, + "spacing": { + "margin": true, + "padding": true, + "__experimentalDefaultControls": { + "margin": false, + "padding": false + } + }, + "interactivity": { + "clientNavigation": true + } + }, + "editorStyle": "wp-block-audio-editor", + "style": "wp-block-audio" +} diff --git a/src/wp-includes/blocks/avatar.php b/src/wp-includes/blocks/avatar.php new file mode 100644 index 0000000000000..7f73370973d42 --- /dev/null +++ b/src/wp-includes/blocks/avatar.php @@ -0,0 +1,166 @@ +context['commentId'] ) ) { + if ( isset( $attributes['userId'] ) ) { + $author_id = $attributes['userId']; + } elseif ( isset( $block->context['postId'] ) ) { + $author_id = get_post_field( 'post_author', $block->context['postId'] ); + } else { + $author_id = get_query_var( 'author' ); + } + + if ( empty( $author_id ) ) { + return ''; + } + + $author_name = get_the_author_meta( 'display_name', $author_id ); + // translators: %s: Author name. + $alt = sprintf( __( '%s Avatar' ), $author_name ); + $avatar_block = get_avatar( + $author_id, + $size, + '', + $alt, + array( + 'extra_attr' => $image_styles, + 'class' => $image_classes, + ) + ); + if ( isset( $attributes['isLink'] ) && $attributes['isLink'] ) { + $label = ''; + if ( '_blank' === $attributes['linkTarget'] ) { + // translators: %s is the Author name. + $label = 'aria-label="' . esc_attr( sprintf( __( '(%s author archive, opens in a new tab)' ), $author_name ) ) . '"'; + } + // translators: 1: Author archive link. 2: Link target. %3$s Aria label. %4$s Avatar image. + $avatar_block = sprintf( '%4$s', esc_url( get_author_posts_url( $author_id ) ), esc_attr( $attributes['linkTarget'] ), $label, $avatar_block ); + } + return sprintf( '
%2s
', $wrapper_attributes, $avatar_block ); + } + $comment = get_comment( $block->context['commentId'] ); + if ( ! $comment ) { + return ''; + } + /* translators: %s: Author name. */ + $alt = sprintf( __( '%s Avatar' ), $comment->comment_author ); + $avatar_block = get_avatar( + $comment, + $size, + '', + $alt, + array( + 'extra_attr' => $image_styles, + 'class' => $image_classes, + ) + ); + if ( isset( $attributes['isLink'] ) && $attributes['isLink'] && isset( $comment->comment_author_url ) && '' !== $comment->comment_author_url ) { + $label = ''; + if ( '_blank' === $attributes['linkTarget'] ) { + // translators: %s: Comment author name. + $label = 'aria-label="' . esc_attr( sprintf( __( '(%s website link, opens in a new tab)' ), $comment->comment_author ) ) . '"'; + } + $avatar_block = sprintf( '%4$s', esc_url( $comment->comment_author_url ), esc_attr( $attributes['linkTarget'] ), $label, $avatar_block ); + } + return sprintf( '
%2s
', $wrapper_attributes, $avatar_block ); +} + +/** + * Generates class names and styles to apply the border support styles for + * the Avatar block. + * + * @since 6.3.0 + * + * @param array $attributes The block attributes. + * @return array The border-related classnames and styles for the block. + */ +function get_block_core_avatar_border_attributes( $attributes ) { + $border_styles = array(); + $sides = array( 'top', 'right', 'bottom', 'left' ); + + // Border radius. + if ( isset( $attributes['style']['border']['radius'] ) ) { + $border_styles['radius'] = $attributes['style']['border']['radius']; + } + + // Border style. + if ( isset( $attributes['style']['border']['style'] ) ) { + $border_styles['style'] = $attributes['style']['border']['style']; + } + + // Border width. + if ( isset( $attributes['style']['border']['width'] ) ) { + $border_styles['width'] = $attributes['style']['border']['width']; + } + + // Border color. + $preset_color = array_key_exists( 'borderColor', $attributes ) ? "var:preset|color|{$attributes['borderColor']}" : null; + $custom_color = $attributes['style']['border']['color'] ?? null; + $border_styles['color'] = $preset_color ? $preset_color : $custom_color; + + // Individual border styles e.g. top, left etc. + foreach ( $sides as $side ) { + $border = $attributes['style']['border'][ $side ] ?? null; + $border_styles[ $side ] = array( + 'color' => $border['color'] ?? null, + 'style' => $border['style'] ?? null, + 'width' => $border['width'] ?? null, + ); + } + + $styles = wp_style_engine_get_styles( array( 'border' => $border_styles ) ); + $attributes = array(); + if ( ! empty( $styles['classnames'] ) ) { + $attributes['class'] = $styles['classnames']; + } + if ( ! empty( $styles['css'] ) ) { + $attributes['style'] = $styles['css']; + } + return $attributes; +} + +/** + * Registers the `core/avatar` block on the server. + * + * @since 6.0.0 + */ +function register_block_core_avatar() { + register_block_type_from_metadata( + __DIR__ . '/avatar', + array( + 'render_callback' => 'render_block_core_avatar', + ) + ); +} +add_action( 'init', 'register_block_core_avatar' ); diff --git a/src/wp-includes/blocks/avatar/block.json b/src/wp-includes/blocks/avatar/block.json new file mode 100644 index 0000000000000..0cb92d81865c7 --- /dev/null +++ b/src/wp-includes/blocks/avatar/block.json @@ -0,0 +1,69 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/avatar", + "title": "Avatar", + "category": "theme", + "description": "Add a user’s avatar.", + "textdomain": "default", + "attributes": { + "userId": { + "type": "number" + }, + "size": { + "type": "number", + "default": 96 + }, + "isLink": { + "type": "boolean", + "default": false + }, + "linkTarget": { + "type": "string", + "default": "_self" + } + }, + "usesContext": [ "postType", "postId", "commentId" ], + "supports": { + "anchor": true, + "html": false, + "align": true, + "alignWide": false, + "spacing": { + "margin": true, + "padding": true, + "__experimentalDefaultControls": { + "margin": false, + "padding": false + } + }, + "__experimentalBorder": { + "__experimentalSkipSerialization": true, + "radius": true, + "width": true, + "color": true, + "style": true, + "__experimentalDefaultControls": { + "radius": true + } + }, + "color": { + "text": false, + "background": false + }, + "filter": { + "duotone": true + }, + "interactivity": { + "clientNavigation": true + } + }, + "selectors": { + "border": ".wp-block-avatar img", + "filter": { + "duotone": ".wp-block-avatar img" + } + }, + "editorStyle": "wp-block-avatar-editor", + "style": "wp-block-avatar" +} diff --git a/src/wp-includes/blocks/block.php b/src/wp-includes/blocks/block.php new file mode 100644 index 0000000000000..f09d5367a9c89 --- /dev/null +++ b/src/wp-includes/blocks/block.php @@ -0,0 +1,131 @@ +post_type ) { + return ''; + } + + if ( isset( $seen_refs[ $attributes['ref'] ] ) ) { + // WP_DEBUG_DISPLAY must only be honored when WP_DEBUG. This precedent + // is set in `wp_debug_mode()`. + $is_debug = WP_DEBUG && WP_DEBUG_DISPLAY; + + return $is_debug ? + // translators: Visible only in the front end, this warning takes the place of a faulty block. + __( '[block rendering halted]' ) : + ''; + } + + if ( 'publish' !== $reusable_block->post_status || ! empty( $reusable_block->post_password ) ) { + return ''; + } + + $seen_refs[ $attributes['ref'] ] = true; + + // Handle embeds for reusable blocks. + global $wp_embed; + $content = $wp_embed->run_shortcode( $reusable_block->post_content ); + $content = $wp_embed->autoembed( $content ); + + // Back compat. + // For blocks that have not been migrated in the editor, add some back compat + // so that front-end rendering continues to work. + + // This matches the `v2` deprecation. Removes the inner `values` property + // from every item. + if ( isset( $attributes['content'] ) ) { + foreach ( $attributes['content'] as &$content_data ) { + if ( isset( $content_data['values'] ) ) { + $is_assoc_array = is_array( $content_data['values'] ) && ! wp_is_numeric_array( $content_data['values'] ); + + if ( $is_assoc_array ) { + $content_data = $content_data['values']; + } + } + } + } + + // This matches the `v1` deprecation. Rename `overrides` to `content`. + if ( isset( $attributes['overrides'] ) && ! isset( $attributes['content'] ) ) { + $attributes['content'] = $attributes['overrides']; + } + + // Apply Block Hooks. + $content = apply_block_hooks_to_content_from_post_object( $content, $reusable_block ); + + /** + * We attach the blocks from $content as inner blocks to the Synced Pattern block instance. + * This ensures that block context available to the Synced Pattern block instance is provided to + * those blocks. + */ + $block_instance->parsed_block['innerBlocks'] = parse_blocks( $content ); + $block_instance->parsed_block['innerContent'] = array_fill( 0, count( $block_instance->parsed_block['innerBlocks'] ), null ); + if ( method_exists( $block_instance, 'refresh_context_dependents' ) ) { + // WP_Block::refresh_context_dependents() was introduced in WordPress 6.8. + $block_instance->refresh_context_dependents(); + } else { + // This branch can be removed once Gutenberg requires WordPress 6.8 or later. + if ( ! class_exists( 'WP_Block_Cloner' ) ) { + // phpcs:ignore Gutenberg.Commenting.SinceTag.MissingClassSinceTag + class WP_Block_Cloner extends WP_Block { + /** + * Static methods of subclasses have access to protected properties + * of instances of the parent class. + * In this case, this gives us access to `available_context` and `registry`. + */ + // phpcs:ignore Gutenberg.Commenting.SinceTag.MissingMethodSinceTag + public static function clone_instance( $instance ) { + return new WP_Block( + $instance->parsed_block, + $instance->available_context, + $instance->registry + ); + } + } + } + $block_instance = WP_Block_Cloner::clone_instance( $block_instance ); + } + + $content = $block_instance->render( array( 'dynamic' => false ) ); + unset( $seen_refs[ $attributes['ref'] ] ); + + return $content; +} + +/** + * Registers the `core/block` block. + * + * @since 5.3.0 + */ +function register_block_core_block() { + register_block_type_from_metadata( + __DIR__ . '/block', + array( + 'render_callback' => 'render_block_core_block', + ) + ); +} +add_action( 'init', 'register_block_core_block' ); diff --git a/src/wp-includes/blocks/block/block.json b/src/wp-includes/blocks/block/block.json new file mode 100644 index 0000000000000..8d2b8f6f3b1bc --- /dev/null +++ b/src/wp-includes/blocks/block/block.json @@ -0,0 +1,32 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/block", + "title": "Pattern", + "category": "reusable", + "description": "Reuse this design across your site.", + "keywords": [ "reusable" ], + "textdomain": "default", + "attributes": { + "ref": { + "type": "number" + }, + "content": { + "type": "object", + "default": {} + } + }, + "providesContext": { + "pattern/overrides": "content" + }, + "supports": { + "customClassName": false, + "html": false, + "inserter": false, + "renaming": false, + "interactivity": { + "clientNavigation": true + }, + "customCSS": false + } +} diff --git a/src/wp-includes/blocks/blocks-json.php b/src/wp-includes/blocks/blocks-json.php new file mode 100644 index 0000000000000..e905b113502ac --- /dev/null +++ b/src/wp-includes/blocks/blocks-json.php @@ -0,0 +1,8545 @@ + array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/accordion', + 'title' => 'Accordion', + 'category' => 'design', + 'description' => 'Displays a foldable layout that groups content in collapsible sections.', + 'example' => array( + + ), + 'supports' => array( + 'anchor' => true, + 'html' => false, + 'align' => array( + 'wide', + 'full' + ), + 'background' => array( + 'backgroundImage' => true, + 'backgroundSize' => true, + '__experimentalDefaultControls' => array( + 'backgroundImage' => true + ) + ), + 'color' => array( + 'background' => true, + 'gradients' => true + ), + '__experimentalBorder' => array( + 'color' => true, + 'radius' => true, + 'style' => true, + 'width' => true, + '__experimentalDefaultControls' => array( + 'color' => true, + 'radius' => true, + 'style' => true, + 'width' => true + ) + ), + 'spacing' => array( + 'padding' => true, + 'margin' => array( + 'top', + 'bottom' + ), + 'blockGap' => true + ), + 'shadow' => true, + 'layout' => true, + 'ariaLabel' => true, + 'interactivity' => true, + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'contentRole' => true, + 'listView' => true + ), + 'attributes' => array( + 'iconPosition' => array( + 'type' => 'string', + 'default' => 'right' + ), + 'showIcon' => array( + 'type' => 'boolean', + 'default' => true + ), + 'autoclose' => array( + 'type' => 'boolean', + 'default' => false + ), + 'headingLevel' => array( + 'type' => 'number', + 'default' => 3 + ), + 'levelOptions' => array( + 'type' => 'array' + ) + ), + 'providesContext' => array( + 'core/accordion-icon-position' => 'iconPosition', + 'core/accordion-show-icon' => 'showIcon', + 'core/accordion-heading-level' => 'headingLevel' + ), + 'allowedBlocks' => array( + 'core/accordion-item' + ), + 'textdomain' => 'default', + 'viewScriptModule' => '@wordpress/block-library/accordion/view' + ), + 'accordion-heading' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/accordion-heading', + 'title' => 'Accordion Heading', + 'category' => 'design', + 'description' => 'Displays a heading that toggles the accordion panel.', + 'parent' => array( + 'core/accordion-item' + ), + 'usesContext' => array( + 'core/accordion-icon-position', + 'core/accordion-show-icon', + 'core/accordion-heading-level' + ), + 'supports' => array( + 'anchor' => true, + 'color' => array( + 'background' => true, + 'gradients' => true + ), + 'align' => false, + 'interactivity' => true, + 'spacing' => array( + 'padding' => true, + '__experimentalDefaultControls' => array( + 'padding' => true + ), + '__experimentalSkipSerialization' => true, + '__experimentalSelector' => '.wp-block-accordion-heading__toggle' + ), + '__experimentalBorder' => array( + 'color' => true, + 'radius' => true, + 'style' => true, + 'width' => true, + '__experimentalDefaultControls' => array( + 'color' => true, + 'radius' => true, + 'style' => true, + 'width' => true + ) + ), + 'typography' => array( + '__experimentalSkipSerialization' => array( + 'textDecoration', + 'letterSpacing' + ), + 'fontSize' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true, + 'fontFamily' => true + ) + ), + 'shadow' => true, + 'visibility' => false, + 'lock' => false + ), + 'selectors' => array( + 'typography' => array( + 'letterSpacing' => '.wp-block-accordion-heading .wp-block-accordion-heading__toggle-title', + 'textDecoration' => '.wp-block-accordion-heading .wp-block-accordion-heading__toggle-title' + ) + ), + 'attributes' => array( + 'openByDefault' => array( + 'type' => 'boolean', + 'default' => false + ), + 'title' => array( + 'type' => 'rich-text', + 'source' => 'rich-text', + 'selector' => '.wp-block-accordion-heading__toggle-title', + 'role' => 'content' + ), + 'level' => array( + 'type' => 'number' + ), + 'iconPosition' => array( + 'type' => 'string', + 'enum' => array( + 'left', + 'right' + ), + 'default' => 'right' + ), + 'showIcon' => array( + 'type' => 'boolean', + 'default' => true + ) + ), + 'textdomain' => 'default' + ), + 'accordion-item' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/accordion-item', + 'title' => 'Accordion Item', + 'category' => 'design', + 'description' => 'Wraps the heading and panel in one unit.', + 'parent' => array( + 'core/accordion' + ), + 'allowedBlocks' => array( + 'core/accordion-heading', + 'core/accordion-panel' + ), + 'supports' => array( + 'html' => false, + 'color' => array( + 'background' => true, + 'gradients' => true + ), + 'interactivity' => true, + 'spacing' => array( + 'margin' => array( + 'top', + 'bottom' + ), + 'blockGap' => true + ), + '__experimentalBorder' => array( + 'color' => true, + 'radius' => true, + 'style' => true, + 'width' => true, + '__experimentalDefaultControls' => array( + 'color' => true, + 'radius' => true, + 'style' => true, + 'width' => true + ) + ), + 'shadow' => true, + 'layout' => array( + 'allowEditing' => false + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'contentRole' => true + ), + 'attributes' => array( + 'openByDefault' => array( + 'type' => 'boolean', + 'default' => false + ) + ), + 'providesContext' => array( + 'core/accordion-open-by-default' => 'openByDefault' + ), + 'textdomain' => 'default', + 'style' => 'wp-block-accordion-item' + ), + 'accordion-panel' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/accordion-panel', + 'title' => 'Accordion Panel', + 'category' => 'design', + 'description' => 'Contains the hidden or revealed content beneath the heading.', + 'parent' => array( + 'core/accordion-item' + ), + 'usesContext' => array( + 'core/accordion-open-by-default' + ), + 'supports' => array( + 'html' => false, + 'color' => array( + 'background' => true, + 'gradients' => true + ), + 'interactivity' => true, + 'spacing' => array( + 'padding' => true, + 'blockGap' => true, + '__experimentalDefaultControls' => array( + 'padding' => true, + 'blockGap' => true + ) + ), + '__experimentalBorder' => array( + 'color' => true, + 'radius' => true, + 'style' => true, + 'width' => true, + '__experimentalDefaultControls' => array( + 'color' => true, + 'radius' => true, + 'style' => true, + 'width' => true + ) + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'shadow' => true, + 'layout' => array( + 'allowEditing' => false + ), + 'visibility' => false, + 'contentRole' => true, + 'allowedBlocks' => true, + 'lock' => false + ), + 'attributes' => array( + 'templateLock' => array( + 'type' => array( + 'string', + 'boolean' + ), + 'enum' => array( + 'all', + 'insert', + 'contentOnly', + false + ), + 'default' => false + ) + ), + 'textdomain' => 'default', + 'style' => 'wp-block-accordion-panel' + ), + 'archives' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/archives', + 'title' => 'Archives', + 'category' => 'widgets', + 'description' => 'Display a date archive of your posts.', + 'textdomain' => 'default', + 'attributes' => array( + 'displayAsDropdown' => array( + 'type' => 'boolean', + 'default' => false + ), + 'showLabel' => array( + 'type' => 'boolean', + 'default' => true + ), + 'showPostCounts' => array( + 'type' => 'boolean', + 'default' => false + ), + 'type' => array( + 'type' => 'string', + 'default' => 'monthly' + ) + ), + 'supports' => array( + 'anchor' => true, + 'align' => true, + '__experimentalBorder' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true + ), + 'html' => false, + 'spacing' => array( + 'margin' => true, + 'padding' => true, + '__experimentalDefaultControls' => array( + 'margin' => false, + 'padding' => false + ) + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'color' => array( + 'gradients' => true, + 'link' => true, + '__experimentalDefaultControls' => array( + 'background' => true, + 'text' => true, + 'link' => true + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ) + ) + ), + 'audio' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/audio', + 'title' => 'Audio', + 'category' => 'media', + 'description' => 'Embed a simple audio player.', + 'keywords' => array( + 'music', + 'sound', + 'podcast', + 'recording' + ), + 'textdomain' => 'default', + 'attributes' => array( + 'blob' => array( + 'type' => 'string', + 'role' => 'local' + ), + 'src' => array( + 'type' => 'string', + 'source' => 'attribute', + 'selector' => 'audio', + 'attribute' => 'src', + 'role' => 'content' + ), + 'caption' => array( + 'type' => 'rich-text', + 'source' => 'rich-text', + 'selector' => 'figcaption', + 'role' => 'content' + ), + 'id' => array( + 'type' => 'number', + 'role' => 'content' + ), + 'autoplay' => array( + 'type' => 'boolean', + 'source' => 'attribute', + 'selector' => 'audio', + 'attribute' => 'autoplay' + ), + 'loop' => array( + 'type' => 'boolean', + 'source' => 'attribute', + 'selector' => 'audio', + 'attribute' => 'loop' + ), + 'preload' => array( + 'type' => 'string', + 'source' => 'attribute', + 'selector' => 'audio', + 'attribute' => 'preload' + ) + ), + 'supports' => array( + 'anchor' => true, + 'align' => true, + 'spacing' => array( + 'margin' => true, + 'padding' => true, + '__experimentalDefaultControls' => array( + 'margin' => false, + 'padding' => false + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ) + ), + 'editorStyle' => 'wp-block-audio-editor', + 'style' => 'wp-block-audio' + ), + 'avatar' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/avatar', + 'title' => 'Avatar', + 'category' => 'theme', + 'description' => 'Add a user’s avatar.', + 'textdomain' => 'default', + 'attributes' => array( + 'userId' => array( + 'type' => 'number' + ), + 'size' => array( + 'type' => 'number', + 'default' => 96 + ), + 'isLink' => array( + 'type' => 'boolean', + 'default' => false + ), + 'linkTarget' => array( + 'type' => 'string', + 'default' => '_self' + ) + ), + 'usesContext' => array( + 'postType', + 'postId', + 'commentId' + ), + 'supports' => array( + 'anchor' => true, + 'html' => false, + 'align' => true, + 'alignWide' => false, + 'spacing' => array( + 'margin' => true, + 'padding' => true, + '__experimentalDefaultControls' => array( + 'margin' => false, + 'padding' => false + ) + ), + '__experimentalBorder' => array( + '__experimentalSkipSerialization' => true, + 'radius' => true, + 'width' => true, + 'color' => true, + 'style' => true, + '__experimentalDefaultControls' => array( + 'radius' => true + ) + ), + 'color' => array( + 'text' => false, + 'background' => false + ), + 'filter' => array( + 'duotone' => true + ), + 'interactivity' => array( + 'clientNavigation' => true + ) + ), + 'selectors' => array( + 'border' => '.wp-block-avatar img', + 'filter' => array( + 'duotone' => '.wp-block-avatar img' + ) + ), + 'editorStyle' => 'wp-block-avatar-editor', + 'style' => 'wp-block-avatar' + ), + 'block' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/block', + 'title' => 'Pattern', + 'category' => 'reusable', + 'description' => 'Reuse this design across your site.', + 'keywords' => array( + 'reusable' + ), + 'textdomain' => 'default', + 'attributes' => array( + 'ref' => array( + 'type' => 'number' + ), + 'content' => array( + 'type' => 'object', + 'default' => array( + + ) + ) + ), + 'providesContext' => array( + 'pattern/overrides' => 'content' + ), + 'supports' => array( + 'customClassName' => false, + 'html' => false, + 'inserter' => false, + 'renaming' => false, + 'interactivity' => array( + 'clientNavigation' => true + ), + 'customCSS' => false + ) + ), + 'breadcrumbs' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/breadcrumbs', + 'title' => 'Breadcrumbs', + 'category' => 'theme', + 'description' => 'Display a breadcrumb trail showing the path to the current page.', + 'textdomain' => 'default', + 'attributes' => array( + 'prefersTaxonomy' => array( + 'type' => 'boolean', + 'default' => false + ), + 'separator' => array( + 'type' => 'string', + 'default' => '/' + ), + 'showHomeItem' => array( + 'type' => 'boolean', + 'default' => true + ), + 'showCurrentItem' => array( + 'type' => 'boolean', + 'default' => true + ), + 'showOnHomePage' => array( + 'type' => 'boolean', + 'default' => false + ) + ), + 'usesContext' => array( + 'postId', + 'postType', + 'templateSlug' + ), + 'supports' => array( + 'anchor' => true, + 'html' => false, + 'align' => array( + 'wide', + 'full' + ), + 'spacing' => array( + 'margin' => true, + 'padding' => true + ), + 'color' => array( + 'gradients' => true, + 'link' => true, + '__experimentalDefaultControls' => array( + 'background' => true, + 'text' => true + ) + ), + '__experimentalBorder' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true, + '__experimentalDefaultControls' => array( + 'radius' => false, + 'color' => true, + 'width' => true, + 'style' => true + ) + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ) + ), + 'style' => 'wp-block-breadcrumbs' + ), + 'button' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/button', + 'title' => 'Button', + 'category' => 'design', + 'parent' => array( + 'core/buttons' + ), + 'description' => 'Prompt visitors to take action with a button-style link.', + 'keywords' => array( + 'link' + ), + 'textdomain' => 'default', + 'attributes' => array( + 'tagName' => array( + 'type' => 'string', + 'enum' => array( + 'a', + 'button' + ), + 'default' => 'a' + ), + 'type' => array( + 'type' => 'string', + 'default' => 'button' + ), + 'url' => array( + 'type' => 'string', + 'source' => 'attribute', + 'selector' => 'a', + 'attribute' => 'href', + 'role' => 'content' + ), + 'title' => array( + 'type' => 'string', + 'source' => 'attribute', + 'selector' => 'a,button', + 'attribute' => 'title', + 'role' => 'content' + ), + 'text' => array( + 'type' => 'rich-text', + 'source' => 'rich-text', + 'selector' => 'a,button', + 'role' => 'content' + ), + 'linkTarget' => array( + 'type' => 'string', + 'source' => 'attribute', + 'selector' => 'a', + 'attribute' => 'target', + 'role' => 'content' + ), + 'rel' => array( + 'type' => 'string', + 'source' => 'attribute', + 'selector' => 'a', + 'attribute' => 'rel', + 'role' => 'content' + ), + 'placeholder' => array( + 'type' => 'string' + ), + 'backgroundColor' => array( + 'type' => 'string' + ), + 'textColor' => array( + 'type' => 'string' + ), + 'gradient' => array( + 'type' => 'string' + ), + 'width' => array( + 'type' => 'number' + ) + ), + 'supports' => array( + 'anchor' => true, + 'splitting' => true, + 'align' => false, + 'alignWide' => false, + 'color' => array( + '__experimentalSkipSerialization' => true, + 'gradients' => true, + '__experimentalDefaultControls' => array( + 'background' => true, + 'text' => true + ) + ), + 'typography' => array( + '__experimentalSkipSerialization' => array( + 'fontSize', + 'lineHeight', + 'textAlign', + 'fontFamily', + 'fontWeight', + 'fontStyle', + 'textTransform', + 'textDecoration', + 'letterSpacing' + ), + 'fontSize' => true, + 'lineHeight' => true, + 'textAlign' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalWritingMode' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'reusable' => false, + 'shadow' => array( + '__experimentalSkipSerialization' => true + ), + 'spacing' => array( + '__experimentalSkipSerialization' => true, + 'padding' => array( + 'horizontal', + 'vertical' + ), + '__experimentalDefaultControls' => array( + 'padding' => true + ) + ), + '__experimentalBorder' => array( + 'color' => true, + 'radius' => true, + 'style' => true, + 'width' => true, + '__experimentalSkipSerialization' => true, + '__experimentalDefaultControls' => array( + 'color' => true, + 'radius' => true, + 'style' => true, + 'width' => true + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ) + ), + 'styles' => array( + array( + 'name' => 'fill', + 'label' => 'Fill', + 'isDefault' => true + ), + array( + 'name' => 'outline', + 'label' => 'Outline' + ) + ), + 'editorStyle' => 'wp-block-button-editor', + 'style' => 'wp-block-button', + 'selectors' => array( + 'root' => '.wp-block-button .wp-block-button__link', + 'typography' => array( + 'writingMode' => '.wp-block-button' + ) + ) + ), + 'buttons' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/buttons', + 'title' => 'Buttons', + 'category' => 'design', + 'allowedBlocks' => array( + 'core/button' + ), + 'description' => 'Prompt visitors to take action with a group of button-style links.', + 'keywords' => array( + 'link' + ), + 'textdomain' => 'default', + 'supports' => array( + 'anchor' => true, + 'align' => array( + 'wide', + 'full' + ), + 'html' => false, + '__experimentalExposeControlsToChildren' => true, + 'color' => array( + 'gradients' => true, + 'text' => false, + '__experimentalDefaultControls' => array( + 'background' => true + ) + ), + 'spacing' => array( + 'blockGap' => array( + 'horizontal', + 'vertical' + ), + 'padding' => true, + 'margin' => array( + 'top', + 'bottom' + ), + '__experimentalDefaultControls' => array( + 'blockGap' => true + ) + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + '__experimentalBorder' => array( + 'color' => true, + 'radius' => true, + 'style' => true, + 'width' => true, + '__experimentalDefaultControls' => array( + 'color' => true, + 'radius' => true, + 'style' => true, + 'width' => true + ) + ), + 'layout' => array( + 'allowSwitching' => false, + 'allowInheriting' => false, + 'default' => array( + 'type' => 'flex' + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ), + 'listView' => true, + 'contentRole' => true + ), + 'editorStyle' => 'wp-block-buttons-editor', + 'style' => 'wp-block-buttons' + ), + 'calendar' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/calendar', + 'title' => 'Calendar', + 'category' => 'widgets', + 'description' => 'A calendar of your site’s posts.', + 'keywords' => array( + 'posts', + 'archive' + ), + 'textdomain' => 'default', + 'attributes' => array( + 'month' => array( + 'type' => 'integer' + ), + 'year' => array( + 'type' => 'integer' + ) + ), + 'supports' => array( + 'anchor' => true, + 'align' => true, + 'html' => false, + 'color' => array( + 'link' => true, + '__experimentalSkipSerialization' => array( + 'text', + 'background' + ), + '__experimentalDefaultControls' => array( + 'background' => true, + 'text' => true + ), + '__experimentalSelector' => 'table, th' + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ) + ), + 'style' => 'wp-block-calendar' + ), + 'categories' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/categories', + 'title' => 'Terms List', + 'category' => 'widgets', + 'description' => 'Display a list of all terms of a given taxonomy.', + 'keywords' => array( + 'categories' + ), + 'textdomain' => 'default', + 'attributes' => array( + 'taxonomy' => array( + 'type' => 'string', + 'default' => 'category' + ), + 'displayAsDropdown' => array( + 'type' => 'boolean', + 'default' => false + ), + 'showHierarchy' => array( + 'type' => 'boolean', + 'default' => false + ), + 'showPostCounts' => array( + 'type' => 'boolean', + 'default' => false + ), + 'showOnlyTopLevel' => array( + 'type' => 'boolean', + 'default' => false + ), + 'showEmpty' => array( + 'type' => 'boolean', + 'default' => false + ), + 'label' => array( + 'type' => 'string', + 'role' => 'content' + ), + 'showLabel' => array( + 'type' => 'boolean', + 'default' => true + ) + ), + 'usesContext' => array( + 'enhancedPagination' + ), + 'supports' => array( + 'anchor' => true, + 'align' => true, + 'html' => false, + 'spacing' => array( + 'margin' => true, + 'padding' => true, + '__experimentalDefaultControls' => array( + 'margin' => false, + 'padding' => false + ) + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'color' => array( + 'gradients' => true, + 'link' => true, + '__experimentalDefaultControls' => array( + 'background' => true, + 'text' => true, + 'link' => true + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ), + '__experimentalBorder' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true, + '__experimentalDefaultControls' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true + ) + ) + ), + 'editorStyle' => 'wp-block-categories-editor', + 'style' => 'wp-block-categories' + ), + 'code' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/code', + 'title' => 'Code', + 'category' => 'text', + 'description' => 'Display code snippets that respect your spacing and tabs.', + 'textdomain' => 'default', + 'attributes' => array( + 'content' => array( + 'type' => 'rich-text', + 'source' => 'rich-text', + 'selector' => 'code', + '__unstablePreserveWhiteSpace' => true, + 'role' => 'content' + ) + ), + 'supports' => array( + 'align' => array( + 'wide' + ), + 'anchor' => true, + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'spacing' => array( + 'margin' => array( + 'top', + 'bottom' + ), + 'padding' => true, + '__experimentalDefaultControls' => array( + 'margin' => false, + 'padding' => false + ) + ), + '__experimentalBorder' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true, + '__experimentalDefaultControls' => array( + 'width' => true, + 'color' => true + ) + ), + 'color' => array( + 'text' => true, + 'background' => true, + 'gradients' => true, + '__experimentalDefaultControls' => array( + 'background' => true, + 'text' => true + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ) + ), + 'style' => 'wp-block-code' + ), + 'column' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/column', + 'title' => 'Column', + 'category' => 'design', + 'parent' => array( + 'core/columns' + ), + 'description' => 'A single column within a columns block.', + 'textdomain' => 'default', + 'attributes' => array( + 'verticalAlignment' => array( + 'type' => 'string' + ), + 'width' => array( + 'type' => 'string' + ), + 'templateLock' => array( + 'type' => array( + 'string', + 'boolean' + ), + 'enum' => array( + 'all', + 'insert', + 'contentOnly', + false + ) + ) + ), + 'supports' => array( + '__experimentalOnEnter' => true, + 'anchor' => true, + 'reusable' => false, + 'html' => false, + 'color' => array( + 'gradients' => true, + 'heading' => true, + 'button' => true, + 'link' => true, + '__experimentalDefaultControls' => array( + 'background' => true, + 'text' => true + ) + ), + 'shadow' => true, + 'spacing' => array( + 'blockGap' => true, + 'padding' => true, + '__experimentalDefaultControls' => array( + 'padding' => true, + 'blockGap' => true + ) + ), + '__experimentalBorder' => array( + 'color' => true, + 'radius' => true, + 'style' => true, + 'width' => true, + '__experimentalDefaultControls' => array( + 'color' => true, + 'radius' => true, + 'style' => true, + 'width' => true + ) + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'layout' => true, + 'interactivity' => array( + 'clientNavigation' => true + ), + 'allowedBlocks' => true + ) + ), + 'columns' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/columns', + 'title' => 'Columns', + 'category' => 'design', + 'allowedBlocks' => array( + 'core/column' + ), + 'description' => 'Display content in multiple columns, with blocks added to each column.', + 'textdomain' => 'default', + 'attributes' => array( + 'verticalAlignment' => array( + 'type' => 'string' + ), + 'isStackedOnMobile' => array( + 'type' => 'boolean', + 'default' => true + ), + 'templateLock' => array( + 'type' => array( + 'string', + 'boolean' + ), + 'enum' => array( + 'all', + 'insert', + 'contentOnly', + false + ) + ) + ), + 'supports' => array( + 'anchor' => true, + 'align' => array( + 'wide', + 'full' + ), + 'html' => false, + 'color' => array( + 'gradients' => true, + 'link' => true, + 'heading' => true, + 'button' => true, + '__experimentalDefaultControls' => array( + 'background' => true, + 'text' => true + ) + ), + 'spacing' => array( + 'blockGap' => array( + '__experimentalDefault' => '2em', + 'sides' => array( + 'horizontal', + 'vertical' + ) + ), + 'margin' => array( + 'top', + 'bottom' + ), + 'padding' => true, + '__experimentalDefaultControls' => array( + 'padding' => true, + 'blockGap' => true + ) + ), + 'layout' => array( + 'allowSwitching' => false, + 'allowInheriting' => false, + 'allowEditing' => false, + 'default' => array( + 'type' => 'flex', + 'flexWrap' => 'nowrap' + ) + ), + '__experimentalBorder' => array( + 'color' => true, + 'radius' => true, + 'style' => true, + 'width' => true, + '__experimentalDefaultControls' => array( + 'color' => true, + 'radius' => true, + 'style' => true, + 'width' => true + ) + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ), + 'shadow' => true + ), + 'editorStyle' => 'wp-block-columns-editor', + 'style' => 'wp-block-columns' + ), + 'comment-author-name' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/comment-author-name', + 'title' => 'Comment Author Name', + 'category' => 'theme', + 'ancestor' => array( + 'core/comment-template' + ), + 'description' => 'Displays the name of the author of the comment.', + 'textdomain' => 'default', + 'attributes' => array( + 'isLink' => array( + 'type' => 'boolean', + 'default' => true + ), + 'linkTarget' => array( + 'type' => 'string', + 'default' => '_self' + ) + ), + 'usesContext' => array( + 'commentId' + ), + 'supports' => array( + 'anchor' => true, + 'html' => false, + 'spacing' => array( + 'margin' => true, + 'padding' => true + ), + 'color' => array( + 'gradients' => true, + 'link' => true, + '__experimentalDefaultControls' => array( + 'background' => true, + 'text' => true, + 'link' => true + ) + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + 'textAlign' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ), + '__experimentalBorder' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true, + '__experimentalDefaultControls' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true + ) + ) + ), + 'style' => 'wp-block-comment-author-name' + ), + 'comment-content' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/comment-content', + 'title' => 'Comment Content', + 'category' => 'theme', + 'ancestor' => array( + 'core/comment-template' + ), + 'description' => 'Displays the contents of a comment.', + 'textdomain' => 'default', + 'usesContext' => array( + 'commentId' + ), + 'supports' => array( + 'anchor' => true, + 'color' => array( + 'gradients' => true, + 'link' => true, + '__experimentalDefaultControls' => array( + 'background' => true, + 'text' => true + ) + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + 'textAlign' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + '__experimentalBorder' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true, + '__experimentalDefaultControls' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true + ) + ), + 'spacing' => array( + 'padding' => array( + 'horizontal', + 'vertical' + ), + '__experimentalDefaultControls' => array( + 'padding' => true + ) + ), + 'html' => false + ), + 'style' => 'wp-block-comment-content' + ), + 'comment-date' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/comment-date', + 'title' => 'Comment Date', + 'category' => 'theme', + 'ancestor' => array( + 'core/comment-template' + ), + 'description' => 'Displays the date on which the comment was posted.', + 'textdomain' => 'default', + 'attributes' => array( + 'format' => array( + 'type' => 'string' + ), + 'isLink' => array( + 'type' => 'boolean', + 'default' => true + ) + ), + 'usesContext' => array( + 'commentId' + ), + 'supports' => array( + 'anchor' => true, + 'html' => false, + 'color' => array( + 'gradients' => true, + 'link' => true, + '__experimentalDefaultControls' => array( + 'background' => true, + 'text' => true, + 'link' => true + ) + ), + 'spacing' => array( + 'margin' => true, + 'padding' => true + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + 'textAlign' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ), + '__experimentalBorder' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true, + '__experimentalDefaultControls' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true + ) + ) + ), + 'style' => 'wp-block-comment-date' + ), + 'comment-edit-link' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/comment-edit-link', + 'title' => 'Comment Edit Link', + 'category' => 'theme', + 'ancestor' => array( + 'core/comment-template' + ), + 'description' => 'Displays a link to edit the comment in the WordPress Dashboard. This link is only visible to users with the edit comment capability.', + 'textdomain' => 'default', + 'usesContext' => array( + 'commentId' + ), + 'attributes' => array( + 'linkTarget' => array( + 'type' => 'string', + 'default' => '_self' + ) + ), + 'supports' => array( + 'anchor' => true, + 'html' => false, + 'color' => array( + 'link' => true, + 'gradients' => true, + 'text' => false, + '__experimentalDefaultControls' => array( + 'background' => true, + 'link' => true + ) + ), + 'spacing' => array( + 'margin' => true, + 'padding' => true, + '__experimentalDefaultControls' => array( + 'margin' => false, + 'padding' => false + ) + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + 'textAlign' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ), + '__experimentalBorder' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true + ) + ), + 'style' => 'wp-block-comment-edit-link' + ), + 'comment-reply-link' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/comment-reply-link', + 'title' => 'Comment Reply Link', + 'category' => 'theme', + 'ancestor' => array( + 'core/comment-template' + ), + 'description' => 'Displays a link to reply to a comment.', + 'textdomain' => 'default', + 'usesContext' => array( + 'commentId' + ), + 'supports' => array( + 'anchor' => true, + 'color' => array( + 'gradients' => true, + 'link' => true, + 'text' => false, + '__experimentalDefaultControls' => array( + 'background' => true, + 'link' => true + ) + ), + 'spacing' => array( + 'margin' => true, + 'padding' => true, + '__experimentalDefaultControls' => array( + 'margin' => false, + 'padding' => false + ) + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + 'textAlign' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + '__experimentalBorder' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true + ), + 'html' => false + ), + 'style' => 'wp-block-comment-reply-link' + ), + 'comment-template' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/comment-template', + 'title' => 'Comment Template', + 'category' => 'design', + 'parent' => array( + 'core/comments' + ), + 'description' => 'Contains the block elements used to display a comment, like the title, date, author, avatar and more.', + 'textdomain' => 'default', + 'usesContext' => array( + 'postId' + ), + 'supports' => array( + 'anchor' => true, + 'align' => true, + 'html' => false, + 'reusable' => false, + 'spacing' => array( + 'margin' => true, + 'padding' => true + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ), + '__experimentalBorder' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true, + '__experimentalDefaultControls' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true + ) + ) + ), + 'style' => 'wp-block-comment-template' + ), + 'comments' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/comments', + 'title' => 'Comments', + 'category' => 'theme', + 'description' => 'An advanced block that allows displaying post comments using different visual configurations.', + 'textdomain' => 'default', + 'attributes' => array( + 'tagName' => array( + 'type' => 'string', + 'default' => 'div' + ), + 'legacy' => array( + 'type' => 'boolean', + 'default' => false + ) + ), + 'supports' => array( + 'anchor' => true, + 'align' => array( + 'wide', + 'full' + ), + 'html' => false, + 'color' => array( + 'gradients' => true, + 'heading' => true, + 'link' => true, + '__experimentalDefaultControls' => array( + 'background' => true, + 'text' => true, + 'link' => true + ) + ), + 'spacing' => array( + 'margin' => true, + 'padding' => true + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + '__experimentalBorder' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true, + '__experimentalDefaultControls' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true + ) + ) + ), + 'editorStyle' => 'wp-block-comments-editor', + 'usesContext' => array( + 'postId', + 'postType' + ) + ), + 'comments-pagination' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/comments-pagination', + 'title' => 'Comments Pagination', + 'category' => 'theme', + 'parent' => array( + 'core/comments' + ), + 'allowedBlocks' => array( + 'core/comments-pagination-previous', + 'core/comments-pagination-numbers', + 'core/comments-pagination-next' + ), + 'description' => 'Displays a paginated navigation to next/previous set of comments, when applicable.', + 'textdomain' => 'default', + 'attributes' => array( + 'paginationArrow' => array( + 'type' => 'string', + 'default' => 'none' + ) + ), + 'example' => array( + 'attributes' => array( + 'paginationArrow' => 'none' + ) + ), + 'providesContext' => array( + 'comments/paginationArrow' => 'paginationArrow' + ), + 'supports' => array( + 'anchor' => true, + 'align' => true, + 'reusable' => false, + 'html' => false, + 'color' => array( + 'gradients' => true, + 'link' => true, + '__experimentalDefaultControls' => array( + 'background' => true, + 'text' => true, + 'link' => true + ) + ), + 'layout' => array( + 'allowSwitching' => false, + 'allowInheriting' => false, + 'default' => array( + 'type' => 'flex' + ) + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ) + ), + 'editorStyle' => 'wp-block-comments-pagination-editor', + 'style' => 'wp-block-comments-pagination' + ), + 'comments-pagination-next' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/comments-pagination-next', + 'title' => 'Comments Next Page', + 'category' => 'theme', + 'parent' => array( + 'core/comments-pagination' + ), + 'description' => 'Displays the next comment\'s page link.', + 'textdomain' => 'default', + 'attributes' => array( + 'label' => array( + 'type' => 'string' + ) + ), + 'usesContext' => array( + 'postId', + 'comments/paginationArrow' + ), + 'supports' => array( + 'anchor' => true, + 'reusable' => false, + 'html' => false, + 'color' => array( + 'gradients' => true, + 'text' => false, + '__experimentalDefaultControls' => array( + 'background' => true + ) + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ) + ) + ), + 'comments-pagination-numbers' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/comments-pagination-numbers', + 'title' => 'Comments Page Numbers', + 'category' => 'theme', + 'parent' => array( + 'core/comments-pagination' + ), + 'description' => 'Displays a list of page numbers for comments pagination.', + 'textdomain' => 'default', + 'usesContext' => array( + 'postId' + ), + 'supports' => array( + 'anchor' => true, + 'reusable' => false, + 'html' => false, + 'color' => array( + 'gradients' => true, + 'text' => false, + '__experimentalDefaultControls' => array( + 'background' => true + ) + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ), + 'spacing' => array( + 'margin' => true, + 'padding' => true, + '__experimentalDefaultControls' => array( + 'padding' => true + ) + ) + ) + ), + 'comments-pagination-previous' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/comments-pagination-previous', + 'title' => 'Comments Previous Page', + 'category' => 'theme', + 'parent' => array( + 'core/comments-pagination' + ), + 'description' => 'Displays the previous comment\'s page link.', + 'textdomain' => 'default', + 'attributes' => array( + 'label' => array( + 'type' => 'string' + ) + ), + 'usesContext' => array( + 'postId', + 'comments/paginationArrow' + ), + 'supports' => array( + 'anchor' => true, + 'reusable' => false, + 'html' => false, + 'color' => array( + 'gradients' => true, + 'text' => false, + '__experimentalDefaultControls' => array( + 'background' => true + ) + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ) + ) + ), + 'comments-title' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/comments-title', + 'title' => 'Comments Title', + 'category' => 'theme', + 'ancestor' => array( + 'core/comments' + ), + 'description' => 'Displays a title with the number of comments.', + 'textdomain' => 'default', + 'usesContext' => array( + 'postId', + 'postType' + ), + 'attributes' => array( + 'showPostTitle' => array( + 'type' => 'boolean', + 'default' => true + ), + 'showCommentsCount' => array( + 'type' => 'boolean', + 'default' => true + ), + 'level' => array( + 'type' => 'number', + 'default' => 2 + ), + 'levelOptions' => array( + 'type' => 'array' + ) + ), + 'supports' => array( + 'anchor' => true, + 'align' => true, + 'html' => false, + '__experimentalBorder' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true + ), + 'color' => array( + 'gradients' => true, + '__experimentalDefaultControls' => array( + 'background' => true, + 'text' => true + ) + ), + 'spacing' => array( + 'margin' => true, + 'padding' => true + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + 'textAlign' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true, + '__experimentalFontFamily' => true, + '__experimentalFontStyle' => true, + '__experimentalFontWeight' => true + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ) + ) + ), + 'cover' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/cover', + 'title' => 'Cover', + 'category' => 'media', + 'description' => 'Add an image or video with a text overlay.', + 'textdomain' => 'default', + 'attributes' => array( + 'url' => array( + 'type' => 'string', + 'role' => 'content' + ), + 'useFeaturedImage' => array( + 'type' => 'boolean', + 'default' => false + ), + 'id' => array( + 'type' => 'number' + ), + 'alt' => array( + 'type' => 'string', + 'default' => '' + ), + 'hasParallax' => array( + 'type' => 'boolean', + 'default' => false + ), + 'isRepeated' => array( + 'type' => 'boolean', + 'default' => false + ), + 'dimRatio' => array( + 'type' => 'number', + 'default' => 100 + ), + 'overlayColor' => array( + 'type' => 'string' + ), + 'customOverlayColor' => array( + 'type' => 'string' + ), + 'isUserOverlayColor' => array( + 'type' => 'boolean' + ), + 'backgroundType' => array( + 'type' => 'string', + 'default' => 'image' + ), + 'focalPoint' => array( + 'type' => 'object' + ), + 'minHeight' => array( + 'type' => 'number' + ), + 'minHeightUnit' => array( + 'type' => 'string' + ), + 'gradient' => array( + 'type' => 'string' + ), + 'customGradient' => array( + 'type' => 'string' + ), + 'contentPosition' => array( + 'type' => 'string' + ), + 'isDark' => array( + 'type' => 'boolean', + 'default' => true + ), + 'templateLock' => array( + 'type' => array( + 'string', + 'boolean' + ), + 'enum' => array( + 'all', + 'insert', + 'contentOnly', + false + ) + ), + 'tagName' => array( + 'type' => 'string', + 'default' => 'div' + ), + 'sizeSlug' => array( + 'type' => 'string' + ), + 'poster' => array( + 'type' => 'string', + 'source' => 'attribute', + 'selector' => 'video', + 'attribute' => 'poster' + ) + ), + 'usesContext' => array( + 'postId', + 'postType' + ), + 'supports' => array( + 'anchor' => true, + 'align' => true, + 'html' => false, + 'shadow' => true, + 'spacing' => array( + 'padding' => true, + 'margin' => array( + 'top', + 'bottom' + ), + 'blockGap' => true, + '__experimentalDefaultControls' => array( + 'padding' => true, + 'blockGap' => true + ) + ), + '__experimentalBorder' => array( + 'color' => true, + 'radius' => true, + 'style' => true, + 'width' => true, + '__experimentalDefaultControls' => array( + 'color' => true, + 'radius' => true, + 'style' => true, + 'width' => true + ) + ), + 'color' => array( + 'heading' => true, + 'text' => true, + 'background' => false, + '__experimentalSkipSerialization' => array( + 'gradients' + ), + 'enableContrastChecker' => false + ), + 'dimensions' => array( + 'aspectRatio' => true + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'layout' => array( + 'allowJustification' => false + ), + 'interactivity' => array( + 'clientNavigation' => true + ), + 'filter' => array( + 'duotone' => true + ), + 'allowedBlocks' => true + ), + 'selectors' => array( + 'filter' => array( + 'duotone' => '.wp-block-cover > .wp-block-cover__image-background, .wp-block-cover > .wp-block-cover__video-background' + ) + ), + 'editorStyle' => 'wp-block-cover-editor', + 'style' => 'wp-block-cover' + ), + 'details' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/details', + 'title' => 'Details', + 'category' => 'text', + 'description' => 'Hide and show additional content.', + 'keywords' => array( + 'summary', + 'toggle', + 'disclosure' + ), + 'textdomain' => 'default', + 'attributes' => array( + 'showContent' => array( + 'type' => 'boolean', + 'default' => false + ), + 'summary' => array( + 'type' => 'rich-text', + 'source' => 'rich-text', + 'selector' => 'summary', + 'role' => 'content' + ), + 'name' => array( + 'type' => 'string', + 'source' => 'attribute', + 'attribute' => 'name', + 'selector' => '.wp-block-details' + ), + 'placeholder' => array( + 'type' => 'string' + ) + ), + 'supports' => array( + '__experimentalOnEnter' => true, + 'align' => array( + 'wide', + 'full' + ), + 'anchor' => true, + 'color' => array( + 'gradients' => true, + 'link' => true, + '__experimentalDefaultControls' => array( + 'background' => true, + 'text' => true + ) + ), + '__experimentalBorder' => array( + 'color' => true, + 'width' => true, + 'style' => true + ), + 'html' => false, + 'spacing' => array( + 'margin' => true, + 'padding' => true, + 'blockGap' => true, + '__experimentalDefaultControls' => array( + 'margin' => false, + 'padding' => false + ) + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'layout' => array( + 'allowEditing' => false + ), + 'interactivity' => array( + 'clientNavigation' => true + ), + 'allowedBlocks' => true + ), + 'editorStyle' => 'wp-block-details-editor', + 'style' => 'wp-block-details' + ), + 'embed' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/embed', + 'title' => 'Embed', + 'category' => 'embed', + 'description' => 'Add a block that displays content pulled from other sites, like Twitter or YouTube.', + 'textdomain' => 'default', + 'attributes' => array( + 'url' => array( + 'type' => 'string', + 'role' => 'content' + ), + 'caption' => array( + 'type' => 'rich-text', + 'source' => 'rich-text', + 'selector' => 'figcaption', + 'role' => 'content' + ), + 'type' => array( + 'type' => 'string', + 'role' => 'content' + ), + 'providerNameSlug' => array( + 'type' => 'string', + 'role' => 'content' + ), + 'allowResponsive' => array( + 'type' => 'boolean', + 'default' => true + ), + 'responsive' => array( + 'type' => 'boolean', + 'default' => false, + 'role' => 'content' + ), + 'previewable' => array( + 'type' => 'boolean', + 'default' => true, + 'role' => 'content' + ) + ), + 'supports' => array( + 'anchor' => true, + 'align' => true, + 'spacing' => array( + 'margin' => true + ), + 'interactivity' => array( + 'clientNavigation' => true + ) + ), + 'editorStyle' => 'wp-block-embed-editor', + 'style' => 'wp-block-embed' + ), + 'file' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/file', + 'title' => 'File', + 'category' => 'media', + 'description' => 'Add a link to a downloadable file.', + 'keywords' => array( + 'document', + 'pdf', + 'download' + ), + 'textdomain' => 'default', + 'attributes' => array( + 'id' => array( + 'type' => 'number' + ), + 'blob' => array( + 'type' => 'string', + 'role' => 'local' + ), + 'href' => array( + 'type' => 'string', + 'role' => 'content' + ), + 'fileId' => array( + 'type' => 'string', + 'source' => 'attribute', + 'selector' => 'a:not([download])', + 'attribute' => 'id' + ), + 'fileName' => array( + 'type' => 'rich-text', + 'source' => 'rich-text', + 'selector' => 'a:not([download])', + 'role' => 'content' + ), + 'textLinkHref' => array( + 'type' => 'string', + 'source' => 'attribute', + 'selector' => 'a:not([download])', + 'attribute' => 'href', + 'role' => 'content' + ), + 'textLinkTarget' => array( + 'type' => 'string', + 'source' => 'attribute', + 'selector' => 'a:not([download])', + 'attribute' => 'target' + ), + 'showDownloadButton' => array( + 'type' => 'boolean', + 'default' => true + ), + 'downloadButtonText' => array( + 'type' => 'rich-text', + 'source' => 'rich-text', + 'selector' => 'a[download]', + 'role' => 'content' + ), + 'displayPreview' => array( + 'type' => 'boolean' + ), + 'previewHeight' => array( + 'type' => 'number', + 'default' => 600 + ) + ), + 'supports' => array( + 'anchor' => true, + 'align' => true, + 'spacing' => array( + 'margin' => true, + 'padding' => true + ), + 'color' => array( + 'gradients' => true, + 'link' => true, + 'text' => false, + '__experimentalDefaultControls' => array( + 'background' => true, + 'link' => true + ) + ), + '__experimentalBorder' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true, + '__experimentalDefaultControls' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true + ) + ), + 'interactivity' => true + ), + 'editorStyle' => 'wp-block-file-editor', + 'style' => 'wp-block-file' + ), + 'footnotes' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/footnotes', + 'title' => 'Footnotes', + 'category' => 'text', + 'description' => 'Display footnotes added to the page.', + 'keywords' => array( + 'references' + ), + 'textdomain' => 'default', + 'usesContext' => array( + 'postId', + 'postType' + ), + 'supports' => array( + 'anchor' => true, + '__experimentalBorder' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true, + '__experimentalDefaultControls' => array( + 'radius' => false, + 'color' => false, + 'width' => false, + 'style' => false + ) + ), + 'color' => array( + 'background' => true, + 'link' => true, + 'text' => true, + '__experimentalDefaultControls' => array( + 'link' => true, + 'text' => true + ) + ), + 'html' => false, + 'multiple' => false, + 'reusable' => false, + 'inserter' => false, + 'spacing' => array( + 'margin' => true, + 'padding' => true, + '__experimentalDefaultControls' => array( + 'margin' => false, + 'padding' => false + ) + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalTextDecoration' => true, + '__experimentalFontStyle' => true, + '__experimentalFontWeight' => true, + '__experimentalLetterSpacing' => true, + '__experimentalTextTransform' => true, + '__experimentalWritingMode' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ) + ), + 'style' => 'wp-block-footnotes' + ), + 'freeform' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/freeform', + 'title' => 'Classic', + 'category' => 'text', + 'description' => 'Use the classic WordPress editor.', + 'textdomain' => 'default', + 'attributes' => array( + 'content' => array( + 'type' => 'string', + 'source' => 'raw' + ) + ), + 'supports' => array( + 'className' => false, + 'customClassName' => false, + 'lock' => false, + 'reusable' => false, + 'renaming' => false, + 'visibility' => false, + 'customCSS' => false + ), + 'editorStyle' => 'wp-block-freeform-editor' + ), + 'gallery' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/gallery', + 'title' => 'Gallery', + 'category' => 'media', + 'usesContext' => array( + 'galleryId' + ), + 'allowedBlocks' => array( + 'core/image' + ), + 'description' => 'Display multiple images in a rich gallery.', + 'keywords' => array( + 'images', + 'photos' + ), + 'textdomain' => 'default', + 'attributes' => array( + 'images' => array( + 'type' => 'array', + 'default' => array( + + ), + 'source' => 'query', + 'selector' => '.blocks-gallery-item', + 'query' => array( + 'url' => array( + 'type' => 'string', + 'source' => 'attribute', + 'selector' => 'img', + 'attribute' => 'src' + ), + 'fullUrl' => array( + 'type' => 'string', + 'source' => 'attribute', + 'selector' => 'img', + 'attribute' => 'data-full-url' + ), + 'link' => array( + 'type' => 'string', + 'source' => 'attribute', + 'selector' => 'img', + 'attribute' => 'data-link' + ), + 'alt' => array( + 'type' => 'string', + 'source' => 'attribute', + 'selector' => 'img', + 'attribute' => 'alt', + 'default' => '' + ), + 'id' => array( + 'type' => 'string', + 'source' => 'attribute', + 'selector' => 'img', + 'attribute' => 'data-id' + ), + 'caption' => array( + 'type' => 'rich-text', + 'source' => 'rich-text', + 'selector' => '.blocks-gallery-item__caption' + ) + ) + ), + 'ids' => array( + 'type' => 'array', + 'items' => array( + 'type' => 'number' + ), + 'default' => array( + + ) + ), + 'navigationButtonType' => array( + 'type' => 'string', + 'default' => 'icon', + 'enum' => array( + 'icon', + 'text', + 'both' + ) + ), + 'shortCodeTransforms' => array( + 'type' => 'array', + 'items' => array( + 'type' => 'object' + ), + 'default' => array( + + ) + ), + 'columns' => array( + 'type' => 'number', + 'minimum' => 1, + 'maximum' => 8 + ), + 'caption' => array( + 'type' => 'rich-text', + 'source' => 'rich-text', + 'selector' => '.blocks-gallery-caption', + 'role' => 'content' + ), + 'imageCrop' => array( + 'type' => 'boolean', + 'default' => true + ), + 'randomOrder' => array( + 'type' => 'boolean', + 'default' => false + ), + 'fixedHeight' => array( + 'type' => 'boolean', + 'default' => true + ), + 'linkTarget' => array( + 'type' => 'string' + ), + 'linkTo' => array( + 'type' => 'string' + ), + 'sizeSlug' => array( + 'type' => 'string', + 'default' => 'large' + ), + 'allowResize' => array( + 'type' => 'boolean', + 'default' => false + ), + 'aspectRatio' => array( + 'type' => 'string', + 'default' => 'auto' + ) + ), + 'providesContext' => array( + 'allowResize' => 'allowResize', + 'imageCrop' => 'imageCrop', + 'fixedHeight' => 'fixedHeight', + 'navigationButtonType' => 'navigationButtonType' + ), + 'supports' => array( + 'anchor' => true, + 'align' => true, + '__experimentalBorder' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true, + '__experimentalDefaultControls' => array( + 'color' => true, + 'radius' => true + ) + ), + 'html' => false, + 'units' => array( + 'px', + 'em', + 'rem', + 'vh', + 'vw' + ), + 'spacing' => array( + 'margin' => true, + 'padding' => true, + 'blockGap' => array( + 'horizontal', + 'vertical' + ), + '__experimentalSkipSerialization' => array( + 'blockGap' + ), + '__experimentalDefaultControls' => array( + 'blockGap' => true, + 'margin' => false, + 'padding' => false + ) + ), + 'color' => array( + 'text' => false, + 'background' => true, + 'gradients' => true + ), + 'layout' => array( + 'allowSwitching' => false, + 'allowInheriting' => false, + 'allowEditing' => false, + 'default' => array( + 'type' => 'flex' + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ), + 'listView' => true + ), + 'editorStyle' => 'wp-block-gallery-editor', + 'style' => 'wp-block-gallery' + ), + 'group' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/group', + 'title' => 'Group', + 'category' => 'design', + 'description' => 'Gather blocks in a layout container.', + 'keywords' => array( + 'container', + 'wrapper', + 'row', + 'section' + ), + 'textdomain' => 'default', + 'attributes' => array( + 'tagName' => array( + 'type' => 'string', + 'default' => 'div' + ), + 'templateLock' => array( + 'type' => array( + 'string', + 'boolean' + ), + 'enum' => array( + 'all', + 'insert', + 'contentOnly', + false + ) + ) + ), + 'supports' => array( + '__experimentalOnEnter' => true, + '__experimentalOnMerge' => true, + '__experimentalSettings' => true, + 'align' => array( + 'wide', + 'full' + ), + 'anchor' => true, + 'ariaLabel' => true, + 'html' => false, + 'background' => array( + 'backgroundImage' => true, + 'backgroundSize' => true, + '__experimentalDefaultControls' => array( + 'backgroundImage' => true + ) + ), + 'color' => array( + 'gradients' => true, + 'heading' => true, + 'button' => true, + 'link' => true, + '__experimentalDefaultControls' => array( + 'background' => true, + 'text' => true + ) + ), + 'shadow' => true, + 'spacing' => array( + 'margin' => array( + 'top', + 'bottom' + ), + 'padding' => true, + 'blockGap' => true, + '__experimentalDefaultControls' => array( + 'padding' => true, + 'blockGap' => true + ) + ), + 'dimensions' => array( + 'minHeight' => true + ), + '__experimentalBorder' => array( + 'color' => true, + 'radius' => true, + 'style' => true, + 'width' => true, + '__experimentalDefaultControls' => array( + 'color' => true, + 'radius' => true, + 'style' => true, + 'width' => true + ) + ), + 'position' => array( + 'sticky' => true + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'layout' => array( + 'allowSizingOnChildren' => true + ), + 'interactivity' => array( + 'clientNavigation' => true + ), + 'allowedBlocks' => true + ), + 'editorStyle' => 'wp-block-group-editor', + 'style' => 'wp-block-group' + ), + 'heading' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/heading', + 'title' => 'Heading', + 'category' => 'text', + 'description' => 'Introduce new sections and organize content to help visitors (and search engines) understand the structure of your content.', + 'keywords' => array( + 'title', + 'subtitle' + ), + 'textdomain' => 'default', + 'attributes' => array( + 'content' => array( + 'type' => 'rich-text', + 'source' => 'rich-text', + 'selector' => 'h1,h2,h3,h4,h5,h6', + 'role' => 'content' + ), + 'level' => array( + 'type' => 'number', + 'default' => 2 + ), + 'levelOptions' => array( + 'type' => 'array' + ), + 'placeholder' => array( + 'type' => 'string' + ) + ), + 'supports' => array( + 'align' => array( + 'wide', + 'full' + ), + 'anchor' => true, + 'className' => true, + 'splitting' => true, + '__experimentalBorder' => array( + 'color' => true, + 'radius' => true, + 'style' => true, + 'width' => true + ), + 'color' => array( + 'gradients' => true, + 'link' => true, + '__experimentalDefaultControls' => array( + 'background' => true, + 'text' => true + ) + ), + 'spacing' => array( + 'margin' => true, + 'padding' => true, + '__experimentalDefaultControls' => array( + 'margin' => false, + 'padding' => false + ) + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + 'textAlign' => true, + '__experimentalFontFamily' => true, + '__experimentalFontStyle' => true, + '__experimentalFontWeight' => true, + '__experimentalLetterSpacing' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalWritingMode' => true, + 'fitText' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + '__unstablePasteTextInline' => true, + '__experimentalSlashInserter' => true, + 'interactivity' => array( + 'clientNavigation' => true + ) + ), + 'editorStyle' => 'wp-block-heading-editor', + 'style' => 'wp-block-heading' + ), + 'home-link' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/home-link', + 'category' => 'design', + 'parent' => array( + 'core/navigation' + ), + 'title' => 'Home Link', + 'description' => 'Create a link that always points to the homepage of the site. Usually not necessary if there is already a site title link present in the header.', + 'textdomain' => 'default', + 'attributes' => array( + 'label' => array( + 'type' => 'string', + 'role' => 'content' + ) + ), + 'usesContext' => array( + 'textColor', + 'customTextColor', + 'backgroundColor', + 'customBackgroundColor', + 'fontSize', + 'customFontSize', + 'style' + ), + 'supports' => array( + 'anchor' => true, + 'reusable' => false, + 'html' => false, + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ) + ), + 'editorStyle' => 'wp-block-home-link-editor', + 'style' => 'wp-block-home-link' + ), + 'html' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/html', + 'title' => 'Custom HTML', + 'category' => 'widgets', + 'description' => 'Add custom HTML code and preview it as you edit.', + 'keywords' => array( + 'embed' + ), + 'textdomain' => 'default', + 'attributes' => array( + 'content' => array( + 'type' => 'string', + 'source' => 'raw', + 'role' => 'content' + ) + ), + 'supports' => array( + 'customClassName' => false, + 'className' => false, + 'html' => false, + 'interactivity' => array( + 'clientNavigation' => true + ), + 'customCSS' => false, + 'visibility' => false + ), + 'editorStyle' => 'wp-block-html-editor' + ), + 'icon' => array( + 'apiVersion' => 3, + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'name' => 'core/icon', + 'title' => 'Icon', + 'category' => 'media', + 'description' => 'Insert an SVG icon.', + 'keywords' => array( + 'icon', + 'svg' + ), + 'textdomain' => 'default', + 'attributes' => array( + 'icon' => array( + 'type' => 'string', + 'role' => 'content' + ) + ), + 'supports' => array( + 'anchor' => true, + 'ariaLabel' => array( + '__experimentalSkipSerialization' => true + ), + 'align' => array( + 'left', + 'center', + 'right' + ), + 'html' => false, + 'color' => array( + 'background' => true, + 'text' => true, + '__experimentalSkipSerialization' => true + ), + 'interactivity' => array( + 'clientNavigation' => true + ), + '__experimentalBorder' => array( + 'color' => true, + 'radius' => true, + 'style' => true, + 'width' => true, + '__experimentalSkipSerialization' => true, + '__experimentalDefaultControls' => array( + 'color' => false, + 'radius' => false, + 'style' => false, + 'width' => false + ) + ), + 'spacing' => array( + 'padding' => true, + 'margin' => true, + '__experimentalSkipSerialization' => array( + 'padding' + ), + '__experimentalDefaultControls' => array( + 'margin' => false, + 'padding' => false + ) + ), + 'dimensions' => array( + 'width' => true, + '__experimentalSkipSerialization' => array( + 'width' + ), + '__experimentalDefaultControls' => array( + 'width' => true + ) + ) + ), + 'selectors' => array( + 'root' => '.wp-block-icon svg', + 'css' => '.wp-block-icon', + 'spacing' => array( + 'margin' => '.wp-block-icon' + ) + ), + 'style' => 'wp-block-icon', + 'editorStyle' => 'wp-block-icon-editor' + ), + 'image' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/image', + 'title' => 'Image', + 'category' => 'media', + 'usesContext' => array( + 'allowResize', + 'imageCrop', + 'fixedHeight', + 'navigationButtonType', + 'postId', + 'postType', + 'queryId', + 'galleryId' + ), + 'description' => 'Insert an image to make a visual statement.', + 'keywords' => array( + 'img', + 'photo', + 'picture' + ), + 'textdomain' => 'default', + 'attributes' => array( + 'blob' => array( + 'type' => 'string', + 'role' => 'local' + ), + 'url' => array( + 'type' => 'string', + 'source' => 'attribute', + 'selector' => 'img', + 'attribute' => 'src', + 'role' => 'content' + ), + 'alt' => array( + 'type' => 'string', + 'source' => 'attribute', + 'selector' => 'img', + 'attribute' => 'alt', + 'default' => '', + 'role' => 'content' + ), + 'caption' => array( + 'type' => 'rich-text', + 'source' => 'rich-text', + 'selector' => 'figcaption', + 'role' => 'content' + ), + 'lightbox' => array( + 'type' => 'object', + 'enabled' => array( + 'type' => 'boolean' + ) + ), + 'title' => array( + 'type' => 'string', + 'source' => 'attribute', + 'selector' => 'img', + 'attribute' => 'title', + 'role' => 'content' + ), + 'href' => array( + 'type' => 'string', + 'source' => 'attribute', + 'selector' => 'figure > a', + 'attribute' => 'href', + 'role' => 'content' + ), + 'rel' => array( + 'type' => 'string', + 'source' => 'attribute', + 'selector' => 'figure > a', + 'attribute' => 'rel' + ), + 'linkClass' => array( + 'type' => 'string', + 'source' => 'attribute', + 'selector' => 'figure > a', + 'attribute' => 'class' + ), + 'id' => array( + 'type' => 'number', + 'role' => 'content' + ), + 'width' => array( + 'type' => 'string' + ), + 'height' => array( + 'type' => 'string' + ), + 'aspectRatio' => array( + 'type' => 'string' + ), + 'scale' => array( + 'type' => 'string' + ), + 'focalPoint' => array( + 'type' => 'object' + ), + 'sizeSlug' => array( + 'type' => 'string' + ), + 'linkDestination' => array( + 'type' => 'string' + ), + 'linkTarget' => array( + 'type' => 'string', + 'source' => 'attribute', + 'selector' => 'figure > a', + 'attribute' => 'target' + ) + ), + 'supports' => array( + 'interactivity' => true, + 'align' => array( + 'left', + 'center', + 'right', + 'wide', + 'full' + ), + 'anchor' => true, + 'color' => array( + 'text' => false, + 'background' => false + ), + 'filter' => array( + 'duotone' => true + ), + 'spacing' => array( + 'margin' => true + ), + '__experimentalBorder' => array( + 'color' => true, + 'radius' => true, + 'width' => true, + '__experimentalSkipSerialization' => true, + '__experimentalDefaultControls' => array( + 'color' => true, + 'radius' => true, + 'width' => true + ) + ), + 'shadow' => array( + '__experimentalSkipSerialization' => true + ) + ), + 'selectors' => array( + 'border' => '.wp-block-image img, .wp-block-image .wp-block-image__crop-area, .wp-block-image .components-placeholder', + 'shadow' => '.wp-block-image img, .wp-block-image .wp-block-image__crop-area, .wp-block-image .components-placeholder', + 'filter' => array( + 'duotone' => '.wp-block-image img, .wp-block-image .components-placeholder' + ) + ), + 'styles' => array( + array( + 'name' => 'default', + 'label' => 'Default', + 'isDefault' => true + ), + array( + 'name' => 'rounded', + 'label' => 'Rounded' + ) + ), + 'editorStyle' => 'wp-block-image-editor', + 'style' => 'wp-block-image' + ), + 'latest-comments' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/latest-comments', + 'title' => 'Latest Comments', + 'category' => 'widgets', + 'description' => 'Display a list of your most recent comments.', + 'keywords' => array( + 'recent comments' + ), + 'textdomain' => 'default', + 'attributes' => array( + 'commentsToShow' => array( + 'type' => 'number', + 'default' => 5, + 'minimum' => 1, + 'maximum' => 100 + ), + 'displayAvatar' => array( + 'type' => 'boolean', + 'default' => true + ), + 'displayDate' => array( + 'type' => 'boolean', + 'default' => true + ), + 'displayContent' => array( + 'type' => 'string', + 'default' => 'excerpt', + 'enum' => array( + 'none', + 'excerpt', + 'full' + ) + ) + ), + 'supports' => array( + 'anchor' => true, + 'align' => true, + 'color' => array( + 'gradients' => true, + 'link' => true, + '__experimentalDefaultControls' => array( + 'background' => true, + 'text' => true, + 'link' => true + ) + ), + 'html' => false, + 'spacing' => array( + 'margin' => true, + 'padding' => true + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ) + ), + 'style' => 'wp-block-latest-comments' + ), + 'latest-posts' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/latest-posts', + 'title' => 'Latest Posts', + 'category' => 'widgets', + 'description' => 'Display a list of your most recent posts.', + 'keywords' => array( + 'recent posts' + ), + 'textdomain' => 'default', + 'attributes' => array( + 'categories' => array( + 'type' => 'array', + 'items' => array( + 'type' => 'object' + ) + ), + 'selectedAuthor' => array( + 'type' => 'number' + ), + 'postsToShow' => array( + 'type' => 'number', + 'default' => 5 + ), + 'displayPostContent' => array( + 'type' => 'boolean', + 'default' => false + ), + 'displayPostContentRadio' => array( + 'type' => 'string', + 'default' => 'excerpt' + ), + 'excerptLength' => array( + 'type' => 'number', + 'default' => 55 + ), + 'displayAuthor' => array( + 'type' => 'boolean', + 'default' => false + ), + 'displayPostDate' => array( + 'type' => 'boolean', + 'default' => false + ), + 'postLayout' => array( + 'type' => 'string', + 'default' => 'list' + ), + 'columns' => array( + 'type' => 'number', + 'default' => 3 + ), + 'order' => array( + 'type' => 'string', + 'default' => 'desc' + ), + 'orderBy' => array( + 'type' => 'string', + 'default' => 'date' + ), + 'displayFeaturedImage' => array( + 'type' => 'boolean', + 'default' => false + ), + 'featuredImageAlign' => array( + 'type' => 'string', + 'enum' => array( + 'left', + 'center', + 'right' + ) + ), + 'featuredImageSizeSlug' => array( + 'type' => 'string', + 'default' => 'thumbnail' + ), + 'featuredImageSizeWidth' => array( + 'type' => 'number', + 'default' => null + ), + 'featuredImageSizeHeight' => array( + 'type' => 'number', + 'default' => null + ), + 'addLinkToFeaturedImage' => array( + 'type' => 'boolean', + 'default' => false + ) + ), + 'supports' => array( + 'anchor' => true, + 'align' => true, + 'html' => false, + 'color' => array( + 'gradients' => true, + 'link' => true, + '__experimentalDefaultControls' => array( + 'background' => true, + 'text' => true, + 'link' => true + ) + ), + 'spacing' => array( + 'margin' => true, + 'padding' => true + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + '__experimentalBorder' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true, + '__experimentalDefaultControls' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ) + ), + 'editorStyle' => 'wp-block-latest-posts-editor', + 'style' => 'wp-block-latest-posts' + ), + 'legacy-widget' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/legacy-widget', + 'title' => 'Legacy Widget', + 'category' => 'widgets', + 'description' => 'Display a legacy widget.', + 'textdomain' => 'default', + 'attributes' => array( + 'id' => array( + 'type' => 'string', + 'default' => null + ), + 'idBase' => array( + 'type' => 'string', + 'default' => null + ), + 'instance' => array( + 'type' => 'object', + 'default' => null + ) + ), + 'supports' => array( + 'html' => false, + 'customClassName' => false, + 'reusable' => false + ), + 'editorStyle' => 'wp-block-legacy-widget-editor' + ), + 'list' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/list', + 'title' => 'List', + 'category' => 'text', + 'allowedBlocks' => array( + 'core/list-item' + ), + 'description' => 'An organized collection of items displayed in a specific order.', + 'keywords' => array( + 'bullet list', + 'ordered list', + 'numbered list' + ), + 'textdomain' => 'default', + 'attributes' => array( + 'ordered' => array( + 'type' => 'boolean', + 'default' => false, + 'role' => 'content' + ), + 'values' => array( + 'type' => 'string', + 'source' => 'html', + 'selector' => 'ol,ul', + 'multiline' => 'li', + 'default' => '', + 'role' => 'content' + ), + 'type' => array( + 'type' => 'string' + ), + 'start' => array( + 'type' => 'number' + ), + 'reversed' => array( + 'type' => 'boolean' + ), + 'placeholder' => array( + 'type' => 'string' + ) + ), + 'supports' => array( + 'anchor' => true, + 'html' => false, + '__experimentalBorder' => array( + 'color' => true, + 'radius' => true, + 'style' => true, + 'width' => true + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'color' => array( + 'gradients' => true, + 'link' => true, + '__experimentalDefaultControls' => array( + 'background' => true, + 'text' => true + ) + ), + 'spacing' => array( + 'margin' => true, + 'padding' => true, + '__experimentalDefaultControls' => array( + 'margin' => false, + 'padding' => false + ) + ), + '__unstablePasteTextInline' => true, + '__experimentalOnMerge' => true, + '__experimentalSlashInserter' => true, + 'interactivity' => array( + 'clientNavigation' => true + ), + 'listView' => true + ), + 'selectors' => array( + 'border' => '.wp-block-list:not(.wp-block-list .wp-block-list)' + ), + 'editorStyle' => 'wp-block-list-editor', + 'style' => 'wp-block-list' + ), + 'list-item' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/list-item', + 'title' => 'List Item', + 'category' => 'text', + 'parent' => array( + 'core/list' + ), + 'allowedBlocks' => array( + 'core/list' + ), + 'description' => 'An individual item within a list.', + 'textdomain' => 'default', + 'attributes' => array( + 'placeholder' => array( + 'type' => 'string' + ), + 'content' => array( + 'type' => 'rich-text', + 'source' => 'rich-text', + 'selector' => 'li', + 'role' => 'content' + ) + ), + 'supports' => array( + 'anchor' => true, + 'className' => false, + 'splitting' => true, + '__experimentalBorder' => array( + 'color' => true, + 'radius' => true, + 'style' => true, + 'width' => true + ), + 'color' => array( + 'gradients' => true, + 'link' => true, + 'background' => true, + '__experimentalDefaultControls' => array( + 'text' => true + ) + ), + 'spacing' => array( + 'margin' => true, + 'padding' => true, + '__experimentalDefaultControls' => array( + 'margin' => false, + 'padding' => false + ) + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ) + ), + 'selectors' => array( + 'root' => '.wp-block-list > li', + 'border' => '.wp-block-list:not(.wp-block-list .wp-block-list) > li' + ) + ), + 'loginout' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/loginout', + 'title' => 'Login/out', + 'category' => 'theme', + 'description' => 'Show login & logout links.', + 'keywords' => array( + 'login', + 'logout', + 'form' + ), + 'textdomain' => 'default', + 'attributes' => array( + 'displayLoginAsForm' => array( + 'type' => 'boolean', + 'default' => false + ), + 'redirectToCurrent' => array( + 'type' => 'boolean', + 'default' => true + ) + ), + 'example' => array( + 'viewportWidth' => 350 + ), + 'supports' => array( + 'anchor' => true, + 'className' => true, + 'color' => array( + 'background' => true, + 'text' => false, + 'gradients' => true, + 'link' => true + ), + 'spacing' => array( + 'margin' => true, + 'padding' => true, + '__experimentalDefaultControls' => array( + 'margin' => false, + 'padding' => false + ) + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + '__experimentalBorder' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true + ), + 'interactivity' => array( + 'clientNavigation' => true + ) + ), + 'style' => 'wp-block-loginout' + ), + 'math' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/math', + 'title' => 'Math', + 'category' => 'text', + 'description' => 'Display mathematical notation using LaTeX.', + 'keywords' => array( + 'equation', + 'formula', + 'latex', + 'mathematics' + ), + 'textdomain' => 'default', + 'supports' => array( + 'anchor' => true, + 'html' => false, + '__experimentalBorder' => array( + 'color' => true, + 'radius' => true, + 'style' => true, + 'width' => true + ), + 'color' => array( + 'gradients' => true, + '__experimentalDefaultControls' => array( + 'background' => true, + 'text' => true + ) + ), + 'spacing' => array( + 'margin' => true, + 'padding' => true, + '__experimentalDefaultControls' => array( + 'margin' => false, + 'padding' => false + ) + ), + 'typography' => array( + 'fontSize' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ) + ), + 'attributes' => array( + 'latex' => array( + 'type' => 'string', + 'role' => 'content' + ), + 'mathML' => array( + 'type' => 'string', + 'source' => 'html', + 'selector' => 'math' + ) + ) + ), + 'media-text' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/media-text', + 'title' => 'Media & Text', + 'category' => 'media', + 'description' => 'Set media and words side-by-side for a richer layout.', + 'keywords' => array( + 'image', + 'video' + ), + 'textdomain' => 'default', + 'attributes' => array( + 'align' => array( + 'type' => 'string', + 'default' => 'none' + ), + 'mediaAlt' => array( + 'type' => 'string', + 'source' => 'attribute', + 'selector' => 'figure img', + 'attribute' => 'alt', + 'default' => '', + 'role' => 'content' + ), + 'mediaPosition' => array( + 'type' => 'string', + 'default' => 'left' + ), + 'mediaId' => array( + 'type' => 'number', + 'role' => 'content' + ), + 'mediaUrl' => array( + 'type' => 'string', + 'source' => 'attribute', + 'selector' => 'figure video,figure img', + 'attribute' => 'src', + 'role' => 'content' + ), + 'mediaLink' => array( + 'type' => 'string' + ), + 'linkDestination' => array( + 'type' => 'string' + ), + 'linkTarget' => array( + 'type' => 'string', + 'source' => 'attribute', + 'selector' => 'figure a', + 'attribute' => 'target' + ), + 'href' => array( + 'type' => 'string', + 'source' => 'attribute', + 'selector' => 'figure a', + 'attribute' => 'href', + 'role' => 'content' + ), + 'rel' => array( + 'type' => 'string', + 'source' => 'attribute', + 'selector' => 'figure a', + 'attribute' => 'rel' + ), + 'linkClass' => array( + 'type' => 'string', + 'source' => 'attribute', + 'selector' => 'figure a', + 'attribute' => 'class' + ), + 'mediaType' => array( + 'type' => 'string', + 'role' => 'content' + ), + 'mediaWidth' => array( + 'type' => 'number', + 'default' => 50 + ), + 'mediaSizeSlug' => array( + 'type' => 'string' + ), + 'isStackedOnMobile' => array( + 'type' => 'boolean', + 'default' => true + ), + 'verticalAlignment' => array( + 'type' => 'string' + ), + 'imageFill' => array( + 'type' => 'boolean' + ), + 'focalPoint' => array( + 'type' => 'object' + ), + 'useFeaturedImage' => array( + 'type' => 'boolean', + 'default' => false + ) + ), + 'usesContext' => array( + 'postId', + 'postType' + ), + 'supports' => array( + 'anchor' => true, + 'align' => array( + 'wide', + 'full' + ), + 'html' => false, + '__experimentalBorder' => array( + 'color' => true, + 'radius' => true, + 'style' => true, + 'width' => true, + '__experimentalDefaultControls' => array( + 'color' => true, + 'radius' => true, + 'style' => true, + 'width' => true + ) + ), + 'color' => array( + 'gradients' => true, + 'heading' => true, + 'link' => true, + '__experimentalDefaultControls' => array( + 'background' => true, + 'text' => true + ) + ), + 'spacing' => array( + 'margin' => true, + 'padding' => true + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ), + 'allowedBlocks' => true + ), + 'editorStyle' => 'wp-block-media-text-editor', + 'style' => 'wp-block-media-text' + ), + 'missing' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/missing', + 'title' => 'Unsupported', + 'category' => 'text', + 'description' => 'Your site doesn’t include support for this block.', + 'textdomain' => 'default', + 'attributes' => array( + 'originalName' => array( + 'type' => 'string' + ), + 'originalUndelimitedContent' => array( + 'type' => 'string' + ), + 'originalContent' => array( + 'type' => 'string', + 'source' => 'raw' + ) + ), + 'supports' => array( + 'className' => false, + 'customClassName' => false, + 'inserter' => false, + 'html' => false, + 'lock' => false, + 'reusable' => false, + 'renaming' => false, + 'visibility' => false, + 'interactivity' => array( + 'clientNavigation' => true + ), + 'customCSS' => false + ) + ), + 'more' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/more', + 'title' => 'More', + 'category' => 'design', + 'description' => 'Content before this block will be shown in the excerpt on your archives page.', + 'keywords' => array( + 'read more' + ), + 'textdomain' => 'default', + 'attributes' => array( + 'customText' => array( + 'type' => 'string', + 'default' => '', + 'role' => 'content' + ), + 'noTeaser' => array( + 'type' => 'boolean', + 'default' => false + ) + ), + 'supports' => array( + 'customClassName' => false, + 'className' => false, + 'html' => false, + 'multiple' => false, + 'visibility' => false, + 'interactivity' => array( + 'clientNavigation' => true + ), + 'customCSS' => false + ), + 'editorStyle' => 'wp-block-more-editor' + ), + 'navigation' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/navigation', + 'title' => 'Navigation', + 'category' => 'theme', + 'allowedBlocks' => array( + 'core/navigation-link', + 'core/search', + 'core/social-links', + 'core/page-list', + 'core/spacer', + 'core/home-link', + 'core/icon', + 'core/site-title', + 'core/site-logo', + 'core/navigation-submenu', + 'core/loginout', + 'core/buttons' + ), + 'description' => 'A collection of blocks that allow visitors to get around your site.', + 'keywords' => array( + 'menu', + 'navigation', + 'links' + ), + 'textdomain' => 'default', + 'attributes' => array( + 'ref' => array( + 'type' => 'number' + ), + 'textColor' => array( + 'type' => 'string' + ), + 'customTextColor' => array( + 'type' => 'string' + ), + 'rgbTextColor' => array( + 'type' => 'string' + ), + 'backgroundColor' => array( + 'type' => 'string' + ), + 'customBackgroundColor' => array( + 'type' => 'string' + ), + 'rgbBackgroundColor' => array( + 'type' => 'string' + ), + 'showSubmenuIcon' => array( + 'type' => 'boolean', + 'default' => true + ), + 'submenuVisibility' => array( + 'type' => 'string', + 'enum' => array( + 'hover', + 'click', + 'always' + ), + 'default' => 'hover' + ), + 'overlayMenu' => array( + 'type' => 'string', + 'default' => 'mobile' + ), + 'overlay' => array( + 'type' => 'string' + ), + 'icon' => array( + 'type' => 'string', + 'default' => 'handle' + ), + 'hasIcon' => array( + 'type' => 'boolean', + 'default' => true + ), + '__unstableLocation' => array( + 'type' => 'string' + ), + 'overlayBackgroundColor' => array( + 'type' => 'string' + ), + 'customOverlayBackgroundColor' => array( + 'type' => 'string' + ), + 'overlayTextColor' => array( + 'type' => 'string' + ), + 'customOverlayTextColor' => array( + 'type' => 'string' + ), + 'maxNestingLevel' => array( + 'type' => 'number', + 'default' => 5 + ), + 'templateLock' => array( + 'type' => array( + 'string', + 'boolean' + ), + 'enum' => array( + 'all', + 'insert', + 'contentOnly', + false + ) + ) + ), + 'providesContext' => array( + 'textColor' => 'textColor', + 'customTextColor' => 'customTextColor', + 'backgroundColor' => 'backgroundColor', + 'customBackgroundColor' => 'customBackgroundColor', + 'overlayTextColor' => 'overlayTextColor', + 'customOverlayTextColor' => 'customOverlayTextColor', + 'overlayBackgroundColor' => 'overlayBackgroundColor', + 'customOverlayBackgroundColor' => 'customOverlayBackgroundColor', + 'fontSize' => 'fontSize', + 'customFontSize' => 'customFontSize', + 'showSubmenuIcon' => 'showSubmenuIcon', + 'submenuVisibility' => 'submenuVisibility', + 'openSubmenusOnClick' => 'openSubmenusOnClick', + 'style' => 'style', + 'maxNestingLevel' => 'maxNestingLevel' + ), + 'supports' => array( + 'anchor' => true, + 'align' => array( + 'wide', + 'full' + ), + 'ariaLabel' => true, + 'contentRole' => true, + 'html' => false, + 'inserter' => true, + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontStyle' => true, + '__experimentalFontWeight' => true, + '__experimentalTextTransform' => true, + '__experimentalFontFamily' => true, + '__experimentalLetterSpacing' => true, + '__experimentalTextDecoration' => true, + '__experimentalSkipSerialization' => array( + 'textDecoration' + ), + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'spacing' => array( + 'blockGap' => true, + 'units' => array( + 'px', + 'em', + 'rem', + 'vh', + 'vw' + ), + '__experimentalDefaultControls' => array( + 'blockGap' => true + ) + ), + 'layout' => array( + 'allowSwitching' => false, + 'allowInheriting' => false, + 'allowVerticalAlignment' => false, + 'allowSizingOnChildren' => true, + 'default' => array( + 'type' => 'flex' + ) + ), + 'interactivity' => true, + 'renaming' => false + ), + 'editorStyle' => 'wp-block-navigation-editor', + 'style' => 'wp-block-navigation' + ), + 'navigation-link' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/navigation-link', + 'title' => 'Custom Link', + 'category' => 'design', + 'parent' => array( + 'core/navigation' + ), + 'allowedBlocks' => array( + 'core/navigation-link', + 'core/navigation-submenu', + 'core/page-list' + ), + 'description' => 'Add a page, link, or another item to your navigation.', + 'textdomain' => 'default', + 'attributes' => array( + 'label' => array( + 'type' => 'string', + 'role' => 'content' + ), + 'type' => array( + 'type' => 'string' + ), + 'description' => array( + 'type' => 'string' + ), + 'rel' => array( + 'type' => 'string' + ), + 'id' => array( + 'type' => 'number' + ), + 'opensInNewTab' => array( + 'type' => 'boolean', + 'default' => false + ), + 'url' => array( + 'type' => 'string', + 'role' => 'content' + ), + 'title' => array( + 'type' => 'string' + ), + 'kind' => array( + 'type' => 'string' + ), + 'isTopLevelLink' => array( + 'type' => 'boolean' + ) + ), + 'usesContext' => array( + 'textColor', + 'customTextColor', + 'backgroundColor', + 'customBackgroundColor', + 'overlayTextColor', + 'customOverlayTextColor', + 'overlayBackgroundColor', + 'customOverlayBackgroundColor', + 'fontSize', + 'customFontSize', + 'showSubmenuIcon', + 'maxNestingLevel', + 'style' + ), + 'supports' => array( + 'anchor' => true, + 'reusable' => false, + 'html' => false, + '__experimentalSlashInserter' => true, + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'renaming' => false, + 'interactivity' => array( + 'clientNavigation' => true + ) + ), + 'editorStyle' => 'wp-block-navigation-link-editor', + 'style' => 'wp-block-navigation-link' + ), + 'navigation-overlay-close' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/navigation-overlay-close', + 'title' => 'Navigation Overlay Close', + 'category' => 'design', + 'description' => 'A customizable button to close overlays.', + 'keywords' => array( + 'close', + 'overlay', + 'navigation', + 'menu' + ), + 'textdomain' => 'default', + 'attributes' => array( + 'displayMode' => array( + 'type' => 'string', + 'enum' => array( + 'icon', + 'text', + 'both' + ), + 'default' => 'icon' + ), + 'text' => array( + 'type' => 'string' + ) + ), + 'supports' => array( + 'color' => array( + 'gradients' => false, + '__experimentalDefaultControls' => array( + 'background' => true, + 'text' => true + ) + ), + 'spacing' => array( + 'padding' => true, + '__experimentalDefaultControls' => array( + 'padding' => true + ) + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ) + ), + 'style' => 'wp-block-navigation-overlay-close' + ), + 'navigation-submenu' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/navigation-submenu', + 'title' => 'Submenu', + 'category' => 'design', + 'parent' => array( + 'core/navigation' + ), + 'description' => 'Add a submenu to your navigation.', + 'textdomain' => 'default', + 'attributes' => array( + 'label' => array( + 'type' => 'string', + 'role' => 'content' + ), + 'type' => array( + 'type' => 'string' + ), + 'description' => array( + 'type' => 'string' + ), + 'rel' => array( + 'type' => 'string' + ), + 'id' => array( + 'type' => 'number' + ), + 'opensInNewTab' => array( + 'type' => 'boolean', + 'default' => false + ), + 'url' => array( + 'type' => 'string', + 'role' => 'content' + ), + 'title' => array( + 'type' => 'string' + ), + 'kind' => array( + 'type' => 'string' + ), + 'isTopLevelItem' => array( + 'type' => 'boolean' + ) + ), + 'usesContext' => array( + 'textColor', + 'customTextColor', + 'backgroundColor', + 'customBackgroundColor', + 'overlayTextColor', + 'customOverlayTextColor', + 'overlayBackgroundColor', + 'customOverlayBackgroundColor', + 'fontSize', + 'customFontSize', + 'showSubmenuIcon', + 'maxNestingLevel', + 'openSubmenusOnClick', + 'submenuVisibility', + 'style' + ), + 'supports' => array( + 'anchor' => true, + 'reusable' => false, + 'html' => false, + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ) + ), + 'editorStyle' => 'wp-block-navigation-submenu-editor', + 'style' => 'wp-block-navigation-submenu' + ), + 'nextpage' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/nextpage', + 'title' => 'Page Break', + 'category' => 'design', + 'description' => 'Separate your content into a multi-page experience.', + 'keywords' => array( + 'next page', + 'pagination' + ), + 'parent' => array( + 'core/post-content' + ), + 'textdomain' => 'default', + 'supports' => array( + 'customClassName' => false, + 'className' => false, + 'html' => false, + 'visibility' => false, + 'interactivity' => array( + 'clientNavigation' => true + ), + 'customCSS' => false + ), + 'editorStyle' => 'wp-block-nextpage-editor' + ), + 'page-list' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/page-list', + 'title' => 'Page List', + 'category' => 'widgets', + 'allowedBlocks' => array( + 'core/page-list-item' + ), + 'description' => 'Display a list of all pages.', + 'keywords' => array( + 'menu', + 'navigation' + ), + 'textdomain' => 'default', + 'attributes' => array( + 'parentPageID' => array( + 'type' => 'integer', + 'default' => 0 + ), + 'isNested' => array( + 'type' => 'boolean', + 'default' => false + ) + ), + 'usesContext' => array( + 'textColor', + 'customTextColor', + 'backgroundColor', + 'customBackgroundColor', + 'overlayTextColor', + 'customOverlayTextColor', + 'overlayBackgroundColor', + 'customOverlayBackgroundColor', + 'fontSize', + 'customFontSize', + 'showSubmenuIcon', + 'style', + 'openSubmenusOnClick', + 'submenuVisibility' + ), + 'supports' => array( + 'anchor' => true, + 'reusable' => false, + 'html' => false, + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ), + 'color' => array( + 'text' => true, + 'background' => true, + 'link' => true, + 'gradients' => true, + '__experimentalDefaultControls' => array( + 'background' => true, + 'text' => true, + 'link' => true + ) + ), + '__experimentalBorder' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true + ), + 'spacing' => array( + 'padding' => true, + 'margin' => true, + '__experimentalDefaultControls' => array( + 'padding' => false, + 'margin' => false + ) + ), + 'contentRole' => true + ), + 'editorStyle' => 'wp-block-page-list-editor', + 'style' => 'wp-block-page-list' + ), + 'page-list-item' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/page-list-item', + 'title' => 'Page List Item', + 'category' => 'widgets', + 'parent' => array( + 'core/page-list' + ), + 'description' => 'Displays a page inside a list of all pages.', + 'keywords' => array( + 'page', + 'menu', + 'navigation' + ), + 'textdomain' => 'default', + 'attributes' => array( + 'id' => array( + 'type' => 'number' + ), + 'label' => array( + 'type' => 'string' + ), + 'title' => array( + 'type' => 'string' + ), + 'link' => array( + 'type' => 'string' + ), + 'hasChildren' => array( + 'type' => 'boolean' + ) + ), + 'usesContext' => array( + 'textColor', + 'customTextColor', + 'backgroundColor', + 'customBackgroundColor', + 'overlayTextColor', + 'customOverlayTextColor', + 'overlayBackgroundColor', + 'customOverlayBackgroundColor', + 'fontSize', + 'customFontSize', + 'showSubmenuIcon', + 'style', + 'openSubmenusOnClick', + 'submenuVisibility' + ), + 'supports' => array( + 'anchor' => true, + 'reusable' => false, + 'html' => false, + 'lock' => false, + 'inserter' => false, + '__experimentalToolbar' => false, + 'interactivity' => array( + 'clientNavigation' => true + ) + ), + 'editorStyle' => 'wp-block-page-list-editor', + 'style' => 'wp-block-page-list' + ), + 'paragraph' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/paragraph', + 'title' => 'Paragraph', + 'category' => 'text', + 'description' => 'Start with the basic building block of all narrative.', + 'keywords' => array( + 'text' + ), + 'textdomain' => 'default', + 'attributes' => array( + 'content' => array( + 'type' => 'rich-text', + 'source' => 'rich-text', + 'selector' => 'p', + 'role' => 'content' + ), + 'dropCap' => array( + 'type' => 'boolean', + 'default' => false + ), + 'placeholder' => array( + 'type' => 'string' + ), + 'direction' => array( + 'type' => 'string', + 'enum' => array( + 'ltr', + 'rtl' + ) + ) + ), + 'supports' => array( + 'align' => array( + 'wide', + 'full' + ), + 'splitting' => true, + 'anchor' => true, + 'className' => false, + '__experimentalBorder' => array( + 'color' => true, + 'radius' => true, + 'style' => true, + 'width' => true + ), + 'color' => array( + 'gradients' => true, + 'link' => true, + '__experimentalDefaultControls' => array( + 'background' => true, + 'text' => true + ) + ), + 'spacing' => array( + 'margin' => true, + 'padding' => true, + '__experimentalDefaultControls' => array( + 'margin' => false, + 'padding' => false + ) + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + 'textAlign' => true, + 'textColumns' => true, + 'textIndent' => true, + '__experimentalFontFamily' => true, + '__experimentalTextDecoration' => true, + '__experimentalFontStyle' => true, + '__experimentalFontWeight' => true, + '__experimentalLetterSpacing' => true, + '__experimentalTextTransform' => true, + '__experimentalWritingMode' => true, + 'fitText' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + '__experimentalSelector' => 'p', + '__unstablePasteTextInline' => true, + 'interactivity' => array( + 'clientNavigation' => true + ) + ), + 'selectors' => array( + 'root' => 'p', + 'typography' => array( + 'textIndent' => '.wp-block-paragraph + .wp-block-paragraph' + ) + ), + 'editorStyle' => 'wp-block-paragraph-editor', + 'style' => 'wp-block-paragraph' + ), + 'pattern' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/pattern', + 'title' => 'Pattern Placeholder', + 'category' => 'theme', + 'description' => 'Show a block pattern.', + 'supports' => array( + 'html' => false, + 'inserter' => false, + 'renaming' => false, + 'visibility' => false, + 'interactivity' => array( + 'clientNavigation' => true + ) + ), + 'textdomain' => 'default', + 'attributes' => array( + 'slug' => array( + 'type' => 'string' + ) + ) + ), + 'post-author' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/post-author', + 'title' => 'Author (deprecated)', + 'category' => 'theme', + 'description' => 'This block is deprecated. Please use the Avatar block, the Author Name block, and the Author Biography block instead.', + 'textdomain' => 'default', + 'attributes' => array( + 'textAlign' => array( + 'type' => 'string' + ), + 'avatarSize' => array( + 'type' => 'number', + 'default' => 48 + ), + 'showAvatar' => array( + 'type' => 'boolean', + 'default' => true + ), + 'showBio' => array( + 'type' => 'boolean' + ), + 'byline' => array( + 'type' => 'string' + ), + 'isLink' => array( + 'type' => 'boolean', + 'default' => false, + 'role' => 'content' + ), + 'linkTarget' => array( + 'type' => 'string', + 'default' => '_self', + 'role' => 'content' + ) + ), + 'usesContext' => array( + 'postType', + 'postId', + 'queryId' + ), + 'supports' => array( + 'inserter' => false, + 'anchor' => true, + 'html' => false, + 'spacing' => array( + 'margin' => true, + 'padding' => true + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'color' => array( + 'gradients' => true, + 'link' => true, + '__experimentalDefaultControls' => array( + 'background' => true, + 'text' => true + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ), + '__experimentalBorder' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true, + '__experimentalDefaultControls' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true + ) + ), + 'filter' => array( + 'duotone' => true + ) + ), + 'selectors' => array( + 'filter' => array( + 'duotone' => '.wp-block-post-author .wp-block-post-author__avatar img' + ) + ), + 'editorStyle' => 'wp-block-post-author-editor', + 'style' => 'wp-block-post-author' + ), + 'post-author-biography' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/post-author-biography', + 'title' => 'Author Biography', + 'category' => 'theme', + 'description' => 'The author biography.', + 'textdomain' => 'default', + 'usesContext' => array( + 'postType', + 'postId' + ), + 'example' => array( + 'viewportWidth' => 350 + ), + 'supports' => array( + 'anchor' => true, + 'spacing' => array( + 'margin' => true, + 'padding' => true + ), + 'color' => array( + 'gradients' => true, + 'link' => true, + '__experimentalDefaultControls' => array( + 'background' => true, + 'text' => true + ) + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + 'textAlign' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ), + '__experimentalBorder' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true, + '__experimentalDefaultControls' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true + ) + ) + ), + 'style' => 'wp-block-post-author-biography' + ), + 'post-author-name' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/post-author-name', + 'title' => 'Author Name', + 'category' => 'theme', + 'description' => 'The author name.', + 'textdomain' => 'default', + 'attributes' => array( + 'isLink' => array( + 'type' => 'boolean', + 'default' => false, + 'role' => 'content' + ), + 'linkTarget' => array( + 'type' => 'string', + 'default' => '_self', + 'role' => 'content' + ) + ), + 'usesContext' => array( + 'postType', + 'postId' + ), + 'example' => array( + 'viewportWidth' => 350 + ), + 'supports' => array( + 'anchor' => true, + 'html' => false, + 'spacing' => array( + 'margin' => true, + 'padding' => true + ), + 'color' => array( + 'gradients' => true, + 'link' => true, + '__experimentalDefaultControls' => array( + 'background' => true, + 'text' => true, + 'link' => true + ) + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + 'textAlign' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ), + '__experimentalBorder' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true, + '__experimentalDefaultControls' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true + ) + ) + ), + 'style' => 'wp-block-post-author-name' + ), + 'post-comments-count' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/post-comments-count', + 'title' => 'Comments Count', + 'category' => 'theme', + 'description' => 'Display a post\'s comments count.', + 'textdomain' => 'default', + 'usesContext' => array( + 'postId' + ), + 'example' => array( + 'viewportWidth' => 350 + ), + 'supports' => array( + 'anchor' => true, + 'html' => false, + 'color' => array( + 'gradients' => true, + '__experimentalDefaultControls' => array( + 'background' => true, + 'text' => true + ) + ), + 'spacing' => array( + 'margin' => true, + 'padding' => true + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + 'textAlign' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + '__experimentalBorder' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true + ), + 'interactivity' => array( + 'clientNavigation' => true + ) + ), + 'style' => 'wp-block-post-comments-count' + ), + 'post-comments-form' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/post-comments-form', + 'title' => 'Comments Form', + 'category' => 'theme', + 'description' => 'Display a post\'s comments form.', + 'textdomain' => 'default', + 'usesContext' => array( + 'postId', + 'postType' + ), + 'supports' => array( + 'anchor' => true, + 'html' => false, + 'color' => array( + 'gradients' => true, + 'heading' => true, + 'link' => true, + '__experimentalDefaultControls' => array( + 'background' => true, + 'text' => true + ) + ), + 'spacing' => array( + 'margin' => true, + 'padding' => true + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + 'textAlign' => true, + '__experimentalFontStyle' => true, + '__experimentalFontWeight' => true, + '__experimentalLetterSpacing' => true, + '__experimentalTextTransform' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + '__experimentalBorder' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true, + '__experimentalDefaultControls' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true + ) + ) + ), + 'editorStyle' => 'wp-block-post-comments-form-editor', + 'style' => array( + 'wp-block-post-comments-form', + 'wp-block-buttons', + 'wp-block-button' + ), + 'example' => array( + 'attributes' => array( + 'style' => array( + 'typography' => array( + 'textAlign' => 'center' + ) + ) + ) + ) + ), + 'post-comments-link' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/post-comments-link', + 'title' => 'Comments Link', + 'category' => 'theme', + 'description' => 'Displays the link to the current post comments.', + 'textdomain' => 'default', + 'usesContext' => array( + 'postType', + 'postId' + ), + 'example' => array( + 'viewportWidth' => 350 + ), + 'supports' => array( + 'anchor' => true, + 'html' => false, + 'color' => array( + 'link' => true, + 'text' => false, + '__experimentalDefaultControls' => array( + 'background' => true, + 'link' => true + ) + ), + 'spacing' => array( + 'margin' => true, + 'padding' => true + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + 'textAlign' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ), + '__experimentalBorder' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true, + '__experimentalDefaultControls' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true + ) + ) + ), + 'style' => 'wp-block-post-comments-link' + ), + 'post-content' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/post-content', + 'title' => 'Content', + 'category' => 'theme', + 'description' => 'Displays the contents of a post or page.', + 'textdomain' => 'default', + 'usesContext' => array( + 'postId', + 'postType', + 'queryId' + ), + 'attributes' => array( + 'tagName' => array( + 'type' => 'string', + 'default' => 'div' + ) + ), + 'example' => array( + 'viewportWidth' => 350 + ), + 'supports' => array( + 'anchor' => true, + 'align' => array( + 'wide', + 'full' + ), + 'html' => false, + 'layout' => true, + 'background' => array( + 'backgroundImage' => true, + 'backgroundSize' => true, + '__experimentalDefaultControls' => array( + 'backgroundImage' => true + ) + ), + 'dimensions' => array( + 'minHeight' => true + ), + 'spacing' => array( + 'blockGap' => true, + 'padding' => true, + 'margin' => true, + '__experimentalDefaultControls' => array( + 'margin' => false, + 'padding' => false + ) + ), + 'color' => array( + 'gradients' => true, + 'heading' => true, + 'link' => true, + '__experimentalDefaultControls' => array( + 'background' => false, + 'text' => false + ) + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ), + '__experimentalBorder' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true, + '__experimentalDefaultControls' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true + ) + ) + ), + 'style' => 'wp-block-post-content', + 'editorStyle' => 'wp-block-post-content-editor' + ), + 'post-date' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/post-date', + 'title' => 'Date', + 'category' => 'theme', + 'description' => 'Display a custom date.', + 'textdomain' => 'default', + 'attributes' => array( + 'datetime' => array( + 'type' => 'string', + 'role' => 'content' + ), + 'textAlign' => array( + 'type' => 'string' + ), + 'format' => array( + 'type' => 'string' + ), + 'isLink' => array( + 'type' => 'boolean', + 'default' => false, + 'role' => 'content' + ) + ), + 'usesContext' => array( + 'postId', + 'postType', + 'queryId' + ), + 'example' => array( + 'viewportWidth' => 350 + ), + 'supports' => array( + 'anchor' => true, + 'html' => false, + 'color' => array( + 'gradients' => true, + 'link' => true, + '__experimentalDefaultControls' => array( + 'background' => true, + 'text' => true, + 'link' => true + ) + ), + 'spacing' => array( + 'margin' => true, + 'padding' => true + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ), + '__experimentalBorder' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true, + '__experimentalDefaultControls' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true + ) + ) + ) + ), + 'post-excerpt' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/post-excerpt', + 'title' => 'Excerpt', + 'category' => 'theme', + 'description' => 'Display the excerpt.', + 'textdomain' => 'default', + 'attributes' => array( + 'textAlign' => array( + 'type' => 'string' + ), + 'moreText' => array( + 'type' => 'string', + 'role' => 'content' + ), + 'showMoreOnNewLine' => array( + 'type' => 'boolean', + 'default' => true + ), + 'excerptLength' => array( + 'type' => 'number', + 'default' => 55 + ) + ), + 'usesContext' => array( + 'postId', + 'postType', + 'queryId' + ), + 'example' => array( + 'viewportWidth' => 350 + ), + 'supports' => array( + 'anchor' => true, + 'html' => false, + 'color' => array( + 'gradients' => true, + 'link' => true, + '__experimentalDefaultControls' => array( + 'background' => true, + 'text' => true, + 'link' => true + ) + ), + 'spacing' => array( + 'margin' => true, + 'padding' => true + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + 'textColumns' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ), + '__experimentalBorder' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true, + '__experimentalDefaultControls' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true + ) + ) + ), + 'editorStyle' => 'wp-block-post-excerpt-editor', + 'style' => 'wp-block-post-excerpt' + ), + 'post-featured-image' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/post-featured-image', + 'title' => 'Featured Image', + 'category' => 'theme', + 'description' => 'Display a post\'s featured image.', + 'textdomain' => 'default', + 'attributes' => array( + 'isLink' => array( + 'type' => 'boolean', + 'default' => false, + 'role' => 'content' + ), + 'aspectRatio' => array( + 'type' => 'string' + ), + 'width' => array( + 'type' => 'string' + ), + 'height' => array( + 'type' => 'string' + ), + 'scale' => array( + 'type' => 'string', + 'default' => 'cover' + ), + 'sizeSlug' => array( + 'type' => 'string' + ), + 'rel' => array( + 'type' => 'string', + 'attribute' => 'rel', + 'default' => '', + 'role' => 'content' + ), + 'linkTarget' => array( + 'type' => 'string', + 'default' => '_self', + 'role' => 'content' + ), + 'overlayColor' => array( + 'type' => 'string' + ), + 'customOverlayColor' => array( + 'type' => 'string' + ), + 'dimRatio' => array( + 'type' => 'number', + 'default' => 0 + ), + 'gradient' => array( + 'type' => 'string' + ), + 'customGradient' => array( + 'type' => 'string' + ), + 'useFirstImageFromPost' => array( + 'type' => 'boolean', + 'default' => false + ) + ), + 'usesContext' => array( + 'postId', + 'postType', + 'queryId' + ), + 'example' => array( + 'viewportWidth' => 350 + ), + 'supports' => array( + 'anchor' => true, + 'align' => array( + 'left', + 'right', + 'center', + 'wide', + 'full' + ), + 'color' => array( + 'text' => false, + 'background' => false + ), + '__experimentalBorder' => array( + 'color' => true, + 'radius' => true, + 'width' => true, + '__experimentalSkipSerialization' => true, + '__experimentalDefaultControls' => array( + 'color' => true, + 'radius' => true, + 'width' => true + ) + ), + 'filter' => array( + 'duotone' => true + ), + 'shadow' => array( + '__experimentalSkipSerialization' => true + ), + 'html' => false, + 'spacing' => array( + 'margin' => true, + 'padding' => true + ), + 'interactivity' => array( + 'clientNavigation' => true + ) + ), + 'selectors' => array( + 'border' => '.wp-block-post-featured-image img, .wp-block-post-featured-image .block-editor-media-placeholder, .wp-block-post-featured-image .wp-block-post-featured-image__overlay', + 'shadow' => '.wp-block-post-featured-image img, .wp-block-post-featured-image .components-placeholder', + 'filter' => array( + 'duotone' => '.wp-block-post-featured-image img, .wp-block-post-featured-image .wp-block-post-featured-image__placeholder, .wp-block-post-featured-image .components-placeholder__illustration, .wp-block-post-featured-image .components-placeholder::before' + ) + ), + 'editorStyle' => 'wp-block-post-featured-image-editor', + 'style' => 'wp-block-post-featured-image' + ), + 'post-navigation-link' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/post-navigation-link', + 'title' => 'Post Navigation Link', + 'category' => 'theme', + 'description' => 'Displays the next or previous post link that is adjacent to the current post.', + 'textdomain' => 'default', + 'attributes' => array( + 'textAlign' => array( + 'type' => 'string' + ), + 'type' => array( + 'type' => 'string', + 'default' => 'next' + ), + 'label' => array( + 'type' => 'string', + 'role' => 'content' + ), + 'showTitle' => array( + 'type' => 'boolean', + 'default' => false + ), + 'linkLabel' => array( + 'type' => 'boolean', + 'default' => false + ), + 'arrow' => array( + 'type' => 'string', + 'default' => 'none' + ), + 'taxonomy' => array( + 'type' => 'string', + 'default' => '' + ) + ), + 'usesContext' => array( + 'postType' + ), + 'supports' => array( + 'anchor' => true, + 'reusable' => false, + 'html' => false, + 'color' => array( + 'link' => true + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalWritingMode' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ) + ), + 'style' => 'wp-block-post-navigation-link' + ), + 'post-template' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/post-template', + 'title' => 'Post Template', + 'category' => 'theme', + 'ancestor' => array( + 'core/query' + ), + 'description' => 'Contains the block elements used to render a post, like the title, date, featured image, content or excerpt, and more.', + 'textdomain' => 'default', + 'usesContext' => array( + 'queryId', + 'query', + 'displayLayout', + 'templateSlug', + 'previewPostType', + 'enhancedPagination', + 'postType' + ), + 'supports' => array( + 'anchor' => true, + 'reusable' => false, + 'html' => false, + 'align' => array( + 'wide', + 'full' + ), + 'layout' => true, + 'color' => array( + 'gradients' => true, + 'link' => true, + '__experimentalDefaultControls' => array( + 'background' => true, + 'text' => true + ) + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'spacing' => array( + 'margin' => true, + 'padding' => true, + 'blockGap' => array( + '__experimentalDefault' => '1.25em' + ), + '__experimentalDefaultControls' => array( + 'blockGap' => true, + 'padding' => false, + 'margin' => false + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ), + '__experimentalBorder' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true + ) + ), + 'style' => 'wp-block-post-template', + 'editorStyle' => 'wp-block-post-template-editor' + ), + 'post-terms' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/post-terms', + 'title' => 'Post Terms', + 'category' => 'theme', + 'description' => 'Post terms.', + 'textdomain' => 'default', + 'attributes' => array( + 'term' => array( + 'type' => 'string' + ), + 'separator' => array( + 'type' => 'string', + 'default' => ', ' + ), + 'prefix' => array( + 'type' => 'string', + 'default' => '', + 'role' => 'content' + ), + 'suffix' => array( + 'type' => 'string', + 'default' => '', + 'role' => 'content' + ) + ), + 'usesContext' => array( + 'postId', + 'postType' + ), + 'example' => array( + 'viewportWidth' => 350 + ), + 'supports' => array( + 'anchor' => true, + 'html' => false, + 'color' => array( + 'gradients' => true, + 'link' => true, + '__experimentalDefaultControls' => array( + 'background' => true, + 'text' => true, + 'link' => true + ) + ), + 'spacing' => array( + 'margin' => true, + 'padding' => true + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + 'textAlign' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ), + '__experimentalBorder' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true, + '__experimentalDefaultControls' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true + ) + ) + ), + 'style' => 'wp-block-post-terms' + ), + 'post-time-to-read' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/post-time-to-read', + 'title' => 'Time to Read', + 'category' => 'theme', + 'description' => 'Show minutes required to finish reading the post. Can also show a word count.', + 'textdomain' => 'default', + 'usesContext' => array( + 'postId', + 'postType' + ), + 'attributes' => array( + 'displayAsRange' => array( + 'type' => 'boolean', + 'default' => true + ), + 'displayMode' => array( + 'type' => 'string', + 'default' => 'time' + ), + 'averageReadingSpeed' => array( + 'type' => 'number', + 'default' => 189 + ) + ), + 'supports' => array( + 'anchor' => true, + 'color' => array( + 'gradients' => true, + '__experimentalDefaultControls' => array( + 'background' => true, + 'text' => true + ) + ), + 'html' => false, + 'spacing' => array( + 'margin' => true, + 'padding' => true, + '__experimentalDefaultControls' => array( + 'margin' => false, + 'padding' => false + ) + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + 'textAlign' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ), + '__experimentalBorder' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true + ) + ) + ), + 'post-title' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/post-title', + 'title' => 'Title', + 'category' => 'theme', + 'description' => 'Displays the title of a post, page, or any other content-type.', + 'textdomain' => 'default', + 'usesContext' => array( + 'postId', + 'postType', + 'queryId' + ), + 'attributes' => array( + 'textAlign' => array( + 'type' => 'string' + ), + 'level' => array( + 'type' => 'number', + 'default' => 2 + ), + 'levelOptions' => array( + 'type' => 'array' + ), + 'isLink' => array( + 'type' => 'boolean', + 'default' => false, + 'role' => 'content' + ), + 'rel' => array( + 'type' => 'string', + 'attribute' => 'rel', + 'default' => '', + 'role' => 'content' + ), + 'linkTarget' => array( + 'type' => 'string', + 'default' => '_self', + 'role' => 'content' + ) + ), + 'example' => array( + 'viewportWidth' => 350 + ), + 'supports' => array( + 'anchor' => true, + 'align' => array( + 'wide', + 'full' + ), + 'html' => false, + 'color' => array( + 'gradients' => true, + 'link' => true, + '__experimentalDefaultControls' => array( + 'background' => true, + 'text' => true, + 'link' => true + ) + ), + 'spacing' => array( + 'margin' => true, + 'padding' => true + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ), + '__experimentalBorder' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true, + '__experimentalDefaultControls' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true + ) + ) + ), + 'style' => 'wp-block-post-title' + ), + 'preformatted' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/preformatted', + 'title' => 'Preformatted', + 'category' => 'text', + 'description' => 'Add text that respects your spacing and tabs, and also allows styling.', + 'textdomain' => 'default', + 'attributes' => array( + 'content' => array( + 'type' => 'rich-text', + 'source' => 'rich-text', + 'selector' => 'pre', + '__unstablePreserveWhiteSpace' => true, + 'role' => 'content' + ) + ), + 'supports' => array( + 'anchor' => true, + 'color' => array( + 'gradients' => true, + '__experimentalDefaultControls' => array( + 'background' => true, + 'text' => true + ) + ), + 'spacing' => array( + 'padding' => true, + 'margin' => true + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ), + '__experimentalBorder' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true, + '__experimentalDefaultControls' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true + ) + ) + ), + 'style' => 'wp-block-preformatted' + ), + 'pullquote' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/pullquote', + 'title' => 'Pullquote', + 'category' => 'text', + 'description' => 'Give special visual emphasis to a quote from your text.', + 'textdomain' => 'default', + 'attributes' => array( + 'value' => array( + 'type' => 'rich-text', + 'source' => 'rich-text', + 'selector' => 'p', + 'role' => 'content' + ), + 'citation' => array( + 'type' => 'rich-text', + 'source' => 'rich-text', + 'selector' => 'cite', + 'role' => 'content' + ), + 'textAlign' => array( + 'type' => 'string' + ) + ), + 'supports' => array( + 'anchor' => true, + 'align' => array( + 'left', + 'right', + 'wide', + 'full' + ), + 'background' => array( + 'backgroundImage' => true, + 'backgroundSize' => true, + '__experimentalDefaultControls' => array( + 'backgroundImage' => true + ) + ), + 'color' => array( + 'gradients' => true, + 'background' => true, + 'link' => true, + '__experimentalDefaultControls' => array( + 'background' => true, + 'text' => true + ) + ), + 'dimensions' => array( + 'minHeight' => true, + '__experimentalDefaultControls' => array( + 'minHeight' => false + ) + ), + 'spacing' => array( + 'margin' => true, + 'padding' => true + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + '__experimentalBorder' => array( + 'color' => true, + 'radius' => true, + 'style' => true, + 'width' => true, + '__experimentalDefaultControls' => array( + 'color' => true, + 'radius' => true, + 'style' => true, + 'width' => true + ) + ), + '__experimentalStyle' => array( + 'typography' => array( + 'fontSize' => '1.5em', + 'lineHeight' => '1.6' + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ) + ), + 'editorStyle' => 'wp-block-pullquote-editor', + 'style' => 'wp-block-pullquote' + ), + 'query' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/query', + 'title' => 'Query Loop', + 'category' => 'theme', + 'description' => 'An advanced block that allows displaying post types based on different query parameters and visual configurations.', + 'keywords' => array( + 'posts', + 'list', + 'blog', + 'blogs', + 'custom post types' + ), + 'textdomain' => 'default', + 'attributes' => array( + 'queryId' => array( + 'type' => 'number' + ), + 'query' => array( + 'type' => 'object', + 'default' => array( + 'perPage' => null, + 'pages' => 0, + 'offset' => 0, + 'postType' => 'post', + 'order' => 'desc', + 'orderBy' => 'date', + 'author' => '', + 'search' => '', + 'exclude' => array( + + ), + 'sticky' => '', + 'inherit' => true, + 'taxQuery' => null, + 'parents' => array( + + ), + 'format' => array( + + ) + ) + ), + 'tagName' => array( + 'type' => 'string', + 'default' => 'div' + ), + 'namespace' => array( + 'type' => 'string' + ), + 'enhancedPagination' => array( + 'type' => 'boolean', + 'default' => false + ) + ), + 'usesContext' => array( + 'templateSlug' + ), + 'providesContext' => array( + 'queryId' => 'queryId', + 'query' => 'query', + 'displayLayout' => 'displayLayout', + 'enhancedPagination' => 'enhancedPagination' + ), + 'supports' => array( + 'anchor' => true, + 'align' => array( + 'wide', + 'full' + ), + 'html' => false, + 'layout' => true, + 'interactivity' => true + ), + 'editorStyle' => 'wp-block-query-editor' + ), + 'query-no-results' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/query-no-results', + 'title' => 'No Results', + 'category' => 'theme', + 'description' => 'Contains the block elements used to render content when no query results are found.', + 'ancestor' => array( + 'core/query' + ), + 'textdomain' => 'default', + 'usesContext' => array( + 'queryId', + 'query' + ), + 'supports' => array( + 'anchor' => true, + 'align' => true, + 'reusable' => false, + 'html' => false, + 'color' => array( + 'gradients' => true, + 'link' => true + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ) + ) + ), + 'query-pagination' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/query-pagination', + 'title' => 'Pagination', + 'category' => 'theme', + 'ancestor' => array( + 'core/query' + ), + 'allowedBlocks' => array( + 'core/query-pagination-previous', + 'core/query-pagination-numbers', + 'core/query-pagination-next' + ), + 'description' => 'Displays a paginated navigation to next/previous set of posts, when applicable.', + 'textdomain' => 'default', + 'attributes' => array( + 'paginationArrow' => array( + 'type' => 'string', + 'default' => 'none' + ), + 'showLabel' => array( + 'type' => 'boolean', + 'default' => true + ) + ), + 'usesContext' => array( + 'queryId', + 'query' + ), + 'providesContext' => array( + 'paginationArrow' => 'paginationArrow', + 'showLabel' => 'showLabel' + ), + 'supports' => array( + 'anchor' => true, + 'align' => true, + 'reusable' => false, + 'html' => false, + 'color' => array( + 'gradients' => true, + 'link' => true, + '__experimentalDefaultControls' => array( + 'background' => true, + 'text' => true, + 'link' => true + ) + ), + 'layout' => array( + 'allowSwitching' => false, + 'allowInheriting' => false, + 'default' => array( + 'type' => 'flex' + ) + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ) + ), + 'editorStyle' => 'wp-block-query-pagination-editor', + 'style' => 'wp-block-query-pagination' + ), + 'query-pagination-next' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/query-pagination-next', + 'title' => 'Next Page', + 'category' => 'theme', + 'parent' => array( + 'core/query-pagination' + ), + 'description' => 'Displays the next posts page link.', + 'textdomain' => 'default', + 'attributes' => array( + 'label' => array( + 'type' => 'string' + ) + ), + 'usesContext' => array( + 'queryId', + 'query', + 'paginationArrow', + 'showLabel', + 'enhancedPagination' + ), + 'supports' => array( + 'anchor' => true, + 'reusable' => false, + 'html' => false, + 'color' => array( + 'gradients' => true, + 'text' => false, + '__experimentalDefaultControls' => array( + 'background' => true + ) + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ) + ) + ), + 'query-pagination-numbers' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/query-pagination-numbers', + 'title' => 'Page Numbers', + 'category' => 'theme', + 'parent' => array( + 'core/query-pagination' + ), + 'description' => 'Displays a list of page numbers for pagination.', + 'textdomain' => 'default', + 'attributes' => array( + 'midSize' => array( + 'type' => 'number', + 'default' => 2 + ) + ), + 'usesContext' => array( + 'queryId', + 'query', + 'enhancedPagination' + ), + 'supports' => array( + 'anchor' => true, + 'reusable' => false, + 'html' => false, + 'color' => array( + 'gradients' => true, + 'text' => false, + '__experimentalDefaultControls' => array( + 'background' => true + ) + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ) + ), + 'editorStyle' => 'wp-block-query-pagination-numbers-editor' + ), + 'query-pagination-previous' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/query-pagination-previous', + 'title' => 'Previous Page', + 'category' => 'theme', + 'parent' => array( + 'core/query-pagination' + ), + 'description' => 'Displays the previous posts page link.', + 'textdomain' => 'default', + 'attributes' => array( + 'label' => array( + 'type' => 'string' + ) + ), + 'usesContext' => array( + 'queryId', + 'query', + 'paginationArrow', + 'showLabel', + 'enhancedPagination' + ), + 'supports' => array( + 'anchor' => true, + 'reusable' => false, + 'html' => false, + 'color' => array( + 'gradients' => true, + 'text' => false, + '__experimentalDefaultControls' => array( + 'background' => true + ) + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ) + ) + ), + 'query-title' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/query-title', + 'title' => 'Query Title', + 'category' => 'theme', + 'description' => 'Display the query title.', + 'textdomain' => 'default', + 'attributes' => array( + 'type' => array( + 'type' => 'string' + ), + 'textAlign' => array( + 'type' => 'string' + ), + 'level' => array( + 'type' => 'number', + 'default' => 1 + ), + 'levelOptions' => array( + 'type' => 'array' + ), + 'showPrefix' => array( + 'type' => 'boolean', + 'default' => true + ), + 'showSearchTerm' => array( + 'type' => 'boolean', + 'default' => true + ) + ), + 'example' => array( + 'attributes' => array( + 'type' => 'search' + ) + ), + 'usesContext' => array( + 'query' + ), + 'supports' => array( + 'anchor' => true, + 'align' => array( + 'wide', + 'full' + ), + 'html' => false, + 'color' => array( + 'gradients' => true, + '__experimentalDefaultControls' => array( + 'background' => true, + 'text' => true + ) + ), + 'spacing' => array( + 'margin' => true, + 'padding' => true + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalFontStyle' => true, + '__experimentalFontWeight' => true, + '__experimentalLetterSpacing' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ), + '__experimentalBorder' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true, + '__experimentalDefaultControls' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true + ) + ) + ), + 'style' => 'wp-block-query-title' + ), + 'query-total' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/query-total', + 'title' => 'Query Total', + 'category' => 'theme', + 'ancestor' => array( + 'core/query' + ), + 'description' => 'Display the total number of results in a query.', + 'textdomain' => 'default', + 'attributes' => array( + 'displayType' => array( + 'type' => 'string', + 'default' => 'total-results' + ) + ), + 'usesContext' => array( + 'queryId', + 'query' + ), + 'supports' => array( + 'anchor' => true, + 'align' => array( + 'wide', + 'full' + ), + 'html' => false, + 'spacing' => array( + 'margin' => true, + 'padding' => true + ), + 'color' => array( + 'gradients' => true, + '__experimentalDefaultControls' => array( + 'background' => true, + 'text' => true + ) + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + '__experimentalBorder' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true, + '__experimentalDefaultControls' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ) + ), + 'style' => 'wp-block-query-total' + ), + 'quote' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/quote', + 'title' => 'Quote', + 'category' => 'text', + 'description' => 'Give quoted text visual emphasis. "In quoting others, we cite ourselves." — Julio Cortázar', + 'keywords' => array( + 'blockquote', + 'cite' + ), + 'textdomain' => 'default', + 'attributes' => array( + 'value' => array( + 'type' => 'string', + 'source' => 'html', + 'selector' => 'blockquote', + 'multiline' => 'p', + 'default' => '', + 'role' => 'content' + ), + 'citation' => array( + 'type' => 'rich-text', + 'source' => 'rich-text', + 'selector' => 'cite', + 'role' => 'content' + ), + 'textAlign' => array( + 'type' => 'string' + ) + ), + 'supports' => array( + 'anchor' => true, + 'align' => array( + 'left', + 'right', + 'wide', + 'full' + ), + 'html' => false, + 'background' => array( + 'backgroundImage' => true, + 'backgroundSize' => true, + '__experimentalDefaultControls' => array( + 'backgroundImage' => true + ) + ), + '__experimentalBorder' => array( + 'color' => true, + 'radius' => true, + 'style' => true, + 'width' => true, + '__experimentalDefaultControls' => array( + 'color' => true, + 'radius' => true, + 'style' => true, + 'width' => true + ) + ), + 'dimensions' => array( + 'minHeight' => true, + '__experimentalDefaultControls' => array( + 'minHeight' => false + ) + ), + '__experimentalOnEnter' => true, + '__experimentalOnMerge' => true, + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'color' => array( + 'gradients' => true, + 'heading' => true, + 'link' => true, + '__experimentalDefaultControls' => array( + 'background' => true, + 'text' => true + ) + ), + 'layout' => array( + 'allowEditing' => false + ), + 'spacing' => array( + 'blockGap' => true, + 'padding' => true, + 'margin' => true + ), + 'interactivity' => array( + 'clientNavigation' => true + ), + 'allowedBlocks' => true + ), + 'styles' => array( + array( + 'name' => 'default', + 'label' => 'Default', + 'isDefault' => true + ), + array( + 'name' => 'plain', + 'label' => 'Plain' + ) + ), + 'editorStyle' => 'wp-block-quote-editor', + 'style' => 'wp-block-quote' + ), + 'read-more' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/read-more', + 'title' => 'Read More', + 'category' => 'theme', + 'description' => 'Displays the link of a post, page, or any other content-type.', + 'textdomain' => 'default', + 'attributes' => array( + 'content' => array( + 'type' => 'string', + 'role' => 'content' + ), + 'linkTarget' => array( + 'type' => 'string', + 'default' => '_self' + ) + ), + 'usesContext' => array( + 'postId' + ), + 'supports' => array( + 'anchor' => true, + 'html' => false, + 'color' => array( + 'gradients' => true, + 'text' => true + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalLetterSpacing' => true, + '__experimentalTextDecoration' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true, + 'textDecoration' => true + ) + ), + 'spacing' => array( + 'margin' => array( + 'top', + 'bottom' + ), + 'padding' => true, + '__experimentalDefaultControls' => array( + 'padding' => true + ) + ), + '__experimentalBorder' => array( + 'color' => true, + 'radius' => true, + 'width' => true, + '__experimentalDefaultControls' => array( + 'width' => true + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ) + ), + 'style' => 'wp-block-read-more' + ), + 'rss' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/rss', + 'title' => 'RSS', + 'category' => 'widgets', + 'description' => 'Display entries from any RSS or Atom feed.', + 'keywords' => array( + 'atom', + 'feed' + ), + 'textdomain' => 'default', + 'attributes' => array( + 'columns' => array( + 'type' => 'number', + 'default' => 2 + ), + 'blockLayout' => array( + 'type' => 'string', + 'default' => 'list' + ), + 'feedURL' => array( + 'type' => 'string', + 'default' => '', + 'role' => 'content' + ), + 'itemsToShow' => array( + 'type' => 'number', + 'default' => 5 + ), + 'displayExcerpt' => array( + 'type' => 'boolean', + 'default' => false + ), + 'displayAuthor' => array( + 'type' => 'boolean', + 'default' => false + ), + 'displayDate' => array( + 'type' => 'boolean', + 'default' => false + ), + 'excerptLength' => array( + 'type' => 'number', + 'default' => 55 + ), + 'openInNewTab' => array( + 'type' => 'boolean', + 'default' => false + ), + 'rel' => array( + 'type' => 'string' + ) + ), + 'supports' => array( + 'anchor' => true, + 'align' => true, + 'html' => false, + 'interactivity' => array( + 'clientNavigation' => true + ), + '__experimentalBorder' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true + ), + 'spacing' => array( + 'margin' => true, + 'padding' => true, + '__experimentalDefaultControls' => array( + 'padding' => false, + 'margin' => false + ) + ), + 'color' => array( + 'background' => true, + 'text' => true, + 'gradients' => true, + 'link' => true + ) + ), + 'editorStyle' => 'wp-block-rss-editor', + 'style' => 'wp-block-rss' + ), + 'search' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/search', + 'title' => 'Search', + 'category' => 'widgets', + 'description' => 'Help visitors find your content.', + 'keywords' => array( + 'find' + ), + 'textdomain' => 'default', + 'attributes' => array( + 'label' => array( + 'type' => 'string', + 'role' => 'content' + ), + 'showLabel' => array( + 'type' => 'boolean', + 'default' => true + ), + 'placeholder' => array( + 'type' => 'string', + 'default' => '', + 'role' => 'content' + ), + 'width' => array( + 'type' => 'number' + ), + 'widthUnit' => array( + 'type' => 'string' + ), + 'buttonText' => array( + 'type' => 'string', + 'role' => 'content' + ), + 'buttonPosition' => array( + 'type' => 'string', + 'default' => 'button-outside' + ), + 'buttonUseIcon' => array( + 'type' => 'boolean', + 'default' => false + ), + 'query' => array( + 'type' => 'object', + 'default' => array( + + ) + ), + 'isSearchFieldHidden' => array( + 'type' => 'boolean', + 'default' => false + ) + ), + 'supports' => array( + 'anchor' => true, + 'align' => array( + 'left', + 'center', + 'right' + ), + 'color' => array( + 'gradients' => true, + '__experimentalSkipSerialization' => true, + '__experimentalDefaultControls' => array( + 'background' => true, + 'text' => true + ) + ), + 'interactivity' => true, + 'typography' => array( + '__experimentalSkipSerialization' => true, + '__experimentalSelector' => '.wp-block-search__label, .wp-block-search__input, .wp-block-search__button', + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + '__experimentalBorder' => array( + 'color' => true, + 'radius' => true, + 'width' => true, + '__experimentalSkipSerialization' => true, + '__experimentalDefaultControls' => array( + 'color' => true, + 'radius' => true, + 'width' => true + ) + ), + 'spacing' => array( + 'margin' => true + ), + 'html' => false + ), + 'editorStyle' => 'wp-block-search-editor', + 'style' => 'wp-block-search' + ), + 'separator' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/separator', + 'title' => 'Separator', + 'category' => 'design', + 'description' => 'Create a break between ideas or sections with a horizontal separator.', + 'keywords' => array( + 'horizontal-line', + 'hr', + 'divider' + ), + 'textdomain' => 'default', + 'attributes' => array( + 'opacity' => array( + 'type' => 'string', + 'default' => 'alpha-channel' + ), + 'tagName' => array( + 'type' => 'string', + 'enum' => array( + 'hr', + 'div' + ), + 'default' => 'hr' + ) + ), + 'supports' => array( + 'anchor' => true, + 'align' => array( + 'center', + 'wide', + 'full' + ), + 'color' => array( + 'enableContrastChecker' => false, + '__experimentalSkipSerialization' => true, + 'gradients' => true, + 'background' => true, + 'text' => false, + '__experimentalDefaultControls' => array( + 'background' => true + ) + ), + 'spacing' => array( + 'margin' => array( + 'top', + 'bottom' + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ) + ), + 'styles' => array( + array( + 'name' => 'default', + 'label' => 'Default', + 'isDefault' => true + ), + array( + 'name' => 'wide', + 'label' => 'Wide Line' + ), + array( + 'name' => 'dots', + 'label' => 'Dots' + ) + ), + 'editorStyle' => 'wp-block-separator-editor', + 'style' => 'wp-block-separator' + ), + 'shortcode' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/shortcode', + 'title' => 'Shortcode', + 'category' => 'widgets', + 'description' => 'Insert additional custom elements with a WordPress shortcode.', + 'textdomain' => 'default', + 'attributes' => array( + 'text' => array( + 'type' => 'string', + 'source' => 'raw', + 'role' => 'content' + ) + ), + 'supports' => array( + 'className' => false, + 'customClassName' => false, + 'html' => false, + 'customCSS' => false, + 'visibility' => false + ), + 'editorStyle' => 'wp-block-shortcode-editor' + ), + 'site-logo' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/site-logo', + 'title' => 'Site Logo', + 'category' => 'theme', + 'description' => 'Display an image to represent this site. Update this block and the changes apply everywhere.', + 'textdomain' => 'default', + 'attributes' => array( + 'width' => array( + 'type' => 'number' + ), + 'isLink' => array( + 'type' => 'boolean', + 'default' => true, + 'role' => 'content' + ), + 'linkTarget' => array( + 'type' => 'string', + 'default' => '_self', + 'role' => 'content' + ), + 'shouldSyncIcon' => array( + 'type' => 'boolean' + ) + ), + 'example' => array( + 'viewportWidth' => 500, + 'attributes' => array( + 'width' => 350, + 'className' => 'block-editor-block-types-list__site-logo-example' + ) + ), + 'supports' => array( + 'anchor' => true, + 'html' => false, + 'align' => true, + 'alignWide' => false, + 'color' => array( + 'text' => false, + 'background' => false + ), + 'spacing' => array( + 'margin' => true, + 'padding' => true, + '__experimentalDefaultControls' => array( + 'margin' => false, + 'padding' => false + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ), + 'filter' => array( + 'duotone' => true + ) + ), + 'styles' => array( + array( + 'name' => 'default', + 'label' => 'Default', + 'isDefault' => true + ), + array( + 'name' => 'rounded', + 'label' => 'Rounded' + ) + ), + 'selectors' => array( + 'filter' => array( + 'duotone' => '.wp-block-site-logo img, .wp-block-site-logo .components-placeholder__illustration, .wp-block-site-logo .components-placeholder::before' + ) + ), + 'editorStyle' => 'wp-block-site-logo-editor', + 'style' => 'wp-block-site-logo' + ), + 'site-tagline' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/site-tagline', + 'title' => 'Site Tagline', + 'category' => 'theme', + 'description' => 'Describe in a few words what this site is about. This is important for search results, sharing on social media, and gives overall clarity to visitors.', + 'keywords' => array( + 'description' + ), + 'textdomain' => 'default', + 'attributes' => array( + 'textAlign' => array( + 'type' => 'string' + ), + 'level' => array( + 'type' => 'number', + 'default' => 0 + ), + 'levelOptions' => array( + 'type' => 'array', + 'default' => array( + 0, + 1, + 2, + 3, + 4, + 5, + 6 + ) + ) + ), + 'example' => array( + 'viewportWidth' => 350, + 'attributes' => array( + 'textAlign' => 'center' + ) + ), + 'supports' => array( + 'anchor' => true, + 'align' => array( + 'wide', + 'full' + ), + 'html' => false, + 'color' => array( + 'gradients' => true, + '__experimentalDefaultControls' => array( + 'background' => true, + 'text' => true + ) + ), + 'contentRole' => true, + 'spacing' => array( + 'margin' => true, + 'padding' => true, + '__experimentalDefaultControls' => array( + 'margin' => false, + 'padding' => false + ) + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalFontStyle' => true, + '__experimentalFontWeight' => true, + '__experimentalLetterSpacing' => true, + '__experimentalWritingMode' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ), + '__experimentalBorder' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true + ) + ), + 'editorStyle' => 'wp-block-site-tagline-editor', + 'style' => 'wp-block-site-tagline' + ), + 'site-title' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/site-title', + 'title' => 'Site Title', + 'category' => 'theme', + 'description' => 'Displays the name of this site. Update the block, and the changes apply everywhere it’s used. This will also appear in the browser title bar and in search results.', + 'textdomain' => 'default', + 'attributes' => array( + 'level' => array( + 'type' => 'number', + 'default' => 1 + ), + 'levelOptions' => array( + 'type' => 'array', + 'default' => array( + 0, + 1, + 2, + 3, + 4, + 5, + 6 + ) + ), + 'textAlign' => array( + 'type' => 'string' + ), + 'isLink' => array( + 'type' => 'boolean', + 'default' => true, + 'role' => 'content' + ), + 'linkTarget' => array( + 'type' => 'string', + 'default' => '_self', + 'role' => 'content' + ) + ), + 'example' => array( + 'viewportWidth' => 500 + ), + 'supports' => array( + 'anchor' => true, + 'align' => array( + 'wide', + 'full' + ), + 'html' => false, + 'color' => array( + 'gradients' => true, + 'link' => true, + '__experimentalDefaultControls' => array( + 'background' => true, + 'text' => true, + 'link' => true + ) + ), + 'spacing' => array( + 'padding' => true, + 'margin' => true, + '__experimentalDefaultControls' => array( + 'margin' => false, + 'padding' => false + ) + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalFontStyle' => true, + '__experimentalFontWeight' => true, + '__experimentalLetterSpacing' => true, + '__experimentalWritingMode' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ), + '__experimentalBorder' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true + ) + ), + 'editorStyle' => 'wp-block-site-title-editor', + 'style' => 'wp-block-site-title' + ), + 'social-link' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/social-link', + 'title' => 'Social Icon', + 'category' => 'widgets', + 'parent' => array( + 'core/social-links' + ), + 'description' => 'Display an icon linking to a social profile or site.', + 'textdomain' => 'default', + 'attributes' => array( + 'url' => array( + 'type' => 'string', + 'role' => 'content' + ), + 'service' => array( + 'type' => 'string' + ), + 'label' => array( + 'type' => 'string', + 'role' => 'content' + ), + 'rel' => array( + 'type' => 'string' + ) + ), + 'usesContext' => array( + 'openInNewTab', + 'showLabels', + 'iconColor', + 'iconColorValue', + 'iconBackgroundColor', + 'iconBackgroundColorValue' + ), + 'supports' => array( + 'anchor' => true, + 'reusable' => false, + 'html' => false, + 'interactivity' => array( + 'clientNavigation' => true + ) + ), + 'editorStyle' => 'wp-block-social-link-editor' + ), + 'social-links' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/social-links', + 'title' => 'Social Icons', + 'category' => 'widgets', + 'allowedBlocks' => array( + 'core/social-link' + ), + 'description' => 'Display icons linking to your social profiles or sites.', + 'keywords' => array( + 'links' + ), + 'textdomain' => 'default', + 'attributes' => array( + 'iconColor' => array( + 'type' => 'string' + ), + 'customIconColor' => array( + 'type' => 'string' + ), + 'iconColorValue' => array( + 'type' => 'string' + ), + 'iconBackgroundColor' => array( + 'type' => 'string' + ), + 'customIconBackgroundColor' => array( + 'type' => 'string' + ), + 'iconBackgroundColorValue' => array( + 'type' => 'string' + ), + 'openInNewTab' => array( + 'type' => 'boolean', + 'default' => false + ), + 'showLabels' => array( + 'type' => 'boolean', + 'default' => false + ), + 'size' => array( + 'type' => 'string' + ) + ), + 'providesContext' => array( + 'openInNewTab' => 'openInNewTab', + 'showLabels' => 'showLabels', + 'iconColor' => 'iconColor', + 'iconColorValue' => 'iconColorValue', + 'iconBackgroundColor' => 'iconBackgroundColor', + 'iconBackgroundColorValue' => 'iconBackgroundColorValue' + ), + 'supports' => array( + 'align' => array( + 'left', + 'center', + 'right' + ), + 'anchor' => true, + 'html' => false, + '__experimentalExposeControlsToChildren' => true, + 'layout' => array( + 'allowSwitching' => false, + 'allowInheriting' => false, + 'allowVerticalAlignment' => false, + 'default' => array( + 'type' => 'flex' + ) + ), + 'color' => array( + 'enableContrastChecker' => false, + 'background' => true, + 'gradients' => true, + 'text' => false, + '__experimentalDefaultControls' => array( + 'background' => false + ) + ), + 'spacing' => array( + 'blockGap' => array( + 'horizontal', + 'vertical' + ), + 'margin' => true, + 'padding' => true, + 'units' => array( + 'px', + 'em', + 'rem', + 'vh', + 'vw' + ), + '__experimentalDefaultControls' => array( + 'blockGap' => true, + 'margin' => true, + 'padding' => false + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ), + '__experimentalBorder' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true, + '__experimentalDefaultControls' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true + ) + ), + 'contentRole' => true, + 'listView' => true + ), + 'styles' => array( + array( + 'name' => 'default', + 'label' => 'Default', + 'isDefault' => true + ), + array( + 'name' => 'logos-only', + 'label' => 'Logos Only' + ), + array( + 'name' => 'pill-shape', + 'label' => 'Pill Shape' + ) + ), + 'editorStyle' => 'wp-block-social-links-editor', + 'style' => 'wp-block-social-links' + ), + 'spacer' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/spacer', + 'title' => 'Spacer', + 'category' => 'design', + 'description' => 'Add white space between blocks and customize its height.', + 'textdomain' => 'default', + 'attributes' => array( + 'height' => array( + 'type' => 'string', + 'default' => '100px' + ), + 'width' => array( + 'type' => 'string' + ) + ), + 'usesContext' => array( + 'orientation' + ), + 'supports' => array( + 'anchor' => true, + 'spacing' => array( + 'margin' => array( + 'top', + 'bottom' + ), + '__experimentalDefaultControls' => array( + 'margin' => true + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ) + ), + 'editorStyle' => 'wp-block-spacer-editor', + 'style' => 'wp-block-spacer' + ), + 'table' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/table', + 'title' => 'Table', + 'category' => 'text', + 'description' => 'Create structured content in rows and columns to display information.', + 'textdomain' => 'default', + 'attributes' => array( + 'hasFixedLayout' => array( + 'type' => 'boolean', + 'default' => true + ), + 'caption' => array( + 'type' => 'rich-text', + 'source' => 'rich-text', + 'selector' => 'figcaption', + 'role' => 'content' + ), + 'head' => array( + 'type' => 'array', + 'default' => array( + + ), + 'source' => 'query', + 'selector' => 'thead tr', + 'query' => array( + 'cells' => array( + 'type' => 'array', + 'default' => array( + + ), + 'source' => 'query', + 'selector' => 'td,th', + 'query' => array( + 'content' => array( + 'type' => 'rich-text', + 'source' => 'rich-text', + 'role' => 'content' + ), + 'tag' => array( + 'type' => 'string', + 'default' => 'td', + 'source' => 'tag' + ), + 'scope' => array( + 'type' => 'string', + 'source' => 'attribute', + 'attribute' => 'scope' + ), + 'align' => array( + 'type' => 'string', + 'source' => 'attribute', + 'attribute' => 'data-align' + ), + 'colspan' => array( + 'type' => 'string', + 'source' => 'attribute', + 'attribute' => 'colspan' + ), + 'rowspan' => array( + 'type' => 'string', + 'source' => 'attribute', + 'attribute' => 'rowspan' + ) + ) + ) + ) + ), + 'body' => array( + 'type' => 'array', + 'default' => array( + + ), + 'source' => 'query', + 'selector' => 'tbody tr', + 'query' => array( + 'cells' => array( + 'type' => 'array', + 'default' => array( + + ), + 'source' => 'query', + 'selector' => 'td,th', + 'query' => array( + 'content' => array( + 'type' => 'rich-text', + 'source' => 'rich-text', + 'role' => 'content' + ), + 'tag' => array( + 'type' => 'string', + 'default' => 'td', + 'source' => 'tag' + ), + 'scope' => array( + 'type' => 'string', + 'source' => 'attribute', + 'attribute' => 'scope' + ), + 'align' => array( + 'type' => 'string', + 'source' => 'attribute', + 'attribute' => 'data-align' + ), + 'colspan' => array( + 'type' => 'string', + 'source' => 'attribute', + 'attribute' => 'colspan' + ), + 'rowspan' => array( + 'type' => 'string', + 'source' => 'attribute', + 'attribute' => 'rowspan' + ) + ) + ) + ) + ), + 'foot' => array( + 'type' => 'array', + 'default' => array( + + ), + 'source' => 'query', + 'selector' => 'tfoot tr', + 'query' => array( + 'cells' => array( + 'type' => 'array', + 'default' => array( + + ), + 'source' => 'query', + 'selector' => 'td,th', + 'query' => array( + 'content' => array( + 'type' => 'rich-text', + 'source' => 'rich-text', + 'role' => 'content' + ), + 'tag' => array( + 'type' => 'string', + 'default' => 'td', + 'source' => 'tag' + ), + 'scope' => array( + 'type' => 'string', + 'source' => 'attribute', + 'attribute' => 'scope' + ), + 'align' => array( + 'type' => 'string', + 'source' => 'attribute', + 'attribute' => 'data-align' + ), + 'colspan' => array( + 'type' => 'string', + 'source' => 'attribute', + 'attribute' => 'colspan' + ), + 'rowspan' => array( + 'type' => 'string', + 'source' => 'attribute', + 'attribute' => 'rowspan' + ) + ) + ) + ) + ) + ), + 'supports' => array( + 'anchor' => true, + 'align' => true, + 'color' => array( + '__experimentalSkipSerialization' => true, + 'gradients' => true, + '__experimentalDefaultControls' => array( + 'background' => true, + 'text' => true + ) + ), + 'spacing' => array( + 'margin' => true, + 'padding' => true, + '__experimentalDefaultControls' => array( + 'margin' => false, + 'padding' => false + ) + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalFontStyle' => true, + '__experimentalFontWeight' => true, + '__experimentalLetterSpacing' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + '__experimentalBorder' => array( + '__experimentalSkipSerialization' => true, + 'color' => true, + 'style' => true, + 'width' => true, + '__experimentalDefaultControls' => array( + 'color' => true, + 'style' => true, + 'width' => true + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ) + ), + 'selectors' => array( + 'root' => '.wp-block-table > table', + 'spacing' => '.wp-block-table' + ), + 'styles' => array( + array( + 'name' => 'regular', + 'label' => 'Default', + 'isDefault' => true + ), + array( + 'name' => 'stripes', + 'label' => 'Stripes' + ) + ), + 'editorStyle' => 'wp-block-table-editor', + 'style' => 'wp-block-table' + ), + 'tag-cloud' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/tag-cloud', + 'title' => 'Tag Cloud', + 'category' => 'widgets', + 'description' => 'A cloud of popular keywords, each sized by how often it appears.', + 'textdomain' => 'default', + 'attributes' => array( + 'numberOfTags' => array( + 'type' => 'number', + 'default' => 45, + 'minimum' => 1, + 'maximum' => 100 + ), + 'taxonomy' => array( + 'type' => 'string', + 'default' => 'post_tag' + ), + 'showTagCounts' => array( + 'type' => 'boolean', + 'default' => false + ), + 'smallestFontSize' => array( + 'type' => 'string', + 'default' => '8pt' + ), + 'largestFontSize' => array( + 'type' => 'string', + 'default' => '22pt' + ) + ), + 'styles' => array( + array( + 'name' => 'default', + 'label' => 'Default', + 'isDefault' => true + ), + array( + 'name' => 'outline', + 'label' => 'Outline' + ) + ), + 'supports' => array( + 'anchor' => true, + 'html' => false, + 'align' => true, + 'spacing' => array( + 'margin' => true, + 'padding' => true + ), + 'typography' => array( + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalLetterSpacing' => true + ), + 'interactivity' => array( + 'clientNavigation' => true + ), + '__experimentalBorder' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true, + '__experimentalDefaultControls' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true + ) + ) + ) + ), + 'template-part' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/template-part', + 'title' => 'Template Part', + 'category' => 'theme', + 'description' => 'Edit the different global regions of your site, like the header, footer, sidebar, or create your own.', + 'textdomain' => 'default', + 'attributes' => array( + 'slug' => array( + 'type' => 'string' + ), + 'theme' => array( + 'type' => 'string' + ), + 'tagName' => array( + 'type' => 'string' + ), + 'area' => array( + 'type' => 'string' + ) + ), + 'supports' => array( + 'align' => true, + 'html' => false, + 'reusable' => false, + 'renaming' => false, + 'interactivity' => array( + 'clientNavigation' => true + ) + ), + 'editorStyle' => 'wp-block-template-part-editor' + ), + 'term-count' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/term-count', + 'title' => 'Term Count', + 'category' => 'theme', + 'description' => 'Displays the post count of a taxonomy term.', + 'textdomain' => 'default', + 'usesContext' => array( + 'termId', + 'taxonomy' + ), + 'attributes' => array( + 'bracketType' => array( + 'type' => 'string', + 'enum' => array( + 'none', + 'round', + 'square', + 'curly', + 'angle' + ), + 'default' => 'round' + ) + ), + 'supports' => array( + 'anchor' => true, + 'html' => false, + 'color' => array( + 'gradients' => true, + '__experimentalDefaultControls' => array( + 'background' => true, + 'text' => true + ) + ), + 'spacing' => array( + 'padding' => true + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ), + '__experimentalBorder' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true, + '__experimentalDefaultControls' => array( + 'color' => true, + 'width' => true, + 'style' => true + ) + ) + ), + 'style' => 'wp-block-term-count' + ), + 'term-description' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/term-description', + 'title' => 'Term Description', + 'category' => 'theme', + 'description' => 'Display the description of categories, tags and custom taxonomies when viewing an archive.', + 'textdomain' => 'default', + 'usesContext' => array( + 'termId', + 'taxonomy' + ), + 'supports' => array( + 'anchor' => true, + 'align' => array( + 'wide', + 'full' + ), + 'html' => false, + 'color' => array( + 'link' => true, + '__experimentalDefaultControls' => array( + 'background' => true, + 'text' => true + ) + ), + 'spacing' => array( + 'padding' => true, + 'margin' => true + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + 'textAlign' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ), + '__experimentalBorder' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true, + '__experimentalDefaultControls' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true + ) + ) + ) + ), + 'term-name' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/term-name', + 'title' => 'Term Name', + 'category' => 'theme', + 'description' => 'Displays the name of a taxonomy term.', + 'keywords' => array( + 'term title' + ), + 'textdomain' => 'default', + 'usesContext' => array( + 'termId', + 'taxonomy' + ), + 'attributes' => array( + 'textAlign' => array( + 'type' => 'string' + ), + 'level' => array( + 'type' => 'number', + 'default' => 0 + ), + 'isLink' => array( + 'type' => 'boolean', + 'default' => false + ), + 'levelOptions' => array( + 'type' => 'array' + ) + ), + 'supports' => array( + 'anchor' => true, + 'align' => array( + 'wide', + 'full' + ), + 'html' => false, + 'color' => array( + 'gradients' => true, + 'link' => true, + '__experimentalDefaultControls' => array( + 'background' => true, + 'text' => true, + 'link' => true + ) + ), + 'spacing' => array( + 'padding' => true + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ), + '__experimentalBorder' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true, + '__experimentalDefaultControls' => array( + 'color' => true, + 'width' => true, + 'style' => true + ) + ) + ), + 'style' => 'wp-block-term-name' + ), + 'term-template' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/term-template', + 'title' => 'Term Template', + 'category' => 'theme', + 'ancestor' => array( + 'core/terms-query' + ), + 'description' => 'Contains the block elements used to render a taxonomy term, like the name, description, and more.', + 'textdomain' => 'default', + 'usesContext' => array( + 'termQuery' + ), + 'supports' => array( + 'anchor' => true, + 'reusable' => false, + 'html' => false, + 'align' => array( + 'wide', + 'full' + ), + 'layout' => true, + 'color' => array( + 'gradients' => true, + 'link' => true, + '__experimentalDefaultControls' => array( + 'background' => true, + 'text' => true + ) + ), + 'typography' => array( + 'fontSize' => true, + 'lineHeight' => true, + '__experimentalFontFamily' => true, + '__experimentalFontWeight' => true, + '__experimentalFontStyle' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalLetterSpacing' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'spacing' => array( + 'margin' => true, + 'padding' => true, + 'blockGap' => array( + '__experimentalDefault' => '1.25em' + ), + '__experimentalDefaultControls' => array( + 'blockGap' => true, + 'padding' => false, + 'margin' => false + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ), + '__experimentalBorder' => array( + 'radius' => true, + 'color' => true, + 'width' => true, + 'style' => true + ) + ), + 'style' => 'wp-block-term-template', + 'editorStyle' => 'wp-block-term-template-editor' + ), + 'terms-query' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/terms-query', + 'title' => 'Terms Query', + 'category' => 'theme', + 'description' => 'An advanced block that allows displaying taxonomy terms based on different query parameters and visual configurations.', + 'keywords' => array( + 'terms', + 'taxonomy', + 'categories', + 'tags', + 'list' + ), + 'textdomain' => 'default', + 'attributes' => array( + 'termQuery' => array( + 'type' => 'object', + 'default' => array( + 'perPage' => 10, + 'taxonomy' => 'category', + 'order' => 'asc', + 'orderBy' => 'name', + 'include' => array( + + ), + 'hideEmpty' => true, + 'showNested' => false, + 'inherit' => false + ) + ), + 'tagName' => array( + 'type' => 'string', + 'default' => 'div' + ) + ), + 'usesContext' => array( + 'templateSlug' + ), + 'providesContext' => array( + 'termQuery' => 'termQuery' + ), + 'supports' => array( + 'anchor' => true, + 'align' => array( + 'wide', + 'full' + ), + 'html' => false, + 'layout' => true, + 'interactivity' => true + ) + ), + 'text-columns' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/text-columns', + 'title' => 'Text Columns (deprecated)', + 'icon' => 'columns', + 'category' => 'design', + 'description' => 'This block is deprecated. Please use the Columns block instead.', + 'textdomain' => 'default', + 'attributes' => array( + 'content' => array( + 'type' => 'array', + 'source' => 'query', + 'selector' => 'p', + 'query' => array( + 'children' => array( + 'type' => 'string', + 'source' => 'html' + ) + ), + 'default' => array( + array( + + ), + array( + + ) + ) + ), + 'columns' => array( + 'type' => 'number', + 'default' => 2 + ), + 'width' => array( + 'type' => 'string' + ) + ), + 'supports' => array( + 'inserter' => false, + 'interactivity' => array( + 'clientNavigation' => true + ) + ), + 'editorStyle' => 'wp-block-text-columns-editor', + 'style' => 'wp-block-text-columns' + ), + 'verse' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/verse', + 'title' => 'Poetry', + 'category' => 'text', + 'description' => 'Insert poetry. Use special spacing formats. Or quote song lyrics.', + 'keywords' => array( + 'poetry', + 'poem', + 'verse', + 'stanza', + 'song', + 'lyrics' + ), + 'textdomain' => 'default', + 'attributes' => array( + 'content' => array( + 'type' => 'rich-text', + 'source' => 'rich-text', + 'selector' => 'pre', + '__unstablePreserveWhiteSpace' => true, + 'role' => 'content' + ) + ), + 'supports' => array( + 'anchor' => true, + 'background' => array( + 'backgroundImage' => true, + 'backgroundSize' => true, + '__experimentalDefaultControls' => array( + 'backgroundImage' => true + ) + ), + 'color' => array( + 'gradients' => true, + 'link' => true, + '__experimentalDefaultControls' => array( + 'background' => true, + 'text' => true + ) + ), + 'dimensions' => array( + 'minHeight' => true, + '__experimentalDefaultControls' => array( + 'minHeight' => false + ) + ), + 'typography' => array( + 'fontSize' => true, + '__experimentalFontFamily' => true, + 'lineHeight' => true, + 'textAlign' => true, + '__experimentalFontStyle' => true, + '__experimentalFontWeight' => true, + '__experimentalLetterSpacing' => true, + '__experimentalTextTransform' => true, + '__experimentalTextDecoration' => true, + '__experimentalWritingMode' => true, + '__experimentalDefaultControls' => array( + 'fontSize' => true + ) + ), + 'spacing' => array( + 'margin' => true, + 'padding' => true, + '__experimentalDefaultControls' => array( + 'margin' => false, + 'padding' => false + ) + ), + '__experimentalBorder' => array( + 'radius' => true, + 'width' => true, + 'color' => true, + 'style' => true + ), + 'interactivity' => array( + 'clientNavigation' => true + ) + ), + 'style' => 'wp-block-verse', + 'editorStyle' => 'wp-block-verse-editor' + ), + 'video' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/video', + 'title' => 'Video', + 'category' => 'media', + 'description' => 'Embed a video from your media library or upload a new one.', + 'keywords' => array( + 'movie' + ), + 'textdomain' => 'default', + 'attributes' => array( + 'autoplay' => array( + 'type' => 'boolean', + 'source' => 'attribute', + 'selector' => 'video', + 'attribute' => 'autoplay' + ), + 'caption' => array( + 'type' => 'rich-text', + 'source' => 'rich-text', + 'selector' => 'figcaption', + 'role' => 'content' + ), + 'controls' => array( + 'type' => 'boolean', + 'source' => 'attribute', + 'selector' => 'video', + 'attribute' => 'controls', + 'default' => true + ), + 'id' => array( + 'type' => 'number', + 'role' => 'content' + ), + 'loop' => array( + 'type' => 'boolean', + 'source' => 'attribute', + 'selector' => 'video', + 'attribute' => 'loop' + ), + 'muted' => array( + 'type' => 'boolean', + 'source' => 'attribute', + 'selector' => 'video', + 'attribute' => 'muted' + ), + 'poster' => array( + 'type' => 'string', + 'source' => 'attribute', + 'selector' => 'video', + 'attribute' => 'poster' + ), + 'preload' => array( + 'type' => 'string', + 'source' => 'attribute', + 'selector' => 'video', + 'attribute' => 'preload', + 'default' => 'metadata' + ), + 'blob' => array( + 'type' => 'string', + 'role' => 'local' + ), + 'src' => array( + 'type' => 'string', + 'source' => 'attribute', + 'selector' => 'video', + 'attribute' => 'src', + 'role' => 'content' + ), + 'playsInline' => array( + 'type' => 'boolean', + 'source' => 'attribute', + 'selector' => 'video', + 'attribute' => 'playsinline' + ), + 'tracks' => array( + 'role' => 'content', + 'type' => 'array', + 'items' => array( + 'type' => 'object' + ), + 'default' => array( + + ) + ) + ), + 'supports' => array( + 'anchor' => true, + 'align' => true, + 'spacing' => array( + 'margin' => true, + 'padding' => true, + '__experimentalDefaultControls' => array( + 'margin' => false, + 'padding' => false + ) + ), + 'interactivity' => array( + 'clientNavigation' => true + ) + ), + 'editorStyle' => 'wp-block-video-editor', + 'style' => 'wp-block-video' + ), + 'widget-group' => array( + '$schema' => 'https://schemas.wp.org/trunk/block.json', + 'apiVersion' => 3, + 'name' => 'core/widget-group', + 'title' => 'Widget Group', + 'category' => 'widgets', + 'attributes' => array( + 'title' => array( + 'type' => 'string' + ) + ), + 'supports' => array( + 'html' => false, + 'inserter' => true, + 'customClassName' => true, + 'reusable' => false + ), + 'editorStyle' => 'wp-block-widget-group-editor', + 'style' => 'wp-block-widget-group' + ) +); \ No newline at end of file diff --git a/src/wp-includes/blocks/breadcrumbs.php b/src/wp-includes/blocks/breadcrumbs.php new file mode 100644 index 0000000000000..c2e5a7f9513e3 --- /dev/null +++ b/src/wp-includes/blocks/breadcrumbs.php @@ -0,0 +1,611 @@ + 1 ) ) { + $breadcrumb_items[] = array( + 'label' => __( 'Home' ), + 'url' => home_url( '/' ), + ); + } else { + $breadcrumb_items[] = block_core_breadcrumbs_create_item( __( 'Home' ), block_core_breadcrumbs_is_paged() ); + } + } + + // Handle home. + if ( $is_home ) { + // These checks are explicitly nested in order not to execute the `else` branch. + if ( $page_for_posts ) { + $breadcrumb_items[] = block_core_breadcrumbs_create_item( block_core_breadcrumbs_get_post_title( $page_for_posts ), block_core_breadcrumbs_is_paged() ); + } + if ( block_core_breadcrumbs_is_paged() ) { + $breadcrumb_items[] = block_core_breadcrumbs_create_page_number_item(); + } + } elseif ( $is_front_page ) { + // Handle front page. + // This check is explicitly nested in order not to execute the `else` branch. + // If front page is set to custom page and is paged, add the page number. + if ( (int) get_query_var( 'page' ) > 1 ) { + $breadcrumb_items[] = block_core_breadcrumbs_create_page_number_item( 'page' ); + } + } elseif ( is_search() ) { + // Handle search results. + $is_paged = block_core_breadcrumbs_is_paged(); + /* translators: %s: search query */ + $text = sprintf( __( 'Search results for: "%s"' ), wp_trim_words( get_search_query(), 10 ) ); + $breadcrumb_items[] = block_core_breadcrumbs_create_item( $text, $is_paged ); + // Add the "Page X" as the current page if paginated. + if ( $is_paged ) { + $breadcrumb_items[] = block_core_breadcrumbs_create_page_number_item(); + } + } elseif ( is_404() ) { + // Handle 404 pages. + $breadcrumb_items[] = array( + 'label' => __( 'Page not found' ), + ); + } elseif ( is_archive() ) { + // Handle archive pages (taxonomy, post type, date, author archives). + $archive_breadcrumbs = block_core_breadcrumbs_get_archive_breadcrumbs(); + if ( ! empty( $archive_breadcrumbs ) ) { + $breadcrumb_items = array_merge( $breadcrumb_items, $archive_breadcrumbs ); + } + } else { + // Handle single post/page breadcrumbs. + if ( ! isset( $block->context['postId'] ) || ! isset( $block->context['postType'] ) ) { + return ''; + } + + $post_id = $block->context['postId']; + $post_type = $block->context['postType']; + + $post = get_post( $post_id ); + if ( ! $post ) { + return ''; + } + + // For non-hierarchical post types with parents (e.g., attachments), build trail for the parent. + $post_parent = $post->post_parent; + $parent_post = null; + if ( ! is_post_type_hierarchical( $post_type ) && $post_parent ) { + $parent_post = get_post( $post_parent ); + if ( $parent_post ) { + $post_id = $parent_post->ID; + $post_type = $parent_post->post_type; + $post_parent = $parent_post->post_parent; + } + } + + // Determine breadcrumb type. + // Some non-hierarchical post types (e.g., attachments) can have parents. + // Use hierarchical breadcrumbs if a parent exists, otherwise use taxonomy breadcrumbs. + $show_terms = false; + if ( ! is_post_type_hierarchical( $post_type ) && ! $post_parent ) { + $show_terms = true; + } elseif ( empty( get_object_taxonomies( $post_type, 'objects' ) ) ) { + $show_terms = false; + } else { + $show_terms = $attributes['prefersTaxonomy']; + } + + // Add post type archive link if applicable. + $post_type_object = get_post_type_object( $post_type ); + $archive_link = get_post_type_archive_link( $post_type ); + if ( $archive_link && untrailingslashit( home_url() ) !== untrailingslashit( $archive_link ) ) { + $label = $post_type_object->labels->archives; + if ( 'post' === $post_type && $page_for_posts ) { + $label = block_core_breadcrumbs_get_post_title( $page_for_posts ); + } + $breadcrumb_items[] = array( + 'label' => $label, + 'url' => $archive_link, + ); + } + // Build breadcrumb trail based on hierarchical structure or taxonomy terms. + if ( ! $show_terms ) { + $breadcrumb_items = array_merge( $breadcrumb_items, block_core_breadcrumbs_get_hierarchical_post_type_breadcrumbs( $post_id ) ); + } else { + $breadcrumb_items = array_merge( $breadcrumb_items, block_core_breadcrumbs_get_terms_breadcrumbs( $post_id, $post_type ) ); + } + + // Add post title: linked when viewing a paginated page, plain text otherwise. + $is_paged = (int) get_query_var( 'page' ) > 1 || (int) get_query_var( 'cpage' ) > 1; + $title = block_core_breadcrumbs_get_post_title( $post ); + + if ( $is_paged ) { + $breadcrumb_items[] = array( + 'label' => $title, + 'url' => get_permalink( $post ), + 'allow_html' => true, + ); + $breadcrumb_items[] = block_core_breadcrumbs_create_page_number_item( (int) get_query_var( 'cpage' ) > 1 ? 'cpage' : 'page' ); + } else { + $breadcrumb_items[] = array( + 'label' => $title, + 'allow_html' => true, + ); + } + } + + // Remove current item if disabled. + if ( ! $attributes['showCurrentItem'] && ! empty( $breadcrumb_items ) ) { + array_pop( $breadcrumb_items ); + } + + /** + * Filters the breadcrumb items array before rendering. + * + * Allows developers to modify, add, or remove breadcrumb items. + * + * @since 7.0.0 + * + * @param array[] $breadcrumb_items { + * Array of breadcrumb item data. + * + * @type string $label The breadcrumb text. + * @type string $url Optional. The breadcrumb link URL. + * @type bool $allow_html Optional. Whether to allow HTML in the label. + * When true, the label will be sanitized with wp_kses_post(), + * allowing only safe HTML tags. When false or omitted, all HTML + * will be escaped with esc_html(). Default false. + * } + */ + $breadcrumb_items = apply_filters( 'block_core_breadcrumbs_items', $breadcrumb_items ); + + if ( empty( $breadcrumb_items ) ) { + return ''; + } + + $wrapper_attributes = get_block_wrapper_attributes( + array( + 'style' => '--separator: "' . addcslashes( $attributes['separator'], '\\"' ) . '";', + 'aria-label' => __( 'Breadcrumbs' ), + ) + ); + + $breadcrumb_html = sprintf( + '', + $wrapper_attributes, + implode( + '', + array_map( + static function ( $item ) { + $label = ! empty( $item['allow_html'] ) ? wp_kses_post( $item['label'] ) : esc_html( $item['label'] ); + if ( ! empty( $item['url'] ) ) { + return '
  • ' . $label . '
  • '; + } + return '
  • ' . $label . '
  • '; + }, + $breadcrumb_items + ) + ) + ); + + return $breadcrumb_html; +} + +/** + * Checks if we're on a paginated view (page 2 or higher). + * + * @since 7.0.0 + * + * @return bool True if paged > 1, false otherwise. + */ +function block_core_breadcrumbs_is_paged() { + $paged = (int) get_query_var( 'paged' ); + return $paged > 1; +} + +/** + * Creates a "Page X" breadcrumb item for paginated views. + * + * @since 7.0.0 + * @param string $query_var Optional. Query variable to get current page number. Default 'paged'. + * @return array The "Page X" breadcrumb item data. + */ +function block_core_breadcrumbs_create_page_number_item( $query_var = 'paged' ) { + $paged = (int) get_query_var( $query_var ); + + if ( 'cpage' === $query_var ) { + return array( + 'label' => sprintf( + /* translators: %s: comment page number */ + __( 'Comments Page %s' ), + number_format_i18n( $paged ) + ), + ); + } + + return array( + 'label' => sprintf( + /* translators: %s: page number */ + __( 'Page %s' ), + number_format_i18n( $paged ) + ), + ); +} + + +/** + * Creates a breadcrumb item that's either a link or current page item. + * + * When paginated (is_paged is true), creates a link to page 1. + * Otherwise, creates a span marked as the current page. + * + * @since 7.0.0 + * + * @param string $text The text content. + * @param bool $is_paged Whether we're on a paginated view. + * + * @return array The breadcrumb item data. + */ +function block_core_breadcrumbs_create_item( $text, $is_paged = false ) { + $item = array( 'label' => $text ); + if ( $is_paged ) { + $item['url'] = get_pagenum_link( 1 ); + } + return $item; +} + +/** + * Gets a post title with fallback for empty titles. + * + * @since 7.0.0 + * + * @param int|WP_Post $post_id_or_object The post ID or post object. + * + * @return string The post title or fallback text. + */ +function block_core_breadcrumbs_get_post_title( $post_id_or_object ) { + $title = get_the_title( $post_id_or_object ); + if ( strlen( $title ) === 0 ) { + $title = __( '(no title)' ); + } + return $title; +} + +/** + * Generates breadcrumb items from hierarchical post type ancestors. + * + * @since 7.0.0 + * + * @param int $post_id The post ID. + * + * @return array Array of breadcrumb item data. + */ +function block_core_breadcrumbs_get_hierarchical_post_type_breadcrumbs( $post_id ) { + $breadcrumb_items = array(); + $ancestors = get_post_ancestors( $post_id ); + $ancestors = array_reverse( $ancestors ); + + foreach ( $ancestors as $ancestor_id ) { + $breadcrumb_items[] = array( + 'label' => block_core_breadcrumbs_get_post_title( $ancestor_id ), + 'url' => get_permalink( $ancestor_id ), + 'allow_html' => true, + ); + } + return $breadcrumb_items; +} + +/** + * Generates breadcrumb items for hierarchical term ancestors. + * + * For hierarchical taxonomies, retrieves and formats ancestor terms as breadcrumb links. + * + * @since 7.0.0 + * + * @param int $term_id The term ID. + * @param string $taxonomy The taxonomy name. + * + * @return array Array of breadcrumb item data for ancestors. + */ +function block_core_breadcrumbs_get_term_ancestors_items( $term_id, $taxonomy ) { + $breadcrumb_items = array(); + + // Check if taxonomy is hierarchical and add ancestor term links. + if ( is_taxonomy_hierarchical( $taxonomy ) ) { + $term_ancestors = get_ancestors( $term_id, $taxonomy, 'taxonomy' ); + $term_ancestors = array_reverse( $term_ancestors ); + foreach ( $term_ancestors as $ancestor_id ) { + $ancestor_term = get_term( $ancestor_id, $taxonomy ); + if ( $ancestor_term && ! is_wp_error( $ancestor_term ) ) { + $breadcrumb_items[] = array( + 'label' => $ancestor_term->name, + 'url' => get_term_link( $ancestor_term ), + ); + } + } + } + + return $breadcrumb_items; +} + +/** + * Generates breadcrumb items for archive pages. + * + * Handles taxonomy archives, post type archives, date archives, and author archives. + * For hierarchical taxonomies, includes ancestor terms in the breadcrumb trail. + * + * @since 7.0.0 + * + * @return array Array of breadcrumb item data. + */ +function block_core_breadcrumbs_get_archive_breadcrumbs() { + $breadcrumb_items = array(); + + // Date archive (check first since it doesn't have a queried object). + if ( is_date() ) { + $year = get_query_var( 'year' ); + $month = get_query_var( 'monthnum' ); + $day = get_query_var( 'day' ); + + // Fallback to 'm' query var for plain permalinks. + // Plain permalinks use ?m=YYYYMMDD format instead of separate query vars. + if ( ! $year ) { + $m = get_query_var( 'm' ); + if ( $m ) { + $year = substr( $m, 0, 4 ); + $month = substr( $m, 4, 2 ); + $day = (int) substr( $m, 6, 2 ); + } + } + + $is_paged = block_core_breadcrumbs_is_paged(); + + if ( $year ) { + if ( $month ) { + // Year is linked if we have month. + $breadcrumb_items[] = array( + 'label' => $year, + 'url' => get_year_link( $year ), + ); + + if ( $day ) { + // Month is linked if we have day. + $breadcrumb_items[] = array( + 'label' => date_i18n( 'F', mktime( 0, 0, 0, $month, 1, $year ) ), + 'url' => get_month_link( $year, $month ), + ); + // Add day (current if not paginated, link if paginated). + $breadcrumb_items[] = block_core_breadcrumbs_create_item( + $day, + $is_paged + ); + } else { + // Add month (current if not paginated, link if paginated). + $breadcrumb_items[] = block_core_breadcrumbs_create_item( + date_i18n( 'F', mktime( 0, 0, 0, $month, 1, $year ) ), + $is_paged + ); + } + } else { + // Add year (current if not paginated, link if paginated). + $breadcrumb_items[] = block_core_breadcrumbs_create_item( + $year, + $is_paged + ); + } + } + + // Add pagination breadcrumb if on a paged date archive. + if ( $is_paged ) { + $breadcrumb_items[] = block_core_breadcrumbs_create_page_number_item(); + } + + return $breadcrumb_items; + } + + // For other archive types, we need a queried object. + $queried_object = get_queried_object(); + + if ( ! $queried_object ) { + return array(); + } + + $is_paged = block_core_breadcrumbs_is_paged(); + + // Taxonomy archive (category, tag, custom taxonomy). + if ( $queried_object instanceof WP_Term ) { + $term = $queried_object; + $taxonomy = $term->taxonomy; + + // Add hierarchical term ancestors if applicable. + $breadcrumb_items = array_merge( + $breadcrumb_items, + block_core_breadcrumbs_get_term_ancestors_items( $term->term_id, $taxonomy ) + ); + + // Add current term (current if not paginated, link if paginated). + $breadcrumb_items[] = block_core_breadcrumbs_create_item( + $term->name, + $is_paged + ); + } elseif ( is_post_type_archive() ) { + // Post type archive. + $post_type = get_query_var( 'post_type' ); + if ( is_array( $post_type ) ) { + $post_type = reset( $post_type ); + } + $post_type_object = get_post_type_object( $post_type ); + + /** This filter is documented in wp-includes/general-template.php */ + $title = apply_filters( 'post_type_archive_title', $post_type_object->labels->archives, $post_type ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound + + if ( $post_type_object ) { + // Add post type (current if not paginated, link if paginated). + $breadcrumb_items[] = block_core_breadcrumbs_create_item( + $title ? $title : $post_type_object->labels->archives, + $is_paged + ); + } + } elseif ( is_author() ) { + // Author archive. + $author = $queried_object; + // Add author (current if not paginated, link if paginated). + $breadcrumb_items[] = block_core_breadcrumbs_create_item( + $author->display_name, + $is_paged + ); + } + + // Add pagination breadcrumb if on a paged archive. + if ( $is_paged ) { + $breadcrumb_items[] = block_core_breadcrumbs_create_page_number_item(); + } + + return $breadcrumb_items; +} + +/** + * Generates breadcrumb items from taxonomy terms. + * + * Finds the first publicly queryable taxonomy with terms assigned to the post + * and generates breadcrumb links, including hierarchical term ancestors if applicable. + * + * @since 7.0.0 + * + * @param int $post_id The post ID. + * @param string $post_type The post type name. + * + * @return array Array of breadcrumb item data. + */ +function block_core_breadcrumbs_get_terms_breadcrumbs( $post_id, $post_type ) { + $breadcrumb_items = array(); + + // Get public taxonomies for this post type. + $taxonomies = wp_filter_object_list( + get_object_taxonomies( $post_type, 'objects' ), + array( + 'publicly_queryable' => true, + 'show_in_rest' => true, + ) + ); + + if ( empty( $taxonomies ) ) { + return $breadcrumb_items; + } + + /** + * Filters breadcrumb settings (taxonomy and term selection) for a post or post type. + * + * Allows developers to specify which taxonomy and term should be used in the + * breadcrumb trail when a post type has multiple taxonomies or when a post is + * assigned to multiple terms within a taxonomy. + * + * @since 7.0.0 + * + * @param array $settings { + * Array of breadcrumb settings. Default empty array. + * + * @type string $taxonomy Optional. Taxonomy slug to use for breadcrumbs. + * The taxonomy must be registered for the post type and have + * terms assigned to the post. If not found or has no terms, + * fall back to the first available taxonomy with terms. + * @type string $term Optional. Term slug to use when the post has multiple terms + * in the selected taxonomy. If the term is not found or not + * assigned to the post, fall back to the first term. If the + * post has only one term, that term is used regardless. + * } + * @param string $post_type The post type slug. + * @param int $post_id The post ID. + */ + $settings = apply_filters( 'block_core_breadcrumbs_post_type_settings', array(), $post_type, $post_id ); + + $taxonomy_name = null; + $terms = array(); + + // Try preferred taxonomy first if specified. + if ( ! empty( $settings['taxonomy'] ) ) { + foreach ( $taxonomies as $taxonomy ) { + if ( $taxonomy->name === $settings['taxonomy'] ) { + $post_terms = get_the_terms( $post_id, $taxonomy->name ); + if ( ! empty( $post_terms ) && ! is_wp_error( $post_terms ) ) { + $taxonomy_name = $taxonomy->name; + $terms = $post_terms; + } + break; + } + } + } + + // If no preferred taxonomy or it didn't have terms, find the first taxonomy with terms. + if ( empty( $terms ) ) { + foreach ( $taxonomies as $taxonomy ) { + $post_terms = get_the_terms( $post_id, $taxonomy->name ); + if ( ! empty( $post_terms ) && ! is_wp_error( $post_terms ) ) { + $taxonomy_name = $taxonomy->name; + $terms = $post_terms; + break; + } + } + } + + if ( ! empty( $terms ) ) { + // Select which term to use. + $term = reset( $terms ); + + // Try preferred term if specified and post has multiple terms. + if ( ! empty( $settings['term'] ) && count( $terms ) > 1 ) { + foreach ( $terms as $candidate_term ) { + if ( $candidate_term->slug === $settings['term'] ) { + $term = $candidate_term; + break; + } + } + } + + // Add hierarchical term ancestors if applicable. + $breadcrumb_items = array_merge( + $breadcrumb_items, + block_core_breadcrumbs_get_term_ancestors_items( $term->term_id, $taxonomy_name ) + ); + $breadcrumb_items[] = array( + 'label' => $term->name, + 'url' => get_term_link( $term ), + ); + } + return $breadcrumb_items; +} + +/** + * Registers the `core/breadcrumbs` block on the server. + * + * @since 7.0.0 + */ +function register_block_core_breadcrumbs() { + register_block_type_from_metadata( + __DIR__ . '/breadcrumbs', + array( + 'render_callback' => 'render_block_core_breadcrumbs', + ) + ); +} +add_action( 'init', 'register_block_core_breadcrumbs' ); diff --git a/src/wp-includes/blocks/breadcrumbs/block.json b/src/wp-includes/blocks/breadcrumbs/block.json new file mode 100644 index 0000000000000..597e36c41ae50 --- /dev/null +++ b/src/wp-includes/blocks/breadcrumbs/block.json @@ -0,0 +1,78 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/breadcrumbs", + "title": "Breadcrumbs", + "category": "theme", + "description": "Display a breadcrumb trail showing the path to the current page.", + "textdomain": "default", + "attributes": { + "prefersTaxonomy": { + "type": "boolean", + "default": false + }, + "separator": { + "type": "string", + "default": "/" + }, + "showHomeItem": { + "type": "boolean", + "default": true + }, + "showCurrentItem": { + "type": "boolean", + "default": true + }, + "showOnHomePage": { + "type": "boolean", + "default": false + } + }, + "usesContext": [ "postId", "postType", "templateSlug" ], + "supports": { + "anchor": true, + "html": false, + "align": [ "wide", "full" ], + "spacing": { + "margin": true, + "padding": true + }, + "color": { + "gradients": true, + "link": true, + "__experimentalDefaultControls": { + "background": true, + "text": true + } + }, + "__experimentalBorder": { + "radius": true, + "color": true, + "width": true, + "style": true, + "__experimentalDefaultControls": { + "radius": false, + "color": true, + "width": true, + "style": true + } + }, + "typography": { + "fontSize": true, + "lineHeight": true, + "__experimentalFontFamily": true, + "__experimentalFontWeight": true, + "__experimentalFontStyle": true, + "__experimentalTextTransform": true, + "__experimentalTextDecoration": true, + "__experimentalLetterSpacing": true, + "__experimentalDefaultControls": { + "fontSize": true + } + }, + "interactivity": { + "clientNavigation": true + } + }, + "style": "wp-block-breadcrumbs" +} diff --git a/src/wp-includes/blocks/button.php b/src/wp-includes/blocks/button.php new file mode 100644 index 0000000000000..0d03440b1cb0f --- /dev/null +++ b/src/wp-includes/blocks/button.php @@ -0,0 +1,79 @@ +` or `'; + + $body_content = preg_replace( '/]+>/', $button, $body_content ); + + add_action( 'wp_footer', 'block_core_image_print_lightbox_overlay' ); + + return $body_content; +} + +/** + * @since 6.5.0 + */ +function block_core_image_print_lightbox_overlay() { + $dialog_label = esc_attr__( 'Enlarged images' ); + $close_button_text = esc_attr__( 'Close' ); + $prev_button_text = esc_attr__( 'Previous' ); + $next_button_text = esc_attr__( 'Next' ); + $close_button_icon = ''; + $prev_button_icon = ''; + $next_button_icon = ''; + + // If the current theme does NOT have a `theme.json`, or the colors are not + // defined, it needs to set the background color & close button color to some + // default values because it can't get them from the Global Styles. + $background_color = '#fff'; + $close_button_color = '#000'; + if ( wp_theme_has_theme_json() ) { + $global_styles_color = wp_get_global_styles( array( 'color' ) ); + if ( ! empty( $global_styles_color['background'] ) ) { + $background_color = esc_attr( $global_styles_color['background'] ); + } + if ( ! empty( $global_styles_color['text'] ) ) { + $close_button_color = esc_attr( $global_styles_color['text'] ); + } + } + + echo << + + + + + +
    + + +HTML; +} + +/** + * Registers the `core/image` block on server. + * + * @since 5.9.0 + */ +function register_block_core_image() { + register_block_type_from_metadata( + __DIR__ . '/image', + array( + 'render_callback' => 'render_block_core_image', + ) + ); +} +add_action( 'init', 'register_block_core_image' ); diff --git a/src/wp-includes/blocks/image/block.json b/src/wp-includes/blocks/image/block.json new file mode 100644 index 0000000000000..66a4fac4a3023 --- /dev/null +++ b/src/wp-includes/blocks/image/block.json @@ -0,0 +1,156 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/image", + "title": "Image", + "category": "media", + "usesContext": [ + "allowResize", + "imageCrop", + "fixedHeight", + "navigationButtonType", + "postId", + "postType", + "queryId", + "galleryId" + ], + "description": "Insert an image to make a visual statement.", + "keywords": [ "img", "photo", "picture" ], + "textdomain": "default", + "attributes": { + "blob": { + "type": "string", + "role": "local" + }, + "url": { + "type": "string", + "source": "attribute", + "selector": "img", + "attribute": "src", + "role": "content" + }, + "alt": { + "type": "string", + "source": "attribute", + "selector": "img", + "attribute": "alt", + "default": "", + "role": "content" + }, + "caption": { + "type": "rich-text", + "source": "rich-text", + "selector": "figcaption", + "role": "content" + }, + "lightbox": { + "type": "object", + "enabled": { + "type": "boolean" + } + }, + "title": { + "type": "string", + "source": "attribute", + "selector": "img", + "attribute": "title", + "role": "content" + }, + "href": { + "type": "string", + "source": "attribute", + "selector": "figure > a", + "attribute": "href", + "role": "content" + }, + "rel": { + "type": "string", + "source": "attribute", + "selector": "figure > a", + "attribute": "rel" + }, + "linkClass": { + "type": "string", + "source": "attribute", + "selector": "figure > a", + "attribute": "class" + }, + "id": { + "type": "number", + "role": "content" + }, + "width": { + "type": "string" + }, + "height": { + "type": "string" + }, + "aspectRatio": { + "type": "string" + }, + "scale": { + "type": "string" + }, + "focalPoint": { + "type": "object" + }, + "sizeSlug": { + "type": "string" + }, + "linkDestination": { + "type": "string" + }, + "linkTarget": { + "type": "string", + "source": "attribute", + "selector": "figure > a", + "attribute": "target" + } + }, + "supports": { + "interactivity": true, + "align": [ "left", "center", "right", "wide", "full" ], + "anchor": true, + "color": { + "text": false, + "background": false + }, + "filter": { + "duotone": true + }, + "spacing": { + "margin": true + }, + "__experimentalBorder": { + "color": true, + "radius": true, + "width": true, + "__experimentalSkipSerialization": true, + "__experimentalDefaultControls": { + "color": true, + "radius": true, + "width": true + } + }, + "shadow": { + "__experimentalSkipSerialization": true + } + }, + "selectors": { + "border": ".wp-block-image img, .wp-block-image .wp-block-image__crop-area, .wp-block-image .components-placeholder", + "shadow": ".wp-block-image img, .wp-block-image .wp-block-image__crop-area, .wp-block-image .components-placeholder", + "filter": { + "duotone": ".wp-block-image img, .wp-block-image .components-placeholder" + } + }, + "styles": [ + { + "name": "default", + "label": "Default", + "isDefault": true + }, + { "name": "rounded", "label": "Rounded" } + ], + "editorStyle": "wp-block-image-editor", + "style": "wp-block-image" +} diff --git a/src/wp-includes/blocks/index.php b/src/wp-includes/blocks/index.php index 65d2cb5ad67a3..98615ea1ba766 100644 --- a/src/wp-includes/blocks/index.php +++ b/src/wp-includes/blocks/index.php @@ -13,15 +13,9 @@ define( 'BLOCKS_PATH', ABSPATH . WPINC . '/blocks/' ); // Include files required for core blocks registration. -if ( file_exists( BLOCKS_PATH . 'legacy-widget.php' ) ) { - require BLOCKS_PATH . 'legacy-widget.php'; -} -if ( file_exists( BLOCKS_PATH . 'widget-group.php' ) ) { - require BLOCKS_PATH . 'widget-group.php'; -} -if ( file_exists( BLOCKS_PATH . 'require-dynamic-blocks.php' ) ) { - require BLOCKS_PATH . 'require-dynamic-blocks.php'; -} +require BLOCKS_PATH . 'legacy-widget.php'; +require BLOCKS_PATH . 'widget-group.php'; +require BLOCKS_PATH . 'require-dynamic-blocks.php'; /** * Registers core block style handles. @@ -49,9 +43,6 @@ function register_core_block_style_handles() { static $core_blocks_meta; if ( ! $core_blocks_meta ) { - if ( ! file_exists( BLOCKS_PATH . 'blocks-json.php' ) ) { - return; - } $core_blocks_meta = require BLOCKS_PATH . 'blocks-json.php'; } @@ -159,9 +150,6 @@ static function ( $file ) use ( $normalized_blocks_path ) { * @since 5.5.0 */ function register_core_block_types_from_metadata() { - if ( ! file_exists( BLOCKS_PATH . 'require-static-blocks.php' ) ) { - return; - } $block_folders = require BLOCKS_PATH . 'require-static-blocks.php'; foreach ( $block_folders as $block_folder ) { register_block_type_from_metadata( @@ -181,9 +169,6 @@ function register_core_block_types_from_metadata() { * @since 6.7.0 */ function wp_register_core_block_metadata_collection() { - if ( ! file_exists( BLOCKS_PATH . 'blocks-json.php' ) ) { - return; - } wp_register_block_metadata_collection( BLOCKS_PATH, BLOCKS_PATH . 'blocks-json.php' diff --git a/src/wp-includes/blocks/latest-comments.php b/src/wp-includes/blocks/latest-comments.php new file mode 100644 index 0000000000000..eec7e104533d1 --- /dev/null +++ b/src/wp-includes/blocks/latest-comments.php @@ -0,0 +1,171 @@ + $attributes['commentsToShow'], + 'status' => 'approve', + 'post_status' => 'publish', + ), + array() + ) + ); + + $list_items_markup = ''; + if ( ! empty( $comments ) ) { + // Prime the cache for associated posts. This is copied from \WP_Widget_Recent_Comments::widget(). + $post_ids = array_unique( wp_list_pluck( $comments, 'comment_post_ID' ) ); + _prime_post_caches( $post_ids, strpos( get_option( 'permalink_structure' ), '%category%' ), false ); + + foreach ( $comments as $comment ) { + $list_items_markup .= '
  • '; + if ( $attributes['displayAvatar'] ) { + $avatar = get_avatar( + $comment, + 48, + '', + '', + array( + 'class' => 'wp-block-latest-comments__comment-avatar', + ) + ); + if ( $avatar ) { + $list_items_markup .= $avatar; + } + } + + $list_items_markup .= '
    '; + $list_items_markup .= ''; + if ( 'full' === $display_content ) { + $list_items_markup .= '
    ' . wpautop( get_comment_text( $comment ) ) . '
    '; + } elseif ( 'excerpt' === $display_content ) { + $list_items_markup .= '
    ' . wpautop( get_comment_excerpt( $comment ) ) . '
    '; + } + $list_items_markup .= '
  • '; + } + } + + $classnames = array(); + if ( $attributes['displayAvatar'] ) { + $classnames[] = 'has-avatars'; + } + if ( $attributes['displayDate'] ) { + $classnames[] = 'has-dates'; + } + if ( 'none' !== $display_content ) { + $classnames[] = 'has-excerpts'; + } + if ( empty( $comments ) ) { + $classnames[] = 'no-comments'; + } + $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => implode( ' ', $classnames ) ) ); + + return ! empty( $comments ) ? sprintf( + '
      %2$s
    ', + $wrapper_attributes, + $list_items_markup + ) : sprintf( + '
    %2$s
    ', + $wrapper_attributes, + __( 'No comments to show.' ) + ); +} + +/** + * Registers the `core/latest-comments` block. + * + * @since 5.3.0 + */ +function register_block_core_latest_comments() { + register_block_type_from_metadata( + __DIR__ . '/latest-comments', + array( + 'render_callback' => 'render_block_core_latest_comments', + ) + ); +} + +add_action( 'init', 'register_block_core_latest_comments' ); diff --git a/src/wp-includes/blocks/latest-comments/block.json b/src/wp-includes/blocks/latest-comments/block.json new file mode 100644 index 0000000000000..781d39b1851f0 --- /dev/null +++ b/src/wp-includes/blocks/latest-comments/block.json @@ -0,0 +1,66 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/latest-comments", + "title": "Latest Comments", + "category": "widgets", + "description": "Display a list of your most recent comments.", + "keywords": [ "recent comments" ], + "textdomain": "default", + "attributes": { + "commentsToShow": { + "type": "number", + "default": 5, + "minimum": 1, + "maximum": 100 + }, + "displayAvatar": { + "type": "boolean", + "default": true + }, + "displayDate": { + "type": "boolean", + "default": true + }, + "displayContent": { + "type": "string", + "default": "excerpt", + "enum": [ "none", "excerpt", "full" ] + } + }, + "supports": { + "anchor": true, + "align": true, + "color": { + "gradients": true, + "link": true, + "__experimentalDefaultControls": { + "background": true, + "text": true, + "link": true + } + }, + "html": false, + "spacing": { + "margin": true, + "padding": true + }, + "typography": { + "fontSize": true, + "lineHeight": true, + "__experimentalFontFamily": true, + "__experimentalFontWeight": true, + "__experimentalFontStyle": true, + "__experimentalTextTransform": true, + "__experimentalTextDecoration": true, + "__experimentalLetterSpacing": true, + "__experimentalDefaultControls": { + "fontSize": true + } + }, + "interactivity": { + "clientNavigation": true + } + }, + "style": "wp-block-latest-comments" +} diff --git a/src/wp-includes/blocks/latest-posts.php b/src/wp-includes/blocks/latest-posts.php new file mode 100644 index 0000000000000..44231ac6d14a1 --- /dev/null +++ b/src/wp-includes/blocks/latest-posts.php @@ -0,0 +1,275 @@ + $attributes['postsToShow'], + 'post_status' => 'publish', + 'order' => $attributes['order'], + 'orderby' => $attributes['orderBy'], + 'ignore_sticky_posts' => true, + 'no_found_rows' => true, + ); + + $block_core_latest_posts_excerpt_length = $attributes['excerptLength']; + add_filter( 'excerpt_length', 'block_core_latest_posts_get_excerpt_length', 20 ); + + if ( ! empty( $attributes['categories'] ) ) { + $args['category__in'] = array_column( $attributes['categories'], 'id' ); + } + if ( isset( $attributes['selectedAuthor'] ) ) { + $args['author'] = $attributes['selectedAuthor']; + } + + $query = new WP_Query(); + $recent_posts = $query->query( $args ); + + if ( isset( $attributes['displayFeaturedImage'] ) && $attributes['displayFeaturedImage'] ) { + update_post_thumbnail_cache( $query ); + } + + $list_items_markup = ''; + + foreach ( $recent_posts as $post ) { + $post_link = esc_url( get_permalink( $post ) ); + $title = get_the_title( $post ); + + if ( ! $title ) { + $title = __( '(no title)' ); + } + + $list_items_markup .= '
  • '; + + if ( $attributes['displayFeaturedImage'] && has_post_thumbnail( $post ) ) { + $image_style = ''; + if ( isset( $attributes['featuredImageSizeWidth'] ) ) { + $image_style .= sprintf( 'max-width:%spx;', $attributes['featuredImageSizeWidth'] ); + } + if ( isset( $attributes['featuredImageSizeHeight'] ) ) { + $image_style .= sprintf( 'max-height:%spx;', $attributes['featuredImageSizeHeight'] ); + } + + $image_classes = 'wp-block-latest-posts__featured-image'; + if ( isset( $attributes['featuredImageAlign'] ) ) { + $image_classes .= ' align' . $attributes['featuredImageAlign']; + } + + $featured_image = get_the_post_thumbnail( + $post, + $attributes['featuredImageSizeSlug'], + array( + 'style' => esc_attr( $image_style ), + ) + ); + if ( $attributes['addLinkToFeaturedImage'] ) { + $featured_image = sprintf( + '%3$s', + esc_url( $post_link ), + esc_attr( $title ), + $featured_image + ); + } + $list_items_markup .= sprintf( + '
    %2$s
    ', + esc_attr( $image_classes ), + $featured_image + ); + } + + $list_items_markup .= sprintf( + '%2$s', + esc_url( $post_link ), + $title + ); + + if ( isset( $attributes['displayAuthor'] ) && $attributes['displayAuthor'] ) { + $author_display_name = get_the_author_meta( 'display_name', $post->post_author ); + + /* translators: byline. %s: author. */ + $byline = sprintf( __( 'by %s' ), $author_display_name ); + + if ( ! empty( $author_display_name ) ) { + $list_items_markup .= sprintf( + '', + $byline + ); + } + } + + if ( isset( $attributes['displayPostDate'] ) && $attributes['displayPostDate'] ) { + $list_items_markup .= sprintf( + '', + esc_attr( get_the_date( 'c', $post ) ), + get_the_date( '', $post ) + ); + } + + if ( isset( $attributes['displayPostContent'] ) && $attributes['displayPostContent'] + && isset( $attributes['displayPostContentRadio'] ) && 'excerpt' === $attributes['displayPostContentRadio'] ) { + + $trimmed_excerpt = get_the_excerpt( $post ); + + /* + * Adds a "Read more" link with screen reader text. + * […] is the default excerpt ending from wp_trim_excerpt() in Core. + */ + if ( str_ends_with( $trimmed_excerpt, ' […]' ) ) { + /** This filter is documented in wp-includes/formatting.php */ + $excerpt_length = (int) apply_filters( 'excerpt_length', $block_core_latest_posts_excerpt_length ); + if ( $excerpt_length <= $block_core_latest_posts_excerpt_length ) { + $trimmed_excerpt = substr( $trimmed_excerpt, 0, -11 ); + $trimmed_excerpt .= sprintf( + /* translators: 1: A URL to a post, 2: Hidden accessibility text: Post title */ + __( '… Read more: %2$s' ), + esc_url( $post_link ), + esc_html( $title ) + ); + } + } + + if ( post_password_required( $post ) ) { + $trimmed_excerpt = __( 'This content is password protected.' ); + } + + $list_items_markup .= sprintf( + '
    %1$s
    ', + $trimmed_excerpt + ); + } + + if ( isset( $attributes['displayPostContent'] ) && $attributes['displayPostContent'] + && isset( $attributes['displayPostContentRadio'] ) && 'full_post' === $attributes['displayPostContentRadio'] ) { + + $post_content = html_entity_decode( $post->post_content, ENT_QUOTES, get_option( 'blog_charset' ) ); + + if ( post_password_required( $post ) ) { + $post_content = __( 'This content is password protected.' ); + } + + $list_items_markup .= sprintf( + '
    %1$s
    ', + wp_kses_post( $post_content ) + ); + } + + $list_items_markup .= "
  • \n"; + } + + remove_filter( 'excerpt_length', 'block_core_latest_posts_get_excerpt_length', 20 ); + + $classes = array( 'wp-block-latest-posts__list' ); + if ( isset( $attributes['postLayout'] ) && 'grid' === $attributes['postLayout'] ) { + $classes[] = 'is-grid'; + } + if ( isset( $attributes['columns'] ) && 'grid' === $attributes['postLayout'] ) { + $classes[] = 'columns-' . $attributes['columns']; + } + if ( isset( $attributes['displayPostDate'] ) && $attributes['displayPostDate'] ) { + $classes[] = 'has-dates'; + } + if ( isset( $attributes['displayAuthor'] ) && $attributes['displayAuthor'] ) { + $classes[] = 'has-author'; + } + if ( isset( $attributes['style']['elements']['link']['color']['text'] ) ) { + $classes[] = 'has-link-color'; + } + + $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => implode( ' ', $classes ) ) ); + + return sprintf( + '', + $wrapper_attributes, + $list_items_markup + ); +} + +/** + * Registers the `core/latest-posts` block on server. + * + * @since 5.0.0 + */ +function register_block_core_latest_posts() { + register_block_type_from_metadata( + __DIR__ . '/latest-posts', + array( + 'render_callback' => 'render_block_core_latest_posts', + ) + ); +} +add_action( 'init', 'register_block_core_latest_posts' ); + +/** + * Handles outdated versions of the `core/latest-posts` block by converting + * attribute `categories` from a numeric string to an array with key `id`. + * + * This is done to accommodate the changes introduced in #20781 that sought to + * add support for multiple categories to the block. However, given that this + * block is dynamic, the usual provisions for block migration are insufficient, + * as they only act when a block is loaded in the editor. + * + * TODO: Remove when and if the bottom client-side deprecation for this block + * is removed. + * + * @since 5.5.0 + * + * @param array $block A single parsed block object. + * + * @return array The migrated block object. + */ +function block_core_latest_posts_migrate_categories( $block ) { + if ( + 'core/latest-posts' === $block['blockName'] && + ! empty( $block['attrs']['categories'] ) && + is_string( $block['attrs']['categories'] ) + ) { + $block['attrs']['categories'] = array( + array( 'id' => absint( $block['attrs']['categories'] ) ), + ); + } + + return $block; +} +add_filter( 'render_block_data', 'block_core_latest_posts_migrate_categories' ); diff --git a/src/wp-includes/blocks/latest-posts/block.json b/src/wp-includes/blocks/latest-posts/block.json new file mode 100644 index 0000000000000..03de79be44ce7 --- /dev/null +++ b/src/wp-includes/blocks/latest-posts/block.json @@ -0,0 +1,133 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/latest-posts", + "title": "Latest Posts", + "category": "widgets", + "description": "Display a list of your most recent posts.", + "keywords": [ "recent posts" ], + "textdomain": "default", + "attributes": { + "categories": { + "type": "array", + "items": { + "type": "object" + } + }, + "selectedAuthor": { + "type": "number" + }, + "postsToShow": { + "type": "number", + "default": 5 + }, + "displayPostContent": { + "type": "boolean", + "default": false + }, + "displayPostContentRadio": { + "type": "string", + "default": "excerpt" + }, + "excerptLength": { + "type": "number", + "default": 55 + }, + "displayAuthor": { + "type": "boolean", + "default": false + }, + "displayPostDate": { + "type": "boolean", + "default": false + }, + "postLayout": { + "type": "string", + "default": "list" + }, + "columns": { + "type": "number", + "default": 3 + }, + "order": { + "type": "string", + "default": "desc" + }, + "orderBy": { + "type": "string", + "default": "date" + }, + "displayFeaturedImage": { + "type": "boolean", + "default": false + }, + "featuredImageAlign": { + "type": "string", + "enum": [ "left", "center", "right" ] + }, + "featuredImageSizeSlug": { + "type": "string", + "default": "thumbnail" + }, + "featuredImageSizeWidth": { + "type": "number", + "default": null + }, + "featuredImageSizeHeight": { + "type": "number", + "default": null + }, + "addLinkToFeaturedImage": { + "type": "boolean", + "default": false + } + }, + "supports": { + "anchor": true, + "align": true, + "html": false, + "color": { + "gradients": true, + "link": true, + "__experimentalDefaultControls": { + "background": true, + "text": true, + "link": true + } + }, + "spacing": { + "margin": true, + "padding": true + }, + "typography": { + "fontSize": true, + "lineHeight": true, + "__experimentalFontFamily": true, + "__experimentalFontWeight": true, + "__experimentalFontStyle": true, + "__experimentalTextTransform": true, + "__experimentalTextDecoration": true, + "__experimentalLetterSpacing": true, + "__experimentalDefaultControls": { + "fontSize": true + } + }, + "__experimentalBorder": { + "radius": true, + "color": true, + "width": true, + "style": true, + "__experimentalDefaultControls": { + "radius": true, + "color": true, + "width": true, + "style": true + } + }, + "interactivity": { + "clientNavigation": true + } + }, + "editorStyle": "wp-block-latest-posts-editor", + "style": "wp-block-latest-posts" +} diff --git a/src/wp-includes/blocks/legacy-widget.php b/src/wp-includes/blocks/legacy-widget.php new file mode 100644 index 0000000000000..bec1b16b6ba8c --- /dev/null +++ b/src/wp-includes/blocks/legacy-widget.php @@ -0,0 +1,157 @@ +get_widget_key( $id_base ); + $widget_object = $wp_widget_factory->get_widget_object( $id_base ); + + if ( ! $widget_key || ! $widget_object ) { + return ''; + } + + if ( isset( $attributes['instance']['encoded'], $attributes['instance']['hash'] ) ) { + $serialized_instance = base64_decode( $attributes['instance']['encoded'] ); + if ( ! hash_equals( wp_hash( $serialized_instance ), (string) $attributes['instance']['hash'] ) ) { + return ''; + } + $instance = unserialize( $serialized_instance ); + } else { + $instance = array(); + } + + $args = array( + 'widget_id' => $widget_object->id, + 'widget_name' => $widget_object->name, + ); + + ob_start(); + the_widget( $widget_key, $instance, $args ); + return ob_get_clean(); +} + +/** + * Registers the 'core/legacy-widget' block. + * + * @since 5.8.0 + */ +function register_block_core_legacy_widget() { + register_block_type_from_metadata( + __DIR__ . '/legacy-widget', + array( + 'render_callback' => 'render_block_core_legacy_widget', + ) + ); +} + +add_action( 'init', 'register_block_core_legacy_widget' ); + +/** + * Intercepts any request with legacy-widget-preview in the query param and, if + * set, renders a page containing a preview of the requested Legacy Widget + * block. + * + * @since 5.8.0 + */ +function handle_legacy_widget_preview_iframe() { + if ( empty( $_GET['legacy-widget-preview'] ) ) { + return; + } + + if ( ! current_user_can( 'edit_theme_options' ) ) { + return; + } + + define( 'IFRAME_REQUEST', true ); + + ?> + + > + + + + + + + + > +
    +
    + get_registered( 'core/legacy-widget' ); + echo $block->render( $_GET['legacy-widget-preview'] ); + ?> +
    +
    + + + + li", + "border": ".wp-block-list:not(.wp-block-list .wp-block-list) > li" + } +} diff --git a/src/wp-includes/blocks/list.php b/src/wp-includes/blocks/list.php new file mode 100644 index 0000000000000..1bffd81324857 --- /dev/null +++ b/src/wp-includes/blocks/list.php @@ -0,0 +1,54 @@ + is transformed to
      . + * + * @since 6.6.0 + * + * @see https://github.com/WordPress/gutenberg/issues/12420 + * + * @param array $attributes Attributes of the block being rendered. + * @param string $content Content of the block being rendered. + * + * @return string The content of the block being rendered. + */ +function block_core_list_render( $attributes, $content ) { + if ( ! $content ) { + return $content; + } + + $processor = new WP_HTML_Tag_Processor( $content ); + + $list_tags = array( 'OL', 'UL' ); + while ( $processor->next_tag() ) { + if ( in_array( $processor->get_tag(), $list_tags, true ) ) { + $processor->add_class( 'wp-block-list' ); + break; + } + } + + return $processor->get_updated_html(); +} + +/** + * Registers the `core/list` block on server. + * + * @since 6.6.0 + */ +function register_block_core_list() { + register_block_type_from_metadata( + __DIR__ . '/list', + array( + 'render_callback' => 'block_core_list_render', + ) + ); +} + +add_action( 'init', 'register_block_core_list' ); diff --git a/src/wp-includes/blocks/list/block.json b/src/wp-includes/blocks/list/block.json new file mode 100644 index 0000000000000..e91ebf76817e0 --- /dev/null +++ b/src/wp-includes/blocks/list/block.json @@ -0,0 +1,89 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/list", + "title": "List", + "category": "text", + "allowedBlocks": [ "core/list-item" ], + "description": "An organized collection of items displayed in a specific order.", + "keywords": [ "bullet list", "ordered list", "numbered list" ], + "textdomain": "default", + "attributes": { + "ordered": { + "type": "boolean", + "default": false, + "role": "content" + }, + "values": { + "type": "string", + "source": "html", + "selector": "ol,ul", + "multiline": "li", + "default": "", + "role": "content" + }, + "type": { + "type": "string" + }, + "start": { + "type": "number" + }, + "reversed": { + "type": "boolean" + }, + "placeholder": { + "type": "string" + } + }, + "supports": { + "anchor": true, + "html": false, + "__experimentalBorder": { + "color": true, + "radius": true, + "style": true, + "width": true + }, + "typography": { + "fontSize": true, + "lineHeight": true, + "__experimentalFontFamily": true, + "__experimentalFontWeight": true, + "__experimentalFontStyle": true, + "__experimentalTextTransform": true, + "__experimentalTextDecoration": true, + "__experimentalLetterSpacing": true, + "__experimentalDefaultControls": { + "fontSize": true + } + }, + "color": { + "gradients": true, + "link": true, + "__experimentalDefaultControls": { + "background": true, + "text": true + } + }, + "spacing": { + "margin": true, + "padding": true, + "__experimentalDefaultControls": { + "margin": false, + "padding": false + } + }, + "__unstablePasteTextInline": true, + "__experimentalOnMerge": true, + "__experimentalSlashInserter": true, + "interactivity": { + "clientNavigation": true + }, + "listView": true + }, + "selectors": { + "border": ".wp-block-list:not(.wp-block-list .wp-block-list)" + }, + "editorStyle": "wp-block-list-editor", + "style": "wp-block-list" +} diff --git a/src/wp-includes/blocks/loginout.php b/src/wp-includes/blocks/loginout.php new file mode 100644 index 0000000000000..f83d8be424ece --- /dev/null +++ b/src/wp-includes/blocks/loginout.php @@ -0,0 +1,61 @@ + false ) ); + } + + $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $classes ) ); + + return '
      ' . $contents . '
      '; +} + +/** + * Registers the `core/loginout` block on server. + * + * @since 5.8.0 + */ +function register_block_core_loginout() { + register_block_type_from_metadata( + __DIR__ . '/loginout', + array( + 'render_callback' => 'render_block_core_loginout', + ) + ); +} +add_action( 'init', 'register_block_core_loginout' ); diff --git a/src/wp-includes/blocks/loginout/block.json b/src/wp-includes/blocks/loginout/block.json new file mode 100644 index 0000000000000..b4c038542b060 --- /dev/null +++ b/src/wp-includes/blocks/loginout/block.json @@ -0,0 +1,64 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/loginout", + "title": "Login/out", + "category": "theme", + "description": "Show login & logout links.", + "keywords": [ "login", "logout", "form" ], + "textdomain": "default", + "attributes": { + "displayLoginAsForm": { + "type": "boolean", + "default": false + }, + "redirectToCurrent": { + "type": "boolean", + "default": true + } + }, + "example": { + "viewportWidth": 350 + }, + "supports": { + "anchor": true, + "className": true, + "color": { + "background": true, + "text": false, + "gradients": true, + "link": true + }, + "spacing": { + "margin": true, + "padding": true, + "__experimentalDefaultControls": { + "margin": false, + "padding": false + } + }, + "typography": { + "fontSize": true, + "lineHeight": true, + "__experimentalFontFamily": true, + "__experimentalFontWeight": true, + "__experimentalFontStyle": true, + "__experimentalTextTransform": true, + "__experimentalTextDecoration": true, + "__experimentalLetterSpacing": true, + "__experimentalDefaultControls": { + "fontSize": true + } + }, + "__experimentalBorder": { + "radius": true, + "color": true, + "width": true, + "style": true + }, + "interactivity": { + "clientNavigation": true + } + }, + "style": "wp-block-loginout" +} diff --git a/src/wp-includes/blocks/math/block.json b/src/wp-includes/blocks/math/block.json new file mode 100644 index 0000000000000..a305900ab9961 --- /dev/null +++ b/src/wp-includes/blocks/math/block.json @@ -0,0 +1,52 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/math", + "title": "Math", + "category": "text", + "description": "Display mathematical notation using LaTeX.", + "keywords": [ "equation", "formula", "latex", "mathematics" ], + "textdomain": "default", + "supports": { + "anchor": true, + "html": false, + "__experimentalBorder": { + "color": true, + "radius": true, + "style": true, + "width": true + }, + "color": { + "gradients": true, + "__experimentalDefaultControls": { + "background": true, + "text": true + } + }, + "spacing": { + "margin": true, + "padding": true, + "__experimentalDefaultControls": { + "margin": false, + "padding": false + } + }, + "typography": { + "fontSize": true, + "__experimentalDefaultControls": { + "fontSize": true + } + } + }, + "attributes": { + "latex": { + "type": "string", + "role": "content" + }, + "mathML": { + "type": "string", + "source": "html", + "selector": "math" + } + } +} diff --git a/src/wp-includes/blocks/media-text.php b/src/wp-includes/blocks/media-text.php new file mode 100644 index 0000000000000..f6973dc616182 --- /dev/null +++ b/src/wp-includes/blocks/media-text.php @@ -0,0 +1,131 @@ + 'div', + 'class_name' => 'wp-block-media-text', + ); + + while ( $block_tag_processor->next_tag( $block_query ) ) { + if ( $image_fill ) { + // The markup below does not work with the deprecated `is-image-fill` class. + $block_tag_processor->remove_class( 'is-image-fill' ); + $block_tag_processor->add_class( 'is-image-fill-element' ); + } + } + + $content = $block_tag_processor->get_updated_html(); + + $media_tag_processor = new WP_HTML_Tag_Processor( $content ); + $wrapping_figure_query = array( + 'tag_name' => 'figure', + 'class_name' => 'wp-block-media-text__media', + ); + + if ( $has_media_on_right ) { + // Loop through all the figure tags and set a bookmark on the last figure tag. + while ( $media_tag_processor->next_tag( $wrapping_figure_query ) ) { + $media_tag_processor->set_bookmark( 'last_figure' ); + } + if ( $media_tag_processor->has_bookmark( 'last_figure' ) ) { + $media_tag_processor->seek( 'last_figure' ); + // Insert a unique ID to identify the figure tag. + $media_tag_processor->set_attribute( 'id', $unique_id ); + } + } else { + if ( $media_tag_processor->next_tag( $wrapping_figure_query ) ) { + // Insert a unique ID to identify the figure tag. + $media_tag_processor->set_attribute( 'id', $unique_id ); + } + } + + $content = $media_tag_processor->get_updated_html(); + + // Add the image tag inside the figure tag, and update the image attributes + // in order to display the featured image. + $media_size_slug = $attributes['mediaSizeSlug'] ?? 'full'; + $image_tag = ''; + $content = preg_replace( + '/()/', + '$1' . $image_tag, + $content + ); + + $image_tag_processor = new WP_HTML_Tag_Processor( $content ); + if ( $image_tag_processor->next_tag( + array( + 'tag_name' => 'figure', + 'id' => $unique_id, + ) + ) ) { + // The ID is only used to ensure that the correct figure tag is selected, + // and can now be removed. + $image_tag_processor->remove_attribute( 'id' ); + if ( $image_tag_processor->next_tag( + array( + 'tag_name' => 'img', + 'class_name' => 'wp-block-media-text__featured_image', + ) + ) ) { + $image_tag_processor->set_attribute( 'src', esc_url( $current_featured_image ) ); + $image_tag_processor->set_attribute( 'class', 'wp-image-' . get_post_thumbnail_id() . ' size-' . $media_size_slug ); + $image_tag_processor->set_attribute( 'alt', trim( strip_tags( get_post_meta( get_post_thumbnail_id(), '_wp_attachment_image_alt', true ) ) ) ); + if ( $image_fill ) { + $image_tag_processor->set_attribute( 'style', 'object-position:' . $focal_point . ';' ); + } + + $content = $image_tag_processor->get_updated_html(); + } + } + + return $content; +} + +/** + * Registers the `core/media-text` block renderer on server. + * + * @since 6.6.0 + */ +function register_block_core_media_text() { + register_block_type_from_metadata( + __DIR__ . '/media-text', + array( + 'render_callback' => 'render_block_core_media_text', + ) + ); +} +add_action( 'init', 'register_block_core_media_text' ); diff --git a/src/wp-includes/blocks/media-text/block.json b/src/wp-includes/blocks/media-text/block.json new file mode 100644 index 0000000000000..249a5d43032c8 --- /dev/null +++ b/src/wp-includes/blocks/media-text/block.json @@ -0,0 +1,148 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/media-text", + "title": "Media & Text", + "category": "media", + "description": "Set media and words side-by-side for a richer layout.", + "keywords": [ "image", "video" ], + "textdomain": "default", + "attributes": { + "align": { + "type": "string", + "default": "none" + }, + "mediaAlt": { + "type": "string", + "source": "attribute", + "selector": "figure img", + "attribute": "alt", + "default": "", + "role": "content" + }, + "mediaPosition": { + "type": "string", + "default": "left" + }, + "mediaId": { + "type": "number", + "role": "content" + }, + "mediaUrl": { + "type": "string", + "source": "attribute", + "selector": "figure video,figure img", + "attribute": "src", + "role": "content" + }, + "mediaLink": { + "type": "string" + }, + "linkDestination": { + "type": "string" + }, + "linkTarget": { + "type": "string", + "source": "attribute", + "selector": "figure a", + "attribute": "target" + }, + "href": { + "type": "string", + "source": "attribute", + "selector": "figure a", + "attribute": "href", + "role": "content" + }, + "rel": { + "type": "string", + "source": "attribute", + "selector": "figure a", + "attribute": "rel" + }, + "linkClass": { + "type": "string", + "source": "attribute", + "selector": "figure a", + "attribute": "class" + }, + "mediaType": { + "type": "string", + "role": "content" + }, + "mediaWidth": { + "type": "number", + "default": 50 + }, + "mediaSizeSlug": { + "type": "string" + }, + "isStackedOnMobile": { + "type": "boolean", + "default": true + }, + "verticalAlignment": { + "type": "string" + }, + "imageFill": { + "type": "boolean" + }, + "focalPoint": { + "type": "object" + }, + "useFeaturedImage": { + "type": "boolean", + "default": false + } + }, + "usesContext": [ "postId", "postType" ], + "supports": { + "anchor": true, + "align": [ "wide", "full" ], + "html": false, + "__experimentalBorder": { + "color": true, + "radius": true, + "style": true, + "width": true, + "__experimentalDefaultControls": { + "color": true, + "radius": true, + "style": true, + "width": true + } + }, + "color": { + "gradients": true, + "heading": true, + "link": true, + "__experimentalDefaultControls": { + "background": true, + "text": true + } + }, + "spacing": { + "margin": true, + "padding": true + }, + "typography": { + "fontSize": true, + "lineHeight": true, + "__experimentalFontFamily": true, + "__experimentalFontWeight": true, + "__experimentalFontStyle": true, + "__experimentalTextTransform": true, + "__experimentalTextDecoration": true, + "__experimentalLetterSpacing": true, + "__experimentalDefaultControls": { + "fontSize": true + } + }, + "interactivity": { + "clientNavigation": true + }, + "allowedBlocks": true + }, + "editorStyle": "wp-block-media-text-editor", + "style": "wp-block-media-text" +} diff --git a/src/wp-includes/blocks/missing/block.json b/src/wp-includes/blocks/missing/block.json new file mode 100644 index 0000000000000..92c9735d1ba15 --- /dev/null +++ b/src/wp-includes/blocks/missing/block.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/missing", + "title": "Unsupported", + "category": "text", + "description": "Your site doesn’t include support for this block.", + "textdomain": "default", + "attributes": { + "originalName": { + "type": "string" + }, + "originalUndelimitedContent": { + "type": "string" + }, + "originalContent": { + "type": "string", + "source": "raw" + } + }, + "supports": { + "className": false, + "customClassName": false, + "inserter": false, + "html": false, + "lock": false, + "reusable": false, + "renaming": false, + "visibility": false, + "interactivity": { + "clientNavigation": true + }, + "customCSS": false + } +} diff --git a/src/wp-includes/blocks/more/block.json b/src/wp-includes/blocks/more/block.json new file mode 100644 index 0000000000000..b33beeab922a6 --- /dev/null +++ b/src/wp-includes/blocks/more/block.json @@ -0,0 +1,33 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/more", + "title": "More", + "category": "design", + "description": "Content before this block will be shown in the excerpt on your archives page.", + "keywords": [ "read more" ], + "textdomain": "default", + "attributes": { + "customText": { + "type": "string", + "default": "", + "role": "content" + }, + "noTeaser": { + "type": "boolean", + "default": false + } + }, + "supports": { + "customClassName": false, + "className": false, + "html": false, + "multiple": false, + "visibility": false, + "interactivity": { + "clientNavigation": true + }, + "customCSS": false + }, + "editorStyle": "wp-block-more-editor" +} diff --git a/src/wp-includes/blocks/navigation-link.php b/src/wp-includes/blocks/navigation-link.php new file mode 100644 index 0000000000000..0888d7b5acebd --- /dev/null +++ b/src/wp-includes/blocks/navigation-link.php @@ -0,0 +1,488 @@ + array(), + 'inline_styles' => '', + ); + + // Text color. + $named_text_color = null; + $custom_text_color = null; + + if ( $is_sub_menu && array_key_exists( 'customOverlayTextColor', $context ) ) { + $custom_text_color = $context['customOverlayTextColor']; + } elseif ( $is_sub_menu && array_key_exists( 'overlayTextColor', $context ) ) { + $named_text_color = $context['overlayTextColor']; + } elseif ( array_key_exists( 'customTextColor', $context ) ) { + $custom_text_color = $context['customTextColor']; + } elseif ( array_key_exists( 'textColor', $context ) ) { + $named_text_color = $context['textColor']; + } elseif ( isset( $context['style']['color']['text'] ) ) { + $custom_text_color = $context['style']['color']['text']; + } + + // If has text color. + if ( ! is_null( $named_text_color ) ) { + // Add the color class. + array_push( $colors['css_classes'], 'has-text-color', sprintf( 'has-%s-color', $named_text_color ) ); + } elseif ( ! is_null( $custom_text_color ) ) { + // Add the custom color inline style. + $colors['css_classes'][] = 'has-text-color'; + $colors['inline_styles'] .= sprintf( 'color: %s;', $custom_text_color ); + } + + // Background color. + $named_background_color = null; + $custom_background_color = null; + + if ( $is_sub_menu && array_key_exists( 'customOverlayBackgroundColor', $context ) ) { + $custom_background_color = $context['customOverlayBackgroundColor']; + } elseif ( $is_sub_menu && array_key_exists( 'overlayBackgroundColor', $context ) ) { + $named_background_color = $context['overlayBackgroundColor']; + } elseif ( array_key_exists( 'customBackgroundColor', $context ) ) { + $custom_background_color = $context['customBackgroundColor']; + } elseif ( array_key_exists( 'backgroundColor', $context ) ) { + $named_background_color = $context['backgroundColor']; + } elseif ( isset( $context['style']['color']['background'] ) ) { + $custom_background_color = $context['style']['color']['background']; + } + + // If has background color. + if ( ! is_null( $named_background_color ) ) { + // Add the background-color class. + array_push( $colors['css_classes'], 'has-background', sprintf( 'has-%s-background-color', $named_background_color ) ); + } elseif ( ! is_null( $custom_background_color ) ) { + // Add the custom background-color inline style. + $colors['css_classes'][] = 'has-background'; + $colors['inline_styles'] .= sprintf( 'background-color: %s;', $custom_background_color ); + } + + return $colors; +} + +/** + * Build an array with CSS classes and inline styles defining the font sizes + * which will be applied to the navigation markup in the front-end. + * + * @since 5.9.0 + * + * @param array $context Navigation block context. + * @return array Font size CSS classes and inline styles. + */ +function block_core_navigation_link_build_css_font_sizes( $context ) { + // CSS classes. + $font_sizes = array( + 'css_classes' => array(), + 'inline_styles' => '', + ); + + $has_named_font_size = array_key_exists( 'fontSize', $context ); + $has_custom_font_size = isset( $context['style']['typography']['fontSize'] ); + + if ( $has_named_font_size ) { + // Add the font size class. + $font_sizes['css_classes'][] = sprintf( 'has-%s-font-size', $context['fontSize'] ); + } elseif ( $has_custom_font_size ) { + // Add the custom font size inline style. + $font_sizes['inline_styles'] = sprintf( + 'font-size: %s;', + wp_get_typography_font_size_value( + array( + 'size' => $context['style']['typography']['fontSize'], + ) + ) + ); + } + + return $font_sizes; +} + +/** + * Decodes a url if it's encoded, returning the same url if not. + * + * @since 6.2.0 + * + * @param string $url The url to decode. + * + * @return string $url Returns the decoded url. + */ +function block_core_navigation_link_maybe_urldecode( $url ) { + $is_url_encoded = false; + $query = parse_url( $url, PHP_URL_QUERY ); + $query_params = wp_parse_args( $query ); + + foreach ( $query_params as $query_param ) { + $can_query_param_be_encoded = is_string( $query_param ) && ! empty( $query_param ); + if ( ! $can_query_param_be_encoded ) { + continue; + } + if ( rawurldecode( $query_param ) !== $query_param ) { + $is_url_encoded = true; + break; + } + } + + if ( $is_url_encoded ) { + return rawurldecode( $url ); + } + + return $url; +} + + +/** + * Renders the `core/navigation-link` block. + * + * @since 5.9.0 + * + * @param array $attributes The block attributes. + * @param string $content The saved content. + * @param WP_Block $block The parsed block. + * + * @return string Returns the post content with the legacy widget added. + */ +function render_block_core_navigation_link( $attributes, $content, $block ) { + // Check if this navigation item should render based on post status. + if ( defined( 'IS_GUTENBERG_PLUGIN' ) && IS_GUTENBERG_PLUGIN ) { + if ( ! gutenberg_block_core_shared_navigation_item_should_render( $attributes, $block ) ) { + return ''; + } + } + + // Don't render the block's subtree if it has no label. + if ( empty( $attributes['label'] ) ) { + return ''; + } + + $font_sizes = block_core_navigation_link_build_css_font_sizes( $block->context ); + $classes = array_merge( + $font_sizes['css_classes'] + ); + $style_attribute = $font_sizes['inline_styles']; + + // Render inner blocks first to check if any menu items will actually display. + $inner_blocks_html = ''; + foreach ( $block->inner_blocks as $inner_block ) { + $inner_blocks_html .= $inner_block->render(); + } + $has_submenu = ! empty( trim( $inner_blocks_html ) ); + + $css_classes = trim( implode( ' ', $classes ) ); + $kind = empty( $attributes['kind'] ) ? 'post_type' : str_replace( '-', '_', $attributes['kind'] ); + $is_active = ! empty( $attributes['id'] ) && get_queried_object_id() === (int) $attributes['id'] && ! empty( get_queried_object()->$kind ); + + if ( is_post_type_archive() && ! empty( $attributes['url'] ) ) { + $queried_archive_link = get_post_type_archive_link( get_queried_object()->name ); + if ( $attributes['url'] === $queried_archive_link ) { + $is_active = true; + } + } + + $wrapper_attributes = get_block_wrapper_attributes( + array( + 'class' => $css_classes . ' wp-block-navigation-item' . ( $has_submenu ? ' has-child' : '' ) . + ( $is_active ? ' current-menu-item' : '' ), + 'style' => $style_attribute, + ) + ); + $html = '
    1. ' . + ''; + + if ( isset( $attributes['label'] ) ) { + $html .= wp_kses_post( $attributes['label'] ); + } + + $html .= ''; + + // Add description if available. + if ( ! empty( $attributes['description'] ) ) { + $html .= ''; + $html .= wp_kses_post( $attributes['description'] ); + $html .= ''; + } + + $html .= ''; + // End anchor tag content. + + if ( isset( $block->context['showSubmenuIcon'] ) && $block->context['showSubmenuIcon'] && $has_submenu ) { + // The submenu icon can be hidden by a CSS rule on the Navigation Block. + $html .= '' . block_core_navigation_render_submenu_icon() . ''; + } + + if ( $has_submenu ) { + $html .= sprintf( + '
        %s
      ', + $inner_blocks_html + ); + } + + $html .= '
    2. '; + + return $html; +} + +/** + * Returns a navigation link variation + * + * @since 5.9.0 + * + * @param WP_Taxonomy|WP_Post_Type $entity post type or taxonomy entity. + * @param string $kind string of value 'taxonomy' or 'post-type'. + * + * @return array + */ +function build_variation_for_navigation_link( $entity, $kind ) { + $title = ''; + $description = ''; + + // Get default labels based on entity type + $default_labels = null; + if ( $entity instanceof WP_Post_Type ) { + $default_labels = WP_Post_Type::get_default_labels(); + } elseif ( $entity instanceof WP_Taxonomy ) { + $default_labels = WP_Taxonomy::get_default_labels(); + } + + // Get title and check if it's default + $is_default_title = false; + if ( property_exists( $entity->labels, 'item_link' ) ) { + $title = $entity->labels->item_link; + if ( isset( $default_labels['item_link'] ) ) { + $is_default_title = in_array( $title, $default_labels['item_link'], true ); + } + } + + // Get description and check if it's default + $is_default_description = false; + if ( property_exists( $entity->labels, 'item_link_description' ) ) { + $description = $entity->labels->item_link_description; + if ( isset( $default_labels['item_link_description'] ) ) { + $is_default_description = in_array( $description, $default_labels['item_link_description'], true ); + } + } + + // Calculate singular name once (used for both title and description) + $singular = $entity->labels->singular_name ?? ucfirst( $entity->name ); + + // Set default title if needed + if ( $is_default_title || '' === $title ) { + /* translators: %s: Singular label of the entity. */ + $title = sprintf( __( '%s link' ), $singular ); + } + + // Default description if needed. + // Use a single space character instead of an empty string to prevent fallback to the + // block.json default description ("Add a page, link, or another item to your navigation."). + // An empty string would be treated as missing and trigger the fallback, while a single + // space appears blank in the UI but prevents the fallback behavior. + // We avoid generating descriptions like "A link to a %s" to prevent grammatical errors + // (e.g., "A link to a event" should be "A link to an event"). + if ( $is_default_description || '' === $description ) { + $description = ' '; + } + + $variation = array( + 'name' => $entity->name, + 'title' => $title, + 'description' => $description, + 'attributes' => array( + 'type' => $entity->name, + 'kind' => $kind, + ), + ); + + // Tweak some value for the variations. + $variation_overrides = array( + 'post_tag' => array( + 'name' => 'tag', + 'attributes' => array( + 'type' => 'tag', + 'kind' => $kind, + ), + ), + 'post_format' => array( + // The item_link and item_link_description for post formats is the + // same as for tags, so need to be overridden. + 'title' => __( 'Post Format Link' ), + 'description' => __( 'A link to a post format' ), + 'attributes' => array( + 'type' => 'post_format', + 'kind' => $kind, + ), + ), + ); + + if ( array_key_exists( $entity->name, $variation_overrides ) ) { + $variation = array_merge( + $variation, + $variation_overrides[ $entity->name ] + ); + } + + return $variation; +} + +/** + * Filters the registered variations for a block type. + * Returns the dynamically built variations for all post-types and taxonomies. + * + * @since 6.5.0 + * + * @param array $variations Array of registered variations for a block type. + * @param WP_Block_Type $block_type The full block type object. + * @return array Numerically indexed array of block variations. + */ +function block_core_navigation_link_filter_variations( $variations, $block_type ) { + if ( 'core/navigation-link' !== $block_type->name ) { + return $variations; + } + + $generated_variations = block_core_navigation_link_build_variations(); + + /* + * IMPORTANT: Order matters for deduplication. + * + * The variations returned from this filter are bootstrapped to JavaScript and + * processed by the block variations reducer. The reducer uses `getUniqueItemsByName()` + * (packages/blocks/src/store/reducer.js:51-57) which keeps the FIRST variation with + * a given 'name' and discards later duplicates when processing the array in order. + * + * By placing generated variations first in `array_merge()`, the improved + * labels (e.g., "Product link" instead of generic "Post Link") are processed first + * and preserved. The generic incoming variations are then discarded as duplicates. + * + * Why `array_merge()` instead of manual deduplication? + * - Both arrays use numeric indices (0, 1, 2...), so `array_merge()` concatenates + * and re-indexes them sequentially, preserving order + * - The reducer handles deduplication, so it is not needed here + * - This keeps the PHP code simple and relies on the established JavaScript behavior + * + * See: https://github.com/WordPress/gutenberg/pull/72517 + */ + return array_merge( $generated_variations, $variations ); +} + +/** + * Returns an array of variations for the navigation link block. + * + * @since 6.5.0 + * + * @return array + */ +function block_core_navigation_link_build_variations() { + $post_types = get_post_types( array( 'show_in_nav_menus' => true ), 'objects' ); + $taxonomies = get_taxonomies( array( 'show_in_nav_menus' => true ), 'objects' ); + + /* + * Use two separate arrays as a way to order the variations in the UI. + * Known variations (like Post Link and Page Link) are added to the + * `built_ins` array. Variations for custom post types and taxonomies are + * added to the `variations` array and will always appear after `built-ins. + */ + $built_ins = array(); + $variations = array(); + + if ( $post_types ) { + foreach ( $post_types as $post_type ) { + $variation = build_variation_for_navigation_link( $post_type, 'post-type' ); + if ( $post_type->_builtin ) { + $built_ins[] = $variation; + } else { + $variations[] = $variation; + } + } + } + if ( $taxonomies ) { + foreach ( $taxonomies as $taxonomy ) { + $variation = build_variation_for_navigation_link( $taxonomy, 'taxonomy' ); + if ( $taxonomy->_builtin ) { + $built_ins[] = $variation; + } else { + $variations[] = $variation; + } + } + } + + $all_variations = array_merge( $built_ins, $variations ); + + return $all_variations; +} + +/** + * Registers the navigation link block. + * + * @since 5.9.0 + * + * @uses render_block_core_navigation_link() + * @throws WP_Error An WP_Error exception parsing the block definition. + */ +function register_block_core_navigation_link() { + register_block_type_from_metadata( + __DIR__ . '/navigation-link', + array( + 'render_callback' => 'render_block_core_navigation_link', + ) + ); +} +add_action( 'init', 'register_block_core_navigation_link' ); +/** + * Creates all variations for post types / taxonomies dynamically (= each time when variations are requested). + * Do not use variation_callback, to also account for unregistering post types/taxonomies later on. + */ +add_action( 'get_block_type_variations', 'block_core_navigation_link_filter_variations', 10, 2 ); diff --git a/src/wp-includes/blocks/navigation-link/block.json b/src/wp-includes/blocks/navigation-link/block.json new file mode 100644 index 0000000000000..997275574f1ac --- /dev/null +++ b/src/wp-includes/blocks/navigation-link/block.json @@ -0,0 +1,90 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/navigation-link", + "title": "Custom Link", + "category": "design", + "parent": [ "core/navigation" ], + "allowedBlocks": [ + "core/navigation-link", + "core/navigation-submenu", + "core/page-list" + ], + "description": "Add a page, link, or another item to your navigation.", + "textdomain": "default", + "attributes": { + "label": { + "type": "string", + "role": "content" + }, + "type": { + "type": "string" + }, + "description": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "id": { + "type": "number" + }, + "opensInNewTab": { + "type": "boolean", + "default": false + }, + "url": { + "type": "string", + "role": "content" + }, + "title": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "isTopLevelLink": { + "type": "boolean" + } + }, + "usesContext": [ + "textColor", + "customTextColor", + "backgroundColor", + "customBackgroundColor", + "overlayTextColor", + "customOverlayTextColor", + "overlayBackgroundColor", + "customOverlayBackgroundColor", + "fontSize", + "customFontSize", + "showSubmenuIcon", + "maxNestingLevel", + "style" + ], + "supports": { + "anchor": true, + "reusable": false, + "html": false, + "__experimentalSlashInserter": true, + "typography": { + "fontSize": true, + "lineHeight": true, + "__experimentalFontFamily": true, + "__experimentalFontWeight": true, + "__experimentalFontStyle": true, + "__experimentalTextTransform": true, + "__experimentalTextDecoration": true, + "__experimentalLetterSpacing": true, + "__experimentalDefaultControls": { + "fontSize": true + } + }, + "renaming": false, + "interactivity": { + "clientNavigation": true + } + }, + "editorStyle": "wp-block-navigation-link-editor", + "style": "wp-block-navigation-link" +} diff --git a/src/wp-includes/blocks/navigation-link/shared/item-should-render.php b/src/wp-includes/blocks/navigation-link/shared/item-should-render.php new file mode 100644 index 0000000000000..c6c55b04e47eb --- /dev/null +++ b/src/wp-includes/blocks/navigation-link/shared/item-should-render.php @@ -0,0 +1,46 @@ +post_status, $allowed_post_status, true ) ) { + return false; + } + } + + return true; +} diff --git a/src/wp-includes/blocks/navigation-link/shared/render-submenu-icon.php b/src/wp-includes/blocks/navigation-link/shared/render-submenu-icon.php new file mode 100644 index 0000000000000..62d09e28abe43 --- /dev/null +++ b/src/wp-includes/blocks/navigation-link/shared/render-submenu-icon.php @@ -0,0 +1,17 @@ +'; +} diff --git a/src/wp-includes/blocks/navigation-overlay-close.php b/src/wp-includes/blocks/navigation-overlay-close.php new file mode 100644 index 0000000000000..1945cc4069eef --- /dev/null +++ b/src/wp-includes/blocks/navigation-overlay-close.php @@ -0,0 +1,56 @@ +'; + } + + if ( $show_text ) { + $button_text .= '' . wp_kses_post( $text ) . ''; + } + + $wrapper_attributes = get_block_wrapper_attributes(); + $html_content = sprintf( + '', + $wrapper_attributes, + ! $show_text ? 'aria-label="' . __( 'Close' ) . '"' : '', + $button_text + ); + + return $html_content; +} + +/** + * Registers the navigation overlay close block. + * + * @since 7.0.0 + */ +function register_block_core_navigation_overlay_close() { + register_block_type_from_metadata( + __DIR__ . '/navigation-overlay-close', + array( + 'render_callback' => 'render_block_core_navigation_overlay_close', + ) + ); +} +add_action( 'init', 'register_block_core_navigation_overlay_close' ); diff --git a/src/wp-includes/blocks/navigation-overlay-close/block.json b/src/wp-includes/blocks/navigation-overlay-close/block.json new file mode 100644 index 0000000000000..39bf2ce75b99a --- /dev/null +++ b/src/wp-includes/blocks/navigation-overlay-close/block.json @@ -0,0 +1,49 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/navigation-overlay-close", + "title": "Navigation Overlay Close", + "category": "design", + "description": "A customizable button to close overlays.", + "keywords": [ "close", "overlay", "navigation", "menu" ], + "textdomain": "default", + "attributes": { + "displayMode": { + "type": "string", + "enum": [ "icon", "text", "both" ], + "default": "icon" + }, + "text": { + "type": "string" + } + }, + "supports": { + "color": { + "gradients": false, + "__experimentalDefaultControls": { + "background": true, + "text": true + } + }, + "spacing": { + "padding": true, + "__experimentalDefaultControls": { + "padding": true + } + }, + "typography": { + "fontSize": true, + "lineHeight": true, + "__experimentalFontFamily": true, + "__experimentalFontWeight": true, + "__experimentalFontStyle": true, + "__experimentalTextTransform": true, + "__experimentalTextDecoration": true, + "__experimentalLetterSpacing": true, + "__experimentalDefaultControls": { + "fontSize": true + } + } + }, + "style": "wp-block-navigation-overlay-close" +} diff --git a/src/wp-includes/blocks/navigation-submenu.php b/src/wp-includes/blocks/navigation-submenu.php new file mode 100644 index 0000000000000..9138b5a5e08da --- /dev/null +++ b/src/wp-includes/blocks/navigation-submenu.php @@ -0,0 +1,342 @@ + 'click', false -> 'hover'. + return ! empty( $deprecated_open_submenus_on_click ) ? 'click' : 'hover'; + } + + $submenu_visibility = $context['submenuVisibility'] ?? null; + + // Use submenuVisibility for migrated/new blocks. + return $submenu_visibility ?? 'hover'; +} + +// Path differs between source and build: '../navigation-link/shared/' in source, './navigation-link/shared/' in build. +if ( file_exists( __DIR__ . '/../navigation-link/shared/item-should-render.php' ) ) { + require_once __DIR__ . '/../navigation-link/shared/item-should-render.php'; + require_once __DIR__ . '/../navigation-link/shared/render-submenu-icon.php'; +} else { + require_once __DIR__ . '/navigation-link/shared/item-should-render.php'; + require_once __DIR__ . '/navigation-link/shared/render-submenu-icon.php'; +} + +/** + * Build an array with CSS classes and inline styles defining the font sizes + * which will be applied to the navigation markup in the front-end. + * + * @since 5.9.0 + * + * @param array $context Navigation block context. + * @return array Font size CSS classes and inline styles. + */ +function block_core_navigation_submenu_build_css_font_sizes( $context ) { + // CSS classes. + $font_sizes = array( + 'css_classes' => array(), + 'inline_styles' => '', + ); + + $has_named_font_size = array_key_exists( 'fontSize', $context ); + $has_custom_font_size = isset( $context['style']['typography']['fontSize'] ); + + if ( $has_named_font_size ) { + // Add the font size class. + $font_sizes['css_classes'][] = sprintf( 'has-%s-font-size', $context['fontSize'] ); + } elseif ( $has_custom_font_size ) { + // Add the custom font size inline style. + $font_sizes['inline_styles'] = sprintf( + 'font-size: %s;', + wp_get_typography_font_size_value( + array( + 'size' => $context['style']['typography']['fontSize'], + ) + ) + ); + } + + return $font_sizes; +} + +/** + * Renders the `core/navigation-submenu` block. + * + * @since 5.9.0 + * + * @param array $attributes The block attributes. + * @param string $content The saved content. + * @param WP_Block $block The parsed block. + * + * @return string Returns the post content with the legacy widget added. + */ +function render_block_core_navigation_submenu( $attributes, $content, $block ) { + // Check if this navigation item should render based on post status. + if ( defined( 'IS_GUTENBERG_PLUGIN' ) && IS_GUTENBERG_PLUGIN ) { + if ( ! gutenberg_block_core_shared_navigation_item_should_render( $attributes, $block ) ) { + return ''; + } + } + + // Don't render the block's subtree if it has no label. + if ( empty( $attributes['label'] ) ) { + return ''; + } + + $font_sizes = block_core_navigation_submenu_build_css_font_sizes( $block->context ); + $style_attribute = $font_sizes['inline_styles']; + + // Render inner blocks first to check if any menu items will actually display. + $inner_blocks_html = ''; + foreach ( $block->inner_blocks as $inner_block ) { + $inner_blocks_html .= $inner_block->render(); + } + $has_submenu = ! empty( trim( $inner_blocks_html ) ); + + $kind = empty( $attributes['kind'] ) ? 'post_type' : str_replace( '-', '_', $attributes['kind'] ); + $is_active = ! empty( $attributes['id'] ) && get_queried_object_id() === (int) $attributes['id'] && ! empty( get_queried_object()->$kind ); + + if ( is_post_type_archive() && ! empty( $attributes['url'] ) ) { + $queried_archive_link = get_post_type_archive_link( get_queried_object()->name ); + if ( $attributes['url'] === $queried_archive_link ) { + $is_active = true; + } + } + + $show_submenu_indicators = isset( $block->context['showSubmenuIcon'] ) && $block->context['showSubmenuIcon']; + $computed_visibility = block_core_navigation_submenu_get_submenu_visibility( $block->context ); + $open_on_click = 'click' === $computed_visibility; + $open_on_hover = 'hover' === $computed_visibility; + $open_on_hover_and_click = $open_on_hover && $show_submenu_indicators; + + $classes = array( + 'wp-block-navigation-item', + ); + $classes = array_merge( + $classes, + $font_sizes['css_classes'] + ); + if ( $has_submenu ) { + $classes[] = 'has-child'; + } + if ( $open_on_click ) { + $classes[] = 'open-on-click'; + } + if ( $open_on_hover_and_click ) { + $classes[] = 'open-on-hover-click'; + } + if ( 'always' === $computed_visibility ) { + $classes[] = 'open-always'; + } + if ( $is_active ) { + $classes[] = 'current-menu-item'; + } + + $wrapper_attributes = get_block_wrapper_attributes( + array( + 'class' => implode( ' ', $classes ), + 'style' => $style_attribute, + ) + ); + + $label = ''; + + if ( isset( $attributes['label'] ) ) { + $label .= wp_kses_post( $attributes['label'] ); + } + + $aria_label = sprintf( + /* translators: Accessibility text. %s: Parent page title. */ + __( '%s submenu' ), + wp_strip_all_tags( $label ) + ); + + $html = '
    3. '; + + // If Submenus open on hover or are always open, we render an anchor tag with attributes. + // If submenu icons are set to show, we also render a submenu button, so the submenu can be opened on click. + if ( ! $open_on_click ) { + $item_url = $attributes['url'] ?? ''; + // Start appending HTML attributes to anchor tag. + $html .= '
    4. ' . wp_kses_post( $title ) . ''; + } + + if ( isset( $page['children'] ) ) { + if ( $is_navigation_child && $show_submenu_icons && ! $open_on_click ) { + $markup .= ''; + } + $markup .= '
        '; + $markup .= block_core_page_list_render_nested_page_list( $submenu_visibility, $show_submenu_icons, $is_navigation_child, $page['children'], $is_nested, $active_page_ancestor_ids, $colors, $depth + 1 ); + $markup .= '
      '; + } + $markup .= '
    5. '; + } + return $markup; +} + +/** + * Outputs nested array of pages + * + * @since 5.8.0 + * + * @param array $current_level The level being iterated through. + * @param array $children The children grouped by parent post ID. + * + * @return array The nested array of pages. + */ +function block_core_page_list_nest_pages( $current_level, $children ) { + if ( empty( $current_level ) ) { + return; + } + foreach ( (array) $current_level as $key => $current ) { + if ( isset( $children[ $key ] ) ) { + $current_level[ $key ]['children'] = block_core_page_list_nest_pages( $children[ $key ], $children ); + } + } + return $current_level; +} + +/** + * Renders the `core/page-list` block on server. + * + * @since 5.8.0 + * + * @param array $attributes The block attributes. + * @param string $content The saved content. + * @param WP_Block $block The parsed block. + * + * @return string Returns the page list markup. + */ +function render_block_core_page_list( $attributes, $content, $block ) { + static $block_id = 0; + ++$block_id; + + $parent_page_id = $attributes['parentPageID']; + $is_nested = $attributes['isNested']; + + $all_pages = get_pages( + array( + 'sort_column' => 'menu_order,post_title', + 'order' => 'asc', + ) + ); + + // If there are no pages, there is nothing to show. + if ( empty( $all_pages ) ) { + return; + } + + $top_level_pages = array(); + + $pages_with_children = array(); + + $active_page_ancestor_ids = array(); + + foreach ( (array) $all_pages as $page ) { + $is_active = ! empty( $page->ID ) && ( get_queried_object_id() === $page->ID ); + + if ( $is_active ) { + $active_page_ancestor_ids = get_post_ancestors( $page->ID ); + } + + if ( $page->post_parent ) { + $pages_with_children[ $page->post_parent ][ $page->ID ] = array( + 'page_id' => $page->ID, + 'title' => $page->post_title, + 'link' => get_permalink( $page ), + 'is_active' => $is_active, + ); + } else { + $top_level_pages[ $page->ID ] = array( + 'page_id' => $page->ID, + 'title' => $page->post_title, + 'link' => get_permalink( $page ), + 'is_active' => $is_active, + ); + + } + } + + $colors = block_core_page_list_build_css_colors( $attributes, $block->context ); + $font_sizes = block_core_page_list_build_css_font_sizes( $block->context ); + $classes = array_merge( + $colors['css_classes'], + $font_sizes['css_classes'] + ); + $style_attribute = ( $colors['inline_styles'] . $font_sizes['inline_styles'] ); + $css_classes = trim( implode( ' ', $classes ) ); + + $nested_pages = block_core_page_list_nest_pages( $top_level_pages, $pages_with_children ); + + if ( 0 !== $parent_page_id ) { + // If the parent page has no child pages, there is nothing to show. + if ( ! array_key_exists( $parent_page_id, $pages_with_children ) ) { + return; + } + + $nested_pages = block_core_page_list_nest_pages( + $pages_with_children[ $parent_page_id ], + $pages_with_children + ); + } + + $is_navigation_child = array_key_exists( 'showSubmenuIcon', $block->context ); + + // Get submenu visibility with backward compatibility for openSubmenusOnClick. + $submenu_visibility = $is_navigation_child ? block_core_page_list_get_submenu_visibility( $block->context ) : 'hover'; + + $show_submenu_icons = array_key_exists( 'showSubmenuIcon', $block->context ) ? $block->context['showSubmenuIcon'] : false; + + $wrapper_markup = $is_nested ? '%2$s' : '
        %2$s
      '; + + $items_markup = block_core_page_list_render_nested_page_list( $submenu_visibility, $show_submenu_icons, $is_navigation_child, $nested_pages, $is_nested, $active_page_ancestor_ids, $colors ); + + $wrapper_attributes = get_block_wrapper_attributes( + array( + 'class' => $css_classes, + 'style' => $style_attribute, + ) + ); + + return sprintf( + $wrapper_markup, + $wrapper_attributes, + $items_markup + ); +} + +/** + * Registers the `core/pages` block on server. + * + * @since 5.8.0 + */ +function register_block_core_page_list() { + register_block_type_from_metadata( + __DIR__ . '/page-list', + array( + 'render_callback' => 'render_block_core_page_list', + ) + ); +} +add_action( 'init', 'register_block_core_page_list' ); diff --git a/src/wp-includes/blocks/page-list/block.json b/src/wp-includes/blocks/page-list/block.json new file mode 100644 index 0000000000000..2b97f248c5768 --- /dev/null +++ b/src/wp-includes/blocks/page-list/block.json @@ -0,0 +1,86 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/page-list", + "title": "Page List", + "category": "widgets", + "allowedBlocks": [ "core/page-list-item" ], + "description": "Display a list of all pages.", + "keywords": [ "menu", "navigation" ], + "textdomain": "default", + "attributes": { + "parentPageID": { + "type": "integer", + "default": 0 + }, + "isNested": { + "type": "boolean", + "default": false + } + }, + "usesContext": [ + "textColor", + "customTextColor", + "backgroundColor", + "customBackgroundColor", + "overlayTextColor", + "customOverlayTextColor", + "overlayBackgroundColor", + "customOverlayBackgroundColor", + "fontSize", + "customFontSize", + "showSubmenuIcon", + "style", + "openSubmenusOnClick", + "submenuVisibility" + ], + "supports": { + "anchor": true, + "reusable": false, + "html": false, + "typography": { + "fontSize": true, + "lineHeight": true, + "__experimentalFontFamily": true, + "__experimentalFontWeight": true, + "__experimentalFontStyle": true, + "__experimentalTextTransform": true, + "__experimentalTextDecoration": true, + "__experimentalLetterSpacing": true, + "__experimentalDefaultControls": { + "fontSize": true + } + }, + "interactivity": { + "clientNavigation": true + }, + "color": { + "text": true, + "background": true, + "link": true, + "gradients": true, + "__experimentalDefaultControls": { + "background": true, + "text": true, + "link": true + } + }, + "__experimentalBorder": { + "radius": true, + "color": true, + "width": true, + "style": true + }, + "spacing": { + "padding": true, + "margin": true, + "__experimentalDefaultControls": { + "padding": false, + "margin": false + } + }, + "contentRole": true + }, + "editorStyle": "wp-block-page-list-editor", + "style": "wp-block-page-list" +} diff --git a/src/wp-includes/blocks/paragraph.php b/src/wp-includes/blocks/paragraph.php new file mode 100644 index 0000000000000..f72ca085a2048 --- /dev/null +++ b/src/wp-includes/blocks/paragraph.php @@ -0,0 +1,48 @@ +Hello World

      + * + * Would be transformed to: + *

      Hello World

      + * + * @since 7.0.0 + * + * @param string $block_content The block content. + * + * @return string Filtered block content. + */ +function block_core_paragraph_add_class( $block_content ) { + if ( ! $block_content ) { + return $block_content; + } + + $processor = new WP_HTML_Tag_Processor( $block_content ); + + if ( $processor->next_tag( 'p' ) ) { + $processor->add_class( 'wp-block-paragraph' ); + } + + return $processor->get_updated_html(); +} + +add_filter( 'render_block_core/paragraph', 'block_core_paragraph_add_class' ); + +/** + * Registers the `core/paragraph` block on server. + * + * @since 7.0.0 + */ +function register_block_core_paragraph() { + register_block_type_from_metadata( __DIR__ . '/paragraph' ); +} +add_action( 'init', 'register_block_core_paragraph' ); diff --git a/src/wp-includes/blocks/paragraph/block.json b/src/wp-includes/blocks/paragraph/block.json new file mode 100644 index 0000000000000..556c2870557f7 --- /dev/null +++ b/src/wp-includes/blocks/paragraph/block.json @@ -0,0 +1,88 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/paragraph", + "title": "Paragraph", + "category": "text", + "description": "Start with the basic building block of all narrative.", + "keywords": [ "text" ], + "textdomain": "default", + "attributes": { + "content": { + "type": "rich-text", + "source": "rich-text", + "selector": "p", + "role": "content" + }, + "dropCap": { + "type": "boolean", + "default": false + }, + "placeholder": { + "type": "string" + }, + "direction": { + "type": "string", + "enum": [ "ltr", "rtl" ] + } + }, + "supports": { + "align": [ "wide", "full" ], + "splitting": true, + "anchor": true, + "className": false, + "__experimentalBorder": { + "color": true, + "radius": true, + "style": true, + "width": true + }, + "color": { + "gradients": true, + "link": true, + "__experimentalDefaultControls": { + "background": true, + "text": true + } + }, + "spacing": { + "margin": true, + "padding": true, + "__experimentalDefaultControls": { + "margin": false, + "padding": false + } + }, + "typography": { + "fontSize": true, + "lineHeight": true, + "textAlign": true, + "textColumns": true, + "textIndent": true, + "__experimentalFontFamily": true, + "__experimentalTextDecoration": true, + "__experimentalFontStyle": true, + "__experimentalFontWeight": true, + "__experimentalLetterSpacing": true, + "__experimentalTextTransform": true, + "__experimentalWritingMode": true, + "fitText": true, + "__experimentalDefaultControls": { + "fontSize": true + } + }, + "__experimentalSelector": "p", + "__unstablePasteTextInline": true, + "interactivity": { + "clientNavigation": true + } + }, + "selectors": { + "root": "p", + "typography": { + "textIndent": ".wp-block-paragraph + .wp-block-paragraph" + } + }, + "editorStyle": "wp-block-paragraph-editor", + "style": "wp-block-paragraph" +} diff --git a/src/wp-includes/blocks/pattern.php b/src/wp-includes/blocks/pattern.php new file mode 100644 index 0000000000000..870313eb5e86d --- /dev/null +++ b/src/wp-includes/blocks/pattern.php @@ -0,0 +1,72 @@ + 'render_block_core_pattern', + ) + ); +} + +/** + * Renders the `core/pattern` block on the server. + * + * @since 6.3.0 Backwards compatibility: blocks with no `syncStatus` attribute do not receive block wrapper. + * + * @global WP_Embed $wp_embed Used to process embedded content within patterns + * + * @param array $attributes Block attributes. + * + * @return string Returns the output of the pattern. + */ +function render_block_core_pattern( $attributes ) { + static $seen_refs = array(); + + if ( empty( $attributes['slug'] ) ) { + return ''; + } + + $slug = $attributes['slug']; + $registry = WP_Block_Patterns_Registry::get_instance(); + + if ( ! $registry->is_registered( $slug ) ) { + return ''; + } + + if ( isset( $seen_refs[ $attributes['slug'] ] ) ) { + // WP_DEBUG_DISPLAY must only be honored when WP_DEBUG. This precedent + // is set in `wp_debug_mode()`. + $is_debug = WP_DEBUG && WP_DEBUG_DISPLAY; + + return $is_debug ? + // translators: Visible only in the front end, this warning takes the place of a faulty block. %s represents a pattern's slug. + sprintf( __( '[block rendering halted for pattern "%s"]' ), $slug ) : + ''; + } + + $pattern = $registry->get_registered( $slug ); + $content = $pattern['content']; + + $seen_refs[ $attributes['slug'] ] = true; + + $content = do_blocks( $content ); + + global $wp_embed; + $content = $wp_embed->autoembed( $content ); + + unset( $seen_refs[ $attributes['slug'] ] ); + return $content; +} + +add_action( 'init', 'register_block_core_pattern' ); diff --git a/src/wp-includes/blocks/pattern/block.json b/src/wp-includes/blocks/pattern/block.json new file mode 100644 index 0000000000000..d95db89e32f5a --- /dev/null +++ b/src/wp-includes/blocks/pattern/block.json @@ -0,0 +1,23 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/pattern", + "title": "Pattern Placeholder", + "category": "theme", + "description": "Show a block pattern.", + "supports": { + "html": false, + "inserter": false, + "renaming": false, + "visibility": false, + "interactivity": { + "clientNavigation": true + } + }, + "textdomain": "default", + "attributes": { + "slug": { + "type": "string" + } + } +} diff --git a/src/wp-includes/blocks/post-author-biography.php b/src/wp-includes/blocks/post-author-biography.php new file mode 100644 index 0000000000000..bd983f79e7609 --- /dev/null +++ b/src/wp-includes/blocks/post-author-biography.php @@ -0,0 +1,53 @@ +context['postId'] ) ) { + $author_id = get_post_field( 'post_author', $block->context['postId'] ); + } else { + $author_id = get_query_var( 'author' ); + } + + if ( empty( $author_id ) ) { + return ''; + } + + $author_biography = get_the_author_meta( 'description', $author_id ); + if ( empty( $author_biography ) ) { + return ''; + } + + $align_class_name = empty( $attributes['textAlign'] ) ? '' : "has-text-align-{$attributes['textAlign']}"; + $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $align_class_name ) ); + + return sprintf( '
      ', $wrapper_attributes ) . $author_biography . '
      '; +} + +/** + * Registers the `core/post-author-biography` block on the server. + * + * @since 6.0.0 + */ +function register_block_core_post_author_biography() { + register_block_type_from_metadata( + __DIR__ . '/post-author-biography', + array( + 'render_callback' => 'render_block_core_post_author_biography', + ) + ); +} +add_action( 'init', 'register_block_core_post_author_biography' ); diff --git a/src/wp-includes/blocks/post-author-biography/block.json b/src/wp-includes/blocks/post-author-biography/block.json new file mode 100644 index 0000000000000..1bf488f50cdc4 --- /dev/null +++ b/src/wp-includes/blocks/post-author-biography/block.json @@ -0,0 +1,58 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/post-author-biography", + "title": "Author Biography", + "category": "theme", + "description": "The author biography.", + "textdomain": "default", + "usesContext": [ "postType", "postId" ], + "example": { + "viewportWidth": 350 + }, + "supports": { + "anchor": true, + "spacing": { + "margin": true, + "padding": true + }, + "color": { + "gradients": true, + "link": true, + "__experimentalDefaultControls": { + "background": true, + "text": true + } + }, + "typography": { + "fontSize": true, + "lineHeight": true, + "textAlign": true, + "__experimentalFontFamily": true, + "__experimentalFontWeight": true, + "__experimentalFontStyle": true, + "__experimentalTextTransform": true, + "__experimentalTextDecoration": true, + "__experimentalLetterSpacing": true, + "__experimentalDefaultControls": { + "fontSize": true + } + }, + "interactivity": { + "clientNavigation": true + }, + "__experimentalBorder": { + "radius": true, + "color": true, + "width": true, + "style": true, + "__experimentalDefaultControls": { + "radius": true, + "color": true, + "width": true, + "style": true + } + } + }, + "style": "wp-block-post-author-biography" +} diff --git a/src/wp-includes/blocks/post-author-name.php b/src/wp-includes/blocks/post-author-name.php new file mode 100644 index 0000000000000..ac514401f5cc2 --- /dev/null +++ b/src/wp-includes/blocks/post-author-name.php @@ -0,0 +1,63 @@ +context['postId'] ) ) { + $author_id = get_post_field( 'post_author', $block->context['postId'] ); + } else { + $author_id = get_query_var( 'author' ); + } + + if ( empty( $author_id ) ) { + return ''; + } + + if ( isset( $block->context['postType'] ) && ! post_type_supports( $block->context['postType'], 'author' ) ) { + return ''; + } + + $author_name = get_the_author_meta( 'display_name', $author_id ); + if ( isset( $attributes['isLink'] ) && $attributes['isLink'] ) { + $author_name = sprintf( '', get_author_posts_url( $author_id ), esc_attr( $attributes['linkTarget'] ), $author_name ); + } + + $classes = array(); + if ( isset( $attributes['textAlign'] ) ) { + $classes[] = 'has-text-align-' . $attributes['textAlign']; + } + if ( isset( $attributes['style']['elements']['link']['color']['text'] ) ) { + $classes[] = 'has-link-color'; + } + $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => implode( ' ', $classes ) ) ); + + return sprintf( '
      %2$s
      ', $wrapper_attributes, $author_name ); +} + +/** + * Registers the `core/post-author-name` block on the server. + * + * @since 6.2.0 + */ +function register_block_core_post_author_name() { + register_block_type_from_metadata( + __DIR__ . '/post-author-name', + array( + 'render_callback' => 'render_block_core_post_author_name', + ) + ); +} +add_action( 'init', 'register_block_core_post_author_name' ); diff --git a/src/wp-includes/blocks/post-author-name/block.json b/src/wp-includes/blocks/post-author-name/block.json new file mode 100644 index 0000000000000..e68878d905b82 --- /dev/null +++ b/src/wp-includes/blocks/post-author-name/block.json @@ -0,0 +1,72 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/post-author-name", + "title": "Author Name", + "category": "theme", + "description": "The author name.", + "textdomain": "default", + "attributes": { + "isLink": { + "type": "boolean", + "default": false, + "role": "content" + }, + "linkTarget": { + "type": "string", + "default": "_self", + "role": "content" + } + }, + "usesContext": [ "postType", "postId" ], + "example": { + "viewportWidth": 350 + }, + "supports": { + "anchor": true, + "html": false, + "spacing": { + "margin": true, + "padding": true + }, + "color": { + "gradients": true, + "link": true, + "__experimentalDefaultControls": { + "background": true, + "text": true, + "link": true + } + }, + "typography": { + "fontSize": true, + "lineHeight": true, + "textAlign": true, + "__experimentalFontFamily": true, + "__experimentalFontWeight": true, + "__experimentalFontStyle": true, + "__experimentalTextTransform": true, + "__experimentalTextDecoration": true, + "__experimentalLetterSpacing": true, + "__experimentalDefaultControls": { + "fontSize": true + } + }, + "interactivity": { + "clientNavigation": true + }, + "__experimentalBorder": { + "radius": true, + "color": true, + "width": true, + "style": true, + "__experimentalDefaultControls": { + "radius": true, + "color": true, + "width": true, + "style": true + } + } + }, + "style": "wp-block-post-author-name" +} diff --git a/src/wp-includes/blocks/post-author.php b/src/wp-includes/blocks/post-author.php new file mode 100644 index 0000000000000..a4880f8a9e744 --- /dev/null +++ b/src/wp-includes/blocks/post-author.php @@ -0,0 +1,81 @@ +context['postId'] ) ) { + $author_id = get_query_var( 'author' ); + } else { + $author_id = get_post_field( 'post_author', $block->context['postId'] ); + } + + if ( empty( $author_id ) ) { + return ''; + } + + if ( isset( $block->context['postType'] ) && ! post_type_supports( $block->context['postType'], 'author' ) ) { + return ''; + } + + $avatar = ! empty( $attributes['avatarSize'] ) ? get_avatar( + $author_id, + $attributes['avatarSize'] + ) : null; + + $link = get_author_posts_url( $author_id ); + $author_name = get_the_author_meta( 'display_name', $author_id ); + if ( ! empty( $attributes['isLink'] && ! empty( $attributes['linkTarget'] ) ) ) { + $author_name = sprintf( '%3$s', esc_url( $link ), esc_attr( $attributes['linkTarget'] ), $author_name ); + } + + $byline = ! empty( $attributes['byline'] ) ? $attributes['byline'] : false; + $classes = array(); + if ( isset( $attributes['itemsJustification'] ) ) { + $classes[] = 'items-justified-' . $attributes['itemsJustification']; + } + if ( isset( $attributes['textAlign'] ) ) { + $classes[] = 'has-text-align-' . $attributes['textAlign']; + } + if ( isset( $attributes['style']['elements']['link']['color']['text'] ) ) { + $classes[] = 'has-link-color'; + } + + $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => implode( ' ', $classes ) ) ); + + return sprintf( '
      ', $wrapper_attributes ) . + ( ! empty( $attributes['showAvatar'] ) ? '' : '' ) . + '' . + '
      '; +} + +/** + * Registers the `core/post-author` block on the server. + * + * @since 5.9.0 + */ +function register_block_core_post_author() { + register_block_type_from_metadata( + __DIR__ . '/post-author', + array( + 'render_callback' => 'render_block_core_post_author', + ) + ); +} +add_action( 'init', 'register_block_core_post_author' ); diff --git a/src/wp-includes/blocks/post-author/block.json b/src/wp-includes/blocks/post-author/block.json new file mode 100644 index 0000000000000..e316702a5c194 --- /dev/null +++ b/src/wp-includes/blocks/post-author/block.json @@ -0,0 +1,94 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/post-author", + "title": "Author (deprecated)", + "category": "theme", + "description": "This block is deprecated. Please use the Avatar block, the Author Name block, and the Author Biography block instead.", + "textdomain": "default", + "attributes": { + "textAlign": { + "type": "string" + }, + "avatarSize": { + "type": "number", + "default": 48 + }, + "showAvatar": { + "type": "boolean", + "default": true + }, + "showBio": { + "type": "boolean" + }, + "byline": { + "type": "string" + }, + "isLink": { + "type": "boolean", + "default": false, + "role": "content" + }, + "linkTarget": { + "type": "string", + "default": "_self", + "role": "content" + } + }, + "usesContext": [ "postType", "postId", "queryId" ], + "supports": { + "inserter": false, + "anchor": true, + "html": false, + "spacing": { + "margin": true, + "padding": true + }, + "typography": { + "fontSize": true, + "lineHeight": true, + "__experimentalFontFamily": true, + "__experimentalFontWeight": true, + "__experimentalFontStyle": true, + "__experimentalTextTransform": true, + "__experimentalTextDecoration": true, + "__experimentalLetterSpacing": true, + "__experimentalDefaultControls": { + "fontSize": true + } + }, + "color": { + "gradients": true, + "link": true, + "__experimentalDefaultControls": { + "background": true, + "text": true + } + }, + "interactivity": { + "clientNavigation": true + }, + "__experimentalBorder": { + "radius": true, + "color": true, + "width": true, + "style": true, + "__experimentalDefaultControls": { + "radius": true, + "color": true, + "width": true, + "style": true + } + }, + "filter": { + "duotone": true + } + }, + "selectors": { + "filter": { + "duotone": ".wp-block-post-author .wp-block-post-author__avatar img" + } + }, + "editorStyle": "wp-block-post-author-editor", + "style": "wp-block-post-author" +} diff --git a/src/wp-includes/blocks/post-comments-count.php b/src/wp-includes/blocks/post-comments-count.php new file mode 100644 index 0000000000000..bf12d6f0f9c4c --- /dev/null +++ b/src/wp-includes/blocks/post-comments-count.php @@ -0,0 +1,49 @@ +context['postId'] ) ) { + return ''; + } + + $classes = ''; + if ( isset( $attributes['textAlign'] ) ) { + $classes .= 'has-text-align-' . $attributes['textAlign']; + } + + $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $classes ) ); + return sprintf( + '
      %2$s
      ', + $wrapper_attributes, + get_comments_number( $block->context['postId'] ) + ); +} + +/** + * Registers the `core/post-comments-count` block on the server. + * + * @since 6.9.0 + */ +function register_block_core_post_comments_count() { + register_block_type_from_metadata( + __DIR__ . '/post-comments-count', + array( + 'render_callback' => 'render_block_core_post_comments_count', + ) + ); +} +add_action( 'init', 'register_block_core_post_comments_count' ); diff --git a/src/wp-includes/blocks/post-comments-count/block.json b/src/wp-includes/blocks/post-comments-count/block.json new file mode 100644 index 0000000000000..e3066d7afff93 --- /dev/null +++ b/src/wp-includes/blocks/post-comments-count/block.json @@ -0,0 +1,52 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/post-comments-count", + "title": "Comments Count", + "category": "theme", + "description": "Display a post's comments count.", + "textdomain": "default", + "usesContext": [ "postId" ], + "example": { + "viewportWidth": 350 + }, + "supports": { + "anchor": true, + "html": false, + "color": { + "gradients": true, + "__experimentalDefaultControls": { + "background": true, + "text": true + } + }, + "spacing": { + "margin": true, + "padding": true + }, + "typography": { + "fontSize": true, + "lineHeight": true, + "textAlign": true, + "__experimentalFontFamily": true, + "__experimentalFontWeight": true, + "__experimentalFontStyle": true, + "__experimentalTextTransform": true, + "__experimentalTextDecoration": true, + "__experimentalLetterSpacing": true, + "__experimentalDefaultControls": { + "fontSize": true + } + }, + "__experimentalBorder": { + "radius": true, + "color": true, + "width": true, + "style": true + }, + "interactivity": { + "clientNavigation": true + } + }, + "style": "wp-block-post-comments-count" +} diff --git a/src/wp-includes/blocks/post-comments-form.php b/src/wp-includes/blocks/post-comments-form.php new file mode 100644 index 0000000000000..dfbf4c59f264a --- /dev/null +++ b/src/wp-includes/blocks/post-comments-form.php @@ -0,0 +1,88 @@ +context['postId'] ) ) { + return ''; + } + + if ( post_password_required( $block->context['postId'] ) ) { + return; + } + + $classes = array( 'comment-respond' ); // See comment further below. + if ( isset( $attributes['textAlign'] ) ) { + $classes[] = 'has-text-align-' . $attributes['textAlign']; + } + if ( isset( $attributes['style']['elements']['link']['color']['text'] ) ) { + $classes[] = 'has-link-color'; + } + $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => implode( ' ', $classes ) ) ); + + add_filter( 'comment_form_defaults', 'post_comments_form_block_form_defaults' ); + + ob_start(); + comment_form( array(), $block->context['postId'] ); + $form = ob_get_clean(); + + remove_filter( 'comment_form_defaults', 'post_comments_form_block_form_defaults' ); + + // We use the outermost wrapping `
      ` returned by `comment_form()` + // which is identified by its default classname `comment-respond` to inject + // our wrapper attributes. This way, it is guaranteed that all styling applied + // to the block is carried along when the comment form is moved to the location + // of the 'Reply' link that the user clicked by Core's `comment-reply.js` script. + $form = str_replace( 'class="comment-respond"', $wrapper_attributes, $form ); + + // Enqueue the comment-reply script. + wp_enqueue_script( 'comment-reply' ); + + return $form; +} + +/** + * Registers the `core/post-comments-form` block on the server. + * + * @since 6.0.0 + */ +function register_block_core_post_comments_form() { + register_block_type_from_metadata( + __DIR__ . '/post-comments-form', + array( + 'render_callback' => 'render_block_core_post_comments_form', + ) + ); +} +add_action( 'init', 'register_block_core_post_comments_form' ); + +/** + * Use the button block classes for the form-submit button. + * + * @since 6.0.0 + * + * @param array $fields The default comment form arguments. + * + * @return array Returns the modified fields. + */ +function post_comments_form_block_form_defaults( $fields ) { + if ( wp_is_block_theme() ) { + $fields['submit_button'] = ''; + $fields['submit_field'] = '

      %1$s %2$s

      '; + } + + return $fields; +} diff --git a/src/wp-includes/blocks/post-comments-form/block.json b/src/wp-includes/blocks/post-comments-form/block.json new file mode 100644 index 0000000000000..c9e9caa91d081 --- /dev/null +++ b/src/wp-includes/blocks/post-comments-form/block.json @@ -0,0 +1,66 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/post-comments-form", + "title": "Comments Form", + "category": "theme", + "description": "Display a post's comments form.", + "textdomain": "default", + "usesContext": [ "postId", "postType" ], + "supports": { + "anchor": true, + "html": false, + "color": { + "gradients": true, + "heading": true, + "link": true, + "__experimentalDefaultControls": { + "background": true, + "text": true + } + }, + "spacing": { + "margin": true, + "padding": true + }, + "typography": { + "fontSize": true, + "lineHeight": true, + "textAlign": true, + "__experimentalFontStyle": true, + "__experimentalFontWeight": true, + "__experimentalLetterSpacing": true, + "__experimentalTextTransform": true, + "__experimentalDefaultControls": { + "fontSize": true + } + }, + "__experimentalBorder": { + "radius": true, + "color": true, + "width": true, + "style": true, + "__experimentalDefaultControls": { + "radius": true, + "color": true, + "width": true, + "style": true + } + } + }, + "editorStyle": "wp-block-post-comments-form-editor", + "style": [ + "wp-block-post-comments-form", + "wp-block-buttons", + "wp-block-button" + ], + "example": { + "attributes": { + "style": { + "typography": { + "textAlign": "center" + } + } + } + } +} diff --git a/src/wp-includes/blocks/post-comments-link.php b/src/wp-includes/blocks/post-comments-link.php new file mode 100644 index 0000000000000..c6d33eb0cd65c --- /dev/null +++ b/src/wp-includes/blocks/post-comments-link.php @@ -0,0 +1,75 @@ +context['postId'] ) || + isset( $block->context['postId'] ) && + ! comments_open( $block->context['postId'] ) + ) { + return ''; + } + + $classes = array(); + if ( isset( $attributes['textAlign'] ) ) { + $classes[] = 'has-text-align-' . $attributes['textAlign']; + } + if ( isset( $attributes['style']['elements']['link']['color']['text'] ) ) { + $classes[] = 'has-link-color'; + } + $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => implode( ' ', $classes ) ) ); + $comments_number = (int) get_comments_number( $block->context['postId'] ); + $comments_link = get_comments_link( $block->context['postId'] ); + $post_title = get_the_title( $block->context['postId'] ); + $comment_html = ''; + + if ( 0 === $comments_number ) { + $comment_html = sprintf( + /* translators: %s post title */ + __( 'No comments on %s' ), + $post_title + ); + } else { + $comment_html = sprintf( + /* translators: 1: Number of comments, 2: post title */ + _n( + '%1$s comment on %2$s', + '%1$s comments on %2$s', + $comments_number + ), + esc_html( number_format_i18n( $comments_number ) ), + $post_title + ); + } + + return ''; +} + +/** + * Registers the `core/post-comments-link` block on the server. + * + * @since 6.9.0 + */ +function register_block_core_post_comments_link() { + register_block_type_from_metadata( + __DIR__ . '/post-comments-link', + array( + 'render_callback' => 'render_block_core_post_comments_link', + ) + ); +} +add_action( 'init', 'register_block_core_post_comments_link' ); diff --git a/src/wp-includes/blocks/post-comments-link/block.json b/src/wp-includes/blocks/post-comments-link/block.json new file mode 100644 index 0000000000000..c5c72c677adf6 --- /dev/null +++ b/src/wp-includes/blocks/post-comments-link/block.json @@ -0,0 +1,59 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/post-comments-link", + "title": "Comments Link", + "category": "theme", + "description": "Displays the link to the current post comments.", + "textdomain": "default", + "usesContext": [ "postType", "postId" ], + "example": { + "viewportWidth": 350 + }, + "supports": { + "anchor": true, + "html": false, + "color": { + "link": true, + "text": false, + "__experimentalDefaultControls": { + "background": true, + "link": true + } + }, + "spacing": { + "margin": true, + "padding": true + }, + "typography": { + "fontSize": true, + "lineHeight": true, + "textAlign": true, + "__experimentalFontFamily": true, + "__experimentalFontWeight": true, + "__experimentalFontStyle": true, + "__experimentalTextTransform": true, + "__experimentalTextDecoration": true, + "__experimentalLetterSpacing": true, + "__experimentalDefaultControls": { + "fontSize": true + } + }, + "interactivity": { + "clientNavigation": true + }, + "__experimentalBorder": { + "radius": true, + "color": true, + "width": true, + "style": true, + "__experimentalDefaultControls": { + "radius": true, + "color": true, + "width": true, + "style": true + } + } + }, + "style": "wp-block-post-comments-link" +} diff --git a/src/wp-includes/blocks/post-content.php b/src/wp-includes/blocks/post-content.php new file mode 100644 index 0000000000000..0be1a8730f605 --- /dev/null +++ b/src/wp-includes/blocks/post-content.php @@ -0,0 +1,86 @@ +context['postId'] ) ) { + return ''; + } + + $post_id = $block->context['postId']; + + if ( isset( $seen_ids[ $post_id ] ) ) { + // WP_DEBUG_DISPLAY must only be honored when WP_DEBUG. This precedent + // is set in `wp_debug_mode()`. + $is_debug = WP_DEBUG && WP_DEBUG_DISPLAY; + + return $is_debug ? + // translators: Visible only in the front end, this warning takes the place of a faulty block. + __( '[block rendering halted]' ) : + ''; + } + + $seen_ids[ $post_id ] = true; + + // When inside the main loop, we want to use queried object + // so that `the_preview` for the current post can apply. + // We force this behavior by omitting the third argument (post ID) from the `get_the_content`. + $content = get_the_content(); + // Check for nextpage to display page links for paginated posts. + if ( has_block( 'core/nextpage' ) ) { + $content .= wp_link_pages( array( 'echo' => 0 ) ); + } + + /** This filter is documented in wp-includes/post-template.php */ + $content = apply_filters( 'the_content', str_replace( ']]>', ']]>', $content ) ); + unset( $seen_ids[ $post_id ] ); + + if ( empty( $content ) ) { + return ''; + } + + $tag_name = 'div'; + + if ( ! empty( $attributes['tagName'] ) && tag_escape( $attributes['tagName'] ) === $attributes['tagName'] ) { + $tag_name = $attributes['tagName']; + } + + $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => 'entry-content' ) ); + + return sprintf( + '<%1$s %2$s>%3$s', + $tag_name, + $wrapper_attributes, + $content + ); +} + +/** + * Registers the `core/post-content` block on the server. + * + * @since 5.8.0 + */ +function register_block_core_post_content() { + register_block_type_from_metadata( + __DIR__ . '/post-content', + array( + 'render_callback' => 'render_block_core_post_content', + ) + ); +} +add_action( 'init', 'register_block_core_post_content' ); diff --git a/src/wp-includes/blocks/post-content/block.json b/src/wp-includes/blocks/post-content/block.json new file mode 100644 index 0000000000000..517af41487270 --- /dev/null +++ b/src/wp-includes/blocks/post-content/block.json @@ -0,0 +1,83 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/post-content", + "title": "Content", + "category": "theme", + "description": "Displays the contents of a post or page.", + "textdomain": "default", + "usesContext": [ "postId", "postType", "queryId" ], + "attributes": { + "tagName": { + "type": "string", + "default": "div" + } + }, + "example": { + "viewportWidth": 350 + }, + "supports": { + "anchor": true, + "align": [ "wide", "full" ], + "html": false, + "layout": true, + "background": { + "backgroundImage": true, + "backgroundSize": true, + "__experimentalDefaultControls": { + "backgroundImage": true + } + }, + "dimensions": { + "minHeight": true + }, + "spacing": { + "blockGap": true, + "padding": true, + "margin": true, + "__experimentalDefaultControls": { + "margin": false, + "padding": false + } + }, + "color": { + "gradients": true, + "heading": true, + "link": true, + "__experimentalDefaultControls": { + "background": false, + "text": false + } + }, + "typography": { + "fontSize": true, + "lineHeight": true, + "__experimentalFontFamily": true, + "__experimentalFontWeight": true, + "__experimentalFontStyle": true, + "__experimentalTextTransform": true, + "__experimentalTextDecoration": true, + "__experimentalLetterSpacing": true, + "__experimentalDefaultControls": { + "fontSize": true + } + }, + "interactivity": { + "clientNavigation": true + }, + "__experimentalBorder": { + "radius": true, + "color": true, + "width": true, + "style": true, + "__experimentalDefaultControls": { + "radius": true, + "color": true, + "width": true, + "style": true + } + } + }, + "style": "wp-block-post-content", + "editorStyle": "wp-block-post-content-editor" +} diff --git a/src/wp-includes/blocks/post-date.php b/src/wp-includes/blocks/post-date.php new file mode 100644 index 0000000000000..a8073dd846217 --- /dev/null +++ b/src/wp-includes/blocks/post-date.php @@ -0,0 +1,106 @@ + 'modified', + ); + } else { + $source_args = array( + 'field' => 'date', + ); + } + $attributes['datetime'] = $source->get_value( $source_args, $block, 'datetime' ); + } + + if ( isset( $source_args['field'] ) && 'modified' === $source_args['field'] ) { + $classes[] = 'wp-block-post-date__modified-date'; + } + + if ( empty( $attributes['datetime'] ) ) { + // If the `datetime` attribute is set but empty, it could be because Block Bindings + // set it that way. This can happen e.g. if the block is bound to the + // post's last modified date, and the latter lies before the publish date. + // (See https://github.com/WordPress/gutenberg/pull/46839 where this logic was originally + // implemented.) + // In this case, we have to respect and return the empty value. + return ''; + } + + $unformatted_date = $attributes['datetime']; + $post_timestamp = strtotime( $unformatted_date ); + + if ( isset( $attributes['format'] ) && 'human-diff' === $attributes['format'] ) { + if ( $post_timestamp > time() ) { + // translators: %s: human-readable time difference. + $formatted_date = sprintf( __( '%s from now' ), human_time_diff( $post_timestamp ) ); + } else { + // translators: %s: human-readable time difference. + $formatted_date = sprintf( __( '%s ago' ), human_time_diff( $post_timestamp ) ); + } + } else { + $format = empty( $attributes['format'] ) ? get_option( 'date_format' ) : $attributes['format']; + $formatted_date = wp_date( $format, $post_timestamp ); + } + + if ( isset( $attributes['textAlign'] ) ) { + $classes[] = 'has-text-align-' . $attributes['textAlign']; + } + if ( isset( $attributes['style']['elements']['link']['color']['text'] ) ) { + $classes[] = 'has-link-color'; + } + + $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => implode( ' ', $classes ) ) ); + + $time_tag = sprintf( '', $unformatted_date, $formatted_date ); + + if ( isset( $attributes['isLink'] ) && $attributes['isLink'] && isset( $block->context['postId'] ) ) { + $time_tag = sprintf( '%2s', get_the_permalink( $block->context['postId'] ), $time_tag ); + } + + return sprintf( '
      %2$s
      ', $wrapper_attributes, $time_tag ); +} + +/** + * Registers the `core/post-date` block on the server. + * + * @since 5.8.0 + */ +function register_block_core_post_date() { + register_block_type_from_metadata( + __DIR__ . '/post-date', + array( + 'render_callback' => 'render_block_core_post_date', + ) + ); +} +add_action( 'init', 'register_block_core_post_date' ); diff --git a/src/wp-includes/blocks/post-date/block.json b/src/wp-includes/blocks/post-date/block.json new file mode 100644 index 0000000000000..7952e36af3661 --- /dev/null +++ b/src/wp-includes/blocks/post-date/block.json @@ -0,0 +1,75 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/post-date", + "title": "Date", + "category": "theme", + "description": "Display a custom date.", + "textdomain": "default", + "attributes": { + "datetime": { + "type": "string", + "role": "content" + }, + "textAlign": { + "type": "string" + }, + "format": { + "type": "string" + }, + "isLink": { + "type": "boolean", + "default": false, + "role": "content" + } + }, + "usesContext": [ "postId", "postType", "queryId" ], + "example": { + "viewportWidth": 350 + }, + "supports": { + "anchor": true, + "html": false, + "color": { + "gradients": true, + "link": true, + "__experimentalDefaultControls": { + "background": true, + "text": true, + "link": true + } + }, + "spacing": { + "margin": true, + "padding": true + }, + "typography": { + "fontSize": true, + "lineHeight": true, + "__experimentalFontFamily": true, + "__experimentalFontWeight": true, + "__experimentalFontStyle": true, + "__experimentalTextTransform": true, + "__experimentalTextDecoration": true, + "__experimentalLetterSpacing": true, + "__experimentalDefaultControls": { + "fontSize": true + } + }, + "interactivity": { + "clientNavigation": true + }, + "__experimentalBorder": { + "radius": true, + "color": true, + "width": true, + "style": true, + "__experimentalDefaultControls": { + "radius": true, + "color": true, + "width": true, + "style": true + } + } + } +} diff --git a/src/wp-includes/blocks/post-excerpt.php b/src/wp-includes/blocks/post-excerpt.php new file mode 100644 index 0000000000000..64748162cacc8 --- /dev/null +++ b/src/wp-includes/blocks/post-excerpt.php @@ -0,0 +1,117 @@ +context['postId'] ) ) { + return ''; + } + + $more_text = ! empty( $attributes['moreText'] ) ? '' . wp_kses_post( $attributes['moreText'] ) . '' : ''; + $filter_excerpt_more = static function ( $more ) use ( $more_text ) { + return empty( $more_text ) ? $more : ''; + }; + /** + * Some themes might use `excerpt_more` filter to handle the + * `more` link displayed after a trimmed excerpt. Since the + * block has a `more text` attribute we have to check and + * override if needed the return value from this filter. + * So if the block's attribute is not empty override the + * `excerpt_more` filter and return nothing. This will + * result in showing only one `read more` link at a time. + * + * This hook needs to be applied before the excerpt is retrieved with get_the_excerpt. + * Otherwise, the read more link filter from the theme is not removed. + */ + add_filter( 'excerpt_more', $filter_excerpt_more ); + + /* + * The purpose of the excerpt length setting is to limit the length of both + * automatically generated and user-created excerpts. + * Because the excerpt_length filter only applies to auto generated excerpts, + * wp_trim_words is used instead. + * + * To ensure the block's excerptLength setting works correctly for auto-generated + * excerpts, we temporarily override excerpt_length to 101 (the max block setting) + * so that wp_trim_excerpt doesn't pre-trim the content before wp_trim_words can + * apply the user's desired length. + */ + $excerpt_length = $attributes['excerptLength']; + add_filter( 'excerpt_length', 'block_core_post_excerpt_excerpt_length', PHP_INT_MAX ); + + $excerpt = get_the_excerpt( $block->context['postId'] ); + + remove_filter( 'excerpt_length', 'block_core_post_excerpt_excerpt_length', PHP_INT_MAX ); + + if ( isset( $excerpt_length ) ) { + $excerpt = wp_trim_words( $excerpt, $excerpt_length ); + } + + $classes = array(); + if ( isset( $attributes['textAlign'] ) ) { + $classes[] = 'has-text-align-' . $attributes['textAlign']; + } + if ( isset( $attributes['style']['elements']['link']['color']['text'] ) ) { + $classes[] = 'has-link-color'; + } + $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => implode( ' ', $classes ) ) ); + + $content = '

      ' . $excerpt; + $show_more_on_new_line = ! isset( $attributes['showMoreOnNewLine'] ) || $attributes['showMoreOnNewLine']; + if ( $show_more_on_new_line && ! empty( $more_text ) ) { + $content .= '

      ' . $more_text . '

      '; + } else { + $content .= " $more_text

      "; + } + remove_filter( 'excerpt_more', $filter_excerpt_more ); + return sprintf( '
      %2$s
      ', $wrapper_attributes, $content ); +} + +/** + * Registers the `core/post-excerpt` block on the server. + * + * @since 5.8.0 + */ +function register_block_core_post_excerpt() { + register_block_type_from_metadata( + __DIR__ . '/post-excerpt', + array( + 'render_callback' => 'render_block_core_post_excerpt', + ) + ); +} +add_action( 'init', 'register_block_core_post_excerpt' ); + +/** + * Callback for the excerpt_length filter to override the excerpt length. + * + * If themes or plugins filter the excerpt_length, we need to + * override the filter in the editor, otherwise + * the excerpt length block setting has no effect. + * Returns 101 (one more than the max block setting of 100) to ensure + * wp_trim_words can detect when trimming is needed and add the ellipsis. + * + * @since 7.0.0 + * + * @return int The excerpt length. + */ +function block_core_post_excerpt_excerpt_length() { + return 101; +} + +if ( is_admin() ) { + add_filter( 'excerpt_length', 'block_core_post_excerpt_excerpt_length', PHP_INT_MAX ); +} diff --git a/src/wp-includes/blocks/post-excerpt/block.json b/src/wp-includes/blocks/post-excerpt/block.json new file mode 100644 index 0000000000000..99f6d5dcc99ed --- /dev/null +++ b/src/wp-includes/blocks/post-excerpt/block.json @@ -0,0 +1,78 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/post-excerpt", + "title": "Excerpt", + "category": "theme", + "description": "Display the excerpt.", + "textdomain": "default", + "attributes": { + "textAlign": { + "type": "string" + }, + "moreText": { + "type": "string", + "role": "content" + }, + "showMoreOnNewLine": { + "type": "boolean", + "default": true + }, + "excerptLength": { + "type": "number", + "default": 55 + } + }, + "usesContext": [ "postId", "postType", "queryId" ], + "example": { + "viewportWidth": 350 + }, + "supports": { + "anchor": true, + "html": false, + "color": { + "gradients": true, + "link": true, + "__experimentalDefaultControls": { + "background": true, + "text": true, + "link": true + } + }, + "spacing": { + "margin": true, + "padding": true + }, + "typography": { + "fontSize": true, + "lineHeight": true, + "textColumns": true, + "__experimentalFontFamily": true, + "__experimentalFontWeight": true, + "__experimentalFontStyle": true, + "__experimentalTextTransform": true, + "__experimentalTextDecoration": true, + "__experimentalLetterSpacing": true, + "__experimentalDefaultControls": { + "fontSize": true + } + }, + "interactivity": { + "clientNavigation": true + }, + "__experimentalBorder": { + "radius": true, + "color": true, + "width": true, + "style": true, + "__experimentalDefaultControls": { + "radius": true, + "color": true, + "width": true, + "style": true + } + } + }, + "editorStyle": "wp-block-post-excerpt-editor", + "style": "wp-block-post-excerpt" +} diff --git a/src/wp-includes/blocks/post-featured-image.php b/src/wp-includes/blocks/post-featured-image.php new file mode 100644 index 0000000000000..e9fc60f7038f5 --- /dev/null +++ b/src/wp-includes/blocks/post-featured-image.php @@ -0,0 +1,269 @@ +context['postId'] ) ) { + return ''; + } + $post_ID = $block->context['postId']; + + $is_link = isset( $attributes['isLink'] ) && $attributes['isLink']; + $size_slug = $attributes['sizeSlug'] ?? 'post-thumbnail'; + $attr = get_block_core_post_featured_image_border_attributes( $attributes ); + $overlay_markup = get_block_core_post_featured_image_overlay_element_markup( $attributes ); + + if ( $is_link ) { + $title = get_the_title( $post_ID ); + if ( $title ) { + $attr['alt'] = trim( strip_tags( $title ) ); + } else { + $attr['alt'] = sprintf( + // translators: %d is the post ID. + __( 'Untitled post %d' ), + $post_ID + ); + } + } + + $extra_styles = ''; + + // Aspect ratio with a height set needs to override the default width/height. + if ( ! empty( $attributes['aspectRatio'] ) ) { + $extra_styles .= 'width:100%;height:100%;'; + } elseif ( ! empty( $attributes['height'] ) ) { + $extra_styles .= "height:{$attributes['height']};"; + } + + if ( ! empty( $attributes['scale'] ) ) { + $extra_styles .= "object-fit:{$attributes['scale']};"; + } + if ( ! empty( $attributes['style']['shadow'] ) ) { + $shadow_styles = wp_style_engine_get_styles( array( 'shadow' => $attributes['style']['shadow'] ) ); + + if ( ! empty( $shadow_styles['css'] ) ) { + $extra_styles .= $shadow_styles['css']; + } + } + + if ( ! empty( $extra_styles ) ) { + $attr['style'] = empty( $attr['style'] ) ? $extra_styles : $attr['style'] . $extra_styles; + } + + $featured_image = get_the_post_thumbnail( $post_ID, $size_slug, $attr ); + + // Get the first image from the post. + if ( $attributes['useFirstImageFromPost'] && ! $featured_image ) { + $content_post = get_post( $post_ID ); + $content = $content_post->post_content; + $processor = new WP_HTML_Tag_Processor( $content ); + + /* + * Transfer the image tag from the post into a new text snippet. + * Because the HTML API doesn't currently expose a way to extract + * HTML substrings this is necessary as a workaround. Of note, this + * is different than directly extracting the IMG tag: + * - If there are duplicate attributes in the source there will only be one in the output. + * - If there are single-quoted or unquoted attributes they will be double-quoted in the output. + * - If there are named character references in the attribute values they may be replaced with their direct code points. E.g. `…` becomes `…`. + * In the future there will likely be a mechanism to copy snippets of HTML from + * one document into another, via the HTML Processor's `get_outer_html()` or + * equivalent. When that happens it would be appropriate to replace this custom + * code with that canonical code. + */ + if ( $processor->next_tag( 'img' ) ) { + $tag_html = new WP_HTML_Tag_Processor( '' ); + $tag_html->next_tag(); + foreach ( $processor->get_attribute_names_with_prefix( '' ) as $name ) { + $tag_html->set_attribute( $name, $processor->get_attribute( $name ) ); + } + $featured_image = $tag_html->get_updated_html(); + } + } + + if ( ! $featured_image ) { + return ''; + } + + if ( $is_link ) { + $link_target = $attributes['linkTarget']; + $rel = ! empty( $attributes['rel'] ) ? 'rel="' . esc_attr( $attributes['rel'] ) . '"' : ''; + $height = ! empty( $attributes['height'] ) ? 'style="' . esc_attr( safecss_filter_attr( 'height:' . $attributes['height'] ) ) . '"' : ''; + $featured_image = sprintf( + '%5$s%6$s', + get_the_permalink( $post_ID ), + esc_attr( $link_target ), + $rel, + $height, + $featured_image, + $overlay_markup + ); + } else { + $featured_image = $featured_image . $overlay_markup; + } + + $aspect_ratio = ! empty( $attributes['aspectRatio'] ) + ? esc_attr( safecss_filter_attr( 'aspect-ratio:' . $attributes['aspectRatio'] ) ) . ';' + : ''; + $width = ! empty( $attributes['width'] ) + ? esc_attr( safecss_filter_attr( 'width:' . $attributes['width'] ) ) . ';' + : ''; + $height = ! empty( $attributes['height'] ) + ? esc_attr( safecss_filter_attr( 'height:' . $attributes['height'] ) ) . ';' + : ''; + if ( ! $height && ! $width && ! $aspect_ratio ) { + $wrapper_attributes = get_block_wrapper_attributes(); + } else { + $wrapper_attributes = get_block_wrapper_attributes( array( 'style' => $aspect_ratio . $width . $height ) ); + } + return "
      {$featured_image}
      "; +} + +/** + * Generate markup for the HTML element that will be used for the overlay. + * + * @since 6.1.0 + * + * @param array $attributes Block attributes. + * + * @return string HTML markup in string format. + */ +function get_block_core_post_featured_image_overlay_element_markup( $attributes ) { + $has_dim_background = isset( $attributes['dimRatio'] ) && $attributes['dimRatio']; + $has_gradient = isset( $attributes['gradient'] ) && $attributes['gradient']; + $has_custom_gradient = isset( $attributes['customGradient'] ) && $attributes['customGradient']; + $has_solid_overlay = isset( $attributes['overlayColor'] ) && $attributes['overlayColor']; + $has_custom_overlay = isset( $attributes['customOverlayColor'] ) && $attributes['customOverlayColor']; + $class_names = array( 'wp-block-post-featured-image__overlay' ); + $styles = array(); + + if ( ! $has_dim_background ) { + return ''; + } + + // Apply border classes and styles. + $border_attributes = get_block_core_post_featured_image_border_attributes( $attributes ); + + if ( ! empty( $border_attributes['class'] ) ) { + $class_names[] = $border_attributes['class']; + } + + if ( ! empty( $border_attributes['style'] ) ) { + $styles[] = $border_attributes['style']; + } + + // Apply overlay and gradient classes. + if ( $has_dim_background ) { + $class_names[] = 'has-background-dim'; + $class_names[] = "has-background-dim-{$attributes['dimRatio']}"; + } + + if ( $has_solid_overlay ) { + $class_names[] = "has-{$attributes['overlayColor']}-background-color"; + } + + if ( $has_gradient || $has_custom_gradient ) { + $class_names[] = 'has-background-gradient'; + } + + if ( $has_gradient ) { + $class_names[] = "has-{$attributes['gradient']}-gradient-background"; + } + + // Apply background styles. + if ( $has_custom_gradient ) { + $styles[] = sprintf( 'background-image: %s;', $attributes['customGradient'] ); + } + + if ( $has_custom_overlay ) { + $styles[] = sprintf( 'background-color: %s;', $attributes['customOverlayColor'] ); + } + + return sprintf( + '', + esc_attr( implode( ' ', $class_names ) ), + esc_attr( safecss_filter_attr( implode( ' ', $styles ) ) ) + ); +} + +/** + * Generates class names and styles to apply the border support styles for + * the Post Featured Image block. + * + * @since 6.1.0 + * + * @param array $attributes The block attributes. + * @return array The border-related classnames and styles for the block. + */ +function get_block_core_post_featured_image_border_attributes( $attributes ) { + $border_styles = array(); + $sides = array( 'top', 'right', 'bottom', 'left' ); + + // Border radius. + if ( isset( $attributes['style']['border']['radius'] ) ) { + $border_styles['radius'] = $attributes['style']['border']['radius']; + } + + // Border style. + if ( isset( $attributes['style']['border']['style'] ) ) { + $border_styles['style'] = $attributes['style']['border']['style']; + } + + // Border width. + if ( isset( $attributes['style']['border']['width'] ) ) { + $border_styles['width'] = $attributes['style']['border']['width']; + } + + // Border color. + $preset_color = array_key_exists( 'borderColor', $attributes ) ? "var:preset|color|{$attributes['borderColor']}" : null; + $custom_color = $attributes['style']['border']['color'] ?? null; + $border_styles['color'] = $preset_color ? $preset_color : $custom_color; + + // Individual border styles e.g. top, left etc. + foreach ( $sides as $side ) { + $border = $attributes['style']['border'][ $side ] ?? null; + $border_styles[ $side ] = array( + 'color' => $border['color'] ?? null, + 'style' => $border['style'] ?? null, + 'width' => $border['width'] ?? null, + ); + } + + $styles = wp_style_engine_get_styles( array( 'border' => $border_styles ) ); + $attributes = array(); + if ( ! empty( $styles['classnames'] ) ) { + $attributes['class'] = $styles['classnames']; + } + if ( ! empty( $styles['css'] ) ) { + $attributes['style'] = $styles['css']; + } + return $attributes; +} + +/** + * Registers the `core/post-featured-image` block on the server. + * + * @since 5.8.0 + */ +function register_block_core_post_featured_image() { + register_block_type_from_metadata( + __DIR__ . '/post-featured-image', + array( + 'render_callback' => 'render_block_core_post_featured_image', + ) + ); +} +add_action( 'init', 'register_block_core_post_featured_image' ); diff --git a/src/wp-includes/blocks/post-featured-image/block.json b/src/wp-includes/blocks/post-featured-image/block.json new file mode 100644 index 0000000000000..f5619dc29fac5 --- /dev/null +++ b/src/wp-includes/blocks/post-featured-image/block.json @@ -0,0 +1,109 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/post-featured-image", + "title": "Featured Image", + "category": "theme", + "description": "Display a post's featured image.", + "textdomain": "default", + "attributes": { + "isLink": { + "type": "boolean", + "default": false, + "role": "content" + }, + "aspectRatio": { + "type": "string" + }, + "width": { + "type": "string" + }, + "height": { + "type": "string" + }, + "scale": { + "type": "string", + "default": "cover" + }, + "sizeSlug": { + "type": "string" + }, + "rel": { + "type": "string", + "attribute": "rel", + "default": "", + "role": "content" + }, + "linkTarget": { + "type": "string", + "default": "_self", + "role": "content" + }, + "overlayColor": { + "type": "string" + }, + "customOverlayColor": { + "type": "string" + }, + "dimRatio": { + "type": "number", + "default": 0 + }, + "gradient": { + "type": "string" + }, + "customGradient": { + "type": "string" + }, + "useFirstImageFromPost": { + "type": "boolean", + "default": false + } + }, + "usesContext": [ "postId", "postType", "queryId" ], + "example": { + "viewportWidth": 350 + }, + "supports": { + "anchor": true, + "align": [ "left", "right", "center", "wide", "full" ], + "color": { + "text": false, + "background": false + }, + "__experimentalBorder": { + "color": true, + "radius": true, + "width": true, + "__experimentalSkipSerialization": true, + "__experimentalDefaultControls": { + "color": true, + "radius": true, + "width": true + } + }, + "filter": { + "duotone": true + }, + "shadow": { + "__experimentalSkipSerialization": true + }, + "html": false, + "spacing": { + "margin": true, + "padding": true + }, + "interactivity": { + "clientNavigation": true + } + }, + "selectors": { + "border": ".wp-block-post-featured-image img, .wp-block-post-featured-image .block-editor-media-placeholder, .wp-block-post-featured-image .wp-block-post-featured-image__overlay", + "shadow": ".wp-block-post-featured-image img, .wp-block-post-featured-image .components-placeholder", + "filter": { + "duotone": ".wp-block-post-featured-image img, .wp-block-post-featured-image .wp-block-post-featured-image__placeholder, .wp-block-post-featured-image .components-placeholder__illustration, .wp-block-post-featured-image .components-placeholder::before" + } + }, + "editorStyle": "wp-block-post-featured-image-editor", + "style": "wp-block-post-featured-image" +} diff --git a/src/wp-includes/blocks/post-navigation-link.php b/src/wp-includes/blocks/post-navigation-link.php new file mode 100644 index 0000000000000..cde3910e74353 --- /dev/null +++ b/src/wp-includes/blocks/post-navigation-link.php @@ -0,0 +1,139 @@ + $classes, + ) + ); + // Set default values. + $format = '%link'; + $link = 'next' === $navigation_type ? _x( 'Next', 'label for next post link' ) : _x( 'Previous', 'label for previous post link' ); + $label = ''; + + // Only use hardcoded values here, otherwise we need to add escaping where these values are used. + $arrow_map = array( + 'none' => '', + 'arrow' => array( + 'next' => '→', + 'previous' => '←', + ), + 'chevron' => array( + 'next' => '»', + 'previous' => '«', + ), + ); + + // If a custom label is provided, make this a link. + // `$label` is used to prepend the provided label, if we want to show the page title as well. + if ( isset( $attributes['label'] ) && ! empty( $attributes['label'] ) ) { + $label = "{$attributes['label']}"; + $link = $label; + } + + // If we want to also show the page title, make the page title a link and prepend the label. + if ( isset( $attributes['showTitle'] ) && $attributes['showTitle'] ) { + /* + * If the label link option is not enabled but there is a custom label, + * display the custom label as text before the linked title. + */ + if ( ! $attributes['linkLabel'] ) { + if ( $label ) { + $format = '' . wp_kses_post( $label ) . ' %link'; + } + $link = '%title'; + } elseif ( isset( $attributes['linkLabel'] ) && $attributes['linkLabel'] ) { + // If the label link option is enabled and there is a custom label, display it before the title. + if ( $label ) { + $link = '' . wp_kses_post( $label ) . ' %title'; + } else { + /* + * If the label link option is enabled and there is no custom label, + * add a colon between the label and the post title. + */ + $label = 'next' === $navigation_type ? _x( 'Next:', 'label before the title of the next post' ) : _x( 'Previous:', 'label before the title of the previous post' ); + $link = sprintf( + '%1$s %2$s', + wp_kses_post( $label ), + '%title' + ); + } + } + } + + // Display arrows. + if ( isset( $attributes['arrow'] ) && 'none' !== $attributes['arrow'] && isset( $arrow_map[ $attributes['arrow'] ] ) ) { + $arrow = $arrow_map[ $attributes['arrow'] ][ $navigation_type ]; + + if ( 'next' === $navigation_type ) { + $format = '%link'; + } else { + $format = '%link'; + } + } + + /* + * The dynamic portion of the function name, `$navigation_type`, + * Refers to the type of adjacency, 'next' or 'previous'. + * + * @see https://developer.wordpress.org/reference/functions/get_previous_post_link/ + * @see https://developer.wordpress.org/reference/functions/get_next_post_link/ + */ + $get_link_function = "get_{$navigation_type}_post_link"; + + if ( ! empty( $attributes['taxonomy'] ) ) { + $content = $get_link_function( $format, $link, true, '', $attributes['taxonomy'] ); + } else { + $content = $get_link_function( $format, $link ); + } + + return sprintf( + '
      %2$s
      ', + $wrapper_attributes, + $content + ); +} + +/** + * Registers the `core/post-navigation-link` block on the server. + * + * @since 5.9.0 + */ +function register_block_core_post_navigation_link() { + register_block_type_from_metadata( + __DIR__ . '/post-navigation-link', + array( + 'render_callback' => 'render_block_core_post_navigation_link', + ) + ); +} +add_action( 'init', 'register_block_core_post_navigation_link' ); diff --git a/src/wp-includes/blocks/post-navigation-link/block.json b/src/wp-includes/blocks/post-navigation-link/block.json new file mode 100644 index 0000000000000..6d51d619637c9 --- /dev/null +++ b/src/wp-includes/blocks/post-navigation-link/block.json @@ -0,0 +1,65 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/post-navigation-link", + "title": "Post Navigation Link", + "category": "theme", + "description": "Displays the next or previous post link that is adjacent to the current post.", + "textdomain": "default", + "attributes": { + "textAlign": { + "type": "string" + }, + "type": { + "type": "string", + "default": "next" + }, + "label": { + "type": "string", + "role": "content" + }, + "showTitle": { + "type": "boolean", + "default": false + }, + "linkLabel": { + "type": "boolean", + "default": false + }, + "arrow": { + "type": "string", + "default": "none" + }, + "taxonomy": { + "type": "string", + "default": "" + } + }, + "usesContext": [ "postType" ], + "supports": { + "anchor": true, + "reusable": false, + "html": false, + "color": { + "link": true + }, + "typography": { + "fontSize": true, + "lineHeight": true, + "__experimentalFontFamily": true, + "__experimentalFontWeight": true, + "__experimentalFontStyle": true, + "__experimentalTextTransform": true, + "__experimentalTextDecoration": true, + "__experimentalLetterSpacing": true, + "__experimentalWritingMode": true, + "__experimentalDefaultControls": { + "fontSize": true + } + }, + "interactivity": { + "clientNavigation": true + } + }, + "style": "wp-block-post-navigation-link" +} diff --git a/src/wp-includes/blocks/post-template.php b/src/wp-includes/blocks/post-template.php new file mode 100644 index 0000000000000..72ebbe0e13d13 --- /dev/null +++ b/src/wp-includes/blocks/post-template.php @@ -0,0 +1,162 @@ +name ) { + return true; + } + if ( + 'core/cover' === $block->name && + ! empty( $block->attributes['useFeaturedImage'] ) + ) { + return true; + } + if ( $block->inner_blocks && block_core_post_template_uses_featured_image( $block->inner_blocks ) ) { + return true; + } + } + + return false; +} + +/** + * Renders the `core/post-template` block on the server. + * + * @since 6.3.0 Changed render_block_context priority to `1`. + * + * @global WP_Query $wp_query WordPress Query object. + * + * @param array $attributes Block attributes. + * @param string $content Block default content. + * @param WP_Block $block Block instance. + * + * @return string Returns the output of the query, structured using the layout defined by the block's inner blocks. + */ +function render_block_core_post_template( $attributes, $content, $block ) { + $page_key = isset( $block->context['queryId'] ) ? 'query-' . $block->context['queryId'] . '-page' : 'query-page'; + $enhanced_pagination = (bool) ( $block->context['enhancedPagination'] ?? false ); + $page = empty( $_GET[ $page_key ] ) ? 1 : (int) $_GET[ $page_key ]; + + // Use global query if needed. + $use_global_query = (bool) ( $block->context['query']['inherit'] ?? false ); + if ( $use_global_query ) { + global $wp_query; + + /* + * If already in the main query loop, duplicate the query instance to not tamper with the main instance. + * Since this is a nested query, it should start at the beginning, therefore rewind posts. + * Otherwise, the main query loop has not started yet and this block is responsible for doing so. + */ + if ( in_the_loop() ) { + $query = clone $wp_query; + $query->rewind_posts(); + } else { + $query = $wp_query; + } + } else { + $query_args = build_query_vars_from_query_block( $block, $page ); + $query = new WP_Query( $query_args ); + } + + if ( ! $query->have_posts() ) { + return ''; + } + + if ( block_core_post_template_uses_featured_image( $block->inner_blocks ) ) { + update_post_thumbnail_cache( $query ); + } + + $classnames = ''; + if ( isset( $block->context['displayLayout'] ) && isset( $block->context['query'] ) ) { + if ( isset( $block->context['displayLayout']['type'] ) && 'flex' === $block->context['displayLayout']['type'] ) { + $classnames = "is-flex-container columns-{$block->context['displayLayout']['columns']}"; + } + } + if ( isset( $attributes['style']['elements']['link']['color']['text'] ) ) { + $classnames .= ' has-link-color'; + } + + // Ensure backwards compatibility by flagging the number of columns via classname when using grid layout. + if ( isset( $attributes['layout']['type'] ) && 'grid' === $attributes['layout']['type'] && ! empty( $attributes['layout']['columnCount'] ) ) { + $classnames .= ' ' . sanitize_title( 'columns-' . $attributes['layout']['columnCount'] ); + } + + $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => trim( $classnames ) ) ); + + $content = ''; + while ( $query->have_posts() ) { + $query->the_post(); + + // Get an instance of the current Post Template block. + $block_instance = $block->parsed_block; + + // Set the block name to one that does not correspond to an existing registered block. + // This ensures that for the inner instances of the Post Template block, we do not render any block supports. + $block_instance['blockName'] = 'core/null'; + + $post_id = get_the_ID(); + $post_type = get_post_type(); + $filter_block_context = static function ( $context ) use ( $post_id, $post_type ) { + $context['postType'] = $post_type; + $context['postId'] = $post_id; + return $context; + }; + + // Use an early priority to so that other 'render_block_context' filters have access to the values. + add_filter( 'render_block_context', $filter_block_context, 1 ); + // Render the inner blocks of the Post Template block with `dynamic` set to `false` to prevent calling + // `render_callback` and ensure that no wrapper markup is included. + $block_content = ( new WP_Block( $block_instance ) )->render( array( 'dynamic' => false ) ); + remove_filter( 'render_block_context', $filter_block_context, 1 ); + + // Wrap the render inner blocks in a `li` element with the appropriate post classes. + $post_classes = implode( ' ', get_post_class( 'wp-block-post' ) ); + + $inner_block_directives = $enhanced_pagination ? ' data-wp-key="post-template-item-' . $post_id . '"' : ''; + + $content .= '' . $block_content . ''; + } + + /* + * Use this function to restore the context of the template tags + * from a secondary query loop back to the main query loop. + * Since we use two custom loops, it's safest to always restore. + */ + wp_reset_postdata(); + + return sprintf( + '
        %2$s
      ', + $wrapper_attributes, + $content + ); +} + +/** + * Registers the `core/post-template` block on the server. + * + * @since 5.8.0 + */ +function register_block_core_post_template() { + register_block_type_from_metadata( + __DIR__ . '/post-template', + array( + 'render_callback' => 'render_block_core_post_template', + 'skip_inner_blocks' => true, + ) + ); +} +add_action( 'init', 'register_block_core_post_template' ); diff --git a/src/wp-includes/blocks/post-template/block.json b/src/wp-includes/blocks/post-template/block.json new file mode 100644 index 0000000000000..fdd8e647154cc --- /dev/null +++ b/src/wp-includes/blocks/post-template/block.json @@ -0,0 +1,70 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/post-template", + "title": "Post Template", + "category": "theme", + "ancestor": [ "core/query" ], + "description": "Contains the block elements used to render a post, like the title, date, featured image, content or excerpt, and more.", + "textdomain": "default", + "usesContext": [ + "queryId", + "query", + "displayLayout", + "templateSlug", + "previewPostType", + "enhancedPagination", + "postType" + ], + "supports": { + "anchor": true, + "reusable": false, + "html": false, + "align": [ "wide", "full" ], + "layout": true, + "color": { + "gradients": true, + "link": true, + "__experimentalDefaultControls": { + "background": true, + "text": true + } + }, + "typography": { + "fontSize": true, + "lineHeight": true, + "__experimentalFontFamily": true, + "__experimentalFontWeight": true, + "__experimentalFontStyle": true, + "__experimentalTextTransform": true, + "__experimentalTextDecoration": true, + "__experimentalLetterSpacing": true, + "__experimentalDefaultControls": { + "fontSize": true + } + }, + "spacing": { + "margin": true, + "padding": true, + "blockGap": { + "__experimentalDefault": "1.25em" + }, + "__experimentalDefaultControls": { + "blockGap": true, + "padding": false, + "margin": false + } + }, + "interactivity": { + "clientNavigation": true + }, + "__experimentalBorder": { + "radius": true, + "color": true, + "width": true, + "style": true + } + }, + "style": "wp-block-post-template", + "editorStyle": "wp-block-post-template-editor" +} diff --git a/src/wp-includes/blocks/post-terms.php b/src/wp-includes/blocks/post-terms.php new file mode 100644 index 0000000000000..3e7a05f10117e --- /dev/null +++ b/src/wp-includes/blocks/post-terms.php @@ -0,0 +1,130 @@ +context['postId'] ) || ! isset( $attributes['term'] ) ) { + return ''; + } + + if ( ! is_taxonomy_viewable( $attributes['term'] ) ) { + return ''; + } + + $classes = array( 'taxonomy-' . $attributes['term'] ); + if ( isset( $attributes['textAlign'] ) ) { + $classes[] = 'has-text-align-' . $attributes['textAlign']; + } + if ( isset( $attributes['style']['elements']['link']['color']['text'] ) ) { + $classes[] = 'has-link-color'; + } + + $separator = empty( $attributes['separator'] ) ? ' ' : $attributes['separator']; + + $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => implode( ' ', $classes ) ) ); + + $prefix = "
      "; + if ( isset( $attributes['prefix'] ) && $attributes['prefix'] ) { + $prefix .= '' . $attributes['prefix'] . ''; + } + + $suffix = '
      '; + if ( isset( $attributes['suffix'] ) && $attributes['suffix'] ) { + $suffix = '' . $attributes['suffix'] . '' . $suffix; + } + + $post_terms = get_the_term_list( + $block->context['postId'], + $attributes['term'], + wp_kses_post( $prefix ), + '' . esc_html( $separator ) . '', + wp_kses_post( $suffix ) + ); + + if ( is_wp_error( $post_terms ) || empty( $post_terms ) ) { + return ''; + } + + return $post_terms; +} + +/** + * Returns the available variations for the `core/post-terms` block. + * + * @since 6.5.0 + * + * @return array The available variations for the block. + */ +function block_core_post_terms_build_variations() { + $taxonomies = get_taxonomies( + array( + 'publicly_queryable' => true, + 'show_in_rest' => true, + ), + 'objects' + ); + + // Split the available taxonomies to `built_in` and custom ones, + // in order to prioritize the `built_in` taxonomies at the + // search results. + $built_ins = array(); + $custom_variations = array(); + + // Create and register the eligible taxonomies variations. + foreach ( $taxonomies as $taxonomy ) { + $variation = array( + 'name' => $taxonomy->name, + 'title' => $taxonomy->label, + 'description' => sprintf( + /* translators: %s: taxonomy's label */ + __( 'Display a list of assigned terms from the taxonomy: %s' ), + $taxonomy->label + ), + 'attributes' => array( + 'term' => $taxonomy->name, + ), + 'isActive' => array( 'term' ), + 'scope' => array( 'inserter', 'transform' ), + ); + // Set the category variation as the default one. + if ( 'category' === $taxonomy->name ) { + $variation['isDefault'] = true; + } + if ( $taxonomy->_builtin ) { + $built_ins[] = $variation; + } else { + $custom_variations[] = $variation; + } + } + + return array_merge( $built_ins, $custom_variations ); +} + +/** + * Registers the `core/post-terms` block on the server. + * + * @since 5.8.0 + */ +function register_block_core_post_terms() { + register_block_type_from_metadata( + __DIR__ . '/post-terms', + array( + 'render_callback' => 'render_block_core_post_terms', + 'variation_callback' => 'block_core_post_terms_build_variations', + ) + ); +} +add_action( 'init', 'register_block_core_post_terms' ); diff --git a/src/wp-includes/blocks/post-terms/block.json b/src/wp-includes/blocks/post-terms/block.json new file mode 100644 index 0000000000000..5dcb079d34713 --- /dev/null +++ b/src/wp-includes/blocks/post-terms/block.json @@ -0,0 +1,79 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/post-terms", + "title": "Post Terms", + "category": "theme", + "description": "Post terms.", + "textdomain": "default", + "attributes": { + "term": { + "type": "string" + }, + "separator": { + "type": "string", + "default": ", " + }, + "prefix": { + "type": "string", + "default": "", + "role": "content" + }, + "suffix": { + "type": "string", + "default": "", + "role": "content" + } + }, + "usesContext": [ "postId", "postType" ], + "example": { + "viewportWidth": 350 + }, + "supports": { + "anchor": true, + "html": false, + "color": { + "gradients": true, + "link": true, + "__experimentalDefaultControls": { + "background": true, + "text": true, + "link": true + } + }, + "spacing": { + "margin": true, + "padding": true + }, + "typography": { + "fontSize": true, + "lineHeight": true, + "textAlign": true, + "__experimentalFontFamily": true, + "__experimentalFontWeight": true, + "__experimentalFontStyle": true, + "__experimentalTextTransform": true, + "__experimentalTextDecoration": true, + "__experimentalLetterSpacing": true, + "__experimentalDefaultControls": { + "fontSize": true + } + }, + "interactivity": { + "clientNavigation": true + }, + "__experimentalBorder": { + "radius": true, + "color": true, + "width": true, + "style": true, + "__experimentalDefaultControls": { + "radius": true, + "color": true, + "width": true, + "style": true + } + } + }, + "style": "wp-block-post-terms" +} diff --git a/src/wp-includes/blocks/post-time-to-read.php b/src/wp-includes/blocks/post-time-to-read.php new file mode 100644 index 0000000000000..74a091d97c335 --- /dev/null +++ b/src/wp-includes/blocks/post-time-to-read.php @@ -0,0 +1,185 @@ + '/<\/?[a-z][^>]*?>/i', + 'html_comment_regexp' => '//', + 'space_regexp' => '/ | /i', + 'html_entity_regexp' => '/&\S+?;/', + 'connector_regexp' => "/--|\x{2014}/u", + 'remove_regexp' => "/[\x{0021}-\x{0040}\x{005B}-\x{0060}\x{007B}-\x{007E}\x{0080}-\x{00BF}\x{00D7}\x{00F7}\x{2000}-\x{2BFF}\x{2E00}-\x{2E7F}]/u", + 'astral_regexp' => "/[\x{010000}-\x{10FFFF}]/u", + 'words_regexp' => '/\S\s+/u', + 'characters_excluding_spaces_regexp' => '/\S/u', + 'characters_including_spaces_regexp' => "/[^\f\n\r\t\v\x{00AD}\x{2028}\x{2029}]/u", + ); + + $count = 0; + + if ( '' === trim( $text ) ) { + return $count; + } + + // Sanitize type to one of three possibilities: 'words', 'characters_excluding_spaces' or 'characters_including_spaces'. + if ( 'characters_excluding_spaces' !== $type && 'characters_including_spaces' !== $type ) { + $type = 'words'; + } + + $text .= "\n"; + + // Replace all HTML with a new-line. + $text = preg_replace( $settings['html_regexp'], "\n", $text ); + + // Remove all HTML comments. + $text = preg_replace( $settings['html_comment_regexp'], '', $text ); + + // If a shortcode regular expression has been provided use it to remove shortcodes. + if ( ! empty( $settings['shortcodes_regexp'] ) ) { + $text = preg_replace( $settings['shortcodes_regexp'], "\n", $text ); + } + + // Normalize non-breaking space to a normal space. + $text = preg_replace( $settings['space_regexp'], ' ', $text ); + + if ( 'words' === $type ) { + // Remove HTML Entities. + $text = preg_replace( $settings['html_entity_regexp'], '', $text ); + + // Convert connectors to spaces to count attached text as words. + $text = preg_replace( $settings['connector_regexp'], ' ', $text ); + + // Remove unwanted characters. + $text = preg_replace( $settings['remove_regexp'], '', $text ); + } else { + // Convert HTML Entities to "a". + $text = preg_replace( $settings['html_entity_regexp'], 'a', $text ); + + // Remove surrogate points. + $text = preg_replace( $settings['astral_regexp'], 'a', $text ); + } + + // Match with the selected type regular expression to count the items. + return (int) preg_match_all( $settings[ $type . '_regexp' ], $text ); +} + +/** + * Renders the `core/post-time-to-read` block on the server. + * + * @since 6.9.0 + * + * @param array $attributes Block attributes. + * @param string $content Block default content. + * @param WP_Block $block Block instance. + * @return string Returns the rendered post author name block. + */ +function render_block_core_post_time_to_read( $attributes, $content, $block ) { + if ( ! isset( $block->context['postId'] ) ) { + return ''; + } + + $content = get_the_content(); + $average_reading_rate = $attributes['averageReadingSpeed'] ?? 189; + + $display_mode = $attributes['displayMode'] ?? 'time'; + + $word_count_type = wp_get_word_count_type(); + $total_words = block_core_post_time_to_read_word_count( $content, $word_count_type ); + + $parts = array(); + + // Add "time to read" part, if enabled. + if ( 'time' === $display_mode ) { + if ( ! empty( $attributes['displayAsRange'] ) ) { + // Calculate faster reading rate with 20% speed = lower minutes, + // and slower reading rate with 20% speed = higher minutes. + $min_minutes = max( 1, (int) round( $total_words / $average_reading_rate * 0.8 ) ); + $max_minutes = max( 1, (int) round( $total_words / $average_reading_rate * 1.2 ) ); + if ( $min_minutes === $max_minutes ) { + $max_minutes = $min_minutes + 1; + } + /* translators: 1: minimum minutes, 2: maximum minutes to read the post. */ + $time_string = sprintf( + /* translators: 1: minimum minutes, 2: maximum minutes to read the post. */ + _x( '%1$s–%2$s minutes', 'Range of minutes to read' ), + $min_minutes, + $max_minutes + ); + } else { + $minutes_to_read = max( 1, (int) round( $total_words / $average_reading_rate ) ); + $time_string = sprintf( + /* translators: %s: the number of minutes to read the post. */ + _n( '%s minute', '%s minutes', $minutes_to_read ), + $minutes_to_read + ); + } + $parts[] = $time_string; + } + + // Add "word count" part, if enabled. + if ( 'words' === $display_mode ) { + $word_count_string = 'words' === $word_count_type ? sprintf( + /* translators: %s: the number of words in the post. */ + _n( '%s word', '%s words', $total_words ), + number_format_i18n( $total_words ) + ) : sprintf( + /* translators: %s: the number of characters in the post. */ + _n( '%s character', '%s characters', $total_words ), + number_format_i18n( $total_words ) + ); + $parts[] = $word_count_string; + } + + $display_string = implode( '
      ', $parts ); + + $align_class_name = empty( $attributes['textAlign'] ) ? '' : "has-text-align-{$attributes['textAlign']}"; + + $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $align_class_name ) ); + + return sprintf( + '
      %2$s
      ', + $wrapper_attributes, + $display_string + ); +} + + +/** + * Registers the `core/post-time-to-read` block on the server. + * + * @since 6.9.0 + */ +function register_block_core_post_time_to_read() { + register_block_type_from_metadata( + __DIR__ . '/post-time-to-read', + array( + 'render_callback' => 'render_block_core_post_time_to_read', + ) + ); +} + +add_action( 'init', 'register_block_core_post_time_to_read' ); diff --git a/src/wp-includes/blocks/post-time-to-read/block.json b/src/wp-includes/blocks/post-time-to-read/block.json new file mode 100644 index 0000000000000..18fd93c74d015 --- /dev/null +++ b/src/wp-includes/blocks/post-time-to-read/block.json @@ -0,0 +1,66 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/post-time-to-read", + "title": "Time to Read", + "category": "theme", + "description": "Show minutes required to finish reading the post. Can also show a word count.", + "textdomain": "default", + "usesContext": [ "postId", "postType" ], + "attributes": { + "displayAsRange": { + "type": "boolean", + "default": true + }, + "displayMode": { + "type": "string", + "default": "time" + }, + "averageReadingSpeed": { + "type": "number", + "default": 189 + } + }, + "supports": { + "anchor": true, + "color": { + "gradients": true, + "__experimentalDefaultControls": { + "background": true, + "text": true + } + }, + "html": false, + "spacing": { + "margin": true, + "padding": true, + "__experimentalDefaultControls": { + "margin": false, + "padding": false + } + }, + "typography": { + "fontSize": true, + "lineHeight": true, + "textAlign": true, + "__experimentalFontFamily": true, + "__experimentalFontWeight": true, + "__experimentalFontStyle": true, + "__experimentalTextTransform": true, + "__experimentalTextDecoration": true, + "__experimentalLetterSpacing": true, + "__experimentalDefaultControls": { + "fontSize": true + } + }, + "interactivity": { + "clientNavigation": true + }, + "__experimentalBorder": { + "radius": true, + "color": true, + "width": true, + "style": true + } + } +} diff --git a/src/wp-includes/blocks/post-title.php b/src/wp-includes/blocks/post-title.php new file mode 100644 index 0000000000000..ed27f2e4158eb --- /dev/null +++ b/src/wp-includes/blocks/post-title.php @@ -0,0 +1,74 @@ +context['postId'] ) ) { + return ''; + } + + /** + * The `$post` argument is intentionally omitted so that changes are reflected when previewing a post. + * See: https://github.com/WordPress/gutenberg/pull/37622#issuecomment-1000932816. + */ + $title = get_the_title(); + + if ( ! $title ) { + return ''; + } + + $tag_name = 'h2'; + if ( isset( $attributes['level'] ) ) { + $tag_name = 0 === $attributes['level'] ? 'p' : 'h' . (int) $attributes['level']; + } + + if ( isset( $attributes['isLink'] ) && $attributes['isLink'] ) { + $rel = ! empty( $attributes['rel'] ) ? 'rel="' . esc_attr( $attributes['rel'] ) . '"' : ''; + $title = sprintf( '%4$s', esc_url( get_the_permalink( $block->context['postId'] ) ), esc_attr( $attributes['linkTarget'] ), $rel, $title ); + } + + $classes = array(); + if ( isset( $attributes['textAlign'] ) ) { + $classes[] = 'has-text-align-' . $attributes['textAlign']; + } + if ( isset( $attributes['style']['elements']['link']['color']['text'] ) ) { + $classes[] = 'has-link-color'; + } + $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => implode( ' ', $classes ) ) ); + + return sprintf( + '<%1$s %2$s>%3$s', + $tag_name, + $wrapper_attributes, + $title + ); +} + +/** + * Registers the `core/post-title` block on the server. + * + * @since 5.8.0 + */ +function register_block_core_post_title() { + register_block_type_from_metadata( + __DIR__ . '/post-title', + array( + 'render_callback' => 'render_block_core_post_title', + ) + ); +} +add_action( 'init', 'register_block_core_post_title' ); diff --git a/src/wp-includes/blocks/post-title/block.json b/src/wp-includes/blocks/post-title/block.json new file mode 100644 index 0000000000000..1fb7efcf82db5 --- /dev/null +++ b/src/wp-includes/blocks/post-title/block.json @@ -0,0 +1,88 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/post-title", + "title": "Title", + "category": "theme", + "description": "Displays the title of a post, page, or any other content-type.", + "textdomain": "default", + "usesContext": [ "postId", "postType", "queryId" ], + "attributes": { + "textAlign": { + "type": "string" + }, + "level": { + "type": "number", + "default": 2 + }, + "levelOptions": { + "type": "array" + }, + "isLink": { + "type": "boolean", + "default": false, + "role": "content" + }, + "rel": { + "type": "string", + "attribute": "rel", + "default": "", + "role": "content" + }, + "linkTarget": { + "type": "string", + "default": "_self", + "role": "content" + } + }, + "example": { + "viewportWidth": 350 + }, + "supports": { + "anchor": true, + "align": [ "wide", "full" ], + "html": false, + "color": { + "gradients": true, + "link": true, + "__experimentalDefaultControls": { + "background": true, + "text": true, + "link": true + } + }, + "spacing": { + "margin": true, + "padding": true + }, + "typography": { + "fontSize": true, + "lineHeight": true, + "__experimentalFontFamily": true, + "__experimentalFontWeight": true, + "__experimentalFontStyle": true, + "__experimentalTextTransform": true, + "__experimentalTextDecoration": true, + "__experimentalLetterSpacing": true, + "__experimentalDefaultControls": { + "fontSize": true + } + }, + "interactivity": { + "clientNavigation": true + }, + "__experimentalBorder": { + "radius": true, + "color": true, + "width": true, + "style": true, + "__experimentalDefaultControls": { + "radius": true, + "color": true, + "width": true, + "style": true + } + } + }, + "style": "wp-block-post-title" +} diff --git a/src/wp-includes/blocks/preformatted/block.json b/src/wp-includes/blocks/preformatted/block.json new file mode 100644 index 0000000000000..c25b8ce37093a --- /dev/null +++ b/src/wp-includes/blocks/preformatted/block.json @@ -0,0 +1,61 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/preformatted", + "title": "Preformatted", + "category": "text", + "description": "Add text that respects your spacing and tabs, and also allows styling.", + "textdomain": "default", + "attributes": { + "content": { + "type": "rich-text", + "source": "rich-text", + "selector": "pre", + "__unstablePreserveWhiteSpace": true, + "role": "content" + } + }, + "supports": { + "anchor": true, + "color": { + "gradients": true, + "__experimentalDefaultControls": { + "background": true, + "text": true + } + }, + "spacing": { + "padding": true, + "margin": true + }, + "typography": { + "fontSize": true, + "lineHeight": true, + "__experimentalFontFamily": true, + "__experimentalFontWeight": true, + "__experimentalFontStyle": true, + "__experimentalTextTransform": true, + "__experimentalTextDecoration": true, + "__experimentalLetterSpacing": true, + "__experimentalDefaultControls": { + "fontSize": true + } + }, + "interactivity": { + "clientNavigation": true + }, + "__experimentalBorder": { + "radius": true, + "color": true, + "width": true, + "style": true, + "__experimentalDefaultControls": { + "radius": true, + "color": true, + "width": true, + "style": true + } + } + }, + "style": "wp-block-preformatted" +} diff --git a/src/wp-includes/blocks/pullquote/block.json b/src/wp-includes/blocks/pullquote/block.json new file mode 100644 index 0000000000000..271bba74d0252 --- /dev/null +++ b/src/wp-includes/blocks/pullquote/block.json @@ -0,0 +1,92 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/pullquote", + "title": "Pullquote", + "category": "text", + "description": "Give special visual emphasis to a quote from your text.", + "textdomain": "default", + "attributes": { + "value": { + "type": "rich-text", + "source": "rich-text", + "selector": "p", + "role": "content" + }, + "citation": { + "type": "rich-text", + "source": "rich-text", + "selector": "cite", + "role": "content" + }, + "textAlign": { + "type": "string" + } + }, + "supports": { + "anchor": true, + "align": [ "left", "right", "wide", "full" ], + "background": { + "backgroundImage": true, + "backgroundSize": true, + "__experimentalDefaultControls": { + "backgroundImage": true + } + }, + "color": { + "gradients": true, + "background": true, + "link": true, + "__experimentalDefaultControls": { + "background": true, + "text": true + } + }, + "dimensions": { + "minHeight": true, + "__experimentalDefaultControls": { + "minHeight": false + } + }, + "spacing": { + "margin": true, + "padding": true + }, + "typography": { + "fontSize": true, + "lineHeight": true, + "__experimentalFontFamily": true, + "__experimentalFontWeight": true, + "__experimentalFontStyle": true, + "__experimentalTextTransform": true, + "__experimentalTextDecoration": true, + "__experimentalLetterSpacing": true, + "__experimentalDefaultControls": { + "fontSize": true + } + }, + "__experimentalBorder": { + "color": true, + "radius": true, + "style": true, + "width": true, + "__experimentalDefaultControls": { + "color": true, + "radius": true, + "style": true, + "width": true + } + }, + "__experimentalStyle": { + "typography": { + "fontSize": "1.5em", + "lineHeight": "1.6" + } + }, + "interactivity": { + "clientNavigation": true + } + }, + "editorStyle": "wp-block-pullquote-editor", + "style": "wp-block-pullquote" +} diff --git a/src/wp-includes/blocks/query-no-results.php b/src/wp-includes/blocks/query-no-results.php new file mode 100644 index 0000000000000..34d6b321cbd6b --- /dev/null +++ b/src/wp-includes/blocks/query-no-results.php @@ -0,0 +1,65 @@ +context['queryId'] ) ? 'query-' . $block->context['queryId'] . '-page' : 'query-page'; + $page = empty( $_GET[ $page_key ] ) ? 1 : (int) $_GET[ $page_key ]; + + // Override the custom query with the global query if needed. + $use_global_query = ( isset( $block->context['query']['inherit'] ) && $block->context['query']['inherit'] ); + if ( $use_global_query ) { + global $wp_query; + $query = $wp_query; + } else { + $query_args = build_query_vars_from_query_block( $block, $page ); + $query = new WP_Query( $query_args ); + } + + if ( $query->post_count > 0 ) { + return ''; + } + + $classes = ( isset( $attributes['style']['elements']['link']['color']['text'] ) ) ? 'has-link-color' : ''; + $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $classes ) ); + return sprintf( + '
      %2$s
      ', + $wrapper_attributes, + $content + ); +} + +/** + * Registers the `core/query-no-results` block on the server. + * + * @since 6.0.0 + */ +function register_block_core_query_no_results() { + register_block_type_from_metadata( + __DIR__ . '/query-no-results', + array( + 'render_callback' => 'render_block_core_query_no_results', + ) + ); +} +add_action( 'init', 'register_block_core_query_no_results' ); diff --git a/src/wp-includes/blocks/query-no-results/block.json b/src/wp-includes/blocks/query-no-results/block.json new file mode 100644 index 0000000000000..3e6479a5aa20a --- /dev/null +++ b/src/wp-includes/blocks/query-no-results/block.json @@ -0,0 +1,37 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/query-no-results", + "title": "No Results", + "category": "theme", + "description": "Contains the block elements used to render content when no query results are found.", + "ancestor": [ "core/query" ], + "textdomain": "default", + "usesContext": [ "queryId", "query" ], + "supports": { + "anchor": true, + "align": true, + "reusable": false, + "html": false, + "color": { + "gradients": true, + "link": true + }, + "typography": { + "fontSize": true, + "lineHeight": true, + "__experimentalFontFamily": true, + "__experimentalFontWeight": true, + "__experimentalFontStyle": true, + "__experimentalTextTransform": true, + "__experimentalTextDecoration": true, + "__experimentalLetterSpacing": true, + "__experimentalDefaultControls": { + "fontSize": true + } + }, + "interactivity": { + "clientNavigation": true + } + } +} diff --git a/src/wp-includes/blocks/query-pagination-next.php b/src/wp-includes/blocks/query-pagination-next.php new file mode 100644 index 0000000000000..5854f4c4e08cc --- /dev/null +++ b/src/wp-includes/blocks/query-pagination-next.php @@ -0,0 +1,102 @@ +context['queryId'] ) ? 'query-' . $block->context['queryId'] . '-page' : 'query-page'; + $enhanced_pagination = (bool) ( $block->context['enhancedPagination'] ?? false ); + $page = empty( $_GET[ $page_key ] ) ? 1 : (int) $_GET[ $page_key ]; + $max_page = (int) ( $block->context['query']['pages'] ?? 0 ); + + $wrapper_attributes = get_block_wrapper_attributes(); + $show_label = (bool) ( $block->context['showLabel'] ?? true ); + $default_label = __( 'Next Page' ); + $label_text = isset( $attributes['label'] ) && ! empty( $attributes['label'] ) ? esc_html( $attributes['label'] ) : $default_label; + $label = $show_label ? $label_text : ''; + $pagination_arrow = get_query_pagination_arrow( $block, true ); + + if ( ! $label ) { + $wrapper_attributes .= ' aria-label="' . $label_text . '"'; + } + if ( $pagination_arrow ) { + $label .= $pagination_arrow; + } + $content = ''; + + // Check if the pagination is for Query that inherits the global context. + if ( isset( $block->context['query']['inherit'] ) && $block->context['query']['inherit'] ) { + $filter_link_attributes = static function () use ( $wrapper_attributes ) { + return $wrapper_attributes; + }; + add_filter( 'next_posts_link_attributes', $filter_link_attributes ); + // Take into account if we have set a bigger `max page` + // than what the query has. + global $wp_query; + if ( $max_page > $wp_query->max_num_pages ) { + $max_page = $wp_query->max_num_pages; + } + $content = get_next_posts_link( $label, $max_page ); + remove_filter( 'next_posts_link_attributes', $filter_link_attributes ); + } elseif ( ! $max_page || $max_page > $page ) { + $custom_query = new WP_Query( build_query_vars_from_query_block( $block, $page ) ); + $custom_query_max_pages = (int) $custom_query->max_num_pages; + if ( $custom_query_max_pages && $custom_query_max_pages !== $page ) { + $content = sprintf( + '%3$s', + esc_url( add_query_arg( $page_key, $page + 1 ) ), + $wrapper_attributes, + $label + ); + } + wp_reset_postdata(); // Restore original Post Data. + } + + if ( $enhanced_pagination && isset( $content ) ) { + $p = new WP_HTML_Tag_Processor( $content ); + if ( $p->next_tag( + array( + 'tag_name' => 'a', + 'class_name' => 'wp-block-query-pagination-next', + ) + ) ) { + $p->set_attribute( 'data-wp-key', 'query-pagination-next' ); + $p->set_attribute( 'data-wp-on--click', 'core/query::actions.navigate' ); + $p->set_attribute( 'data-wp-on--mouseenter', 'core/query::actions.prefetch' ); + $p->set_attribute( 'data-wp-watch', 'core/query::callbacks.prefetch' ); + $content = $p->get_updated_html(); + } + } + + return $content; +} + +/** + * Registers the `core/query-pagination-next` block on the server. + * + * @since 5.8.0 + */ +function register_block_core_query_pagination_next() { + register_block_type_from_metadata( + __DIR__ . '/query-pagination-next', + array( + 'render_callback' => 'render_block_core_query_pagination_next', + ) + ); +} +add_action( 'init', 'register_block_core_query_pagination_next' ); diff --git a/src/wp-includes/blocks/query-pagination-next/block.json b/src/wp-includes/blocks/query-pagination-next/block.json new file mode 100644 index 0000000000000..86acaa7462d32 --- /dev/null +++ b/src/wp-includes/blocks/query-pagination-next/block.json @@ -0,0 +1,50 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/query-pagination-next", + "title": "Next Page", + "category": "theme", + "parent": [ "core/query-pagination" ], + "description": "Displays the next posts page link.", + "textdomain": "default", + "attributes": { + "label": { + "type": "string" + } + }, + "usesContext": [ + "queryId", + "query", + "paginationArrow", + "showLabel", + "enhancedPagination" + ], + "supports": { + "anchor": true, + "reusable": false, + "html": false, + "color": { + "gradients": true, + "text": false, + "__experimentalDefaultControls": { + "background": true + } + }, + "typography": { + "fontSize": true, + "lineHeight": true, + "__experimentalFontFamily": true, + "__experimentalFontWeight": true, + "__experimentalFontStyle": true, + "__experimentalTextTransform": true, + "__experimentalTextDecoration": true, + "__experimentalLetterSpacing": true, + "__experimentalDefaultControls": { + "fontSize": true + } + }, + "interactivity": { + "clientNavigation": true + } + } +} diff --git a/src/wp-includes/blocks/query-pagination-numbers.php b/src/wp-includes/blocks/query-pagination-numbers.php new file mode 100644 index 0000000000000..35016fb169c6d --- /dev/null +++ b/src/wp-includes/blocks/query-pagination-numbers.php @@ -0,0 +1,133 @@ +context['queryId'] ) ? 'query-' . $block->context['queryId'] . '-page' : 'query-page'; + $enhanced_pagination = (bool) ( $block->context['enhancedPagination'] ?? false ); + $page = empty( $_GET[ $page_key ] ) ? 1 : (int) $_GET[ $page_key ]; + $max_page = (int) ( $block->context['query']['pages'] ?? 0 ); + + $wrapper_attributes = get_block_wrapper_attributes(); + $content = ''; + global $wp_query; + $mid_size = isset( $block->attributes['midSize'] ) ? (int) $block->attributes['midSize'] : null; + if ( isset( $block->context['query']['inherit'] ) && $block->context['query']['inherit'] ) { + // Take into account if we have set a bigger `max page` + // than what the query has. + $total = ! $max_page || $max_page > $wp_query->max_num_pages ? $wp_query->max_num_pages : $max_page; + $paginate_args = array( + 'prev_next' => false, + 'total' => $total, + ); + if ( null !== $mid_size ) { + $paginate_args['mid_size'] = $mid_size; + } + $content = paginate_links( $paginate_args ); + } else { + $block_query = new WP_Query( build_query_vars_from_query_block( $block, $page ) ); + // `paginate_links` works with the global $wp_query, so we have to + // temporarily switch it with our custom query. + $prev_wp_query = $wp_query; + $wp_query = $block_query; + $total = ! $max_page || $max_page > $wp_query->max_num_pages ? $wp_query->max_num_pages : $max_page; + $paginate_args = array( + 'base' => '%_%', + 'format' => "?$page_key=%#%", + 'current' => max( 1, $page ), + 'total' => $total, + 'prev_next' => false, + ); + if ( null !== $mid_size ) { + $paginate_args['mid_size'] = $mid_size; + } + if ( 1 !== $page ) { + /** + * `paginate_links` doesn't use the provided `format` when the page is `1`. + * This is great for the main query as it removes the extra query params + * making the URL shorter, but in the case of multiple custom queries is + * problematic. It results in returning an empty link which ends up with + * a link to the current page. + * + * A way to address this is to add a `fake` query arg with no value that + * is the same for all custom queries. This way the link is not empty and + * preserves all the other existent query args. + * + * @see https://developer.wordpress.org/reference/functions/paginate_links/ + * + * The proper fix of this should be in core. Track Ticket: + * @see https://core.trac.wordpress.org/ticket/53868 + * + * TODO: After two WP versions (starting from the WP version the core patch landed), + * we should remove this and call `paginate_links` with the proper new arg. + */ + $paginate_args['add_args'] = array( 'cst' => '' ); + } + // We still need to preserve `paged` query param if exists, as is used + // for Queries that inherit from global context. + $paged = empty( $_GET['paged'] ) ? null : (int) $_GET['paged']; + if ( $paged ) { + $paginate_args['add_args'] = array( 'paged' => $paged ); + } + $content = paginate_links( $paginate_args ); + wp_reset_postdata(); // Restore original Post Data. + $wp_query = $prev_wp_query; + } + + if ( empty( $content ) ) { + return ''; + } + + if ( $enhanced_pagination ) { + $p = new WP_HTML_Tag_Processor( $content ); + $tag_index = 0; + while ( $p->next_tag( + array( 'class_name' => 'page-numbers' ) + ) ) { + if ( null === $p->get_attribute( 'data-wp-key' ) ) { + $p->set_attribute( 'data-wp-key', 'index-' . $tag_index++ ); + } + if ( 'A' === $p->get_tag() ) { + $p->set_attribute( 'data-wp-on--click', 'core/query::actions.navigate' ); + } + } + $content = $p->get_updated_html(); + } + + return sprintf( + '
      %2$s
      ', + $wrapper_attributes, + $content + ); +} + +/** + * Registers the `core/query-pagination-numbers` block on the server. + * + * @since 5.8.0 + */ +function register_block_core_query_pagination_numbers() { + register_block_type_from_metadata( + __DIR__ . '/query-pagination-numbers', + array( + 'render_callback' => 'render_block_core_query_pagination_numbers', + ) + ); +} +add_action( 'init', 'register_block_core_query_pagination_numbers' ); diff --git a/src/wp-includes/blocks/query-pagination-numbers/block.json b/src/wp-includes/blocks/query-pagination-numbers/block.json new file mode 100644 index 0000000000000..75b2e4476accb --- /dev/null +++ b/src/wp-includes/blocks/query-pagination-numbers/block.json @@ -0,0 +1,46 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/query-pagination-numbers", + "title": "Page Numbers", + "category": "theme", + "parent": [ "core/query-pagination" ], + "description": "Displays a list of page numbers for pagination.", + "textdomain": "default", + "attributes": { + "midSize": { + "type": "number", + "default": 2 + } + }, + "usesContext": [ "queryId", "query", "enhancedPagination" ], + "supports": { + "anchor": true, + "reusable": false, + "html": false, + "color": { + "gradients": true, + "text": false, + "__experimentalDefaultControls": { + "background": true + } + }, + "typography": { + "fontSize": true, + "lineHeight": true, + "__experimentalFontFamily": true, + "__experimentalFontWeight": true, + "__experimentalFontStyle": true, + "__experimentalTextTransform": true, + "__experimentalTextDecoration": true, + "__experimentalLetterSpacing": true, + "__experimentalDefaultControls": { + "fontSize": true + } + }, + "interactivity": { + "clientNavigation": true + } + }, + "editorStyle": "wp-block-query-pagination-numbers-editor" +} diff --git a/src/wp-includes/blocks/query-pagination-previous.php b/src/wp-includes/blocks/query-pagination-previous.php new file mode 100644 index 0000000000000..5fc53e7c3c5c7 --- /dev/null +++ b/src/wp-includes/blocks/query-pagination-previous.php @@ -0,0 +1,95 @@ +context['queryId'] ) ? 'query-' . $block->context['queryId'] . '-page' : 'query-page'; + $enhanced_pagination = (bool) ( $block->context['enhancedPagination'] ?? false ); + $max_page = (int) ( $block->context['query']['pages'] ?? 0 ); + $page = empty( $_GET[ $page_key ] ) ? 1 : (int) $_GET[ $page_key ]; + $wrapper_attributes = get_block_wrapper_attributes(); + $show_label = (bool) ( $block->context['showLabel'] ?? true ); + $default_label = __( 'Previous Page' ); + $label_text = isset( $attributes['label'] ) && ! empty( $attributes['label'] ) ? esc_html( $attributes['label'] ) : $default_label; + $label = $show_label ? $label_text : ''; + $pagination_arrow = get_query_pagination_arrow( $block, false ); + if ( ! $label ) { + $wrapper_attributes .= ' aria-label="' . $label_text . '"'; + } + if ( $pagination_arrow ) { + $label = $pagination_arrow . $label; + } + $content = ''; + // Check if the pagination is for Query that inherits the global context + // and handle appropriately. + if ( isset( $block->context['query']['inherit'] ) && $block->context['query']['inherit'] ) { + $filter_link_attributes = static function () use ( $wrapper_attributes ) { + return $wrapper_attributes; + }; + + add_filter( 'previous_posts_link_attributes', $filter_link_attributes ); + $content = get_previous_posts_link( $label ); + remove_filter( 'previous_posts_link_attributes', $filter_link_attributes ); + } else { + $block_query = new WP_Query( build_query_vars_from_query_block( $block, $page ) ); + $block_max_pages = $block_query->max_num_pages; + $total = ! $max_page || $max_page > $block_max_pages ? $block_max_pages : $max_page; + wp_reset_postdata(); + + if ( 1 < $page && $page <= $total ) { + $content = sprintf( + '%3$s', + esc_url( add_query_arg( $page_key, $page - 1 ) ), + $wrapper_attributes, + $label + ); + } + } + + if ( $enhanced_pagination && isset( $content ) ) { + $p = new WP_HTML_Tag_Processor( $content ); + if ( $p->next_tag( + array( + 'tag_name' => 'a', + 'class_name' => 'wp-block-query-pagination-previous', + ) + ) ) { + $p->set_attribute( 'data-wp-key', 'query-pagination-previous' ); + $p->set_attribute( 'data-wp-on--click', 'core/query::actions.navigate' ); + $p->set_attribute( 'data-wp-on--mouseenter', 'core/query::actions.prefetch' ); + $p->set_attribute( 'data-wp-watch', 'core/query::callbacks.prefetch' ); + $content = $p->get_updated_html(); + } + } + + return $content; +} + +/** + * Registers the `core/query-pagination-previous` block on the server. + * + * @since 5.8.0 + */ +function register_block_core_query_pagination_previous() { + register_block_type_from_metadata( + __DIR__ . '/query-pagination-previous', + array( + 'render_callback' => 'render_block_core_query_pagination_previous', + ) + ); +} +add_action( 'init', 'register_block_core_query_pagination_previous' ); diff --git a/src/wp-includes/blocks/query-pagination-previous/block.json b/src/wp-includes/blocks/query-pagination-previous/block.json new file mode 100644 index 0000000000000..f13c9d4704cf1 --- /dev/null +++ b/src/wp-includes/blocks/query-pagination-previous/block.json @@ -0,0 +1,50 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/query-pagination-previous", + "title": "Previous Page", + "category": "theme", + "parent": [ "core/query-pagination" ], + "description": "Displays the previous posts page link.", + "textdomain": "default", + "attributes": { + "label": { + "type": "string" + } + }, + "usesContext": [ + "queryId", + "query", + "paginationArrow", + "showLabel", + "enhancedPagination" + ], + "supports": { + "anchor": true, + "reusable": false, + "html": false, + "color": { + "gradients": true, + "text": false, + "__experimentalDefaultControls": { + "background": true + } + }, + "typography": { + "fontSize": true, + "lineHeight": true, + "__experimentalFontFamily": true, + "__experimentalFontWeight": true, + "__experimentalFontStyle": true, + "__experimentalTextTransform": true, + "__experimentalTextDecoration": true, + "__experimentalLetterSpacing": true, + "__experimentalDefaultControls": { + "fontSize": true + } + }, + "interactivity": { + "clientNavigation": true + } + } +} diff --git a/src/wp-includes/blocks/query-pagination.php b/src/wp-includes/blocks/query-pagination.php new file mode 100644 index 0000000000000..acafe968c0bec --- /dev/null +++ b/src/wp-includes/blocks/query-pagination.php @@ -0,0 +1,51 @@ + __( 'Pagination' ), + 'class' => $classes, + ) + ); + + return sprintf( + '', + $wrapper_attributes, + $content + ); +} + +/** + * Registers the `core/query-pagination` block on the server. + * + * @since 5.8.0 + */ +function register_block_core_query_pagination() { + register_block_type_from_metadata( + __DIR__ . '/query-pagination', + array( + 'render_callback' => 'render_block_core_query_pagination', + ) + ); +} +add_action( 'init', 'register_block_core_query_pagination' ); diff --git a/src/wp-includes/blocks/query-pagination/block.json b/src/wp-includes/blocks/query-pagination/block.json new file mode 100644 index 0000000000000..c5e8cde66e7bc --- /dev/null +++ b/src/wp-includes/blocks/query-pagination/block.json @@ -0,0 +1,70 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/query-pagination", + "title": "Pagination", + "category": "theme", + "ancestor": [ "core/query" ], + "allowedBlocks": [ + "core/query-pagination-previous", + "core/query-pagination-numbers", + "core/query-pagination-next" + ], + "description": "Displays a paginated navigation to next/previous set of posts, when applicable.", + "textdomain": "default", + "attributes": { + "paginationArrow": { + "type": "string", + "default": "none" + }, + "showLabel": { + "type": "boolean", + "default": true + } + }, + "usesContext": [ "queryId", "query" ], + "providesContext": { + "paginationArrow": "paginationArrow", + "showLabel": "showLabel" + }, + "supports": { + "anchor": true, + "align": true, + "reusable": false, + "html": false, + "color": { + "gradients": true, + "link": true, + "__experimentalDefaultControls": { + "background": true, + "text": true, + "link": true + } + }, + "layout": { + "allowSwitching": false, + "allowInheriting": false, + "default": { + "type": "flex" + } + }, + "typography": { + "fontSize": true, + "lineHeight": true, + "__experimentalFontFamily": true, + "__experimentalFontWeight": true, + "__experimentalFontStyle": true, + "__experimentalTextTransform": true, + "__experimentalTextDecoration": true, + "__experimentalLetterSpacing": true, + "__experimentalDefaultControls": { + "fontSize": true + } + }, + "interactivity": { + "clientNavigation": true + } + }, + "editorStyle": "wp-block-query-pagination-editor", + "style": "wp-block-query-pagination" +} diff --git a/src/wp-includes/blocks/query-title.php b/src/wp-includes/blocks/query-title.php new file mode 100644 index 0000000000000..d26a3d08ae42a --- /dev/null +++ b/src/wp-includes/blocks/query-title.php @@ -0,0 +1,103 @@ +context['query']['postType'] ?? get_post_type(); + + if ( ! $type || + ( 'archive' === $type && ! $is_archive ) || + ( 'search' === $type && ! $is_search ) || + ( 'post-type' === $type && ! $post_type ) + ) { + return ''; + } + $title = ''; + if ( $is_archive ) { + $show_prefix = $attributes['showPrefix'] ?? true; + if ( ! $show_prefix ) { + add_filter( 'get_the_archive_title_prefix', '__return_empty_string', 1 ); + $title = get_the_archive_title(); + remove_filter( 'get_the_archive_title_prefix', '__return_empty_string', 1 ); + } else { + $title = get_the_archive_title(); + } + } + if ( $is_search ) { + $title = __( 'Search results' ); + + if ( isset( $attributes['showSearchTerm'] ) && $attributes['showSearchTerm'] ) { + $title = sprintf( + /* translators: %s is the search term. */ + __( 'Search results for: “%s”' ), + get_search_query() + ); + } + } + if ( 'post-type' === $type ) { + $post_type_object = get_post_type_object( $post_type ); + + if ( ! $post_type_object ) { + return ''; + } + + $post_type_name = $post_type_object->labels->singular_name; + $show_prefix = $attributes['showPrefix'] ?? true; + + if ( $show_prefix ) { + $title = sprintf( + /* translators: %s is the post type name. */ + __( 'Post Type: “%s”' ), + $post_type_name + ); + } else { + $title = $post_type_name; + } + } + + $level = (int) ( $attributes['level'] ?? 1 ); + $tag_name = 0 === $level ? 'p' : 'h' . $level; + + $align_class_name = empty( $attributes['textAlign'] ) ? '' : "has-text-align-{$attributes['textAlign']}"; + $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $align_class_name ) ); + return sprintf( + '<%1$s %2$s>%3$s', + $tag_name, + $wrapper_attributes, + $title + ); +} + +/** + * Registers the `core/query-title` block on the server. + * + * @since 5.8.0 + */ +function register_block_core_query_title() { + register_block_type_from_metadata( + __DIR__ . '/query-title', + array( + 'render_callback' => 'render_block_core_query_title', + ) + ); +} +add_action( 'init', 'register_block_core_query_title' ); diff --git a/src/wp-includes/blocks/query-title/block.json b/src/wp-includes/blocks/query-title/block.json new file mode 100644 index 0000000000000..41e9e3fd29b62 --- /dev/null +++ b/src/wp-includes/blocks/query-title/block.json @@ -0,0 +1,83 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/query-title", + "title": "Query Title", + "category": "theme", + "description": "Display the query title.", + "textdomain": "default", + "attributes": { + "type": { + "type": "string" + }, + "textAlign": { + "type": "string" + }, + "level": { + "type": "number", + "default": 1 + }, + "levelOptions": { + "type": "array" + }, + "showPrefix": { + "type": "boolean", + "default": true + }, + "showSearchTerm": { + "type": "boolean", + "default": true + } + }, + "example": { + "attributes": { + "type": "search" + } + }, + "usesContext": [ "query" ], + "supports": { + "anchor": true, + "align": [ "wide", "full" ], + "html": false, + "color": { + "gradients": true, + "__experimentalDefaultControls": { + "background": true, + "text": true + } + }, + "spacing": { + "margin": true, + "padding": true + }, + "typography": { + "fontSize": true, + "lineHeight": true, + "__experimentalFontFamily": true, + "__experimentalFontStyle": true, + "__experimentalFontWeight": true, + "__experimentalLetterSpacing": true, + "__experimentalTextTransform": true, + "__experimentalTextDecoration": true, + "__experimentalDefaultControls": { + "fontSize": true + } + }, + "interactivity": { + "clientNavigation": true + }, + "__experimentalBorder": { + "radius": true, + "color": true, + "width": true, + "style": true, + "__experimentalDefaultControls": { + "radius": true, + "color": true, + "width": true, + "style": true + } + } + }, + "style": "wp-block-query-title" +} diff --git a/src/wp-includes/blocks/query-total.php b/src/wp-includes/blocks/query-total.php new file mode 100644 index 0000000000000..54da2ca5757ae --- /dev/null +++ b/src/wp-includes/blocks/query-total.php @@ -0,0 +1,90 @@ +context['query']['inherit'] ?? false ) { + $query_to_use = $wp_query; + $current_page = max( 1, (int) get_query_var( 'paged', 1 ) ); + } else { + $page_key = isset( $block->context['queryId'] ) ? 'query-' . $block->context['queryId'] . '-page' : 'query-page'; + $current_page = (int) ( $_GET[ $page_key ] ?? 1 ); + $query_to_use = new WP_Query( build_query_vars_from_query_block( $block, $current_page ) ); + } + + $max_rows = $query_to_use->found_posts; + $posts_per_page = (int) $query_to_use->get( 'posts_per_page' ); + + // Calculate the range of posts being displayed. + $start = ( 0 === $max_rows ) ? 0 : ( ( $current_page - 1 ) * $posts_per_page + 1 ); + $end = min( $start + $posts_per_page - 1, $max_rows ); + + // Prepare the display based on the `displayType` attribute. + $output = ''; + switch ( $attributes['displayType'] ) { + case 'range-display': + if ( $start === $end ) { + $output = sprintf( + /* translators: 1: Start index of posts, 2: Total number of posts */ + __( 'Displaying %1$s of %2$s' ), + $start, + $max_rows + ); + } else { + $output = sprintf( + /* translators: 1: Start index of posts, 2: End index of posts, 3: Total number of posts */ + __( 'Displaying %1$s – %2$s of %3$s' ), + $start, + $end, + $max_rows + ); + } + + break; + + case 'total-results': + default: + // translators: %d: number of results. + $output = sprintf( _n( '%d result found', '%d results found', $max_rows ), $max_rows ); + break; + } + + return sprintf( + '
      %2$s
      ', + $wrapper_attributes, + $output + ); +} + +/** + * Registers the `query-total` block. + * + * @since 6.8.0 + */ +function register_block_core_query_total() { + register_block_type_from_metadata( + __DIR__ . '/query-total', + array( + 'render_callback' => 'render_block_core_query_total', + ) + ); +} +add_action( 'init', 'register_block_core_query_total' ); diff --git a/src/wp-includes/blocks/query-total/block.json b/src/wp-includes/blocks/query-total/block.json new file mode 100644 index 0000000000000..9cd803a5665b9 --- /dev/null +++ b/src/wp-includes/blocks/query-total/block.json @@ -0,0 +1,62 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/query-total", + "title": "Query Total", + "category": "theme", + "ancestor": [ "core/query" ], + "description": "Display the total number of results in a query.", + "textdomain": "default", + "attributes": { + "displayType": { + "type": "string", + "default": "total-results" + } + }, + "usesContext": [ "queryId", "query" ], + "supports": { + "anchor": true, + "align": [ "wide", "full" ], + "html": false, + "spacing": { + "margin": true, + "padding": true + }, + "color": { + "gradients": true, + "__experimentalDefaultControls": { + "background": true, + "text": true + } + }, + "typography": { + "fontSize": true, + "lineHeight": true, + "__experimentalFontFamily": true, + "__experimentalFontWeight": true, + "__experimentalFontStyle": true, + "__experimentalTextTransform": true, + "__experimentalTextDecoration": true, + "__experimentalLetterSpacing": true, + "__experimentalDefaultControls": { + "fontSize": true + } + }, + "__experimentalBorder": { + "radius": true, + "color": true, + "width": true, + "style": true, + "__experimentalDefaultControls": { + "radius": true, + "color": true, + "width": true, + "style": true + } + }, + "interactivity": { + "clientNavigation": true + } + }, + "style": "wp-block-query-total" +} diff --git a/src/wp-includes/blocks/query.php b/src/wp-includes/blocks/query.php new file mode 100644 index 0000000000000..6b544cd99ae8c --- /dev/null +++ b/src/wp-includes/blocks/query.php @@ -0,0 +1,152 @@ +next_tag() ) { + // Add the necessary directives. + $p->set_attribute( 'data-wp-interactive', 'core/query' ); + $p->set_attribute( 'data-wp-router-region', 'query-' . $attributes['queryId'] ); + $p->set_attribute( 'data-wp-context', '{}' ); + $p->set_attribute( 'data-wp-key', $attributes['queryId'] ); + $content = $p->get_updated_html(); + } + } + + // Add the styles to the block type if the block is interactive and remove + // them if it's not. + $style_asset = 'wp-block-query'; + if ( ! wp_style_is( $style_asset ) ) { + $style_handles = $block->block_type->style_handles; + // If the styles are not needed, and they are still in the `style_handles`, remove them. + if ( ! $is_interactive && in_array( $style_asset, $style_handles, true ) ) { + $block->block_type->style_handles = array_diff( $style_handles, array( $style_asset ) ); + } + // If the styles are needed, but they were previously removed, add them again. + if ( $is_interactive && ! in_array( $style_asset, $style_handles, true ) ) { + $block->block_type->style_handles = array_merge( $style_handles, array( $style_asset ) ); + } + } + + return $content; +} + +/** + * Registers the `core/query` block on the server. + * + * @since 5.8.0 + */ +function register_block_core_query() { + register_block_type_from_metadata( + __DIR__ . '/query', + array( + 'render_callback' => 'render_block_core_query', + ) + ); +} +add_action( 'init', 'register_block_core_query' ); + +/** + * Traverse the tree of blocks looking for any plugin block (i.e., a block from + * an installed plugin) inside a Query block with the enhanced pagination + * enabled. If at least one is found, the enhanced pagination is effectively + * disabled to prevent any potential incompatibilities. + * + * @since 6.4.0 + * + * @param array $parsed_block The block being rendered. + * @return array Returns the parsed block, unmodified. + */ +function block_core_query_disable_enhanced_pagination( $parsed_block ) { + static $enhanced_query_stack = array(); + static $dirty_enhanced_queries = array(); + static $render_query_callback = null; + + $block_name = $parsed_block['blockName']; + $block_type = WP_Block_Type_Registry::get_instance()->get_registered( $block_name ); + $has_enhanced_pagination = isset( $parsed_block['attrs']['enhancedPagination'] ) && true === $parsed_block['attrs']['enhancedPagination'] && isset( $parsed_block['attrs']['queryId'] ); + /* + * Client side navigation can be true in two states: + * - supports.interactivity = true; + * - supports.interactivity.clientNavigation = true; + */ + $supports_client_navigation = ( isset( $block_type->supports['interactivity']['clientNavigation'] ) && true === $block_type->supports['interactivity']['clientNavigation'] ) + || ( isset( $block_type->supports['interactivity'] ) && true === $block_type->supports['interactivity'] ); + + if ( 'core/query' === $block_name && $has_enhanced_pagination ) { + $enhanced_query_stack[] = $parsed_block['attrs']['queryId']; + + if ( ! isset( $render_query_callback ) ) { + /** + * Filter that disables the enhanced pagination feature during block + * rendering when a plugin block has been found inside. It does so + * by adding an attribute called `data-wp-navigation-disabled` which + * is later handled by the front-end logic. + * + * @param string $content The block content. + * @param array $block The full block, including name and attributes. + * @return string Returns the modified output of the query block. + */ + $render_query_callback = static function ( $content, $block ) use ( &$enhanced_query_stack, &$dirty_enhanced_queries, &$render_query_callback ) { + $has_enhanced_pagination = isset( $block['attrs']['enhancedPagination'] ) && true === $block['attrs']['enhancedPagination'] && isset( $block['attrs']['queryId'] ); + + if ( ! $has_enhanced_pagination ) { + return $content; + } + + if ( isset( $dirty_enhanced_queries[ $block['attrs']['queryId'] ] ) ) { + // Disable navigation in the router store config. + wp_interactivity_config( 'core/router', array( 'clientNavigationDisabled' => true ) ); + $dirty_enhanced_queries[ $block['attrs']['queryId'] ] = null; + } + + array_pop( $enhanced_query_stack ); + + if ( empty( $enhanced_query_stack ) ) { + remove_filter( 'render_block_core/query', $render_query_callback ); + $render_query_callback = null; + } + + return $content; + }; + + add_filter( 'render_block_core/query', $render_query_callback, 10, 2 ); + } + } elseif ( + ! empty( $enhanced_query_stack ) && + isset( $block_name ) && + ( ! $supports_client_navigation ) + ) { + foreach ( $enhanced_query_stack as $query_id ) { + $dirty_enhanced_queries[ $query_id ] = true; + } + } + + return $parsed_block; +} + +add_filter( 'render_block_data', 'block_core_query_disable_enhanced_pagination', 10, 1 ); diff --git a/src/wp-includes/blocks/query/block.json b/src/wp-includes/blocks/query/block.json new file mode 100644 index 0000000000000..c2d8abc1a9334 --- /dev/null +++ b/src/wp-includes/blocks/query/block.json @@ -0,0 +1,60 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/query", + "title": "Query Loop", + "category": "theme", + "description": "An advanced block that allows displaying post types based on different query parameters and visual configurations.", + "keywords": [ "posts", "list", "blog", "blogs", "custom post types" ], + "textdomain": "default", + "attributes": { + "queryId": { + "type": "number" + }, + "query": { + "type": "object", + "default": { + "perPage": null, + "pages": 0, + "offset": 0, + "postType": "post", + "order": "desc", + "orderBy": "date", + "author": "", + "search": "", + "exclude": [], + "sticky": "", + "inherit": true, + "taxQuery": null, + "parents": [], + "format": [] + } + }, + "tagName": { + "type": "string", + "default": "div" + }, + "namespace": { + "type": "string" + }, + "enhancedPagination": { + "type": "boolean", + "default": false + } + }, + "usesContext": [ "templateSlug" ], + "providesContext": { + "queryId": "queryId", + "query": "query", + "displayLayout": "displayLayout", + "enhancedPagination": "enhancedPagination" + }, + "supports": { + "anchor": true, + "align": [ "wide", "full" ], + "html": false, + "layout": true, + "interactivity": true + }, + "editorStyle": "wp-block-query-editor" +} diff --git a/src/wp-includes/blocks/quote/block.json b/src/wp-includes/blocks/quote/block.json new file mode 100644 index 0000000000000..52609ee57d12a --- /dev/null +++ b/src/wp-includes/blocks/quote/block.json @@ -0,0 +1,105 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/quote", + "title": "Quote", + "category": "text", + "description": "Give quoted text visual emphasis. \"In quoting others, we cite ourselves.\" — Julio Cortázar", + "keywords": [ "blockquote", "cite" ], + "textdomain": "default", + "attributes": { + "value": { + "type": "string", + "source": "html", + "selector": "blockquote", + "multiline": "p", + "default": "", + "role": "content" + }, + "citation": { + "type": "rich-text", + "source": "rich-text", + "selector": "cite", + "role": "content" + }, + "textAlign": { + "type": "string" + } + }, + "supports": { + "anchor": true, + "align": [ "left", "right", "wide", "full" ], + "html": false, + "background": { + "backgroundImage": true, + "backgroundSize": true, + "__experimentalDefaultControls": { + "backgroundImage": true + } + }, + "__experimentalBorder": { + "color": true, + "radius": true, + "style": true, + "width": true, + "__experimentalDefaultControls": { + "color": true, + "radius": true, + "style": true, + "width": true + } + }, + "dimensions": { + "minHeight": true, + "__experimentalDefaultControls": { + "minHeight": false + } + }, + "__experimentalOnEnter": true, + "__experimentalOnMerge": true, + "typography": { + "fontSize": true, + "lineHeight": true, + "__experimentalFontFamily": true, + "__experimentalFontWeight": true, + "__experimentalFontStyle": true, + "__experimentalTextTransform": true, + "__experimentalTextDecoration": true, + "__experimentalLetterSpacing": true, + "__experimentalDefaultControls": { + "fontSize": true + } + }, + "color": { + "gradients": true, + "heading": true, + "link": true, + "__experimentalDefaultControls": { + "background": true, + "text": true + } + }, + "layout": { + "allowEditing": false + }, + "spacing": { + "blockGap": true, + "padding": true, + "margin": true + }, + "interactivity": { + "clientNavigation": true + }, + "allowedBlocks": true + }, + "styles": [ + { + "name": "default", + "label": "Default", + "isDefault": true + }, + { "name": "plain", "label": "Plain" } + ], + "editorStyle": "wp-block-quote-editor", + "style": "wp-block-quote" +} diff --git a/src/wp-includes/blocks/read-more.php b/src/wp-includes/blocks/read-more.php new file mode 100644 index 0000000000000..c01a0a377fc93 --- /dev/null +++ b/src/wp-includes/blocks/read-more.php @@ -0,0 +1,63 @@ +context['postId'] ) ) { + return ''; + } + + $post_ID = $block->context['postId']; + $post_title = get_the_title( $post_ID ); + if ( '' === $post_title ) { + $post_title = sprintf( + /* translators: %s is post ID to describe the link for screen readers. */ + __( 'untitled post %s' ), + $post_ID + ); + } + $screen_reader_text = sprintf( + /* translators: %s is either the post title or post ID to describe the link for screen readers. */ + __( ': %s' ), + $post_title + ); + $justify_class_name = empty( $attributes['justifyContent'] ) ? '' : "is-justified-{$attributes['justifyContent']}"; + $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $justify_class_name ) ); + $more_text = ! empty( $attributes['content'] ) ? wp_kses_post( $attributes['content'] ) : __( 'Read more' ); + return sprintf( + '%4s%5s', + $wrapper_attributes, + get_the_permalink( $post_ID ), + esc_attr( $attributes['linkTarget'] ), + $more_text, + $screen_reader_text + ); +} + +/** + * Registers the `core/read-more` block on the server. + * + * @since 6.0.0 + */ +function register_block_core_read_more() { + register_block_type_from_metadata( + __DIR__ . '/read-more', + array( + 'render_callback' => 'render_block_core_read_more', + ) + ); +} +add_action( 'init', 'register_block_core_read_more' ); diff --git a/src/wp-includes/blocks/read-more/block.json b/src/wp-includes/blocks/read-more/block.json new file mode 100644 index 0000000000000..084d46fa6936b --- /dev/null +++ b/src/wp-includes/blocks/read-more/block.json @@ -0,0 +1,61 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/read-more", + "title": "Read More", + "category": "theme", + "description": "Displays the link of a post, page, or any other content-type.", + "textdomain": "default", + "attributes": { + "content": { + "type": "string", + "role": "content" + }, + "linkTarget": { + "type": "string", + "default": "_self" + } + }, + "usesContext": [ "postId" ], + "supports": { + "anchor": true, + "html": false, + "color": { + "gradients": true, + "text": true + }, + "typography": { + "fontSize": true, + "lineHeight": true, + "__experimentalFontFamily": true, + "__experimentalFontWeight": true, + "__experimentalFontStyle": true, + "__experimentalTextTransform": true, + "__experimentalLetterSpacing": true, + "__experimentalTextDecoration": true, + "__experimentalDefaultControls": { + "fontSize": true, + "textDecoration": true + } + }, + "spacing": { + "margin": [ "top", "bottom" ], + "padding": true, + "__experimentalDefaultControls": { + "padding": true + } + }, + "__experimentalBorder": { + "color": true, + "radius": true, + "width": true, + "__experimentalDefaultControls": { + "width": true + } + }, + "interactivity": { + "clientNavigation": true + } + }, + "style": "wp-block-read-more" +} diff --git a/src/wp-includes/blocks/require-dynamic-blocks.php b/src/wp-includes/blocks/require-dynamic-blocks.php new file mode 100644 index 0000000000000..48fa6cb90b9c8 --- /dev/null +++ b/src/wp-includes/blocks/require-dynamic-blocks.php @@ -0,0 +1,85 @@ +
      ' . __( 'Adding an RSS feed to this site’s homepage is not supported, as it could lead to a loop that slows down your site. Try using another block, like the Latest Posts block, to list posts from the site.' ) . '
      '; + } + + $rss = fetch_feed( $attributes['feedURL'] ); + + if ( is_wp_error( $rss ) ) { + return '
      ' . __( 'RSS Error:' ) . ' ' . esc_html( $rss->get_error_message() ) . '
      '; + } + + if ( ! $rss->get_item_quantity() ) { + return '
      ' . __( 'An error has occurred, which probably means the feed is down. Try again later.' ) . '
      '; + } + + $rss_items = $rss->get_items( 0, $attributes['itemsToShow'] ); + $list_items = ''; + + $open_in_new_tab = ! empty( $attributes['openInNewTab'] ); + $rel = ! empty( $attributes['rel'] ) ? trim( $attributes['rel'] ) : ''; + + $link_attributes = ''; + + if ( $open_in_new_tab ) { + $link_attributes .= ' target="_blank"'; + } + + if ( '' !== $rel ) { + $link_attributes .= ' rel="' . esc_attr( $rel ) . '"'; + } + + foreach ( $rss_items as $item ) { + $title = esc_html( trim( strip_tags( html_entity_decode( $item->get_title() ) ) ) ); + + if ( empty( $title ) ) { + $title = __( '(no title)' ); + } + $link = $item->get_link(); + $link = esc_url( $link ); + + if ( $link ) { + $title = "{$title}"; + } + $title = "
      {$title}
      "; + + $date_markup = ''; + if ( ! empty( $attributes['displayDate'] ) ) { + $timestamp = $item->get_date( 'U' ); + + if ( $timestamp ) { + $gmt_offset = get_option( 'gmt_offset' ); + $timestamp += (int) ( (float) $gmt_offset * HOUR_IN_SECONDS ); + + $date_markup = sprintf( + ' ', + esc_attr( date_i18n( 'c', $timestamp ) ), + esc_html( date_i18n( get_option( 'date_format' ), $timestamp ) ) + ); + } + } + + $author = ''; + if ( $attributes['displayAuthor'] ) { + $author = $item->get_author(); + if ( is_object( $author ) ) { + $author = $author->get_name(); + if ( ! empty( $author ) ) { + $author = '' . sprintf( + /* translators: byline. %s: author. */ + __( 'by %s' ), + esc_html( strip_tags( $author ) ) + ) . ''; + } + } + } + + $excerpt = ''; + $description = $item->get_description(); + if ( $attributes['displayExcerpt'] && ! empty( $description ) ) { + $excerpt = html_entity_decode( $description, ENT_QUOTES, get_option( 'blog_charset' ) ); + $excerpt = esc_attr( wp_trim_words( $excerpt, $attributes['excerptLength'], ' […]' ) ); + + // Change existing [...] to […]. + if ( '[...]' === substr( $excerpt, -5 ) ) { + $excerpt = substr( $excerpt, 0, -5 ) . '[…]'; + } + + $excerpt = '
      ' . esc_html( $excerpt ) . '
      '; + } + + $list_items .= "
    6. {$title}{$date_markup}{$author}{$excerpt}
    7. "; + } + + $classnames = array(); + if ( isset( $attributes['blockLayout'] ) && 'grid' === $attributes['blockLayout'] ) { + $classnames[] = 'is-grid'; + } + if ( isset( $attributes['columns'] ) && 'grid' === $attributes['blockLayout'] ) { + $classnames[] = 'columns-' . $attributes['columns']; + } + if ( $attributes['displayDate'] ) { + $classnames[] = 'has-dates'; + } + if ( $attributes['displayAuthor'] ) { + $classnames[] = 'has-authors'; + } + if ( $attributes['displayExcerpt'] ) { + $classnames[] = 'has-excerpts'; + } + + $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => implode( ' ', $classnames ) ) ); + + return sprintf( '
        %s
      ', $wrapper_attributes, $list_items ); +} + +/** + * Registers the `core/rss` block on server. + * + * @since 5.2.0 + */ +function register_block_core_rss() { + register_block_type_from_metadata( + __DIR__ . '/rss', + array( + 'render_callback' => 'render_block_core_rss', + ) + ); +} +add_action( 'init', 'register_block_core_rss' ); diff --git a/src/wp-includes/blocks/rss/block.json b/src/wp-includes/blocks/rss/block.json new file mode 100644 index 0000000000000..e16c0c62881c9 --- /dev/null +++ b/src/wp-includes/blocks/rss/block.json @@ -0,0 +1,82 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/rss", + "title": "RSS", + "category": "widgets", + "description": "Display entries from any RSS or Atom feed.", + "keywords": [ "atom", "feed" ], + "textdomain": "default", + "attributes": { + "columns": { + "type": "number", + "default": 2 + }, + "blockLayout": { + "type": "string", + "default": "list" + }, + "feedURL": { + "type": "string", + "default": "", + "role": "content" + }, + "itemsToShow": { + "type": "number", + "default": 5 + }, + "displayExcerpt": { + "type": "boolean", + "default": false + }, + "displayAuthor": { + "type": "boolean", + "default": false + }, + "displayDate": { + "type": "boolean", + "default": false + }, + "excerptLength": { + "type": "number", + "default": 55 + }, + "openInNewTab": { + "type": "boolean", + "default": false + }, + "rel": { + "type": "string" + } + }, + "supports": { + "anchor": true, + "align": true, + "html": false, + "interactivity": { + "clientNavigation": true + }, + "__experimentalBorder": { + "radius": true, + "color": true, + "width": true, + "style": true + }, + "spacing": { + "margin": true, + "padding": true, + "__experimentalDefaultControls": { + "padding": false, + "margin": false + } + }, + "color": { + "background": true, + "text": true, + "gradients": true, + "link": true + } + }, + "editorStyle": "wp-block-rss-editor", + "style": "wp-block-rss" +} diff --git a/src/wp-includes/blocks/search.php b/src/wp-includes/blocks/search.php new file mode 100644 index 0000000000000..7073d6ce8ab3f --- /dev/null +++ b/src/wp-includes/blocks/search.php @@ -0,0 +1,621 @@ +`. Support these by defaulting an undefined label and + // buttonText to `__( 'Search' )`. + $attributes = wp_parse_args( + $attributes, + array( + 'label' => __( 'Search' ), + 'buttonText' => __( 'Search' ), + ) + ); + + $input_id = wp_unique_id( 'wp-block-search__input-' ); + $classnames = classnames_for_block_core_search( $attributes ); + $show_label = ! empty( $attributes['showLabel'] ); + $use_icon_button = ! empty( $attributes['buttonUseIcon'] ); + $show_button = ( ! empty( $attributes['buttonPosition'] ) && 'no-button' === $attributes['buttonPosition'] ) ? false : true; + $button_position = $show_button ? $attributes['buttonPosition'] : null; + $query_params = ( ! empty( $attributes['query'] ) ) ? $attributes['query'] : array(); + $button = ''; + $query_params_markup = ''; + $inline_styles = styles_for_block_core_search( $attributes ); + $color_classes = get_color_classes_for_block_core_search( $attributes ); + $typography_classes = get_typography_classes_for_block_core_search( $attributes ); + $is_button_inside = ! empty( $attributes['buttonPosition'] ) && + 'button-inside' === $attributes['buttonPosition']; + // Border color classes need to be applied to the elements that have a border color. + $border_color_classes = get_border_color_classes_for_block_core_search( $attributes ); + // This variable is a constant and its value is always false at this moment. + // It is defined this way because some values depend on it, in case it changes in the future. + $open_by_default = false; + + $label_inner_html = empty( $attributes['label'] ) ? __( 'Search' ) : wp_kses_post( $attributes['label'] ); + $label = new WP_HTML_Tag_Processor( sprintf( '', $inline_styles['label'], $label_inner_html ) ); + if ( $label->next_tag() ) { + $label->set_attribute( 'for', $input_id ); + $label->add_class( 'wp-block-search__label' ); + if ( $show_label && ! empty( $attributes['label'] ) ) { + if ( ! empty( $typography_classes ) ) { + $label->add_class( $typography_classes ); + } + } else { + $label->add_class( 'screen-reader-text' ); + } + } + + $input = new WP_HTML_Tag_Processor( sprintf( '', $inline_styles['input'] ) ); + $input_classes = array( 'wp-block-search__input' ); + if ( ! $is_button_inside && ! empty( $border_color_classes ) ) { + $input_classes[] = $border_color_classes; + } + if ( ! empty( $typography_classes ) ) { + $input_classes[] = $typography_classes; + } + if ( $input->next_tag() ) { + $input->add_class( implode( ' ', $input_classes ) ); + $input->set_attribute( 'id', $input_id ); + $input->set_attribute( 'value', get_search_query() ); + $input->set_attribute( 'placeholder', $attributes['placeholder'] ); + + // If it's interactive, enqueue the script module and add the directives. + $is_expandable_searchfield = 'button-only' === $button_position; + if ( $is_expandable_searchfield ) { + wp_enqueue_script_module( '@wordpress/block-library/search/view' ); + + $input->set_attribute( 'data-wp-bind--aria-hidden', '!context.isSearchInputVisible' ); + $input->set_attribute( 'data-wp-bind--tabindex', 'state.tabindex' ); + + // Adding these attributes manually is needed until the Interactivity API + // SSR logic is added to core. + $input->set_attribute( 'aria-hidden', 'true' ); + $input->set_attribute( 'tabindex', '-1' ); + } + } + + if ( count( $query_params ) > 0 ) { + foreach ( $query_params as $param => $value ) { + $query_params_markup .= sprintf( + '', + esc_attr( $param ), + esc_attr( $value ) + ); + } + } + + if ( $show_button ) { + $button_classes = array( 'wp-block-search__button' ); + $button_internal_markup = ''; + if ( ! empty( $color_classes ) ) { + $button_classes[] = $color_classes; + } + if ( ! empty( $typography_classes ) ) { + $button_classes[] = $typography_classes; + } + + if ( ! $is_button_inside && ! empty( $border_color_classes ) ) { + $button_classes[] = $border_color_classes; + } + if ( ! $use_icon_button ) { + if ( ! empty( $attributes['buttonText'] ) ) { + $button_internal_markup = wp_kses_post( $attributes['buttonText'] ); + } + } else { + $button_classes[] = 'has-icon'; + $button_internal_markup = + ' + + '; + } + + // Include the button element class. + $button_classes[] = wp_theme_get_element_class_name( 'button' ); + $button = new WP_HTML_Tag_Processor( sprintf( '', $inline_styles['button'], $button_internal_markup ) ); + + if ( $button->next_tag() ) { + $button->add_class( implode( ' ', $button_classes ) ); + if ( 'button-only' === $attributes['buttonPosition'] ) { + $button->set_attribute( 'data-wp-bind--aria-label', 'state.ariaLabel' ); + $button->set_attribute( 'data-wp-bind--aria-controls', 'state.ariaControls' ); + $button->set_attribute( 'data-wp-bind--aria-expanded', 'context.isSearchInputVisible' ); + $button->set_attribute( 'data-wp-bind--type', 'state.type' ); + $button->set_attribute( 'data-wp-on--click', 'actions.openSearchInput' ); + + // Adding these attributes manually is needed until the Interactivity + // API SSR logic is added to core. + $button->set_attribute( 'aria-label', __( 'Expand search field' ) ); + $button->set_attribute( 'aria-controls', 'wp-block-search__input-' . $input_id ); + $button->set_attribute( 'aria-expanded', 'false' ); + $button->set_attribute( 'type', 'button' ); + } else { + $button->set_attribute( 'aria-label', wp_strip_all_tags( $attributes['buttonText'] ) ); + } + } + } + + $field_markup_classes = array( + 'wp-block-search__inside-wrapper', + ); + if ( $is_button_inside && ! empty( $border_color_classes ) ) { + $field_markup_classes[] = $border_color_classes; + } + $field_markup = sprintf( + '
      %s
      ', + esc_attr( implode( ' ', $field_markup_classes ) ), + $inline_styles['wrapper'], + $input . $query_params_markup . $button + ); + $wrapper_attributes = get_block_wrapper_attributes( + array( 'class' => $classnames ) + ); + $form_directives = ''; + + // If it's interactive, add the directives. + if ( $is_expandable_searchfield ) { + $aria_label_expanded = __( 'Submit Search' ); + $aria_label_collapsed = __( 'Expand search field' ); + $form_context = wp_interactivity_data_wp_context( + array( + 'isSearchInputVisible' => $open_by_default, + 'inputId' => $input_id, + 'ariaLabelExpanded' => $aria_label_expanded, + 'ariaLabelCollapsed' => $aria_label_collapsed, + ) + ); + $form_directives = ' + data-wp-interactive="core/search" + ' . $form_context . ' + data-wp-class--wp-block-search__searchfield-hidden="!context.isSearchInputVisible" + data-wp-on--keydown="actions.handleSearchKeydown" + data-wp-on--focusout="actions.handleSearchFocusout" + '; + } + + return sprintf( + '
      %4s
      ', + esc_url( home_url( '/' ) ), + $wrapper_attributes, + $form_directives, + $label . $field_markup + ); +} + +/** + * Registers the `core/search` block on the server. + * + * @since 5.2.0 + */ +function register_block_core_search() { + register_block_type_from_metadata( + __DIR__ . '/search', + array( + 'render_callback' => 'render_block_core_search', + ) + ); +} +add_action( 'init', 'register_block_core_search' ); + +/** + * Builds the correct top level classnames for the 'core/search' block. + * + * @since 5.6.0 + * + * @param array $attributes The block attributes. + * + * @return string The classnames used in the block. + */ +function classnames_for_block_core_search( $attributes ) { + $classnames = array(); + + if ( ! empty( $attributes['buttonPosition'] ) ) { + if ( 'button-inside' === $attributes['buttonPosition'] ) { + $classnames[] = 'wp-block-search__button-inside'; + } + + if ( 'button-outside' === $attributes['buttonPosition'] ) { + $classnames[] = 'wp-block-search__button-outside'; + } + + if ( 'no-button' === $attributes['buttonPosition'] ) { + $classnames[] = 'wp-block-search__no-button'; + } + + if ( 'button-only' === $attributes['buttonPosition'] ) { + $classnames[] = 'wp-block-search__button-only wp-block-search__searchfield-hidden'; + } + } + + if ( isset( $attributes['buttonUseIcon'] ) ) { + if ( ! empty( $attributes['buttonPosition'] ) && 'no-button' !== $attributes['buttonPosition'] ) { + if ( $attributes['buttonUseIcon'] ) { + $classnames[] = 'wp-block-search__icon-button'; + } else { + $classnames[] = 'wp-block-search__text-button'; + } + } + } + + return implode( ' ', $classnames ); +} + +/** + * This generates a CSS rule for the given border property and side if provided. + * Based on whether the Search block is configured to display the button inside + * or not, the generated rule is injected into the appropriate collection of + * styles for later application in the block's markup. + * + * @since 6.1.0 + * + * @param array $attributes The block attributes. + * @param string $property Border property to generate rule for e.g. width or color. + * @param string $side Optional side border. The dictates the value retrieved and final CSS property. + * @param array $wrapper_styles Current collection of wrapper styles. + * @param array $button_styles Current collection of button styles. + * @param array $input_styles Current collection of input styles. + */ +function apply_block_core_search_border_style( $attributes, $property, $side, &$wrapper_styles, &$button_styles, &$input_styles ) { + $is_button_inside = isset( $attributes['buttonPosition'] ) && 'button-inside' === $attributes['buttonPosition']; + + $path = array( 'style', 'border', $property ); + + if ( $side ) { + array_splice( $path, 2, 0, $side ); + } + + $value = _wp_array_get( $attributes, $path, false ); + + if ( empty( $value ) ) { + return; + } + + if ( 'color' === $property && $side ) { + $has_color_preset = str_contains( $value, 'var:preset|color|' ); + if ( $has_color_preset ) { + $named_color_value = substr( $value, strrpos( $value, '|' ) + 1 ); + $value = sprintf( 'var(--wp--preset--color--%s)', $named_color_value ); + } + } + + $property_suffix = $side ? sprintf( '%s-%s', $side, $property ) : $property; + + if ( $is_button_inside ) { + $wrapper_styles[] = sprintf( 'border-%s: %s;', $property_suffix, esc_attr( $value ) ); + } else { + $button_styles[] = sprintf( 'border-%s: %s;', $property_suffix, esc_attr( $value ) ); + $input_styles[] = sprintf( 'border-%s: %s;', $property_suffix, esc_attr( $value ) ); + } +} + +/** + * This adds CSS rules for a given border property e.g. width or color. It + * injects rules into the provided wrapper, button and input style arrays for + * uniform "flat" borders or those with individual sides configured. + * + * @since 6.1.0 + * + * @param array $attributes The block attributes. + * @param string $property Border property to generate rule for e.g. width or color. + * @param array $wrapper_styles Current collection of wrapper styles. + * @param array $button_styles Current collection of button styles. + * @param array $input_styles Current collection of input styles. + */ +function apply_block_core_search_border_styles( $attributes, $property, &$wrapper_styles, &$button_styles, &$input_styles ) { + apply_block_core_search_border_style( $attributes, $property, null, $wrapper_styles, $button_styles, $input_styles ); + apply_block_core_search_border_style( $attributes, $property, 'top', $wrapper_styles, $button_styles, $input_styles ); + apply_block_core_search_border_style( $attributes, $property, 'right', $wrapper_styles, $button_styles, $input_styles ); + apply_block_core_search_border_style( $attributes, $property, 'bottom', $wrapper_styles, $button_styles, $input_styles ); + apply_block_core_search_border_style( $attributes, $property, 'left', $wrapper_styles, $button_styles, $input_styles ); +} + +/** + * Builds an array of inline styles for the search block. + * + * The result will contain one entry for shared styles such as those for the + * inner input or button and a second for the inner wrapper should the block + * be positioning the button "inside". + * + * @since 5.8.0 + * + * @param array $attributes The block attributes. + * + * @return array Style HTML attribute. + */ +function styles_for_block_core_search( $attributes ) { + $wrapper_styles = array(); + $button_styles = array(); + $input_styles = array(); + $label_styles = array(); + $is_button_inside = ! empty( $attributes['buttonPosition'] ) && + 'button-inside' === $attributes['buttonPosition']; + $show_label = ( isset( $attributes['showLabel'] ) ) && false !== $attributes['showLabel']; + + // Add width styles. + $has_width = ! empty( $attributes['width'] ) && ! empty( $attributes['widthUnit'] ); + + if ( $has_width ) { + $wrapper_styles[] = sprintf( + 'width: %d%s;', + esc_attr( $attributes['width'] ), + esc_attr( $attributes['widthUnit'] ) + ); + } + + // Add border width and color styles. + apply_block_core_search_border_styles( $attributes, 'width', $wrapper_styles, $button_styles, $input_styles ); + apply_block_core_search_border_styles( $attributes, 'color', $wrapper_styles, $button_styles, $input_styles ); + apply_block_core_search_border_styles( $attributes, 'style', $wrapper_styles, $button_styles, $input_styles ); + + // Add border radius styles. + $has_border_radius = ! empty( $attributes['style']['border']['radius'] ); + + if ( $has_border_radius ) { + $default_padding = '4px'; + $border_radius = $attributes['style']['border']['radius']; + + if ( is_array( $border_radius ) ) { + // Apply styles for individual corner border radii. + foreach ( $border_radius as $key => $value ) { + // Get border-radius CSS variable from preset value if provided. + if ( is_string( $value ) && str_contains( $value, 'var:preset|border-radius|' ) ) { + $index_to_splice = strrpos( $value, '|' ) + 1; + $slug = _wp_to_kebab_case( substr( $value, $index_to_splice ) ); + $value = "var(--wp--preset--border-radius--$slug)"; + } + + if ( null !== $value ) { + // Convert camelCase key to kebab-case. + $name = strtolower( preg_replace( '/(? ! empty( $input_styles ) ? sprintf( ' style="%s"', esc_attr( safecss_filter_attr( implode( ' ', $input_styles ) ) ) ) : '', + 'button' => ! empty( $button_styles ) ? sprintf( ' style="%s"', esc_attr( safecss_filter_attr( implode( ' ', $button_styles ) ) ) ) : '', + 'wrapper' => ! empty( $wrapper_styles ) ? sprintf( ' style="%s"', esc_attr( safecss_filter_attr( implode( ' ', $wrapper_styles ) ) ) ) : '', + 'label' => ! empty( $label_styles ) ? sprintf( ' style="%s"', esc_attr( safecss_filter_attr( implode( ' ', $label_styles ) ) ) ) : '', + ); +} + +/** + * Returns typography classnames depending on whether there are named font sizes/families. + * + * @since 6.1.0 + * + * @param array $attributes The block attributes. + * + * @return string The typography color classnames to be applied to the block elements. + */ +function get_typography_classes_for_block_core_search( $attributes ) { + $typography_classes = array(); + $has_named_font_family = ! empty( $attributes['fontFamily'] ); + $has_named_font_size = ! empty( $attributes['fontSize'] ); + + if ( $has_named_font_size ) { + $typography_classes[] = sprintf( 'has-%s-font-size', esc_attr( $attributes['fontSize'] ) ); + } + + if ( $has_named_font_family ) { + $typography_classes[] = sprintf( 'has-%s-font-family', esc_attr( $attributes['fontFamily'] ) ); + } + + return implode( ' ', $typography_classes ); +} + +/** + * Returns typography styles to be included in an HTML style tag. + * This excludes text-decoration, which is applied only to the label and button elements of the search block. + * + * @since 6.1.0 + * + * @param array $attributes The block attributes. + * + * @return string A string of typography CSS declarations. + */ +function get_typography_styles_for_block_core_search( $attributes ) { + $typography_styles = array(); + + // Add typography styles. + if ( ! empty( $attributes['style']['typography']['fontSize'] ) ) { + $typography_styles[] = sprintf( + 'font-size: %s;', + wp_get_typography_font_size_value( + array( + 'size' => $attributes['style']['typography']['fontSize'], + ) + ) + ); + + } + + if ( ! empty( $attributes['style']['typography']['fontFamily'] ) ) { + $typography_styles[] = sprintf( 'font-family: %s;', $attributes['style']['typography']['fontFamily'] ); + } + + if ( ! empty( $attributes['style']['typography']['letterSpacing'] ) ) { + $typography_styles[] = sprintf( 'letter-spacing: %s;', $attributes['style']['typography']['letterSpacing'] ); + } + + if ( ! empty( $attributes['style']['typography']['fontWeight'] ) ) { + $typography_styles[] = sprintf( 'font-weight: %s;', $attributes['style']['typography']['fontWeight'] ); + } + + if ( ! empty( $attributes['style']['typography']['fontStyle'] ) ) { + $typography_styles[] = sprintf( 'font-style: %s;', $attributes['style']['typography']['fontStyle'] ); + } + + if ( ! empty( $attributes['style']['typography']['lineHeight'] ) ) { + $typography_styles[] = sprintf( 'line-height: %s;', $attributes['style']['typography']['lineHeight'] ); + } + + if ( ! empty( $attributes['style']['typography']['textTransform'] ) ) { + $typography_styles[] = sprintf( 'text-transform: %s;', $attributes['style']['typography']['textTransform'] ); + } + + return implode( '', $typography_styles ); +} + +/** + * Returns border color classnames depending on whether there are named or custom border colors. + * + * @since 5.9.0 + * + * @param array $attributes The block attributes. + * + * @return string The border color classnames to be applied to the block elements. + */ +function get_border_color_classes_for_block_core_search( $attributes ) { + $border_color_classes = array(); + $has_custom_border_color = ! empty( $attributes['style']['border']['color'] ); + $has_named_border_color = ! empty( $attributes['borderColor'] ); + + if ( $has_custom_border_color || $has_named_border_color ) { + $border_color_classes[] = 'has-border-color'; + } + + if ( $has_named_border_color ) { + $border_color_classes[] = sprintf( 'has-%s-border-color', esc_attr( $attributes['borderColor'] ) ); + } + + return implode( ' ', $border_color_classes ); +} + +/** + * Returns color classnames depending on whether there are named or custom text and background colors. + * + * @since 5.9.0 + * + * @param array $attributes The block attributes. + * + * @return string The color classnames to be applied to the block elements. + */ +function get_color_classes_for_block_core_search( $attributes ) { + $classnames = array(); + + // Text color. + $has_named_text_color = ! empty( $attributes['textColor'] ); + $has_custom_text_color = ! empty( $attributes['style']['color']['text'] ); + if ( $has_named_text_color ) { + $classnames[] = sprintf( 'has-text-color has-%s-color', $attributes['textColor'] ); + } elseif ( $has_custom_text_color ) { + // If a custom 'textColor' was selected instead of a preset, still add the generic `has-text-color` class. + $classnames[] = 'has-text-color'; + } + + // Background color. + $has_named_background_color = ! empty( $attributes['backgroundColor'] ); + $has_custom_background_color = ! empty( $attributes['style']['color']['background'] ); + $has_named_gradient = ! empty( $attributes['gradient'] ); + $has_custom_gradient = ! empty( $attributes['style']['color']['gradient'] ); + if ( + $has_named_background_color || + $has_custom_background_color || + $has_named_gradient || + $has_custom_gradient + ) { + $classnames[] = 'has-background'; + } + if ( $has_named_background_color ) { + $classnames[] = sprintf( 'has-%s-background-color', $attributes['backgroundColor'] ); + } + if ( $has_named_gradient ) { + $classnames[] = sprintf( 'has-%s-gradient-background', $attributes['gradient'] ); + } + + return implode( ' ', $classnames ); +} diff --git a/src/wp-includes/blocks/search/block.json b/src/wp-includes/blocks/search/block.json new file mode 100644 index 0000000000000..a6146d4404041 --- /dev/null +++ b/src/wp-includes/blocks/search/block.json @@ -0,0 +1,96 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/search", + "title": "Search", + "category": "widgets", + "description": "Help visitors find your content.", + "keywords": [ "find" ], + "textdomain": "default", + "attributes": { + "label": { + "type": "string", + "role": "content" + }, + "showLabel": { + "type": "boolean", + "default": true + }, + "placeholder": { + "type": "string", + "default": "", + "role": "content" + }, + "width": { + "type": "number" + }, + "widthUnit": { + "type": "string" + }, + "buttonText": { + "type": "string", + "role": "content" + }, + "buttonPosition": { + "type": "string", + "default": "button-outside" + }, + "buttonUseIcon": { + "type": "boolean", + "default": false + }, + "query": { + "type": "object", + "default": {} + }, + "isSearchFieldHidden": { + "type": "boolean", + "default": false + } + }, + "supports": { + "anchor": true, + "align": [ "left", "center", "right" ], + "color": { + "gradients": true, + "__experimentalSkipSerialization": true, + "__experimentalDefaultControls": { + "background": true, + "text": true + } + }, + "interactivity": true, + "typography": { + "__experimentalSkipSerialization": true, + "__experimentalSelector": ".wp-block-search__label, .wp-block-search__input, .wp-block-search__button", + "fontSize": true, + "lineHeight": true, + "__experimentalFontFamily": true, + "__experimentalFontWeight": true, + "__experimentalFontStyle": true, + "__experimentalTextTransform": true, + "__experimentalTextDecoration": true, + "__experimentalLetterSpacing": true, + "__experimentalDefaultControls": { + "fontSize": true + } + }, + "__experimentalBorder": { + "color": true, + "radius": true, + "width": true, + "__experimentalSkipSerialization": true, + "__experimentalDefaultControls": { + "color": true, + "radius": true, + "width": true + } + }, + "spacing": { + "margin": true + }, + "html": false + }, + "editorStyle": "wp-block-search-editor", + "style": "wp-block-search" +} diff --git a/src/wp-includes/blocks/separator/block.json b/src/wp-includes/blocks/separator/block.json new file mode 100644 index 0000000000000..926d978b7e4d5 --- /dev/null +++ b/src/wp-includes/blocks/separator/block.json @@ -0,0 +1,48 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/separator", + "title": "Separator", + "category": "design", + "description": "Create a break between ideas or sections with a horizontal separator.", + "keywords": [ "horizontal-line", "hr", "divider" ], + "textdomain": "default", + "attributes": { + "opacity": { + "type": "string", + "default": "alpha-channel" + }, + "tagName": { + "type": "string", + "enum": [ "hr", "div" ], + "default": "hr" + } + }, + "supports": { + "anchor": true, + "align": [ "center", "wide", "full" ], + "color": { + "enableContrastChecker": false, + "__experimentalSkipSerialization": true, + "gradients": true, + "background": true, + "text": false, + "__experimentalDefaultControls": { + "background": true + } + }, + "spacing": { + "margin": [ "top", "bottom" ] + }, + "interactivity": { + "clientNavigation": true + } + }, + "styles": [ + { "name": "default", "label": "Default", "isDefault": true }, + { "name": "wide", "label": "Wide Line" }, + { "name": "dots", "label": "Dots" } + ], + "editorStyle": "wp-block-separator-editor", + "style": "wp-block-separator" +} diff --git a/src/wp-includes/blocks/shortcode.php b/src/wp-includes/blocks/shortcode.php new file mode 100644 index 0000000000000..d96acfc55fa64 --- /dev/null +++ b/src/wp-includes/blocks/shortcode.php @@ -0,0 +1,35 @@ + 'render_block_core_shortcode', + ) + ); +} +add_action( 'init', 'register_block_core_shortcode' ); diff --git a/src/wp-includes/blocks/shortcode/block.json b/src/wp-includes/blocks/shortcode/block.json new file mode 100644 index 0000000000000..adbb48553ff13 --- /dev/null +++ b/src/wp-includes/blocks/shortcode/block.json @@ -0,0 +1,24 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/shortcode", + "title": "Shortcode", + "category": "widgets", + "description": "Insert additional custom elements with a WordPress shortcode.", + "textdomain": "default", + "attributes": { + "text": { + "type": "string", + "source": "raw", + "role": "content" + } + }, + "supports": { + "className": false, + "customClassName": false, + "html": false, + "customCSS": false, + "visibility": false + }, + "editorStyle": "wp-block-shortcode-editor" +} diff --git a/src/wp-includes/blocks/site-logo.php b/src/wp-includes/blocks/site-logo.php new file mode 100644 index 0000000000000..915563461e30c --- /dev/null +++ b/src/wp-includes/blocks/site-logo.php @@ -0,0 +1,234 @@ +(.*?)#i', '\1', $custom_logo ); + } + + if ( $attributes['isLink'] && '_blank' === $attributes['linkTarget'] ) { + // Add the link target after the rel="home". + // Add an aria-label for informing that the page opens in a new tab. + $processor = new WP_HTML_Tag_Processor( $custom_logo ); + $processor->next_tag( 'a' ); + if ( 'home' === $processor->get_attribute( 'rel' ) ) { + $processor->set_attribute( 'aria-label', __( '(Home link, opens in a new tab)' ) ); + $processor->set_attribute( 'target', $attributes['linkTarget'] ); + } + $custom_logo = $processor->get_updated_html(); + } + + $classnames = array(); + if ( empty( $attributes['width'] ) ) { + $classnames[] = 'is-default-size'; + } + + $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => implode( ' ', $classnames ) ) ); + $html = sprintf( '
      %s
      ', $wrapper_attributes, $custom_logo ); + return $html; +} + +/** + * Register a core site setting for a site logo + * + * @since 5.8.0 + */ +function register_block_core_site_logo_setting() { + register_setting( + 'general', + 'site_logo', + array( + 'show_in_rest' => array( + 'name' => 'site_logo', + ), + 'type' => 'integer', + 'label' => __( 'Logo' ), + 'description' => __( 'Site logo.' ), + ) + ); +} + +add_action( 'rest_api_init', 'register_block_core_site_logo_setting', 10 ); + +/** + * Register a core site setting for a site icon + * + * @since 5.9.0 + */ +function register_block_core_site_icon_setting() { + register_setting( + 'general', + 'site_icon', + array( + 'show_in_rest' => true, + 'type' => 'integer', + 'label' => __( 'Icon' ), + 'description' => __( 'Site icon.' ), + ) + ); +} + +add_action( 'rest_api_init', 'register_block_core_site_icon_setting', 10 ); + +/** + * Registers the `core/site-logo` block on the server. + * + * @since 5.8.0 + */ +function register_block_core_site_logo() { + register_block_type_from_metadata( + __DIR__ . '/site-logo', + array( + 'render_callback' => 'render_block_core_site_logo', + ) + ); +} + +add_action( 'init', 'register_block_core_site_logo' ); + +/** + * Overrides the custom logo with a site logo, if the option is set. + * + * @since 5.8.0 + * + * @param string $custom_logo The custom logo set by a theme. + * + * @return string The site logo if set. + */ +function _override_custom_logo_theme_mod( $custom_logo ) { + $site_logo = get_option( 'site_logo' ); + return false === $site_logo ? $custom_logo : $site_logo; +} + +add_filter( 'theme_mod_custom_logo', '_override_custom_logo_theme_mod' ); + +/** + * Updates the site_logo option when the custom_logo theme-mod gets updated. + * + * @since 5.8.0 + * + * @param mixed $value Attachment ID of the custom logo or an empty value. + * @return mixed + */ +function _sync_custom_logo_to_site_logo( $value ) { + if ( empty( $value ) ) { + delete_option( 'site_logo' ); + } else { + update_option( 'site_logo', $value ); + } + + return $value; +} + +add_filter( 'pre_set_theme_mod_custom_logo', '_sync_custom_logo_to_site_logo' ); + +/** + * Deletes the site_logo when the custom_logo theme mod is removed. + * + * @since 5.8.0 + * + * @global array $_ignore_site_logo_changes + * + * @param array $old_value Previous theme mod settings. + * @param array $value Updated theme mod settings. + */ +function _delete_site_logo_on_remove_custom_logo( $old_value, $value ) { + global $_ignore_site_logo_changes; + + if ( $_ignore_site_logo_changes ) { + return; + } + + // If the custom_logo is being unset, it's being removed from theme mods. + if ( isset( $old_value['custom_logo'] ) && ! isset( $value['custom_logo'] ) ) { + delete_option( 'site_logo' ); + } +} + +/** + * Deletes the site logo when all theme mods are being removed. + * + * @since 5.8.0 + * + * @global array $_ignore_site_logo_changes + */ +function _delete_site_logo_on_remove_theme_mods() { + global $_ignore_site_logo_changes; + + if ( $_ignore_site_logo_changes ) { + return; + } + + if ( false !== get_theme_support( 'custom-logo' ) ) { + delete_option( 'site_logo' ); + } +} + +/** + * Hooks `_delete_site_logo_on_remove_custom_logo` in `update_option_theme_mods_$theme`. + * Hooks `_delete_site_logo_on_remove_theme_mods` in `delete_option_theme_mods_$theme`. + * + * Runs on `setup_theme` to account for dynamically-switched themes in the Customizer. + * + * @since 5.8.0 + */ +function _delete_site_logo_on_remove_custom_logo_on_setup_theme() { + $theme = get_option( 'stylesheet' ); + add_action( "update_option_theme_mods_$theme", '_delete_site_logo_on_remove_custom_logo', 10, 2 ); + add_action( "delete_option_theme_mods_$theme", '_delete_site_logo_on_remove_theme_mods' ); +} +add_action( 'setup_theme', '_delete_site_logo_on_remove_custom_logo_on_setup_theme', 11 ); + +/** + * Removes the custom_logo theme-mod when the site_logo option gets deleted. + * + * @since 5.9.0 + * + * @global array $_ignore_site_logo_changes + */ +function _delete_custom_logo_on_remove_site_logo() { + global $_ignore_site_logo_changes; + + // Prevent _delete_site_logo_on_remove_custom_logo and + // _delete_site_logo_on_remove_theme_mods from firing and causing an + // infinite loop. + $_ignore_site_logo_changes = true; + + // Remove the custom logo. + remove_theme_mod( 'custom_logo' ); + + $_ignore_site_logo_changes = false; +} +add_action( 'delete_option_site_logo', '_delete_custom_logo_on_remove_site_logo' ); diff --git a/src/wp-includes/blocks/site-logo/block.json b/src/wp-includes/blocks/site-logo/block.json new file mode 100644 index 0000000000000..e1cd662f60f3e --- /dev/null +++ b/src/wp-includes/blocks/site-logo/block.json @@ -0,0 +1,73 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/site-logo", + "title": "Site Logo", + "category": "theme", + "description": "Display an image to represent this site. Update this block and the changes apply everywhere.", + "textdomain": "default", + "attributes": { + "width": { + "type": "number" + }, + "isLink": { + "type": "boolean", + "default": true, + "role": "content" + }, + "linkTarget": { + "type": "string", + "default": "_self", + "role": "content" + }, + "shouldSyncIcon": { + "type": "boolean" + } + }, + "example": { + "viewportWidth": 500, + "attributes": { + "width": 350, + "className": "block-editor-block-types-list__site-logo-example" + } + }, + "supports": { + "anchor": true, + "html": false, + "align": true, + "alignWide": false, + "color": { + "text": false, + "background": false + }, + "spacing": { + "margin": true, + "padding": true, + "__experimentalDefaultControls": { + "margin": false, + "padding": false + } + }, + "interactivity": { + "clientNavigation": true + }, + "filter": { + "duotone": true + } + }, + "styles": [ + { + "name": "default", + "label": "Default", + "isDefault": true + }, + { "name": "rounded", "label": "Rounded" } + ], + "selectors": { + "filter": { + "duotone": ".wp-block-site-logo img, .wp-block-site-logo .components-placeholder__illustration, .wp-block-site-logo .components-placeholder::before" + } + }, + "editorStyle": "wp-block-site-logo-editor", + "style": "wp-block-site-logo" +} diff --git a/src/wp-includes/blocks/site-tagline.php b/src/wp-includes/blocks/site-tagline.php new file mode 100644 index 0000000000000..b59e1e556c320 --- /dev/null +++ b/src/wp-includes/blocks/site-tagline.php @@ -0,0 +1,53 @@ + $align_class_name ) ); + + if ( isset( $attributes['level'] ) && 0 !== $attributes['level'] ) { + $tag_name = 'h' . (int) $attributes['level']; + } + + return sprintf( + '<%1$s %2$s>%3$s', + $tag_name, + $wrapper_attributes, + $site_tagline + ); +} + +/** + * Registers the `core/site-tagline` block on the server. + * + * @since 5.8.0 + */ +function register_block_core_site_tagline() { + register_block_type_from_metadata( + __DIR__ . '/site-tagline', + array( + 'render_callback' => 'render_block_core_site_tagline', + ) + ); +} + +add_action( 'init', 'register_block_core_site_tagline' ); diff --git a/src/wp-includes/blocks/site-tagline/block.json b/src/wp-includes/blocks/site-tagline/block.json new file mode 100644 index 0000000000000..756b2dcb8183a --- /dev/null +++ b/src/wp-includes/blocks/site-tagline/block.json @@ -0,0 +1,75 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/site-tagline", + "title": "Site Tagline", + "category": "theme", + "description": "Describe in a few words what this site is about. This is important for search results, sharing on social media, and gives overall clarity to visitors.", + "keywords": [ "description" ], + "textdomain": "default", + "attributes": { + "textAlign": { + "type": "string" + }, + "level": { + "type": "number", + "default": 0 + }, + "levelOptions": { + "type": "array", + "default": [ 0, 1, 2, 3, 4, 5, 6 ] + } + }, + "example": { + "viewportWidth": 350, + "attributes": { + "textAlign": "center" + } + }, + "supports": { + "anchor": true, + "align": [ "wide", "full" ], + "html": false, + "color": { + "gradients": true, + "__experimentalDefaultControls": { + "background": true, + "text": true + } + }, + "contentRole": true, + "spacing": { + "margin": true, + "padding": true, + "__experimentalDefaultControls": { + "margin": false, + "padding": false + } + }, + "typography": { + "fontSize": true, + "lineHeight": true, + "__experimentalFontFamily": true, + "__experimentalTextTransform": true, + "__experimentalTextDecoration": true, + "__experimentalFontStyle": true, + "__experimentalFontWeight": true, + "__experimentalLetterSpacing": true, + "__experimentalWritingMode": true, + "__experimentalDefaultControls": { + "fontSize": true + } + }, + "interactivity": { + "clientNavigation": true + }, + "__experimentalBorder": { + "radius": true, + "color": true, + "width": true, + "style": true + } + }, + "editorStyle": "wp-block-site-tagline-editor", + "style": "wp-block-site-tagline" +} diff --git a/src/wp-includes/blocks/site-title.php b/src/wp-includes/blocks/site-title.php new file mode 100644 index 0000000000000..297d99894e104 --- /dev/null +++ b/src/wp-includes/blocks/site-title.php @@ -0,0 +1,69 @@ +%4$s', + esc_url( home_url() ), + esc_attr( $link_target ), + $aria_current, + esc_html( $site_title ) + ); + } + $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => trim( $classes ) ) ); + + return sprintf( + '<%1$s %2$s>%3$s', + $tag_name, + $wrapper_attributes, + // already pre-escaped if it is a link. + $attributes['isLink'] ? $site_title : esc_html( $site_title ) + ); +} + +/** + * Registers the `core/site-title` block on the server. + * + * @since 5.8.0 + */ +function register_block_core_site_title() { + register_block_type_from_metadata( + __DIR__ . '/site-title', + array( + 'render_callback' => 'render_block_core_site_title', + ) + ); +} +add_action( 'init', 'register_block_core_site_title' ); diff --git a/src/wp-includes/blocks/site-title/block.json b/src/wp-includes/blocks/site-title/block.json new file mode 100644 index 0000000000000..ac6a3c10e086a --- /dev/null +++ b/src/wp-includes/blocks/site-title/block.json @@ -0,0 +1,82 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/site-title", + "title": "Site Title", + "category": "theme", + "description": "Displays the name of this site. Update the block, and the changes apply everywhere it’s used. This will also appear in the browser title bar and in search results.", + "textdomain": "default", + "attributes": { + "level": { + "type": "number", + "default": 1 + }, + "levelOptions": { + "type": "array", + "default": [ 0, 1, 2, 3, 4, 5, 6 ] + }, + "textAlign": { + "type": "string" + }, + "isLink": { + "type": "boolean", + "default": true, + "role": "content" + }, + "linkTarget": { + "type": "string", + "default": "_self", + "role": "content" + } + }, + "example": { + "viewportWidth": 500 + }, + "supports": { + "anchor": true, + "align": [ "wide", "full" ], + "html": false, + "color": { + "gradients": true, + "link": true, + "__experimentalDefaultControls": { + "background": true, + "text": true, + "link": true + } + }, + "spacing": { + "padding": true, + "margin": true, + "__experimentalDefaultControls": { + "margin": false, + "padding": false + } + }, + "typography": { + "fontSize": true, + "lineHeight": true, + "__experimentalFontFamily": true, + "__experimentalTextTransform": true, + "__experimentalTextDecoration": true, + "__experimentalFontStyle": true, + "__experimentalFontWeight": true, + "__experimentalLetterSpacing": true, + "__experimentalWritingMode": true, + "__experimentalDefaultControls": { + "fontSize": true + } + }, + "interactivity": { + "clientNavigation": true + }, + "__experimentalBorder": { + "radius": true, + "color": true, + "width": true, + "style": true + } + }, + "editorStyle": "wp-block-site-title-editor", + "style": "wp-block-site-title" +} diff --git a/src/wp-includes/blocks/social-link.php b/src/wp-includes/blocks/social-link.php new file mode 100644 index 0000000000000..0225a14d7beb5 --- /dev/null +++ b/src/wp-includes/blocks/social-link.php @@ -0,0 +1,408 @@ +context['openInNewTab'] ?? false; + + $text = ! empty( $attributes['label'] ) ? trim( $attributes['label'] ) : ''; + + $service = $attributes['service'] ?? 'Icon'; + $url = $attributes['url'] ?? false; + $text = $text ? $text : block_core_social_link_get_name( $service ); + $rel = $attributes['rel'] ?? ''; + $show_labels = array_key_exists( 'showLabels', $block->context ) ? $block->context['showLabels'] : false; + + // Don't render a link if there is no URL set. + if ( ! $url ) { + return ''; + } + + /** + * Prepend emails with `mailto:` if not set. + * The `is_email` returns false for emails with schema. + */ + if ( is_email( $url ) ) { + $url = 'mailto:' . antispambot( $url ); + } + + /** + * Prepend URL with https:// if it doesn't appear to contain a scheme + * and it's not a relative link or a fragment. + */ + if ( ! parse_url( $url, PHP_URL_SCHEME ) && ! str_starts_with( $url, '//' ) && ! str_starts_with( $url, '#' ) ) { + $url = 'https://' . $url; + } + + $icon = block_core_social_link_get_icon( $service ); + $wrapper_attributes = get_block_wrapper_attributes( + array( + 'class' => 'wp-social-link wp-social-link-' . $service . block_core_social_link_get_color_classes( $block->context ), + 'style' => block_core_social_link_get_color_styles( $block->context ), + ) + ); + + $link = '
    8. '; + $link .= ''; + $link .= $icon; + $link .= '' . esc_html( $text ) . ''; + $link .= '
    9. '; + + $processor = new WP_HTML_Tag_Processor( $link ); + $processor->next_tag( 'a' ); + if ( $open_in_new_tab ) { + $processor->set_attribute( 'rel', trim( $rel . ' noopener nofollow' ) ); + $processor->set_attribute( 'target', '_blank' ); + } elseif ( '' !== $rel ) { + $processor->set_attribute( 'rel', trim( $rel ) ); + } + return $processor->get_updated_html(); +} + +/** + * Registers the `core/social-link` blocks. + * + * @since 5.4.0 + */ +function register_block_core_social_link() { + register_block_type_from_metadata( + __DIR__ . '/social-link', + array( + 'render_callback' => 'render_block_core_social_link', + ) + ); +} +add_action( 'init', 'register_block_core_social_link' ); + + +/** + * Returns the SVG for social link. + * + * @since 5.4.0 + * + * @param string $service The service icon. + * + * @return string SVG Element for service icon. + */ +function block_core_social_link_get_icon( $service ) { + $services = block_core_social_link_services(); + if ( isset( $services[ $service ] ) && isset( $services[ $service ]['icon'] ) ) { + return $services[ $service ]['icon']; + } + + return $services['share']['icon']; +} + +/** + * Returns the brand name for social link. + * + * @since 5.4.0 + * + * @param string $service The service icon. + * + * @return string Brand label. + */ +function block_core_social_link_get_name( $service ) { + $services = block_core_social_link_services(); + if ( isset( $services[ $service ] ) && isset( $services[ $service ]['name'] ) ) { + return $services[ $service ]['name']; + } + + return $services['share']['name']; +} + +/** + * Returns the SVG for social link. + * + * @since 5.4.0 + * + * @param string $service The service slug to extract data from. + * @param string $field The field ('name', 'icon', etc) to extract for a service. + * + * @return array|string + */ +function block_core_social_link_services( $service = '', $field = '' ) { + $services_data = array( + 'fivehundredpx' => array( + 'name' => _x( '500px', 'social link block variation name' ), + 'icon' => '', + ), + 'amazon' => array( + 'name' => _x( 'Amazon', 'social link block variation name' ), + 'icon' => '', + ), + 'bandcamp' => array( + 'name' => _x( 'Bandcamp', 'social link block variation name' ), + 'icon' => '', + ), + 'behance' => array( + 'name' => _x( 'Behance', 'social link block variation name' ), + 'icon' => '', + ), + 'bluesky' => array( + 'name' => _x( 'Bluesky', 'social link block variation name' ), + 'icon' => '', + ), + 'chain' => array( + 'name' => _x( 'Link', 'social link block variation name' ), + 'icon' => '', + ), + 'codepen' => array( + 'name' => _x( 'CodePen', 'social link block variation name' ), + 'icon' => '', + ), + 'deviantart' => array( + 'name' => _x( 'DeviantArt', 'social link block variation name' ), + 'icon' => '', + ), + 'discord' => array( + 'name' => _x( 'Discord', 'social link block variation name' ), + 'icon' => '', + ), + 'dribbble' => array( + 'name' => _x( 'Dribbble', 'social link block variation name' ), + 'icon' => '', + ), + 'dropbox' => array( + 'name' => _x( 'Dropbox', 'social link block variation name' ), + 'icon' => '', + ), + 'etsy' => array( + 'name' => _x( 'Etsy', 'social link block variation name' ), + 'icon' => '', + ), + 'facebook' => array( + 'name' => _x( 'Facebook', 'social link block variation name' ), + 'icon' => '', + ), + 'feed' => array( + 'name' => _x( 'RSS Feed', 'social link block variation name' ), + 'icon' => '', + ), + 'flickr' => array( + 'name' => _x( 'Flickr', 'social link block variation name' ), + 'icon' => '', + ), + 'foursquare' => array( + 'name' => _x( 'Foursquare', 'social link block variation name' ), + 'icon' => '', + ), + 'goodreads' => array( + 'name' => _x( 'Goodreads', 'social link block variation name' ), + 'icon' => '', + ), + 'google' => array( + 'name' => _x( 'Google', 'social link block variation name' ), + 'icon' => '', + ), + 'github' => array( + 'name' => _x( 'GitHub', 'social link block variation name' ), + 'icon' => '', + ), + 'gravatar' => array( + 'name' => _x( 'Gravatar', 'social link block variation name' ), + 'icon' => '', + ), + 'instagram' => array( + 'name' => _x( 'Instagram', 'social link block variation name' ), + 'icon' => '', + ), + 'lastfm' => array( + 'name' => _x( 'Last.fm', 'social link block variation name' ), + 'icon' => '', + ), + 'linkedin' => array( + 'name' => _x( 'LinkedIn', 'social link block variation name' ), + 'icon' => '', + ), + 'mail' => array( + 'name' => _x( 'Mail', 'social link block variation name' ), + 'icon' => '', + ), + 'mastodon' => array( + 'name' => _x( 'Mastodon', 'social link block variation name' ), + 'icon' => '', + ), + 'meetup' => array( + 'name' => _x( 'Meetup', 'social link block variation name' ), + 'icon' => '', + ), + 'medium' => array( + 'name' => _x( 'Medium', 'social link block variation name' ), + 'icon' => '', + ), + 'patreon' => array( + 'name' => _x( 'Patreon', 'social link block variation name' ), + 'icon' => '', + ), + 'pinterest' => array( + 'name' => _x( 'Pinterest', 'social link block variation name' ), + 'icon' => '', + ), + 'pocket' => array( + 'name' => _x( 'Pocket', 'social link block variation name' ), + 'icon' => '', + ), + 'reddit' => array( + 'name' => _x( 'Reddit', 'social link block variation name' ), + 'icon' => '', + ), + 'share' => array( + 'name' => _x( 'Share Icon', 'social link block variation name' ), + 'icon' => '', + ), + 'skype' => array( + 'name' => _x( 'Skype', 'social link block variation name' ), + 'icon' => '', + ), + 'snapchat' => array( + 'name' => _x( 'Snapchat', 'social link block variation name' ), + 'icon' => '', + ), + 'soundcloud' => array( + 'name' => _x( 'SoundCloud', 'social link block variation name' ), + 'icon' => '', + ), + 'spotify' => array( + 'name' => _x( 'Spotify', 'social link block variation name' ), + 'icon' => '', + ), + 'telegram' => array( + 'name' => _x( 'Telegram', 'social link block variation name' ), + 'icon' => '', + ), + 'threads' => array( + 'name' => _x( 'Threads', 'social link block variation name' ), + 'icon' => '', + ), + 'tiktok' => array( + 'name' => _x( 'TikTok', 'social link block variation name' ), + 'icon' => '', + ), + 'tumblr' => array( + 'name' => _x( 'Tumblr', 'social link block variation name' ), + 'icon' => '
      ', + ), + 'twitch' => array( + 'name' => _x( 'Twitch', 'social link block variation name' ), + 'icon' => '', + ), + 'twitter' => array( + 'name' => _x( 'Twitter', 'social link block variation name' ), + 'icon' => '', + ), + 'vimeo' => array( + 'name' => _x( 'Vimeo', 'social link block variation name' ), + 'icon' => '', + ), + 'vk' => array( + 'name' => _x( 'VK', 'social link block variation name' ), + 'icon' => '', + ), + 'wordpress' => array( + 'name' => _x( 'WordPress', 'social link block variation name' ), + 'icon' => '', + ), + 'whatsapp' => array( + 'name' => _x( 'WhatsApp', 'social link block variation name' ), + 'icon' => '', + ), + 'x' => array( + 'name' => _x( 'X', 'social link block variation name' ), + 'icon' => '', + ), + 'yelp' => array( + 'name' => _x( 'Yelp', 'social link block variation name' ), + 'icon' => '', + ), + 'youtube' => array( + 'name' => _x( 'YouTube', 'social link block variation name' ), + 'icon' => '', + ), + ); + + /** + * Filter the list of available social service. + * + * This can be used to change icons or add custom icons (additionally to variations in the editor). + * Icons should be directly renderable - therefore SVGs work best. + * + * @since 6.9.0 + * + * @param array $services_data The list of services. Each item is an array containing a 'name' and 'icon' key. + * @return array The list of social services. + */ + $services_data = apply_filters( 'block_core_social_link_get_services', $services_data ); + + if ( ! empty( $service ) + && ! empty( $field ) + && isset( $services_data[ $service ] ) + && ( 'icon' === $field || 'name' === $field ) + ) { + return $services_data[ $service ][ $field ]; + } elseif ( ! empty( $service ) && isset( $services_data[ $service ] ) ) { + return $services_data[ $service ]; + } + + return $services_data; +} + +/** + * Returns CSS styles for icon and icon background colors. + * + * @since 5.7.0 + * + * @param array $context Block context passed to Social Link. + * + * @return string Inline CSS styles for link's icon and background colors. + */ +function block_core_social_link_get_color_styles( $context ) { + $styles = array(); + + if ( array_key_exists( 'iconColorValue', $context ) ) { + $styles[] = 'color:' . $context['iconColorValue'] . ';'; + } + + if ( array_key_exists( 'iconBackgroundColorValue', $context ) ) { + $styles[] = 'background-color:' . $context['iconBackgroundColorValue'] . ';'; + } + + return implode( '', $styles ); +} + +/** + * Returns CSS classes for icon and icon background colors. + * + * @since 6.3.0 + * + * @param array $context Block context passed to Social Sharing Link. + * + * @return string CSS classes for link's icon and background colors. + */ +function block_core_social_link_get_color_classes( $context ) { + $classes = array(); + + if ( array_key_exists( 'iconColor', $context ) ) { + $classes[] = 'has-' . $context['iconColor'] . '-color'; + } + + if ( array_key_exists( 'iconBackgroundColor', $context ) ) { + $classes[] = 'has-' . $context['iconBackgroundColor'] . '-background-color'; + } + + return ' ' . implode( ' ', $classes ); +} diff --git a/src/wp-includes/blocks/social-link/block.json b/src/wp-includes/blocks/social-link/block.json new file mode 100644 index 0000000000000..db59656abb1c0 --- /dev/null +++ b/src/wp-includes/blocks/social-link/block.json @@ -0,0 +1,43 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/social-link", + "title": "Social Icon", + "category": "widgets", + "parent": [ "core/social-links" ], + "description": "Display an icon linking to a social profile or site.", + "textdomain": "default", + "attributes": { + "url": { + "type": "string", + "role": "content" + }, + "service": { + "type": "string" + }, + "label": { + "type": "string", + "role": "content" + }, + "rel": { + "type": "string" + } + }, + "usesContext": [ + "openInNewTab", + "showLabels", + "iconColor", + "iconColorValue", + "iconBackgroundColor", + "iconBackgroundColorValue" + ], + "supports": { + "anchor": true, + "reusable": false, + "html": false, + "interactivity": { + "clientNavigation": true + } + }, + "editorStyle": "wp-block-social-link-editor" +} diff --git a/src/wp-includes/blocks/social-links/block.json b/src/wp-includes/blocks/social-links/block.json new file mode 100644 index 0000000000000..fb137d1d6c3cd --- /dev/null +++ b/src/wp-includes/blocks/social-links/block.json @@ -0,0 +1,108 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/social-links", + "title": "Social Icons", + "category": "widgets", + "allowedBlocks": [ "core/social-link" ], + "description": "Display icons linking to your social profiles or sites.", + "keywords": [ "links" ], + "textdomain": "default", + "attributes": { + "iconColor": { + "type": "string" + }, + "customIconColor": { + "type": "string" + }, + "iconColorValue": { + "type": "string" + }, + "iconBackgroundColor": { + "type": "string" + }, + "customIconBackgroundColor": { + "type": "string" + }, + "iconBackgroundColorValue": { + "type": "string" + }, + "openInNewTab": { + "type": "boolean", + "default": false + }, + "showLabels": { + "type": "boolean", + "default": false + }, + "size": { + "type": "string" + } + }, + "providesContext": { + "openInNewTab": "openInNewTab", + "showLabels": "showLabels", + "iconColor": "iconColor", + "iconColorValue": "iconColorValue", + "iconBackgroundColor": "iconBackgroundColor", + "iconBackgroundColorValue": "iconBackgroundColorValue" + }, + "supports": { + "align": [ "left", "center", "right" ], + "anchor": true, + "html": false, + "__experimentalExposeControlsToChildren": true, + "layout": { + "allowSwitching": false, + "allowInheriting": false, + "allowVerticalAlignment": false, + "default": { + "type": "flex" + } + }, + "color": { + "enableContrastChecker": false, + "background": true, + "gradients": true, + "text": false, + "__experimentalDefaultControls": { + "background": false + } + }, + "spacing": { + "blockGap": [ "horizontal", "vertical" ], + "margin": true, + "padding": true, + "units": [ "px", "em", "rem", "vh", "vw" ], + "__experimentalDefaultControls": { + "blockGap": true, + "margin": true, + "padding": false + } + }, + "interactivity": { + "clientNavigation": true + }, + "__experimentalBorder": { + "radius": true, + "color": true, + "width": true, + "style": true, + "__experimentalDefaultControls": { + "radius": true, + "color": true, + "width": true, + "style": true + } + }, + "contentRole": true, + "listView": true + }, + "styles": [ + { "name": "default", "label": "Default", "isDefault": true }, + { "name": "logos-only", "label": "Logos Only" }, + { "name": "pill-shape", "label": "Pill Shape" } + ], + "editorStyle": "wp-block-social-links-editor", + "style": "wp-block-social-links" +} diff --git a/src/wp-includes/blocks/spacer/block.json b/src/wp-includes/blocks/spacer/block.json new file mode 100644 index 0000000000000..447ea99cc0b67 --- /dev/null +++ b/src/wp-includes/blocks/spacer/block.json @@ -0,0 +1,33 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/spacer", + "title": "Spacer", + "category": "design", + "description": "Add white space between blocks and customize its height.", + "textdomain": "default", + "attributes": { + "height": { + "type": "string", + "default": "100px" + }, + "width": { + "type": "string" + } + }, + "usesContext": [ "orientation" ], + "supports": { + "anchor": true, + "spacing": { + "margin": [ "top", "bottom" ], + "__experimentalDefaultControls": { + "margin": true + } + }, + "interactivity": { + "clientNavigation": true + } + }, + "editorStyle": "wp-block-spacer-editor", + "style": "wp-block-spacer" +} diff --git a/src/wp-includes/blocks/table/block.json b/src/wp-includes/blocks/table/block.json new file mode 100644 index 0000000000000..84f2783d3ff8c --- /dev/null +++ b/src/wp-includes/blocks/table/block.json @@ -0,0 +1,220 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/table", + "title": "Table", + "category": "text", + "description": "Create structured content in rows and columns to display information.", + "textdomain": "default", + "attributes": { + "hasFixedLayout": { + "type": "boolean", + "default": true + }, + "caption": { + "type": "rich-text", + "source": "rich-text", + "selector": "figcaption", + "role": "content" + }, + "head": { + "type": "array", + "default": [], + "source": "query", + "selector": "thead tr", + "query": { + "cells": { + "type": "array", + "default": [], + "source": "query", + "selector": "td,th", + "query": { + "content": { + "type": "rich-text", + "source": "rich-text", + "role": "content" + }, + "tag": { + "type": "string", + "default": "td", + "source": "tag" + }, + "scope": { + "type": "string", + "source": "attribute", + "attribute": "scope" + }, + "align": { + "type": "string", + "source": "attribute", + "attribute": "data-align" + }, + "colspan": { + "type": "string", + "source": "attribute", + "attribute": "colspan" + }, + "rowspan": { + "type": "string", + "source": "attribute", + "attribute": "rowspan" + } + } + } + } + }, + "body": { + "type": "array", + "default": [], + "source": "query", + "selector": "tbody tr", + "query": { + "cells": { + "type": "array", + "default": [], + "source": "query", + "selector": "td,th", + "query": { + "content": { + "type": "rich-text", + "source": "rich-text", + "role": "content" + }, + "tag": { + "type": "string", + "default": "td", + "source": "tag" + }, + "scope": { + "type": "string", + "source": "attribute", + "attribute": "scope" + }, + "align": { + "type": "string", + "source": "attribute", + "attribute": "data-align" + }, + "colspan": { + "type": "string", + "source": "attribute", + "attribute": "colspan" + }, + "rowspan": { + "type": "string", + "source": "attribute", + "attribute": "rowspan" + } + } + } + } + }, + "foot": { + "type": "array", + "default": [], + "source": "query", + "selector": "tfoot tr", + "query": { + "cells": { + "type": "array", + "default": [], + "source": "query", + "selector": "td,th", + "query": { + "content": { + "type": "rich-text", + "source": "rich-text", + "role": "content" + }, + "tag": { + "type": "string", + "default": "td", + "source": "tag" + }, + "scope": { + "type": "string", + "source": "attribute", + "attribute": "scope" + }, + "align": { + "type": "string", + "source": "attribute", + "attribute": "data-align" + }, + "colspan": { + "type": "string", + "source": "attribute", + "attribute": "colspan" + }, + "rowspan": { + "type": "string", + "source": "attribute", + "attribute": "rowspan" + } + } + } + } + } + }, + "supports": { + "anchor": true, + "align": true, + "color": { + "__experimentalSkipSerialization": true, + "gradients": true, + "__experimentalDefaultControls": { + "background": true, + "text": true + } + }, + "spacing": { + "margin": true, + "padding": true, + "__experimentalDefaultControls": { + "margin": false, + "padding": false + } + }, + "typography": { + "fontSize": true, + "lineHeight": true, + "__experimentalFontFamily": true, + "__experimentalFontStyle": true, + "__experimentalFontWeight": true, + "__experimentalLetterSpacing": true, + "__experimentalTextTransform": true, + "__experimentalTextDecoration": true, + "__experimentalDefaultControls": { + "fontSize": true + } + }, + "__experimentalBorder": { + "__experimentalSkipSerialization": true, + "color": true, + "style": true, + "width": true, + "__experimentalDefaultControls": { + "color": true, + "style": true, + "width": true + } + }, + "interactivity": { + "clientNavigation": true + } + }, + "selectors": { + "root": ".wp-block-table > table", + "spacing": ".wp-block-table" + }, + "styles": [ + { + "name": "regular", + "label": "Default", + "isDefault": true + }, + { "name": "stripes", "label": "Stripes" } + ], + "editorStyle": "wp-block-table-editor", + "style": "wp-block-table" +} diff --git a/src/wp-includes/blocks/tag-cloud.php b/src/wp-includes/blocks/tag-cloud.php new file mode 100644 index 0000000000000..8949dd8e5b11f --- /dev/null +++ b/src/wp-includes/blocks/tag-cloud.php @@ -0,0 +1,63 @@ +[a-z%]+)$/i', $smallest_font_size, $m ) ? $m['unit'] : 'pt' ); + + $args = array( + 'echo' => false, + 'unit' => $unit, + 'taxonomy' => $attributes['taxonomy'], + 'show_count' => $attributes['showTagCounts'], + 'number' => $attributes['numberOfTags'], + 'smallest' => floatVal( $attributes['smallestFontSize'] ), + 'largest' => floatVal( $attributes['largestFontSize'] ), + ); + $tag_cloud = wp_tag_cloud( $args ); + + if ( empty( $tag_cloud ) ) { + // Display placeholder content when there are no tags only in editor. + if ( wp_is_serving_rest_request() ) { + $tag_cloud = __( 'There’s no content to show here yet.' ); + } else { + return ''; + } + } + + $wrapper_attributes = get_block_wrapper_attributes(); + + return sprintf( + '

      %2$s

      ', + $wrapper_attributes, + $tag_cloud + ); +} + +/** + * Registers the `core/tag-cloud` block on server. + * + * @since 5.2.0 + */ +function register_block_core_tag_cloud() { + register_block_type_from_metadata( + __DIR__ . '/tag-cloud', + array( + 'render_callback' => 'render_block_core_tag_cloud', + ) + ); +} +add_action( 'init', 'register_block_core_tag_cloud' ); diff --git a/src/wp-includes/blocks/tag-cloud/block.json b/src/wp-includes/blocks/tag-cloud/block.json new file mode 100644 index 0000000000000..b91f7d8d028b5 --- /dev/null +++ b/src/wp-includes/blocks/tag-cloud/block.json @@ -0,0 +1,69 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/tag-cloud", + "title": "Tag Cloud", + "category": "widgets", + "description": "A cloud of popular keywords, each sized by how often it appears.", + "textdomain": "default", + "attributes": { + "numberOfTags": { + "type": "number", + "default": 45, + "minimum": 1, + "maximum": 100 + }, + "taxonomy": { + "type": "string", + "default": "post_tag" + }, + "showTagCounts": { + "type": "boolean", + "default": false + }, + "smallestFontSize": { + "type": "string", + "default": "8pt" + }, + "largestFontSize": { + "type": "string", + "default": "22pt" + } + }, + "styles": [ + { "name": "default", "label": "Default", "isDefault": true }, + { "name": "outline", "label": "Outline" } + ], + "supports": { + "anchor": true, + "html": false, + "align": true, + "spacing": { + "margin": true, + "padding": true + }, + "typography": { + "lineHeight": true, + "__experimentalFontFamily": true, + "__experimentalFontWeight": true, + "__experimentalFontStyle": true, + "__experimentalTextTransform": true, + "__experimentalLetterSpacing": true + }, + "interactivity": { + "clientNavigation": true + }, + "__experimentalBorder": { + "radius": true, + "color": true, + "width": true, + "style": true, + "__experimentalDefaultControls": { + "radius": true, + "color": true, + "width": true, + "style": true + } + } + } +} diff --git a/src/wp-includes/blocks/template-part.php b/src/wp-includes/blocks/template-part.php new file mode 100644 index 0000000000000..25ba4e4a99624 --- /dev/null +++ b/src/wp-includes/blocks/template-part.php @@ -0,0 +1,314 @@ + 'wp_template_part', + 'post_status' => 'publish', + 'post_name__in' => array( $attributes['slug'] ), + 'tax_query' => array( + array( + 'taxonomy' => 'wp_theme', + 'field' => 'name', + 'terms' => $theme, + ), + ), + 'posts_per_page' => 1, + 'no_found_rows' => true, + 'lazy_load_term_meta' => false, // Do not lazy load term meta, as template parts only have one term. + ) + ); + $template_part_post = $template_part_query->have_posts() ? $template_part_query->next_post() : null; + if ( $template_part_post ) { + // A published post might already exist if this template part was customized elsewhere + // or if it's part of a customized template. + $block_template = _build_block_template_result_from_post( $template_part_post ); + $content = $block_template->content; + if ( isset( $block_template->area ) ) { + $area = $block_template->area; + } + /** + * Fires when a block template part is loaded from a template post stored in the database. + * + * @since 5.9.0 + * + * @param string $template_part_id The requested template part namespaced to the theme. + * @param array $attributes The block attributes. + * @param WP_Post $template_part_post The template part post object. + * @param string $content The template part content. + */ + do_action( 'render_block_core_template_part_post', $template_part_id, $attributes, $template_part_post, $content ); + } else { + $template_part_file_path = ''; + // Else, if the template part was provided by the active theme, + // render the corresponding file content. + if ( 0 === validate_file( $attributes['slug'] ) ) { + $block_template = get_block_file_template( $template_part_id, 'wp_template_part' ); + + if ( isset( $block_template->content ) ) { + $content = $block_template->content; + } + if ( isset( $block_template->area ) ) { + $area = $block_template->area; + } + + // Needed for the `render_block_core_template_part_file` and `render_block_core_template_part_none` actions below. + $block_template_file = _get_block_template_file( 'wp_template_part', $attributes['slug'] ); + if ( $block_template_file ) { + $template_part_file_path = $block_template_file['path']; + } + } + + if ( '' !== $content && null !== $content ) { + /** + * Fires when a block template part is loaded from a template part in the theme. + * + * @since 5.9.0 + * + * @param string $template_part_id The requested template part namespaced to the theme. + * @param array $attributes The block attributes. + * @param string $template_part_file_path Absolute path to the template path. + * @param string $content The template part content. + */ + do_action( 'render_block_core_template_part_file', $template_part_id, $attributes, $template_part_file_path, $content ); + } else { + /** + * Fires when a requested block template part does not exist in the database nor in the theme. + * + * @since 5.9.0 + * + * @param string $template_part_id The requested template part namespaced to the theme. + * @param array $attributes The block attributes. + * @param string $template_part_file_path Absolute path to the not found template path. + */ + do_action( 'render_block_core_template_part_none', $template_part_id, $attributes, $template_part_file_path ); + } + } + } + + // WP_DEBUG_DISPLAY must only be honored when WP_DEBUG. This precedent + // is set in `wp_debug_mode()`. + $is_debug = WP_DEBUG && WP_DEBUG_DISPLAY; + + if ( is_null( $content ) ) { + if ( $is_debug && isset( $attributes['slug'] ) ) { + return sprintf( + /* translators: %s: Template part slug. */ + __( 'Template part has been deleted or is unavailable: %s' ), + $attributes['slug'] + ); + } + + return ''; + } + + if ( isset( $seen_ids[ $template_part_id ] ) ) { + return $is_debug ? + // translators: Visible only in the front end, this warning takes the place of a faulty block. + __( '[block rendering halted]' ) : + ''; + } + + // Look up area definition. + $area_definition = null; + $defined_areas = get_allowed_block_template_part_areas(); + foreach ( $defined_areas as $defined_area ) { + if ( $defined_area['area'] === $area ) { + $area_definition = $defined_area; + break; + } + } + + // If $area is not allowed, set it back to the uncategorized default. + if ( ! $area_definition ) { + $area = WP_TEMPLATE_PART_AREA_UNCATEGORIZED; + } + + // Run through the actions that are typically taken on the_content. + $content = shortcode_unautop( $content ); + $content = do_shortcode( $content ); + $seen_ids[ $template_part_id ] = true; + $content = do_blocks( $content ); + unset( $seen_ids[ $template_part_id ] ); + $content = wptexturize( $content ); + $content = convert_smilies( $content ); + $content = wp_filter_content_tags( $content, "template_part_{$area}" ); + + /** + * Handle embeds for block template parts. + * + * @global WP_Embed $wp_embed WordPress Embed object. + */ + global $wp_embed; + $content = $wp_embed->autoembed( $content ); + + if ( empty( $attributes['tagName'] ) || tag_escape( $attributes['tagName'] ) !== $attributes['tagName'] ) { + $area_tag = 'div'; + if ( $area_definition && isset( $area_definition['area_tag'] ) ) { + $area_tag = $area_definition['area_tag']; + } + $html_tag = $area_tag; + } else { + $html_tag = esc_attr( $attributes['tagName'] ); + } + $wrapper_attributes = get_block_wrapper_attributes(); + + return "<$html_tag $wrapper_attributes>" . str_replace( ']]>', ']]>', $content ) . ""; +} + +/** + * Returns an array of area variation objects for the template part block. + * + * @since 6.1.0 + * + * @param array $instance_variations The variations for instances. + * + * @return array Array containing the block variation objects. + */ +function build_template_part_block_area_variations( $instance_variations ) { + $variations = array(); + $defined_areas = get_allowed_block_template_part_areas(); + + foreach ( $defined_areas as $area ) { + if ( 'uncategorized' !== $area['area'] && 'navigation-overlay' !== $area['area'] ) { + $has_instance_for_area = false; + foreach ( $instance_variations as $variation ) { + if ( $variation['attributes']['area'] === $area['area'] ) { + $has_instance_for_area = true; + break; + } + } + + $scope = $has_instance_for_area ? array() : array( 'inserter' ); + + $variations[] = array( + 'name' => 'area_' . $area['area'], + 'title' => $area['label'], + 'description' => $area['description'], + 'attributes' => array( + 'area' => $area['area'], + ), + 'scope' => $scope, + 'icon' => $area['icon'], + ); + } + } + return $variations; +} + +/** + * Returns an array of instance variation objects for the template part block + * + * @since 6.1.0 + * + * @return array Array containing the block variation objects. + */ +function build_template_part_block_instance_variations() { + // Block themes are unavailable during installation. + if ( wp_installing() ) { + return array(); + } + + if ( ! current_theme_supports( 'block-templates' ) && ! current_theme_supports( 'block-template-parts' ) ) { + return array(); + } + + $variations = array(); + $template_parts = get_block_templates( + array( + 'post_type' => 'wp_template_part', + ), + 'wp_template_part' + ); + + $defined_areas = get_allowed_block_template_part_areas(); + $icon_by_area = array_combine( array_column( $defined_areas, 'area' ), array_column( $defined_areas, 'icon' ) ); + + foreach ( $template_parts as $template_part ) { + // Navigation overlay template parts should not appear in the + // general inserter. They are managed through the Navigation + // block's overlay template part selector. + $scope = ( 'navigation-overlay' === $template_part->area ) + ? array() + : array( 'inserter' ); + + $variations[] = array( + 'name' => 'instance_' . sanitize_title( $template_part->slug ), + 'title' => $template_part->title, + // If there's no description for the template part don't show the + // block description. This is a bit hacky, but prevent the fallback + // by using a non-breaking space so that the value of description + // isn't falsey. + 'description' => $template_part->description || ' ', + 'attributes' => array( + 'slug' => $template_part->slug, + 'theme' => $template_part->theme, + 'area' => $template_part->area, + ), + 'scope' => $scope, + 'icon' => $icon_by_area[ $template_part->area ] ?? null, + 'example' => array( + 'attributes' => array( + 'slug' => $template_part->slug, + 'theme' => $template_part->theme, + 'area' => $template_part->area, + ), + ), + ); + } + return $variations; +} + +/** + * Returns an array of all template part block variations. + * + * @since 5.9.0 + * + * @return array Array containing the block variation objects. + */ +function build_template_part_block_variations() { + $instance_variations = build_template_part_block_instance_variations(); + $area_variations = build_template_part_block_area_variations( $instance_variations ); + return array_merge( $area_variations, $instance_variations ); +} + +/** + * Registers the `core/template-part` block on the server. + * + * @since 5.9.0 + */ +function register_block_core_template_part() { + register_block_type_from_metadata( + __DIR__ . '/template-part', + array( + 'render_callback' => 'render_block_core_template_part', + 'variation_callback' => 'build_template_part_block_variations', + ) + ); +} +add_action( 'init', 'register_block_core_template_part' ); diff --git a/src/wp-includes/blocks/template-part/block.json b/src/wp-includes/blocks/template-part/block.json new file mode 100644 index 0000000000000..9710bdeee2e53 --- /dev/null +++ b/src/wp-includes/blocks/template-part/block.json @@ -0,0 +1,33 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/template-part", + "title": "Template Part", + "category": "theme", + "description": "Edit the different global regions of your site, like the header, footer, sidebar, or create your own.", + "textdomain": "default", + "attributes": { + "slug": { + "type": "string" + }, + "theme": { + "type": "string" + }, + "tagName": { + "type": "string" + }, + "area": { + "type": "string" + } + }, + "supports": { + "align": true, + "html": false, + "reusable": false, + "renaming": false, + "interactivity": { + "clientNavigation": true + } + }, + "editorStyle": "wp-block-template-part-editor" +} diff --git a/src/wp-includes/blocks/term-count.php b/src/wp-includes/blocks/term-count.php new file mode 100644 index 0000000000000..9794896524eb4 --- /dev/null +++ b/src/wp-includes/blocks/term-count.php @@ -0,0 +1,80 @@ +context['termId'] ) && isset( $block->context['taxonomy'] ) ) { + $term = get_term( $block->context['termId'], $block->context['taxonomy'] ); + } else { + $term = get_queried_object(); + if ( ! $term instanceof WP_Term ) { + $term = null; + } + } + + if ( ! $term || is_wp_error( $term ) ) { + return ''; + } + + $term_count = $term->count; + + // Format the term count based on bracket type. + switch ( $attributes['bracketType'] ) { + case 'none': + // No formatting needed. + break; + case 'round': + $term_count = "({$term_count})"; + break; + case 'square': + $term_count = "[{$term_count}]"; + break; + case 'curly': + $term_count = "{{$term_count}}"; + break; + case 'angle': + $term_count = "<{$term_count}>"; + break; + default: + // Default to no formatting for unknown types. + break; + } + + $wrapper_attributes = get_block_wrapper_attributes(); + + return sprintf( + '
      %2$s
      ', + $wrapper_attributes, + $term_count + ); +} + +/** + * Registers the `core/term-count` block on the server. + * + * @since 6.9.0 + */ +function register_block_core_term_count() { + register_block_type_from_metadata( + __DIR__ . '/term-count', + array( + 'render_callback' => 'render_block_core_term_count', + ) + ); +} +add_action( 'init', 'register_block_core_term_count' ); diff --git a/src/wp-includes/blocks/term-count/block.json b/src/wp-includes/blocks/term-count/block.json new file mode 100644 index 0000000000000..4a7c578bb0b5b --- /dev/null +++ b/src/wp-includes/blocks/term-count/block.json @@ -0,0 +1,59 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/term-count", + "title": "Term Count", + "category": "theme", + "description": "Displays the post count of a taxonomy term.", + "textdomain": "default", + "usesContext": [ "termId", "taxonomy" ], + "attributes": { + "bracketType": { + "type": "string", + "enum": [ "none", "round", "square", "curly", "angle" ], + "default": "round" + } + }, + "supports": { + "anchor": true, + "html": false, + "color": { + "gradients": true, + "__experimentalDefaultControls": { + "background": true, + "text": true + } + }, + "spacing": { + "padding": true + }, + "typography": { + "fontSize": true, + "lineHeight": true, + "__experimentalFontFamily": true, + "__experimentalFontWeight": true, + "__experimentalFontStyle": true, + "__experimentalTextTransform": true, + "__experimentalTextDecoration": true, + "__experimentalLetterSpacing": true, + "__experimentalDefaultControls": { + "fontSize": true + } + }, + "interactivity": { + "clientNavigation": true + }, + "__experimentalBorder": { + "radius": true, + "color": true, + "width": true, + "style": true, + "__experimentalDefaultControls": { + "color": true, + "width": true, + "style": true + } + } + }, + "style": "wp-block-term-count" +} diff --git a/src/wp-includes/blocks/term-description.php b/src/wp-includes/blocks/term-description.php new file mode 100644 index 0000000000000..9f61dbba07fbc --- /dev/null +++ b/src/wp-includes/blocks/term-description.php @@ -0,0 +1,61 @@ +context['termId'] ) && isset( $block->context['taxonomy'] ) ) { + $term = get_term( $block->context['termId'], $block->context['taxonomy'] ); + if ( $term && ! is_wp_error( $term ) ) { + $term_description = $term->description; + } + } elseif ( is_category() || is_tag() || is_tax() ) { + $term_description = term_description(); + } + + if ( empty( $term_description ) ) { + return ''; + } + + $classes = array(); + if ( isset( $attributes['textAlign'] ) ) { + $classes[] = 'has-text-align-' . $attributes['textAlign']; + } + if ( isset( $attributes['style']['elements']['link']['color']['text'] ) ) { + $classes[] = 'has-link-color'; + } + $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => implode( ' ', $classes ) ) ); + + return '
      ' . $term_description . '
      '; +} + +/** + * Registers the `core/term-description` block on the server. + * + * @since 5.9.0 + */ +function register_block_core_term_description() { + register_block_type_from_metadata( + __DIR__ . '/term-description', + array( + 'render_callback' => 'render_block_core_term_description', + ) + ); +} +add_action( 'init', 'register_block_core_term_description' ); diff --git a/src/wp-includes/blocks/term-description/block.json b/src/wp-includes/blocks/term-description/block.json new file mode 100644 index 0000000000000..c0894ec0fb46d --- /dev/null +++ b/src/wp-includes/blocks/term-description/block.json @@ -0,0 +1,55 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/term-description", + "title": "Term Description", + "category": "theme", + "description": "Display the description of categories, tags and custom taxonomies when viewing an archive.", + "textdomain": "default", + "usesContext": [ "termId", "taxonomy" ], + "supports": { + "anchor": true, + "align": [ "wide", "full" ], + "html": false, + "color": { + "link": true, + "__experimentalDefaultControls": { + "background": true, + "text": true + } + }, + "spacing": { + "padding": true, + "margin": true + }, + "typography": { + "fontSize": true, + "lineHeight": true, + "textAlign": true, + "__experimentalFontFamily": true, + "__experimentalFontWeight": true, + "__experimentalFontStyle": true, + "__experimentalTextTransform": true, + "__experimentalTextDecoration": true, + "__experimentalLetterSpacing": true, + "__experimentalDefaultControls": { + "fontSize": true + } + }, + "interactivity": { + "clientNavigation": true + }, + "__experimentalBorder": { + "radius": true, + "color": true, + "width": true, + "style": true, + "__experimentalDefaultControls": { + "radius": true, + "color": true, + "width": true, + "style": true + } + } + } +} diff --git a/src/wp-includes/blocks/term-name.php b/src/wp-includes/blocks/term-name.php new file mode 100644 index 0000000000000..a583371f7e1eb --- /dev/null +++ b/src/wp-includes/blocks/term-name.php @@ -0,0 +1,81 @@ +context['termId'] ) && isset( $block->context['taxonomy'] ) ) { + $term = get_term( $block->context['termId'], $block->context['taxonomy'] ); + } else { + $term = get_queried_object(); + if ( ! $term instanceof WP_Term ) { + $term = null; + } + } + + if ( ! $term || is_wp_error( $term ) ) { + return ''; + } + + $term_name = $term->name; + $level = $attributes['level'] ?? 0; + $tag_name = 0 === $level ? 'p' : 'h' . (int) $level; + + if ( isset( $attributes['isLink'] ) && $attributes['isLink'] ) { + $term_link = get_term_link( $term ); + if ( ! is_wp_error( $term_link ) ) { + $term_name = sprintf( + '%2$s', + esc_url( $term_link ), + $term_name + ); + } + } + + $classes = array(); + if ( isset( $attributes['textAlign'] ) ) { + $classes[] = 'has-text-align-' . $attributes['textAlign']; + } + if ( isset( $attributes['style']['elements']['link']['color']['text'] ) ) { + $classes[] = 'has-link-color'; + } + $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => implode( ' ', $classes ) ) ); + + return sprintf( + '<%1$s %2$s>%3$s', + $tag_name, + $wrapper_attributes, + $term_name + ); +} + +/** + * Registers the `core/term-name` block on the server. + * + * @since 6.9.0 + */ +function register_block_core_term_name() { + register_block_type_from_metadata( + __DIR__ . '/term-name', + array( + 'render_callback' => 'render_block_core_term_name', + ) + ); +} +add_action( 'init', 'register_block_core_term_name' ); diff --git a/src/wp-includes/blocks/term-name/block.json b/src/wp-includes/blocks/term-name/block.json new file mode 100644 index 0000000000000..44a063303dd70 --- /dev/null +++ b/src/wp-includes/blocks/term-name/block.json @@ -0,0 +1,72 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/term-name", + "title": "Term Name", + "category": "theme", + "description": "Displays the name of a taxonomy term.", + "keywords": [ "term title" ], + "textdomain": "default", + "usesContext": [ "termId", "taxonomy" ], + "attributes": { + "textAlign": { + "type": "string" + }, + "level": { + "type": "number", + "default": 0 + }, + "isLink": { + "type": "boolean", + "default": false + }, + "levelOptions": { + "type": "array" + } + }, + "supports": { + "anchor": true, + "align": [ "wide", "full" ], + "html": false, + "color": { + "gradients": true, + "link": true, + "__experimentalDefaultControls": { + "background": true, + "text": true, + "link": true + } + }, + "spacing": { + "padding": true + }, + "typography": { + "fontSize": true, + "lineHeight": true, + "__experimentalFontFamily": true, + "__experimentalFontWeight": true, + "__experimentalFontStyle": true, + "__experimentalTextTransform": true, + "__experimentalTextDecoration": true, + "__experimentalLetterSpacing": true, + "__experimentalDefaultControls": { + "fontSize": true + } + }, + "interactivity": { + "clientNavigation": true + }, + "__experimentalBorder": { + "radius": true, + "color": true, + "width": true, + "style": true, + "__experimentalDefaultControls": { + "color": true, + "width": true, + "style": true + } + } + }, + "style": "wp-block-term-name" +} diff --git a/src/wp-includes/blocks/term-template.php b/src/wp-includes/blocks/term-template.php new file mode 100644 index 0000000000000..c6fa390c4ec47 --- /dev/null +++ b/src/wp-includes/blocks/term-template.php @@ -0,0 +1,137 @@ +context ) || empty( $block->context['termQuery'] ) ) { + return ''; + } + + $query = $block->context['termQuery']; + + $query_args = array( + 'number' => $query['perPage'], + 'order' => $query['order'], + 'orderby' => $query['orderBy'], + 'hide_empty' => $query['hideEmpty'], + ); + + $inherit_query = isset( $query['inherit'] ) + && $query['inherit'] + && ( is_tax() || is_category() || is_tag() ); + + if ( $inherit_query ) { + // Get the current term and taxonomy from the queried object. + $queried_object = get_queried_object(); + + // For hierarchical taxonomies, show children of the current term. + // For non-hierarchical taxonomies, show all terms (don't set parent). + if ( is_taxonomy_hierarchical( $queried_object->taxonomy ) ) { + // If showNested is true, use child_of to include nested terms. + // Otherwise, use parent to show only direct children. + if ( ! empty( $query['showNested'] ) ) { + $query_args['child_of'] = $queried_object->term_id; + } else { + $query_args['parent'] = $queried_object->term_id; + } + } + $query_args['taxonomy'] = $queried_object->taxonomy; + } else { + // If not inheriting set `taxonomy` from the block attribute. + $query_args['taxonomy'] = $query['taxonomy']; + + // If we are including specific terms we ignore `showNested` argument. + if ( ! empty( $query['include'] ) ) { + $query_args['include'] = array_unique( array_map( 'intval', $query['include'] ) ); + $query_args['orderby'] = 'include'; + $query_args['order'] = 'asc'; + } elseif ( is_taxonomy_hierarchical( $query['taxonomy'] ) && empty( $query['showNested'] ) ) { + // We set parent only when inheriting from the taxonomy archive context or not + // showing nested terms, otherwise nested terms are not displayed. + $query_args['parent'] = 0; + } + } + + $terms_query = new WP_Term_Query( $query_args ); + $terms = $terms_query->get_terms(); + + if ( ! $terms || is_wp_error( $terms ) ) { + return ''; + } + + $content = ''; + foreach ( $terms as $term ) { + // Get an instance of the current Term Template block. + $block_instance = $block->parsed_block; + + // Set the block name to one that does not correspond to an existing registered block. + // This ensures that for the inner instances of the Term Template block, we do not render any block supports. + $block_instance['blockName'] = 'core/null'; + + $term_id = $term->term_id; + $taxonomy = $term->taxonomy; + + $filter_block_context = static function ( $context ) use ( $term_id, $taxonomy ) { + $context['termId'] = $term_id; + $context['taxonomy'] = $taxonomy; + return $context; + }; + + // Use an early priority to so that other 'render_block_context' filters have access to the values. + add_filter( 'render_block_context', $filter_block_context, 1 ); + + // Render the inner blocks of the Term Template block with `dynamic` set to `false` to prevent calling + // `render_callback` and ensure that no wrapper markup is included. + $block_content = ( new WP_Block( $block_instance ) )->render( array( 'dynamic' => false ) ); + + remove_filter( 'render_block_context', $filter_block_context, 1 ); + + // Wrap the render inner blocks in a `li` element with the appropriate term classes. + $term_classes = "wp-block-term term-{$term->term_id} {$term->taxonomy} taxonomy-{$term->taxonomy}"; + + $content .= '
    10. ' . $block_content . '
    11. '; + } + + $classnames = ''; + + if ( isset( $attributes['style']['elements']['link']['color']['text'] ) ) { + $classnames .= 'has-link-color'; + } + + $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => trim( $classnames ) ) ); + + return sprintf( + '
        %s
      ', + $wrapper_attributes, + $content + ); +} + +/** + * Registers the `core/term-template` block on the server. + * + * @since 6.9.0 + */ +function register_block_core_term_template() { + register_block_type_from_metadata( + __DIR__ . '/term-template', + array( + 'render_callback' => 'render_block_core_term_template', + ) + ); +} +add_action( 'init', 'register_block_core_term_template' ); diff --git a/src/wp-includes/blocks/term-template/block.json b/src/wp-includes/blocks/term-template/block.json new file mode 100644 index 0000000000000..8914bf6376aa7 --- /dev/null +++ b/src/wp-includes/blocks/term-template/block.json @@ -0,0 +1,62 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/term-template", + "title": "Term Template", + "category": "theme", + "ancestor": [ "core/terms-query" ], + "description": "Contains the block elements used to render a taxonomy term, like the name, description, and more.", + "textdomain": "default", + "usesContext": [ "termQuery" ], + "supports": { + "anchor": true, + "reusable": false, + "html": false, + "align": [ "wide", "full" ], + "layout": true, + "color": { + "gradients": true, + "link": true, + "__experimentalDefaultControls": { + "background": true, + "text": true + } + }, + "typography": { + "fontSize": true, + "lineHeight": true, + "__experimentalFontFamily": true, + "__experimentalFontWeight": true, + "__experimentalFontStyle": true, + "__experimentalTextTransform": true, + "__experimentalTextDecoration": true, + "__experimentalLetterSpacing": true, + "__experimentalDefaultControls": { + "fontSize": true + } + }, + "spacing": { + "margin": true, + "padding": true, + "blockGap": { + "__experimentalDefault": "1.25em" + }, + "__experimentalDefaultControls": { + "blockGap": true, + "padding": false, + "margin": false + } + }, + "interactivity": { + "clientNavigation": true + }, + "__experimentalBorder": { + "radius": true, + "color": true, + "width": true, + "style": true + } + }, + "style": "wp-block-term-template", + "editorStyle": "wp-block-term-template-editor" +} diff --git a/src/wp-includes/blocks/terms-query/block.json b/src/wp-includes/blocks/terms-query/block.json new file mode 100644 index 0000000000000..1741de5e5b2fd --- /dev/null +++ b/src/wp-includes/blocks/terms-query/block.json @@ -0,0 +1,40 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/terms-query", + "title": "Terms Query", + "category": "theme", + "description": "An advanced block that allows displaying taxonomy terms based on different query parameters and visual configurations.", + "keywords": [ "terms", "taxonomy", "categories", "tags", "list" ], + "textdomain": "default", + "attributes": { + "termQuery": { + "type": "object", + "default": { + "perPage": 10, + "taxonomy": "category", + "order": "asc", + "orderBy": "name", + "include": [], + "hideEmpty": true, + "showNested": false, + "inherit": false + } + }, + "tagName": { + "type": "string", + "default": "div" + } + }, + "usesContext": [ "templateSlug" ], + "providesContext": { + "termQuery": "termQuery" + }, + "supports": { + "anchor": true, + "align": [ "wide", "full" ], + "html": false, + "layout": true, + "interactivity": true + } +} diff --git a/src/wp-includes/blocks/text-columns/block.json b/src/wp-includes/blocks/text-columns/block.json new file mode 100644 index 0000000000000..2599df111d34b --- /dev/null +++ b/src/wp-includes/blocks/text-columns/block.json @@ -0,0 +1,39 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/text-columns", + "title": "Text Columns (deprecated)", + "icon": "columns", + "category": "design", + "description": "This block is deprecated. Please use the Columns block instead.", + "textdomain": "default", + "attributes": { + "content": { + "type": "array", + "source": "query", + "selector": "p", + "query": { + "children": { + "type": "string", + "source": "html" + } + }, + "default": [ {}, {} ] + }, + "columns": { + "type": "number", + "default": 2 + }, + "width": { + "type": "string" + } + }, + "supports": { + "inserter": false, + "interactivity": { + "clientNavigation": true + } + }, + "editorStyle": "wp-block-text-columns-editor", + "style": "wp-block-text-columns" +} diff --git a/src/wp-includes/blocks/verse/block.json b/src/wp-includes/blocks/verse/block.json new file mode 100644 index 0000000000000..b9915711a7993 --- /dev/null +++ b/src/wp-includes/blocks/verse/block.json @@ -0,0 +1,77 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/verse", + "title": "Poetry", + "category": "text", + "description": "Insert poetry. Use special spacing formats. Or quote song lyrics.", + "keywords": [ "poetry", "poem", "verse", "stanza", "song", "lyrics" ], + "textdomain": "default", + "attributes": { + "content": { + "type": "rich-text", + "source": "rich-text", + "selector": "pre", + "__unstablePreserveWhiteSpace": true, + "role": "content" + } + }, + "supports": { + "anchor": true, + "background": { + "backgroundImage": true, + "backgroundSize": true, + "__experimentalDefaultControls": { + "backgroundImage": true + } + }, + "color": { + "gradients": true, + "link": true, + "__experimentalDefaultControls": { + "background": true, + "text": true + } + }, + "dimensions": { + "minHeight": true, + "__experimentalDefaultControls": { + "minHeight": false + } + }, + "typography": { + "fontSize": true, + "__experimentalFontFamily": true, + "lineHeight": true, + "textAlign": true, + "__experimentalFontStyle": true, + "__experimentalFontWeight": true, + "__experimentalLetterSpacing": true, + "__experimentalTextTransform": true, + "__experimentalTextDecoration": true, + "__experimentalWritingMode": true, + "__experimentalDefaultControls": { + "fontSize": true + } + }, + "spacing": { + "margin": true, + "padding": true, + "__experimentalDefaultControls": { + "margin": false, + "padding": false + } + }, + "__experimentalBorder": { + "radius": true, + "width": true, + "color": true, + "style": true + }, + "interactivity": { + "clientNavigation": true + } + }, + "style": "wp-block-verse", + "editorStyle": "wp-block-verse-editor" +} diff --git a/src/wp-includes/blocks/video.php b/src/wp-includes/blocks/video.php new file mode 100644 index 0000000000000..3696bdca3b2e8 --- /dev/null +++ b/src/wp-includes/blocks/video.php @@ -0,0 +1,91 @@ + 0 && $metadata['height'] > 0 ) + ) { + return $content; + } + + // Locate the VIDEO tag to add the dimensions. + $p = new WP_HTML_Tag_Processor( $content ); + if ( ! $p->next_tag( array( 'tag_name' => 'VIDEO' ) ) ) { + return $content; + } + + $p->set_attribute( 'width', (string) $metadata['width'] ); + $p->set_attribute( 'height', (string) $metadata['height'] ); + + /* + * The aspect-ratio style is needed due to an issue with the CSS spec: . + * Note that a style rule using attr() like the following cannot currently be used: + * + * .wp-block-video video[width][height] { + * aspect-ratio: attr(width type()) / attr(height type()); + * } + * + * This is because this attr() is yet only implemented in Chromium: . + */ + $style = $p->get_attribute( 'style' ); + if ( ! is_string( $style ) ) { + $style = ''; + } + $aspect_ratio_style = sprintf( 'aspect-ratio: %d / %d;', $metadata['width'], $metadata['height'] ); + $p->set_attribute( 'style', $aspect_ratio_style . $style ); + + return $p->get_updated_html(); +} + +/** + * Registers the `core/video` block on server. + * + * @since 6.9.0 + */ +function register_block_core_video(): void { + register_block_type_from_metadata( + __DIR__ . '/video', + array( + 'render_callback' => 'render_block_core_video', + ) + ); +} +add_action( 'init', 'register_block_core_video' ); diff --git a/src/wp-includes/blocks/video/block.json b/src/wp-includes/blocks/video/block.json new file mode 100644 index 0000000000000..d2dcd95365c3b --- /dev/null +++ b/src/wp-includes/blocks/video/block.json @@ -0,0 +1,102 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/video", + "title": "Video", + "category": "media", + "description": "Embed a video from your media library or upload a new one.", + "keywords": [ "movie" ], + "textdomain": "default", + "attributes": { + "autoplay": { + "type": "boolean", + "source": "attribute", + "selector": "video", + "attribute": "autoplay" + }, + "caption": { + "type": "rich-text", + "source": "rich-text", + "selector": "figcaption", + "role": "content" + }, + "controls": { + "type": "boolean", + "source": "attribute", + "selector": "video", + "attribute": "controls", + "default": true + }, + "id": { + "type": "number", + "role": "content" + }, + "loop": { + "type": "boolean", + "source": "attribute", + "selector": "video", + "attribute": "loop" + }, + "muted": { + "type": "boolean", + "source": "attribute", + "selector": "video", + "attribute": "muted" + }, + "poster": { + "type": "string", + "source": "attribute", + "selector": "video", + "attribute": "poster" + }, + "preload": { + "type": "string", + "source": "attribute", + "selector": "video", + "attribute": "preload", + "default": "metadata" + }, + "blob": { + "type": "string", + "role": "local" + }, + "src": { + "type": "string", + "source": "attribute", + "selector": "video", + "attribute": "src", + "role": "content" + }, + "playsInline": { + "type": "boolean", + "source": "attribute", + "selector": "video", + "attribute": "playsinline" + }, + "tracks": { + "role": "content", + "type": "array", + "items": { + "type": "object" + }, + "default": [] + } + }, + "supports": { + "anchor": true, + "align": true, + "spacing": { + "margin": true, + "padding": true, + "__experimentalDefaultControls": { + "margin": false, + "padding": false + } + }, + "interactivity": { + "clientNavigation": true + } + }, + "editorStyle": "wp-block-video-editor", + "style": "wp-block-video" +} diff --git a/src/wp-includes/blocks/widget-group.php b/src/wp-includes/blocks/widget-group.php new file mode 100644 index 0000000000000..e8769612a2f17 --- /dev/null +++ b/src/wp-includes/blocks/widget-group.php @@ -0,0 +1,93 @@ +'; + $after_title = ''; + } + + $html = ''; + + if ( ! empty( $attributes['title'] ) ) { + $html .= $before_title . esc_html( $attributes['title'] ) . $after_title; + } + + $html .= '
      '; + foreach ( $block->inner_blocks as $inner_block ) { + $html .= $inner_block->render(); + } + $html .= '
      '; + + return $html; +} + +/** + * Registers the 'core/widget-group' block. + * + * @since 5.9.0 + */ +function register_block_core_widget_group() { + register_block_type_from_metadata( + __DIR__ . '/widget-group', + array( + 'render_callback' => 'render_block_core_widget_group', + ) + ); +} + +add_action( 'init', 'register_block_core_widget_group' ); + +/** + * Make a note of the sidebar being rendered before WordPress starts rendering + * it. This lets us get to the current sidebar in + * render_block_core_widget_group(). + * + * @since 5.9.0 + * + * @global int|string $_sidebar_being_rendered + * + * @param int|string $index Index, name, or ID of the dynamic sidebar. + */ +function note_sidebar_being_rendered( $index ) { + global $_sidebar_being_rendered; + $_sidebar_being_rendered = $index; +} +add_action( 'dynamic_sidebar_before', 'note_sidebar_being_rendered' ); + +/** + * Clear whatever we set in note_sidebar_being_rendered() after WordPress + * finishes rendering a sidebar. + * + * @since 5.9.0 + * + * @global int|string $_sidebar_being_rendered + */ +function discard_sidebar_being_rendered() { + global $_sidebar_being_rendered; + unset( $_sidebar_being_rendered ); +} +add_action( 'dynamic_sidebar_after', 'discard_sidebar_being_rendered' ); diff --git a/src/wp-includes/blocks/widget-group/block.json b/src/wp-includes/blocks/widget-group/block.json new file mode 100644 index 0000000000000..6e7ba57b38dbc --- /dev/null +++ b/src/wp-includes/blocks/widget-group/block.json @@ -0,0 +1,20 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/widget-group", + "title": "Widget Group", + "category": "widgets", + "attributes": { + "title": { + "type": "string" + } + }, + "supports": { + "html": false, + "inserter": true, + "customClassName": true, + "reusable": false + }, + "editorStyle": "wp-block-widget-group-editor", + "style": "wp-block-widget-group" +} diff --git a/src/wp-includes/build/constants.php b/src/wp-includes/build/constants.php new file mode 100644 index 0000000000000..37c81b5ccc21b --- /dev/null +++ b/src/wp-includes/build/constants.php @@ -0,0 +1,14 @@ + '22.6.0-rc.1', + 'build_url' => includes_url( 'build/' ), +); diff --git a/src/wp-includes/build/pages.php b/src/wp-includes/build/pages.php new file mode 100644 index 0000000000000..14ca6a08fbbc1 --- /dev/null +++ b/src/wp-includes/build/pages.php @@ -0,0 +1,12 @@ + $path ); + if ( ! empty( $content_module ) ) { + $route['content_module'] = $content_module; + } + if ( ! empty( $route_module ) ) { + $route['route_module'] = $route_module; + } + + $wp_font_library_wp_admin_routes[] = $route; +} + +/** + * Register a menu item for the font-library-wp-admin page. + * Note: Menu items are registered but not displayed in single-page mode. + * + * @param string $id Menu item ID. + * @param string $label Display label. + * @param string $to Route path to navigate to. + * @param string $parent_id Optional. Parent menu item ID. + */ +function wp_register_font_library_wp_admin_menu_item( $id, $label, $to, $parent_id = '' ) { + global $wp_font_library_wp_admin_menu_items; + + $menu_item = array( + 'id' => $id, + 'label' => $label, + 'to' => $to, + ); + + if ( ! empty( $parent_id ) ) { + $menu_item['parent'] = $parent_id; + } + + $wp_font_library_wp_admin_menu_items[] = $menu_item; +} + +/** + * Get all registered routes for the font-library-wp-admin page. + * + * @return array Array of route objects. + */ +function wp_get_font_library_wp_admin_routes() { + global $wp_font_library_wp_admin_routes; + return $wp_font_library_wp_admin_routes ?? array(); +} + +/** + * Get all registered menu items for the font-library-wp-admin page. + * + * @return array Array of menu item objects. + */ +function wp_get_font_library_wp_admin_menu_items() { + global $wp_font_library_wp_admin_menu_items; + return $wp_font_library_wp_admin_menu_items ?? array(); +} + +/** + * Preload REST API data for the font-library-wp-admin page. + * Automatically called during page rendering. + */ +function wp_font_library_wp_admin_preload_data() { + // Define paths to preload - same for all pages + // Please also change packages/core-data/src/entities.js when changing this. + $preload_paths = array( + '/?_fields=description,gmt_offset,home,image_sizes,image_size_threshold,image_output_formats,jpeg_interlaced,png_interlaced,gif_interlaced,name,site_icon,site_icon_url,site_logo,timezone_string,url,page_for_posts,page_on_front,show_on_front', + array( '/wp/v2/settings', 'OPTIONS' ), + ); + + // Use rest_preload_api_request to gather the preloaded data + $preload_data = array_reduce( + $preload_paths, + 'rest_preload_api_request', + array() + ); + + // Register the preloading middleware with wp-api-fetch + wp_add_inline_script( + 'wp-api-fetch', + sprintf( + 'wp.apiFetch.use( wp.apiFetch.createPreloadingMiddleware( %s ) );', + wp_json_encode( $preload_data ) + ), + 'after' + ); +} + +/** + * Enqueue scripts and styles for the font-library-wp-admin page. + * Hooked to admin_enqueue_scripts. + * + * @param string $hook_suffix The current admin page. + */ +function wp_font_library_wp_admin_enqueue_scripts( $hook_suffix ) { + // Check all possible ways this page can be accessed: + // 1. Menu page via admin.php?page=font-library-wp-admin (plugin) + // 2. Direct file via font-library.php (Core) - screen ID will be 'font-library' + $current_screen = get_current_screen(); + $is_our_page = ( + ( isset( $_GET['page'] ) && 'font-library-wp-admin' === $_GET['page'] ) || // phpcs:ignore WordPress.Security.NonceVerification.Recommended + ( $current_screen && 'font-library' === $current_screen->id ) + ); + + if ( ! $is_our_page ) { + return; + } + + // Load build constants + $build_constants = require __DIR__ . '/../../constants.php'; + + // Fire init action for extensions to register routes and menu items + do_action( 'font-library-wp-admin_init' ); + + // Preload REST API data + wp_font_library_wp_admin_preload_data(); + + // Get all registered routes + $routes = wp_get_font_library_wp_admin_routes(); + + // Get boot module asset file for dependencies + $asset_file = ABSPATH . WPINC . '/js/dist/script-modules/boot/index.min.asset.php'; + if ( file_exists( $asset_file ) ) { + $asset = require $asset_file; + + // This script serves two purposes: + // 1. It ensures all the globals that are made available to the modules are loaded. + // 2. It initializes the boot module as an inline script. + wp_register_script( 'font-library-wp-admin-prerequisites', '', $asset['dependencies'], $asset['version'], true ); + + // Add inline script to initialize the app using initSinglePage (no menuItems) + wp_add_inline_script( + 'font-library-wp-admin-prerequisites', + sprintf( + 'import("@wordpress/boot").then(mod => mod.initSinglePage({mountId: "%s", routes: %s}));', + 'font-library-wp-admin-app', + wp_json_encode( $routes, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ) + ) + ); + + // Register prerequisites style by filtering script dependencies to find registered styles + $style_dependencies = array_filter( + $asset['dependencies'], + function ( $handle ) { + return wp_style_is( $handle, 'registered' ); + } + ); + wp_register_style( 'font-library-wp-admin-prerequisites', false, $style_dependencies, $asset['version'] ); + + // Build dependencies for font-library-wp-admin module + $boot_dependencies = array( + array( + 'import' => 'static', + 'id' => '@wordpress/boot', + ), + ); + + // Add all registered routes as dependencies + foreach ( $routes as $route ) { + if ( isset( $route['route_module'] ) ) { + $boot_dependencies[] = array( + 'import' => 'static', + 'id' => $route['route_module'], + ); + } + if ( isset( $route['content_module'] ) ) { + $boot_dependencies[] = array( + 'import' => 'dynamic', + 'id' => $route['content_module'], + ); + } + } + + // Dummy script module to ensure dependencies are loaded + wp_register_script_module( + 'font-library-wp-admin', + $build_constants['build_url'] . 'pages/font-library/loader.js', + $boot_dependencies + ); + + // Enqueue the boot scripts and styles + wp_enqueue_script( 'font-library-wp-admin-prerequisites' ); + wp_enqueue_script_module( 'font-library-wp-admin' ); + wp_enqueue_style( 'font-library-wp-admin-prerequisites' ); + } +} + +/** + * Render the font-library-wp-admin page. + * Call this function from add_menu_page or add_submenu_page. + * This renders within the normal WordPress admin interface. + */ +function wp_font_library_wp_admin_render_page() { + ?> + +
      + $path ); + if ( ! empty( $content_module ) ) { + $route['content_module'] = $content_module; + } + if ( ! empty( $route_module ) ) { + $route['route_module'] = $route_module; + } + + $wp_font_library_routes[] = $route; +} + +/** + * Register a menu item for the font-library page. + * + * @param string $id Menu item ID. + * @param string $label Display label. + * @param string $to Route path to navigate to. + * @param string $parent_id Optional. Parent menu item ID. + * @param string $parent_type Optional. Parent type: 'drilldown' or 'dropdown'. + */ +function wp_register_font_library_menu_item( $id, $label, $to, $parent_id = '', $parent_type = '' ) { + global $wp_font_library_menu_items; + + $menu_item = array( + 'id' => $id, + 'label' => $label, + 'to' => $to, + ); + + if ( ! empty( $parent_id ) ) { + $menu_item['parent'] = $parent_id; + } + + if ( ! empty( $parent_type ) && in_array( $parent_type, array( 'drilldown', 'dropdown' ), true ) ) { + $menu_item['parent_type'] = $parent_type; + } + + $wp_font_library_menu_items[] = $menu_item; +} + +/** + * Get all registered routes for the font-library page. + * + * @return array Array of route objects. + */ +function wp_get_font_library_routes() { + global $wp_font_library_routes; + return $wp_font_library_routes ?? array(); +} + +/** + * Get all registered menu items for the font-library page. + * + * @return array Array of menu item objects. + */ +function wp_get_font_library_menu_items() { + global $wp_font_library_menu_items; + return $wp_font_library_menu_items ?? array(); +} + +/** + * Preload REST API data for the font-library page. + * Automatically called during page rendering. + */ +function wp_font_library_preload_data() { + // Define paths to preload - same for all pages + // Please also change packages/core-data/src/entities.js when changing this. + $preload_paths = array( + '/?_fields=description,gmt_offset,home,image_sizes,image_size_threshold,image_output_formats,jpeg_interlaced,png_interlaced,gif_interlaced,name,site_icon,site_icon_url,site_logo,timezone_string,url,page_for_posts,page_on_front,show_on_front', + array( '/wp/v2/settings', 'OPTIONS' ), + ); + + // Use rest_preload_api_request to gather the preloaded data + $preload_data = array_reduce( + $preload_paths, + 'rest_preload_api_request', + array() + ); + + // Register the preloading middleware with wp-api-fetch + wp_add_inline_script( + 'wp-api-fetch', + sprintf( + 'wp.apiFetch.use( wp.apiFetch.createPreloadingMiddleware( %s ) );', + wp_json_encode( $preload_data ) + ), + 'after' + ); +} + +/** + * Render the font-library page. + * Call this function from add_menu_page or add_submenu_page. + */ +function wp_font_library_render_page() { + // Load build constants + $build_constants = require __DIR__ . '/../../constants.php'; + + // Set current screen + set_current_screen(); + + // Remove unwanted deprecated handler + remove_action( 'admin_head', 'wp_admin_bar_header' ); + + // Remove unwanted scripts and styles that were enqueued during `admin_init` + foreach ( wp_scripts()->queue as $script ) { + wp_dequeue_script( $script ); + } + foreach ( wp_styles()->queue as $style ) { + wp_dequeue_style( $style ); + } + + // Fire init action for extensions to register routes and menu items + do_action( 'font-library_init' ); + + // Enqueue command palette assets for boot-based pages + if ( function_exists( 'wp_enqueue_command_palette_assets' ) ) { + wp_enqueue_command_palette_assets(); + } + + // Preload REST API data + wp_font_library_preload_data(); + + // Get all registered routes and menu items + $menu_items = wp_get_font_library_menu_items(); + $routes = wp_get_font_library_routes(); + + // Get boot module asset file for dependencies + $asset_file = ABSPATH . WPINC . '/js/dist/script-modules/boot/index.min.asset.php'; + if ( file_exists( $asset_file ) ) { + $asset = require $asset_file; + + // This script serves two purposes: + // 1. It ensures all the globals that are made available to the modules are loaded. + // 2. It initializes the boot module as an inline script. + wp_register_script( 'font-library-prerequisites', '', $asset['dependencies'], $asset['version'], true ); + + // Add inline script to initialize the app + $init_modules = []; + wp_add_inline_script( + 'font-library-prerequisites', + sprintf( + 'import("@wordpress/boot").then(mod => mod.init({mountId: "%s", menuItems: %s, routes: %s, initModules: %s, dashboardLink: "%s"}));', + 'font-library-app', + wp_json_encode( $menu_items, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ), + wp_json_encode( $routes, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ), + wp_json_encode( $init_modules, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ), + esc_url( admin_url( '/' ) ) + ) + ); + + // Register prerequisites style by filtering script dependencies to find registered styles + $style_dependencies = array_filter( + $asset['dependencies'], + function ( $handle ) { + return wp_style_is( $handle, 'registered' ); + } + ); + wp_register_style( 'font-library-prerequisites', false, $style_dependencies, $asset['version'] ); + + // Build dependencies for font-library module + $boot_dependencies = array( + array( + 'import' => 'static', + 'id' => '@wordpress/boot', + ), + ); + + // Add init modules as static dependencies + // No init modules configured + + // Add all registered routes as dependencies + foreach ( $routes as $route ) { + if ( isset( $route['route_module'] ) ) { + $boot_dependencies[] = array( + 'import' => 'static', + 'id' => $route['route_module'], + ); + } + if ( isset( $route['content_module'] ) ) { + $boot_dependencies[] = array( + 'import' => 'dynamic', + 'id' => $route['content_module'], + ); + } + } + + // Dummy script module to ensure dependencies are loaded + wp_register_script_module( + 'font-library', + $build_constants['build_url'] . 'pages/font-library/loader.js', + $boot_dependencies + ); + + // Enqueue the boot scripts and styles + wp_enqueue_script( 'font-library-prerequisites' ); + wp_enqueue_script_module( 'font-library' ); + wp_enqueue_style( 'font-library-prerequisites' ); + } + + // Output the HTML + ?> + + > + + + + <?php echo esc_html( get_admin_page_title() ); ?> + + + + +
      + print_import_map(); + print_footer_scripts(); + wp_script_modules()->print_enqueued_script_modules(); + wp_script_modules()->print_script_module_preloads(); + wp_script_modules()->print_script_module_data(); + + /** + * Prints scripts or data after the default footer scripts. + * + * @since 2.8.0 + */ + do_action( "admin_footer-{$hook_suffix}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores + // END see wp-admin/admin-footer.php + ?> + + + $path ); + if ( ! empty( $content_module ) ) { + $route['content_module'] = $content_module; + } + if ( ! empty( $route_module ) ) { + $route['route_module'] = $route_module; + } + + $wp_options_connectors_wp_admin_routes[] = $route; +} + +/** + * Register a menu item for the options-connectors-wp-admin page. + * Note: Menu items are registered but not displayed in single-page mode. + * + * @param string $id Menu item ID. + * @param string $label Display label. + * @param string $to Route path to navigate to. + * @param string $parent_id Optional. Parent menu item ID. + */ +function wp_register_options_connectors_wp_admin_menu_item( $id, $label, $to, $parent_id = '' ) { + global $wp_options_connectors_wp_admin_menu_items; + + $menu_item = array( + 'id' => $id, + 'label' => $label, + 'to' => $to, + ); + + if ( ! empty( $parent_id ) ) { + $menu_item['parent'] = $parent_id; + } + + $wp_options_connectors_wp_admin_menu_items[] = $menu_item; +} + +/** + * Get all registered routes for the options-connectors-wp-admin page. + * + * @return array Array of route objects. + */ +function wp_get_options_connectors_wp_admin_routes() { + global $wp_options_connectors_wp_admin_routes; + return $wp_options_connectors_wp_admin_routes ?? array(); +} + +/** + * Get all registered menu items for the options-connectors-wp-admin page. + * + * @return array Array of menu item objects. + */ +function wp_get_options_connectors_wp_admin_menu_items() { + global $wp_options_connectors_wp_admin_menu_items; + return $wp_options_connectors_wp_admin_menu_items ?? array(); +} + +/** + * Preload REST API data for the options-connectors-wp-admin page. + * Automatically called during page rendering. + */ +function wp_options_connectors_wp_admin_preload_data() { + // Define paths to preload - same for all pages + // Please also change packages/core-data/src/entities.js when changing this. + $preload_paths = array( + '/?_fields=description,gmt_offset,home,image_sizes,image_size_threshold,image_output_formats,jpeg_interlaced,png_interlaced,gif_interlaced,name,site_icon,site_icon_url,site_logo,timezone_string,url,page_for_posts,page_on_front,show_on_front', + array( '/wp/v2/settings', 'OPTIONS' ), + ); + + // Use rest_preload_api_request to gather the preloaded data + $preload_data = array_reduce( + $preload_paths, + 'rest_preload_api_request', + array() + ); + + // Register the preloading middleware with wp-api-fetch + wp_add_inline_script( + 'wp-api-fetch', + sprintf( + 'wp.apiFetch.use( wp.apiFetch.createPreloadingMiddleware( %s ) );', + wp_json_encode( $preload_data ) + ), + 'after' + ); +} + +/** + * Enqueue scripts and styles for the options-connectors-wp-admin page. + * Hooked to admin_enqueue_scripts. + * + * @param string $hook_suffix The current admin page. + */ +function wp_options_connectors_wp_admin_enqueue_scripts( $hook_suffix ) { + // Check all possible ways this page can be accessed: + // 1. Menu page via admin.php?page=options-connectors-wp-admin (plugin) + // 2. Direct file via options-connectors.php (Core) - screen ID will be 'options-connectors' + $current_screen = get_current_screen(); + $is_our_page = ( + ( isset( $_GET['page'] ) && 'options-connectors-wp-admin' === $_GET['page'] ) || // phpcs:ignore WordPress.Security.NonceVerification.Recommended + ( $current_screen && 'options-connectors' === $current_screen->id ) + ); + + if ( ! $is_our_page ) { + return; + } + + // Load build constants + $build_constants = require __DIR__ . '/../../constants.php'; + + // Fire init action for extensions to register routes and menu items + do_action( 'options-connectors-wp-admin_init' ); + + // Preload REST API data + wp_options_connectors_wp_admin_preload_data(); + + // Get all registered routes + $routes = wp_get_options_connectors_wp_admin_routes(); + + // Get boot module asset file for dependencies + $asset_file = ABSPATH . WPINC . '/js/dist/script-modules/boot/index.min.asset.php'; + if ( file_exists( $asset_file ) ) { + $asset = require $asset_file; + + // This script serves two purposes: + // 1. It ensures all the globals that are made available to the modules are loaded. + // 2. It initializes the boot module as an inline script. + wp_register_script( 'options-connectors-wp-admin-prerequisites', '', $asset['dependencies'], $asset['version'], true ); + + // Add inline script to initialize the app using initSinglePage (no menuItems) + wp_add_inline_script( + 'options-connectors-wp-admin-prerequisites', + sprintf( + 'import("@wordpress/boot").then(mod => mod.initSinglePage({mountId: "%s", routes: %s}));', + 'options-connectors-wp-admin-app', + wp_json_encode( $routes, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ) + ) + ); + + // Register prerequisites style by filtering script dependencies to find registered styles + $style_dependencies = array_filter( + $asset['dependencies'], + function ( $handle ) { + return wp_style_is( $handle, 'registered' ); + } + ); + wp_register_style( 'options-connectors-wp-admin-prerequisites', false, $style_dependencies, $asset['version'] ); + + // Build dependencies for options-connectors-wp-admin module + $boot_dependencies = array( + array( + 'import' => 'static', + 'id' => '@wordpress/boot', + ), + ); + + // Add all registered routes as dependencies + foreach ( $routes as $route ) { + if ( isset( $route['route_module'] ) ) { + $boot_dependencies[] = array( + 'import' => 'static', + 'id' => $route['route_module'], + ); + } + if ( isset( $route['content_module'] ) ) { + $boot_dependencies[] = array( + 'import' => 'dynamic', + 'id' => $route['content_module'], + ); + } + } + + // Dummy script module to ensure dependencies are loaded + wp_register_script_module( + 'options-connectors-wp-admin', + $build_constants['build_url'] . 'pages/options-connectors/loader.js', + $boot_dependencies + ); + + // Enqueue the boot scripts and styles + wp_enqueue_script( 'options-connectors-wp-admin-prerequisites' ); + wp_enqueue_script_module( 'options-connectors-wp-admin' ); + wp_enqueue_style( 'options-connectors-wp-admin-prerequisites' ); + } +} + +/** + * Render the options-connectors-wp-admin page. + * Call this function from add_menu_page or add_submenu_page. + * This renders within the normal WordPress admin interface. + */ +function wp_options_connectors_wp_admin_render_page() { + ?> + +
      + $path ); + if ( ! empty( $content_module ) ) { + $route['content_module'] = $content_module; + } + if ( ! empty( $route_module ) ) { + $route['route_module'] = $route_module; + } + + $wp_options_connectors_routes[] = $route; +} + +/** + * Register a menu item for the options-connectors page. + * + * @param string $id Menu item ID. + * @param string $label Display label. + * @param string $to Route path to navigate to. + * @param string $parent_id Optional. Parent menu item ID. + * @param string $parent_type Optional. Parent type: 'drilldown' or 'dropdown'. + */ +function wp_register_options_connectors_menu_item( $id, $label, $to, $parent_id = '', $parent_type = '' ) { + global $wp_options_connectors_menu_items; + + $menu_item = array( + 'id' => $id, + 'label' => $label, + 'to' => $to, + ); + + if ( ! empty( $parent_id ) ) { + $menu_item['parent'] = $parent_id; + } + + if ( ! empty( $parent_type ) && in_array( $parent_type, array( 'drilldown', 'dropdown' ), true ) ) { + $menu_item['parent_type'] = $parent_type; + } + + $wp_options_connectors_menu_items[] = $menu_item; +} + +/** + * Get all registered routes for the options-connectors page. + * + * @return array Array of route objects. + */ +function wp_get_options_connectors_routes() { + global $wp_options_connectors_routes; + return $wp_options_connectors_routes ?? array(); +} + +/** + * Get all registered menu items for the options-connectors page. + * + * @return array Array of menu item objects. + */ +function wp_get_options_connectors_menu_items() { + global $wp_options_connectors_menu_items; + return $wp_options_connectors_menu_items ?? array(); +} + +/** + * Preload REST API data for the options-connectors page. + * Automatically called during page rendering. + */ +function wp_options_connectors_preload_data() { + // Define paths to preload - same for all pages + // Please also change packages/core-data/src/entities.js when changing this. + $preload_paths = array( + '/?_fields=description,gmt_offset,home,image_sizes,image_size_threshold,image_output_formats,jpeg_interlaced,png_interlaced,gif_interlaced,name,site_icon,site_icon_url,site_logo,timezone_string,url,page_for_posts,page_on_front,show_on_front', + array( '/wp/v2/settings', 'OPTIONS' ), + ); + + // Use rest_preload_api_request to gather the preloaded data + $preload_data = array_reduce( + $preload_paths, + 'rest_preload_api_request', + array() + ); + + // Register the preloading middleware with wp-api-fetch + wp_add_inline_script( + 'wp-api-fetch', + sprintf( + 'wp.apiFetch.use( wp.apiFetch.createPreloadingMiddleware( %s ) );', + wp_json_encode( $preload_data ) + ), + 'after' + ); +} + +/** + * Render the options-connectors page. + * Call this function from add_menu_page or add_submenu_page. + */ +function wp_options_connectors_render_page() { + // Load build constants + $build_constants = require __DIR__ . '/../../constants.php'; + + // Set current screen + set_current_screen(); + + // Remove unwanted deprecated handler + remove_action( 'admin_head', 'wp_admin_bar_header' ); + + // Remove unwanted scripts and styles that were enqueued during `admin_init` + foreach ( wp_scripts()->queue as $script ) { + wp_dequeue_script( $script ); + } + foreach ( wp_styles()->queue as $style ) { + wp_dequeue_style( $style ); + } + + // Fire init action for extensions to register routes and menu items + do_action( 'options-connectors_init' ); + + // Enqueue command palette assets for boot-based pages + if ( function_exists( 'wp_enqueue_command_palette_assets' ) ) { + wp_enqueue_command_palette_assets(); + } + + // Preload REST API data + wp_options_connectors_preload_data(); + + // Get all registered routes and menu items + $menu_items = wp_get_options_connectors_menu_items(); + $routes = wp_get_options_connectors_routes(); + + // Get boot module asset file for dependencies + $asset_file = ABSPATH . WPINC . '/js/dist/script-modules/boot/index.min.asset.php'; + if ( file_exists( $asset_file ) ) { + $asset = require $asset_file; + + // This script serves two purposes: + // 1. It ensures all the globals that are made available to the modules are loaded. + // 2. It initializes the boot module as an inline script. + wp_register_script( 'options-connectors-prerequisites', '', $asset['dependencies'], $asset['version'], true ); + + // Add inline script to initialize the app + $init_modules = []; + wp_add_inline_script( + 'options-connectors-prerequisites', + sprintf( + 'import("@wordpress/boot").then(mod => mod.init({mountId: "%s", menuItems: %s, routes: %s, initModules: %s, dashboardLink: "%s"}));', + 'options-connectors-app', + wp_json_encode( $menu_items, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ), + wp_json_encode( $routes, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ), + wp_json_encode( $init_modules, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ), + esc_url( admin_url( '/' ) ) + ) + ); + + // Register prerequisites style by filtering script dependencies to find registered styles + $style_dependencies = array_filter( + $asset['dependencies'], + function ( $handle ) { + return wp_style_is( $handle, 'registered' ); + } + ); + wp_register_style( 'options-connectors-prerequisites', false, $style_dependencies, $asset['version'] ); + + // Build dependencies for options-connectors module + $boot_dependencies = array( + array( + 'import' => 'static', + 'id' => '@wordpress/boot', + ), + ); + + // Add init modules as static dependencies + // No init modules configured + + // Add all registered routes as dependencies + foreach ( $routes as $route ) { + if ( isset( $route['route_module'] ) ) { + $boot_dependencies[] = array( + 'import' => 'static', + 'id' => $route['route_module'], + ); + } + if ( isset( $route['content_module'] ) ) { + $boot_dependencies[] = array( + 'import' => 'dynamic', + 'id' => $route['content_module'], + ); + } + } + + // Dummy script module to ensure dependencies are loaded + wp_register_script_module( + 'options-connectors', + $build_constants['build_url'] . 'pages/options-connectors/loader.js', + $boot_dependencies + ); + + // Enqueue the boot scripts and styles + wp_enqueue_script( 'options-connectors-prerequisites' ); + wp_enqueue_script_module( 'options-connectors' ); + wp_enqueue_style( 'options-connectors-prerequisites' ); + } + + // Output the HTML + ?> + + > + + + + <?php echo esc_html( get_admin_page_title() ); ?> + + + + +
      + print_import_map(); + print_footer_scripts(); + wp_script_modules()->print_enqueued_script_modules(); + wp_script_modules()->print_script_module_preloads(); + wp_script_modules()->print_script_module_data(); + + /** + * Prints scripts or data after the default footer scripts. + * + * @since 2.8.0 + */ + do_action( "admin_footer-{$hook_suffix}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores + // END see wp-admin/admin-footer.php + ?> + + + $page_routes ) { + $page_slug_underscore = str_replace( '-', '_', $page_slug ); + $global_name = 'wp_' . $page_slug_underscore . '_routes_data'; + $GLOBALS[ $global_name ] = $page_routes; +} + +/** + * Generic helper function to register routes for a page. + * + * @param array $page_routes Array of route data for the page. + * @param string $register_function_name Name of the function to call for registering each route. + */ +function wp_register_page_routes( $page_routes, $register_function_name ) { + // Load build constants + $build_constants = require __DIR__ . '/constants.php'; + + foreach ( $page_routes as $route ) { + $content_handle = null; + $route_handle = null; + + // Register content module if exists + if ( $route['has_content'] ) { + $content_asset_path = __DIR__ . "/routes/{$route['name']}/content.min.asset.php"; + if ( file_exists( $content_asset_path ) ) { + $content_asset = require $content_asset_path; + $content_handle = 'wp/routes/' . $route['name'] . '/content'; + $extension = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '.js' : '.min.js'; + // Deregister first to override any previously registered version + // (e.g., Core's default modules when running as a plugin). + wp_deregister_script_module( $content_handle ); + wp_register_script_module( + $content_handle, + $build_constants['build_url'] . 'routes/' . $route['name'] . '/content' . $extension, + $content_asset['module_dependencies'] ?? array(), + $content_asset['version'] ?? false + ); + } + } + + // Register route module if exists + if ( $route['has_route'] ) { + $route_asset_path = __DIR__ . "/routes/{$route['name']}/route.min.asset.php"; + if ( file_exists( $route_asset_path ) ) { + $route_asset = require $route_asset_path; + $route_handle = 'wp/routes/' . $route['name'] . '/route'; + $extension = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '.js' : '.min.js'; + // Deregister first to override any previously registered version + // (e.g., Core's default modules when running as a plugin). + wp_deregister_script_module( $route_handle ); + wp_register_script_module( + $route_handle, + $build_constants['build_url'] . 'routes/' . $route['name'] . '/route' . $extension, + $route_asset['module_dependencies'] ?? array(), + $route_asset['version'] ?? false + ); + } + } + + // Register route with page + if ( function_exists( $register_function_name ) ) { + call_user_func( $register_function_name, $route['path'], $content_handle, $route_handle ); + } + } +} + +// Page-specific route registration functions +// Page-specific route registration functions for options-connectors +/** + * Register routes for options-connectors page (full-page mode). + */ +function wp_register_options_connectors_page_routes() { + global $wp_options_connectors_routes_data; + wp_register_page_routes( $wp_options_connectors_routes_data, 'wp_register_options_connectors_route' ); +} +add_action( 'options-connectors_init', 'wp_register_options_connectors_page_routes' ); + +/** + * Register routes for options-connectors page (wp-admin mode). + */ +function wp_register_options_connectors_wp_admin_page_routes() { + global $wp_options_connectors_routes_data; + wp_register_page_routes( $wp_options_connectors_routes_data, 'wp_register_options_connectors_wp_admin_route' ); +} +add_action( 'options-connectors-wp-admin_init', 'wp_register_options_connectors_wp_admin_page_routes' ); + +// Page-specific route registration functions for font-library +/** + * Register routes for font-library page (full-page mode). + */ +function wp_register_font_library_page_routes() { + global $wp_font_library_routes_data; + wp_register_page_routes( $wp_font_library_routes_data, 'wp_register_font_library_route' ); +} +add_action( 'font-library_init', 'wp_register_font_library_page_routes' ); + +/** + * Register routes for font-library page (wp-admin mode). + */ +function wp_register_font_library_wp_admin_page_routes() { + global $wp_font_library_routes_data; + wp_register_page_routes( $wp_font_library_routes_data, 'wp_register_font_library_wp_admin_route' ); +} +add_action( 'font-library-wp-admin_init', 'wp_register_font_library_wp_admin_page_routes' ); + diff --git a/src/wp-includes/build/routes/connectors-home/content.js b/src/wp-includes/build/routes/connectors-home/content.js new file mode 100644 index 0000000000000..3cc0bf843ca02 --- /dev/null +++ b/src/wp-includes/build/routes/connectors-home/content.js @@ -0,0 +1,1591 @@ +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __commonJS = (cb, mod) => function __require() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); + +// package-external:@wordpress/i18n +var require_i18n = __commonJS({ + "package-external:@wordpress/i18n"(exports, module) { + module.exports = window.wp.i18n; + } +}); + +// package-external:@wordpress/components +var require_components = __commonJS({ + "package-external:@wordpress/components"(exports, module) { + module.exports = window.wp.components; + } +}); + +// vendor-external:react/jsx-runtime +var require_jsx_runtime = __commonJS({ + "vendor-external:react/jsx-runtime"(exports, module) { + module.exports = window.ReactJSXRuntime; + } +}); + +// package-external:@wordpress/element +var require_element = __commonJS({ + "package-external:@wordpress/element"(exports, module) { + module.exports = window.wp.element; + } +}); + +// vendor-external:react +var require_react = __commonJS({ + "vendor-external:react"(exports, module) { + module.exports = window.React; + } +}); + +// package-external:@wordpress/private-apis +var require_private_apis = __commonJS({ + "package-external:@wordpress/private-apis"(exports, module) { + module.exports = window.wp.privateApis; + } +}); + +// package-external:@wordpress/data +var require_data = __commonJS({ + "package-external:@wordpress/data"(exports, module) { + module.exports = window.wp.data; + } +}); + +// package-external:@wordpress/core-data +var require_core_data = __commonJS({ + "package-external:@wordpress/core-data"(exports, module) { + module.exports = window.wp.coreData; + } +}); + +// node_modules/clsx/dist/clsx.mjs +function r(e) { + var t, f, n = ""; + if ("string" == typeof e || "number" == typeof e) n += e; + else if ("object" == typeof e) if (Array.isArray(e)) { + var o = e.length; + for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f); + } else for (f in e) e[f] && (n && (n += " "), n += f); + return n; +} +function clsx() { + for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t); + return n; +} +var clsx_default = clsx; + +// packages/admin-ui/build-module/navigable-region/index.mjs +var import_element = __toESM(require_element(), 1); +var import_jsx_runtime = __toESM(require_jsx_runtime(), 1); +var NavigableRegion = (0, import_element.forwardRef)( + ({ children, className, ariaLabel, as: Tag = "div", ...props }, ref) => { + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + Tag, + { + ref, + className: clsx_default("admin-ui-navigable-region", className), + "aria-label": ariaLabel, + role: "region", + tabIndex: "-1", + ...props, + children + } + ); + } +); +NavigableRegion.displayName = "NavigableRegion"; +var navigable_region_default = NavigableRegion; + +// node_modules/@base-ui/utils/esm/useRefWithInit.js +var React2 = __toESM(require_react(), 1); +var UNINITIALIZED = {}; +function useRefWithInit(init, initArg) { + const ref = React2.useRef(UNINITIALIZED); + if (ref.current === UNINITIALIZED) { + ref.current = init(initArg); + } + return ref; +} + +// node_modules/@base-ui/react/esm/utils/useRenderElement.js +var React5 = __toESM(require_react(), 1); + +// node_modules/@base-ui/utils/esm/useMergedRefs.js +function useMergedRefs(a, b, c, d) { + const forkRef = useRefWithInit(createForkRef).current; + if (didChange(forkRef, a, b, c, d)) { + update(forkRef, [a, b, c, d]); + } + return forkRef.callback; +} +function useMergedRefsN(refs) { + const forkRef = useRefWithInit(createForkRef).current; + if (didChangeN(forkRef, refs)) { + update(forkRef, refs); + } + return forkRef.callback; +} +function createForkRef() { + return { + callback: null, + cleanup: null, + refs: [] + }; +} +function didChange(forkRef, a, b, c, d) { + return forkRef.refs[0] !== a || forkRef.refs[1] !== b || forkRef.refs[2] !== c || forkRef.refs[3] !== d; +} +function didChangeN(forkRef, newRefs) { + return forkRef.refs.length !== newRefs.length || forkRef.refs.some((ref, index) => ref !== newRefs[index]); +} +function update(forkRef, refs) { + forkRef.refs = refs; + if (refs.every((ref) => ref == null)) { + forkRef.callback = null; + return; + } + forkRef.callback = (instance) => { + if (forkRef.cleanup) { + forkRef.cleanup(); + forkRef.cleanup = null; + } + if (instance != null) { + const cleanupCallbacks = Array(refs.length).fill(null); + for (let i = 0; i < refs.length; i += 1) { + const ref = refs[i]; + if (ref == null) { + continue; + } + switch (typeof ref) { + case "function": { + const refCleanup = ref(instance); + if (typeof refCleanup === "function") { + cleanupCallbacks[i] = refCleanup; + } + break; + } + case "object": { + ref.current = instance; + break; + } + default: + } + } + forkRef.cleanup = () => { + for (let i = 0; i < refs.length; i += 1) { + const ref = refs[i]; + if (ref == null) { + continue; + } + switch (typeof ref) { + case "function": { + const cleanupCallback = cleanupCallbacks[i]; + if (typeof cleanupCallback === "function") { + cleanupCallback(); + } else { + ref(null); + } + break; + } + case "object": { + ref.current = null; + break; + } + default: + } + } + }; + } + }; +} + +// node_modules/@base-ui/utils/esm/getReactElementRef.js +var React4 = __toESM(require_react(), 1); + +// node_modules/@base-ui/utils/esm/reactVersion.js +var React3 = __toESM(require_react(), 1); +var majorVersion = parseInt(React3.version, 10); +function isReactVersionAtLeast(reactVersionToCheck) { + return majorVersion >= reactVersionToCheck; +} + +// node_modules/@base-ui/utils/esm/getReactElementRef.js +function getReactElementRef(element) { + if (!/* @__PURE__ */ React4.isValidElement(element)) { + return null; + } + const reactElement = element; + const propsWithRef = reactElement.props; + return (isReactVersionAtLeast(19) ? propsWithRef?.ref : reactElement.ref) ?? null; +} + +// node_modules/@base-ui/utils/esm/mergeObjects.js +function mergeObjects(a, b) { + if (a && !b) { + return a; + } + if (!a && b) { + return b; + } + if (a || b) { + return { + ...a, + ...b + }; + } + return void 0; +} + +// node_modules/@base-ui/react/esm/utils/getStateAttributesProps.js +function getStateAttributesProps(state, customMapping) { + const props = {}; + for (const key in state) { + const value = state[key]; + if (customMapping?.hasOwnProperty(key)) { + const customProps = customMapping[key](value); + if (customProps != null) { + Object.assign(props, customProps); + } + continue; + } + if (value === true) { + props[`data-${key.toLowerCase()}`] = ""; + } else if (value) { + props[`data-${key.toLowerCase()}`] = value.toString(); + } + } + return props; +} + +// node_modules/@base-ui/react/esm/utils/resolveClassName.js +function resolveClassName(className, state) { + return typeof className === "function" ? className(state) : className; +} + +// node_modules/@base-ui/react/esm/utils/resolveStyle.js +function resolveStyle(style, state) { + return typeof style === "function" ? style(state) : style; +} + +// node_modules/@base-ui/react/esm/merge-props/mergeProps.js +var EMPTY_PROPS = {}; +function mergeProps(a, b, c, d, e) { + let merged = { + ...resolvePropsGetter(a, EMPTY_PROPS) + }; + if (b) { + merged = mergeOne(merged, b); + } + if (c) { + merged = mergeOne(merged, c); + } + if (d) { + merged = mergeOne(merged, d); + } + if (e) { + merged = mergeOne(merged, e); + } + return merged; +} +function mergePropsN(props) { + if (props.length === 0) { + return EMPTY_PROPS; + } + if (props.length === 1) { + return resolvePropsGetter(props[0], EMPTY_PROPS); + } + let merged = { + ...resolvePropsGetter(props[0], EMPTY_PROPS) + }; + for (let i = 1; i < props.length; i += 1) { + merged = mergeOne(merged, props[i]); + } + return merged; +} +function mergeOne(merged, inputProps) { + if (isPropsGetter(inputProps)) { + return inputProps(merged); + } + return mutablyMergeInto(merged, inputProps); +} +function mutablyMergeInto(mergedProps, externalProps) { + if (!externalProps) { + return mergedProps; + } + for (const propName in externalProps) { + const externalPropValue = externalProps[propName]; + switch (propName) { + case "style": { + mergedProps[propName] = mergeObjects(mergedProps.style, externalPropValue); + break; + } + case "className": { + mergedProps[propName] = mergeClassNames(mergedProps.className, externalPropValue); + break; + } + default: { + if (isEventHandler(propName, externalPropValue)) { + mergedProps[propName] = mergeEventHandlers(mergedProps[propName], externalPropValue); + } else { + mergedProps[propName] = externalPropValue; + } + } + } + } + return mergedProps; +} +function isEventHandler(key, value) { + const code0 = key.charCodeAt(0); + const code1 = key.charCodeAt(1); + const code2 = key.charCodeAt(2); + return code0 === 111 && code1 === 110 && code2 >= 65 && code2 <= 90 && (typeof value === "function" || typeof value === "undefined"); +} +function isPropsGetter(inputProps) { + return typeof inputProps === "function"; +} +function resolvePropsGetter(inputProps, previousProps) { + if (isPropsGetter(inputProps)) { + return inputProps(previousProps); + } + return inputProps ?? EMPTY_PROPS; +} +function mergeEventHandlers(ourHandler, theirHandler) { + if (!theirHandler) { + return ourHandler; + } + if (!ourHandler) { + return theirHandler; + } + return (event) => { + if (isSyntheticEvent(event)) { + const baseUIEvent = event; + makeEventPreventable(baseUIEvent); + const result2 = theirHandler(baseUIEvent); + if (!baseUIEvent.baseUIHandlerPrevented) { + ourHandler?.(baseUIEvent); + } + return result2; + } + const result = theirHandler(event); + ourHandler?.(event); + return result; + }; +} +function makeEventPreventable(event) { + event.preventBaseUIHandler = () => { + event.baseUIHandlerPrevented = true; + }; + return event; +} +function mergeClassNames(ourClassName, theirClassName) { + if (theirClassName) { + if (ourClassName) { + return theirClassName + " " + ourClassName; + } + return theirClassName; + } + return ourClassName; +} +function isSyntheticEvent(event) { + return event != null && typeof event === "object" && "nativeEvent" in event; +} + +// node_modules/@base-ui/utils/esm/empty.js +var EMPTY_ARRAY = Object.freeze([]); +var EMPTY_OBJECT = Object.freeze({}); + +// node_modules/@base-ui/react/esm/utils/useRenderElement.js +var import_react = __toESM(require_react(), 1); +function useRenderElement(element, componentProps, params = {}) { + const renderProp = componentProps.render; + const outProps = useRenderElementProps(componentProps, params); + if (params.enabled === false) { + return null; + } + const state = params.state ?? EMPTY_OBJECT; + return evaluateRenderProp(element, renderProp, outProps, state); +} +function useRenderElementProps(componentProps, params = {}) { + const { + className: classNameProp, + style: styleProp, + render: renderProp + } = componentProps; + const { + state = EMPTY_OBJECT, + ref, + props, + stateAttributesMapping, + enabled = true + } = params; + const className = enabled ? resolveClassName(classNameProp, state) : void 0; + const style = enabled ? resolveStyle(styleProp, state) : void 0; + const stateProps = enabled ? getStateAttributesProps(state, stateAttributesMapping) : EMPTY_OBJECT; + const outProps = enabled ? mergeObjects(stateProps, Array.isArray(props) ? mergePropsN(props) : props) ?? EMPTY_OBJECT : EMPTY_OBJECT; + if (typeof document !== "undefined") { + if (!enabled) { + useMergedRefs(null, null); + } else if (Array.isArray(ref)) { + outProps.ref = useMergedRefsN([outProps.ref, getReactElementRef(renderProp), ...ref]); + } else { + outProps.ref = useMergedRefs(outProps.ref, getReactElementRef(renderProp), ref); + } + } + if (!enabled) { + return EMPTY_OBJECT; + } + if (className !== void 0) { + outProps.className = mergeClassNames(outProps.className, className); + } + if (style !== void 0) { + outProps.style = mergeObjects(outProps.style, style); + } + return outProps; +} +function evaluateRenderProp(element, render, props, state) { + if (render) { + if (typeof render === "function") { + return render(props, state); + } + const mergedProps = mergeProps(props, render.props); + mergedProps.ref = props.ref; + return /* @__PURE__ */ React5.cloneElement(render, mergedProps); + } + if (element) { + if (typeof element === "string") { + return renderTag(element, props); + } + } + throw new Error(true ? "Base UI: Render element or function are not defined." : formatErrorMessage(8)); +} +function renderTag(Tag, props) { + if (Tag === "button") { + return /* @__PURE__ */ (0, import_react.createElement)("button", { + type: "button", + ...props, + key: props.key + }); + } + if (Tag === "img") { + return /* @__PURE__ */ (0, import_react.createElement)("img", { + alt: "", + ...props, + key: props.key + }); + } + return /* @__PURE__ */ React5.createElement(Tag, props); +} + +// node_modules/@base-ui/react/esm/use-render/useRender.js +function useRender(params) { + return useRenderElement(params.defaultTagName ?? "div", params, params); +} + +// packages/ui/build-module/badge/badge.mjs +var import_element2 = __toESM(require_element(), 1); +if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='244b5c59c0']")) { + const style = document.createElement("style"); + style.setAttribute("data-wp-hash", "244b5c59c0"); + style.appendChild(document.createTextNode('@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._96e6251aad1a6136__badge{border-radius:var(--wpds-border-radius-lg,8px);font-family:var(--wpds-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-font-size-sm,12px);font-weight:var(--wpds-font-weight-regular,400);line-height:var(--wpds-font-line-height-xs,16px);padding-block:var(--wpds-dimension-padding-xs,4px);padding-inline:var(--wpds-dimension-padding-sm,8px)}._99f7158cb520f750__is-high-intent{background-color:var(--wpds-color-bg-surface-error,#f6e6e3);color:var(--wpds-color-fg-content-error,#470000)}.c20ebef2365bc8b7__is-medium-intent{background-color:var(--wpds-color-bg-surface-warning,#fde6bd);color:var(--wpds-color-fg-content-warning,#2e1900)}._365e1626c6202e52__is-low-intent{background-color:var(--wpds-color-bg-surface-caution,#fee994);color:var(--wpds-color-fg-content-caution,#281d00)}._33f8198127ddf4ef__is-stable-intent{background-color:var(--wpds-color-bg-surface-success,#c5f7cc);color:var(--wpds-color-fg-content-success,#002900)}._04c1aca8fc449412__is-informational-intent{background-color:var(--wpds-color-bg-surface-info,#deebfa);color:var(--wpds-color-fg-content-info,#001b4f)}._90726e69d495ec19__is-draft-intent{background-color:var(--wpds-color-bg-surface-neutral-weak,#f0f0f0);color:var(--wpds-color-fg-content-neutral,#1e1e1e)}._898f4a544993bd39__is-none-intent{background-color:var(--wpds-color-bg-surface-neutral,#f8f8f8);color:var(--wpds-color-fg-content-neutral-weak,#6d6d6d)}}')); + document.head.appendChild(style); +} +var style_default = { "badge": "_96e6251aad1a6136__badge", "is-high-intent": "_99f7158cb520f750__is-high-intent", "is-medium-intent": "c20ebef2365bc8b7__is-medium-intent", "is-low-intent": "_365e1626c6202e52__is-low-intent", "is-stable-intent": "_33f8198127ddf4ef__is-stable-intent", "is-informational-intent": "_04c1aca8fc449412__is-informational-intent", "is-draft-intent": "_90726e69d495ec19__is-draft-intent", "is-none-intent": "_898f4a544993bd39__is-none-intent" }; +var Badge = (0, import_element2.forwardRef)(function Badge2({ children, intent = "none", render, className, ...props }, ref) { + const element = useRender({ + render, + defaultTagName: "span", + ref, + props: mergeProps(props, { + className: clsx_default( + style_default.badge, + style_default[`is-${intent}-intent`], + className + ), + children + }) + }); + return element; +}); + +// packages/ui/build-module/stack/stack.mjs +var import_element3 = __toESM(require_element(), 1); +if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='71d20935c2']")) { + const style = document.createElement("style"); + style.setAttribute("data-wp-hash", "71d20935c2"); + style.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._19ce0419607e1896__stack{display:flex}}")); + document.head.appendChild(style); +} +var style_default2 = { "stack": "_19ce0419607e1896__stack" }; +var gapTokens = { + xs: "var(--wpds-dimension-gap-xs, 4px)", + sm: "var(--wpds-dimension-gap-sm, 8px)", + md: "var(--wpds-dimension-gap-md, 12px)", + lg: "var(--wpds-dimension-gap-lg, 16px)", + xl: "var(--wpds-dimension-gap-xl, 24px)", + "2xl": "var(--wpds-dimension-gap-2xl, 32px)", + "3xl": "var(--wpds-dimension-gap-3xl, 40px)" +}; +var Stack = (0, import_element3.forwardRef)(function Stack2({ direction, gap, align, justify, wrap, render, ...props }, ref) { + const style = { + gap: gap && gapTokens[gap], + alignItems: align, + justifyContent: justify, + flexDirection: direction, + flexWrap: wrap + }; + const element = useRender({ + render, + ref, + props: mergeProps(props, { style, className: style_default2.stack }) + }); + return element; +}); + +// packages/admin-ui/build-module/page/sidebar-toggle-slot.mjs +var import_components = __toESM(require_components(), 1); +var { Fill: SidebarToggleFill, Slot: SidebarToggleSlot } = (0, import_components.createSlotFill)("SidebarToggle"); + +// packages/admin-ui/build-module/page/header.mjs +var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1); +function Header({ + headingLevel = 2, + breadcrumbs, + badges, + title, + subTitle, + actions, + showSidebarToggle = true +}) { + const HeadingTag = `h${headingLevel}`; + return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)( + Stack, + { + direction: "column", + className: "admin-ui-page__header", + render: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("header", {}), + children: [ + /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Stack, { direction: "row", justify: "space-between", gap: "sm", children: [ + /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Stack, { direction: "row", gap: "sm", align: "center", justify: "start", children: [ + showSidebarToggle && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)( + SidebarToggleSlot, + { + bubblesVirtually: true, + className: "admin-ui-page__sidebar-toggle-slot" + } + ), + title && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(HeadingTag, { className: "admin-ui-page__header-title", children: title }), + breadcrumbs, + badges + ] }), + /* @__PURE__ */ (0, import_jsx_runtime2.jsx)( + Stack, + { + direction: "row", + gap: "sm", + style: { width: "auto", flexShrink: 0 }, + className: "admin-ui-page__header-actions", + align: "center", + children: actions + } + ) + ] }), + subTitle && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "admin-ui-page__header-subtitle", children: subTitle }) + ] + } + ); +} + +// packages/admin-ui/build-module/page/index.mjs +var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1); +function Page({ + headingLevel, + breadcrumbs, + badges, + title, + subTitle, + children, + className, + actions, + hasPadding = false, + showSidebarToggle = true +}) { + const classes = clsx_default("admin-ui-page", className); + return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(navigable_region_default, { className: classes, ariaLabel: title, children: [ + (title || breadcrumbs || badges) && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)( + Header, + { + headingLevel, + breadcrumbs, + badges, + title, + subTitle, + actions, + showSidebarToggle + } + ), + hasPadding ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "admin-ui-page__content has-padding", children }) : children + ] }); +} +Page.SidebarToggleFill = SidebarToggleFill; +var page_default = Page; + +// routes/connectors-home/stage.tsx +var import_components4 = __toESM(require_components()); +var import_data3 = __toESM(require_data()); +var import_element7 = __toESM(require_element()); +var import_i18n4 = __toESM(require_i18n()); +var import_core_data3 = __toESM(require_core_data()); +import { + privateApis as connectorsPrivateApis +} from "@wordpress/connectors"; + +// routes/connectors-home/style.scss +if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='eb296b7e99']")) { + const style = document.createElement("style"); + style.setAttribute("data-wp-hash", "eb296b7e99"); + style.appendChild(document.createTextNode(".connectors-page{box-sizing:border-box;margin:0 auto;max-width:680px;padding:24px;width:100%}.connectors-page .components-item{background:#fff;border:1px solid #ddd;border-radius:8px;overflow:hidden;padding:20px;scroll-margin-top:120px}.connectors-page .connector-settings__error{color:#cc1818}.connectors-page .connector-settings .components-text-control__input{font-family:monospace;scroll-margin-top:120px}.connectors-page--empty{align-items:center;display:flex;flex-direction:column;flex-grow:1;gap:32px;justify-content:center;text-align:center}.connectors-page .ai-plugin-callout{background:linear-gradient(90deg,#fff9,#fff9),linear-gradient(90deg,#89dcdc,#c7eb5c 46.15%,#a920c1);border-radius:8px;overflow:hidden;padding:24px;padding-inline-end:220px;position:relative}[dir=rtl] .connectors-page .ai-plugin-callout{background:linear-gradient(270deg,#fff9,#fff9),linear-gradient(270deg,#89dcdc,#c7eb5c 46.15%,#a920c1)}.connectors-page .ai-plugin-callout__content{display:flex;flex-direction:column;gap:12px;padding-top:2px}.connectors-page .ai-plugin-callout__content p{font-size:13px;line-height:20px;margin:0}.connectors-page .ai-plugin-callout__actions{align-items:center;display:flex;gap:12px}.connectors-page .ai-plugin-callout__decoration{height:248px;inset-inline-end:8px;position:absolute;top:-15px;width:248px}.connectors-page>p{color:#949494;text-align:center}@media (max-width:680px){.connectors-page .ai-plugin-callout{padding:12px;padding-inline-end:84px}.connectors-page .ai-plugin-callout__decoration{height:134px;inset-inline-end:4px;top:-8px;width:134px}}@media (max-width:480px){.connectors-page{padding:8px}.connectors-page .components-item{padding:12px}.connectors-page .components-item>.components-v-stack>.components-h-stack:first-child svg{height:32px;width:32px}.connectors-page .components-item>.components-v-stack>.components-h-stack:first-child>.components-h-stack:last-child{align-items:flex-end;flex-direction:column}}")); + document.head.appendChild(style); +} + +// routes/connectors-home/ai-plugin-callout.tsx +var import_components3 = __toESM(require_components()); +var import_core_data2 = __toESM(require_core_data()); +var import_data2 = __toESM(require_data()); +var import_element6 = __toESM(require_element()); +var import_i18n3 = __toESM(require_i18n()); +import { speak as speak2 } from "@wordpress/a11y"; + +// routes/connectors-home/default-connectors.tsx +var import_components2 = __toESM(require_components()); +var import_element5 = __toESM(require_element()); +var import_i18n2 = __toESM(require_i18n()); +import { + __experimentalRegisterConnector as registerConnector, + __experimentalConnectorItem as ConnectorItem, + __experimentalDefaultConnectorSettings as DefaultConnectorSettings +} from "@wordpress/connectors"; + +// routes/connectors-home/use-connector-plugin.ts +var import_core_data = __toESM(require_core_data()); +var import_data = __toESM(require_data()); +var import_element4 = __toESM(require_element()); +var import_i18n = __toESM(require_i18n()); +import { speak } from "@wordpress/a11y"; +function useConnectorPlugin({ + pluginSlug, + settingName, + connectorName, + isInstalled, + isActivated, + keySource = "none", + initialIsConnected = false +}) { + const [isExpanded, setIsExpanded] = (0, import_element4.useState)(false); + const [isBusy, setIsBusy] = (0, import_element4.useState)(false); + const [connectedState, setConnectedState] = (0, import_element4.useState)(initialIsConnected); + const [pluginStatusOverride, setPluginStatusOverride] = (0, import_element4.useState)(null); + const { + derivedPluginStatus, + canManagePlugins, + currentApiKey, + canInstallPlugins + } = (0, import_data.useSelect)( + (select) => { + const store2 = select(import_core_data.store); + const siteSettings = store2.getEntityRecord("root", "site"); + const apiKey = siteSettings?.[settingName] ?? ""; + const canCreate = !!store2.canUser("create", { + kind: "root", + name: "plugin" + }); + if (!pluginSlug) { + const hasLoaded = store2.hasFinishedResolution( + "getEntityRecord", + ["root", "site"] + ); + return { + derivedPluginStatus: hasLoaded ? "active" : "checking", + canManagePlugins: void 0, + currentApiKey: apiKey, + canInstallPlugins: canCreate + }; + } + const pluginId = `${pluginSlug}/plugin`; + const plugin = store2.getEntityRecord( + "root", + "plugin", + pluginId + ); + const hasFinished = store2.hasFinishedResolution( + "getEntityRecord", + ["root", "plugin", pluginId] + ); + if (!hasFinished) { + return { + derivedPluginStatus: "checking", + canManagePlugins: void 0, + currentApiKey: apiKey, + canInstallPlugins: canCreate + }; + } + if (plugin) { + return { + derivedPluginStatus: plugin.status === "active" ? "active" : "inactive", + canManagePlugins: true, + currentApiKey: apiKey, + canInstallPlugins: canCreate + }; + } + let status = "not-installed"; + if (isActivated) { + status = "active"; + } else if (isInstalled) { + status = "inactive"; + } + return { + derivedPluginStatus: status, + canManagePlugins: false, + currentApiKey: apiKey, + canInstallPlugins: canCreate + }; + }, + [pluginSlug, settingName, isInstalled, isActivated] + ); + const pluginStatus = pluginStatusOverride ?? derivedPluginStatus; + const canActivatePlugins = canManagePlugins; + const isConnected = pluginStatus === "active" && connectedState || // After install/activate, if settings re-fetch reveals an existing key, + // update connected state (mirrors what the server would report on page load). + pluginStatusOverride === "active" && !!currentApiKey; + const { saveEntityRecord, invalidateResolution } = (0, import_data.useDispatch)(import_core_data.store); + const installPlugin = async () => { + if (!pluginSlug) { + return; + } + setIsBusy(true); + try { + await saveEntityRecord( + "root", + "plugin", + { slug: pluginSlug, status: "active" }, + { throwOnError: true } + ); + setPluginStatusOverride("active"); + invalidateResolution("getEntityRecord", ["root", "site"]); + setIsExpanded(true); + speak( + (0, import_i18n.sprintf)( + /* translators: %s: Name of the connector (e.g. "OpenAI"). */ + (0, import_i18n.__)("Plugin for %s installed and activated successfully."), + connectorName + ) + ); + } catch { + speak( + (0, import_i18n.sprintf)( + /* translators: %s: Name of the connector (e.g. "OpenAI"). */ + (0, import_i18n.__)("Failed to install plugin for %s."), + connectorName + ), + "assertive" + ); + } finally { + setIsBusy(false); + } + }; + const activatePlugin = async () => { + if (!pluginSlug) { + return; + } + setIsBusy(true); + try { + await saveEntityRecord( + "root", + "plugin", + { plugin: `${pluginSlug}/plugin`, status: "active" }, + { throwOnError: true } + ); + setPluginStatusOverride("active"); + invalidateResolution("getEntityRecord", ["root", "site"]); + setIsExpanded(true); + speak( + (0, import_i18n.sprintf)( + /* translators: %s: Name of the connector (e.g. "OpenAI"). */ + (0, import_i18n.__)("Plugin for %s activated successfully."), + connectorName + ) + ); + } catch { + speak( + (0, import_i18n.sprintf)( + /* translators: %s: Name of the connector (e.g. "OpenAI"). */ + (0, import_i18n.__)("Failed to activate plugin for %s."), + connectorName + ), + "assertive" + ); + } finally { + setIsBusy(false); + } + }; + const handleButtonClick = () => { + if (pluginStatus === "not-installed") { + if (canInstallPlugins === false) { + return; + } + installPlugin(); + } else if (pluginStatus === "inactive") { + if (canActivatePlugins === false) { + return; + } + activatePlugin(); + } else { + setIsExpanded(!isExpanded); + } + }; + const getButtonLabel = () => { + if (isBusy) { + return pluginStatus === "not-installed" ? (0, import_i18n.__)("Installing\u2026") : (0, import_i18n.__)("Activating\u2026"); + } + if (isExpanded) { + return (0, import_i18n.__)("Cancel"); + } + if (isConnected) { + return (0, import_i18n.__)("Edit"); + } + switch (pluginStatus) { + case "checking": + return (0, import_i18n.__)("Checking\u2026"); + case "not-installed": + return (0, import_i18n.__)("Install"); + case "inactive": + return (0, import_i18n.__)("Activate"); + case "active": + return (0, import_i18n.__)("Set up"); + } + }; + const saveApiKey = async (apiKey) => { + const previousApiKey = currentApiKey; + try { + const updatedRecord = await saveEntityRecord( + "root", + "site", + { [settingName]: apiKey }, + { throwOnError: true } + ); + const record = updatedRecord; + const returnedKey = record?.[settingName]; + if (apiKey && (returnedKey === previousApiKey || !returnedKey)) { + throw new Error( + "It was not possible to connect to the provider using this key." + ); + } + setConnectedState(true); + speak( + (0, import_i18n.sprintf)( + /* translators: %s: Name of the connector (e.g. "OpenAI"). */ + (0, import_i18n.__)("%s connected successfully."), + connectorName + ) + ); + } catch (error) { + console.error("Failed to save API key:", error); + throw error; + } + }; + const removeApiKey = async () => { + try { + await saveEntityRecord( + "root", + "site", + { [settingName]: "" }, + { throwOnError: true } + ); + setConnectedState(false); + speak( + (0, import_i18n.sprintf)( + /* translators: %s: Name of the connector (e.g. "OpenAI"). */ + (0, import_i18n.__)("%s disconnected."), + connectorName + ) + ); + } catch (error) { + console.error("Failed to remove API key:", error); + speak( + (0, import_i18n.sprintf)( + /* translators: %s: Name of the connector (e.g. "OpenAI"). */ + (0, import_i18n.__)("Failed to disconnect %s."), + connectorName + ), + "assertive" + ); + throw error; + } + }; + return { + pluginStatus, + canInstallPlugins, + canActivatePlugins, + isExpanded, + setIsExpanded, + isBusy, + isConnected, + currentApiKey, + keySource, + handleButtonClick, + getButtonLabel, + saveApiKey, + removeApiKey + }; +} + +// routes/connectors-home/logos.tsx +var OpenAILogo = () => /* @__PURE__ */ React.createElement( + "svg", + { + width: "40", + height: "40", + viewBox: "0 0 24 24", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + "aria-hidden": "true" + }, + /* @__PURE__ */ React.createElement( + "path", + { + d: "M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364l2.0201-1.1685a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.4043-.6813zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z", + fill: "currentColor" + } + ) +); +var ClaudeLogo = () => /* @__PURE__ */ React.createElement( + "svg", + { + width: "40", + height: "40", + viewBox: "0 0 32 32", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + "aria-hidden": "true" + }, + /* @__PURE__ */ React.createElement( + "path", + { + d: "M6.2 21.024L12.416 17.536L12.52 17.232L12.416 17.064H12.112L11.072 17L7.52 16.904L4.44 16.776L1.456 16.616L0.704 16.456L0 15.528L0.072 15.064L0.704 14.64L1.608 14.72L3.608 14.856L6.608 15.064L8.784 15.192L12.008 15.528H12.52L12.592 15.32L12.416 15.192L12.28 15.064L9.176 12.96L5.816 10.736L4.056 9.456L3.104 8.808L2.624 8.2L2.416 6.872L3.28 5.92L4.44 6L4.736 6.08L5.912 6.984L8.424 8.928L11.704 11.344L12.184 11.744L12.376 11.608L12.4 11.512L12.184 11.152L10.4 7.928L8.496 4.648L7.648 3.288L7.424 2.472C7.344 2.136 7.288 1.856 7.288 1.512L8.272 0.176L8.816 0L10.128 0.176L10.68 0.656L11.496 2.52L12.816 5.456L14.864 9.448L15.464 10.632L15.784 11.728L15.904 12.064H16.112V11.872L16.28 9.624L16.592 6.864L16.896 3.312L17 2.312L17.496 1.112L18.48 0.464L19.248 0.832L19.88 1.736L19.792 2.32L19.416 4.76L18.68 8.584L18.2 11.144H18.48L18.8 10.824L20.096 9.104L22.272 6.384L23.232 5.304L24.352 4.112L25.072 3.544H26.432L27.432 5.032L26.984 6.568L25.584 8.344L24.424 9.848L22.76 12.088L21.72 13.88L21.816 14.024L22.064 14L25.824 13.2L27.856 12.832L30.28 12.416L31.376 12.928L31.496 13.448L31.064 14.512L28.472 15.152L25.432 15.76L20.904 16.832L20.848 16.872L20.912 16.952L22.952 17.144L23.824 17.192H25.96L29.936 17.488L30.976 18.176L31.6 19.016L31.496 19.656L29.896 20.472L27.736 19.96L22.696 18.76L20.968 18.328H20.728V18.472L22.168 19.88L24.808 22.264L28.112 25.336L28.28 26.096L27.856 26.696L27.408 26.632L24.504 24.448L23.384 23.464L20.848 21.328H20.68V21.552L21.264 22.408L24.352 27.048L24.512 28.472L24.288 28.936L23.488 29.216L22.608 29.056L20.8 26.52L18.936 23.664L17.432 21.104L17.248 21.208L16.36 30.768L15.944 31.256L14.984 31.624L14.184 31.016L13.76 30.032L14.184 28.088L14.696 25.552L15.112 23.536L15.488 21.032L15.712 20.2L15.696 20.144L15.512 20.168L13.624 22.76L10.752 26.64L8.48 29.072L7.936 29.288L6.992 28.8L7.08 27.928L7.608 27.152L10.752 23.152L12.648 20.672L13.872 19.24L13.864 19.032H13.792L5.44 24.456L3.952 24.648L3.312 24.048L3.392 23.064L3.696 22.744L6.208 21.016L6.2 21.024Z", + fill: "#D97757" + } + ) +); +var DefaultConnectorLogo = () => /* @__PURE__ */ React.createElement( + "svg", + { + width: "40", + height: "40", + viewBox: "0 0 32 32", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + "aria-hidden": "true" + }, + /* @__PURE__ */ React.createElement( + "path", + { + d: "M0 4C0 1.79086 1.79086 0 4 0H28C30.2091 0 32 1.79086 32 4V28C32 30.2091 30.2091 32 28 32H4C1.79086 32 0 30.2091 0 28V4Z", + fill: "#F0F0F0" + } + ), + /* @__PURE__ */ React.createElement( + "path", + { + d: "M14.5 8V12H17.5V8H19V12H20.5C20.7652 12 21.0196 12.1054 21.2071 12.2929C21.3946 12.4804 21.5 12.7348 21.5 13V17L18.5 21V23C18.5 23.2652 18.3946 23.5196 18.2071 23.7071C18.0196 23.8946 17.7652 24 17.5 24H14.5C14.2348 24 13.9804 23.8946 13.7929 23.7071C13.6054 23.5196 13.5 23.2652 13.5 23V21L10.5 17V13C10.5 12.7348 10.6054 12.4804 10.7929 12.2929C10.9804 12.1054 11.2348 12 11.5 12H13V8H14.5ZM15 20.5V22.5H17V20.5L20 16.5V13.5H12V16.5L15 20.5Z", + fill: "#949494" + } + ) +); +var GeminiLogo = () => /* @__PURE__ */ React.createElement( + "svg", + { + width: "40", + height: "40", + style: { flex: "none", lineHeight: 1 }, + viewBox: "0 0 24 24", + xmlns: "http://www.w3.org/2000/svg", + "aria-hidden": "true" + }, + /* @__PURE__ */ React.createElement( + "path", + { + d: "M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z", + fill: "#3186FF" + } + ), + /* @__PURE__ */ React.createElement( + "path", + { + d: "M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z", + fill: "url(#lobe-icons-gemini-fill-0)" + } + ), + /* @__PURE__ */ React.createElement( + "path", + { + d: "M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z", + fill: "url(#lobe-icons-gemini-fill-1)" + } + ), + /* @__PURE__ */ React.createElement( + "path", + { + d: "M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z", + fill: "url(#lobe-icons-gemini-fill-2)" + } + ), + /* @__PURE__ */ React.createElement("defs", null, /* @__PURE__ */ React.createElement( + "linearGradient", + { + gradientUnits: "userSpaceOnUse", + id: "lobe-icons-gemini-fill-0", + x1: "7", + x2: "11", + y1: "15.5", + y2: "12" + }, + /* @__PURE__ */ React.createElement("stop", { stopColor: "#08B962" }), + /* @__PURE__ */ React.createElement("stop", { offset: "1", stopColor: "#08B962", stopOpacity: "0" }) + ), /* @__PURE__ */ React.createElement( + "linearGradient", + { + gradientUnits: "userSpaceOnUse", + id: "lobe-icons-gemini-fill-1", + x1: "8", + x2: "11.5", + y1: "5.5", + y2: "11" + }, + /* @__PURE__ */ React.createElement("stop", { stopColor: "#F94543" }), + /* @__PURE__ */ React.createElement("stop", { offset: "1", stopColor: "#F94543", stopOpacity: "0" }) + ), /* @__PURE__ */ React.createElement( + "linearGradient", + { + gradientUnits: "userSpaceOnUse", + id: "lobe-icons-gemini-fill-2", + x1: "3.5", + x2: "17.5", + y1: "13.5", + y2: "12" + }, + /* @__PURE__ */ React.createElement("stop", { stopColor: "#FABC12" }), + /* @__PURE__ */ React.createElement("stop", { offset: ".46", stopColor: "#FABC12", stopOpacity: "0" }) + )) +); + +// routes/connectors-home/default-connectors.tsx +function getConnectorData() { + try { + const parsed = JSON.parse( + document.getElementById( + "wp-script-module-data-options-connectors-wp-admin" + )?.textContent ?? "" + ); + return parsed?.connectors ?? {}; + } catch { + return {}; + } +} +var CONNECTOR_LOGOS = { + google: GeminiLogo, + openai: OpenAILogo, + anthropic: ClaudeLogo +}; +function getConnectorLogo(connectorId, logoUrl) { + if (logoUrl) { + return /* @__PURE__ */ React.createElement("img", { src: logoUrl, alt: "", width: 40, height: 40 }); + } + const Logo = CONNECTOR_LOGOS[connectorId]; + if (Logo) { + return /* @__PURE__ */ React.createElement(Logo, null); + } + return /* @__PURE__ */ React.createElement(DefaultConnectorLogo, null); +} +var ConnectedBadge = () => /* @__PURE__ */ React.createElement( + "span", + { + style: { + color: "#345b37", + backgroundColor: "#eff8f0", + padding: "4px 12px", + borderRadius: "2px", + fontSize: "13px", + fontWeight: 500, + whiteSpace: "nowrap" + } + }, + (0, import_i18n2.__)("Connected") +); +var UnavailableActionBadge = () => /* @__PURE__ */ React.createElement(Badge, null, (0, import_i18n2.__)("Not available")); +function ApiKeyConnector({ + label, + description, + pluginSlug, + settingName, + helpUrl, + icon, + isInstalled, + isActivated, + keySource: initialKeySource, + initialIsConnected +}) { + let helpLabel; + try { + if (helpUrl) { + helpLabel = new URL(helpUrl).hostname; + } + } catch { + } + const { + pluginStatus, + canInstallPlugins, + canActivatePlugins, + isExpanded, + setIsExpanded, + isBusy, + isConnected, + currentApiKey, + keySource, + handleButtonClick, + getButtonLabel, + saveApiKey, + removeApiKey + } = useConnectorPlugin({ + pluginSlug, + settingName, + connectorName: label, + isInstalled, + isActivated, + keySource: initialKeySource, + initialIsConnected + }); + const isExternallyConfigured = keySource === "env" || keySource === "constant"; + const showUnavailableBadge = pluginStatus === "not-installed" && canInstallPlugins === false || pluginStatus === "inactive" && canActivatePlugins === false; + const showActionButton = !showUnavailableBadge; + const actionButtonRef = (0, import_element5.useRef)(null); + const pendingFocusRef = (0, import_element5.useRef)(false); + (0, import_element5.useEffect)(() => { + if (pendingFocusRef.current && !isBusy) { + pendingFocusRef.current = false; + actionButtonRef.current?.focus(); + } + }, [isBusy, isExpanded, isConnected]); + const handleActionClick = () => { + if (pluginStatus === "not-installed" || pluginStatus === "inactive") { + pendingFocusRef.current = true; + } + handleButtonClick(); + }; + return /* @__PURE__ */ React.createElement( + ConnectorItem, + { + className: pluginSlug ? `connector-item--${pluginSlug}` : void 0, + icon, + name: label, + description, + actionArea: /* @__PURE__ */ React.createElement(import_components2.__experimentalHStack, { spacing: 3, expanded: false }, isConnected && /* @__PURE__ */ React.createElement(ConnectedBadge, null), showUnavailableBadge && /* @__PURE__ */ React.createElement(UnavailableActionBadge, null), showActionButton && /* @__PURE__ */ React.createElement( + import_components2.Button, + { + ref: actionButtonRef, + variant: isExpanded || isConnected ? "tertiary" : "secondary", + size: "compact", + onClick: handleActionClick, + disabled: pluginStatus === "checking" || isBusy, + isBusy + }, + getButtonLabel() + )) + }, + isExpanded && pluginStatus === "active" && /* @__PURE__ */ React.createElement( + DefaultConnectorSettings, + { + key: isConnected ? "connected" : "setup", + initialValue: isExternallyConfigured ? "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022" : currentApiKey, + helpUrl, + helpLabel, + readOnly: isConnected || isExternallyConfigured, + keySource, + onRemove: isExternallyConfigured ? void 0 : async () => { + pendingFocusRef.current = true; + try { + await removeApiKey(); + } catch { + pendingFocusRef.current = false; + } + }, + onSave: async (apiKey) => { + await saveApiKey(apiKey); + pendingFocusRef.current = true; + setIsExpanded(false); + } + } + ) + ); +} +function registerDefaultConnectors() { + const connectors = getConnectorData(); + const sanitize = (s) => s.replace(/[^a-z0-9-]/gi, "-"); + for (const [connectorId, data] of Object.entries(connectors)) { + const { authentication } = data; + if (data.type !== "ai_provider" || authentication.method !== "api_key") { + continue; + } + const connectorName = `${sanitize(data.type)}/${sanitize( + connectorId + )}`; + registerConnector(connectorName, { + label: data.name, + description: data.description, + icon: getConnectorLogo(connectorId, data.logoUrl), + render: (props) => /* @__PURE__ */ React.createElement( + ApiKeyConnector, + { + ...props, + pluginSlug: data.plugin?.slug, + settingName: authentication.settingName, + helpUrl: authentication.credentialsUrl ?? void 0, + isInstalled: data.plugin?.isInstalled, + isActivated: data.plugin?.isActivated, + keySource: authentication.keySource, + initialIsConnected: authentication.isConnected + } + ) + }); + } +} + +// routes/connectors-home/wp-logo-decoration.tsx +function WpLogoDecoration() { + return /* @__PURE__ */ React.createElement("div", { className: "ai-plugin-callout__decoration", "aria-hidden": "true" }, /* @__PURE__ */ React.createElement( + "svg", + { + viewBox: "0 0 248 248", + xmlns: "http://www.w3.org/2000/svg", + xmlnsXlink: "http://www.w3.org/1999/xlink", + focusable: "false", + style: { width: "100%", height: "100%" } + }, + /* @__PURE__ */ React.createElement( + "image", + { + href: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPgAAAD4CAYAAADB0SsLAACAAElEQVR4XuzdB7hlRZEH8D73zRBniJLDzBAEVFQMKCaCWXENa1oTYM45hwXEtOa0ZgVzWnPOBHPWVcxgzjnrGvb/O91n5s5lZnjAe4Bw6vvqO3XPPed0rO6q6urqUkYYYYQRRhhhhBFGGGGEEUYYYYQRRhhhhBFGGGGEEUYYYYQRRhhhhBFGGGGEEUYYYYQRRhhhhBFGGGGEEUYYYYQRRhhhhBFGGGGEEUYYYYQRRhhhhBFGGGGEEUYYYYQRRhhhhBFGGGGEEUYYYYQRRhhhhBFGGGGEEUYYYYQRRhhhhBFGGGGEEUYYYYQRRhhhhBFGGGGEEUaYD3RdtxY9/XuEEUb4F4aBoWdxhBFG+BeHxsxg0+BmwSXBrYPbBTfOI3Dz4NKZV0cYYYTFhMlkskGcm5tbC6f/m5mtlwavGLxacKt8+k7BY4N7B/cLHh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ag6wJw28HlzeObze+5iSyR6o9tKi3qWket9DOeu2er9rbz7+v6GhoaGhoaGhoeEXHGMVf2wHL4SHsWq9G5OgoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaFhDeL/AbL/6dpoj+OHAAAAAElFTkSuQmCC", + width: "248", + height: "248", + style: { mixBlendMode: "multiply" } + } + ), + /* @__PURE__ */ React.createElement("rect", { x: "184.055", y: "54.995", width: "2.187", height: "2.187" }), + /* @__PURE__ */ React.createElement("rect", { x: "170.059", y: "44.06", width: "2.187", height: "2.187" }), + /* @__PURE__ */ React.createElement("rect", { x: "200.238", y: "77.302", width: "2.187", height: "2.187" }), + /* @__PURE__ */ React.createElement("rect", { x: "212.048", y: "87.8", width: "2.187", height: "2.187" }), + /* @__PURE__ */ React.createElement("rect", { x: "206.799", y: "83.425", width: "2.187", height: "2.187" }), + /* @__PURE__ */ React.createElement("rect", { x: "204.175", y: "85.612", width: "2.187", height: "2.187" }), + /* @__PURE__ */ React.createElement("rect", { x: "219.046", y: "103.108", width: "2.187", height: "2.187" }), + /* @__PURE__ */ React.createElement("rect", { x: "154.751", y: "30.064", width: "2.187", height: "2.187" }), + /* @__PURE__ */ React.createElement("rect", { x: "188.866", y: "63.742", width: "2.187", height: "2.187" }), + /* @__PURE__ */ React.createElement("rect", { x: "148.189", y: "34", width: "2.187", height: "2.187" }), + /* @__PURE__ */ React.createElement("rect", { x: "134.051", y: "31.707", width: "2.187", height: "2.187" }), + /* @__PURE__ */ React.createElement("rect", { x: "126.124", y: "24.771", width: "2.187", height: "2.187" }), + /* @__PURE__ */ React.createElement("rect", { x: "115.385", y: "29.19", width: "2.187", height: "2.187" }), + /* @__PURE__ */ React.createElement("rect", { x: "95.702", y: "31.376", width: "2.187", height: "2.187" }), + /* @__PURE__ */ React.createElement("rect", { x: "91.766", y: "27.002", width: "2.187", height: "2.187" }), + /* @__PURE__ */ React.createElement("rect", { x: "90.454", y: "32.688", width: "2.187", height: "2.187" }), + /* @__PURE__ */ React.createElement("rect", { x: "184.389", y: "45.58", width: "2.187", height: "2.187" }), + /* @__PURE__ */ React.createElement("rect", { x: "162.185", y: "41.873", width: "2.187", height: "2.187" }) + )); +} + +// routes/connectors-home/ai-plugin-callout.tsx +var AI_PLUGIN_SLUG = "ai"; +var AI_PLUGIN_ID = "ai/ai"; +var AI_PLUGIN_URL = "https://wordpress.org/plugins/ai/"; +var connectorDataValues = Object.values(getConnectorData()); +var hasAiProviders = connectorDataValues.some( + (c) => c.type === "ai_provider" +); +var aiProviderSettingNames = []; +for (const c of connectorDataValues) { + if (c.type === "ai_provider" && c.authentication.method === "api_key") { + aiProviderSettingNames.push(c.authentication.settingName); + } +} +function AiPluginCallout() { + const [isBusy, setIsBusy] = (0, import_element6.useState)(false); + const [justActivated, setJustActivated] = (0, import_element6.useState)(false); + const actionButtonRef = (0, import_element6.useRef)(null); + (0, import_element6.useEffect)(() => { + if (justActivated) { + actionButtonRef.current?.focus(); + } + }, [justActivated]); + const initialHasConnectedProvider = (0, import_element6.useRef)( + connectorDataValues.some( + (c) => c.type === "ai_provider" && c.authentication.method === "api_key" && c.authentication.isConnected + ) + ).current; + const { + pluginStatus, + canInstallPlugins, + canManagePlugins, + hasConnectedProvider + } = (0, import_data2.useSelect)((select) => { + const store2 = select(import_core_data2.store); + const canCreate = !!store2.canUser("create", { + kind: "root", + name: "plugin" + }); + const siteSettings = store2.getEntityRecord("root", "site"); + const hasConnected = initialHasConnectedProvider || aiProviderSettingNames.some( + (name) => !!siteSettings?.[name] + ); + const plugin = store2.getEntityRecord( + "root", + "plugin", + AI_PLUGIN_ID + ); + const hasFinished = store2.hasFinishedResolution("getEntityRecord", [ + "root", + "plugin", + AI_PLUGIN_ID + ]); + if (!hasFinished) { + return { + pluginStatus: "checking", + canInstallPlugins: canCreate, + canManagePlugins: void 0, + hasConnectedProvider: hasConnected + }; + } + if (!plugin) { + return { + pluginStatus: "not-installed", + canInstallPlugins: canCreate, + canManagePlugins: canCreate, + hasConnectedProvider: hasConnected + }; + } + return { + pluginStatus: plugin.status === "active" ? "active" : "inactive", + canInstallPlugins: canCreate, + canManagePlugins: true, + hasConnectedProvider: hasConnected + }; + }, []); + const { saveEntityRecord } = (0, import_data2.useDispatch)(import_core_data2.store); + const installPlugin = async () => { + setIsBusy(true); + try { + await saveEntityRecord( + "root", + "plugin", + { slug: AI_PLUGIN_SLUG, status: "active" }, + { throwOnError: true } + ); + setJustActivated(true); + speak2((0, import_i18n3.__)("AI plugin installed and activated successfully.")); + } catch { + speak2((0, import_i18n3.__)("Failed to install the AI plugin."), "assertive"); + } finally { + setIsBusy(false); + } + }; + const activatePlugin = async () => { + setIsBusy(true); + try { + await saveEntityRecord( + "root", + "plugin", + { plugin: AI_PLUGIN_ID, status: "active" }, + { throwOnError: true } + ); + setJustActivated(true); + speak2((0, import_i18n3.__)("AI plugin activated successfully.")); + } catch { + speak2((0, import_i18n3.__)("Failed to activate the AI plugin."), "assertive"); + } finally { + setIsBusy(false); + } + }; + if (!hasAiProviders) { + return null; + } + if (pluginStatus === "checking") { + return null; + } + if (pluginStatus === "active" && initialHasConnectedProvider && !justActivated) { + return null; + } + if (pluginStatus === "not-installed" && canInstallPlugins === false) { + return null; + } + if (pluginStatus === "inactive" && canManagePlugins === false) { + return null; + } + const isActiveNoProvider = pluginStatus === "active" && !hasConnectedProvider; + const isJustConnected = pluginStatus === "active" && hasConnectedProvider && (!initialHasConnectedProvider || justActivated); + const showInstallActivate = pluginStatus === "not-installed" || pluginStatus === "inactive"; + const getMessage = () => { + if (isJustConnected) { + return (0, import_i18n3.__)( + "The AI plugin is ready to use. You can use it to generate featured images, alt text, titles, excerpts and more." + ); + } + if (isActiveNoProvider) { + return (0, import_i18n3.__)( + "The AI plugin is installed. Connect a provider below to generate featured images, alt text, titles, excerpts, and more." + ); + } + return (0, import_i18n3.__)( + "The AI plugin can use your connectors to generate featured images, alt text, titles, excerpts and more." + ); + }; + const getPrimaryButtonProps = () => { + if (pluginStatus === "not-installed") { + return { + label: isBusy ? (0, import_i18n3.__)("Installing\u2026") : (0, import_i18n3.__)("Install AI Experiments"), + disabled: isBusy, + onClick: isBusy ? void 0 : installPlugin + }; + } + return { + label: isBusy ? (0, import_i18n3.__)("Activating\u2026") : (0, import_i18n3.__)("Activate AI Experiments"), + disabled: isBusy, + onClick: isBusy ? void 0 : activatePlugin + }; + }; + return /* @__PURE__ */ React.createElement("div", { className: "ai-plugin-callout" }, /* @__PURE__ */ React.createElement("div", { className: "ai-plugin-callout__content" }, /* @__PURE__ */ React.createElement("p", null, (0, import_element6.createInterpolateElement)(getMessage(), { + strong: /* @__PURE__ */ React.createElement("strong", null) + })), /* @__PURE__ */ React.createElement("div", { className: "ai-plugin-callout__actions" }, showInstallActivate ? /* @__PURE__ */ React.createElement( + import_components3.Button, + { + ref: actionButtonRef, + variant: "primary", + size: "compact", + isBusy, + disabled: getPrimaryButtonProps().disabled, + accessibleWhenDisabled: true, + onClick: getPrimaryButtonProps().onClick + }, + getPrimaryButtonProps().label + ) : justActivated && /* @__PURE__ */ React.createElement( + import_components3.Button, + { + ref: actionButtonRef, + variant: "secondary", + size: "compact", + disabled: true, + accessibleWhenDisabled: true + }, + (0, import_i18n3.__)("AI Experiments enabled") + ), /* @__PURE__ */ React.createElement(import_components3.ExternalLink, { href: AI_PLUGIN_URL }, (0, import_i18n3.__)("Learn more")))), /* @__PURE__ */ React.createElement(WpLogoDecoration, null)); +} + +// routes/lock-unlock.ts +var import_private_apis = __toESM(require_private_apis()); +var { lock, unlock } = (0, import_private_apis.__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/routes" +); + +// routes/connectors-home/stage.tsx +var { store } = unlock(connectorsPrivateApis); +registerDefaultConnectors(); +function ConnectorsPage() { + const { connectors, canInstallPlugins } = (0, import_data3.useSelect)( + (select) => ({ + connectors: unlock(select(store)).getConnectors(), + canInstallPlugins: select(import_core_data3.store).canUser("create", { + kind: "root", + name: "plugin" + }) + }), + [] + ); + const isEmpty = connectors.length === 0; + return /* @__PURE__ */ React.createElement( + page_default, + { + title: (0, import_i18n4.__)("Connectors"), + headingLevel: 1, + subTitle: (0, import_i18n4.__)( + "All of your API keys and credentials are stored here and shared across plugins. Configure once and use everywhere." + ) + }, + /* @__PURE__ */ React.createElement( + "div", + { + className: `connectors-page${isEmpty ? " connectors-page--empty" : ""}` + }, + isEmpty ? /* @__PURE__ */ React.createElement( + import_components4.__experimentalVStack, + { + alignment: "center", + spacing: 3, + style: { maxWidth: 480 } + }, + /* @__PURE__ */ React.createElement(import_components4.__experimentalVStack, { alignment: "center", spacing: 2 }, /* @__PURE__ */ React.createElement(import_components4.__experimentalHeading, { level: 2, size: 15, weight: 600 }, (0, import_i18n4.__)("No connectors yet")), /* @__PURE__ */ React.createElement(import_components4.__experimentalText, { size: 12 }, (0, import_i18n4.__)( + "Connectors appear here when you install plugins that use external services. Each plugin registers the API keys it needs, and you manage them all in one place." + ))), + /* @__PURE__ */ React.createElement(import_components4.Button, { variant: "secondary", href: "plugin-install.php" }, (0, import_i18n4.__)("Learn more")) + ) : /* @__PURE__ */ React.createElement(import_components4.__experimentalVStack, { spacing: 3 }, /* @__PURE__ */ React.createElement(AiPluginCallout, null), connectors.map((connector) => { + if (connector.render) { + return /* @__PURE__ */ React.createElement( + connector.render, + { + key: connector.slug, + slug: connector.slug, + label: connector.label, + description: connector.description, + icon: connector.icon + } + ); + } + return null; + })), + canInstallPlugins && /* @__PURE__ */ React.createElement("p", null, (0, import_element7.createInterpolateElement)( + (0, import_i18n4.__)( + "If the connector you need is not listed, search the plugin directory to see if a connector is available." + ), + { + a: ( + // eslint-disable-next-line jsx-a11y/anchor-has-content + /* @__PURE__ */ React.createElement("a", { href: "plugin-install.php?s=connector&tab=search&type=tag" }) + ) + } + )) + ) + ); +} +function Stage() { + return /* @__PURE__ */ React.createElement(ConnectorsPage, null); +} +var stage = Stage; +export { + stage +}; diff --git a/src/wp-includes/build/routes/connectors-home/content.min.asset.php b/src/wp-includes/build/routes/connectors-home/content.min.asset.php new file mode 100644 index 0000000000000..b2e157def7f5f --- /dev/null +++ b/src/wp-includes/build/routes/connectors-home/content.min.asset.php @@ -0,0 +1 @@ + array('react', 'react-dom', 'react-jsx-runtime', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives', 'wp-private-apis', 'wp-theme'), 'module_dependencies' => array(array('id' => '@wordpress/a11y', 'import' => 'static'), array('id' => '@wordpress/connectors', 'import' => 'static'), array('id' => '@wordpress/route', 'import' => 'static')), 'version' => '215ccfe06cded25aaf1f'); \ No newline at end of file diff --git a/src/wp-includes/build/routes/connectors-home/content.min.js b/src/wp-includes/build/routes/connectors-home/content.min.js new file mode 100644 index 0000000000000..e349ecd3e7e1b --- /dev/null +++ b/src/wp-includes/build/routes/connectors-home/content.min.js @@ -0,0 +1 @@ +var jt=Object.create;var qe=Object.defineProperty;var Bt=Object.getOwnPropertyDescriptor;var Ht=Object.getOwnPropertyNames;var Rt=Object.getPrototypeOf,qt=Object.prototype.hasOwnProperty;var D=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Tt=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Ht(t))!qt.call(e,o)&&o!==n&&qe(e,o,{get:()=>t[o],enumerable:!(r=Bt(t,o))||r.enumerable});return e};var s=(e,t,n)=>(n=e!=null?jt(Rt(e)):{},Tt(t||!e||!e.__esModule?qe(n,"default",{value:e,enumerable:!0}):n,e));var I=D((vn,Te)=>{Te.exports=window.wp.i18n});var k=D((hn,Ve)=>{Ve.exports=window.wp.components});var ne=D((bn,Ne)=>{Ne.exports=window.ReactJSXRuntime});var j=D((wn,Ye)=>{Ye.exports=window.wp.element});var E=D((xn,Ce)=>{Ce.exports=window.React});var st=D((rr,it)=>{it.exports=window.wp.privateApis});var ae=D((Pr,gt)=>{gt.exports=window.wp.data});var ie=D((wr,mt)=>{mt.exports=window.wp.coreData});function Xe(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t(0,Ae.jsx)(r,{ref:a,className:A("admin-ui-navigable-region",t),"aria-label":n,role:"region",tabIndex:"-1",...o,children:e}));Ee.displayName="NavigableRegion";var Ze=Ee;var Ke=s(E(),1),We={};function pe(e,t){let n=Ke.useRef(We);return n.current===We&&(n.current=e(t)),n}function ge(e,...t){let n=new URL(`https://base-ui.com/production-error/${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}var re=s(E(),1);function me(e,t,n,r){let o=pe(ke).current;return Nt(o,e,t,n,r)&&Ue(o,[e,t,n,r]),o.callback}function Ie(e){let t=pe(ke).current;return Xt(t,e)&&Ue(t,e),t.callback}function ke(){return{callback:null,cleanup:null,refs:[]}}function Nt(e,t,n,r,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==o}function Xt(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function Ue(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){let r=Array(t.length).fill(null);for(let o=0;o{for(let o=0;o=e}function ve(e){if(!Fe.isValidElement(e))return null;let t=e,n=t.props;return(Je(19)?n?.ref:t.ref)??null}function U(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function _e(e,t){let n={};for(let r in e){let o=e[r];if(t?.hasOwnProperty(r)){let a=t[r](o);a!=null&&Object.assign(n,a);continue}o===!0?n[`data-${r.toLowerCase()}`]="":o&&(n[`data-${r.toLowerCase()}`]=o.toString())}return n}function $e(e,t){return typeof e=="function"?e(t):e}function et(e,t){return typeof e=="function"?e(t):e}var J={};function Z(e,t,n,r,o){let a={...he(e,J)};return t&&(a=Q(a,t)),n&&(a=Q(a,n)),r&&(a=Q(a,r)),o&&(a=Q(a,o)),a}function tt(e){if(e.length===0)return J;if(e.length===1)return he(e[0],J);let t={...he(e[0],J)};for(let n=1;n=65&&o<=90&&(typeof t=="function"||typeof t>"u")}function nt(e){return typeof e=="function"}function he(e,t){return nt(e)?e(t):e??J}function Et(e,t){return t?e?n=>{if(Ct(n)){let o=n;Zt(o);let a=t(o);return o.baseUIHandlerPrevented||e?.(o),a}let r=t(n);return e?.(n),r}:t:e}function Zt(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function be(e,t){return t?e?t+" "+e:t:e}function Ct(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}var Wt=Object.freeze([]),B=Object.freeze({});var Pe=s(E(),1);function rt(e,t,n={}){let r=t.render,o=Kt(t,n);if(n.enabled===!1)return null;let a=n.state??B;return It(e,r,o,a)}function Kt(e,t={}){let{className:n,style:r,render:o}=e,{state:a=B,ref:i,props:l,stateAttributesMapping:g,enabled:d=!0}=t,u=d?$e(n,a):void 0,v=d?et(r,a):void 0,z=d?_e(a,g):B,f=d?U(z,Array.isArray(l)?tt(l):l)??B:B;return typeof document<"u"&&(d?Array.isArray(i)?f.ref=Ie([f.ref,ve(o),...i]):f.ref=me(f.ref,ve(o),i):me(null,null)),d?(u!==void 0&&(f.className=be(f.className,u)),v!==void 0&&(f.style=U(f.style,v)),f):B}function It(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);let o=Z(n,t.props);return o.ref=n.ref,re.cloneElement(t,o)}if(e&&typeof e=="string")return kt(e,n);throw new Error(ge(8))}function kt(e,t){return e==="button"?(0,Pe.createElement)("button",{type:"button",...t,key:t.key}):e==="img"?(0,Pe.createElement)("img",{alt:"",...t,key:t.key}):re.createElement(e,t)}function oe(e){return rt(e.defaultTagName??"div",e,e)}var at=s(j(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='244b5c59c0']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","244b5c59c0"),e.appendChild(document.createTextNode('@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._96e6251aad1a6136__badge{border-radius:var(--wpds-border-radius-lg,8px);font-family:var(--wpds-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-font-size-sm,12px);font-weight:var(--wpds-font-weight-regular,400);line-height:var(--wpds-font-line-height-xs,16px);padding-block:var(--wpds-dimension-padding-xs,4px);padding-inline:var(--wpds-dimension-padding-sm,8px)}._99f7158cb520f750__is-high-intent{background-color:var(--wpds-color-bg-surface-error,#f6e6e3);color:var(--wpds-color-fg-content-error,#470000)}.c20ebef2365bc8b7__is-medium-intent{background-color:var(--wpds-color-bg-surface-warning,#fde6bd);color:var(--wpds-color-fg-content-warning,#2e1900)}._365e1626c6202e52__is-low-intent{background-color:var(--wpds-color-bg-surface-caution,#fee994);color:var(--wpds-color-fg-content-caution,#281d00)}._33f8198127ddf4ef__is-stable-intent{background-color:var(--wpds-color-bg-surface-success,#c5f7cc);color:var(--wpds-color-fg-content-success,#002900)}._04c1aca8fc449412__is-informational-intent{background-color:var(--wpds-color-bg-surface-info,#deebfa);color:var(--wpds-color-fg-content-info,#001b4f)}._90726e69d495ec19__is-draft-intent{background-color:var(--wpds-color-bg-surface-neutral-weak,#f0f0f0);color:var(--wpds-color-fg-content-neutral,#1e1e1e)}._898f4a544993bd39__is-none-intent{background-color:var(--wpds-color-bg-surface-neutral,#f8f8f8);color:var(--wpds-color-fg-content-neutral-weak,#6d6d6d)}}')),document.head.appendChild(e)}var ot={badge:"_96e6251aad1a6136__badge","is-high-intent":"_99f7158cb520f750__is-high-intent","is-medium-intent":"c20ebef2365bc8b7__is-medium-intent","is-low-intent":"_365e1626c6202e52__is-low-intent","is-stable-intent":"_33f8198127ddf4ef__is-stable-intent","is-informational-intent":"_04c1aca8fc449412__is-informational-intent","is-draft-intent":"_90726e69d495ec19__is-draft-intent","is-none-intent":"_898f4a544993bd39__is-none-intent"},we=(0,at.forwardRef)(function({children:t,intent:n="none",render:r,className:o,...a},i){return oe({render:r,defaultTagName:"span",ref:i,props:Z(a,{className:A(ot.badge,ot[`is-${n}-intent`],o),children:t})})});var ct=s(j(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='71d20935c2']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","71d20935c2"),e.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._19ce0419607e1896__stack{display:flex}}")),document.head.appendChild(e)}var Ut={stack:"_19ce0419607e1896__stack"},Qt={xs:"var(--wpds-dimension-gap-xs, 4px)",sm:"var(--wpds-dimension-gap-sm, 8px)",md:"var(--wpds-dimension-gap-md, 12px)",lg:"var(--wpds-dimension-gap-lg, 16px)",xl:"var(--wpds-dimension-gap-xl, 24px)","2xl":"var(--wpds-dimension-gap-2xl, 32px)","3xl":"var(--wpds-dimension-gap-3xl, 40px)"},C=(0,ct.forwardRef)(function({direction:t,gap:n,align:r,justify:o,wrap:a,render:i,...l},g){let d={gap:n&&Qt[n],alignItems:r,justifyContent:o,flexDirection:t,flexWrap:a};return oe({render:i,ref:g,props:Z(l,{style:d,className:Ut.stack})})});var lt=s(k(),1),{Fill:dt,Slot:ut}=(0,lt.createSlotFill)("SidebarToggle");var w=s(ne(),1);function ft({headingLevel:e=2,breadcrumbs:t,badges:n,title:r,subTitle:o,actions:a,showSidebarToggle:i=!0}){let l=`h${e}`;return(0,w.jsxs)(C,{direction:"column",className:"admin-ui-page__header",render:(0,w.jsx)("header",{}),children:[(0,w.jsxs)(C,{direction:"row",justify:"space-between",gap:"sm",children:[(0,w.jsxs)(C,{direction:"row",gap:"sm",align:"center",justify:"start",children:[i&&(0,w.jsx)(ut,{bubblesVirtually:!0,className:"admin-ui-page__sidebar-toggle-slot"}),r&&(0,w.jsx)(l,{className:"admin-ui-page__header-title",children:r}),t,n]}),(0,w.jsx)(C,{direction:"row",gap:"sm",style:{width:"auto",flexShrink:0},className:"admin-ui-page__header-actions",align:"center",children:a})]}),o&&(0,w.jsx)("p",{className:"admin-ui-page__header-subtitle",children:o})]})}var F=s(ne(),1);function pt({headingLevel:e,breadcrumbs:t,badges:n,title:r,subTitle:o,children:a,className:i,actions:l,hasPadding:g=!1,showSidebarToggle:d=!0}){let u=A("admin-ui-page",i);return(0,F.jsxs)(Ze,{className:u,ariaLabel:r,children:[(r||t||n)&&(0,F.jsx)(ft,{headingLevel:e,breadcrumbs:t,badges:n,title:r,subTitle:o,actions:l,showSidebarToggle:d}),g?(0,F.jsx)("div",{className:"admin-ui-page__content has-padding",children:a}):a]})}pt.SidebarToggleFill=dt;var Le=pt;var y=s(k()),Mt=s(ae()),Ot=s(j()),N=s(I()),Dt=s(ie());import{privateApis as cn}from"@wordpress/connectors";if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='eb296b7e99']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","eb296b7e99"),e.appendChild(document.createTextNode(".connectors-page{box-sizing:border-box;margin:0 auto;max-width:680px;padding:24px;width:100%}.connectors-page .components-item{background:#fff;border:1px solid #ddd;border-radius:8px;overflow:hidden;padding:20px;scroll-margin-top:120px}.connectors-page .connector-settings__error{color:#cc1818}.connectors-page .connector-settings .components-text-control__input{font-family:monospace;scroll-margin-top:120px}.connectors-page--empty{align-items:center;display:flex;flex-direction:column;flex-grow:1;gap:32px;justify-content:center;text-align:center}.connectors-page .ai-plugin-callout{background:linear-gradient(90deg,#fff9,#fff9),linear-gradient(90deg,#89dcdc,#c7eb5c 46.15%,#a920c1);border-radius:8px;overflow:hidden;padding:24px;padding-inline-end:220px;position:relative}[dir=rtl] .connectors-page .ai-plugin-callout{background:linear-gradient(270deg,#fff9,#fff9),linear-gradient(270deg,#89dcdc,#c7eb5c 46.15%,#a920c1)}.connectors-page .ai-plugin-callout__content{display:flex;flex-direction:column;gap:12px;padding-top:2px}.connectors-page .ai-plugin-callout__content p{font-size:13px;line-height:20px;margin:0}.connectors-page .ai-plugin-callout__actions{align-items:center;display:flex;gap:12px}.connectors-page .ai-plugin-callout__decoration{height:248px;inset-inline-end:8px;position:absolute;top:-15px;width:248px}.connectors-page>p{color:#949494;text-align:center}@media (max-width:680px){.connectors-page .ai-plugin-callout{padding:12px;padding-inline-end:84px}.connectors-page .ai-plugin-callout__decoration{height:134px;inset-inline-end:4px;top:-8px;width:134px}}@media (max-width:480px){.connectors-page{padding:8px}.connectors-page .components-item{padding:12px}.connectors-page .components-item>.components-v-stack>.components-h-stack:first-child svg{height:32px;width:32px}.connectors-page .components-item>.components-v-stack>.components-h-stack:first-child>.components-h-stack:last-child{align-items:flex-end;flex-direction:column}}")),document.head.appendChild(e)}var ee=s(k()),Me=s(ie()),de=s(ae()),L=s(j()),m=s(I());import{speak as le}from"@wordpress/a11y";var ce=s(k()),$=s(j()),xe=s(I());import{__experimentalRegisterConnector as Jt,__experimentalConnectorItem as Ft,__experimentalDefaultConnectorSettings as _t}from"@wordpress/connectors";var ye=s(ie()),se=s(ae()),_=s(j()),c=s(I());import{speak as V}from"@wordpress/a11y";function vt({pluginSlug:e,settingName:t,connectorName:n,isInstalled:r,isActivated:o,keySource:a="none",initialIsConnected:i=!1}){let[l,g]=(0,_.useState)(!1),[d,u]=(0,_.useState)(!1),[v,z]=(0,_.useState)(i),[f,M]=(0,_.useState)(null),{derivedPluginStatus:W,canManagePlugins:O,currentApiKey:h,canInstallPlugins:b}=(0,se.useSelect)(G=>{let q=G(ye.store),K=q.getEntityRecord("root","site")?.[t]??"",T=!!q.canUser("create",{kind:"root",name:"plugin"});if(!e)return{derivedPluginStatus:q.hasFinishedResolution("getEntityRecord",["root","site"])?"active":"checking",canManagePlugins:void 0,currentApiKey:K,canInstallPlugins:T};let He=`${e}/plugin`,Re=q.getEntityRecord("root","plugin",He);if(!q.hasFinishedResolution("getEntityRecord",["root","plugin",He]))return{derivedPluginStatus:"checking",canManagePlugins:void 0,currentApiKey:K,canInstallPlugins:T};if(Re)return{derivedPluginStatus:Re.status==="active"?"active":"inactive",canManagePlugins:!0,currentApiKey:K,canInstallPlugins:T};let fe="not-installed";return o?fe="active":r&&(fe="inactive"),{derivedPluginStatus:fe,canManagePlugins:!1,currentApiKey:K,canInstallPlugins:T}},[e,t,r,o]),p=f??W,x=O,X=p==="active"&&v||f==="active"&&!!h,{saveEntityRecord:P,invalidateResolution:H}=(0,se.useDispatch)(ye.store),Y=async()=>{if(e){u(!0);try{await P("root","plugin",{slug:e,status:"active"},{throwOnError:!0}),M("active"),H("getEntityRecord",["root","site"]),g(!0),V((0,c.sprintf)((0,c.__)("Plugin for %s installed and activated successfully."),n))}catch{V((0,c.sprintf)((0,c.__)("Failed to install plugin for %s."),n),"assertive")}finally{u(!1)}}},S=async()=>{if(e){u(!0);try{await P("root","plugin",{plugin:`${e}/plugin`,status:"active"},{throwOnError:!0}),M("active"),H("getEntityRecord",["root","site"]),g(!0),V((0,c.sprintf)((0,c.__)("Plugin for %s activated successfully."),n))}catch{V((0,c.sprintf)((0,c.__)("Failed to activate plugin for %s."),n),"assertive")}finally{u(!1)}}};return{pluginStatus:p,canInstallPlugins:b,canActivatePlugins:x,isExpanded:l,setIsExpanded:g,isBusy:d,isConnected:X,currentApiKey:h,keySource:a,handleButtonClick:()=>{if(p==="not-installed"){if(b===!1)return;Y()}else if(p==="inactive"){if(x===!1)return;S()}else g(!l)},getButtonLabel:()=>{if(d)return p==="not-installed"?(0,c.__)("Installing\u2026"):(0,c.__)("Activating\u2026");if(l)return(0,c.__)("Cancel");if(X)return(0,c.__)("Edit");switch(p){case"checking":return(0,c.__)("Checking\u2026");case"not-installed":return(0,c.__)("Install");case"inactive":return(0,c.__)("Activate");case"active":return(0,c.__)("Set up")}},saveApiKey:async G=>{let q=h;try{let T=(await P("root","site",{[t]:G},{throwOnError:!0}))?.[t];if(G&&(T===q||!T))throw new Error("It was not possible to connect to the provider using this key.");z(!0),V((0,c.sprintf)((0,c.__)("%s connected successfully."),n))}catch(te){throw console.error("Failed to save API key:",te),te}},removeApiKey:async()=>{try{await P("root","site",{[t]:""},{throwOnError:!0}),z(!1),V((0,c.sprintf)((0,c.__)("%s disconnected."),n))}catch(G){throw console.error("Failed to remove API key:",G),V((0,c.sprintf)((0,c.__)("Failed to disconnect %s."),n),"assertive"),G}}}}var ht=()=>React.createElement("svg",{width:"40",height:"40",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},React.createElement("path",{d:"M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364l2.0201-1.1685a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.4043-.6813zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z",fill:"currentColor"})),bt=()=>React.createElement("svg",{width:"40",height:"40",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},React.createElement("path",{d:"M6.2 21.024L12.416 17.536L12.52 17.232L12.416 17.064H12.112L11.072 17L7.52 16.904L4.44 16.776L1.456 16.616L0.704 16.456L0 15.528L0.072 15.064L0.704 14.64L1.608 14.72L3.608 14.856L6.608 15.064L8.784 15.192L12.008 15.528H12.52L12.592 15.32L12.416 15.192L12.28 15.064L9.176 12.96L5.816 10.736L4.056 9.456L3.104 8.808L2.624 8.2L2.416 6.872L3.28 5.92L4.44 6L4.736 6.08L5.912 6.984L8.424 8.928L11.704 11.344L12.184 11.744L12.376 11.608L12.4 11.512L12.184 11.152L10.4 7.928L8.496 4.648L7.648 3.288L7.424 2.472C7.344 2.136 7.288 1.856 7.288 1.512L8.272 0.176L8.816 0L10.128 0.176L10.68 0.656L11.496 2.52L12.816 5.456L14.864 9.448L15.464 10.632L15.784 11.728L15.904 12.064H16.112V11.872L16.28 9.624L16.592 6.864L16.896 3.312L17 2.312L17.496 1.112L18.48 0.464L19.248 0.832L19.88 1.736L19.792 2.32L19.416 4.76L18.68 8.584L18.2 11.144H18.48L18.8 10.824L20.096 9.104L22.272 6.384L23.232 5.304L24.352 4.112L25.072 3.544H26.432L27.432 5.032L26.984 6.568L25.584 8.344L24.424 9.848L22.76 12.088L21.72 13.88L21.816 14.024L22.064 14L25.824 13.2L27.856 12.832L30.28 12.416L31.376 12.928L31.496 13.448L31.064 14.512L28.472 15.152L25.432 15.76L20.904 16.832L20.848 16.872L20.912 16.952L22.952 17.144L23.824 17.192H25.96L29.936 17.488L30.976 18.176L31.6 19.016L31.496 19.656L29.896 20.472L27.736 19.96L22.696 18.76L20.968 18.328H20.728V18.472L22.168 19.88L24.808 22.264L28.112 25.336L28.28 26.096L27.856 26.696L27.408 26.632L24.504 24.448L23.384 23.464L20.848 21.328H20.68V21.552L21.264 22.408L24.352 27.048L24.512 28.472L24.288 28.936L23.488 29.216L22.608 29.056L20.8 26.52L18.936 23.664L17.432 21.104L17.248 21.208L16.36 30.768L15.944 31.256L14.984 31.624L14.184 31.016L13.76 30.032L14.184 28.088L14.696 25.552L15.112 23.536L15.488 21.032L15.712 20.2L15.696 20.144L15.512 20.168L13.624 22.76L10.752 26.64L8.48 29.072L7.936 29.288L6.992 28.8L7.08 27.928L7.608 27.152L10.752 23.152L12.648 20.672L13.872 19.24L13.864 19.032H13.792L5.44 24.456L3.952 24.648L3.312 24.048L3.392 23.064L3.696 22.744L6.208 21.016L6.2 21.024Z",fill:"#D97757"})),Pt=()=>React.createElement("svg",{width:"40",height:"40",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},React.createElement("path",{d:"M0 4C0 1.79086 1.79086 0 4 0H28C30.2091 0 32 1.79086 32 4V28C32 30.2091 30.2091 32 28 32H4C1.79086 32 0 30.2091 0 28V4Z",fill:"#F0F0F0"}),React.createElement("path",{d:"M14.5 8V12H17.5V8H19V12H20.5C20.7652 12 21.0196 12.1054 21.2071 12.2929C21.3946 12.4804 21.5 12.7348 21.5 13V17L18.5 21V23C18.5 23.2652 18.3946 23.5196 18.2071 23.7071C18.0196 23.8946 17.7652 24 17.5 24H14.5C14.2348 24 13.9804 23.8946 13.7929 23.7071C13.6054 23.5196 13.5 23.2652 13.5 23V21L10.5 17V13C10.5 12.7348 10.6054 12.4804 10.7929 12.2929C10.9804 12.1054 11.2348 12 11.5 12H13V8H14.5ZM15 20.5V22.5H17V20.5L20 16.5V13.5H12V16.5L15 20.5Z",fill:"#949494"})),wt=()=>React.createElement("svg",{width:"40",height:"40",style:{flex:"none",lineHeight:1},viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},React.createElement("path",{d:"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z",fill:"#3186FF"}),React.createElement("path",{d:"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z",fill:"url(#lobe-icons-gemini-fill-0)"}),React.createElement("path",{d:"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z",fill:"url(#lobe-icons-gemini-fill-1)"}),React.createElement("path",{d:"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z",fill:"url(#lobe-icons-gemini-fill-2)"}),React.createElement("defs",null,React.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",id:"lobe-icons-gemini-fill-0",x1:"7",x2:"11",y1:"15.5",y2:"12"},React.createElement("stop",{stopColor:"#08B962"}),React.createElement("stop",{offset:"1",stopColor:"#08B962",stopOpacity:"0"})),React.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",id:"lobe-icons-gemini-fill-1",x1:"8",x2:"11.5",y1:"5.5",y2:"11"},React.createElement("stop",{stopColor:"#F94543"}),React.createElement("stop",{offset:"1",stopColor:"#F94543",stopOpacity:"0"})),React.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",id:"lobe-icons-gemini-fill-2",x1:"3.5",x2:"17.5",y1:"13.5",y2:"12"},React.createElement("stop",{stopColor:"#FABC12"}),React.createElement("stop",{offset:".46",stopColor:"#FABC12",stopOpacity:"0"}))));function Ge(){try{return JSON.parse(document.getElementById("wp-script-module-data-options-connectors-wp-admin")?.textContent??"")?.connectors??{}}catch{return{}}}var $t={google:wt,openai:ht,anthropic:bt};function en(e,t){if(t)return React.createElement("img",{src:t,alt:"",width:40,height:40});let n=$t[e];return React.createElement(n||Pt,null)}var tn=()=>React.createElement("span",{style:{color:"#345b37",backgroundColor:"#eff8f0",padding:"4px 12px",borderRadius:"2px",fontSize:"13px",fontWeight:500,whiteSpace:"nowrap"}},(0,xe.__)("Connected")),nn=()=>React.createElement(we,null,(0,xe.__)("Not available"));function rn({label:e,description:t,pluginSlug:n,settingName:r,helpUrl:o,icon:a,isInstalled:i,isActivated:l,keySource:g,initialIsConnected:d}){let u;try{o&&(u=new URL(o).hostname)}catch{}let{pluginStatus:v,canInstallPlugins:z,canActivatePlugins:f,isExpanded:M,setIsExpanded:W,isBusy:O,isConnected:h,currentApiKey:b,keySource:p,handleButtonClick:x,getButtonLabel:X,saveApiKey:P,removeApiKey:H}=vt({pluginSlug:n,settingName:r,connectorName:e,isInstalled:i,isActivated:l,keySource:g,initialIsConnected:d}),Y=p==="env"||p==="constant",S=v==="not-installed"&&z===!1||v==="inactive"&&f===!1,je=!S,ue=(0,$.useRef)(null),R=(0,$.useRef)(!1);(0,$.useEffect)(()=>{R.current&&!O&&(R.current=!1,ue.current?.focus())},[O,M,h]);let Be=()=>{(v==="not-installed"||v==="inactive")&&(R.current=!0),x()};return React.createElement(Ft,{className:n?`connector-item--${n}`:void 0,icon:a,name:e,description:t,actionArea:React.createElement(ce.__experimentalHStack,{spacing:3,expanded:!1},h&&React.createElement(tn,null),S&&React.createElement(nn,null),je&&React.createElement(ce.Button,{ref:ue,variant:M||h?"tertiary":"secondary",size:"compact",onClick:Be,disabled:v==="checking"||O,isBusy:O},X()))},M&&v==="active"&&React.createElement(_t,{key:h?"connected":"setup",initialValue:Y?"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022":b,helpUrl:o,helpLabel:u,readOnly:h||Y,keySource:p,onRemove:Y?void 0:async()=>{R.current=!0;try{await H()}catch{R.current=!1}},onSave:async G=>{await P(G),R.current=!0,W(!1)}}))}function Lt(){let e=Ge(),t=n=>n.replace(/[^a-z0-9-]/gi,"-");for(let[n,r]of Object.entries(e)){let{authentication:o}=r;if(r.type!=="ai_provider"||o.method!=="api_key")continue;let a=`${t(r.type)}/${t(n)}`;Jt(a,{label:r.name,description:r.description,icon:en(n,r.logoUrl),render:i=>React.createElement(rn,{...i,pluginSlug:r.plugin?.slug,settingName:o.settingName,helpUrl:o.credentialsUrl??void 0,isInstalled:r.plugin?.isInstalled,isActivated:r.plugin?.isActivated,keySource:o.keySource,initialIsConnected:o.isConnected})})}}function yt(){return React.createElement("div",{className:"ai-plugin-callout__decoration","aria-hidden":"true"},React.createElement("svg",{viewBox:"0 0 248 248",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",focusable:"false",style:{width:"100%",height:"100%"}},React.createElement("image",{href:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPgAAAD4CAYAAADB0SsLAACAAElEQVR4XuzdB7hlRZEH8D73zRBniJLDzBAEVFQMKCaCWXENa1oTYM45hwXEtOa0ZgVzWnPOBHPWVcxgzjnrGvb/O91n5s5lZnjAe4Bw6vvqO3XPPed0rO6q6urqUkYYYYQRRhhhhBFGGGGEEUYYYYQRRhhhhBFGGGGEEUYYYYQRRhhhhBFGGGGEEUYYYYQRRhhhhBFGGGGEEUYYYYQRRhhhhBFGGGGEEUYYYYQRRhhhhBFGGGGEEUYYYYQRRhhhhBFGGGGEEUYYYYQRRhhhhBFGGGGEEUYYYYQRRhhhhBFGGGGEEUYYYYQRRhhhhBFGGGGEEUaYD3RdtxY9/XuEEUb4F4aBoWdxhBFG+BeHxsxg0+BmwSXBrYPbBTfOI3Dz4NKZV0cYYYTFhMlkskGcm5tbC6f/m5mtlwavGLxacKt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ke3Pj5K4dj2fB6ag6wJw28HlzeObze+5iSyR6o9tKi3qWket9DOeu2er9rbz7+v6GhoaGhoaGhoeEXHGMVf2wHL4SHsWq9G5OgoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaFhDeL/AbL/6dpoj+OHAAAAAElFTkSuQmCC",width:"248",height:"248",style:{mixBlendMode:"multiply"}}),React.createElement("rect",{x:"184.055",y:"54.995",width:"2.187",height:"2.187"}),React.createElement("rect",{x:"170.059",y:"44.06",width:"2.187",height:"2.187"}),React.createElement("rect",{x:"200.238",y:"77.302",width:"2.187",height:"2.187"}),React.createElement("rect",{x:"212.048",y:"87.8",width:"2.187",height:"2.187"}),React.createElement("rect",{x:"206.799",y:"83.425",width:"2.187",height:"2.187"}),React.createElement("rect",{x:"204.175",y:"85.612",width:"2.187",height:"2.187"}),React.createElement("rect",{x:"219.046",y:"103.108",width:"2.187",height:"2.187"}),React.createElement("rect",{x:"154.751",y:"30.064",width:"2.187",height:"2.187"}),React.createElement("rect",{x:"188.866",y:"63.742",width:"2.187",height:"2.187"}),React.createElement("rect",{x:"148.189",y:"34",width:"2.187",height:"2.187"}),React.createElement("rect",{x:"134.051",y:"31.707",width:"2.187",height:"2.187"}),React.createElement("rect",{x:"126.124",y:"24.771",width:"2.187",height:"2.187"}),React.createElement("rect",{x:"115.385",y:"29.19",width:"2.187",height:"2.187"}),React.createElement("rect",{x:"95.702",y:"31.376",width:"2.187",height:"2.187"}),React.createElement("rect",{x:"91.766",y:"27.002",width:"2.187",height:"2.187"}),React.createElement("rect",{x:"90.454",y:"32.688",width:"2.187",height:"2.187"}),React.createElement("rect",{x:"184.389",y:"45.58",width:"2.187",height:"2.187"}),React.createElement("rect",{x:"162.185",y:"41.873",width:"2.187",height:"2.187"})))}var on="ai",ze="ai/ai",an="https://wordpress.org/plugins/ai/",Oe=Object.values(Ge()),sn=Oe.some(e=>e.type==="ai_provider"),xt=[];for(let e of Oe)e.type==="ai_provider"&&e.authentication.method==="api_key"&&xt.push(e.authentication.settingName);function Gt(){let[e,t]=(0,L.useState)(!1),[n,r]=(0,L.useState)(!1),o=(0,L.useRef)(null);(0,L.useEffect)(()=>{n&&o.current?.focus()},[n]);let a=(0,L.useRef)(Oe.some(b=>b.type==="ai_provider"&&b.authentication.method==="api_key"&&b.authentication.isConnected)).current,{pluginStatus:i,canInstallPlugins:l,canManagePlugins:g,hasConnectedProvider:d}=(0,de.useSelect)(b=>{let p=b(Me.store),x=!!p.canUser("create",{kind:"root",name:"plugin"}),X=p.getEntityRecord("root","site"),P=a||xt.some(S=>!!X?.[S]),H=p.getEntityRecord("root","plugin",ze);return p.hasFinishedResolution("getEntityRecord",["root","plugin",ze])?H?{pluginStatus:H.status==="active"?"active":"inactive",canInstallPlugins:x,canManagePlugins:!0,hasConnectedProvider:P}:{pluginStatus:"not-installed",canInstallPlugins:x,canManagePlugins:x,hasConnectedProvider:P}:{pluginStatus:"checking",canInstallPlugins:x,canManagePlugins:void 0,hasConnectedProvider:P}},[]),{saveEntityRecord:u}=(0,de.useDispatch)(Me.store),v=async()=>{t(!0);try{await u("root","plugin",{slug:on,status:"active"},{throwOnError:!0}),r(!0),le((0,m.__)("AI plugin installed and activated successfully."))}catch{le((0,m.__)("Failed to install the AI plugin."),"assertive")}finally{t(!1)}},z=async()=>{t(!0);try{await u("root","plugin",{plugin:ze,status:"active"},{throwOnError:!0}),r(!0),le((0,m.__)("AI plugin activated successfully."))}catch{le((0,m.__)("Failed to activate the AI plugin."),"assertive")}finally{t(!1)}};if(!sn||i==="checking"||i==="active"&&a&&!n||i==="not-installed"&&l===!1||i==="inactive"&&g===!1)return null;let f=i==="active"&&!d,M=i==="active"&&d&&(!a||n),W=i==="not-installed"||i==="inactive",O=()=>M?(0,m.__)("The AI plugin is ready to use. You can use it to generate featured images, alt text, titles, excerpts and more."):f?(0,m.__)("The AI plugin is installed. Connect a provider below to generate featured images, alt text, titles, excerpts, and more."):(0,m.__)("The AI plugin can use your connectors to generate featured images, alt text, titles, excerpts and more."),h=()=>i==="not-installed"?{label:e?(0,m.__)("Installing\u2026"):(0,m.__)("Install AI Experiments"),disabled:e,onClick:e?void 0:v}:{label:e?(0,m.__)("Activating\u2026"):(0,m.__)("Activate AI Experiments"),disabled:e,onClick:e?void 0:z};return React.createElement("div",{className:"ai-plugin-callout"},React.createElement("div",{className:"ai-plugin-callout__content"},React.createElement("p",null,(0,L.createInterpolateElement)(O(),{strong:React.createElement("strong",null)})),React.createElement("div",{className:"ai-plugin-callout__actions"},W?React.createElement(ee.Button,{ref:o,variant:"primary",size:"compact",isBusy:e,disabled:h().disabled,accessibleWhenDisabled:!0,onClick:h().onClick},h().label):n&&React.createElement(ee.Button,{ref:o,variant:"secondary",size:"compact",disabled:!0,accessibleWhenDisabled:!0},(0,m.__)("AI Experiments enabled")),React.createElement(ee.ExternalLink,{href:an},(0,m.__)("Learn more")))),React.createElement(yt,null))}var zt=s(st()),{lock:Tr,unlock:De}=(0,zt.__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/routes");var{store:ln}=De(cn);Lt();function dn(){let{connectors:e,canInstallPlugins:t}=(0,Mt.useSelect)(r=>({connectors:De(r(ln)).getConnectors(),canInstallPlugins:r(Dt.store).canUser("create",{kind:"root",name:"plugin"})}),[]),n=e.length===0;return React.createElement(Le,{title:(0,N.__)("Connectors"),headingLevel:1,subTitle:(0,N.__)("All of your API keys and credentials are stored here and shared across plugins. Configure once and use everywhere.")},React.createElement("div",{className:`connectors-page${n?" connectors-page--empty":""}`},n?React.createElement(y.__experimentalVStack,{alignment:"center",spacing:3,style:{maxWidth:480}},React.createElement(y.__experimentalVStack,{alignment:"center",spacing:2},React.createElement(y.__experimentalHeading,{level:2,size:15,weight:600},(0,N.__)("No connectors yet")),React.createElement(y.__experimentalText,{size:12},(0,N.__)("Connectors appear here when you install plugins that use external services. Each plugin registers the API keys it needs, and you manage them all in one place."))),React.createElement(y.Button,{variant:"secondary",href:"plugin-install.php"},(0,N.__)("Learn more"))):React.createElement(y.__experimentalVStack,{spacing:3},React.createElement(Gt,null),e.map(r=>r.render?React.createElement(r.render,{key:r.slug,slug:r.slug,label:r.label,description:r.description,icon:r.icon}):null)),t&&React.createElement("p",null,(0,Ot.createInterpolateElement)((0,N.__)("If the connector you need is not listed, search the plugin directory to see if a connector is available."),{a:React.createElement("a",{href:"plugin-install.php?s=connector&tab=search&type=tag"})}))))}function un(){return React.createElement(dn,null)}var fn=un;export{fn as stage}; diff --git a/src/wp-includes/build/routes/connectors-home/route.js b/src/wp-includes/build/routes/connectors-home/route.js new file mode 100644 index 0000000000000..8cd25392685dc --- /dev/null +++ b/src/wp-includes/build/routes/connectors-home/route.js @@ -0,0 +1,63 @@ +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __commonJS = (cb, mod) => function __require() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); + +// package-external:@wordpress/core-data +var require_core_data = __commonJS({ + "package-external:@wordpress/core-data"(exports, module) { + module.exports = window.wp.coreData; + } +}); + +// package-external:@wordpress/data +var require_data = __commonJS({ + "package-external:@wordpress/data"(exports, module) { + module.exports = window.wp.data; + } +}); + +// package-external:@wordpress/i18n +var require_i18n = __commonJS({ + "package-external:@wordpress/i18n"(exports, module) { + module.exports = window.wp.i18n; + } +}); + +// routes/connectors-home/route.ts +var import_core_data = __toESM(require_core_data()); +var import_data = __toESM(require_data()); +var import_i18n = __toESM(require_i18n()); +var route = { + title: () => (0, import_i18n.__)("Connectors"), + loader: async () => { + await (0, import_data.resolveSelect)(import_core_data.store).canUser("create", { + kind: "root", + name: "plugin" + }); + } +}; +export { + route +}; diff --git a/src/wp-includes/build/routes/connectors-home/route.min.asset.php b/src/wp-includes/build/routes/connectors-home/route.min.asset.php new file mode 100644 index 0000000000000..a4b1c340ac926 --- /dev/null +++ b/src/wp-includes/build/routes/connectors-home/route.min.asset.php @@ -0,0 +1 @@ + array('wp-core-data', 'wp-data', 'wp-i18n'), 'version' => 'f3b33cd01621a8692a0f'); \ No newline at end of file diff --git a/src/wp-includes/build/routes/connectors-home/route.min.js b/src/wp-includes/build/routes/connectors-home/route.min.js new file mode 100644 index 0000000000000..332b5b5741f9c --- /dev/null +++ b/src/wp-includes/build/routes/connectors-home/route.min.js @@ -0,0 +1 @@ +var S=Object.create;var p=Object.defineProperty;var _=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var k=Object.getPrototypeOf,v=Object.prototype.hasOwnProperty;var a=(r,o)=>()=>(o||r((o={exports:{}}).exports,o),o.exports);var y=(r,o,e,i)=>{if(o&&typeof o=="object"||typeof o=="function")for(let t of g(o))!v.call(r,t)&&t!==e&&p(r,t,{get:()=>o[t],enumerable:!(i=_(o,t))||i.enumerable});return r};var n=(r,o,e)=>(e=r!=null?S(k(r)):{},y(o||!r||!r.__esModule?p(e,"default",{value:r,enumerable:!0}):e,r));var w=a((D,s)=>{s.exports=window.wp.coreData});var m=a((U,c)=>{c.exports=window.wp.data});var l=a((b,d)=>{d.exports=window.wp.i18n});var x=n(w()),f=n(m()),u=n(l()),h={title:()=>(0,u.__)("Connectors"),loader:async()=>{await(0,f.resolveSelect)(x.store).canUser("create",{kind:"root",name:"plugin"})}};export{h as route}; diff --git a/src/wp-includes/build/routes/font-list/content.js b/src/wp-includes/build/routes/font-list/content.js new file mode 100644 index 0000000000000..72bac46d69beb --- /dev/null +++ b/src/wp-includes/build/routes/font-list/content.js @@ -0,0 +1,15526 @@ +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __require = /* @__PURE__ */ ((x2) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x2, { + get: (a2, b2) => (typeof require !== "undefined" ? require : a2)[b2] +}) : x2)(function(x2) { + if (typeof require !== "undefined") return require.apply(this, arguments); + throw Error('Dynamic require of "' + x2 + '" is not supported'); +}); +var __commonJS = (cb, mod) => function __require4() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); + +// package-external:@wordpress/i18n +var require_i18n = __commonJS({ + "package-external:@wordpress/i18n"(exports, module) { + module.exports = window.wp.i18n; + } +}); + +// package-external:@wordpress/components +var require_components = __commonJS({ + "package-external:@wordpress/components"(exports, module) { + module.exports = window.wp.components; + } +}); + +// vendor-external:react/jsx-runtime +var require_jsx_runtime = __commonJS({ + "vendor-external:react/jsx-runtime"(exports, module) { + module.exports = window.ReactJSXRuntime; + } +}); + +// package-external:@wordpress/element +var require_element = __commonJS({ + "package-external:@wordpress/element"(exports, module) { + module.exports = window.wp.element; + } +}); + +// vendor-external:react +var require_react = __commonJS({ + "vendor-external:react"(exports, module) { + module.exports = window.React; + } +}); + +// package-external:@wordpress/primitives +var require_primitives = __commonJS({ + "package-external:@wordpress/primitives"(exports, module) { + module.exports = window.wp.primitives; + } +}); + +// package-external:@wordpress/private-apis +var require_private_apis = __commonJS({ + "package-external:@wordpress/private-apis"(exports, module) { + module.exports = window.wp.privateApis; + } +}); + +// package-external:@wordpress/compose +var require_compose = __commonJS({ + "package-external:@wordpress/compose"(exports, module) { + module.exports = window.wp.compose; + } +}); + +// package-external:@wordpress/editor +var require_editor = __commonJS({ + "package-external:@wordpress/editor"(exports, module) { + module.exports = window.wp.editor; + } +}); + +// package-external:@wordpress/core-data +var require_core_data = __commonJS({ + "package-external:@wordpress/core-data"(exports, module) { + module.exports = window.wp.coreData; + } +}); + +// package-external:@wordpress/data +var require_data = __commonJS({ + "package-external:@wordpress/data"(exports, module) { + module.exports = window.wp.data; + } +}); + +// package-external:@wordpress/blocks +var require_blocks = __commonJS({ + "package-external:@wordpress/blocks"(exports, module) { + module.exports = window.wp.blocks; + } +}); + +// package-external:@wordpress/block-editor +var require_block_editor = __commonJS({ + "package-external:@wordpress/block-editor"(exports, module) { + module.exports = window.wp.blockEditor; + } +}); + +// package-external:@wordpress/style-engine +var require_style_engine = __commonJS({ + "package-external:@wordpress/style-engine"(exports, module) { + module.exports = window.wp.styleEngine; + } +}); + +// node_modules/fast-deep-equal/es6/index.js +var require_es6 = __commonJS({ + "node_modules/fast-deep-equal/es6/index.js"(exports, module) { + "use strict"; + module.exports = function equal(a2, b2) { + if (a2 === b2) return true; + if (a2 && b2 && typeof a2 == "object" && typeof b2 == "object") { + if (a2.constructor !== b2.constructor) return false; + var length, i2, keys; + if (Array.isArray(a2)) { + length = a2.length; + if (length != b2.length) return false; + for (i2 = length; i2-- !== 0; ) + if (!equal(a2[i2], b2[i2])) return false; + return true; + } + if (a2 instanceof Map && b2 instanceof Map) { + if (a2.size !== b2.size) return false; + for (i2 of a2.entries()) + if (!b2.has(i2[0])) return false; + for (i2 of a2.entries()) + if (!equal(i2[1], b2.get(i2[0]))) return false; + return true; + } + if (a2 instanceof Set && b2 instanceof Set) { + if (a2.size !== b2.size) return false; + for (i2 of a2.entries()) + if (!b2.has(i2[0])) return false; + return true; + } + if (ArrayBuffer.isView(a2) && ArrayBuffer.isView(b2)) { + length = a2.length; + if (length != b2.length) return false; + for (i2 = length; i2-- !== 0; ) + if (a2[i2] !== b2[i2]) return false; + return true; + } + if (a2.constructor === RegExp) return a2.source === b2.source && a2.flags === b2.flags; + if (a2.valueOf !== Object.prototype.valueOf) return a2.valueOf() === b2.valueOf(); + if (a2.toString !== Object.prototype.toString) return a2.toString() === b2.toString(); + keys = Object.keys(a2); + length = keys.length; + if (length !== Object.keys(b2).length) return false; + for (i2 = length; i2-- !== 0; ) + if (!Object.prototype.hasOwnProperty.call(b2, keys[i2])) return false; + for (i2 = length; i2-- !== 0; ) { + var key = keys[i2]; + if (!equal(a2[key], b2[key])) return false; + } + return true; + } + return a2 !== a2 && b2 !== b2; + }; + } +}); + +// node_modules/deepmerge/dist/cjs.js +var require_cjs = __commonJS({ + "node_modules/deepmerge/dist/cjs.js"(exports, module) { + "use strict"; + var isMergeableObject = function isMergeableObject2(value) { + return isNonNullObject(value) && !isSpecial(value); + }; + function isNonNullObject(value) { + return !!value && typeof value === "object"; + } + function isSpecial(value) { + var stringValue = Object.prototype.toString.call(value); + return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value); + } + var canUseSymbol = typeof Symbol === "function" && Symbol.for; + var REACT_ELEMENT_TYPE = canUseSymbol ? /* @__PURE__ */ Symbol.for("react.element") : 60103; + function isReactElement(value) { + return value.$$typeof === REACT_ELEMENT_TYPE; + } + function emptyTarget(val) { + return Array.isArray(val) ? [] : {}; + } + function cloneUnlessOtherwiseSpecified(value, options) { + return options.clone !== false && options.isMergeableObject(value) ? deepmerge2(emptyTarget(value), value, options) : value; + } + function defaultArrayMerge(target, source, options) { + return target.concat(source).map(function(element) { + return cloneUnlessOtherwiseSpecified(element, options); + }); + } + function getMergeFunction(key, options) { + if (!options.customMerge) { + return deepmerge2; + } + var customMerge = options.customMerge(key); + return typeof customMerge === "function" ? customMerge : deepmerge2; + } + function getEnumerableOwnPropertySymbols(target) { + return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) { + return Object.propertyIsEnumerable.call(target, symbol); + }) : []; + } + function getKeys(target) { + return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target)); + } + function propertyIsOnObject(object, property) { + try { + return property in object; + } catch (_) { + return false; + } + } + function propertyIsUnsafe(target, key) { + return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key)); + } + function mergeObject(target, source, options) { + var destination = {}; + if (options.isMergeableObject(target)) { + getKeys(target).forEach(function(key) { + destination[key] = cloneUnlessOtherwiseSpecified(target[key], options); + }); + } + getKeys(source).forEach(function(key) { + if (propertyIsUnsafe(target, key)) { + return; + } + if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) { + destination[key] = getMergeFunction(key, options)(target[key], source[key], options); + } else { + destination[key] = cloneUnlessOtherwiseSpecified(source[key], options); + } + }); + return destination; + } + function deepmerge2(target, source, options) { + options = options || {}; + options.arrayMerge = options.arrayMerge || defaultArrayMerge; + options.isMergeableObject = options.isMergeableObject || isMergeableObject; + options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified; + var sourceIsArray = Array.isArray(source); + var targetIsArray = Array.isArray(target); + var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray; + if (!sourceAndTargetTypesMatch) { + return cloneUnlessOtherwiseSpecified(source, options); + } else if (sourceIsArray) { + return options.arrayMerge(target, source, options); + } else { + return mergeObject(target, source, options); + } + } + deepmerge2.all = function deepmergeAll(array, options) { + if (!Array.isArray(array)) { + throw new Error("first argument should be an array"); + } + return array.reduce(function(prev, next) { + return deepmerge2(prev, next, options); + }, {}); + }; + var deepmerge_1 = deepmerge2; + module.exports = deepmerge_1; + } +}); + +// package-external:@wordpress/keycodes +var require_keycodes = __commonJS({ + "package-external:@wordpress/keycodes"(exports, module) { + module.exports = window.wp.keycodes; + } +}); + +// package-external:@wordpress/api-fetch +var require_api_fetch = __commonJS({ + "package-external:@wordpress/api-fetch"(exports, module) { + module.exports = window.wp.apiFetch; + } +}); + +// package-external:@wordpress/date +var require_date = __commonJS({ + "package-external:@wordpress/date"(exports, module) { + module.exports = window.wp.date; + } +}); + +// node_modules/clsx/dist/clsx.mjs +function r(e2) { + var t3, f2, n2 = ""; + if ("string" == typeof e2 || "number" == typeof e2) n2 += e2; + else if ("object" == typeof e2) if (Array.isArray(e2)) { + var o3 = e2.length; + for (t3 = 0; t3 < o3; t3++) e2[t3] && (f2 = r(e2[t3])) && (n2 && (n2 += " "), n2 += f2); + } else for (f2 in e2) e2[f2] && (n2 && (n2 += " "), n2 += f2); + return n2; +} +function clsx() { + for (var e2, t3, f2 = 0, n2 = "", o3 = arguments.length; f2 < o3; f2++) (e2 = arguments[f2]) && (t3 = r(e2)) && (n2 && (n2 += " "), n2 += t3); + return n2; +} +var clsx_default = clsx; + +// packages/admin-ui/build-module/navigable-region/index.mjs +var import_element = __toESM(require_element(), 1); +var import_jsx_runtime = __toESM(require_jsx_runtime(), 1); +var NavigableRegion = (0, import_element.forwardRef)( + ({ children, className, ariaLabel, as: Tag = "div", ...props }, ref) => { + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + Tag, + { + ref, + className: clsx_default("admin-ui-navigable-region", className), + "aria-label": ariaLabel, + role: "region", + tabIndex: "-1", + ...props, + children + } + ); + } +); +NavigableRegion.displayName = "NavigableRegion"; +var navigable_region_default = NavigableRegion; + +// node_modules/@base-ui/utils/esm/useRefWithInit.js +var React2 = __toESM(require_react(), 1); +var UNINITIALIZED = {}; +function useRefWithInit(init, initArg) { + const ref = React2.useRef(UNINITIALIZED); + if (ref.current === UNINITIALIZED) { + ref.current = init(initArg); + } + return ref; +} + +// node_modules/@base-ui/react/esm/utils/useRenderElement.js +var React5 = __toESM(require_react(), 1); + +// node_modules/@base-ui/utils/esm/useMergedRefs.js +function useMergedRefs(a2, b2, c2, d2) { + const forkRef = useRefWithInit(createForkRef).current; + if (didChange(forkRef, a2, b2, c2, d2)) { + update(forkRef, [a2, b2, c2, d2]); + } + return forkRef.callback; +} +function useMergedRefsN(refs) { + const forkRef = useRefWithInit(createForkRef).current; + if (didChangeN(forkRef, refs)) { + update(forkRef, refs); + } + return forkRef.callback; +} +function createForkRef() { + return { + callback: null, + cleanup: null, + refs: [] + }; +} +function didChange(forkRef, a2, b2, c2, d2) { + return forkRef.refs[0] !== a2 || forkRef.refs[1] !== b2 || forkRef.refs[2] !== c2 || forkRef.refs[3] !== d2; +} +function didChangeN(forkRef, newRefs) { + return forkRef.refs.length !== newRefs.length || forkRef.refs.some((ref, index) => ref !== newRefs[index]); +} +function update(forkRef, refs) { + forkRef.refs = refs; + if (refs.every((ref) => ref == null)) { + forkRef.callback = null; + return; + } + forkRef.callback = (instance) => { + if (forkRef.cleanup) { + forkRef.cleanup(); + forkRef.cleanup = null; + } + if (instance != null) { + const cleanupCallbacks = Array(refs.length).fill(null); + for (let i2 = 0; i2 < refs.length; i2 += 1) { + const ref = refs[i2]; + if (ref == null) { + continue; + } + switch (typeof ref) { + case "function": { + const refCleanup = ref(instance); + if (typeof refCleanup === "function") { + cleanupCallbacks[i2] = refCleanup; + } + break; + } + case "object": { + ref.current = instance; + break; + } + default: + } + } + forkRef.cleanup = () => { + for (let i2 = 0; i2 < refs.length; i2 += 1) { + const ref = refs[i2]; + if (ref == null) { + continue; + } + switch (typeof ref) { + case "function": { + const cleanupCallback = cleanupCallbacks[i2]; + if (typeof cleanupCallback === "function") { + cleanupCallback(); + } else { + ref(null); + } + break; + } + case "object": { + ref.current = null; + break; + } + default: + } + } + }; + } + }; +} + +// node_modules/@base-ui/utils/esm/getReactElementRef.js +var React4 = __toESM(require_react(), 1); + +// node_modules/@base-ui/utils/esm/reactVersion.js +var React3 = __toESM(require_react(), 1); +var majorVersion = parseInt(React3.version, 10); +function isReactVersionAtLeast(reactVersionToCheck) { + return majorVersion >= reactVersionToCheck; +} + +// node_modules/@base-ui/utils/esm/getReactElementRef.js +function getReactElementRef(element) { + if (!/* @__PURE__ */ React4.isValidElement(element)) { + return null; + } + const reactElement = element; + const propsWithRef = reactElement.props; + return (isReactVersionAtLeast(19) ? propsWithRef?.ref : reactElement.ref) ?? null; +} + +// node_modules/@base-ui/utils/esm/mergeObjects.js +function mergeObjects(a2, b2) { + if (a2 && !b2) { + return a2; + } + if (!a2 && b2) { + return b2; + } + if (a2 || b2) { + return { + ...a2, + ...b2 + }; + } + return void 0; +} + +// node_modules/@base-ui/react/esm/utils/getStateAttributesProps.js +function getStateAttributesProps(state, customMapping) { + const props = {}; + for (const key in state) { + const value = state[key]; + if (customMapping?.hasOwnProperty(key)) { + const customProps = customMapping[key](value); + if (customProps != null) { + Object.assign(props, customProps); + } + continue; + } + if (value === true) { + props[`data-${key.toLowerCase()}`] = ""; + } else if (value) { + props[`data-${key.toLowerCase()}`] = value.toString(); + } + } + return props; +} + +// node_modules/@base-ui/react/esm/utils/resolveClassName.js +function resolveClassName(className, state) { + return typeof className === "function" ? className(state) : className; +} + +// node_modules/@base-ui/react/esm/utils/resolveStyle.js +function resolveStyle(style, state) { + return typeof style === "function" ? style(state) : style; +} + +// node_modules/@base-ui/react/esm/merge-props/mergeProps.js +var EMPTY_PROPS = {}; +function mergeProps(a2, b2, c2, d2, e2) { + let merged = { + ...resolvePropsGetter(a2, EMPTY_PROPS) + }; + if (b2) { + merged = mergeOne(merged, b2); + } + if (c2) { + merged = mergeOne(merged, c2); + } + if (d2) { + merged = mergeOne(merged, d2); + } + if (e2) { + merged = mergeOne(merged, e2); + } + return merged; +} +function mergePropsN(props) { + if (props.length === 0) { + return EMPTY_PROPS; + } + if (props.length === 1) { + return resolvePropsGetter(props[0], EMPTY_PROPS); + } + let merged = { + ...resolvePropsGetter(props[0], EMPTY_PROPS) + }; + for (let i2 = 1; i2 < props.length; i2 += 1) { + merged = mergeOne(merged, props[i2]); + } + return merged; +} +function mergeOne(merged, inputProps) { + if (isPropsGetter(inputProps)) { + return inputProps(merged); + } + return mutablyMergeInto(merged, inputProps); +} +function mutablyMergeInto(mergedProps, externalProps) { + if (!externalProps) { + return mergedProps; + } + for (const propName in externalProps) { + const externalPropValue = externalProps[propName]; + switch (propName) { + case "style": { + mergedProps[propName] = mergeObjects(mergedProps.style, externalPropValue); + break; + } + case "className": { + mergedProps[propName] = mergeClassNames(mergedProps.className, externalPropValue); + break; + } + default: { + if (isEventHandler(propName, externalPropValue)) { + mergedProps[propName] = mergeEventHandlers(mergedProps[propName], externalPropValue); + } else { + mergedProps[propName] = externalPropValue; + } + } + } + } + return mergedProps; +} +function isEventHandler(key, value) { + const code0 = key.charCodeAt(0); + const code1 = key.charCodeAt(1); + const code2 = key.charCodeAt(2); + return code0 === 111 && code1 === 110 && code2 >= 65 && code2 <= 90 && (typeof value === "function" || typeof value === "undefined"); +} +function isPropsGetter(inputProps) { + return typeof inputProps === "function"; +} +function resolvePropsGetter(inputProps, previousProps) { + if (isPropsGetter(inputProps)) { + return inputProps(previousProps); + } + return inputProps ?? EMPTY_PROPS; +} +function mergeEventHandlers(ourHandler, theirHandler) { + if (!theirHandler) { + return ourHandler; + } + if (!ourHandler) { + return theirHandler; + } + return (event) => { + if (isSyntheticEvent(event)) { + const baseUIEvent = event; + makeEventPreventable(baseUIEvent); + const result2 = theirHandler(baseUIEvent); + if (!baseUIEvent.baseUIHandlerPrevented) { + ourHandler?.(baseUIEvent); + } + return result2; + } + const result = theirHandler(event); + ourHandler?.(event); + return result; + }; +} +function makeEventPreventable(event) { + event.preventBaseUIHandler = () => { + event.baseUIHandlerPrevented = true; + }; + return event; +} +function mergeClassNames(ourClassName, theirClassName) { + if (theirClassName) { + if (ourClassName) { + return theirClassName + " " + ourClassName; + } + return theirClassName; + } + return ourClassName; +} +function isSyntheticEvent(event) { + return event != null && typeof event === "object" && "nativeEvent" in event; +} + +// node_modules/@base-ui/utils/esm/empty.js +var EMPTY_ARRAY = Object.freeze([]); +var EMPTY_OBJECT = Object.freeze({}); + +// node_modules/@base-ui/react/esm/utils/useRenderElement.js +var import_react = __toESM(require_react(), 1); +function useRenderElement(element, componentProps, params = {}) { + const renderProp = componentProps.render; + const outProps = useRenderElementProps(componentProps, params); + if (params.enabled === false) { + return null; + } + const state = params.state ?? EMPTY_OBJECT; + return evaluateRenderProp(element, renderProp, outProps, state); +} +function useRenderElementProps(componentProps, params = {}) { + const { + className: classNameProp, + style: styleProp, + render: renderProp + } = componentProps; + const { + state = EMPTY_OBJECT, + ref, + props, + stateAttributesMapping, + enabled = true + } = params; + const className = enabled ? resolveClassName(classNameProp, state) : void 0; + const style = enabled ? resolveStyle(styleProp, state) : void 0; + const stateProps = enabled ? getStateAttributesProps(state, stateAttributesMapping) : EMPTY_OBJECT; + const outProps = enabled ? mergeObjects(stateProps, Array.isArray(props) ? mergePropsN(props) : props) ?? EMPTY_OBJECT : EMPTY_OBJECT; + if (typeof document !== "undefined") { + if (!enabled) { + useMergedRefs(null, null); + } else if (Array.isArray(ref)) { + outProps.ref = useMergedRefsN([outProps.ref, getReactElementRef(renderProp), ...ref]); + } else { + outProps.ref = useMergedRefs(outProps.ref, getReactElementRef(renderProp), ref); + } + } + if (!enabled) { + return EMPTY_OBJECT; + } + if (className !== void 0) { + outProps.className = mergeClassNames(outProps.className, className); + } + if (style !== void 0) { + outProps.style = mergeObjects(outProps.style, style); + } + return outProps; +} +function evaluateRenderProp(element, render, props, state) { + if (render) { + if (typeof render === "function") { + return render(props, state); + } + const mergedProps = mergeProps(props, render.props); + mergedProps.ref = props.ref; + return /* @__PURE__ */ React5.cloneElement(render, mergedProps); + } + if (element) { + if (typeof element === "string") { + return renderTag(element, props); + } + } + throw new Error(true ? "Base UI: Render element or function are not defined." : formatErrorMessage(8)); +} +function renderTag(Tag, props) { + if (Tag === "button") { + return /* @__PURE__ */ (0, import_react.createElement)("button", { + type: "button", + ...props, + key: props.key + }); + } + if (Tag === "img") { + return /* @__PURE__ */ (0, import_react.createElement)("img", { + alt: "", + ...props, + key: props.key + }); + } + return /* @__PURE__ */ React5.createElement(Tag, props); +} + +// node_modules/@base-ui/react/esm/use-render/useRender.js +function useRender(params) { + return useRenderElement(params.defaultTagName ?? "div", params, params); +} + +// packages/icons/build-module/icon/index.mjs +var import_element2 = __toESM(require_element(), 1); +var icon_default = (0, import_element2.forwardRef)( + ({ icon, size = 24, ...props }, ref) => { + return (0, import_element2.cloneElement)(icon, { + width: size, + height: size, + ...props, + ref + }); + } +); + +// packages/icons/build-module/library/chevron-left.mjs +var import_primitives = __toESM(require_primitives(), 1); +var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1); +var chevron_left_default = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives.Path, { d: "M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z" }) }); + +// packages/icons/build-module/library/chevron-right.mjs +var import_primitives2 = __toESM(require_primitives(), 1); +var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1); +var chevron_right_default = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives2.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives2.Path, { d: "M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z" }) }); + +// packages/icons/build-module/library/more-vertical.mjs +var import_primitives3 = __toESM(require_primitives(), 1); +var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1); +var more_vertical_default = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives3.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives3.Path, { d: "M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z" }) }); + +// packages/icons/build-module/library/next.mjs +var import_primitives4 = __toESM(require_primitives(), 1); +var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1); +var next_default = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives4.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives4.Path, { d: "M6.6 6L5.4 7l4.5 5-4.5 5 1.1 1 5.5-6-5.4-6zm6 0l-1.1 1 4.5 5-4.5 5 1.1 1 5.5-6-5.5-6z" }) }); + +// packages/icons/build-module/library/previous.mjs +var import_primitives5 = __toESM(require_primitives(), 1); +var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1); +var previous_default = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives5.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives5.Path, { d: "M11.6 7l-1.1-1L5 12l5.5 6 1.1-1L7 12l4.6-5zm6 0l-1.1-1-5.5 6 5.5 6 1.1-1-4.6-5 4.6-5z" }) }); + +// packages/ui/build-module/stack/stack.mjs +var import_element3 = __toESM(require_element(), 1); +if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='71d20935c2']")) { + const style = document.createElement("style"); + style.setAttribute("data-wp-hash", "71d20935c2"); + style.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._19ce0419607e1896__stack{display:flex}}")); + document.head.appendChild(style); +} +var style_default = { "stack": "_19ce0419607e1896__stack" }; +var gapTokens = { + xs: "var(--wpds-dimension-gap-xs, 4px)", + sm: "var(--wpds-dimension-gap-sm, 8px)", + md: "var(--wpds-dimension-gap-md, 12px)", + lg: "var(--wpds-dimension-gap-lg, 16px)", + xl: "var(--wpds-dimension-gap-xl, 24px)", + "2xl": "var(--wpds-dimension-gap-2xl, 32px)", + "3xl": "var(--wpds-dimension-gap-3xl, 40px)" +}; +var Stack = (0, import_element3.forwardRef)(function Stack2({ direction, gap, align, justify, wrap, render, ...props }, ref) { + const style = { + gap: gap && gapTokens[gap], + alignItems: align, + justifyContent: justify, + flexDirection: direction, + flexWrap: wrap + }; + const element = useRender({ + render, + ref, + props: mergeProps(props, { style, className: style_default.stack }) + }); + return element; +}); + +// packages/admin-ui/build-module/page/sidebar-toggle-slot.mjs +var import_components = __toESM(require_components(), 1); +var { Fill: SidebarToggleFill, Slot: SidebarToggleSlot } = (0, import_components.createSlotFill)("SidebarToggle"); + +// packages/admin-ui/build-module/page/header.mjs +var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1); +function Header({ + headingLevel = 2, + breadcrumbs, + badges, + title, + subTitle, + actions, + showSidebarToggle = true +}) { + const HeadingTag = `h${headingLevel}`; + return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)( + Stack, + { + direction: "column", + className: "admin-ui-page__header", + render: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("header", {}), + children: [ + /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Stack, { direction: "row", justify: "space-between", gap: "sm", children: [ + /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Stack, { direction: "row", gap: "sm", align: "center", justify: "start", children: [ + showSidebarToggle && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)( + SidebarToggleSlot, + { + bubblesVirtually: true, + className: "admin-ui-page__sidebar-toggle-slot" + } + ), + title && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(HeadingTag, { className: "admin-ui-page__header-title", children: title }), + breadcrumbs, + badges + ] }), + /* @__PURE__ */ (0, import_jsx_runtime7.jsx)( + Stack, + { + direction: "row", + gap: "sm", + style: { width: "auto", flexShrink: 0 }, + className: "admin-ui-page__header-actions", + align: "center", + children: actions + } + ) + ] }), + subTitle && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "admin-ui-page__header-subtitle", children: subTitle }) + ] + } + ); +} + +// packages/admin-ui/build-module/page/index.mjs +var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1); +function Page({ + headingLevel, + breadcrumbs, + badges, + title, + subTitle, + children, + className, + actions, + hasPadding = false, + showSidebarToggle = true +}) { + const classes = clsx_default("admin-ui-page", className); + return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(navigable_region_default, { className: classes, ariaLabel: title, children: [ + (title || breadcrumbs || badges) && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)( + Header, + { + headingLevel, + breadcrumbs, + badges, + title, + subTitle, + actions, + showSidebarToggle + } + ), + hasPadding ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "admin-ui-page__content has-padding", children }) : children + ] }); +} +Page.SidebarToggleFill = SidebarToggleFill; +var page_default = Page; + +// routes/font-list/stage.tsx +var import_i18n46 = __toESM(require_i18n()); +var import_components62 = __toESM(require_components()); +var import_editor = __toESM(require_editor()); +var import_core_data12 = __toESM(require_core_data()); +var import_data13 = __toESM(require_data()); +var import_element35 = __toESM(require_element()); + +// packages/global-styles-ui/build-module/global-styles-ui.mjs +var import_components61 = __toESM(require_components(), 1); +var import_blocks5 = __toESM(require_blocks(), 1); +var import_data12 = __toESM(require_data(), 1); +var import_block_editor13 = __toESM(require_block_editor(), 1); +var import_element34 = __toESM(require_element(), 1); +var import_compose6 = __toESM(require_compose(), 1); + +// packages/global-styles-engine/build-module/utils/object.mjs +function setImmutably(object, path, value) { + path = Array.isArray(path) ? [...path] : [path]; + object = Array.isArray(object) ? [...object] : { ...object }; + const leaf = path.pop(); + let prev = object; + for (const key of path) { + const lvl = prev[key]; + prev = prev[key] = Array.isArray(lvl) ? [...lvl] : { ...lvl }; + } + prev[leaf] = value; + return object; +} +var getValueFromObjectPath = (object, path, defaultValue) => { + const arrayPath = Array.isArray(path) ? path : path.split("."); + let value = object; + arrayPath.forEach((fieldName) => { + value = value?.[fieldName]; + }); + return value ?? defaultValue; +}; + +// packages/global-styles-engine/build-module/settings/get-setting.mjs +var VALID_SETTINGS = [ + "appearanceTools", + "useRootPaddingAwareAlignments", + "background.backgroundImage", + "background.backgroundRepeat", + "background.backgroundSize", + "background.backgroundPosition", + "border.color", + "border.radius", + "border.radiusSizes", + "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.height", + "dimensions.minHeight", + "dimensions.width", + "dimensions.dimensionSizes", + "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.textIndent", + "typography.textTransform", + "typography.writingMode" +]; +function getSetting(globalStyles, path, blockName) { + const appendedBlockPath = blockName ? ".blocks." + blockName : ""; + const appendedPropertyPath = path ? "." + path : ""; + const contextualPath = `settings${appendedBlockPath}${appendedPropertyPath}`; + const globalPath = `settings${appendedPropertyPath}`; + if (path) { + return getValueFromObjectPath(globalStyles, contextualPath) ?? getValueFromObjectPath(globalStyles, globalPath); + } + let result = {}; + VALID_SETTINGS.forEach((setting) => { + const value = getValueFromObjectPath( + globalStyles, + `settings${appendedBlockPath}.${setting}` + ) ?? getValueFromObjectPath(globalStyles, `settings.${setting}`); + if (value !== void 0) { + result = setImmutably(result, setting.split("."), value); + } + }); + return result; +} + +// packages/global-styles-engine/build-module/settings/set-setting.mjs +function setSetting(globalStyles, path, newValue, blockName) { + const appendedBlockPath = blockName ? ".blocks." + blockName : ""; + const appendedPropertyPath = path ? "." + path : ""; + const finalPath = `settings${appendedBlockPath}${appendedPropertyPath}`; + return setImmutably( + globalStyles, + finalPath.split("."), + newValue + ); +} + +// packages/global-styles-engine/build-module/utils/common.mjs +var import_style_engine = __toESM(require_style_engine(), 1); + +// packages/global-styles-engine/build-module/utils/fluid.mjs +var DEFAULT_MAXIMUM_VIEWPORT_WIDTH = "1600px"; +var DEFAULT_MINIMUM_VIEWPORT_WIDTH = "320px"; +var DEFAULT_SCALE_FACTOR = 1; +var DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MIN = 0.25; +var DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MAX = 0.75; +var DEFAULT_MINIMUM_FONT_SIZE_LIMIT = "14px"; +function getComputedFluidTypographyValue({ + minimumFontSize, + maximumFontSize, + fontSize, + minimumViewportWidth = DEFAULT_MINIMUM_VIEWPORT_WIDTH, + maximumViewportWidth = DEFAULT_MAXIMUM_VIEWPORT_WIDTH, + scaleFactor = DEFAULT_SCALE_FACTOR, + minimumFontSizeLimit +}) { + minimumFontSizeLimit = !!getTypographyValueAndUnit(minimumFontSizeLimit) ? minimumFontSizeLimit : DEFAULT_MINIMUM_FONT_SIZE_LIMIT; + if (fontSize) { + const fontSizeParsed = getTypographyValueAndUnit(fontSize); + if (!fontSizeParsed?.unit || !fontSizeParsed?.value) { + return null; + } + const minimumFontSizeLimitParsed = getTypographyValueAndUnit( + minimumFontSizeLimit, + { + coerceTo: fontSizeParsed.unit + } + ); + if (!!minimumFontSizeLimitParsed?.value && !minimumFontSize && !maximumFontSize) { + if (fontSizeParsed?.value <= minimumFontSizeLimitParsed?.value) { + return null; + } + } + if (!maximumFontSize) { + maximumFontSize = `${fontSizeParsed.value}${fontSizeParsed.unit}`; + } + if (!minimumFontSize) { + const fontSizeValueInPx = fontSizeParsed.unit === "px" ? fontSizeParsed.value : fontSizeParsed.value * 16; + const minimumFontSizeFactor = Math.min( + Math.max( + 1 - 0.075 * Math.log2(fontSizeValueInPx), + DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MIN + ), + DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MAX + ); + const calculatedMinimumFontSize = roundToPrecision( + fontSizeParsed.value * minimumFontSizeFactor, + 3 + ); + if (!!minimumFontSizeLimitParsed?.value && calculatedMinimumFontSize < minimumFontSizeLimitParsed?.value) { + minimumFontSize = `${minimumFontSizeLimitParsed.value}${minimumFontSizeLimitParsed.unit}`; + } else { + minimumFontSize = `${calculatedMinimumFontSize}${fontSizeParsed.unit}`; + } + } + } + const minimumFontSizeParsed = getTypographyValueAndUnit(minimumFontSize); + const fontSizeUnit = minimumFontSizeParsed?.unit || "rem"; + const maximumFontSizeParsed = getTypographyValueAndUnit(maximumFontSize, { + coerceTo: fontSizeUnit + }); + if (!minimumFontSizeParsed || !maximumFontSizeParsed) { + return null; + } + const minimumFontSizeRem = getTypographyValueAndUnit(minimumFontSize, { + coerceTo: "rem" + }); + const maximumViewportWidthParsed = getTypographyValueAndUnit( + maximumViewportWidth, + { coerceTo: fontSizeUnit } + ); + const minimumViewportWidthParsed = getTypographyValueAndUnit( + minimumViewportWidth, + { coerceTo: fontSizeUnit } + ); + if (!maximumViewportWidthParsed || !minimumViewportWidthParsed || !minimumFontSizeRem) { + return null; + } + const linearDenominator = maximumViewportWidthParsed.value - minimumViewportWidthParsed.value; + if (!linearDenominator) { + return null; + } + const minViewportWidthOffsetValue = roundToPrecision( + minimumViewportWidthParsed.value / 100, + 3 + ); + const viewportWidthOffset = roundToPrecision(minViewportWidthOffsetValue, 3) + fontSizeUnit; + const linearFactor = 100 * ((maximumFontSizeParsed.value - minimumFontSizeParsed.value) / linearDenominator); + const linearFactorScaled = roundToPrecision( + (linearFactor || 1) * scaleFactor, + 3 + ); + const fluidTargetFontSize = `${minimumFontSizeRem.value}${minimumFontSizeRem.unit} + ((1vw - ${viewportWidthOffset}) * ${linearFactorScaled})`; + return `clamp(${minimumFontSize}, ${fluidTargetFontSize}, ${maximumFontSize})`; +} +function getTypographyValueAndUnit(rawValue, options = {}) { + if (typeof rawValue !== "string" && typeof rawValue !== "number") { + return null; + } + if (isFinite(rawValue)) { + rawValue = `${rawValue}px`; + } + const { coerceTo, rootSizeValue, acceptableUnits } = { + coerceTo: "", + // Default browser font size. Later we could inject some JS to compute this `getComputedStyle( document.querySelector( "html" ) ).fontSize`. + rootSizeValue: 16, + acceptableUnits: ["rem", "px", "em"], + ...options + }; + const acceptableUnitsGroup = acceptableUnits?.join("|"); + const regexUnits = new RegExp( + `^(\\d*\\.?\\d+)(${acceptableUnitsGroup}){1,1}$` + ); + const matches = rawValue.toString().match(regexUnits); + if (!matches || matches.length < 3) { + return null; + } + let [, value, unit] = matches; + let returnValue = parseFloat(value); + if ("px" === coerceTo && ("em" === unit || "rem" === unit)) { + returnValue = returnValue * rootSizeValue; + unit = coerceTo; + } + if ("px" === unit && ("em" === coerceTo || "rem" === coerceTo)) { + returnValue = returnValue / rootSizeValue; + unit = coerceTo; + } + if (("em" === coerceTo || "rem" === coerceTo) && ("em" === unit || "rem" === unit)) { + unit = coerceTo; + } + if (!unit) { + return null; + } + return { + value: roundToPrecision(returnValue, 3), + unit + }; +} +function roundToPrecision(value, digits = 3) { + const base = Math.pow(10, digits); + return Math.round(value * base) / base; +} + +// packages/global-styles-engine/build-module/utils/typography.mjs +function isFluidTypographyEnabled(typographySettings) { + const fluidSettings = typographySettings?.fluid; + return true === fluidSettings || fluidSettings && typeof fluidSettings === "object" && Object.keys(fluidSettings).length > 0; +} +function getFluidTypographyOptionsFromSettings(settings) { + const typographySettings = settings?.typography ?? {}; + const layoutSettings = settings?.layout; + const defaultMaxViewportWidth = getTypographyValueAndUnit( + layoutSettings?.wideSize + ) ? layoutSettings?.wideSize : null; + return isFluidTypographyEnabled(typographySettings) && defaultMaxViewportWidth ? { + fluid: { + maxViewportWidth: defaultMaxViewportWidth, + ...typeof typographySettings.fluid === "object" ? typographySettings.fluid : {} + } + } : { + fluid: typographySettings?.fluid + }; +} +function getTypographyFontSizeValue(preset, settings) { + const { size: defaultSize } = preset; + if (!defaultSize || "0" === defaultSize || false === preset?.fluid) { + return defaultSize; + } + if (!isFluidTypographyEnabled(settings?.typography) && !isFluidTypographyEnabled(preset)) { + return defaultSize; + } + const fluidTypographySettings = getFluidTypographyOptionsFromSettings(settings)?.fluid ?? {}; + const fluidFontSizeValue = getComputedFluidTypographyValue({ + minimumFontSize: typeof preset?.fluid === "boolean" ? void 0 : preset?.fluid?.min, + maximumFontSize: typeof preset?.fluid === "boolean" ? void 0 : preset?.fluid?.max, + fontSize: defaultSize, + minimumFontSizeLimit: typeof fluidTypographySettings === "object" ? fluidTypographySettings?.minFontSize : void 0, + maximumViewportWidth: typeof fluidTypographySettings === "object" ? fluidTypographySettings?.maxViewportWidth : void 0, + minimumViewportWidth: typeof fluidTypographySettings === "object" ? fluidTypographySettings?.minViewportWidth : void 0 + }); + if (!!fluidFontSizeValue) { + return fluidFontSizeValue; + } + return defaultSize; +} + +// packages/global-styles-engine/build-module/utils/common.mjs +var PRESET_METADATA = [ + { + 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 }) => `url( '#wp-duotone-${slug}' )`, + classes: [] + }, + { + path: ["shadow", "presets"], + valueKey: "shadow", + cssVarInfix: "shadow", + classes: [] + }, + { + path: ["typography", "fontSizes"], + valueFunc: (preset, settings) => getTypographyFontSizeValue(preset, settings), + 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 }) => size, + classes: [] + }, + { + path: ["border", "radiusSizes"], + valueKey: "size", + cssVarInfix: "border-radius", + classes: [] + }, + { + path: ["dimensions", "dimensionSizes"], + valueKey: "size", + cssVarInfix: "dimension", + classes: [] + } +]; +function findInPresetsBy(settings, blockName, presetPath = [], presetProperty = "slug", presetValueValue) { + const orderedPresetsByOrigin = [ + blockName ? getValueFromObjectPath(settings, [ + "blocks", + blockName, + ...presetPath + ]) : void 0, + getValueFromObjectPath(settings, presetPath) + ].filter(Boolean); + for (const presetByOrigin of orderedPresetsByOrigin) { + if (presetByOrigin) { + const origins = ["custom", "theme", "default"]; + for (const origin of origins) { + const presets = presetByOrigin[origin]; + if (presets) { + const presetObject = presets.find( + (preset) => preset[presetProperty] === presetValueValue + ); + if (presetObject) { + if (presetProperty === "slug") { + return presetObject; + } + const highestPresetObjectWithSameSlug = findInPresetsBy( + settings, + blockName, + presetPath, + "slug", + presetObject.slug + ); + if (highestPresetObjectWithSameSlug[presetProperty] === presetObject[presetProperty]) { + return presetObject; + } + return void 0; + } + } + } + } + } +} +function getValueFromPresetVariable(features, blockName, variable, [presetType, slug] = []) { + const metadata = PRESET_METADATA.find( + (data) => data.cssVarInfix === presetType + ); + if (!metadata || !features.settings) { + return variable; + } + const presetObject = findInPresetsBy( + features.settings, + blockName, + metadata.path, + "slug", + slug + ); + if (presetObject) { + const { valueKey } = metadata; + const result = presetObject[valueKey]; + return getValueFromVariable(features, blockName, result); + } + return variable; +} +function getValueFromCustomVariable(features, blockName, variable, path = []) { + const result = (blockName ? getValueFromObjectPath(features?.settings ?? {}, [ + "blocks", + blockName, + "custom", + ...path + ]) : void 0) ?? getValueFromObjectPath(features?.settings ?? {}, [ + "custom", + ...path + ]); + if (!result) { + return variable; + } + return getValueFromVariable(features, blockName, result); +} +function getValueFromVariable(features, blockName, variable) { + if (!variable || typeof variable !== "string") { + if (typeof variable === "object" && variable !== null && "ref" in variable && typeof variable.ref === "string") { + const resolvedVariable = getValueFromObjectPath( + features, + variable.ref + ); + if (!resolvedVariable || typeof resolvedVariable === "object" && "ref" in resolvedVariable) { + return resolvedVariable; + } + variable = resolvedVariable; + } else { + return variable; + } + } + const USER_VALUE_PREFIX = "var:"; + const THEME_VALUE_PREFIX = "var(--wp--"; + const THEME_VALUE_SUFFIX = ")"; + let parsedVar; + if (variable.startsWith(USER_VALUE_PREFIX)) { + parsedVar = variable.slice(USER_VALUE_PREFIX.length).split("|"); + } else if (variable.startsWith(THEME_VALUE_PREFIX) && variable.endsWith(THEME_VALUE_SUFFIX)) { + parsedVar = variable.slice(THEME_VALUE_PREFIX.length, -THEME_VALUE_SUFFIX.length).split("--"); + } else { + return variable; + } + const [type, ...path] = parsedVar; + if (type === "preset") { + return getValueFromPresetVariable( + features, + blockName, + variable, + path + ); + } + if (type === "custom") { + return getValueFromCustomVariable( + features, + blockName, + variable, + path + ); + } + return variable; +} + +// packages/global-styles-engine/build-module/settings/get-style.mjs +function getStyle(globalStyles, path, blockName, shouldDecodeEncode = true) { + const appendedPath = path ? "." + path : ""; + const finalPath = !blockName ? `styles${appendedPath}` : `styles.blocks.${blockName}${appendedPath}`; + if (!globalStyles) { + return void 0; + } + const rawResult = getValueFromObjectPath(globalStyles, finalPath); + const result = shouldDecodeEncode ? getValueFromVariable(globalStyles, blockName, rawResult) : rawResult; + return result; +} + +// packages/global-styles-engine/build-module/settings/set-style.mjs +function setStyle(globalStyles, path, newValue, blockName) { + const appendedPath = path ? "." + path : ""; + const finalPath = !blockName ? `styles${appendedPath}` : `styles.blocks.${blockName}${appendedPath}`; + return setImmutably( + globalStyles, + finalPath.split("."), + newValue + ); +} + +// packages/global-styles-engine/build-module/core/equal.mjs +var import_es6 = __toESM(require_es6(), 1); +function areGlobalStylesEqual(original, variation) { + if (typeof original !== "object" || typeof variation !== "object") { + return original === variation; + } + return (0, import_es6.default)(original?.styles, variation?.styles) && (0, import_es6.default)(original?.settings, variation?.settings); +} + +// packages/global-styles-engine/build-module/core/merge.mjs +var import_deepmerge = __toESM(require_cjs(), 1); + +// node_modules/is-plain-object/dist/is-plain-object.mjs +function isObject(o3) { + return Object.prototype.toString.call(o3) === "[object Object]"; +} +function isPlainObject(o3) { + var ctor, prot; + if (isObject(o3) === false) return false; + ctor = o3.constructor; + if (ctor === void 0) return true; + prot = ctor.prototype; + if (isObject(prot) === false) return false; + if (prot.hasOwnProperty("isPrototypeOf") === false) { + return false; + } + return true; +} + +// packages/global-styles-engine/build-module/core/merge.mjs +function mergeGlobalStyles(base, user) { + return (0, import_deepmerge.default)(base, user, { + /* + * We only pass as arrays the presets, + * in which case we want the new array of values + * to override the old array (no merging). + */ + isMergeableObject: isPlainObject, + /* + * Exceptions to the above rule. + * Background images should be replaced, not merged, + * as they themselves are specific object definitions for the style. + */ + customMerge: (key) => { + if (key === "backgroundImage") { + return (baseConfig, userConfig) => userConfig ?? baseConfig; + } + return void 0; + } + }); +} + +// node_modules/colord/index.mjs +var r2 = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }; +var t = function(r3) { + return "string" == typeof r3 ? r3.length > 0 : "number" == typeof r3; +}; +var n = function(r3, t3, n2) { + return void 0 === t3 && (t3 = 0), void 0 === n2 && (n2 = Math.pow(10, t3)), Math.round(n2 * r3) / n2 + 0; +}; +var e = function(r3, t3, n2) { + return void 0 === t3 && (t3 = 0), void 0 === n2 && (n2 = 1), r3 > n2 ? n2 : r3 > t3 ? r3 : t3; +}; +var u = function(r3) { + return (r3 = isFinite(r3) ? r3 % 360 : 0) > 0 ? r3 : r3 + 360; +}; +var a = function(r3) { + return { r: e(r3.r, 0, 255), g: e(r3.g, 0, 255), b: e(r3.b, 0, 255), a: e(r3.a) }; +}; +var o = function(r3) { + return { r: n(r3.r), g: n(r3.g), b: n(r3.b), a: n(r3.a, 3) }; +}; +var i = /^#([0-9a-f]{3,8})$/i; +var s = function(r3) { + var t3 = r3.toString(16); + return t3.length < 2 ? "0" + t3 : t3; +}; +var h = function(r3) { + var t3 = r3.r, n2 = r3.g, e2 = r3.b, u2 = r3.a, a2 = Math.max(t3, n2, e2), o3 = a2 - Math.min(t3, n2, e2), i2 = o3 ? a2 === t3 ? (n2 - e2) / o3 : a2 === n2 ? 2 + (e2 - t3) / o3 : 4 + (t3 - n2) / o3 : 0; + return { h: 60 * (i2 < 0 ? i2 + 6 : i2), s: a2 ? o3 / a2 * 100 : 0, v: a2 / 255 * 100, a: u2 }; +}; +var b = function(r3) { + var t3 = r3.h, n2 = r3.s, e2 = r3.v, u2 = r3.a; + t3 = t3 / 360 * 6, n2 /= 100, e2 /= 100; + var a2 = Math.floor(t3), o3 = e2 * (1 - n2), i2 = e2 * (1 - (t3 - a2) * n2), s2 = e2 * (1 - (1 - t3 + a2) * n2), h2 = a2 % 6; + return { r: 255 * [e2, i2, o3, o3, s2, e2][h2], g: 255 * [s2, e2, e2, i2, o3, o3][h2], b: 255 * [o3, o3, s2, e2, e2, i2][h2], a: u2 }; +}; +var g = function(r3) { + return { h: u(r3.h), s: e(r3.s, 0, 100), l: e(r3.l, 0, 100), a: e(r3.a) }; +}; +var d = function(r3) { + return { h: n(r3.h), s: n(r3.s), l: n(r3.l), a: n(r3.a, 3) }; +}; +var f = function(r3) { + return b((n2 = (t3 = r3).s, { h: t3.h, s: (n2 *= ((e2 = t3.l) < 50 ? e2 : 100 - e2) / 100) > 0 ? 2 * n2 / (e2 + n2) * 100 : 0, v: e2 + n2, a: t3.a })); + var t3, n2, e2; +}; +var c = function(r3) { + return { h: (t3 = h(r3)).h, s: (u2 = (200 - (n2 = t3.s)) * (e2 = t3.v) / 100) > 0 && u2 < 200 ? n2 * e2 / 100 / (u2 <= 100 ? u2 : 200 - u2) * 100 : 0, l: u2 / 2, a: t3.a }; + var t3, n2, e2, u2; +}; +var l = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i; +var p2 = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i; +var v = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i; +var m = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i; +var y = { string: [[function(r3) { + var t3 = i.exec(r3); + return t3 ? (r3 = t3[1]).length <= 4 ? { r: parseInt(r3[0] + r3[0], 16), g: parseInt(r3[1] + r3[1], 16), b: parseInt(r3[2] + r3[2], 16), a: 4 === r3.length ? n(parseInt(r3[3] + r3[3], 16) / 255, 2) : 1 } : 6 === r3.length || 8 === r3.length ? { r: parseInt(r3.substr(0, 2), 16), g: parseInt(r3.substr(2, 2), 16), b: parseInt(r3.substr(4, 2), 16), a: 8 === r3.length ? n(parseInt(r3.substr(6, 2), 16) / 255, 2) : 1 } : null : null; +}, "hex"], [function(r3) { + var t3 = v.exec(r3) || m.exec(r3); + return t3 ? t3[2] !== t3[4] || t3[4] !== t3[6] ? null : a({ r: Number(t3[1]) / (t3[2] ? 100 / 255 : 1), g: Number(t3[3]) / (t3[4] ? 100 / 255 : 1), b: Number(t3[5]) / (t3[6] ? 100 / 255 : 1), a: void 0 === t3[7] ? 1 : Number(t3[7]) / (t3[8] ? 100 : 1) }) : null; +}, "rgb"], [function(t3) { + var n2 = l.exec(t3) || p2.exec(t3); + if (!n2) return null; + var e2, u2, a2 = g({ h: (e2 = n2[1], u2 = n2[2], void 0 === u2 && (u2 = "deg"), Number(e2) * (r2[u2] || 1)), s: Number(n2[3]), l: Number(n2[4]), a: void 0 === n2[5] ? 1 : Number(n2[5]) / (n2[6] ? 100 : 1) }); + return f(a2); +}, "hsl"]], object: [[function(r3) { + var n2 = r3.r, e2 = r3.g, u2 = r3.b, o3 = r3.a, i2 = void 0 === o3 ? 1 : o3; + return t(n2) && t(e2) && t(u2) ? a({ r: Number(n2), g: Number(e2), b: Number(u2), a: Number(i2) }) : null; +}, "rgb"], [function(r3) { + var n2 = r3.h, e2 = r3.s, u2 = r3.l, a2 = r3.a, o3 = void 0 === a2 ? 1 : a2; + if (!t(n2) || !t(e2) || !t(u2)) return null; + var i2 = g({ h: Number(n2), s: Number(e2), l: Number(u2), a: Number(o3) }); + return f(i2); +}, "hsl"], [function(r3) { + var n2 = r3.h, a2 = r3.s, o3 = r3.v, i2 = r3.a, s2 = void 0 === i2 ? 1 : i2; + if (!t(n2) || !t(a2) || !t(o3)) return null; + var h2 = (function(r4) { + return { h: u(r4.h), s: e(r4.s, 0, 100), v: e(r4.v, 0, 100), a: e(r4.a) }; + })({ h: Number(n2), s: Number(a2), v: Number(o3), a: Number(s2) }); + return b(h2); +}, "hsv"]] }; +var N = function(r3, t3) { + for (var n2 = 0; n2 < t3.length; n2++) { + var e2 = t3[n2][0](r3); + if (e2) return [e2, t3[n2][1]]; + } + return [null, void 0]; +}; +var x = function(r3) { + return "string" == typeof r3 ? N(r3.trim(), y.string) : "object" == typeof r3 && null !== r3 ? N(r3, y.object) : [null, void 0]; +}; +var M = function(r3, t3) { + var n2 = c(r3); + return { h: n2.h, s: e(n2.s + 100 * t3, 0, 100), l: n2.l, a: n2.a }; +}; +var H = function(r3) { + return (299 * r3.r + 587 * r3.g + 114 * r3.b) / 1e3 / 255; +}; +var $ = function(r3, t3) { + var n2 = c(r3); + return { h: n2.h, s: n2.s, l: e(n2.l + 100 * t3, 0, 100), a: n2.a }; +}; +var j = (function() { + function r3(r4) { + this.parsed = x(r4)[0], this.rgba = this.parsed || { r: 0, g: 0, b: 0, a: 1 }; + } + return r3.prototype.isValid = function() { + return null !== this.parsed; + }, r3.prototype.brightness = function() { + return n(H(this.rgba), 2); + }, r3.prototype.isDark = function() { + return H(this.rgba) < 0.5; + }, r3.prototype.isLight = function() { + return H(this.rgba) >= 0.5; + }, r3.prototype.toHex = function() { + return r4 = o(this.rgba), t3 = r4.r, e2 = r4.g, u2 = r4.b, i2 = (a2 = r4.a) < 1 ? s(n(255 * a2)) : "", "#" + s(t3) + s(e2) + s(u2) + i2; + var r4, t3, e2, u2, a2, i2; + }, r3.prototype.toRgb = function() { + return o(this.rgba); + }, r3.prototype.toRgbString = function() { + return r4 = o(this.rgba), t3 = r4.r, n2 = r4.g, e2 = r4.b, (u2 = r4.a) < 1 ? "rgba(" + t3 + ", " + n2 + ", " + e2 + ", " + u2 + ")" : "rgb(" + t3 + ", " + n2 + ", " + e2 + ")"; + var r4, t3, n2, e2, u2; + }, r3.prototype.toHsl = function() { + return d(c(this.rgba)); + }, r3.prototype.toHslString = function() { + return r4 = d(c(this.rgba)), t3 = r4.h, n2 = r4.s, e2 = r4.l, (u2 = r4.a) < 1 ? "hsla(" + t3 + ", " + n2 + "%, " + e2 + "%, " + u2 + ")" : "hsl(" + t3 + ", " + n2 + "%, " + e2 + "%)"; + var r4, t3, n2, e2, u2; + }, r3.prototype.toHsv = function() { + return r4 = h(this.rgba), { h: n(r4.h), s: n(r4.s), v: n(r4.v), a: n(r4.a, 3) }; + var r4; + }, r3.prototype.invert = function() { + return w({ r: 255 - (r4 = this.rgba).r, g: 255 - r4.g, b: 255 - r4.b, a: r4.a }); + var r4; + }, r3.prototype.saturate = function(r4) { + return void 0 === r4 && (r4 = 0.1), w(M(this.rgba, r4)); + }, r3.prototype.desaturate = function(r4) { + return void 0 === r4 && (r4 = 0.1), w(M(this.rgba, -r4)); + }, r3.prototype.grayscale = function() { + return w(M(this.rgba, -1)); + }, r3.prototype.lighten = function(r4) { + return void 0 === r4 && (r4 = 0.1), w($(this.rgba, r4)); + }, r3.prototype.darken = function(r4) { + return void 0 === r4 && (r4 = 0.1), w($(this.rgba, -r4)); + }, r3.prototype.rotate = function(r4) { + return void 0 === r4 && (r4 = 15), this.hue(this.hue() + r4); + }, r3.prototype.alpha = function(r4) { + return "number" == typeof r4 ? w({ r: (t3 = this.rgba).r, g: t3.g, b: t3.b, a: r4 }) : n(this.rgba.a, 3); + var t3; + }, r3.prototype.hue = function(r4) { + var t3 = c(this.rgba); + return "number" == typeof r4 ? w({ h: r4, s: t3.s, l: t3.l, a: t3.a }) : n(t3.h); + }, r3.prototype.isEqual = function(r4) { + return this.toHex() === w(r4).toHex(); + }, r3; +})(); +var w = function(r3) { + return r3 instanceof j ? r3 : new j(r3); +}; +var S = []; +var k = function(r3) { + r3.forEach(function(r4) { + S.indexOf(r4) < 0 && (r4(j, y), S.push(r4)); + }); +}; + +// packages/global-styles-ui/build-module/provider.mjs +var import_element5 = __toESM(require_element(), 1); + +// packages/global-styles-ui/build-module/context.mjs +var import_element4 = __toESM(require_element(), 1); +var GlobalStylesContext = (0, import_element4.createContext)({ + user: { styles: {}, settings: {} }, + base: { styles: {}, settings: {} }, + merged: { styles: {}, settings: {} }, + onChange: () => { + }, + fontLibraryEnabled: false +}); + +// packages/global-styles-ui/build-module/provider.mjs +var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1); +function GlobalStylesProvider({ + children, + value, + baseValue, + onChange, + fontLibraryEnabled +}) { + const merged = (0, import_element5.useMemo)(() => { + return mergeGlobalStyles(baseValue, value); + }, [baseValue, value]); + const contextValue = (0, import_element5.useMemo)( + () => ({ + user: value, + base: baseValue, + merged, + onChange, + fontLibraryEnabled + }), + [value, baseValue, merged, onChange, fontLibraryEnabled] + ); + return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(GlobalStylesContext.Provider, { value: contextValue, children }); +} + +// packages/global-styles-ui/build-module/screen-root.mjs +var import_components8 = __toESM(require_components(), 1); +var import_i18n4 = __toESM(require_i18n(), 1); +var import_data2 = __toESM(require_data(), 1); +var import_core_data2 = __toESM(require_core_data(), 1); + +// packages/global-styles-ui/build-module/icon-with-current-color.mjs +var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1); +function IconWithCurrentColor({ + className, + ...props +}) { + return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)( + icon_default, + { + className: clsx_default( + className, + "global-styles-ui-icon-with-current-color" + ), + ...props + } + ); +} + +// packages/global-styles-ui/build-module/navigation-button.mjs +var import_components2 = __toESM(require_components(), 1); +var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1); +function GenericNavigationButton({ + icon, + children, + ...props +}) { + return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_components2.__experimentalItem, { ...props, children: [ + icon && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_components2.__experimentalHStack, { justify: "flex-start", children: [ + /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(IconWithCurrentColor, { icon, size: 24 }), + /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_components2.FlexItem, { children }) + ] }), + !icon && children + ] }); +} +function NavigationButtonAsItem(props) { + return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_components2.Navigator.Button, { as: GenericNavigationButton, ...props }); +} + +// packages/global-styles-ui/build-module/root-menu.mjs +var import_components3 = __toESM(require_components(), 1); +var import_i18n2 = __toESM(require_i18n(), 1); +var import_block_editor = __toESM(require_block_editor(), 1); + +// node_modules/colord/plugins/a11y.mjs +var o2 = function(o3) { + var t3 = o3 / 255; + return t3 < 0.04045 ? t3 / 12.92 : Math.pow((t3 + 0.055) / 1.055, 2.4); +}; +var t2 = function(t3) { + return 0.2126 * o2(t3.r) + 0.7152 * o2(t3.g) + 0.0722 * o2(t3.b); +}; +function a11y_default(o3) { + o3.prototype.luminance = function() { + return o4 = t2(this.rgba), void 0 === (r3 = 2) && (r3 = 0), void 0 === n2 && (n2 = Math.pow(10, r3)), Math.round(n2 * o4) / n2 + 0; + var o4, r3, n2; + }, o3.prototype.contrast = function(r3) { + void 0 === r3 && (r3 = "#FFF"); + var n2, a2, i2, e2, v2, u2, d2, c2 = r3 instanceof o3 ? r3 : new o3(r3); + return e2 = this.rgba, v2 = c2.toRgb(), u2 = t2(e2), d2 = t2(v2), n2 = u2 > d2 ? (u2 + 0.05) / (d2 + 0.05) : (d2 + 0.05) / (u2 + 0.05), void 0 === (a2 = 2) && (a2 = 0), void 0 === i2 && (i2 = Math.pow(10, a2)), Math.floor(i2 * n2) / i2 + 0; + }, o3.prototype.isReadable = function(o4, t3) { + return void 0 === o4 && (o4 = "#FFF"), void 0 === t3 && (t3 = {}), this.contrast(o4) >= (e2 = void 0 === (i2 = (r3 = t3).size) ? "normal" : i2, "AAA" === (a2 = void 0 === (n2 = r3.level) ? "AA" : n2) && "normal" === e2 ? 7 : "AA" === a2 && "large" === e2 ? 3 : 4.5); + var r3, n2, a2, i2, e2; + }; +} + +// packages/global-styles-ui/build-module/hooks.mjs +var import_element6 = __toESM(require_element(), 1); +var import_data = __toESM(require_data(), 1); +var import_core_data = __toESM(require_core_data(), 1); +var import_i18n = __toESM(require_i18n(), 1); + +// packages/global-styles-ui/build-module/utils.mjs +function removePropertiesFromObject(object, properties) { + if (!properties?.length) { + return object; + } + if (typeof object !== "object" || !object || !Object.keys(object).length) { + return object; + } + for (const key in object) { + if (properties.includes(key)) { + delete object[key]; + } else if (typeof object[key] === "object") { + removePropertiesFromObject(object[key], properties); + } + } + return object; +} +var filterObjectByProperties = (object, properties) => { + if (!object || !properties?.length) { + return {}; + } + const newObject = {}; + Object.keys(object).forEach((key) => { + if (properties.includes(key)) { + newObject[key] = object[key]; + } else if (typeof object[key] === "object") { + const newFilter = filterObjectByProperties( + object[key], + properties + ); + if (Object.keys(newFilter).length) { + newObject[key] = newFilter; + } + } + }); + return newObject; +}; +function isVariationWithProperties(variation, properties) { + const variationWithProperties = filterObjectByProperties( + structuredClone(variation), + properties + ); + return areGlobalStylesEqual(variationWithProperties, variation); +} +function getFontFamilyFromSetting(fontFamilies, setting) { + if (!Array.isArray(fontFamilies) || !setting) { + return null; + } + const fontFamilyVariable = setting.replace("var(", "").replace(")", ""); + const fontFamilySlug = fontFamilyVariable?.split("--").slice(-1)[0]; + return fontFamilies.find( + (fontFamily) => fontFamily.slug === fontFamilySlug + ); +} +function getFontFamilies(themeJson) { + const themeFontFamilies = themeJson?.settings?.typography?.fontFamilies?.theme; + const customFontFamilies = themeJson?.settings?.typography?.fontFamilies?.custom; + let fontFamilies = []; + if (themeFontFamilies && customFontFamilies) { + fontFamilies = [...themeFontFamilies, ...customFontFamilies]; + } else if (themeFontFamilies) { + fontFamilies = themeFontFamilies; + } else if (customFontFamilies) { + fontFamilies = customFontFamilies; + } + const bodyFontFamilySetting = themeJson?.styles?.typography?.fontFamily; + const bodyFontFamily = getFontFamilyFromSetting( + fontFamilies, + bodyFontFamilySetting + ); + const headingFontFamilySetting = themeJson?.styles?.elements?.heading?.typography?.fontFamily; + let headingFontFamily; + if (!headingFontFamilySetting) { + headingFontFamily = bodyFontFamily; + } else { + headingFontFamily = getFontFamilyFromSetting( + fontFamilies, + themeJson?.styles?.elements?.heading?.typography?.fontFamily + ); + } + return [bodyFontFamily, headingFontFamily]; +} + +// packages/global-styles-ui/build-module/hooks.mjs +k([a11y_default]); +function useStyle(path, blockName, readFrom = "merged", shouldDecodeEncode = true) { + const { user, base, merged, onChange } = (0, import_element6.useContext)(GlobalStylesContext); + let sourceValue = merged; + if (readFrom === "base") { + sourceValue = base; + } else if (readFrom === "user") { + sourceValue = user; + } + const styleValue = (0, import_element6.useMemo)( + () => getStyle(sourceValue, path, blockName, shouldDecodeEncode), + [sourceValue, path, blockName, shouldDecodeEncode] + ); + const setStyleValue = (0, import_element6.useCallback)( + (newValue) => { + const newGlobalStyles = setStyle( + user, + path, + newValue, + blockName + ); + onChange(newGlobalStyles); + }, + [user, onChange, path, blockName] + ); + return [styleValue, setStyleValue]; +} +function useSetting(path, blockName, readFrom = "merged") { + const { user, base, merged, onChange } = (0, import_element6.useContext)(GlobalStylesContext); + let sourceValue = merged; + if (readFrom === "base") { + sourceValue = base; + } else if (readFrom === "user") { + sourceValue = user; + } + const settingValue = (0, import_element6.useMemo)( + () => getSetting(sourceValue, path, blockName), + [sourceValue, path, blockName] + ); + const setSettingValue = (0, import_element6.useCallback)( + (newValue) => { + const newGlobalStyles = setSetting( + user, + path, + newValue, + blockName + ); + onChange(newGlobalStyles); + }, + [user, onChange, path, blockName] + ); + return [settingValue, setSettingValue]; +} +var EMPTY_ARRAY2 = []; +function hasThemeVariation({ + title, + settings, + styles +}) { + return title === (0, import_i18n.__)("Default") || Object.keys(settings || {}).length > 0 || Object.keys(styles || {}).length > 0; +} +function useCurrentMergeThemeStyleVariationsWithUserConfig(properties = []) { + const { variationsFromTheme } = (0, import_data.useSelect)((select) => { + const _variationsFromTheme = select( + import_core_data.store + ).__experimentalGetCurrentThemeGlobalStylesVariations?.(); + return { + variationsFromTheme: _variationsFromTheme || EMPTY_ARRAY2 + }; + }, []); + const { user: userVariation } = (0, import_element6.useContext)(GlobalStylesContext); + return (0, import_element6.useMemo)(() => { + const clonedUserVariation = structuredClone(userVariation); + const userVariationWithoutProperties = removePropertiesFromObject( + clonedUserVariation, + properties + ); + userVariationWithoutProperties.title = (0, import_i18n.__)("Default"); + const variationsWithPropertiesAndBase = variationsFromTheme.filter((variation) => { + return isVariationWithProperties(variation, properties); + }).map((variation) => { + return mergeGlobalStyles( + userVariationWithoutProperties, + variation + ); + }); + const variationsByProperties = [ + userVariationWithoutProperties, + ...variationsWithPropertiesAndBase + ]; + return variationsByProperties?.length ? variationsByProperties.filter(hasThemeVariation) : []; + }, [properties, userVariation, variationsFromTheme]); +} + +// packages/global-styles-ui/build-module/lock-unlock.mjs +var import_private_apis = __toESM(require_private_apis(), 1); +var { lock, unlock } = (0, import_private_apis.__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/global-styles-ui" +); + +// packages/global-styles-ui/build-module/root-menu.mjs +var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1); +var { + useHasDimensionsPanel, + useHasTypographyPanel, + useHasColorPanel, + useSettingsForBlockElement, + useHasBackgroundPanel +} = unlock(import_block_editor.privateApis); + +// packages/global-styles-ui/build-module/preview-styles.mjs +var import_components7 = __toESM(require_components(), 1); + +// packages/global-styles-ui/build-module/preview-hooks.mjs +function useStylesPreviewColors() { + const [textColor = "black"] = useStyle("color.text"); + const [backgroundColor = "white"] = useStyle("color.background"); + const [headingColor = textColor] = useStyle( + "elements.h1.color.text" + ); + const [linkColor = headingColor] = useStyle( + "elements.link.color.text" + ); + const [buttonBackgroundColor = linkColor] = useStyle( + "elements.button.color.background" + ); + const [coreColors] = useSetting("color.palette.core") || []; + const [themeColors] = useSetting("color.palette.theme") || []; + const [customColors] = useSetting("color.palette.custom") || []; + const paletteColors = (themeColors ?? []).concat(customColors ?? []).concat(coreColors ?? []); + const textColorObject = paletteColors.filter( + ({ color }) => color === textColor + ); + const buttonBackgroundColorObject = paletteColors.filter( + ({ color }) => color === buttonBackgroundColor + ); + const highlightedColors = textColorObject.concat(buttonBackgroundColorObject).concat(paletteColors).filter( + // we exclude these background color because it is already visible in the preview. + ({ color }) => color !== backgroundColor + ).slice(0, 2); + return { + paletteColors, + highlightedColors + }; +} + +// packages/global-styles-ui/build-module/typography-example.mjs +var import_element7 = __toESM(require_element(), 1); +var import_components4 = __toESM(require_components(), 1); +var import_i18n3 = __toESM(require_i18n(), 1); + +// packages/global-styles-ui/build-module/font-library/utils/preview-styles.mjs +function findNearest(input, numbers) { + if (numbers.length === 0) { + return null; + } + numbers.sort((a2, b2) => Math.abs(input - a2) - Math.abs(input - b2)); + return numbers[0]; +} +function extractFontWeights(fontFaces) { + const result = []; + fontFaces.forEach((face) => { + const weights = String(face.fontWeight).split(" "); + if (weights.length === 2) { + const start = parseInt(weights[0]); + const end = parseInt(weights[1]); + for (let i2 = start; i2 <= end; i2 += 100) { + result.push(i2); + } + } else if (weights.length === 1) { + result.push(parseInt(weights[0])); + } + }); + return result; +} +function formatFontFamily(input) { + const regex = /^(?!generic\([ a-zA-Z\-]+\)$)(?!^[a-zA-Z\-]+$).+/; + const output = input.trim(); + const formatItem = (item) => { + item = item.trim(); + if (item.match(regex)) { + item = item.replace(/^["']|["']$/g, ""); + return `"${item}"`; + } + return item; + }; + if (output.includes(",")) { + return output.split(",").map(formatItem).filter((item) => item !== "").join(", "); + } + return formatItem(output); +} +function formatFontFaceName(input) { + if (!input) { + return ""; + } + let output = input.trim(); + if (output.includes(",")) { + output = (output.split(",").find((item) => item.trim() !== "") ?? "").trim(); + } + output = output.replace(/^["']|["']$/g, ""); + if (window.navigator.userAgent.toLowerCase().includes("firefox")) { + output = `"${output}"`; + } + return output; +} +function getFamilyPreviewStyle(family) { + const style = { + fontFamily: formatFontFamily(family.fontFamily) + }; + if (!("fontFace" in family) || !Array.isArray(family.fontFace)) { + style.fontWeight = "400"; + style.fontStyle = "normal"; + return style; + } + if (family.fontFace) { + const normalFaces = family.fontFace.filter( + (face) => face?.fontStyle && face.fontStyle.toLowerCase() === "normal" + ); + if (normalFaces.length > 0) { + style.fontStyle = "normal"; + const normalWeights = extractFontWeights(normalFaces); + const nearestWeight = findNearest(400, normalWeights); + style.fontWeight = String(nearestWeight) || "400"; + } else { + style.fontStyle = family.fontFace.length && family.fontFace[0].fontStyle || "normal"; + style.fontWeight = family.fontFace.length && String(family.fontFace[0].fontWeight) || "400"; + } + } + return style; +} +function getFacePreviewStyle(face) { + return { + fontFamily: formatFontFamily(face.fontFamily), + fontStyle: face.fontStyle || "normal", + fontWeight: face.fontWeight || "400" + }; +} + +// packages/global-styles-ui/build-module/typography-example.mjs +var import_jsx_runtime13 = __toESM(require_jsx_runtime(), 1); +function PreviewTypography({ + fontSize, + variation +}) { + const { base } = (0, import_element7.useContext)(GlobalStylesContext); + let config = base; + if (variation) { + config = { ...base, ...variation }; + } + const [textColor] = useStyle("color.text"); + const [bodyFontFamilies, headingFontFamilies] = getFontFamilies(config); + const bodyPreviewStyle = bodyFontFamilies ? getFamilyPreviewStyle(bodyFontFamilies) : {}; + const headingPreviewStyle = headingFontFamilies ? getFamilyPreviewStyle(headingFontFamilies) : {}; + if (textColor) { + bodyPreviewStyle.color = textColor; + headingPreviewStyle.color = textColor; + } + if (fontSize) { + bodyPreviewStyle.fontSize = fontSize; + headingPreviewStyle.fontSize = fontSize; + } + return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)( + import_components4.__unstableMotion.div, + { + animate: { + scale: 1, + opacity: 1 + }, + initial: { + scale: 0.1, + opacity: 0 + }, + transition: { + delay: 0.3, + type: "tween" + }, + style: { + textAlign: "center", + lineHeight: 1 + }, + children: [ + /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { style: headingPreviewStyle, children: (0, import_i18n3._x)("A", "Uppercase letter A") }), + /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { style: bodyPreviewStyle, children: (0, import_i18n3._x)("a", "Lowercase letter A") }) + ] + } + ); +} + +// packages/global-styles-ui/build-module/highlighted-colors.mjs +var import_components5 = __toESM(require_components(), 1); +var import_jsx_runtime14 = __toESM(require_jsx_runtime(), 1); +function HighlightedColors({ + normalizedColorSwatchSize, + ratio +}) { + const { highlightedColors } = useStylesPreviewColors(); + const scaledSwatchSize = normalizedColorSwatchSize * ratio; + return highlightedColors.map(({ slug, color }, index) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)( + import_components5.__unstableMotion.div, + { + style: { + height: scaledSwatchSize, + width: scaledSwatchSize, + background: color, + borderRadius: scaledSwatchSize / 2 + }, + animate: { + scale: 1, + opacity: 1 + }, + initial: { + scale: 0.1, + opacity: 0 + }, + transition: { + delay: index === 1 ? 0.2 : 0.1 + } + }, + `${slug}-${index}` + )); +} + +// packages/global-styles-ui/build-module/preview-wrapper.mjs +var import_components6 = __toESM(require_components(), 1); +var import_compose = __toESM(require_compose(), 1); +var import_element8 = __toESM(require_element(), 1); +var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1); +var normalizedWidth = 248; +var normalizedHeight = 152; +var THROTTLE_OPTIONS = { + leading: true, + trailing: true +}; +function PreviewWrapper({ + children, + label, + isFocused, + withHoverView +}) { + const [backgroundColor = "white"] = useStyle("color.background"); + const [gradientValue] = useStyle("color.gradient"); + const disableMotion = (0, import_compose.useReducedMotion)(); + const [isHovered, setIsHovered] = (0, import_element8.useState)(false); + const [containerResizeListener, { width }] = (0, import_compose.useResizeObserver)(); + const [throttledWidth, setThrottledWidthState] = (0, import_element8.useState)(width); + const [ratioState, setRatioState] = (0, import_element8.useState)(); + const setThrottledWidth = (0, import_compose.useThrottle)( + setThrottledWidthState, + 250, + THROTTLE_OPTIONS + ); + (0, import_element8.useLayoutEffect)(() => { + if (width) { + setThrottledWidth(width); + } + }, [width, setThrottledWidth]); + (0, import_element8.useLayoutEffect)(() => { + const newRatio = throttledWidth ? throttledWidth / normalizedWidth : 1; + const ratioDiff = newRatio - (ratioState || 0); + const isRatioDiffBigEnough = Math.abs(ratioDiff) > 0.1; + if (isRatioDiffBigEnough || !ratioState) { + setRatioState(newRatio); + } + }, [throttledWidth, ratioState]); + const fallbackRatio = width ? width / normalizedWidth : 1; + const ratio = ratioState ? ratioState : fallbackRatio; + const isReady = !!width; + return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [ + /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { style: { position: "relative" }, children: containerResizeListener }), + isReady && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)( + "div", + { + className: "global-styles-ui-preview__wrapper", + style: { + height: normalizedHeight * ratio + }, + onMouseEnter: () => setIsHovered(true), + onMouseLeave: () => setIsHovered(false), + tabIndex: -1, + children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)( + import_components6.__unstableMotion.div, + { + style: { + height: normalizedHeight * ratio, + width: "100%", + background: gradientValue ?? backgroundColor, + cursor: withHoverView ? "pointer" : void 0 + }, + initial: "start", + animate: (isHovered || isFocused) && !disableMotion && label ? "hover" : "start", + children: [].concat(children).map( + (child, key) => child({ ratio, key }) + ) + } + ) + } + ) + ] }); +} +var preview_wrapper_default = PreviewWrapper; + +// packages/global-styles-ui/build-module/preview-styles.mjs +var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1); +var firstFrameVariants = { + start: { + scale: 1, + opacity: 1 + }, + hover: { + scale: 0, + opacity: 0 + } +}; +var midFrameVariants = { + hover: { + opacity: 1 + }, + start: { + opacity: 0.5 + } +}; +var secondFrameVariants = { + hover: { + scale: 1, + opacity: 1 + }, + start: { + scale: 0, + opacity: 0 + } +}; +function PreviewStyles({ + label, + isFocused, + withHoverView, + variation +}) { + const [fontWeight] = useStyle("typography.fontWeight"); + const [fontFamily = "serif"] = useStyle( + "typography.fontFamily" + ); + const [headingFontFamily = fontFamily] = useStyle( + "elements.h1.typography.fontFamily" + ); + const [headingFontWeight = fontWeight] = useStyle( + "elements.h1.typography.fontWeight" + ); + const [textColor = "black"] = useStyle("color.text"); + const [headingColor = textColor] = useStyle( + "elements.h1.color.text" + ); + const { paletteColors } = useStylesPreviewColors(); + return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)( + preview_wrapper_default, + { + label, + isFocused, + withHoverView, + children: [ + ({ ratio, key }) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)( + import_components7.__unstableMotion.div, + { + variants: firstFrameVariants, + style: { + height: "100%", + overflow: "hidden" + }, + children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)( + import_components7.__experimentalHStack, + { + spacing: 10 * ratio, + justify: "center", + style: { + height: "100%", + overflow: "hidden" + }, + children: [ + /* @__PURE__ */ (0, import_jsx_runtime16.jsx)( + PreviewTypography, + { + fontSize: 65 * ratio, + variation + } + ), + /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_components7.__experimentalVStack, { spacing: 4 * ratio, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)( + HighlightedColors, + { + normalizedColorSwatchSize: 32, + ratio + } + ) }) + ] + } + ) + }, + key + ), + ({ key }) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)( + import_components7.__unstableMotion.div, + { + variants: withHoverView ? midFrameVariants : void 0, + style: { + height: "100%", + width: "100%", + position: "absolute", + top: 0, + overflow: "hidden", + filter: "blur(60px)", + opacity: 0.1 + }, + children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)( + import_components7.__experimentalHStack, + { + spacing: 0, + justify: "flex-start", + style: { + height: "100%", + overflow: "hidden" + }, + children: paletteColors.slice(0, 4).map(({ color }, index) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)( + "div", + { + style: { + height: "100%", + background: color, + flexGrow: 1 + } + }, + index + )) + } + ) + }, + key + ), + ({ ratio, key }) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)( + import_components7.__unstableMotion.div, + { + variants: secondFrameVariants, + style: { + height: "100%", + width: "100%", + overflow: "hidden", + position: "absolute", + top: 0 + }, + children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)( + import_components7.__experimentalVStack, + { + spacing: 3 * ratio, + justify: "center", + style: { + height: "100%", + overflow: "hidden", + padding: 10 * ratio, + boxSizing: "border-box" + }, + children: label && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)( + "div", + { + style: { + fontSize: 40 * ratio, + fontFamily: headingFontFamily, + color: headingColor, + fontWeight: headingFontWeight, + lineHeight: "1em", + textAlign: "center" + }, + children: label + } + ) + } + ) + }, + key + ) + ] + } + ); +} +var preview_styles_default = PreviewStyles; + +// packages/global-styles-ui/build-module/screen-root.mjs +var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1); + +// packages/global-styles-ui/build-module/screen-block-list.mjs +var import_blocks2 = __toESM(require_blocks(), 1); +var import_i18n6 = __toESM(require_i18n(), 1); +var import_components11 = __toESM(require_components(), 1); +var import_data4 = __toESM(require_data(), 1); +var import_element9 = __toESM(require_element(), 1); +var import_block_editor2 = __toESM(require_block_editor(), 1); +var import_compose2 = __toESM(require_compose(), 1); +import { speak } from "@wordpress/a11y"; + +// packages/global-styles-ui/build-module/variations/variations-panel.mjs +var import_blocks = __toESM(require_blocks(), 1); +var import_data3 = __toESM(require_data(), 1); +var import_components9 = __toESM(require_components(), 1); +var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1); +function getFilteredBlockStyles(blockStyles, variations) { + return blockStyles?.filter( + (style) => style.source === "block" || variations.includes(style.name) + ) || []; +} +function useBlockVariations(name2) { + const blockStyles = (0, import_data3.useSelect)( + (select) => { + const { getBlockStyles } = select(import_blocks.store); + return getBlockStyles(name2); + }, + [name2] + ); + const [variations] = useStyle("variations", name2); + const variationNames = Object.keys(variations ?? {}); + return getFilteredBlockStyles(blockStyles, variationNames); +} + +// packages/global-styles-ui/build-module/screen-header.mjs +var import_components10 = __toESM(require_components(), 1); +var import_i18n5 = __toESM(require_i18n(), 1); +var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1); + +// packages/global-styles-ui/build-module/screen-block-list.mjs +var import_jsx_runtime20 = __toESM(require_jsx_runtime(), 1); +var { + useHasDimensionsPanel: useHasDimensionsPanel2, + useHasTypographyPanel: useHasTypographyPanel2, + useHasBorderPanel, + useSettingsForBlockElement: useSettingsForBlockElement2, + useHasColorPanel: useHasColorPanel2 +} = unlock(import_block_editor2.privateApis); +function useSortedBlockTypes() { + const blockItems = (0, import_data4.useSelect)( + (select) => select(import_blocks2.store).getBlockTypes(), + [] + ); + const groupByType = (blocks, block) => { + const { core, noncore } = blocks; + const type = block.name.startsWith("core/") ? core : noncore; + type.push(block); + return blocks; + }; + const { core: coreItems, noncore: nonCoreItems } = blockItems.reduce( + groupByType, + { core: [], noncore: [] } + ); + return [...coreItems, ...nonCoreItems]; +} +function useBlockHasGlobalStyles(blockName) { + const [rawSettings] = useSetting("", blockName); + const settings = useSettingsForBlockElement2(rawSettings, blockName); + const hasTypographyPanel = useHasTypographyPanel2(settings); + const hasColorPanel = useHasColorPanel2(settings); + const hasBorderPanel = useHasBorderPanel(settings); + const hasDimensionsPanel = useHasDimensionsPanel2(settings); + const hasLayoutPanel = hasBorderPanel || hasDimensionsPanel; + const hasVariationsPanel = !!useBlockVariations(blockName)?.length; + const hasGlobalStyles = hasTypographyPanel || hasColorPanel || hasLayoutPanel || hasVariationsPanel; + return hasGlobalStyles; +} +function BlockMenuItem({ block }) { + const hasBlockMenuItem = useBlockHasGlobalStyles(block.name); + if (!hasBlockMenuItem) { + return null; + } + return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)( + NavigationButtonAsItem, + { + path: "/blocks/" + encodeURIComponent(block.name), + children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_components11.__experimentalHStack, { justify: "flex-start", children: [ + /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_block_editor2.BlockIcon, { icon: block.icon }), + /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_components11.FlexItem, { children: block.title }) + ] }) + } + ); +} +function BlockList({ filterValue }) { + const sortedBlockTypes = useSortedBlockTypes(); + const debouncedSpeak = (0, import_compose2.useDebounce)(speak, 500); + const { isMatchingSearchTerm } = (0, import_data4.useSelect)(import_blocks2.store); + const filteredBlockTypes = !filterValue ? sortedBlockTypes : sortedBlockTypes.filter( + (blockType) => isMatchingSearchTerm(blockType, filterValue) + ); + const blockTypesListRef = (0, import_element9.useRef)(null); + (0, import_element9.useEffect)(() => { + if (!filterValue) { + return; + } + const count = blockTypesListRef.current?.childElementCount || 0; + const resultsFoundMessage = (0, import_i18n6.sprintf)( + /* translators: %d: number of results. */ + (0, import_i18n6._n)("%d result found.", "%d results found.", count), + count + ); + debouncedSpeak(resultsFoundMessage, "polite"); + }, [filterValue, debouncedSpeak]); + return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)( + "div", + { + ref: blockTypesListRef, + className: "global-styles-ui-block-types-item-list", + role: "list", + children: filteredBlockTypes.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_components11.__experimentalText, { align: "center", as: "p", children: (0, import_i18n6.__)("No blocks found.") }) : filteredBlockTypes.map((block) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)( + BlockMenuItem, + { + block + }, + "menu-itemblock-" + block.name + )) + } + ); +} +var MemoizedBlockList = (0, import_element9.memo)(BlockList); + +// packages/global-styles-ui/build-module/screen-block.mjs +var import_blocks4 = __toESM(require_blocks(), 1); +var import_block_editor4 = __toESM(require_block_editor(), 1); +var import_element11 = __toESM(require_element(), 1); +var import_data5 = __toESM(require_data(), 1); +var import_core_data3 = __toESM(require_core_data(), 1); +var import_components14 = __toESM(require_components(), 1); +var import_i18n7 = __toESM(require_i18n(), 1); + +// packages/global-styles-ui/build-module/block-preview-panel.mjs +var import_block_editor3 = __toESM(require_block_editor(), 1); +var import_blocks3 = __toESM(require_blocks(), 1); +var import_components12 = __toESM(require_components(), 1); +var import_element10 = __toESM(require_element(), 1); +var import_jsx_runtime21 = __toESM(require_jsx_runtime(), 1); + +// packages/global-styles-ui/build-module/subtitle.mjs +var import_components13 = __toESM(require_components(), 1); +var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1); +function Subtitle({ children, level = 2 }) { + return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_components13.__experimentalHeading, { className: "global-styles-ui-subtitle", level, children }); +} + +// packages/global-styles-ui/build-module/screen-block.mjs +var import_jsx_runtime23 = __toESM(require_jsx_runtime(), 1); +var { + useHasDimensionsPanel: useHasDimensionsPanel3, + useHasTypographyPanel: useHasTypographyPanel3, + useHasBorderPanel: useHasBorderPanel2, + useSettingsForBlockElement: useSettingsForBlockElement3, + useHasColorPanel: useHasColorPanel3, + useHasFiltersPanel, + useHasImageSettingsPanel, + useHasBackgroundPanel: useHasBackgroundPanel2, + BackgroundPanel: StylesBackgroundPanel, + BorderPanel: StylesBorderPanel, + ColorPanel: StylesColorPanel, + TypographyPanel: StylesTypographyPanel, + DimensionsPanel: StylesDimensionsPanel, + FiltersPanel: StylesFiltersPanel, + ImageSettingsPanel, + AdvancedPanel: StylesAdvancedPanel +} = unlock(import_block_editor4.privateApis); + +// packages/global-styles-ui/build-module/screen-typography.mjs +var import_i18n21 = __toESM(require_i18n(), 1); +var import_components34 = __toESM(require_components(), 1); +var import_element22 = __toESM(require_element(), 1); + +// packages/global-styles-ui/build-module/screen-body.mjs +var import_components15 = __toESM(require_components(), 1); +var import_jsx_runtime24 = __toESM(require_jsx_runtime(), 1); + +// packages/global-styles-ui/build-module/typography-elements.mjs +var import_i18n8 = __toESM(require_i18n(), 1); +var import_components16 = __toESM(require_components(), 1); +var import_jsx_runtime25 = __toESM(require_jsx_runtime(), 1); + +// packages/global-styles-ui/build-module/variations/variations-typography.mjs +var import_components19 = __toESM(require_components(), 1); + +// packages/global-styles-ui/build-module/preview-typography.mjs +var import_components17 = __toESM(require_components(), 1); +var import_jsx_runtime26 = __toESM(require_jsx_runtime(), 1); +var StylesPreviewTypography = ({ + variation, + isFocused, + withHoverView +}) => { + return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)( + preview_wrapper_default, + { + label: variation.title, + isFocused, + withHoverView, + children: ({ ratio, key }) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)( + import_components17.__experimentalHStack, + { + spacing: 10 * ratio, + justify: "center", + style: { + height: "100%", + overflow: "hidden" + }, + children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)( + PreviewTypography, + { + variation, + fontSize: 85 * ratio + } + ) + }, + key + ) + } + ); +}; +var preview_typography_default = StylesPreviewTypography; + +// packages/global-styles-ui/build-module/variations/variation.mjs +var import_components18 = __toESM(require_components(), 1); +var import_element12 = __toESM(require_element(), 1); +var import_keycodes = __toESM(require_keycodes(), 1); +var import_i18n9 = __toESM(require_i18n(), 1); +var import_jsx_runtime27 = __toESM(require_jsx_runtime(), 1); +function Variation({ + variation, + children, + isPill = false, + properties, + showTooltip = false +}) { + const [isFocused, setIsFocused] = (0, import_element12.useState)(false); + const { + base, + user, + onChange: setUserConfig + } = (0, import_element12.useContext)(GlobalStylesContext); + const context = (0, import_element12.useMemo)(() => { + let merged = mergeGlobalStyles(base, variation); + if (properties) { + merged = filterObjectByProperties(merged, properties); + } + return { + user: variation, + base, + merged, + onChange: () => { + } + }; + }, [variation, base, properties]); + const selectVariation = () => setUserConfig(variation); + const selectOnEnter = (event) => { + if (event.keyCode === import_keycodes.ENTER) { + event.preventDefault(); + selectVariation(); + } + }; + const isActive = (0, import_element12.useMemo)( + () => areGlobalStylesEqual(user, variation), + [user, variation] + ); + let label = variation?.title; + if (variation?.description) { + label = (0, import_i18n9.sprintf)( + /* translators: 1: variation title. 2: variation description. */ + (0, import_i18n9._x)("%1$s (%2$s)", "variation label"), + variation?.title, + variation?.description + ); + } + const content = /* @__PURE__ */ (0, import_jsx_runtime27.jsx)( + "div", + { + className: clsx_default("global-styles-ui-variations_item", { + "is-active": isActive + }), + role: "button", + onClick: selectVariation, + onKeyDown: selectOnEnter, + tabIndex: 0, + "aria-label": label, + "aria-current": isActive, + onFocus: () => setIsFocused(true), + onBlur: () => setIsFocused(false), + children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)( + "div", + { + className: clsx_default("global-styles-ui-variations_item-preview", { + "is-pill": isPill + }), + children: children(isFocused) + } + ) + } + ); + return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(GlobalStylesContext.Provider, { value: context, children: showTooltip ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_components18.Tooltip, { text: variation?.title, children: content }) : content }); +} + +// packages/global-styles-ui/build-module/variations/variations-typography.mjs +var import_jsx_runtime28 = __toESM(require_jsx_runtime(), 1); +var propertiesToFilter = ["typography"]; +function TypographyVariations({ + title, + gap = 2 +}) { + const typographyVariations = useCurrentMergeThemeStyleVariationsWithUserConfig(propertiesToFilter); + if (typographyVariations?.length <= 1) { + return null; + } + return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_components19.__experimentalVStack, { spacing: 3, children: [ + title && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Subtitle, { level: 3, children: title }), + /* @__PURE__ */ (0, import_jsx_runtime28.jsx)( + import_components19.__experimentalGrid, + { + columns: 3, + gap, + className: "global-styles-ui-style-variations-container", + children: typographyVariations.map( + (variation, index) => { + return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)( + Variation, + { + variation, + properties: propertiesToFilter, + showTooltip: true, + children: () => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)( + preview_typography_default, + { + variation + } + ) + }, + index + ); + } + ) + } + ) + ] }); +} + +// packages/global-styles-ui/build-module/font-families.mjs +var import_i18n19 = __toESM(require_i18n(), 1); +var import_components32 = __toESM(require_components(), 1); +var import_element21 = __toESM(require_element(), 1); + +// packages/global-styles-ui/build-module/font-library/context.mjs +var import_element13 = __toESM(require_element(), 1); +var import_data6 = __toESM(require_data(), 1); +var import_core_data5 = __toESM(require_core_data(), 1); +var import_i18n11 = __toESM(require_i18n(), 1); + +// packages/global-styles-ui/build-module/font-library/api.mjs +var import_api_fetch = __toESM(require_api_fetch(), 1); +var import_core_data4 = __toESM(require_core_data(), 1); +var FONT_FAMILIES_URL = "/wp/v2/font-families"; +function invalidateFontFamilyCache(registry) { + const { receiveEntityRecords } = registry.dispatch(import_core_data4.store); + receiveEntityRecords( + "postType", + "wp_font_family", + [], + void 0, + true + // invalidateCache + ); +} +async function fetchInstallFontFamily(data, registry) { + const config = { + path: FONT_FAMILIES_URL, + method: "POST", + body: data + }; + const response = await (0, import_api_fetch.default)(config); + invalidateFontFamilyCache(registry); + return { + id: response.id, + ...response.font_family_settings, + fontFace: [] + }; +} +async function fetchInstallFontFace(fontFamilyId, data, registry) { + const config = { + path: `${FONT_FAMILIES_URL}/${fontFamilyId}/font-faces`, + method: "POST", + body: data + }; + const response = await (0, import_api_fetch.default)(config); + invalidateFontFamilyCache(registry); + return { + id: response.id, + ...response.font_face_settings + }; +} + +// packages/global-styles-ui/build-module/font-library/utils/index.mjs +var import_components20 = __toESM(require_components(), 1); + +// packages/global-styles-ui/build-module/font-library/utils/constants.mjs +var import_i18n10 = __toESM(require_i18n(), 1); +var ALLOWED_FILE_EXTENSIONS = ["otf", "ttf", "woff", "woff2"]; +var FONT_WEIGHTS = { + 100: (0, import_i18n10._x)("Thin", "font weight"), + 200: (0, import_i18n10._x)("Extra-light", "font weight"), + 300: (0, import_i18n10._x)("Light", "font weight"), + 400: (0, import_i18n10._x)("Normal", "font weight"), + 500: (0, import_i18n10._x)("Medium", "font weight"), + 600: (0, import_i18n10._x)("Semi-bold", "font weight"), + 700: (0, import_i18n10._x)("Bold", "font weight"), + 800: (0, import_i18n10._x)("Extra-bold", "font weight"), + 900: (0, import_i18n10._x)("Black", "font weight") +}; +var FONT_STYLES = { + normal: (0, import_i18n10._x)("Normal", "font style"), + italic: (0, import_i18n10._x)("Italic", "font style") +}; + +// packages/global-styles-ui/build-module/font-library/utils/index.mjs +var { File } = window; +var { kebabCase } = unlock(import_components20.privateApis); +function setUIValuesNeeded(font2, extraValues = {}) { + if (!font2.name && (font2.fontFamily || font2.slug)) { + font2.name = font2.fontFamily || font2.slug; + } + return { + ...font2, + ...extraValues + }; +} +function isUrlEncoded(url) { + if (typeof url !== "string") { + return false; + } + return url !== decodeURIComponent(url); +} +function getFontFaceVariantName(face) { + const weightName = FONT_WEIGHTS[face.fontWeight ?? ""] || face.fontWeight; + const styleName = face.fontStyle === "normal" ? "" : FONT_STYLES[face.fontStyle ?? ""] || face.fontStyle; + return `${weightName} ${styleName}`; +} +function mergeFontFaces(existing = [], incoming = []) { + const map = /* @__PURE__ */ new Map(); + for (const face of existing) { + map.set(`${face.fontWeight}${face.fontStyle}`, face); + } + for (const face of incoming) { + map.set(`${face.fontWeight}${face.fontStyle}`, face); + } + return Array.from(map.values()); +} +function mergeFontFamilies(existing = [], incoming = []) { + const map = /* @__PURE__ */ new Map(); + for (const font2 of existing) { + map.set(font2.slug, { ...font2 }); + } + for (const font2 of incoming) { + if (map.has(font2.slug)) { + const { fontFace: incomingFontFaces, ...restIncoming } = font2; + const existingFont = map.get(font2.slug); + const mergedFontFaces = mergeFontFaces( + existingFont.fontFace, + incomingFontFaces + ); + map.set(font2.slug, { + ...restIncoming, + fontFace: mergedFontFaces + }); + } else { + map.set(font2.slug, { ...font2 }); + } + } + return Array.from(map.values()); +} +async function loadFontFaceInBrowser(fontFace, source, addTo = "all") { + let dataSource; + if (typeof source === "string") { + dataSource = `url(${source})`; + } else if (source instanceof File) { + dataSource = await source.arrayBuffer(); + } else { + return; + } + const newFont = new window.FontFace( + formatFontFaceName(fontFace.fontFamily), + dataSource, + { + style: fontFace.fontStyle, + weight: String(fontFace.fontWeight) + } + ); + const loadedFace = await newFont.load(); + if (addTo === "document" || addTo === "all") { + document.fonts.add(loadedFace); + } + if (addTo === "iframe" || addTo === "all") { + const iframe = document.querySelector( + 'iframe[name="editor-canvas"]' + ); + if (iframe?.contentDocument) { + iframe.contentDocument.fonts.add(loadedFace); + } + } +} +function unloadFontFaceInBrowser(fontFace, removeFrom = "all") { + const unloadFontFace = (fonts) => { + fonts.forEach((f2) => { + if (f2.family === formatFontFaceName(fontFace?.fontFamily) && f2.weight === fontFace?.fontWeight && f2.style === fontFace?.fontStyle) { + fonts.delete(f2); + } + }); + }; + if (removeFrom === "document" || removeFrom === "all") { + unloadFontFace(document.fonts); + } + if (removeFrom === "iframe" || removeFrom === "all") { + const iframe = document.querySelector( + 'iframe[name="editor-canvas"]' + ); + if (iframe?.contentDocument) { + unloadFontFace(iframe.contentDocument.fonts); + } + } +} +function getDisplaySrcFromFontFace(input) { + if (!input) { + return; + } + let src; + if (Array.isArray(input)) { + src = input[0]; + } else { + src = input; + } + if (src.startsWith("file:.")) { + return; + } + if (!isUrlEncoded(src)) { + src = encodeURI(src); + } + return src; +} +function makeFontFamilyFormData(fontFamily) { + const formData = new FormData(); + const { fontFace, category, ...familyWithValidParameters } = fontFamily; + const fontFamilySettings = { + ...familyWithValidParameters, + slug: kebabCase(fontFamily.slug) + }; + formData.append( + "font_family_settings", + JSON.stringify(fontFamilySettings) + ); + return formData; +} +function makeFontFacesFormData(font2) { + const fontFacesFormData = (font2?.fontFace ?? []).map( + (item, faceIndex) => { + const face = { ...item }; + const formData = new FormData(); + if (face.file) { + const files = Array.isArray(face.file) ? face.file : [face.file]; + const src = []; + files.forEach((file, key) => { + const fileId = `file-${faceIndex}-${key}`; + formData.append(fileId, file, file.name); + src.push(fileId); + }); + face.src = src.length === 1 ? src[0] : src; + delete face.file; + formData.append("font_face_settings", JSON.stringify(face)); + } else { + formData.append("font_face_settings", JSON.stringify(face)); + } + return formData; + } + ); + return fontFacesFormData; +} +async function batchInstallFontFaces(fontFamilyId, fontFacesData, registry) { + const responses = []; + for (const faceData of fontFacesData) { + try { + const response = await fetchInstallFontFace( + fontFamilyId, + faceData, + registry + ); + responses.push({ status: "fulfilled", value: response }); + } catch (error) { + responses.push({ status: "rejected", reason: error }); + } + } + const results = { + errors: [], + successes: [] + }; + responses.forEach((result, index) => { + if (result.status === "fulfilled" && result.value) { + const response = result.value; + results.successes.push(response); + } else if (result.reason) { + results.errors.push({ + data: fontFacesData[index], + message: result.reason.message + }); + } + }); + return results; +} +async function downloadFontFaceAssets(src) { + src = Array.isArray(src) ? src : [src]; + const files = await Promise.all( + src.map(async (url) => { + return fetch(new Request(url)).then((response) => { + if (!response.ok) { + throw new Error( + `Error downloading font face asset from ${url}. Server responded with status: ${response.status}` + ); + } + return response.blob(); + }).then((blob) => { + const filename = url.split("/").pop(); + const file = new File([blob], filename, { + type: blob.type + }); + return file; + }); + }) + ); + return files.length === 1 ? files[0] : files; +} +function checkFontFaceInstalled(fontFace, collection) { + return -1 !== collection.findIndex((collectionFontFace) => { + return collectionFontFace.fontWeight === fontFace.fontWeight && collectionFontFace.fontStyle === fontFace.fontStyle; + }); +} + +// packages/global-styles-ui/build-module/font-library/utils/set-immutably.mjs +function setImmutably2(object, path, value) { + path = Array.isArray(path) ? [...path] : [path]; + object = Array.isArray(object) ? [...object] : { ...object }; + const leaf = path.pop(); + let prev = object; + for (const key of path) { + const lvl = prev[key]; + prev = prev[key] = Array.isArray(lvl) ? [...lvl] : { ...lvl }; + } + prev[leaf] = value; + return object; +} + +// packages/global-styles-ui/build-module/font-library/utils/toggleFont.mjs +function toggleFont(font2, face, initialfonts = []) { + const isFontActivated = (f2) => f2.slug === font2.slug; + const getActivatedFont = (fonts) => fonts.find(isFontActivated); + const toggleEntireFontFamily = (activatedFont2) => { + if (!activatedFont2) { + return [...initialfonts, font2]; + } + return initialfonts.filter( + (f2) => !isFontActivated(f2) + ); + }; + const toggleFontVariant = (activatedFont2) => { + const isFaceActivated = (f2) => f2.fontWeight === face.fontWeight && f2.fontStyle === face.fontStyle; + if (!activatedFont2) { + return [...initialfonts, { ...font2, fontFace: [face] }]; + } + let newFontFaces = activatedFont2.fontFace || []; + if (newFontFaces.find(isFaceActivated)) { + newFontFaces = newFontFaces.filter( + (f2) => !isFaceActivated(f2) + ); + } else { + newFontFaces = [...newFontFaces, face]; + } + if (newFontFaces.length === 0) { + return initialfonts.filter( + (f2) => !isFontActivated(f2) + ); + } + return initialfonts.map( + (f2) => isFontActivated(f2) ? { ...f2, fontFace: newFontFaces } : f2 + ); + }; + const activatedFont = getActivatedFont(initialfonts); + if (!face) { + return toggleEntireFontFamily(activatedFont); + } + return toggleFontVariant(activatedFont); +} + +// packages/global-styles-ui/build-module/font-library/context.mjs +var import_jsx_runtime29 = __toESM(require_jsx_runtime(), 1); +var FontLibraryContext = (0, import_element13.createContext)( + {} +); +FontLibraryContext.displayName = "FontLibraryContext"; +function FontLibraryProvider({ children }) { + const registry = (0, import_data6.useRegistry)(); + const { saveEntityRecord, deleteEntityRecord } = (0, import_data6.useDispatch)(import_core_data5.store); + const { globalStylesId } = (0, import_data6.useSelect)((select) => { + const { __experimentalGetCurrentGlobalStylesId } = select(import_core_data5.store); + return { globalStylesId: __experimentalGetCurrentGlobalStylesId() }; + }, []); + const globalStyles = (0, import_core_data5.useEntityRecord)( + "root", + "globalStyles", + globalStylesId + ); + const [isInstalling, setIsInstalling] = (0, import_element13.useState)(false); + const { records: libraryPosts = [], isResolving: isResolvingLibrary } = (0, import_core_data5.useEntityRecords)( + "postType", + "wp_font_family", + { + _embed: true + } + ); + const libraryFonts = (libraryPosts || []).map((fontFamilyPost) => { + return { + id: fontFamilyPost.id, + ...fontFamilyPost.font_family_settings || {}, + fontFace: fontFamilyPost?._embedded?.font_faces?.map( + (face) => face.font_face_settings + ) || [] + }; + }) || []; + const [fontFamilies, setFontFamilies] = useSetting("typography.fontFamilies"); + const saveFontFamilies = async (fonts) => { + if (!globalStyles.record) { + return; + } + const updatedGlobalStyles = globalStyles.record; + const finalGlobalStyles = setImmutably2( + updatedGlobalStyles ?? {}, + ["settings", "typography", "fontFamilies"], + fonts + ); + await saveEntityRecord("root", "globalStyles", finalGlobalStyles); + }; + const [modalTabOpen, setModalTabOpen] = (0, import_element13.useState)(""); + const [libraryFontSelected, setLibraryFontSelected] = (0, import_element13.useState)(void 0); + const themeFonts = fontFamilies?.theme ? fontFamilies.theme.map((f2) => setUIValuesNeeded(f2, { source: "theme" })).sort((a2, b2) => a2.name.localeCompare(b2.name)) : []; + const customFonts = fontFamilies?.custom ? fontFamilies.custom.map((f2) => setUIValuesNeeded(f2, { source: "custom" })).sort((a2, b2) => a2.name.localeCompare(b2.name)) : []; + const baseCustomFonts = libraryFonts ? libraryFonts.map((f2) => setUIValuesNeeded(f2, { source: "custom" })).sort((a2, b2) => a2.name.localeCompare(b2.name)) : []; + (0, import_element13.useEffect)(() => { + if (!modalTabOpen) { + setLibraryFontSelected(void 0); + } + }, [modalTabOpen]); + const handleSetLibraryFontSelected = (font2) => { + if (!font2) { + setLibraryFontSelected(void 0); + return; + } + const fonts = font2.source === "theme" ? themeFonts : baseCustomFonts; + const fontSelected = fonts.find((f2) => f2.slug === font2.slug); + setLibraryFontSelected({ + ...fontSelected || font2, + source: font2.source + }); + }; + const [loadedFontUrls] = (0, import_element13.useState)(/* @__PURE__ */ new Set()); + const getAvailableFontsOutline = (availableFontFamilies) => { + const outline = availableFontFamilies.reduce( + (acc, font2) => { + const availableFontFaces = font2?.fontFace && font2.fontFace?.length > 0 ? font2?.fontFace.map( + (face) => `${face.fontStyle ?? ""}${face.fontWeight ?? ""}` + ) : ["normal400"]; + acc[font2.slug] = availableFontFaces; + return acc; + }, + {} + ); + return outline; + }; + const getActivatedFontsOutline = (source) => { + switch (source) { + case "theme": + return getAvailableFontsOutline(themeFonts); + case "custom": + default: + return getAvailableFontsOutline(customFonts); + } + }; + const isFontActivated = (slug, style, weight, source) => { + if (!style && !weight) { + return !!getActivatedFontsOutline(source)[slug]; + } + return !!getActivatedFontsOutline(source)[slug]?.includes( + (style ?? "") + (weight ?? "") + ); + }; + const getFontFacesActivated = (slug, source) => { + return getActivatedFontsOutline(source)[slug] || []; + }; + async function installFonts(fontFamiliesToInstall) { + setIsInstalling(true); + try { + const fontFamiliesToActivate = []; + let installationErrors = []; + for (const fontFamilyToInstall of fontFamiliesToInstall) { + let isANewFontFamily = false; + const fontFamilyRecords = await (0, import_data6.resolveSelect)( + import_core_data5.store + ).getEntityRecords( + "postType", + "wp_font_family", + { + slug: fontFamilyToInstall.slug, + per_page: 1, + _embed: true + } + ); + const fontFamilyPost = fontFamilyRecords && fontFamilyRecords.length > 0 ? fontFamilyRecords[0] : null; + let installedFontFamily = fontFamilyPost ? { + id: fontFamilyPost.id, + ...fontFamilyPost.font_family_settings, + fontFace: (fontFamilyPost?._embedded?.font_faces ?? []).map( + (face) => face.font_face_settings + ) || [] + } : null; + if (!installedFontFamily) { + isANewFontFamily = true; + installedFontFamily = await fetchInstallFontFamily( + makeFontFamilyFormData(fontFamilyToInstall), + registry + ); + } + const alreadyInstalledFontFaces = installedFontFamily.fontFace && fontFamilyToInstall.fontFace ? installedFontFamily.fontFace.filter( + (fontFaceToInstall) => fontFaceToInstall && fontFamilyToInstall.fontFace && checkFontFaceInstalled( + fontFaceToInstall, + fontFamilyToInstall.fontFace + ) + ) : []; + if (installedFontFamily.fontFace && fontFamilyToInstall.fontFace) { + fontFamilyToInstall.fontFace = fontFamilyToInstall.fontFace.filter( + (fontFaceToInstall) => !checkFontFaceInstalled( + fontFaceToInstall, + installedFontFamily.fontFace + ) + ); + } + let successfullyInstalledFontFaces = []; + let unsuccessfullyInstalledFontFaces = []; + if (fontFamilyToInstall?.fontFace?.length ?? 0 > 0) { + const response = await batchInstallFontFaces( + // @ts-expect-error - Type mismatch: WpFontFamily.id can be number | string, but batchInstallFontFaces expects only string. + installedFontFamily.id, + makeFontFacesFormData( + fontFamilyToInstall + ), + registry + ); + successfullyInstalledFontFaces = response?.successes; + unsuccessfullyInstalledFontFaces = response?.errors; + } + if (successfullyInstalledFontFaces?.length > 0 || alreadyInstalledFontFaces?.length > 0) { + installedFontFamily.fontFace = [ + ...successfullyInstalledFontFaces + ]; + fontFamiliesToActivate.push(installedFontFamily); + } + if (installedFontFamily && !fontFamilyToInstall?.fontFace?.length) { + fontFamiliesToActivate.push(installedFontFamily); + } + if (isANewFontFamily && (fontFamilyToInstall?.fontFace?.length ?? 0) > 0 && successfullyInstalledFontFaces?.length === 0) { + await deleteEntityRecord( + "postType", + "wp_font_family", + installedFontFamily.id, + { force: true } + ); + } + installationErrors = installationErrors.concat( + unsuccessfullyInstalledFontFaces + ); + } + const installationErrorMessages = installationErrors.reduce( + (unique, item) => unique.includes(item.message) ? unique : [...unique, item.message], + [] + ); + if (fontFamiliesToActivate.length > 0) { + const activeFonts = activateCustomFontFamilies( + // @ts-expect-error - Type mismatch: items may have id as number | string, but FontFamily.id should be string | undefined. + fontFamiliesToActivate + ); + await saveFontFamilies(activeFonts); + } + if (installationErrorMessages.length > 0) { + const installError = new Error((0, import_i18n11.__)("There was an error installing fonts.")); + installError.installationErrors = installationErrorMessages; + throw installError; + } + } finally { + setIsInstalling(false); + } + } + async function uninstallFontFamily(fontFamilyToUninstall) { + if (!fontFamilyToUninstall?.id) { + throw new Error((0, import_i18n11.__)("Font family to uninstall is not defined.")); + } + try { + await deleteEntityRecord( + "postType", + "wp_font_family", + fontFamilyToUninstall.id, + { force: true } + ); + const activeFonts = deactivateFontFamily(fontFamilyToUninstall); + await saveFontFamilies(activeFonts); + return { deleted: true }; + } catch (error) { + console.error( + `There was an error uninstalling the font family:`, + error + ); + throw error; + } + } + const deactivateFontFamily = (font2) => { + const initialCustomFonts = fontFamilies?.[font2.source ?? ""] ?? []; + const newCustomFonts = initialCustomFonts.filter( + (f2) => f2.slug !== font2.slug + ); + const activeFonts = { + ...fontFamilies, + [font2.source ?? ""]: newCustomFonts + }; + setFontFamilies(activeFonts); + if (font2.fontFace) { + font2.fontFace.forEach((face) => { + unloadFontFaceInBrowser(face, "all"); + }); + } + return activeFonts; + }; + const activateCustomFontFamilies = (fontsToAdd) => { + const fontsToActivate = cleanFontsForSave(fontsToAdd); + const activeFonts = { + ...fontFamilies, + // Merge the existing custom fonts with the new fonts. + custom: mergeFontFamilies(fontFamilies?.custom, fontsToActivate) + }; + setFontFamilies(activeFonts); + loadFontsInBrowser(fontsToActivate); + return activeFonts; + }; + const cleanFontsForSave = (fonts) => { + return fonts.map(({ id: _familyDbId, fontFace, ...font2 }) => ({ + ...font2, + ...fontFace && fontFace.length > 0 ? { + fontFace: fontFace.map( + ({ id: _faceDbId, ...face }) => face + ) + } : {} + })); + }; + const loadFontsInBrowser = (fonts) => { + fonts.forEach((font2) => { + if (font2.fontFace) { + font2.fontFace.forEach((face) => { + const displaySrc = getDisplaySrcFromFontFace( + face?.src ?? "" + ); + if (displaySrc) { + loadFontFaceInBrowser(face, displaySrc, "all"); + } + }); + } + }); + }; + const toggleActivateFont = (font2, face) => { + const initialFonts = fontFamilies?.[font2.source ?? ""] ?? []; + const newFonts = toggleFont(font2, face, initialFonts); + setFontFamilies({ + ...fontFamilies, + [font2.source ?? ""]: newFonts + }); + const isFaceActivated = isFontActivated( + font2.slug, + face?.fontStyle ?? "", + face?.fontWeight ?? "", + font2.source ?? "custom" + ); + if (face && isFaceActivated) { + unloadFontFaceInBrowser(face, "all"); + } else { + const displaySrc = getDisplaySrcFromFontFace(face?.src ?? ""); + if (face && displaySrc) { + loadFontFaceInBrowser(face, displaySrc, "all"); + } + } + }; + const loadFontFaceAsset = async (fontFace) => { + if (!fontFace.src) { + return; + } + const src = getDisplaySrcFromFontFace(fontFace.src); + if (!src || loadedFontUrls.has(src)) { + return; + } + loadFontFaceInBrowser(fontFace, src, "document"); + loadedFontUrls.add(src); + }; + return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)( + FontLibraryContext.Provider, + { + value: { + libraryFontSelected, + handleSetLibraryFontSelected, + fontFamilies: fontFamilies ?? {}, + baseCustomFonts, + isFontActivated, + getFontFacesActivated, + loadFontFaceAsset, + installFonts, + uninstallFontFamily, + toggleActivateFont, + getAvailableFontsOutline, + modalTabOpen, + setModalTabOpen, + saveFontFamilies, + isResolvingLibrary, + isInstalling + }, + children + } + ); +} +var context_default = FontLibraryProvider; + +// packages/global-styles-ui/build-module/font-library/modal.mjs +var import_i18n17 = __toESM(require_i18n(), 1); +var import_components30 = __toESM(require_components(), 1); +var import_core_data8 = __toESM(require_core_data(), 1); +var import_data8 = __toESM(require_data(), 1); + +// packages/global-styles-ui/build-module/font-library/installed-fonts.mjs +var import_components24 = __toESM(require_components(), 1); +var import_core_data6 = __toESM(require_core_data(), 1); +var import_data7 = __toESM(require_data(), 1); +var import_element16 = __toESM(require_element(), 1); +var import_i18n13 = __toESM(require_i18n(), 1); + +// packages/global-styles-ui/build-module/font-library/font-card.mjs +var import_i18n12 = __toESM(require_i18n(), 1); +var import_components22 = __toESM(require_components(), 1); + +// packages/global-styles-ui/build-module/font-library/font-demo.mjs +var import_components21 = __toESM(require_components(), 1); +var import_element14 = __toESM(require_element(), 1); +var import_jsx_runtime30 = __toESM(require_jsx_runtime(), 1); +function getPreviewUrl(fontFace) { + if (fontFace.preview) { + return fontFace.preview; + } + if (fontFace.src) { + return Array.isArray(fontFace.src) ? fontFace.src[0] : fontFace.src; + } + return void 0; +} +function getDisplayFontFace(font2) { + if ("fontStyle" in font2 && font2.fontStyle || "fontWeight" in font2 && font2.fontWeight) { + return font2; + } + if ("fontFace" in font2 && font2.fontFace && font2.fontFace.length) { + return font2.fontFace.find( + (face) => face.fontStyle === "normal" && face.fontWeight === "400" + ) || font2.fontFace[0]; + } + return { + fontStyle: "normal", + fontWeight: "400", + fontFamily: font2.fontFamily + }; +} +function FontDemo({ font: font2, text }) { + const ref = (0, import_element14.useRef)(null); + const fontFace = getDisplayFontFace(font2); + const style = getFamilyPreviewStyle(font2); + text = text || ("name" in font2 ? font2.name : ""); + const customPreviewUrl = font2.preview; + const [isIntersecting, setIsIntersecting] = (0, import_element14.useState)(false); + const [isAssetLoaded, setIsAssetLoaded] = (0, import_element14.useState)(false); + const { loadFontFaceAsset } = (0, import_element14.useContext)(FontLibraryContext); + const previewUrl = customPreviewUrl ?? getPreviewUrl(fontFace); + const isPreviewImage = previewUrl && previewUrl.match(/\.(png|jpg|jpeg|gif|svg)$/i); + const faceStyles = getFacePreviewStyle(fontFace); + const textDemoStyle = { + fontSize: "18px", + lineHeight: 1, + opacity: isAssetLoaded ? "1" : "0", + ...style, + ...faceStyles + }; + (0, import_element14.useEffect)(() => { + const observer = new window.IntersectionObserver(([entry]) => { + setIsIntersecting(entry.isIntersecting); + }, {}); + if (ref.current) { + observer.observe(ref.current); + } + return () => observer.disconnect(); + }, [ref]); + (0, import_element14.useEffect)(() => { + const loadAsset = async () => { + if (isIntersecting) { + if (!isPreviewImage && fontFace.src) { + await loadFontFaceAsset(fontFace); + } + setIsAssetLoaded(true); + } + }; + loadAsset(); + }, [fontFace, isIntersecting, loadFontFaceAsset, isPreviewImage]); + return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { ref, children: isPreviewImage ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)( + "img", + { + src: previewUrl, + loading: "lazy", + alt: text, + className: "font-library__font-variant_demo-image" + } + ) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)( + import_components21.__experimentalText, + { + style: textDemoStyle, + className: "font-library__font-variant_demo-text", + children: text + } + ) }); +} +var font_demo_default = FontDemo; + +// packages/global-styles-ui/build-module/font-library/font-card.mjs +var import_jsx_runtime31 = __toESM(require_jsx_runtime(), 1); +function FontCard({ + font: font2, + onClick, + variantsText, + navigatorPath +}) { + const variantsCount = font2.fontFace?.length || 1; + const style = { + cursor: !!onClick ? "pointer" : "default" + }; + const navigator = (0, import_components22.useNavigator)(); + return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)( + import_components22.Button, + { + __next40pxDefaultSize: true, + onClick: () => { + onClick(); + if (navigatorPath) { + navigator.goTo(navigatorPath); + } + }, + style, + className: "font-library__font-card", + children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_components22.Flex, { justify: "space-between", wrap: false, children: [ + /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(font_demo_default, { font: font2 }), + /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_components22.Flex, { justify: "flex-end", children: [ + /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_components22.FlexItem, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_components22.__experimentalText, { className: "font-library__font-card__count", children: variantsText || (0, import_i18n12.sprintf)( + /* translators: %d: Number of font variants. */ + (0, import_i18n12._n)( + "%d variant", + "%d variants", + variantsCount + ), + variantsCount + ) }) }), + /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_components22.FlexItem, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(icon_default, { icon: (0, import_i18n12.isRTL)() ? chevron_left_default : chevron_right_default }) }) + ] }) + ] }) + } + ); +} +var font_card_default = FontCard; + +// packages/global-styles-ui/build-module/font-library/library-font-variant.mjs +var import_element15 = __toESM(require_element(), 1); +var import_components23 = __toESM(require_components(), 1); +var import_jsx_runtime32 = __toESM(require_jsx_runtime(), 1); +function LibraryFontVariant({ + face, + font: font2 +}) { + const { isFontActivated, toggleActivateFont } = (0, import_element15.useContext)(FontLibraryContext); + const isInstalled = (font2?.fontFace?.length ?? 0) > 0 ? isFontActivated( + font2.slug, + face.fontStyle, + face.fontWeight, + font2.source + ) : isFontActivated(font2.slug, void 0, void 0, font2.source); + const handleToggleActivation = () => { + if ((font2?.fontFace?.length ?? 0) > 0) { + toggleActivateFont(font2, face); + return; + } + toggleActivateFont(font2); + }; + const displayName = font2.name + " " + getFontFaceVariantName(face); + const checkboxId = (0, import_element15.useId)(); + return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "font-library__font-card", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_components23.Flex, { justify: "flex-start", align: "center", gap: "1rem", children: [ + /* @__PURE__ */ (0, import_jsx_runtime32.jsx)( + import_components23.CheckboxControl, + { + checked: isInstalled, + onChange: handleToggleActivation, + id: checkboxId + } + ), + /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("label", { htmlFor: checkboxId, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)( + font_demo_default, + { + font: face, + text: displayName, + onClick: handleToggleActivation + } + ) }) + ] }) }); +} +var library_font_variant_default = LibraryFontVariant; + +// packages/global-styles-ui/build-module/font-library/utils/sort-font-faces.mjs +function getNumericFontWeight(value) { + switch (value) { + case "normal": + return 400; + case "bold": + return 700; + case "bolder": + return 500; + case "lighter": + return 300; + default: + return parseInt(value, 10); + } +} +function sortFontFaces(faces) { + return faces.sort((a2, b2) => { + if (a2.fontStyle === "normal" && b2.fontStyle !== "normal") { + return -1; + } + if (b2.fontStyle === "normal" && a2.fontStyle !== "normal") { + return 1; + } + if (a2.fontStyle === b2.fontStyle) { + return getNumericFontWeight(a2.fontWeight?.toString() ?? "normal") - getNumericFontWeight(b2.fontWeight?.toString() ?? "normal"); + } + if (!a2.fontStyle || !b2.fontStyle) { + return !a2.fontStyle ? 1 : -1; + } + return a2.fontStyle.localeCompare(b2.fontStyle); + }); +} + +// packages/global-styles-ui/build-module/font-library/installed-fonts.mjs +var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1); +function InstalledFonts() { + const { + baseCustomFonts, + libraryFontSelected, + handleSetLibraryFontSelected, + uninstallFontFamily, + isResolvingLibrary, + isInstalling, + saveFontFamilies, + getFontFacesActivated + } = (0, import_element16.useContext)(FontLibraryContext); + const [fontFamilies, setFontFamilies] = useSetting("typography.fontFamilies"); + const [isConfirmDeleteOpen, setIsConfirmDeleteOpen] = (0, import_element16.useState)(false); + const [notice, setNotice] = (0, import_element16.useState)(null); + const [baseFontFamilies] = useSetting("typography.fontFamilies", void 0, "base"); + const globalStylesId = (0, import_data7.useSelect)((select) => { + const { __experimentalGetCurrentGlobalStylesId } = select(import_core_data6.store); + return __experimentalGetCurrentGlobalStylesId(); + }, []); + const globalStyles = (0, import_core_data6.useEntityRecord)( + "root", + "globalStyles", + globalStylesId + ); + const fontFamiliesHasChanges = !!globalStyles?.edits?.settings?.typography?.fontFamilies; + const themeFonts = fontFamilies?.theme ? fontFamilies.theme.map((f2) => setUIValuesNeeded(f2, { source: "theme" })).sort((a2, b2) => a2.name.localeCompare(b2.name)) : []; + const themeFontsSlugs = new Set(themeFonts.map((f2) => f2.slug)); + const baseThemeFonts = baseFontFamilies?.theme ? themeFonts.concat( + baseFontFamilies.theme.filter((f2) => !themeFontsSlugs.has(f2.slug)).map((f2) => setUIValuesNeeded(f2, { source: "theme" })).sort((a2, b2) => a2.name.localeCompare(b2.name)) + ) : []; + const customFontFamilyId = libraryFontSelected?.source === "custom" && libraryFontSelected?.id; + const canUserDelete = (0, import_data7.useSelect)( + (select) => { + const { canUser } = select(import_core_data6.store); + return customFontFamilyId && canUser("delete", { + kind: "postType", + name: "wp_font_family", + id: customFontFamilyId + }); + }, + [customFontFamilyId] + ); + const shouldDisplayDeleteButton = !!libraryFontSelected && libraryFontSelected?.source !== "theme" && canUserDelete; + const handleUninstallClick = () => { + setIsConfirmDeleteOpen(true); + }; + const handleUpdate = async () => { + setNotice(null); + try { + await saveFontFamilies(fontFamilies); + setNotice({ + type: "success", + message: (0, import_i18n13.__)("Font family updated successfully.") + }); + } catch (error) { + setNotice({ + type: "error", + message: (0, import_i18n13.sprintf)( + /* translators: %s: error message */ + (0, import_i18n13.__)("There was an error updating the font family. %s"), + error.message + ) + }); + } + }; + const getFontFacesToDisplay = (font2) => { + if (!font2) { + return []; + } + if (!font2.fontFace || !font2.fontFace.length) { + return [ + { + fontFamily: font2.fontFamily, + fontStyle: "normal", + fontWeight: "400" + } + ]; + } + return sortFontFaces(font2.fontFace); + }; + const getFontCardVariantsText = (font2) => { + const variantsInstalled = font2?.fontFace && (font2?.fontFace?.length ?? 0) > 0 ? font2.fontFace.length : 1; + const variantsActive = getFontFacesActivated( + font2.slug, + font2.source + ).length; + return (0, import_i18n13.sprintf)( + /* translators: 1: Active font variants, 2: Total font variants. */ + (0, import_i18n13.__)("%1$d/%2$d variants active"), + variantsActive, + variantsInstalled + ); + }; + (0, import_element16.useEffect)(() => { + handleSetLibraryFontSelected(libraryFontSelected); + }, []); + const activeFontsCount = libraryFontSelected ? getFontFacesActivated( + libraryFontSelected.slug, + libraryFontSelected.source + ).length : 0; + const selectedFontsCount = libraryFontSelected?.fontFace?.length ?? (libraryFontSelected?.fontFamily ? 1 : 0); + const isIndeterminate = activeFontsCount > 0 && activeFontsCount !== selectedFontsCount; + const isSelectAllChecked = activeFontsCount === selectedFontsCount; + const toggleSelectAll = () => { + if (!libraryFontSelected || !libraryFontSelected?.source) { + return; + } + const initialFonts = fontFamilies?.[libraryFontSelected.source]?.filter( + (f2) => f2.slug !== libraryFontSelected.slug + ) ?? []; + const newFonts = isSelectAllChecked ? initialFonts : [...initialFonts, libraryFontSelected]; + setFontFamilies({ + ...fontFamilies, + [libraryFontSelected.source]: newFonts + }); + if (libraryFontSelected.fontFace) { + libraryFontSelected.fontFace.forEach((face) => { + if (isSelectAllChecked) { + unloadFontFaceInBrowser(face, "all"); + } else { + const displaySrc = getDisplaySrcFromFontFace( + face?.src ?? "" + ); + if (displaySrc) { + loadFontFaceInBrowser(face, displaySrc, "all"); + } + } + }); + } + }; + const hasFonts = baseThemeFonts.length > 0 || baseCustomFonts.length > 0; + return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "font-library__tabpanel-layout", children: [ + isResolvingLibrary && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "font-library__loading", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_components24.ProgressBar, {}) }), + !isResolvingLibrary && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [ + /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)( + import_components24.Navigator, + { + initialPath: libraryFontSelected ? "/fontFamily" : "/", + children: [ + /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_components24.Navigator.Screen, { path: "/", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_components24.__experimentalVStack, { spacing: "8", children: [ + notice && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)( + import_components24.Notice, + { + status: notice.type, + onRemove: () => setNotice(null), + children: notice.message + } + ), + !hasFonts && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_components24.__experimentalText, { as: "p", children: (0, import_i18n13.__)("No fonts installed.") }), + baseThemeFonts.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_components24.__experimentalVStack, { children: [ + /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("h2", { + className: "font-library__fonts-title", + /* translators: Heading for a list of fonts provided by the theme. */ + children: (0, import_i18n13._x)("Theme", "font source") + }), + /* @__PURE__ */ (0, import_jsx_runtime33.jsx)( + "ul", + { + role: "list", + className: "font-library__fonts-list", + children: baseThemeFonts.map((font2) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)( + "li", + { + className: "font-library__fonts-list-item", + children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)( + font_card_default, + { + font: font2, + navigatorPath: "/fontFamily", + variantsText: getFontCardVariantsText( + font2 + ), + onClick: () => { + setNotice(null); + handleSetLibraryFontSelected( + font2 + ); + } + } + ) + }, + font2.slug + )) + } + ) + ] }), + baseCustomFonts.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_components24.__experimentalVStack, { children: [ + /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("h2", { + className: "font-library__fonts-title", + /* translators: Heading for a list of fonts installed by the user. */ + children: (0, import_i18n13._x)("Custom", "font source") + }), + /* @__PURE__ */ (0, import_jsx_runtime33.jsx)( + "ul", + { + role: "list", + className: "font-library__fonts-list", + children: baseCustomFonts.map((font2) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)( + "li", + { + className: "font-library__fonts-list-item", + children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)( + font_card_default, + { + font: font2, + navigatorPath: "/fontFamily", + variantsText: getFontCardVariantsText( + font2 + ), + onClick: () => { + setNotice(null); + handleSetLibraryFontSelected( + font2 + ); + } + } + ) + }, + font2.slug + )) + } + ) + ] }) + ] }) }), + /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_components24.Navigator.Screen, { path: "/fontFamily", children: [ + libraryFontSelected && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)( + ConfirmDeleteDialog, + { + font: libraryFontSelected, + isOpen: isConfirmDeleteOpen, + setIsOpen: setIsConfirmDeleteOpen, + setNotice, + uninstallFontFamily, + handleSetLibraryFontSelected + } + ), + /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_components24.Flex, { justify: "flex-start", children: [ + /* @__PURE__ */ (0, import_jsx_runtime33.jsx)( + import_components24.Navigator.BackButton, + { + icon: (0, import_i18n13.isRTL)() ? chevron_right_default : chevron_left_default, + size: "small", + onClick: () => { + handleSetLibraryFontSelected( + void 0 + ); + setNotice(null); + }, + label: (0, import_i18n13.__)("Back") + } + ), + /* @__PURE__ */ (0, import_jsx_runtime33.jsx)( + import_components24.__experimentalHeading, + { + level: 2, + size: 13, + className: "global-styles-ui-header", + children: libraryFontSelected?.name + } + ) + ] }), + notice && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [ + /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_components24.__experimentalSpacer, { margin: 1 }), + /* @__PURE__ */ (0, import_jsx_runtime33.jsx)( + import_components24.Notice, + { + status: notice.type, + onRemove: () => setNotice(null), + children: notice.message + } + ), + /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_components24.__experimentalSpacer, { margin: 1 }) + ] }), + /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_components24.__experimentalSpacer, { margin: 4 }), + /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_components24.__experimentalText, { children: (0, import_i18n13.__)( + "Choose font variants. Keep in mind that too many variants could make your site slower." + ) }), + /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_components24.__experimentalSpacer, { margin: 4 }), + /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_components24.__experimentalVStack, { spacing: 0, children: [ + /* @__PURE__ */ (0, import_jsx_runtime33.jsx)( + import_components24.CheckboxControl, + { + className: "font-library__select-all", + label: (0, import_i18n13.__)("Select all"), + checked: isSelectAllChecked, + onChange: toggleSelectAll, + indeterminate: isIndeterminate + } + ), + /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_components24.__experimentalSpacer, { margin: 8 }), + /* @__PURE__ */ (0, import_jsx_runtime33.jsx)( + "ul", + { + role: "list", + className: "font-library__fonts-list", + children: libraryFontSelected && getFontFacesToDisplay( + libraryFontSelected + ).map((face, i2) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)( + "li", + { + className: "font-library__fonts-list-item", + children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)( + library_font_variant_default, + { + font: libraryFontSelected, + face + }, + `face${i2}` + ) + }, + `face${i2}` + )) + } + ) + ] }) + ] }) + ] + } + ), + /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_components24.__experimentalHStack, { justify: "flex-end", className: "font-library__footer", children: [ + isInstalling && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_components24.ProgressBar, {}), + shouldDisplayDeleteButton && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)( + import_components24.Button, + { + __next40pxDefaultSize: true, + isDestructive: true, + variant: "tertiary", + onClick: handleUninstallClick, + children: (0, import_i18n13.__)("Delete") + } + ), + /* @__PURE__ */ (0, import_jsx_runtime33.jsx)( + import_components24.Button, + { + __next40pxDefaultSize: true, + variant: "primary", + onClick: handleUpdate, + disabled: !fontFamiliesHasChanges, + accessibleWhenDisabled: true, + children: (0, import_i18n13.__)("Update") + } + ) + ] }) + ] }) + ] }); +} +function ConfirmDeleteDialog({ + font: font2, + isOpen, + setIsOpen, + setNotice, + uninstallFontFamily, + handleSetLibraryFontSelected +}) { + const navigator = (0, import_components24.useNavigator)(); + const handleConfirmUninstall = async () => { + setNotice(null); + setIsOpen(false); + try { + await uninstallFontFamily(font2); + navigator.goBack(); + handleSetLibraryFontSelected(void 0); + setNotice({ + type: "success", + message: (0, import_i18n13.__)("Font family uninstalled successfully.") + }); + } catch (error) { + setNotice({ + type: "error", + message: (0, import_i18n13.__)("There was an error uninstalling the font family.") + error.message + }); + } + }; + const handleCancelUninstall = () => { + setIsOpen(false); + }; + return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)( + import_components24.__experimentalConfirmDialog, + { + isOpen, + cancelButtonText: (0, import_i18n13.__)("Cancel"), + confirmButtonText: (0, import_i18n13.__)("Delete"), + onCancel: handleCancelUninstall, + onConfirm: handleConfirmUninstall, + size: "medium", + children: font2 && (0, import_i18n13.sprintf)( + /* translators: %s: Name of the font. */ + (0, import_i18n13.__)( + 'Are you sure you want to delete "%s" font and all its variants and assets?' + ), + font2.name + ) + } + ); +} +var installed_fonts_default = InstalledFonts; + +// packages/global-styles-ui/build-module/font-library/font-collection.mjs +var import_element18 = __toESM(require_element(), 1); +var import_components27 = __toESM(require_components(), 1); +var import_compose3 = __toESM(require_compose(), 1); +var import_i18n15 = __toESM(require_i18n(), 1); +var import_core_data7 = __toESM(require_core_data(), 1); + +// packages/global-styles-ui/build-module/font-library/utils/filter-fonts.mjs +function filterFonts(fonts, filters) { + const { category, search } = filters; + let filteredFonts = fonts || []; + if (category && category !== "all") { + filteredFonts = filteredFonts.filter( + (font2) => font2.categories && font2.categories.indexOf(category) !== -1 + ); + } + if (search) { + filteredFonts = filteredFonts.filter( + (font2) => font2.font_family_settings && font2.font_family_settings.name.toLowerCase().includes(search.toLowerCase()) + ); + } + return filteredFonts; +} + +// packages/global-styles-ui/build-module/font-library/utils/fonts-outline.mjs +function getFontsOutline(fonts) { + return fonts.reduce( + (acc, font2) => ({ + ...acc, + [font2.slug]: (font2?.fontFace || []).reduce( + (faces, face) => ({ + ...faces, + [`${face.fontStyle}-${face.fontWeight}`]: true + }), + {} + ) + }), + {} + ); +} +function isFontFontFaceInOutline(slug, face, outline) { + if (!face) { + return !!outline[slug]; + } + return !!outline[slug]?.[`${face.fontStyle}-${face.fontWeight}`]; +} + +// packages/global-styles-ui/build-module/font-library/google-fonts-confirm-dialog.mjs +var import_i18n14 = __toESM(require_i18n(), 1); +var import_components25 = __toESM(require_components(), 1); +var import_jsx_runtime34 = __toESM(require_jsx_runtime(), 1); +function GoogleFontsConfirmDialog() { + const handleConfirm = () => { + window.localStorage.setItem( + "wp-font-library-google-fonts-permission", + "true" + ); + window.dispatchEvent(new Event("storage")); + }; + return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "font-library__google-fonts-confirm", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_components25.Card, { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_components25.CardBody, { children: [ + /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_components25.__experimentalHeading, { level: 2, children: (0, import_i18n14.__)("Connect to Google Fonts") }), + /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_components25.__experimentalSpacer, { margin: 6 }), + /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_components25.__experimentalText, { as: "p", children: (0, import_i18n14.__)( + "To install fonts from Google you must give permission to connect directly to Google servers. The fonts you install will be downloaded from Google and stored on your site. Your site will then use these locally-hosted fonts." + ) }), + /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_components25.__experimentalSpacer, { margin: 3 }), + /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_components25.__experimentalText, { as: "p", children: (0, import_i18n14.__)( + "You can alternatively upload files directly on the Upload tab." + ) }), + /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_components25.__experimentalSpacer, { margin: 6 }), + /* @__PURE__ */ (0, import_jsx_runtime34.jsx)( + import_components25.Button, + { + __next40pxDefaultSize: true, + variant: "primary", + onClick: handleConfirm, + children: (0, import_i18n14.__)("Allow access to Google Fonts") + } + ) + ] }) }) }); +} +var google_fonts_confirm_dialog_default = GoogleFontsConfirmDialog; + +// packages/global-styles-ui/build-module/font-library/collection-font-variant.mjs +var import_element17 = __toESM(require_element(), 1); +var import_components26 = __toESM(require_components(), 1); +var import_jsx_runtime35 = __toESM(require_jsx_runtime(), 1); +function CollectionFontVariant({ + face, + font: font2, + handleToggleVariant, + selected +}) { + const handleToggleActivation = () => { + if (font2?.fontFace) { + handleToggleVariant(font2, face); + return; + } + handleToggleVariant(font2); + }; + const displayName = font2.name + " " + getFontFaceVariantName(face); + const checkboxId = (0, import_element17.useId)(); + return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "font-library__font-card", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_components26.Flex, { justify: "flex-start", align: "center", gap: "1rem", children: [ + /* @__PURE__ */ (0, import_jsx_runtime35.jsx)( + import_components26.CheckboxControl, + { + checked: selected, + onChange: handleToggleActivation, + id: checkboxId + } + ), + /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("label", { htmlFor: checkboxId, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)( + font_demo_default, + { + font: face, + text: displayName, + onClick: handleToggleActivation + } + ) }) + ] }) }); +} +var collection_font_variant_default = CollectionFontVariant; + +// packages/global-styles-ui/build-module/font-library/font-collection.mjs +var import_jsx_runtime36 = __toESM(require_jsx_runtime(), 1); +var DEFAULT_CATEGORY = { + slug: "all", + name: (0, import_i18n15._x)("All", "font categories") +}; +var LOCAL_STORAGE_ITEM = "wp-font-library-google-fonts-permission"; +var MIN_WINDOW_HEIGHT = 500; +function FontCollection({ slug }) { + const requiresPermission = slug === "google-fonts"; + const getGoogleFontsPermissionFromStorage = () => { + return window.localStorage.getItem(LOCAL_STORAGE_ITEM) === "true"; + }; + const [selectedFont, setSelectedFont] = (0, import_element18.useState)( + null + ); + const [notice, setNotice] = (0, import_element18.useState)(null); + const [fontsToInstall, setFontsToInstall] = (0, import_element18.useState)( + [] + ); + const [page, setPage] = (0, import_element18.useState)(1); + const [filters, setFilters] = (0, import_element18.useState)({}); + const [renderConfirmDialog, setRenderConfirmDialog] = (0, import_element18.useState)( + requiresPermission && !getGoogleFontsPermissionFromStorage() + ); + const { installFonts, isInstalling } = (0, import_element18.useContext)(FontLibraryContext); + const { record: selectedCollection, isResolving: isLoading } = (0, import_core_data7.useEntityRecord)("root", "fontCollection", slug); + (0, import_element18.useEffect)(() => { + const handleStorage = () => { + setRenderConfirmDialog( + requiresPermission && !getGoogleFontsPermissionFromStorage() + ); + }; + handleStorage(); + window.addEventListener("storage", handleStorage); + return () => window.removeEventListener("storage", handleStorage); + }, [slug, requiresPermission]); + const revokeAccess = () => { + window.localStorage.setItem(LOCAL_STORAGE_ITEM, "false"); + window.dispatchEvent(new Event("storage")); + }; + (0, import_element18.useEffect)(() => { + setSelectedFont(null); + }, [slug]); + (0, import_element18.useEffect)(() => { + setFontsToInstall([]); + }, [selectedFont]); + const collectionFonts = (0, import_element18.useMemo)( + () => selectedCollection?.font_families ?? [], + [selectedCollection] + ); + const collectionCategories = selectedCollection?.categories ?? []; + const categories = [DEFAULT_CATEGORY, ...collectionCategories]; + const fonts = (0, import_element18.useMemo)( + () => filterFonts(collectionFonts, filters), + [collectionFonts, filters] + ); + const windowHeight = Math.max(window.innerHeight, MIN_WINDOW_HEIGHT); + const pageSize = Math.floor((windowHeight - 417) / 61); + const totalPages = Math.ceil(fonts.length / pageSize); + const itemsStart = (page - 1) * pageSize; + const itemsLimit = page * pageSize; + const items = fonts.slice(itemsStart, itemsLimit); + const handleCategoryFilter = (category) => { + setFilters({ ...filters, category }); + setPage(1); + }; + const handleUpdateSearchInput = (value) => { + setFilters({ ...filters, search: value }); + setPage(1); + }; + const debouncedUpdateSearchInput = (0, import_compose3.debounce)(handleUpdateSearchInput, 300); + const handleToggleVariant = (font2, face) => { + const newFontsToInstall = toggleFont(font2, face, fontsToInstall); + setFontsToInstall(newFontsToInstall); + }; + const fontToInstallOutline = getFontsOutline(fontsToInstall); + const resetFontsToInstall = () => { + setFontsToInstall([]); + }; + const selectFontCount = fontsToInstall.length > 0 ? fontsToInstall[0]?.fontFace?.length ?? 0 : 0; + const isIndeterminate = selectFontCount > 0 && selectFontCount !== selectedFont?.fontFace?.length; + const isSelectAllChecked = selectFontCount === selectedFont?.fontFace?.length; + const toggleSelectAll = () => { + const newFonts = []; + if (!isSelectAllChecked && selectedFont) { + newFonts.push(selectedFont); + } + setFontsToInstall(newFonts); + }; + const handleInstall = async () => { + setNotice(null); + const fontFamily = fontsToInstall[0]; + try { + if (fontFamily?.fontFace) { + await Promise.all( + fontFamily.fontFace.map(async (fontFace) => { + if (fontFace.src) { + fontFace.file = await downloadFontFaceAssets( + fontFace.src + ); + } + }) + ); + } + } catch (error) { + setNotice({ + type: "error", + message: (0, import_i18n15.__)( + "Error installing the fonts, could not be downloaded." + ) + }); + return; + } + try { + await installFonts([fontFamily]); + setNotice({ + type: "success", + message: (0, import_i18n15.__)("Fonts were installed successfully.") + }); + } catch (error) { + setNotice({ + type: "error", + message: error.message + }); + } + resetFontsToInstall(); + }; + const getSortedFontFaces = (fontFamily) => { + if (!fontFamily) { + return []; + } + if (!fontFamily.fontFace || !fontFamily.fontFace.length) { + return [ + { + fontFamily: fontFamily.fontFamily, + fontStyle: "normal", + fontWeight: "400" + } + ]; + } + return sortFontFaces(fontFamily.fontFace); + }; + if (renderConfirmDialog) { + return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(google_fonts_confirm_dialog_default, {}); + } + const ActionsComponent = () => { + if (slug !== "google-fonts" || renderConfirmDialog || selectedFont) { + return null; + } + return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)( + import_components27.DropdownMenu, + { + icon: more_vertical_default, + label: (0, import_i18n15.__)("Actions"), + popoverProps: { + position: "bottom left" + }, + controls: [ + { + title: (0, import_i18n15.__)("Revoke access to Google Fonts"), + onClick: revokeAccess + } + ] + } + ); + }; + return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "font-library__tabpanel-layout", children: [ + isLoading && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "font-library__loading", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_components27.ProgressBar, {}) }), + !isLoading && selectedCollection && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [ + /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)( + import_components27.Navigator, + { + initialPath: "/", + className: "font-library__tabpanel-layout", + children: [ + /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_components27.Navigator.Screen, { path: "/", children: [ + /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_components27.__experimentalHStack, { justify: "space-between", children: [ + /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_components27.__experimentalVStack, { children: [ + /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_components27.__experimentalHeading, { level: 2, size: 13, children: selectedCollection.name }), + /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_components27.__experimentalText, { children: selectedCollection.description }) + ] }), + /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ActionsComponent, {}) + ] }), + /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_components27.__experimentalSpacer, { margin: 4 }), + /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_components27.__experimentalHStack, { spacing: 4, justify: "space-between", children: [ + /* @__PURE__ */ (0, import_jsx_runtime36.jsx)( + import_components27.SearchControl, + { + value: filters.search, + placeholder: (0, import_i18n15.__)("Font name\u2026"), + label: (0, import_i18n15.__)("Search"), + onChange: debouncedUpdateSearchInput, + hideLabelFromVision: false + } + ), + /* @__PURE__ */ (0, import_jsx_runtime36.jsx)( + import_components27.SelectControl, + { + __next40pxDefaultSize: true, + label: (0, import_i18n15.__)("Category"), + value: filters.category, + onChange: handleCategoryFilter, + children: categories && categories.map((category) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)( + "option", + { + value: category.slug, + children: category.name + }, + category.slug + )) + } + ) + ] }), + /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_components27.__experimentalSpacer, { margin: 4 }), + !!selectedCollection?.font_families?.length && !fonts.length && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_components27.__experimentalText, { children: (0, import_i18n15.__)( + "No fonts found. Try with a different search term." + ) }), + /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "font-library__fonts-grid__main", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)( + "ul", + { + role: "list", + className: "font-library__fonts-list", + children: items.map((font2) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)( + "li", + { + className: "font-library__fonts-list-item", + children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)( + font_card_default, + { + font: font2.font_family_settings, + navigatorPath: "/fontFamily", + onClick: () => { + setSelectedFont( + font2.font_family_settings + ); + } + } + ) + }, + font2.font_family_settings.slug + )) + } + ) }) + ] }), + /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_components27.Navigator.Screen, { path: "/fontFamily", children: [ + /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_components27.Flex, { justify: "flex-start", children: [ + /* @__PURE__ */ (0, import_jsx_runtime36.jsx)( + import_components27.Navigator.BackButton, + { + icon: (0, import_i18n15.isRTL)() ? chevron_right_default : chevron_left_default, + size: "small", + onClick: () => { + setSelectedFont(null); + setNotice(null); + }, + label: (0, import_i18n15.__)("Back") + } + ), + /* @__PURE__ */ (0, import_jsx_runtime36.jsx)( + import_components27.__experimentalHeading, + { + level: 2, + size: 13, + className: "global-styles-ui-header", + children: selectedFont?.name + } + ) + ] }), + notice && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [ + /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_components27.__experimentalSpacer, { margin: 1 }), + /* @__PURE__ */ (0, import_jsx_runtime36.jsx)( + import_components27.Notice, + { + status: notice.type, + onRemove: () => setNotice(null), + children: notice.message + } + ), + /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_components27.__experimentalSpacer, { margin: 1 }) + ] }), + /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_components27.__experimentalSpacer, { margin: 4 }), + /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_components27.__experimentalText, { children: (0, import_i18n15.__)("Select font variants to install.") }), + /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_components27.__experimentalSpacer, { margin: 4 }), + /* @__PURE__ */ (0, import_jsx_runtime36.jsx)( + import_components27.CheckboxControl, + { + className: "font-library__select-all", + label: (0, import_i18n15.__)("Select all"), + checked: isSelectAllChecked, + onChange: toggleSelectAll, + indeterminate: isIndeterminate + } + ), + /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_components27.__experimentalVStack, { spacing: 0, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)( + "ul", + { + role: "list", + className: "font-library__fonts-list", + children: selectedFont && getSortedFontFaces(selectedFont).map( + (face, i2) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)( + "li", + { + className: "font-library__fonts-list-item", + children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)( + collection_font_variant_default, + { + font: selectedFont, + face, + handleToggleVariant, + selected: isFontFontFaceInOutline( + selectedFont.slug, + selectedFont.fontFace ? face : null, + // If the font has no fontFace, we want to check if the font is in the outline + fontToInstallOutline + ) + } + ) + }, + `face${i2}` + ) + ) + } + ) }), + /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_components27.__experimentalSpacer, { margin: 16 }) + ] }) + ] + } + ), + selectedFont && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)( + import_components27.Flex, + { + justify: "flex-end", + className: "font-library__footer", + children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)( + import_components27.Button, + { + __next40pxDefaultSize: true, + variant: "primary", + onClick: handleInstall, + isBusy: isInstalling, + disabled: fontsToInstall.length === 0 || isInstalling, + accessibleWhenDisabled: true, + children: (0, import_i18n15.__)("Install") + } + ) + } + ), + !selectedFont && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)( + import_components27.__experimentalHStack, + { + expanded: false, + className: "font-library__footer", + justify: "end", + spacing: 6, + children: [ + /* @__PURE__ */ (0, import_jsx_runtime36.jsx)( + import_components27.__experimentalHStack, + { + justify: "flex-start", + expanded: false, + spacing: 1, + className: "font-library__page-selection", + children: (0, import_element18.createInterpolateElement)( + (0, import_i18n15.sprintf)( + // translators: 1: Current page number, 2: Total number of pages. + (0, import_i18n15._x)( + "
      Page
      %1$s
      of %2$d
      ", + "paging" + ), + "", + totalPages + ), + { + div: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { "aria-hidden": true }), + CurrentPage: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)( + import_components27.SelectControl, + { + "aria-label": (0, import_i18n15.__)( + "Current page" + ), + value: page.toString(), + options: [ + ...Array(totalPages) + ].map((e2, i2) => { + return { + label: (i2 + 1).toString(), + value: (i2 + 1).toString() + }; + }), + onChange: (newPage) => setPage( + parseInt(newPage) + ), + size: "small", + variant: "minimal" + } + ) + } + ) + } + ), + /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_components27.__experimentalHStack, { expanded: false, spacing: 1, children: [ + /* @__PURE__ */ (0, import_jsx_runtime36.jsx)( + import_components27.Button, + { + onClick: () => setPage(page - 1), + disabled: page === 1, + accessibleWhenDisabled: true, + label: (0, import_i18n15.__)("Previous page"), + icon: (0, import_i18n15.isRTL)() ? next_default : previous_default, + showTooltip: true, + size: "compact", + tooltipPosition: "top" + } + ), + /* @__PURE__ */ (0, import_jsx_runtime36.jsx)( + import_components27.Button, + { + onClick: () => setPage(page + 1), + disabled: page === totalPages, + accessibleWhenDisabled: true, + label: (0, import_i18n15.__)("Next page"), + icon: (0, import_i18n15.isRTL)() ? previous_default : next_default, + showTooltip: true, + size: "compact", + tooltipPosition: "top" + } + ) + ] }) + ] + } + ) + ] }) + ] }); +} +var font_collection_default = FontCollection; + +// packages/global-styles-ui/build-module/font-library/upload-fonts.mjs +var import_i18n16 = __toESM(require_i18n(), 1); +var import_components29 = __toESM(require_components(), 1); +var import_element19 = __toESM(require_element(), 1); + +// packages/global-styles-ui/build-module/font-library/lib/unbrotli.mjs +var __require2 = /* @__PURE__ */ ((x2) => typeof __require !== "undefined" ? __require : typeof Proxy !== "undefined" ? new Proxy(x2, { + get: (a2, b2) => (typeof __require !== "undefined" ? __require : a2)[b2] +}) : x2)(function(x2) { + if (typeof __require !== "undefined") return __require.apply(this, arguments); + throw Error('Dynamic require of "' + x2 + '" is not supported'); +}); +var unbrotli_default = (function() { + var define, module, exports; + return (/* @__PURE__ */ (function() { + function r3(e2, n2, t3) { + function o3(i22, f2) { + if (!n2[i22]) { + if (!e2[i22]) { + var c2 = "function" == typeof __require2 && __require2; + if (!f2 && c2) return c2(i22, true); + if (u2) return u2(i22, true); + var a2 = new Error("Cannot find module '" + i22 + "'"); + throw a2.code = "MODULE_NOT_FOUND", a2; + } + var p3 = n2[i22] = { exports: {} }; + e2[i22][0].call( + p3.exports, + function(r22) { + var n22 = e2[i22][1][r22]; + return o3(n22 || r22); + }, + p3, + p3.exports, + r3, + e2, + n2, + t3 + ); + } + return n2[i22].exports; + } + for (var u2 = "function" == typeof __require2 && __require2, i2 = 0; i2 < t3.length; i2++) + o3(t3[i2]); + return o3; + } + return r3; + })())( + { + 1: [ + function(require2, module2, exports2) { + var BROTLI_READ_SIZE = 4096; + var BROTLI_IBUF_SIZE = 2 * BROTLI_READ_SIZE + 32; + var BROTLI_IBUF_MASK = 2 * BROTLI_READ_SIZE - 1; + var kBitMask = new Uint32Array([ + 0, + 1, + 3, + 7, + 15, + 31, + 63, + 127, + 255, + 511, + 1023, + 2047, + 4095, + 8191, + 16383, + 32767, + 65535, + 131071, + 262143, + 524287, + 1048575, + 2097151, + 4194303, + 8388607, + 16777215 + ]); + function BrotliBitReader(input) { + this.buf_ = new Uint8Array(BROTLI_IBUF_SIZE); + this.input_ = input; + this.reset(); + } + BrotliBitReader.READ_SIZE = BROTLI_READ_SIZE; + BrotliBitReader.IBUF_MASK = BROTLI_IBUF_MASK; + BrotliBitReader.prototype.reset = function() { + this.buf_ptr_ = 0; + this.val_ = 0; + this.pos_ = 0; + this.bit_pos_ = 0; + this.bit_end_pos_ = 0; + this.eos_ = 0; + this.readMoreInput(); + for (var i2 = 0; i2 < 4; i2++) { + this.val_ |= this.buf_[this.pos_] << 8 * i2; + ++this.pos_; + } + return this.bit_end_pos_ > 0; + }; + BrotliBitReader.prototype.readMoreInput = function() { + if (this.bit_end_pos_ > 256) { + return; + } else if (this.eos_) { + if (this.bit_pos_ > this.bit_end_pos_) + throw new Error( + "Unexpected end of input " + this.bit_pos_ + " " + this.bit_end_pos_ + ); + } else { + var dst = this.buf_ptr_; + var bytes_read = this.input_.read( + this.buf_, + dst, + BROTLI_READ_SIZE + ); + if (bytes_read < 0) { + throw new Error("Unexpected end of input"); + } + if (bytes_read < BROTLI_READ_SIZE) { + this.eos_ = 1; + for (var p3 = 0; p3 < 32; p3++) + this.buf_[dst + bytes_read + p3] = 0; + } + if (dst === 0) { + for (var p3 = 0; p3 < 32; p3++) + this.buf_[(BROTLI_READ_SIZE << 1) + p3] = this.buf_[p3]; + this.buf_ptr_ = BROTLI_READ_SIZE; + } else { + this.buf_ptr_ = 0; + } + this.bit_end_pos_ += bytes_read << 3; + } + }; + BrotliBitReader.prototype.fillBitWindow = function() { + while (this.bit_pos_ >= 8) { + this.val_ >>>= 8; + this.val_ |= this.buf_[this.pos_ & BROTLI_IBUF_MASK] << 24; + ++this.pos_; + this.bit_pos_ = this.bit_pos_ - 8 >>> 0; + this.bit_end_pos_ = this.bit_end_pos_ - 8 >>> 0; + } + }; + BrotliBitReader.prototype.readBits = function(n_bits) { + if (32 - this.bit_pos_ < n_bits) { + this.fillBitWindow(); + } + var val = this.val_ >>> this.bit_pos_ & kBitMask[n_bits]; + this.bit_pos_ += n_bits; + return val; + }; + module2.exports = BrotliBitReader; + }, + {} + ], + 2: [ + function(require2, module2, exports2) { + var CONTEXT_LSB6 = 0; + var CONTEXT_MSB6 = 1; + var CONTEXT_UTF8 = 2; + var CONTEXT_SIGNED = 3; + exports2.lookup = new Uint8Array([ + /* CONTEXT_UTF8, last byte. */ + /* ASCII range. */ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 4, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 8, + 12, + 16, + 12, + 12, + 20, + 12, + 16, + 24, + 28, + 12, + 12, + 32, + 12, + 36, + 12, + 44, + 44, + 44, + 44, + 44, + 44, + 44, + 44, + 44, + 44, + 32, + 32, + 24, + 40, + 28, + 12, + 12, + 48, + 52, + 52, + 52, + 48, + 52, + 52, + 52, + 48, + 52, + 52, + 52, + 52, + 52, + 48, + 52, + 52, + 52, + 52, + 52, + 48, + 52, + 52, + 52, + 52, + 52, + 24, + 12, + 28, + 12, + 12, + 12, + 56, + 60, + 60, + 60, + 56, + 60, + 60, + 60, + 56, + 60, + 60, + 60, + 60, + 60, + 56, + 60, + 60, + 60, + 60, + 60, + 56, + 60, + 60, + 60, + 60, + 60, + 24, + 12, + 28, + 12, + 0, + /* UTF8 continuation byte range. */ + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 2, + 3, + 2, + 3, + 2, + 3, + 2, + 3, + 2, + 3, + 2, + 3, + 2, + 3, + 2, + 3, + 2, + 3, + 2, + 3, + 2, + 3, + 2, + 3, + 2, + 3, + 2, + 3, + 2, + 3, + 2, + 3, + 2, + 3, + 2, + 3, + 2, + 3, + 2, + 3, + 2, + 3, + 2, + 3, + 2, + 3, + 2, + 3, + 2, + 3, + 2, + 3, + 2, + 3, + 2, + 3, + 2, + 3, + 2, + 3, + 2, + 3, + 2, + 3, + /* ASCII range. */ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 1, + 1, + 1, + 1, + 1, + 1, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 1, + 1, + 1, + 1, + 0, + /* UTF8 continuation byte range. */ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 7, + /* CONTEXT_SIGNED, last byte, same as the above values shifted by 3 bits. */ + 0, + 8, + 8, + 8, + 8, + 8, + 8, + 8, + 8, + 8, + 8, + 8, + 8, + 8, + 8, + 8, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 32, + 40, + 40, + 40, + 40, + 40, + 40, + 40, + 40, + 40, + 40, + 40, + 40, + 40, + 40, + 40, + 40, + 40, + 40, + 40, + 40, + 40, + 40, + 40, + 40, + 40, + 40, + 40, + 40, + 40, + 40, + 40, + 40, + 40, + 40, + 40, + 40, + 40, + 40, + 40, + 40, + 40, + 40, + 40, + 40, + 40, + 40, + 40, + 40, + 48, + 48, + 48, + 48, + 48, + 48, + 48, + 48, + 48, + 48, + 48, + 48, + 48, + 48, + 48, + 56, + /* CONTEXT_LSB6, last byte. */ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + /* CONTEXT_MSB6, last byte. */ + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 2, + 2, + 2, + 2, + 3, + 3, + 3, + 3, + 4, + 4, + 4, + 4, + 5, + 5, + 5, + 5, + 6, + 6, + 6, + 6, + 7, + 7, + 7, + 7, + 8, + 8, + 8, + 8, + 9, + 9, + 9, + 9, + 10, + 10, + 10, + 10, + 11, + 11, + 11, + 11, + 12, + 12, + 12, + 12, + 13, + 13, + 13, + 13, + 14, + 14, + 14, + 14, + 15, + 15, + 15, + 15, + 16, + 16, + 16, + 16, + 17, + 17, + 17, + 17, + 18, + 18, + 18, + 18, + 19, + 19, + 19, + 19, + 20, + 20, + 20, + 20, + 21, + 21, + 21, + 21, + 22, + 22, + 22, + 22, + 23, + 23, + 23, + 23, + 24, + 24, + 24, + 24, + 25, + 25, + 25, + 25, + 26, + 26, + 26, + 26, + 27, + 27, + 27, + 27, + 28, + 28, + 28, + 28, + 29, + 29, + 29, + 29, + 30, + 30, + 30, + 30, + 31, + 31, + 31, + 31, + 32, + 32, + 32, + 32, + 33, + 33, + 33, + 33, + 34, + 34, + 34, + 34, + 35, + 35, + 35, + 35, + 36, + 36, + 36, + 36, + 37, + 37, + 37, + 37, + 38, + 38, + 38, + 38, + 39, + 39, + 39, + 39, + 40, + 40, + 40, + 40, + 41, + 41, + 41, + 41, + 42, + 42, + 42, + 42, + 43, + 43, + 43, + 43, + 44, + 44, + 44, + 44, + 45, + 45, + 45, + 45, + 46, + 46, + 46, + 46, + 47, + 47, + 47, + 47, + 48, + 48, + 48, + 48, + 49, + 49, + 49, + 49, + 50, + 50, + 50, + 50, + 51, + 51, + 51, + 51, + 52, + 52, + 52, + 52, + 53, + 53, + 53, + 53, + 54, + 54, + 54, + 54, + 55, + 55, + 55, + 55, + 56, + 56, + 56, + 56, + 57, + 57, + 57, + 57, + 58, + 58, + 58, + 58, + 59, + 59, + 59, + 59, + 60, + 60, + 60, + 60, + 61, + 61, + 61, + 61, + 62, + 62, + 62, + 62, + 63, + 63, + 63, + 63, + /* CONTEXT_{M,L}SB6, second last byte, */ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ]); + exports2.lookupOffsets = new Uint16Array([ + /* CONTEXT_LSB6 */ + 1024, + 1536, + 1280, + 1536, + 0, + 256, + 768, + 512 + ]); + }, + {} + ], + 3: [ + function(require2, module2, exports2) { + var BrotliInput = require2("./streams").BrotliInput; + var BrotliOutput = require2("./streams").BrotliOutput; + var BrotliBitReader = require2("./bit_reader"); + var BrotliDictionary = require2("./dictionary"); + var HuffmanCode = require2("./huffman").HuffmanCode; + var BrotliBuildHuffmanTable = require2("./huffman").BrotliBuildHuffmanTable; + var Context = require2("./context"); + var Prefix = require2("./prefix"); + var Transform = require2("./transform"); + var kDefaultCodeLength = 8; + var kCodeLengthRepeatCode = 16; + var kNumLiteralCodes = 256; + var kNumInsertAndCopyCodes = 704; + var kNumBlockLengthCodes = 26; + var kLiteralContextBits = 6; + var kDistanceContextBits = 2; + var HUFFMAN_TABLE_BITS = 8; + var HUFFMAN_TABLE_MASK = 255; + var HUFFMAN_MAX_TABLE_SIZE = 1080; + var CODE_LENGTH_CODES = 18; + var kCodeLengthCodeOrder = new Uint8Array([ + 1, + 2, + 3, + 4, + 0, + 5, + 17, + 6, + 16, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15 + ]); + var NUM_DISTANCE_SHORT_CODES = 16; + var kDistanceShortCodeIndexOffset = new Uint8Array([ + 3, + 2, + 1, + 0, + 3, + 3, + 3, + 3, + 3, + 3, + 2, + 2, + 2, + 2, + 2, + 2 + ]); + var kDistanceShortCodeValueOffset = new Int8Array([ + 0, + 0, + 0, + 0, + -1, + 1, + -2, + 2, + -3, + 3, + -1, + 1, + -2, + 2, + -3, + 3 + ]); + var kMaxHuffmanTableSize = new Uint16Array([ + 256, + 402, + 436, + 468, + 500, + 534, + 566, + 598, + 630, + 662, + 694, + 726, + 758, + 790, + 822, + 854, + 886, + 920, + 952, + 984, + 1016, + 1048, + 1080 + ]); + function DecodeWindowBits(br) { + var n2; + if (br.readBits(1) === 0) { + return 16; + } + n2 = br.readBits(3); + if (n2 > 0) { + return 17 + n2; + } + n2 = br.readBits(3); + if (n2 > 0) { + return 8 + n2; + } + return 17; + } + function DecodeVarLenUint8(br) { + if (br.readBits(1)) { + var nbits = br.readBits(3); + if (nbits === 0) { + return 1; + } else { + return br.readBits(nbits) + (1 << nbits); + } + } + return 0; + } + function MetaBlockLength() { + this.meta_block_length = 0; + this.input_end = 0; + this.is_uncompressed = 0; + this.is_metadata = false; + } + function DecodeMetaBlockLength(br) { + var out = new MetaBlockLength(); + var size_nibbles; + var size_bytes; + var i2; + out.input_end = br.readBits(1); + if (out.input_end && br.readBits(1)) { + return out; + } + size_nibbles = br.readBits(2) + 4; + if (size_nibbles === 7) { + out.is_metadata = true; + if (br.readBits(1) !== 0) + throw new Error("Invalid reserved bit"); + size_bytes = br.readBits(2); + if (size_bytes === 0) return out; + for (i2 = 0; i2 < size_bytes; i2++) { + var next_byte = br.readBits(8); + if (i2 + 1 === size_bytes && size_bytes > 1 && next_byte === 0) + throw new Error("Invalid size byte"); + out.meta_block_length |= next_byte << i2 * 8; + } + } else { + for (i2 = 0; i2 < size_nibbles; ++i2) { + var next_nibble = br.readBits(4); + if (i2 + 1 === size_nibbles && size_nibbles > 4 && next_nibble === 0) + throw new Error("Invalid size nibble"); + out.meta_block_length |= next_nibble << i2 * 4; + } + } + ++out.meta_block_length; + if (!out.input_end && !out.is_metadata) { + out.is_uncompressed = br.readBits(1); + } + return out; + } + function ReadSymbol(table, index, br) { + var start_index = index; + var nbits; + br.fillBitWindow(); + index += br.val_ >>> br.bit_pos_ & HUFFMAN_TABLE_MASK; + nbits = table[index].bits - HUFFMAN_TABLE_BITS; + if (nbits > 0) { + br.bit_pos_ += HUFFMAN_TABLE_BITS; + index += table[index].value; + index += br.val_ >>> br.bit_pos_ & (1 << nbits) - 1; + } + br.bit_pos_ += table[index].bits; + return table[index].value; + } + function ReadHuffmanCodeLengths(code_length_code_lengths, num_symbols, code_lengths, br) { + var symbol = 0; + var prev_code_len = kDefaultCodeLength; + var repeat = 0; + var repeat_code_len = 0; + var space = 32768; + var table = []; + for (var i2 = 0; i2 < 32; i2++) + table.push(new HuffmanCode(0, 0)); + BrotliBuildHuffmanTable( + table, + 0, + 5, + code_length_code_lengths, + CODE_LENGTH_CODES + ); + while (symbol < num_symbols && space > 0) { + var p3 = 0; + var code_len; + br.readMoreInput(); + br.fillBitWindow(); + p3 += br.val_ >>> br.bit_pos_ & 31; + br.bit_pos_ += table[p3].bits; + code_len = table[p3].value & 255; + if (code_len < kCodeLengthRepeatCode) { + repeat = 0; + code_lengths[symbol++] = code_len; + if (code_len !== 0) { + prev_code_len = code_len; + space -= 32768 >> code_len; + } + } else { + var extra_bits = code_len - 14; + var old_repeat; + var repeat_delta; + var new_len = 0; + if (code_len === kCodeLengthRepeatCode) { + new_len = prev_code_len; + } + if (repeat_code_len !== new_len) { + repeat = 0; + repeat_code_len = new_len; + } + old_repeat = repeat; + if (repeat > 0) { + repeat -= 2; + repeat <<= extra_bits; + } + repeat += br.readBits(extra_bits) + 3; + repeat_delta = repeat - old_repeat; + if (symbol + repeat_delta > num_symbols) { + throw new Error( + "[ReadHuffmanCodeLengths] symbol + repeat_delta > num_symbols" + ); + } + for (var x2 = 0; x2 < repeat_delta; x2++) + code_lengths[symbol + x2] = repeat_code_len; + symbol += repeat_delta; + if (repeat_code_len !== 0) { + space -= repeat_delta << 15 - repeat_code_len; + } + } + } + if (space !== 0) { + throw new Error( + "[ReadHuffmanCodeLengths] space = " + space + ); + } + for (; symbol < num_symbols; symbol++) + code_lengths[symbol] = 0; + } + function ReadHuffmanCode(alphabet_size, tables, table, br) { + var table_size = 0; + var simple_code_or_skip; + var code_lengths = new Uint8Array(alphabet_size); + br.readMoreInput(); + simple_code_or_skip = br.readBits(2); + if (simple_code_or_skip === 1) { + var i2; + var max_bits_counter = alphabet_size - 1; + var max_bits = 0; + var symbols = new Int32Array(4); + var num_symbols = br.readBits(2) + 1; + while (max_bits_counter) { + max_bits_counter >>= 1; + ++max_bits; + } + for (i2 = 0; i2 < num_symbols; ++i2) { + symbols[i2] = br.readBits(max_bits) % alphabet_size; + code_lengths[symbols[i2]] = 2; + } + code_lengths[symbols[0]] = 1; + switch (num_symbols) { + case 1: + break; + case 3: + if (symbols[0] === symbols[1] || symbols[0] === symbols[2] || symbols[1] === symbols[2]) { + throw new Error( + "[ReadHuffmanCode] invalid symbols" + ); + } + break; + case 2: + if (symbols[0] === symbols[1]) { + throw new Error( + "[ReadHuffmanCode] invalid symbols" + ); + } + code_lengths[symbols[1]] = 1; + break; + case 4: + if (symbols[0] === symbols[1] || symbols[0] === symbols[2] || symbols[0] === symbols[3] || symbols[1] === symbols[2] || symbols[1] === symbols[3] || symbols[2] === symbols[3]) { + throw new Error( + "[ReadHuffmanCode] invalid symbols" + ); + } + if (br.readBits(1)) { + code_lengths[symbols[2]] = 3; + code_lengths[symbols[3]] = 3; + } else { + code_lengths[symbols[0]] = 2; + } + break; + } + } else { + var i2; + var code_length_code_lengths = new Uint8Array( + CODE_LENGTH_CODES + ); + var space = 32; + var num_codes = 0; + var huff = [ + new HuffmanCode(2, 0), + new HuffmanCode(2, 4), + new HuffmanCode(2, 3), + new HuffmanCode(3, 2), + new HuffmanCode(2, 0), + new HuffmanCode(2, 4), + new HuffmanCode(2, 3), + new HuffmanCode(4, 1), + new HuffmanCode(2, 0), + new HuffmanCode(2, 4), + new HuffmanCode(2, 3), + new HuffmanCode(3, 2), + new HuffmanCode(2, 0), + new HuffmanCode(2, 4), + new HuffmanCode(2, 3), + new HuffmanCode(4, 5) + ]; + for (i2 = simple_code_or_skip; i2 < CODE_LENGTH_CODES && space > 0; ++i2) { + var code_len_idx = kCodeLengthCodeOrder[i2]; + var p3 = 0; + var v2; + br.fillBitWindow(); + p3 += br.val_ >>> br.bit_pos_ & 15; + br.bit_pos_ += huff[p3].bits; + v2 = huff[p3].value; + code_length_code_lengths[code_len_idx] = v2; + if (v2 !== 0) { + space -= 32 >> v2; + ++num_codes; + } + } + if (!(num_codes === 1 || space === 0)) + throw new Error( + "[ReadHuffmanCode] invalid num_codes or space" + ); + ReadHuffmanCodeLengths( + code_length_code_lengths, + alphabet_size, + code_lengths, + br + ); + } + table_size = BrotliBuildHuffmanTable( + tables, + table, + HUFFMAN_TABLE_BITS, + code_lengths, + alphabet_size + ); + if (table_size === 0) { + throw new Error( + "[ReadHuffmanCode] BuildHuffmanTable failed: " + ); + } + return table_size; + } + function ReadBlockLength(table, index, br) { + var code; + var nbits; + code = ReadSymbol(table, index, br); + nbits = Prefix.kBlockLengthPrefixCode[code].nbits; + return Prefix.kBlockLengthPrefixCode[code].offset + br.readBits(nbits); + } + function TranslateShortCodes(code, ringbuffer, index) { + var val; + if (code < NUM_DISTANCE_SHORT_CODES) { + index += kDistanceShortCodeIndexOffset[code]; + index &= 3; + val = ringbuffer[index] + kDistanceShortCodeValueOffset[code]; + } else { + val = code - NUM_DISTANCE_SHORT_CODES + 1; + } + return val; + } + function MoveToFront(v2, index) { + var value = v2[index]; + var i2 = index; + for (; i2; --i2) v2[i2] = v2[i2 - 1]; + v2[0] = value; + } + function InverseMoveToFrontTransform(v2, v_len) { + var mtf = new Uint8Array(256); + var i2; + for (i2 = 0; i2 < 256; ++i2) { + mtf[i2] = i2; + } + for (i2 = 0; i2 < v_len; ++i2) { + var index = v2[i2]; + v2[i2] = mtf[index]; + if (index) MoveToFront(mtf, index); + } + } + function HuffmanTreeGroup(alphabet_size, num_htrees) { + this.alphabet_size = alphabet_size; + this.num_htrees = num_htrees; + this.codes = new Array( + num_htrees + num_htrees * kMaxHuffmanTableSize[alphabet_size + 31 >>> 5] + ); + this.htrees = new Uint32Array(num_htrees); + } + HuffmanTreeGroup.prototype.decode = function(br) { + var i2; + var table_size; + var next = 0; + for (i2 = 0; i2 < this.num_htrees; ++i2) { + this.htrees[i2] = next; + table_size = ReadHuffmanCode( + this.alphabet_size, + this.codes, + next, + br + ); + next += table_size; + } + }; + function DecodeContextMap(context_map_size, br) { + var out = { num_htrees: null, context_map: null }; + var use_rle_for_zeros; + var max_run_length_prefix = 0; + var table; + var i2; + br.readMoreInput(); + var num_htrees = out.num_htrees = DecodeVarLenUint8(br) + 1; + var context_map = out.context_map = new Uint8Array( + context_map_size + ); + if (num_htrees <= 1) { + return out; + } + use_rle_for_zeros = br.readBits(1); + if (use_rle_for_zeros) { + max_run_length_prefix = br.readBits(4) + 1; + } + table = []; + for (i2 = 0; i2 < HUFFMAN_MAX_TABLE_SIZE; i2++) { + table[i2] = new HuffmanCode(0, 0); + } + ReadHuffmanCode( + num_htrees + max_run_length_prefix, + table, + 0, + br + ); + for (i2 = 0; i2 < context_map_size; ) { + var code; + br.readMoreInput(); + code = ReadSymbol(table, 0, br); + if (code === 0) { + context_map[i2] = 0; + ++i2; + } else if (code <= max_run_length_prefix) { + var reps = 1 + (1 << code) + br.readBits(code); + while (--reps) { + if (i2 >= context_map_size) { + throw new Error( + "[DecodeContextMap] i >= context_map_size" + ); + } + context_map[i2] = 0; + ++i2; + } + } else { + context_map[i2] = code - max_run_length_prefix; + ++i2; + } + } + if (br.readBits(1)) { + InverseMoveToFrontTransform( + context_map, + context_map_size + ); + } + return out; + } + function DecodeBlockType(max_block_type, trees, tree_type, block_types, ringbuffers, indexes, br) { + var ringbuffer = tree_type * 2; + var index = tree_type; + var type_code = ReadSymbol( + trees, + tree_type * HUFFMAN_MAX_TABLE_SIZE, + br + ); + var block_type; + if (type_code === 0) { + block_type = ringbuffers[ringbuffer + (indexes[index] & 1)]; + } else if (type_code === 1) { + block_type = ringbuffers[ringbuffer + (indexes[index] - 1 & 1)] + 1; + } else { + block_type = type_code - 2; + } + if (block_type >= max_block_type) { + block_type -= max_block_type; + } + block_types[tree_type] = block_type; + ringbuffers[ringbuffer + (indexes[index] & 1)] = block_type; + ++indexes[index]; + } + function CopyUncompressedBlockToOutput(output, len, pos, ringbuffer, ringbuffer_mask, br) { + var rb_size = ringbuffer_mask + 1; + var rb_pos = pos & ringbuffer_mask; + var br_pos = br.pos_ & BrotliBitReader.IBUF_MASK; + var nbytes; + if (len < 8 || br.bit_pos_ + (len << 3) < br.bit_end_pos_) { + while (len-- > 0) { + br.readMoreInput(); + ringbuffer[rb_pos++] = br.readBits(8); + if (rb_pos === rb_size) { + output.write(ringbuffer, rb_size); + rb_pos = 0; + } + } + return; + } + if (br.bit_end_pos_ < 32) { + throw new Error( + "[CopyUncompressedBlockToOutput] br.bit_end_pos_ < 32" + ); + } + while (br.bit_pos_ < 32) { + ringbuffer[rb_pos] = br.val_ >>> br.bit_pos_; + br.bit_pos_ += 8; + ++rb_pos; + --len; + } + nbytes = br.bit_end_pos_ - br.bit_pos_ >> 3; + if (br_pos + nbytes > BrotliBitReader.IBUF_MASK) { + var tail = BrotliBitReader.IBUF_MASK + 1 - br_pos; + for (var x2 = 0; x2 < tail; x2++) + ringbuffer[rb_pos + x2] = br.buf_[br_pos + x2]; + nbytes -= tail; + rb_pos += tail; + len -= tail; + br_pos = 0; + } + for (var x2 = 0; x2 < nbytes; x2++) + ringbuffer[rb_pos + x2] = br.buf_[br_pos + x2]; + rb_pos += nbytes; + len -= nbytes; + if (rb_pos >= rb_size) { + output.write(ringbuffer, rb_size); + rb_pos -= rb_size; + for (var x2 = 0; x2 < rb_pos; x2++) + ringbuffer[x2] = ringbuffer[rb_size + x2]; + } + while (rb_pos + len >= rb_size) { + nbytes = rb_size - rb_pos; + if (br.input_.read(ringbuffer, rb_pos, nbytes) < nbytes) { + throw new Error( + "[CopyUncompressedBlockToOutput] not enough bytes" + ); + } + output.write(ringbuffer, rb_size); + len -= nbytes; + rb_pos = 0; + } + if (br.input_.read(ringbuffer, rb_pos, len) < len) { + throw new Error( + "[CopyUncompressedBlockToOutput] not enough bytes" + ); + } + br.reset(); + } + function JumpToByteBoundary(br) { + var new_bit_pos = br.bit_pos_ + 7 & ~7; + var pad_bits = br.readBits(new_bit_pos - br.bit_pos_); + return pad_bits == 0; + } + function BrotliDecompressedSize(buffer) { + var input = new BrotliInput(buffer); + var br = new BrotliBitReader(input); + DecodeWindowBits(br); + var out = DecodeMetaBlockLength(br); + return out.meta_block_length; + } + exports2.BrotliDecompressedSize = BrotliDecompressedSize; + function BrotliDecompressBuffer(buffer, output_size) { + var input = new BrotliInput(buffer); + if (output_size == null) { + output_size = BrotliDecompressedSize(buffer); + } + var output_buffer = new Uint8Array(output_size); + var output = new BrotliOutput(output_buffer); + BrotliDecompress(input, output); + if (output.pos < output.buffer.length) { + output.buffer = output.buffer.subarray( + 0, + output.pos + ); + } + return output.buffer; + } + exports2.BrotliDecompressBuffer = BrotliDecompressBuffer; + function BrotliDecompress(input, output) { + var i2; + var pos = 0; + var input_end = 0; + var window_bits = 0; + var max_backward_distance; + var max_distance = 0; + var ringbuffer_size; + var ringbuffer_mask; + var ringbuffer; + var ringbuffer_end; + var dist_rb = [16, 15, 11, 4]; + var dist_rb_idx = 0; + var prev_byte1 = 0; + var prev_byte2 = 0; + var hgroup = [ + new HuffmanTreeGroup(0, 0), + new HuffmanTreeGroup(0, 0), + new HuffmanTreeGroup(0, 0) + ]; + var block_type_trees; + var block_len_trees; + var br; + var kRingBufferWriteAheadSlack = 128 + BrotliBitReader.READ_SIZE; + br = new BrotliBitReader(input); + window_bits = DecodeWindowBits(br); + max_backward_distance = (1 << window_bits) - 16; + ringbuffer_size = 1 << window_bits; + ringbuffer_mask = ringbuffer_size - 1; + ringbuffer = new Uint8Array( + ringbuffer_size + kRingBufferWriteAheadSlack + BrotliDictionary.maxDictionaryWordLength + ); + ringbuffer_end = ringbuffer_size; + block_type_trees = []; + block_len_trees = []; + for (var x2 = 0; x2 < 3 * HUFFMAN_MAX_TABLE_SIZE; x2++) { + block_type_trees[x2] = new HuffmanCode(0, 0); + block_len_trees[x2] = new HuffmanCode(0, 0); + } + while (!input_end) { + var meta_block_remaining_len = 0; + var is_uncompressed; + var block_length = [1 << 28, 1 << 28, 1 << 28]; + var block_type = [0]; + var num_block_types = [1, 1, 1]; + var block_type_rb = [0, 1, 0, 1, 0, 1]; + var block_type_rb_index = [0]; + var distance_postfix_bits; + var num_direct_distance_codes; + var distance_postfix_mask; + var num_distance_codes; + var context_map = null; + var context_modes = null; + var num_literal_htrees; + var dist_context_map = null; + var num_dist_htrees; + var context_offset = 0; + var context_map_slice = null; + var literal_htree_index = 0; + var dist_context_offset = 0; + var dist_context_map_slice = null; + var dist_htree_index = 0; + var context_lookup_offset1 = 0; + var context_lookup_offset2 = 0; + var context_mode; + var htree_command; + for (i2 = 0; i2 < 3; ++i2) { + hgroup[i2].codes = null; + hgroup[i2].htrees = null; + } + br.readMoreInput(); + var _out = DecodeMetaBlockLength(br); + meta_block_remaining_len = _out.meta_block_length; + if (pos + meta_block_remaining_len > output.buffer.length) { + var tmp = new Uint8Array( + pos + meta_block_remaining_len + ); + tmp.set(output.buffer); + output.buffer = tmp; + } + input_end = _out.input_end; + is_uncompressed = _out.is_uncompressed; + if (_out.is_metadata) { + JumpToByteBoundary(br); + for (; meta_block_remaining_len > 0; --meta_block_remaining_len) { + br.readMoreInput(); + br.readBits(8); + } + continue; + } + if (meta_block_remaining_len === 0) { + continue; + } + if (is_uncompressed) { + br.bit_pos_ = br.bit_pos_ + 7 & ~7; + CopyUncompressedBlockToOutput( + output, + meta_block_remaining_len, + pos, + ringbuffer, + ringbuffer_mask, + br + ); + pos += meta_block_remaining_len; + continue; + } + for (i2 = 0; i2 < 3; ++i2) { + num_block_types[i2] = DecodeVarLenUint8(br) + 1; + if (num_block_types[i2] >= 2) { + ReadHuffmanCode( + num_block_types[i2] + 2, + block_type_trees, + i2 * HUFFMAN_MAX_TABLE_SIZE, + br + ); + ReadHuffmanCode( + kNumBlockLengthCodes, + block_len_trees, + i2 * HUFFMAN_MAX_TABLE_SIZE, + br + ); + block_length[i2] = ReadBlockLength( + block_len_trees, + i2 * HUFFMAN_MAX_TABLE_SIZE, + br + ); + block_type_rb_index[i2] = 1; + } + } + br.readMoreInput(); + distance_postfix_bits = br.readBits(2); + num_direct_distance_codes = NUM_DISTANCE_SHORT_CODES + (br.readBits(4) << distance_postfix_bits); + distance_postfix_mask = (1 << distance_postfix_bits) - 1; + num_distance_codes = num_direct_distance_codes + (48 << distance_postfix_bits); + context_modes = new Uint8Array( + num_block_types[0] + ); + for (i2 = 0; i2 < num_block_types[0]; ++i2) { + br.readMoreInput(); + context_modes[i2] = br.readBits(2) << 1; + } + var _o1 = DecodeContextMap( + num_block_types[0] << kLiteralContextBits, + br + ); + num_literal_htrees = _o1.num_htrees; + context_map = _o1.context_map; + var _o2 = DecodeContextMap( + num_block_types[2] << kDistanceContextBits, + br + ); + num_dist_htrees = _o2.num_htrees; + dist_context_map = _o2.context_map; + hgroup[0] = new HuffmanTreeGroup( + kNumLiteralCodes, + num_literal_htrees + ); + hgroup[1] = new HuffmanTreeGroup( + kNumInsertAndCopyCodes, + num_block_types[1] + ); + hgroup[2] = new HuffmanTreeGroup( + num_distance_codes, + num_dist_htrees + ); + for (i2 = 0; i2 < 3; ++i2) { + hgroup[i2].decode(br); + } + context_map_slice = 0; + dist_context_map_slice = 0; + context_mode = context_modes[block_type[0]]; + context_lookup_offset1 = Context.lookupOffsets[context_mode]; + context_lookup_offset2 = Context.lookupOffsets[context_mode + 1]; + htree_command = hgroup[1].htrees[0]; + while (meta_block_remaining_len > 0) { + var cmd_code; + var range_idx; + var insert_code; + var copy_code; + var insert_length; + var copy_length; + var distance_code; + var distance; + var context; + var j2; + var copy_dst; + br.readMoreInput(); + if (block_length[1] === 0) { + DecodeBlockType( + num_block_types[1], + block_type_trees, + 1, + block_type, + block_type_rb, + block_type_rb_index, + br + ); + block_length[1] = ReadBlockLength( + block_len_trees, + HUFFMAN_MAX_TABLE_SIZE, + br + ); + htree_command = hgroup[1].htrees[block_type[1]]; + } + --block_length[1]; + cmd_code = ReadSymbol( + hgroup[1].codes, + htree_command, + br + ); + range_idx = cmd_code >> 6; + if (range_idx >= 2) { + range_idx -= 2; + distance_code = -1; + } else { + distance_code = 0; + } + insert_code = Prefix.kInsertRangeLut[range_idx] + (cmd_code >> 3 & 7); + copy_code = Prefix.kCopyRangeLut[range_idx] + (cmd_code & 7); + insert_length = Prefix.kInsertLengthPrefixCode[insert_code].offset + br.readBits( + Prefix.kInsertLengthPrefixCode[insert_code].nbits + ); + copy_length = Prefix.kCopyLengthPrefixCode[copy_code].offset + br.readBits( + Prefix.kCopyLengthPrefixCode[copy_code].nbits + ); + prev_byte1 = ringbuffer[pos - 1 & ringbuffer_mask]; + prev_byte2 = ringbuffer[pos - 2 & ringbuffer_mask]; + for (j2 = 0; j2 < insert_length; ++j2) { + br.readMoreInput(); + if (block_length[0] === 0) { + DecodeBlockType( + num_block_types[0], + block_type_trees, + 0, + block_type, + block_type_rb, + block_type_rb_index, + br + ); + block_length[0] = ReadBlockLength( + block_len_trees, + 0, + br + ); + context_offset = block_type[0] << kLiteralContextBits; + context_map_slice = context_offset; + context_mode = context_modes[block_type[0]]; + context_lookup_offset1 = Context.lookupOffsets[context_mode]; + context_lookup_offset2 = Context.lookupOffsets[context_mode + 1]; + } + context = Context.lookup[context_lookup_offset1 + prev_byte1] | Context.lookup[context_lookup_offset2 + prev_byte2]; + literal_htree_index = context_map[context_map_slice + context]; + --block_length[0]; + prev_byte2 = prev_byte1; + prev_byte1 = ReadSymbol( + hgroup[0].codes, + hgroup[0].htrees[literal_htree_index], + br + ); + ringbuffer[pos & ringbuffer_mask] = prev_byte1; + if ((pos & ringbuffer_mask) === ringbuffer_mask) { + output.write( + ringbuffer, + ringbuffer_size + ); + } + ++pos; + } + meta_block_remaining_len -= insert_length; + if (meta_block_remaining_len <= 0) break; + if (distance_code < 0) { + var context; + br.readMoreInput(); + if (block_length[2] === 0) { + DecodeBlockType( + num_block_types[2], + block_type_trees, + 2, + block_type, + block_type_rb, + block_type_rb_index, + br + ); + block_length[2] = ReadBlockLength( + block_len_trees, + 2 * HUFFMAN_MAX_TABLE_SIZE, + br + ); + dist_context_offset = block_type[2] << kDistanceContextBits; + dist_context_map_slice = dist_context_offset; + } + --block_length[2]; + context = (copy_length > 4 ? 3 : copy_length - 2) & 255; + dist_htree_index = dist_context_map[dist_context_map_slice + context]; + distance_code = ReadSymbol( + hgroup[2].codes, + hgroup[2].htrees[dist_htree_index], + br + ); + if (distance_code >= num_direct_distance_codes) { + var nbits; + var postfix; + var offset; + distance_code -= num_direct_distance_codes; + postfix = distance_code & distance_postfix_mask; + distance_code >>= distance_postfix_bits; + nbits = (distance_code >> 1) + 1; + offset = (2 + (distance_code & 1) << nbits) - 4; + distance_code = num_direct_distance_codes + (offset + br.readBits(nbits) << distance_postfix_bits) + postfix; + } + } + distance = TranslateShortCodes( + distance_code, + dist_rb, + dist_rb_idx + ); + if (distance < 0) { + throw new Error( + "[BrotliDecompress] invalid distance" + ); + } + if (pos < max_backward_distance && max_distance !== max_backward_distance) { + max_distance = pos; + } else { + max_distance = max_backward_distance; + } + copy_dst = pos & ringbuffer_mask; + if (distance > max_distance) { + if (copy_length >= BrotliDictionary.minDictionaryWordLength && copy_length <= BrotliDictionary.maxDictionaryWordLength) { + var offset = BrotliDictionary.offsetsByLength[copy_length]; + var word_id = distance - max_distance - 1; + var shift = BrotliDictionary.sizeBitsByLength[copy_length]; + var mask = (1 << shift) - 1; + var word_idx = word_id & mask; + var transform_idx = word_id >> shift; + offset += word_idx * copy_length; + if (transform_idx < Transform.kNumTransforms) { + var len = Transform.transformDictionaryWord( + ringbuffer, + copy_dst, + offset, + copy_length, + transform_idx + ); + copy_dst += len; + pos += len; + meta_block_remaining_len -= len; + if (copy_dst >= ringbuffer_end) { + output.write( + ringbuffer, + ringbuffer_size + ); + for (var _x9 = 0; _x9 < copy_dst - ringbuffer_end; _x9++) + ringbuffer[_x9] = ringbuffer[ringbuffer_end + _x9]; + } + } else { + throw new Error( + "Invalid backward reference. pos: " + pos + " distance: " + distance + " len: " + copy_length + " bytes left: " + meta_block_remaining_len + ); + } + } else { + throw new Error( + "Invalid backward reference. pos: " + pos + " distance: " + distance + " len: " + copy_length + " bytes left: " + meta_block_remaining_len + ); + } + } else { + if (distance_code > 0) { + dist_rb[dist_rb_idx & 3] = distance; + ++dist_rb_idx; + } + if (copy_length > meta_block_remaining_len) { + throw new Error( + "Invalid backward reference. pos: " + pos + " distance: " + distance + " len: " + copy_length + " bytes left: " + meta_block_remaining_len + ); + } + for (j2 = 0; j2 < copy_length; ++j2) { + ringbuffer[pos & ringbuffer_mask] = ringbuffer[pos - distance & ringbuffer_mask]; + if ((pos & ringbuffer_mask) === ringbuffer_mask) { + output.write( + ringbuffer, + ringbuffer_size + ); + } + ++pos; + --meta_block_remaining_len; + } + } + prev_byte1 = ringbuffer[pos - 1 & ringbuffer_mask]; + prev_byte2 = ringbuffer[pos - 2 & ringbuffer_mask]; + } + pos &= 1073741823; + } + output.write(ringbuffer, pos & ringbuffer_mask); + } + exports2.BrotliDecompress = BrotliDecompress; + BrotliDictionary.init(); + }, + { + "./bit_reader": 1, + "./context": 2, + "./dictionary": 6, + "./huffman": 7, + "./prefix": 9, + "./streams": 10, + "./transform": 11 + } + ], + 4: [ + function(require2, module2, exports2) { + var base64 = require2("base64-js"); + exports2.init = function() { + var BrotliDecompressBuffer = require2("./decode").BrotliDecompressBuffer; + var compressed = base64.toByteArray( + require2("./dictionary.bin.js") + ); + return BrotliDecompressBuffer(compressed); + }; + }, + { "./decode": 3, "./dictionary.bin.js": 5, "base64-js": 8 } + ], + 5: [ + function(require2, module2, exports2) { + module2.exports = "W5/fcQLn5gKf2XUb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mGcjZRMAY45puak2sFLCLSwXpEsyy5fnF0jGJBhm+fNSHKKUUfy+276A7/feLOFxxUuHRNJI2Osenxyvf8DAGObT60pfTTlhEg9u/KKkhJqm5U1/+BEcSkpFDA5XeCqxwXmPac1jcuZ3JWQ+p0NdWzb/5v1ZvF8GtMTFFEdQjpLO0bwPb0BHNWnip3liDXI2fXf05jjvfJ0NpjLCUgfTh9CMFYVFKEd4Z/OG/2C+N435mnK+9t1gvCiVcaaH7rK4+PjCvpVNiz+t2QyqH1O8x3JKZVl6Q+Lp/XK8wMjVMslOq9FdSw5FtUs/CptXH9PW+wbWHgrV17R5jTVOtGtKFu3nb80T+E0tv9QkzW3J2dbaw/8ddAKZ0pxIaEqLjlPrji3VgJ3GvdFvlqD8075woxh4fVt0JZE0KVFsAvqhe0dqN9b35jtSpnYMXkU+vZq+IAHad3IHc2s/LYrnD1anfG46IFiMIr9oNbZDWvwthqYNqOigaKd/XlLU4XHfk/PXIjPsLy/9/kAtQ+/wKH+hI/IROWj5FPvTZAT9f7j4ZXQyG4M0TujMAFXYkKvEHv1xhySekgXGGqNxWeWKlf8dDAlLuB1cb/qOD+rk7cmwt+1yKpk9cudqBanTi6zTbXRtV8qylNtjyOVKy1HTz0GW9rjt6sSjAZcT5R+KdtyYb0zyqG9pSLuCw5WBwAn7fjBjKLLoxLXMI+52L9cLwIR2B6OllJZLHJ8vDxmWdtF+QJnmt1rsHPIWY20lftk8fYePkAIg6Hgn532QoIpegMxiWgAOfe5/U44APR8Ac0NeZrVh3gEhs12W+tVSiWiUQekf/YBECUy5fdYbA08dd7VzPAP9aiVcIB9k6tY7WdJ1wNV+bHeydNtmC6G5ICtFC1ZwmJU/j8hf0I8TRVKSiz5oYIa93EpUI78X8GYIAZabx47/n8LDAAJ0nNtP1rpROprqKMBRecShca6qXuTSI3jZBLOB3Vp381B5rCGhjSvh/NSVkYp2qIdP/Bg="; + }, + {} + ], + 6: [ + function(require2, module2, exports2) { + var data = require2("./dictionary-browser"); + exports2.init = function() { + exports2.dictionary = data.init(); + }; + exports2.offsetsByLength = new Uint32Array([ + 0, + 0, + 0, + 0, + 0, + 4096, + 9216, + 21504, + 35840, + 44032, + 53248, + 63488, + 74752, + 87040, + 93696, + 100864, + 104704, + 106752, + 108928, + 113536, + 115968, + 118528, + 119872, + 121280, + 122016 + ]); + exports2.sizeBitsByLength = new Uint8Array([ + 0, + 0, + 0, + 0, + 10, + 10, + 11, + 11, + 10, + 10, + 10, + 10, + 10, + 9, + 9, + 8, + 7, + 7, + 8, + 7, + 7, + 6, + 6, + 5, + 5 + ]); + exports2.minDictionaryWordLength = 4; + exports2.maxDictionaryWordLength = 24; + }, + { "./dictionary-browser": 4 } + ], + 7: [ + function(require2, module2, exports2) { + function HuffmanCode(bits, value) { + this.bits = bits; + this.value = value; + } + exports2.HuffmanCode = HuffmanCode; + var MAX_LENGTH = 15; + function GetNextKey(key, len) { + var step = 1 << len - 1; + while (key & step) { + step >>= 1; + } + return (key & step - 1) + step; + } + function ReplicateValue(table, i2, step, end, code) { + do { + end -= step; + table[i2 + end] = new HuffmanCode( + code.bits, + code.value + ); + } while (end > 0); + } + function NextTableBitSize(count, len, root_bits) { + var left = 1 << len - root_bits; + while (len < MAX_LENGTH) { + left -= count[len]; + if (left <= 0) break; + ++len; + left <<= 1; + } + return len - root_bits; + } + exports2.BrotliBuildHuffmanTable = function(root_table, table, root_bits, code_lengths, code_lengths_size) { + var start_table = table; + var code; + var len; + var symbol; + var key; + var step; + var low; + var mask; + var table_bits; + var table_size; + var total_size; + var sorted; + var count = new Int32Array( + MAX_LENGTH + 1 + ); + var offset = new Int32Array( + MAX_LENGTH + 1 + ); + sorted = new Int32Array(code_lengths_size); + for (symbol = 0; symbol < code_lengths_size; symbol++) { + count[code_lengths[symbol]]++; + } + offset[1] = 0; + for (len = 1; len < MAX_LENGTH; len++) { + offset[len + 1] = offset[len] + count[len]; + } + for (symbol = 0; symbol < code_lengths_size; symbol++) { + if (code_lengths[symbol] !== 0) { + sorted[offset[code_lengths[symbol]]++] = symbol; + } + } + table_bits = root_bits; + table_size = 1 << table_bits; + total_size = table_size; + if (offset[MAX_LENGTH] === 1) { + for (key = 0; key < total_size; ++key) { + root_table[table + key] = new HuffmanCode( + 0, + sorted[0] & 65535 + ); + } + return total_size; + } + key = 0; + symbol = 0; + for (len = 1, step = 2; len <= root_bits; ++len, step <<= 1) { + for (; count[len] > 0; --count[len]) { + code = new HuffmanCode( + len & 255, + sorted[symbol++] & 65535 + ); + ReplicateValue( + root_table, + table + key, + step, + table_size, + code + ); + key = GetNextKey(key, len); + } + } + mask = total_size - 1; + low = -1; + for (len = root_bits + 1, step = 2; len <= MAX_LENGTH; ++len, step <<= 1) { + for (; count[len] > 0; --count[len]) { + if ((key & mask) !== low) { + table += table_size; + table_bits = NextTableBitSize( + count, + len, + root_bits + ); + table_size = 1 << table_bits; + total_size += table_size; + low = key & mask; + root_table[start_table + low] = new HuffmanCode( + table_bits + root_bits & 255, + table - start_table - low & 65535 + ); + } + code = new HuffmanCode( + len - root_bits & 255, + sorted[symbol++] & 65535 + ); + ReplicateValue( + root_table, + table + (key >> root_bits), + step, + table_size, + code + ); + key = GetNextKey(key, len); + } + } + return total_size; + }; + }, + {} + ], + 8: [ + function(require2, module2, exports2) { + "use strict"; + exports2.byteLength = byteLength; + exports2.toByteArray = toByteArray; + exports2.fromByteArray = fromByteArray; + var lookup = []; + var revLookup = []; + var Arr = typeof Uint8Array !== "undefined" ? Uint8Array : Array; + var code = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + for (var i2 = 0, len = code.length; i2 < len; ++i2) { + lookup[i2] = code[i2]; + revLookup[code.charCodeAt(i2)] = i2; + } + revLookup["-".charCodeAt(0)] = 62; + revLookup["_".charCodeAt(0)] = 63; + function getLens(b64) { + var len2 = b64.length; + if (len2 % 4 > 0) { + throw new Error( + "Invalid string. Length must be a multiple of 4" + ); + } + var validLen = b64.indexOf("="); + if (validLen === -1) validLen = len2; + var placeHoldersLen = validLen === len2 ? 0 : 4 - validLen % 4; + return [validLen, placeHoldersLen]; + } + function byteLength(b64) { + var lens = getLens(b64); + var validLen = lens[0]; + var placeHoldersLen = lens[1]; + return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen; + } + function _byteLength(b64, validLen, placeHoldersLen) { + return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen; + } + function toByteArray(b64) { + var tmp; + var lens = getLens(b64); + var validLen = lens[0]; + var placeHoldersLen = lens[1]; + var arr = new Arr( + _byteLength(b64, validLen, placeHoldersLen) + ); + var curByte = 0; + var len2 = placeHoldersLen > 0 ? validLen - 4 : validLen; + for (var i22 = 0; i22 < len2; i22 += 4) { + tmp = revLookup[b64.charCodeAt(i22)] << 18 | revLookup[b64.charCodeAt(i22 + 1)] << 12 | revLookup[b64.charCodeAt(i22 + 2)] << 6 | revLookup[b64.charCodeAt(i22 + 3)]; + arr[curByte++] = tmp >> 16 & 255; + arr[curByte++] = tmp >> 8 & 255; + arr[curByte++] = tmp & 255; + } + if (placeHoldersLen === 2) { + tmp = revLookup[b64.charCodeAt(i22)] << 2 | revLookup[b64.charCodeAt(i22 + 1)] >> 4; + arr[curByte++] = tmp & 255; + } + if (placeHoldersLen === 1) { + tmp = revLookup[b64.charCodeAt(i22)] << 10 | revLookup[b64.charCodeAt(i22 + 1)] << 4 | revLookup[b64.charCodeAt(i22 + 2)] >> 2; + arr[curByte++] = tmp >> 8 & 255; + arr[curByte++] = tmp & 255; + } + return arr; + } + function tripletToBase64(num) { + return lookup[num >> 18 & 63] + lookup[num >> 12 & 63] + lookup[num >> 6 & 63] + lookup[num & 63]; + } + function encodeChunk(uint8, start, end) { + var tmp; + var output = []; + for (var i22 = start; i22 < end; i22 += 3) { + tmp = (uint8[i22] << 16 & 16711680) + (uint8[i22 + 1] << 8 & 65280) + (uint8[i22 + 2] & 255); + output.push(tripletToBase64(tmp)); + } + return output.join(""); + } + function fromByteArray(uint8) { + var tmp; + var len2 = uint8.length; + var extraBytes = len2 % 3; + var parts = []; + var maxChunkLength = 16383; + for (var i22 = 0, len22 = len2 - extraBytes; i22 < len22; i22 += maxChunkLength) { + parts.push( + encodeChunk( + uint8, + i22, + i22 + maxChunkLength > len22 ? len22 : i22 + maxChunkLength + ) + ); + } + if (extraBytes === 1) { + tmp = uint8[len2 - 1]; + parts.push( + lookup[tmp >> 2] + lookup[tmp << 4 & 63] + "==" + ); + } else if (extraBytes === 2) { + tmp = (uint8[len2 - 2] << 8) + uint8[len2 - 1]; + parts.push( + lookup[tmp >> 10] + lookup[tmp >> 4 & 63] + lookup[tmp << 2 & 63] + "=" + ); + } + return parts.join(""); + } + }, + {} + ], + 9: [ + function(require2, module2, exports2) { + function PrefixCodeRange(offset, nbits) { + this.offset = offset; + this.nbits = nbits; + } + exports2.kBlockLengthPrefixCode = [ + new PrefixCodeRange(1, 2), + new PrefixCodeRange(5, 2), + new PrefixCodeRange(9, 2), + new PrefixCodeRange(13, 2), + new PrefixCodeRange(17, 3), + new PrefixCodeRange(25, 3), + new PrefixCodeRange(33, 3), + new PrefixCodeRange(41, 3), + new PrefixCodeRange(49, 4), + new PrefixCodeRange(65, 4), + new PrefixCodeRange(81, 4), + new PrefixCodeRange(97, 4), + new PrefixCodeRange(113, 5), + new PrefixCodeRange(145, 5), + new PrefixCodeRange(177, 5), + new PrefixCodeRange(209, 5), + new PrefixCodeRange(241, 6), + new PrefixCodeRange(305, 6), + new PrefixCodeRange(369, 7), + new PrefixCodeRange(497, 8), + new PrefixCodeRange(753, 9), + new PrefixCodeRange(1265, 10), + new PrefixCodeRange(2289, 11), + new PrefixCodeRange(4337, 12), + new PrefixCodeRange(8433, 13), + new PrefixCodeRange(16625, 24) + ]; + exports2.kInsertLengthPrefixCode = [ + new PrefixCodeRange(0, 0), + new PrefixCodeRange(1, 0), + new PrefixCodeRange(2, 0), + new PrefixCodeRange(3, 0), + new PrefixCodeRange(4, 0), + new PrefixCodeRange(5, 0), + new PrefixCodeRange(6, 1), + new PrefixCodeRange(8, 1), + new PrefixCodeRange(10, 2), + new PrefixCodeRange(14, 2), + new PrefixCodeRange(18, 3), + new PrefixCodeRange(26, 3), + new PrefixCodeRange(34, 4), + new PrefixCodeRange(50, 4), + new PrefixCodeRange(66, 5), + new PrefixCodeRange(98, 5), + new PrefixCodeRange(130, 6), + new PrefixCodeRange(194, 7), + new PrefixCodeRange(322, 8), + new PrefixCodeRange(578, 9), + new PrefixCodeRange(1090, 10), + new PrefixCodeRange(2114, 12), + new PrefixCodeRange(6210, 14), + new PrefixCodeRange(22594, 24) + ]; + exports2.kCopyLengthPrefixCode = [ + new PrefixCodeRange(2, 0), + new PrefixCodeRange(3, 0), + new PrefixCodeRange(4, 0), + new PrefixCodeRange(5, 0), + new PrefixCodeRange(6, 0), + new PrefixCodeRange(7, 0), + new PrefixCodeRange(8, 0), + new PrefixCodeRange(9, 0), + new PrefixCodeRange(10, 1), + new PrefixCodeRange(12, 1), + new PrefixCodeRange(14, 2), + new PrefixCodeRange(18, 2), + new PrefixCodeRange(22, 3), + new PrefixCodeRange(30, 3), + new PrefixCodeRange(38, 4), + new PrefixCodeRange(54, 4), + new PrefixCodeRange(70, 5), + new PrefixCodeRange(102, 5), + new PrefixCodeRange(134, 6), + new PrefixCodeRange(198, 7), + new PrefixCodeRange(326, 8), + new PrefixCodeRange(582, 9), + new PrefixCodeRange(1094, 10), + new PrefixCodeRange(2118, 24) + ]; + exports2.kInsertRangeLut = [0, 0, 8, 8, 0, 16, 8, 16, 16]; + exports2.kCopyRangeLut = [0, 8, 0, 8, 16, 0, 16, 8, 16]; + }, + {} + ], + 10: [ + function(require2, module2, exports2) { + function BrotliInput(buffer) { + this.buffer = buffer; + this.pos = 0; + } + BrotliInput.prototype.read = function(buf, i2, count) { + if (this.pos + count > this.buffer.length) { + count = this.buffer.length - this.pos; + } + for (var p3 = 0; p3 < count; p3++) + buf[i2 + p3] = this.buffer[this.pos + p3]; + this.pos += count; + return count; + }; + exports2.BrotliInput = BrotliInput; + function BrotliOutput(buf) { + this.buffer = buf; + this.pos = 0; + } + BrotliOutput.prototype.write = function(buf, count) { + if (this.pos + count > this.buffer.length) + throw new Error( + "Output buffer is not large enough" + ); + this.buffer.set(buf.subarray(0, count), this.pos); + this.pos += count; + return count; + }; + exports2.BrotliOutput = BrotliOutput; + }, + {} + ], + 11: [ + function(require2, module2, exports2) { + var BrotliDictionary = require2("./dictionary"); + var kIdentity = 0; + var kOmitLast1 = 1; + var kOmitLast2 = 2; + var kOmitLast3 = 3; + var kOmitLast4 = 4; + var kOmitLast5 = 5; + var kOmitLast6 = 6; + var kOmitLast7 = 7; + var kOmitLast8 = 8; + var kOmitLast9 = 9; + var kUppercaseFirst = 10; + var kUppercaseAll = 11; + var kOmitFirst1 = 12; + var kOmitFirst2 = 13; + var kOmitFirst3 = 14; + var kOmitFirst4 = 15; + var kOmitFirst5 = 16; + var kOmitFirst6 = 17; + var kOmitFirst7 = 18; + var kOmitFirst8 = 19; + var kOmitFirst9 = 20; + function Transform(prefix, transform, suffix) { + this.prefix = new Uint8Array(prefix.length); + this.transform = transform; + this.suffix = new Uint8Array(suffix.length); + for (var i2 = 0; i2 < prefix.length; i2++) + this.prefix[i2] = prefix.charCodeAt(i2); + for (var i2 = 0; i2 < suffix.length; i2++) + this.suffix[i2] = suffix.charCodeAt(i2); + } + var kTransforms = [ + new Transform("", kIdentity, ""), + new Transform("", kIdentity, " "), + new Transform(" ", kIdentity, " "), + new Transform("", kOmitFirst1, ""), + new Transform("", kUppercaseFirst, " "), + new Transform("", kIdentity, " the "), + new Transform(" ", kIdentity, ""), + new Transform("s ", kIdentity, " "), + new Transform("", kIdentity, " of "), + new Transform("", kUppercaseFirst, ""), + new Transform("", kIdentity, " and "), + new Transform("", kOmitFirst2, ""), + new Transform("", kOmitLast1, ""), + new Transform(", ", kIdentity, " "), + new Transform("", kIdentity, ", "), + new Transform(" ", kUppercaseFirst, " "), + new Transform("", kIdentity, " in "), + new Transform("", kIdentity, " to "), + new Transform("e ", kIdentity, " "), + new Transform("", kIdentity, '"'), + new Transform("", kIdentity, "."), + new Transform("", kIdentity, '">'), + new Transform("", kIdentity, "\n"), + new Transform("", kOmitLast3, ""), + new Transform("", kIdentity, "]"), + new Transform("", kIdentity, " for "), + new Transform("", kOmitFirst3, ""), + new Transform("", kOmitLast2, ""), + new Transform("", kIdentity, " a "), + new Transform("", kIdentity, " that "), + new Transform(" ", kUppercaseFirst, ""), + new Transform("", kIdentity, ". "), + new Transform(".", kIdentity, ""), + new Transform(" ", kIdentity, ", "), + new Transform("", kOmitFirst4, ""), + new Transform("", kIdentity, " with "), + new Transform("", kIdentity, "'"), + new Transform("", kIdentity, " from "), + new Transform("", kIdentity, " by "), + new Transform("", kOmitFirst5, ""), + new Transform("", kOmitFirst6, ""), + new Transform(" the ", kIdentity, ""), + new Transform("", kOmitLast4, ""), + new Transform("", kIdentity, ". The "), + new Transform("", kUppercaseAll, ""), + new Transform("", kIdentity, " on "), + new Transform("", kIdentity, " as "), + new Transform("", kIdentity, " is "), + new Transform("", kOmitLast7, ""), + new Transform("", kOmitLast1, "ing "), + new Transform("", kIdentity, "\n "), + new Transform("", kIdentity, ":"), + new Transform(" ", kIdentity, ". "), + new Transform("", kIdentity, "ed "), + new Transform("", kOmitFirst9, ""), + new Transform("", kOmitFirst7, ""), + new Transform("", kOmitLast6, ""), + new Transform("", kIdentity, "("), + new Transform("", kUppercaseFirst, ", "), + new Transform("", kOmitLast8, ""), + new Transform("", kIdentity, " at "), + new Transform("", kIdentity, "ly "), + new Transform(" the ", kIdentity, " of "), + new Transform("", kOmitLast5, ""), + new Transform("", kOmitLast9, ""), + new Transform(" ", kUppercaseFirst, ", "), + new Transform("", kUppercaseFirst, '"'), + new Transform(".", kIdentity, "("), + new Transform("", kUppercaseAll, " "), + new Transform("", kUppercaseFirst, '">'), + new Transform("", kIdentity, '="'), + new Transform(" ", kIdentity, "."), + new Transform(".com/", kIdentity, ""), + new Transform(" the ", kIdentity, " of the "), + new Transform("", kUppercaseFirst, "'"), + new Transform("", kIdentity, ". This "), + new Transform("", kIdentity, ","), + new Transform(".", kIdentity, " "), + new Transform("", kUppercaseFirst, "("), + new Transform("", kUppercaseFirst, "."), + new Transform("", kIdentity, " not "), + new Transform(" ", kIdentity, '="'), + new Transform("", kIdentity, "er "), + new Transform(" ", kUppercaseAll, " "), + new Transform("", kIdentity, "al "), + new Transform(" ", kUppercaseAll, ""), + new Transform("", kIdentity, "='"), + new Transform("", kUppercaseAll, '"'), + new Transform("", kUppercaseFirst, ". "), + new Transform(" ", kIdentity, "("), + new Transform("", kIdentity, "ful "), + new Transform(" ", kUppercaseFirst, ". "), + new Transform("", kIdentity, "ive "), + new Transform("", kIdentity, "less "), + new Transform("", kUppercaseAll, "'"), + new Transform("", kIdentity, "est "), + new Transform(" ", kUppercaseFirst, "."), + new Transform("", kUppercaseAll, '">'), + new Transform(" ", kIdentity, "='"), + new Transform("", kUppercaseFirst, ","), + new Transform("", kIdentity, "ize "), + new Transform("", kUppercaseAll, "."), + new Transform("\xC2\xA0", kIdentity, ""), + new Transform(" ", kIdentity, ","), + new Transform("", kUppercaseFirst, '="'), + new Transform("", kUppercaseAll, '="'), + new Transform("", kIdentity, "ous "), + new Transform("", kUppercaseAll, ", "), + new Transform("", kUppercaseFirst, "='"), + new Transform(" ", kUppercaseFirst, ","), + new Transform(" ", kUppercaseAll, '="'), + new Transform(" ", kUppercaseAll, ", "), + new Transform("", kUppercaseAll, ","), + new Transform("", kUppercaseAll, "("), + new Transform("", kUppercaseAll, ". "), + new Transform(" ", kUppercaseAll, "."), + new Transform("", kUppercaseAll, "='"), + new Transform(" ", kUppercaseAll, ". "), + new Transform(" ", kUppercaseFirst, '="'), + new Transform(" ", kUppercaseAll, "='"), + new Transform(" ", kUppercaseFirst, "='") + ]; + exports2.kTransforms = kTransforms; + exports2.kNumTransforms = kTransforms.length; + function ToUpperCase(p3, i2) { + if (p3[i2] < 192) { + if (p3[i2] >= 97 && p3[i2] <= 122) { + p3[i2] ^= 32; + } + return 1; + } + if (p3[i2] < 224) { + p3[i2 + 1] ^= 32; + return 2; + } + p3[i2 + 2] ^= 5; + return 3; + } + exports2.transformDictionaryWord = function(dst, idx, word, len, transform) { + var prefix = kTransforms[transform].prefix; + var suffix = kTransforms[transform].suffix; + var t3 = kTransforms[transform].transform; + var skip = t3 < kOmitFirst1 ? 0 : t3 - (kOmitFirst1 - 1); + var i2 = 0; + var start_idx = idx; + var uppercase; + if (skip > len) { + skip = len; + } + var prefix_pos = 0; + while (prefix_pos < prefix.length) { + dst[idx++] = prefix[prefix_pos++]; + } + word += skip; + len -= skip; + if (t3 <= kOmitLast9) { + len -= t3; + } + for (i2 = 0; i2 < len; i2++) { + dst[idx++] = BrotliDictionary.dictionary[word + i2]; + } + uppercase = idx - len; + if (t3 === kUppercaseFirst) { + ToUpperCase(dst, uppercase); + } else if (t3 === kUppercaseAll) { + while (len > 0) { + var step = ToUpperCase(dst, uppercase); + uppercase += step; + len -= step; + } + } + var suffix_pos = 0; + while (suffix_pos < suffix.length) { + dst[idx++] = suffix[suffix_pos++]; + } + return idx - start_idx; + }; + }, + { "./dictionary": 6 } + ], + 12: [ + function(require2, module2, exports2) { + module2.exports = require2("./dec/decode").BrotliDecompressBuffer; + }, + { "./dec/decode": 3 } + ] + }, + {}, + [12] + )(12); +})(); + +// packages/global-styles-ui/build-module/font-library/lib/inflate.mjs +var __require3 = /* @__PURE__ */ ((x2) => typeof __require !== "undefined" ? __require : typeof Proxy !== "undefined" ? new Proxy(x2, { + get: (a2, b2) => (typeof __require !== "undefined" ? __require : a2)[b2] +}) : x2)(function(x2) { + if (typeof __require !== "undefined") return __require.apply(this, arguments); + throw Error('Dynamic require of "' + x2 + '" is not supported'); +}); +var inflate_default = (function() { + var define, module, exports; + return (/* @__PURE__ */ (function() { + function r3(e2, n2, t3) { + function o3(i22, f2) { + if (!n2[i22]) { + if (!e2[i22]) { + var c2 = "function" == typeof __require3 && __require3; + if (!f2 && c2) return c2(i22, true); + if (u2) return u2(i22, true); + var a2 = new Error("Cannot find module '" + i22 + "'"); + throw a2.code = "MODULE_NOT_FOUND", a2; + } + var p3 = n2[i22] = { exports: {} }; + e2[i22][0].call( + p3.exports, + function(r22) { + var n22 = e2[i22][1][r22]; + return o3(n22 || r22); + }, + p3, + p3.exports, + r3, + e2, + n2, + t3 + ); + } + return n2[i22].exports; + } + for (var u2 = "function" == typeof __require3 && __require3, i2 = 0; i2 < t3.length; i2++) + o3(t3[i2]); + return o3; + } + return r3; + })())( + { + 1: [ + function(require2, module2, exports2) { + "use strict"; + var TYPED_OK = typeof Uint8Array !== "undefined" && typeof Uint16Array !== "undefined" && typeof Int32Array !== "undefined"; + function _has(obj, key) { + return Object.prototype.hasOwnProperty.call(obj, key); + } + exports2.assign = function(obj) { + var sources = Array.prototype.slice.call( + arguments, + 1 + ); + while (sources.length) { + var source = sources.shift(); + if (!source) { + continue; + } + if (typeof source !== "object") { + throw new TypeError( + source + "must be non-object" + ); + } + for (var p3 in source) { + if (_has(source, p3)) { + obj[p3] = source[p3]; + } + } + } + return obj; + }; + exports2.shrinkBuf = function(buf, size) { + if (buf.length === size) { + return buf; + } + if (buf.subarray) { + return buf.subarray(0, size); + } + buf.length = size; + return buf; + }; + var fnTyped = { + arraySet: function(dest, src, src_offs, len, dest_offs) { + if (src.subarray && dest.subarray) { + dest.set( + src.subarray(src_offs, src_offs + len), + dest_offs + ); + return; + } + for (var i2 = 0; i2 < len; i2++) { + dest[dest_offs + i2] = src[src_offs + i2]; + } + }, + // Join array of chunks to single array. + flattenChunks: function(chunks) { + var i2, l2, len, pos, chunk, result; + len = 0; + for (i2 = 0, l2 = chunks.length; i2 < l2; i2++) { + len += chunks[i2].length; + } + result = new Uint8Array(len); + pos = 0; + for (i2 = 0, l2 = chunks.length; i2 < l2; i2++) { + chunk = chunks[i2]; + result.set(chunk, pos); + pos += chunk.length; + } + return result; + } + }; + var fnUntyped = { + arraySet: function(dest, src, src_offs, len, dest_offs) { + for (var i2 = 0; i2 < len; i2++) { + dest[dest_offs + i2] = src[src_offs + i2]; + } + }, + // Join array of chunks to single array. + flattenChunks: function(chunks) { + return [].concat.apply([], chunks); + } + }; + exports2.setTyped = function(on) { + if (on) { + exports2.Buf8 = Uint8Array; + exports2.Buf16 = Uint16Array; + exports2.Buf32 = Int32Array; + exports2.assign(exports2, fnTyped); + } else { + exports2.Buf8 = Array; + exports2.Buf16 = Array; + exports2.Buf32 = Array; + exports2.assign(exports2, fnUntyped); + } + }; + exports2.setTyped(TYPED_OK); + }, + {} + ], + 2: [ + function(require2, module2, exports2) { + "use strict"; + var utils = require2("./common"); + var STR_APPLY_OK = true; + var STR_APPLY_UIA_OK = true; + try { + String.fromCharCode.apply(null, [0]); + } catch (__42) { + STR_APPLY_OK = false; + } + try { + String.fromCharCode.apply(null, new Uint8Array(1)); + } catch (__42) { + STR_APPLY_UIA_OK = false; + } + var _utf8len = new utils.Buf8(256); + for (var q = 0; q < 256; q++) { + _utf8len[q] = q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1; + } + _utf8len[254] = _utf8len[254] = 1; + exports2.string2buf = function(str) { + var buf, c2, c22, m_pos, i2, str_len = str.length, buf_len = 0; + for (m_pos = 0; m_pos < str_len; m_pos++) { + c2 = str.charCodeAt(m_pos); + if ((c2 & 64512) === 55296 && m_pos + 1 < str_len) { + c22 = str.charCodeAt(m_pos + 1); + if ((c22 & 64512) === 56320) { + c2 = 65536 + (c2 - 55296 << 10) + (c22 - 56320); + m_pos++; + } + } + buf_len += c2 < 128 ? 1 : c2 < 2048 ? 2 : c2 < 65536 ? 3 : 4; + } + buf = new utils.Buf8(buf_len); + for (i2 = 0, m_pos = 0; i2 < buf_len; m_pos++) { + c2 = str.charCodeAt(m_pos); + if ((c2 & 64512) === 55296 && m_pos + 1 < str_len) { + c22 = str.charCodeAt(m_pos + 1); + if ((c22 & 64512) === 56320) { + c2 = 65536 + (c2 - 55296 << 10) + (c22 - 56320); + m_pos++; + } + } + if (c2 < 128) { + buf[i2++] = c2; + } else if (c2 < 2048) { + buf[i2++] = 192 | c2 >>> 6; + buf[i2++] = 128 | c2 & 63; + } else if (c2 < 65536) { + buf[i2++] = 224 | c2 >>> 12; + buf[i2++] = 128 | c2 >>> 6 & 63; + buf[i2++] = 128 | c2 & 63; + } else { + buf[i2++] = 240 | c2 >>> 18; + buf[i2++] = 128 | c2 >>> 12 & 63; + buf[i2++] = 128 | c2 >>> 6 & 63; + buf[i2++] = 128 | c2 & 63; + } + } + return buf; + }; + function buf2binstring(buf, len) { + if (len < 65534) { + if (buf.subarray && STR_APPLY_UIA_OK || !buf.subarray && STR_APPLY_OK) { + return String.fromCharCode.apply( + null, + utils.shrinkBuf(buf, len) + ); + } + } + var result = ""; + for (var i2 = 0; i2 < len; i2++) { + result += String.fromCharCode(buf[i2]); + } + return result; + } + exports2.buf2binstring = function(buf) { + return buf2binstring(buf, buf.length); + }; + exports2.binstring2buf = function(str) { + var buf = new utils.Buf8(str.length); + for (var i2 = 0, len = buf.length; i2 < len; i2++) { + buf[i2] = str.charCodeAt(i2); + } + return buf; + }; + exports2.buf2string = function(buf, max) { + var i2, out, c2, c_len; + var len = max || buf.length; + var utf16buf = new Array(len * 2); + for (out = 0, i2 = 0; i2 < len; ) { + c2 = buf[i2++]; + if (c2 < 128) { + utf16buf[out++] = c2; + continue; + } + c_len = _utf8len[c2]; + if (c_len > 4) { + utf16buf[out++] = 65533; + i2 += c_len - 1; + continue; + } + c2 &= c_len === 2 ? 31 : c_len === 3 ? 15 : 7; + while (c_len > 1 && i2 < len) { + c2 = c2 << 6 | buf[i2++] & 63; + c_len--; + } + if (c_len > 1) { + utf16buf[out++] = 65533; + continue; + } + if (c2 < 65536) { + utf16buf[out++] = c2; + } else { + c2 -= 65536; + utf16buf[out++] = 55296 | c2 >> 10 & 1023; + utf16buf[out++] = 56320 | c2 & 1023; + } + } + return buf2binstring(utf16buf, out); + }; + exports2.utf8border = function(buf, max) { + var pos; + max = max || buf.length; + if (max > buf.length) { + max = buf.length; + } + pos = max - 1; + while (pos >= 0 && (buf[pos] & 192) === 128) { + pos--; + } + if (pos < 0) { + return max; + } + if (pos === 0) { + return max; + } + return pos + _utf8len[buf[pos]] > max ? pos : max; + }; + }, + { "./common": 1 } + ], + 3: [ + function(require2, module2, exports2) { + "use strict"; + function adler32(adler, buf, len, pos) { + var s1 = adler & 65535 | 0, s2 = adler >>> 16 & 65535 | 0, n2 = 0; + while (len !== 0) { + n2 = len > 2e3 ? 2e3 : len; + len -= n2; + do { + s1 = s1 + buf[pos++] | 0; + s2 = s2 + s1 | 0; + } while (--n2); + s1 %= 65521; + s2 %= 65521; + } + return s1 | s2 << 16 | 0; + } + module2.exports = adler32; + }, + {} + ], + 4: [ + function(require2, module2, exports2) { + "use strict"; + module2.exports = { + /* Allowed flush values; see deflate() and inflate() below for details */ + Z_NO_FLUSH: 0, + Z_PARTIAL_FLUSH: 1, + Z_SYNC_FLUSH: 2, + Z_FULL_FLUSH: 3, + Z_FINISH: 4, + Z_BLOCK: 5, + Z_TREES: 6, + /* Return codes for the compression/decompression functions. Negative values + * are errors, positive values are used for special but normal events. + */ + Z_OK: 0, + Z_STREAM_END: 1, + Z_NEED_DICT: 2, + Z_ERRNO: -1, + Z_STREAM_ERROR: -2, + Z_DATA_ERROR: -3, + //Z_MEM_ERROR: -4, + Z_BUF_ERROR: -5, + //Z_VERSION_ERROR: -6, + /* compression levels */ + Z_NO_COMPRESSION: 0, + Z_BEST_SPEED: 1, + Z_BEST_COMPRESSION: 9, + Z_DEFAULT_COMPRESSION: -1, + Z_FILTERED: 1, + Z_HUFFMAN_ONLY: 2, + Z_RLE: 3, + Z_FIXED: 4, + Z_DEFAULT_STRATEGY: 0, + /* Possible values of the data_type field (though see inflate()) */ + Z_BINARY: 0, + Z_TEXT: 1, + //Z_ASCII: 1, // = Z_TEXT (deprecated) + Z_UNKNOWN: 2, + /* The deflate compression method */ + Z_DEFLATED: 8 + //Z_NULL: null // Use -1 or null inline, depending on var type + }; + }, + {} + ], + 5: [ + function(require2, module2, exports2) { + "use strict"; + function makeTable() { + var c2, table = []; + for (var n2 = 0; n2 < 256; n2++) { + c2 = n2; + for (var k2 = 0; k2 < 8; k2++) { + c2 = c2 & 1 ? 3988292384 ^ c2 >>> 1 : c2 >>> 1; + } + table[n2] = c2; + } + return table; + } + var crcTable = makeTable(); + function crc32(crc, buf, len, pos) { + var t3 = crcTable, end = pos + len; + crc ^= -1; + for (var i2 = pos; i2 < end; i2++) { + crc = crc >>> 8 ^ t3[(crc ^ buf[i2]) & 255]; + } + return crc ^ -1; + } + module2.exports = crc32; + }, + {} + ], + 6: [ + function(require2, module2, exports2) { + "use strict"; + function GZheader() { + this.text = 0; + this.time = 0; + this.xflags = 0; + this.os = 0; + this.extra = null; + this.extra_len = 0; + this.name = ""; + this.comment = ""; + this.hcrc = 0; + this.done = false; + } + module2.exports = GZheader; + }, + {} + ], + 7: [ + function(require2, module2, exports2) { + "use strict"; + var BAD = 30; + var TYPE = 12; + module2.exports = function inflate_fast(strm, start) { + var state; + var _in; + var last; + var _out; + var beg; + var end; + var dmax; + var wsize; + var whave; + var wnext; + var s_window; + var hold; + var bits; + var lcode; + var dcode; + var lmask; + var dmask; + var here; + var op; + var len; + var dist; + var from; + var from_source; + var input, output; + state = strm.state; + _in = strm.next_in; + input = strm.input; + last = _in + (strm.avail_in - 5); + _out = strm.next_out; + output = strm.output; + beg = _out - (start - strm.avail_out); + end = _out + (strm.avail_out - 257); + dmax = state.dmax; + wsize = state.wsize; + whave = state.whave; + wnext = state.wnext; + s_window = state.window; + hold = state.hold; + bits = state.bits; + lcode = state.lencode; + dcode = state.distcode; + lmask = (1 << state.lenbits) - 1; + dmask = (1 << state.distbits) - 1; + top: do { + if (bits < 15) { + hold += input[_in++] << bits; + bits += 8; + hold += input[_in++] << bits; + bits += 8; + } + here = lcode[hold & lmask]; + dolen: for (; ; ) { + op = here >>> 24; + hold >>>= op; + bits -= op; + op = here >>> 16 & 255; + if (op === 0) { + output[_out++] = here & 65535; + } else if (op & 16) { + len = here & 65535; + op &= 15; + if (op) { + if (bits < op) { + hold += input[_in++] << bits; + bits += 8; + } + len += hold & (1 << op) - 1; + hold >>>= op; + bits -= op; + } + if (bits < 15) { + hold += input[_in++] << bits; + bits += 8; + hold += input[_in++] << bits; + bits += 8; + } + here = dcode[hold & dmask]; + dodist: for (; ; ) { + op = here >>> 24; + hold >>>= op; + bits -= op; + op = here >>> 16 & 255; + if (op & 16) { + dist = here & 65535; + op &= 15; + if (bits < op) { + hold += input[_in++] << bits; + bits += 8; + if (bits < op) { + hold += input[_in++] << bits; + bits += 8; + } + } + dist += hold & (1 << op) - 1; + if (dist > dmax) { + strm.msg = "invalid distance too far back"; + state.mode = BAD; + break top; + } + hold >>>= op; + bits -= op; + op = _out - beg; + if (dist > op) { + op = dist - op; + if (op > whave) { + if (state.sane) { + strm.msg = "invalid distance too far back"; + state.mode = BAD; + break top; + } + } + from = 0; + from_source = s_window; + if (wnext === 0) { + from += wsize - op; + if (op < len) { + len -= op; + do { + output[_out++] = s_window[from++]; + } while (--op); + from = _out - dist; + from_source = output; + } + } else if (wnext < op) { + from += wsize + wnext - op; + op -= wnext; + if (op < len) { + len -= op; + do { + output[_out++] = s_window[from++]; + } while (--op); + from = 0; + if (wnext < len) { + op = wnext; + len -= op; + do { + output[_out++] = s_window[from++]; + } while (--op); + from = _out - dist; + from_source = output; + } + } + } else { + from += wnext - op; + if (op < len) { + len -= op; + do { + output[_out++] = s_window[from++]; + } while (--op); + from = _out - dist; + from_source = output; + } + } + while (len > 2) { + output[_out++] = from_source[from++]; + output[_out++] = from_source[from++]; + output[_out++] = from_source[from++]; + len -= 3; + } + if (len) { + output[_out++] = from_source[from++]; + if (len > 1) { + output[_out++] = from_source[from++]; + } + } + } else { + from = _out - dist; + do { + output[_out++] = output[from++]; + output[_out++] = output[from++]; + output[_out++] = output[from++]; + len -= 3; + } while (len > 2); + if (len) { + output[_out++] = output[from++]; + if (len > 1) { + output[_out++] = output[from++]; + } + } + } + } else if ((op & 64) === 0) { + here = dcode[(here & 65535) + (hold & (1 << op) - 1)]; + continue dodist; + } else { + strm.msg = "invalid distance code"; + state.mode = BAD; + break top; + } + break; + } + } else if ((op & 64) === 0) { + here = lcode[(here & 65535) + (hold & (1 << op) - 1)]; + continue dolen; + } else if (op & 32) { + state.mode = TYPE; + break top; + } else { + strm.msg = "invalid literal/length code"; + state.mode = BAD; + break top; + } + break; + } + } while (_in < last && _out < end); + len = bits >> 3; + _in -= len; + bits -= len << 3; + hold &= (1 << bits) - 1; + strm.next_in = _in; + strm.next_out = _out; + strm.avail_in = _in < last ? 5 + (last - _in) : 5 - (_in - last); + strm.avail_out = _out < end ? 257 + (end - _out) : 257 - (_out - end); + state.hold = hold; + state.bits = bits; + return; + }; + }, + {} + ], + 8: [ + function(require2, module2, exports2) { + "use strict"; + var utils = require2("../utils/common"); + var adler32 = require2("./adler32"); + var crc32 = require2("./crc32"); + var inflate_fast = require2("./inffast"); + var inflate_table = require2("./inftrees"); + var CODES = 0; + var LENS = 1; + var DISTS = 2; + var Z_FINISH = 4; + var Z_BLOCK = 5; + var Z_TREES = 6; + var Z_OK = 0; + var Z_STREAM_END = 1; + var Z_NEED_DICT = 2; + var Z_STREAM_ERROR = -2; + var Z_DATA_ERROR = -3; + var Z_MEM_ERROR = -4; + var Z_BUF_ERROR = -5; + var Z_DEFLATED = 8; + var HEAD = 1; + var FLAGS = 2; + var TIME = 3; + var OS = 4; + var EXLEN = 5; + var EXTRA = 6; + var NAME = 7; + var COMMENT = 8; + var HCRC = 9; + var DICTID = 10; + var DICT = 11; + var TYPE = 12; + var TYPEDO = 13; + var STORED = 14; + var COPY_ = 15; + var COPY = 16; + var TABLE = 17; + var LENLENS = 18; + var CODELENS = 19; + var LEN_ = 20; + var LEN = 21; + var LENEXT = 22; + var DIST = 23; + var DISTEXT = 24; + var MATCH = 25; + var LIT = 26; + var CHECK = 27; + var LENGTH = 28; + var DONE = 29; + var BAD = 30; + var MEM = 31; + var SYNC = 32; + var ENOUGH_LENS = 852; + var ENOUGH_DISTS = 592; + var MAX_WBITS = 15; + var DEF_WBITS = MAX_WBITS; + function zswap32(q) { + return (q >>> 24 & 255) + (q >>> 8 & 65280) + ((q & 65280) << 8) + ((q & 255) << 24); + } + function InflateState() { + this.mode = 0; + this.last = false; + this.wrap = 0; + this.havedict = false; + this.flags = 0; + this.dmax = 0; + this.check = 0; + this.total = 0; + this.head = null; + this.wbits = 0; + this.wsize = 0; + this.whave = 0; + this.wnext = 0; + this.window = null; + this.hold = 0; + this.bits = 0; + this.length = 0; + this.offset = 0; + this.extra = 0; + this.lencode = null; + this.distcode = null; + this.lenbits = 0; + this.distbits = 0; + this.ncode = 0; + this.nlen = 0; + this.ndist = 0; + this.have = 0; + this.next = null; + this.lens = new utils.Buf16( + 320 + ); + this.work = new utils.Buf16( + 288 + ); + this.lendyn = null; + this.distdyn = null; + this.sane = 0; + this.back = 0; + this.was = 0; + } + function inflateResetKeep(strm) { + var state; + if (!strm || !strm.state) { + return Z_STREAM_ERROR; + } + state = strm.state; + strm.total_in = strm.total_out = state.total = 0; + strm.msg = ""; + if (state.wrap) { + strm.adler = state.wrap & 1; + } + state.mode = HEAD; + state.last = 0; + state.havedict = 0; + state.dmax = 32768; + state.head = null; + state.hold = 0; + state.bits = 0; + state.lencode = state.lendyn = new utils.Buf32( + ENOUGH_LENS + ); + state.distcode = state.distdyn = new utils.Buf32( + ENOUGH_DISTS + ); + state.sane = 1; + state.back = -1; + return Z_OK; + } + function inflateReset(strm) { + var state; + if (!strm || !strm.state) { + return Z_STREAM_ERROR; + } + state = strm.state; + state.wsize = 0; + state.whave = 0; + state.wnext = 0; + return inflateResetKeep(strm); + } + function inflateReset2(strm, windowBits) { + var wrap; + var state; + if (!strm || !strm.state) { + return Z_STREAM_ERROR; + } + state = strm.state; + if (windowBits < 0) { + wrap = 0; + windowBits = -windowBits; + } else { + wrap = (windowBits >> 4) + 1; + if (windowBits < 48) { + windowBits &= 15; + } + } + if (windowBits && (windowBits < 8 || windowBits > 15)) { + return Z_STREAM_ERROR; + } + if (state.window !== null && state.wbits !== windowBits) { + state.window = null; + } + state.wrap = wrap; + state.wbits = windowBits; + return inflateReset(strm); + } + function inflateInit2(strm, windowBits) { + var ret; + var state; + if (!strm) { + return Z_STREAM_ERROR; + } + state = new InflateState(); + strm.state = state; + state.window = null; + ret = inflateReset2(strm, windowBits); + if (ret !== Z_OK) { + strm.state = null; + } + return ret; + } + function inflateInit(strm) { + return inflateInit2(strm, DEF_WBITS); + } + var virgin = true; + var lenfix, distfix; + function fixedtables(state) { + if (virgin) { + var sym; + lenfix = new utils.Buf32(512); + distfix = new utils.Buf32(32); + sym = 0; + while (sym < 144) { + state.lens[sym++] = 8; + } + while (sym < 256) { + state.lens[sym++] = 9; + } + while (sym < 280) { + state.lens[sym++] = 7; + } + while (sym < 288) { + state.lens[sym++] = 8; + } + inflate_table( + LENS, + state.lens, + 0, + 288, + lenfix, + 0, + state.work, + { bits: 9 } + ); + sym = 0; + while (sym < 32) { + state.lens[sym++] = 5; + } + inflate_table( + DISTS, + state.lens, + 0, + 32, + distfix, + 0, + state.work, + { bits: 5 } + ); + virgin = false; + } + state.lencode = lenfix; + state.lenbits = 9; + state.distcode = distfix; + state.distbits = 5; + } + function updatewindow(strm, src, end, copy) { + var dist; + var state = strm.state; + if (state.window === null) { + state.wsize = 1 << state.wbits; + state.wnext = 0; + state.whave = 0; + state.window = new utils.Buf8(state.wsize); + } + if (copy >= state.wsize) { + utils.arraySet( + state.window, + src, + end - state.wsize, + state.wsize, + 0 + ); + state.wnext = 0; + state.whave = state.wsize; + } else { + dist = state.wsize - state.wnext; + if (dist > copy) { + dist = copy; + } + utils.arraySet( + state.window, + src, + end - copy, + dist, + state.wnext + ); + copy -= dist; + if (copy) { + utils.arraySet( + state.window, + src, + end - copy, + copy, + 0 + ); + state.wnext = copy; + state.whave = state.wsize; + } else { + state.wnext += dist; + if (state.wnext === state.wsize) { + state.wnext = 0; + } + if (state.whave < state.wsize) { + state.whave += dist; + } + } + } + return 0; + } + function inflate(strm, flush) { + var state; + var input, output; + var next; + var put; + var have, left; + var hold; + var bits; + var _in, _out; + var copy; + var from; + var from_source; + var here = 0; + var here_bits, here_op, here_val; + var last_bits, last_op, last_val; + var len; + var ret; + var hbuf = new utils.Buf8( + 4 + ); + var opts; + var n2; + var order = ( + /* permutation of code lengths */ + [ + 16, + 17, + 18, + 0, + 8, + 7, + 9, + 6, + 10, + 5, + 11, + 4, + 12, + 3, + 13, + 2, + 14, + 1, + 15 + ] + ); + if (!strm || !strm.state || !strm.output || !strm.input && strm.avail_in !== 0) { + return Z_STREAM_ERROR; + } + state = strm.state; + if (state.mode === TYPE) { + state.mode = TYPEDO; + } + put = strm.next_out; + output = strm.output; + left = strm.avail_out; + next = strm.next_in; + input = strm.input; + have = strm.avail_in; + hold = state.hold; + bits = state.bits; + _in = have; + _out = left; + ret = Z_OK; + inf_leave: for (; ; ) { + switch (state.mode) { + case HEAD: + if (state.wrap === 0) { + state.mode = TYPEDO; + break; + } + while (bits < 16) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + if (state.wrap & 2 && hold === 35615) { + state.check = 0; + hbuf[0] = hold & 255; + hbuf[1] = hold >>> 8 & 255; + state.check = crc32( + state.check, + hbuf, + 2, + 0 + ); + hold = 0; + bits = 0; + state.mode = FLAGS; + break; + } + state.flags = 0; + if (state.head) { + state.head.done = false; + } + if (!(state.wrap & 1) || (((hold & 255) << 8) + (hold >> 8)) % 31) { + strm.msg = "incorrect header check"; + state.mode = BAD; + break; + } + if ((hold & 15) !== Z_DEFLATED) { + strm.msg = "unknown compression method"; + state.mode = BAD; + break; + } + hold >>>= 4; + bits -= 4; + len = (hold & 15) + 8; + if (state.wbits === 0) { + state.wbits = len; + } else if (len > state.wbits) { + strm.msg = "invalid window size"; + state.mode = BAD; + break; + } + state.dmax = 1 << len; + strm.adler = state.check = 1; + state.mode = hold & 512 ? DICTID : TYPE; + hold = 0; + bits = 0; + break; + case FLAGS: + while (bits < 16) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + state.flags = hold; + if ((state.flags & 255) !== Z_DEFLATED) { + strm.msg = "unknown compression method"; + state.mode = BAD; + break; + } + if (state.flags & 57344) { + strm.msg = "unknown header flags set"; + state.mode = BAD; + break; + } + if (state.head) { + state.head.text = hold >> 8 & 1; + } + if (state.flags & 512) { + hbuf[0] = hold & 255; + hbuf[1] = hold >>> 8 & 255; + state.check = crc32( + state.check, + hbuf, + 2, + 0 + ); + } + hold = 0; + bits = 0; + state.mode = TIME; + /* falls through */ + case TIME: + while (bits < 32) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + if (state.head) { + state.head.time = hold; + } + if (state.flags & 512) { + hbuf[0] = hold & 255; + hbuf[1] = hold >>> 8 & 255; + hbuf[2] = hold >>> 16 & 255; + hbuf[3] = hold >>> 24 & 255; + state.check = crc32( + state.check, + hbuf, + 4, + 0 + ); + } + hold = 0; + bits = 0; + state.mode = OS; + /* falls through */ + case OS: + while (bits < 16) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + if (state.head) { + state.head.xflags = hold & 255; + state.head.os = hold >> 8; + } + if (state.flags & 512) { + hbuf[0] = hold & 255; + hbuf[1] = hold >>> 8 & 255; + state.check = crc32( + state.check, + hbuf, + 2, + 0 + ); + } + hold = 0; + bits = 0; + state.mode = EXLEN; + /* falls through */ + case EXLEN: + if (state.flags & 1024) { + while (bits < 16) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + state.length = hold; + if (state.head) { + state.head.extra_len = hold; + } + if (state.flags & 512) { + hbuf[0] = hold & 255; + hbuf[1] = hold >>> 8 & 255; + state.check = crc32( + state.check, + hbuf, + 2, + 0 + ); + } + hold = 0; + bits = 0; + } else if (state.head) { + state.head.extra = null; + } + state.mode = EXTRA; + /* falls through */ + case EXTRA: + if (state.flags & 1024) { + copy = state.length; + if (copy > have) { + copy = have; + } + if (copy) { + if (state.head) { + len = state.head.extra_len - state.length; + if (!state.head.extra) { + state.head.extra = new Array( + state.head.extra_len + ); + } + utils.arraySet( + state.head.extra, + input, + next, + // extra field is limited to 65536 bytes + // - no need for additional size check + copy, + /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/ + len + ); + } + if (state.flags & 512) { + state.check = crc32( + state.check, + input, + copy, + next + ); + } + have -= copy; + next += copy; + state.length -= copy; + } + if (state.length) { + break inf_leave; + } + } + state.length = 0; + state.mode = NAME; + /* falls through */ + case NAME: + if (state.flags & 2048) { + if (have === 0) { + break inf_leave; + } + copy = 0; + do { + len = input[next + copy++]; + if (state.head && len && state.length < 65536) { + state.head.name += String.fromCharCode(len); + } + } while (len && copy < have); + if (state.flags & 512) { + state.check = crc32( + state.check, + input, + copy, + next + ); + } + have -= copy; + next += copy; + if (len) { + break inf_leave; + } + } else if (state.head) { + state.head.name = null; + } + state.length = 0; + state.mode = COMMENT; + /* falls through */ + case COMMENT: + if (state.flags & 4096) { + if (have === 0) { + break inf_leave; + } + copy = 0; + do { + len = input[next + copy++]; + if (state.head && len && state.length < 65536) { + state.head.comment += String.fromCharCode(len); + } + } while (len && copy < have); + if (state.flags & 512) { + state.check = crc32( + state.check, + input, + copy, + next + ); + } + have -= copy; + next += copy; + if (len) { + break inf_leave; + } + } else if (state.head) { + state.head.comment = null; + } + state.mode = HCRC; + /* falls through */ + case HCRC: + if (state.flags & 512) { + while (bits < 16) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + if (hold !== (state.check & 65535)) { + strm.msg = "header crc mismatch"; + state.mode = BAD; + break; + } + hold = 0; + bits = 0; + } + if (state.head) { + state.head.hcrc = state.flags >> 9 & 1; + state.head.done = true; + } + strm.adler = state.check = 0; + state.mode = TYPE; + break; + case DICTID: + while (bits < 32) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + strm.adler = state.check = zswap32(hold); + hold = 0; + bits = 0; + state.mode = DICT; + /* falls through */ + case DICT: + if (state.havedict === 0) { + strm.next_out = put; + strm.avail_out = left; + strm.next_in = next; + strm.avail_in = have; + state.hold = hold; + state.bits = bits; + return Z_NEED_DICT; + } + strm.adler = state.check = 1; + state.mode = TYPE; + /* falls through */ + case TYPE: + if (flush === Z_BLOCK || flush === Z_TREES) { + break inf_leave; + } + /* falls through */ + case TYPEDO: + if (state.last) { + hold >>>= bits & 7; + bits -= bits & 7; + state.mode = CHECK; + break; + } + while (bits < 3) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + state.last = hold & 1; + hold >>>= 1; + bits -= 1; + switch (hold & 3) { + case 0: + state.mode = STORED; + break; + case 1: + fixedtables(state); + state.mode = LEN_; + if (flush === Z_TREES) { + hold >>>= 2; + bits -= 2; + break inf_leave; + } + break; + case 2: + state.mode = TABLE; + break; + case 3: + strm.msg = "invalid block type"; + state.mode = BAD; + } + hold >>>= 2; + bits -= 2; + break; + case STORED: + hold >>>= bits & 7; + bits -= bits & 7; + while (bits < 32) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + if ((hold & 65535) !== (hold >>> 16 ^ 65535)) { + strm.msg = "invalid stored block lengths"; + state.mode = BAD; + break; + } + state.length = hold & 65535; + hold = 0; + bits = 0; + state.mode = COPY_; + if (flush === Z_TREES) { + break inf_leave; + } + /* falls through */ + case COPY_: + state.mode = COPY; + /* falls through */ + case COPY: + copy = state.length; + if (copy) { + if (copy > have) { + copy = have; + } + if (copy > left) { + copy = left; + } + if (copy === 0) { + break inf_leave; + } + utils.arraySet( + output, + input, + next, + copy, + put + ); + have -= copy; + next += copy; + left -= copy; + put += copy; + state.length -= copy; + break; + } + state.mode = TYPE; + break; + case TABLE: + while (bits < 14) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + state.nlen = (hold & 31) + 257; + hold >>>= 5; + bits -= 5; + state.ndist = (hold & 31) + 1; + hold >>>= 5; + bits -= 5; + state.ncode = (hold & 15) + 4; + hold >>>= 4; + bits -= 4; + if (state.nlen > 286 || state.ndist > 30) { + strm.msg = "too many length or distance symbols"; + state.mode = BAD; + break; + } + state.have = 0; + state.mode = LENLENS; + /* falls through */ + case LENLENS: + while (state.have < state.ncode) { + while (bits < 3) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + state.lens[order[state.have++]] = hold & 7; + hold >>>= 3; + bits -= 3; + } + while (state.have < 19) { + state.lens[order[state.have++]] = 0; + } + state.lencode = state.lendyn; + state.lenbits = 7; + opts = { bits: state.lenbits }; + ret = inflate_table( + CODES, + state.lens, + 0, + 19, + state.lencode, + 0, + state.work, + opts + ); + state.lenbits = opts.bits; + if (ret) { + strm.msg = "invalid code lengths set"; + state.mode = BAD; + break; + } + state.have = 0; + state.mode = CODELENS; + /* falls through */ + case CODELENS: + while (state.have < state.nlen + state.ndist) { + for (; ; ) { + here = state.lencode[hold & (1 << state.lenbits) - 1]; + here_bits = here >>> 24; + here_op = here >>> 16 & 255; + here_val = here & 65535; + if (here_bits <= bits) { + break; + } + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + if (here_val < 16) { + hold >>>= here_bits; + bits -= here_bits; + state.lens[state.have++] = here_val; + } else { + if (here_val === 16) { + n2 = here_bits + 2; + while (bits < n2) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + hold >>>= here_bits; + bits -= here_bits; + if (state.have === 0) { + strm.msg = "invalid bit length repeat"; + state.mode = BAD; + break; + } + len = state.lens[state.have - 1]; + copy = 3 + (hold & 3); + hold >>>= 2; + bits -= 2; + } else if (here_val === 17) { + n2 = here_bits + 3; + while (bits < n2) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + hold >>>= here_bits; + bits -= here_bits; + len = 0; + copy = 3 + (hold & 7); + hold >>>= 3; + bits -= 3; + } else { + n2 = here_bits + 7; + while (bits < n2) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + hold >>>= here_bits; + bits -= here_bits; + len = 0; + copy = 11 + (hold & 127); + hold >>>= 7; + bits -= 7; + } + if (state.have + copy > state.nlen + state.ndist) { + strm.msg = "invalid bit length repeat"; + state.mode = BAD; + break; + } + while (copy--) { + state.lens[state.have++] = len; + } + } + } + if (state.mode === BAD) { + break; + } + if (state.lens[256] === 0) { + strm.msg = "invalid code -- missing end-of-block"; + state.mode = BAD; + break; + } + state.lenbits = 9; + opts = { bits: state.lenbits }; + ret = inflate_table( + LENS, + state.lens, + 0, + state.nlen, + state.lencode, + 0, + state.work, + opts + ); + state.lenbits = opts.bits; + if (ret) { + strm.msg = "invalid literal/lengths set"; + state.mode = BAD; + break; + } + state.distbits = 6; + state.distcode = state.distdyn; + opts = { bits: state.distbits }; + ret = inflate_table( + DISTS, + state.lens, + state.nlen, + state.ndist, + state.distcode, + 0, + state.work, + opts + ); + state.distbits = opts.bits; + if (ret) { + strm.msg = "invalid distances set"; + state.mode = BAD; + break; + } + state.mode = LEN_; + if (flush === Z_TREES) { + break inf_leave; + } + /* falls through */ + case LEN_: + state.mode = LEN; + /* falls through */ + case LEN: + if (have >= 6 && left >= 258) { + strm.next_out = put; + strm.avail_out = left; + strm.next_in = next; + strm.avail_in = have; + state.hold = hold; + state.bits = bits; + inflate_fast(strm, _out); + put = strm.next_out; + output = strm.output; + left = strm.avail_out; + next = strm.next_in; + input = strm.input; + have = strm.avail_in; + hold = state.hold; + bits = state.bits; + if (state.mode === TYPE) { + state.back = -1; + } + break; + } + state.back = 0; + for (; ; ) { + here = state.lencode[hold & (1 << state.lenbits) - 1]; + here_bits = here >>> 24; + here_op = here >>> 16 & 255; + here_val = here & 65535; + if (here_bits <= bits) { + break; + } + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + if (here_op && (here_op & 240) === 0) { + last_bits = here_bits; + last_op = here_op; + last_val = here_val; + for (; ; ) { + here = state.lencode[last_val + ((hold & (1 << last_bits + last_op) - 1) >> last_bits)]; + here_bits = here >>> 24; + here_op = here >>> 16 & 255; + here_val = here & 65535; + if (last_bits + here_bits <= bits) { + break; + } + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + hold >>>= last_bits; + bits -= last_bits; + state.back += last_bits; + } + hold >>>= here_bits; + bits -= here_bits; + state.back += here_bits; + state.length = here_val; + if (here_op === 0) { + state.mode = LIT; + break; + } + if (here_op & 32) { + state.back = -1; + state.mode = TYPE; + break; + } + if (here_op & 64) { + strm.msg = "invalid literal/length code"; + state.mode = BAD; + break; + } + state.extra = here_op & 15; + state.mode = LENEXT; + /* falls through */ + case LENEXT: + if (state.extra) { + n2 = state.extra; + while (bits < n2) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + state.length += hold & (1 << state.extra) - 1; + hold >>>= state.extra; + bits -= state.extra; + state.back += state.extra; + } + state.was = state.length; + state.mode = DIST; + /* falls through */ + case DIST: + for (; ; ) { + here = state.distcode[hold & (1 << state.distbits) - 1]; + here_bits = here >>> 24; + here_op = here >>> 16 & 255; + here_val = here & 65535; + if (here_bits <= bits) { + break; + } + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + if ((here_op & 240) === 0) { + last_bits = here_bits; + last_op = here_op; + last_val = here_val; + for (; ; ) { + here = state.distcode[last_val + ((hold & (1 << last_bits + last_op) - 1) >> last_bits)]; + here_bits = here >>> 24; + here_op = here >>> 16 & 255; + here_val = here & 65535; + if (last_bits + here_bits <= bits) { + break; + } + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + hold >>>= last_bits; + bits -= last_bits; + state.back += last_bits; + } + hold >>>= here_bits; + bits -= here_bits; + state.back += here_bits; + if (here_op & 64) { + strm.msg = "invalid distance code"; + state.mode = BAD; + break; + } + state.offset = here_val; + state.extra = here_op & 15; + state.mode = DISTEXT; + /* falls through */ + case DISTEXT: + if (state.extra) { + n2 = state.extra; + while (bits < n2) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + state.offset += hold & (1 << state.extra) - 1; + hold >>>= state.extra; + bits -= state.extra; + state.back += state.extra; + } + if (state.offset > state.dmax) { + strm.msg = "invalid distance too far back"; + state.mode = BAD; + break; + } + state.mode = MATCH; + /* falls through */ + case MATCH: + if (left === 0) { + break inf_leave; + } + copy = _out - left; + if (state.offset > copy) { + copy = state.offset - copy; + if (copy > state.whave) { + if (state.sane) { + strm.msg = "invalid distance too far back"; + state.mode = BAD; + break; + } + } + if (copy > state.wnext) { + copy -= state.wnext; + from = state.wsize - copy; + } else { + from = state.wnext - copy; + } + if (copy > state.length) { + copy = state.length; + } + from_source = state.window; + } else { + from_source = output; + from = put - state.offset; + copy = state.length; + } + if (copy > left) { + copy = left; + } + left -= copy; + state.length -= copy; + do { + output[put++] = from_source[from++]; + } while (--copy); + if (state.length === 0) { + state.mode = LEN; + } + break; + case LIT: + if (left === 0) { + break inf_leave; + } + output[put++] = state.length; + left--; + state.mode = LEN; + break; + case CHECK: + if (state.wrap) { + while (bits < 32) { + if (have === 0) { + break inf_leave; + } + have--; + hold |= input[next++] << bits; + bits += 8; + } + _out -= left; + strm.total_out += _out; + state.total += _out; + if (_out) { + strm.adler = state.check = /*UPDATE(state.check, put - _out, _out);*/ + state.flags ? crc32( + state.check, + output, + _out, + put - _out + ) : adler32( + state.check, + output, + _out, + put - _out + ); + } + _out = left; + if ((state.flags ? hold : zswap32(hold)) !== state.check) { + strm.msg = "incorrect data check"; + state.mode = BAD; + break; + } + hold = 0; + bits = 0; + } + state.mode = LENGTH; + /* falls through */ + case LENGTH: + if (state.wrap && state.flags) { + while (bits < 32) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + if (hold !== (state.total & 4294967295)) { + strm.msg = "incorrect length check"; + state.mode = BAD; + break; + } + hold = 0; + bits = 0; + } + state.mode = DONE; + /* falls through */ + case DONE: + ret = Z_STREAM_END; + break inf_leave; + case BAD: + ret = Z_DATA_ERROR; + break inf_leave; + case MEM: + return Z_MEM_ERROR; + case SYNC: + /* falls through */ + default: + return Z_STREAM_ERROR; + } + } + strm.next_out = put; + strm.avail_out = left; + strm.next_in = next; + strm.avail_in = have; + state.hold = hold; + state.bits = bits; + if (state.wsize || _out !== strm.avail_out && state.mode < BAD && (state.mode < CHECK || flush !== Z_FINISH)) { + if (updatewindow( + strm, + strm.output, + strm.next_out, + _out - strm.avail_out + )) { + state.mode = MEM; + return Z_MEM_ERROR; + } + } + _in -= strm.avail_in; + _out -= strm.avail_out; + strm.total_in += _in; + strm.total_out += _out; + state.total += _out; + if (state.wrap && _out) { + strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/ + state.flags ? crc32( + state.check, + output, + _out, + strm.next_out - _out + ) : adler32( + state.check, + output, + _out, + strm.next_out - _out + ); + } + strm.data_type = state.bits + (state.last ? 64 : 0) + (state.mode === TYPE ? 128 : 0) + (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0); + if ((_in === 0 && _out === 0 || flush === Z_FINISH) && ret === Z_OK) { + ret = Z_BUF_ERROR; + } + return ret; + } + function inflateEnd(strm) { + if (!strm || !strm.state) { + return Z_STREAM_ERROR; + } + var state = strm.state; + if (state.window) { + state.window = null; + } + strm.state = null; + return Z_OK; + } + function inflateGetHeader(strm, head2) { + var state; + if (!strm || !strm.state) { + return Z_STREAM_ERROR; + } + state = strm.state; + if ((state.wrap & 2) === 0) { + return Z_STREAM_ERROR; + } + state.head = head2; + head2.done = false; + return Z_OK; + } + function inflateSetDictionary(strm, dictionary) { + var dictLength = dictionary.length; + var state; + var dictid; + var ret; + if (!strm || !strm.state) { + return Z_STREAM_ERROR; + } + state = strm.state; + if (state.wrap !== 0 && state.mode !== DICT) { + return Z_STREAM_ERROR; + } + if (state.mode === DICT) { + dictid = 1; + dictid = adler32( + dictid, + dictionary, + dictLength, + 0 + ); + if (dictid !== state.check) { + return Z_DATA_ERROR; + } + } + ret = updatewindow( + strm, + dictionary, + dictLength, + dictLength + ); + if (ret) { + state.mode = MEM; + return Z_MEM_ERROR; + } + state.havedict = 1; + return Z_OK; + } + exports2.inflateReset = inflateReset; + exports2.inflateReset2 = inflateReset2; + exports2.inflateResetKeep = inflateResetKeep; + exports2.inflateInit = inflateInit; + exports2.inflateInit2 = inflateInit2; + exports2.inflate = inflate; + exports2.inflateEnd = inflateEnd; + exports2.inflateGetHeader = inflateGetHeader; + exports2.inflateSetDictionary = inflateSetDictionary; + exports2.inflateInfo = "pako inflate (from Nodeca project)"; + }, + { + "../utils/common": 1, + "./adler32": 3, + "./crc32": 5, + "./inffast": 7, + "./inftrees": 9 + } + ], + 9: [ + function(require2, module2, exports2) { + "use strict"; + var utils = require2("../utils/common"); + var MAXBITS = 15; + var ENOUGH_LENS = 852; + var ENOUGH_DISTS = 592; + var CODES = 0; + var LENS = 1; + var DISTS = 2; + var lbase = [ + /* Length codes 257..285 base */ + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 13, + 15, + 17, + 19, + 23, + 27, + 31, + 35, + 43, + 51, + 59, + 67, + 83, + 99, + 115, + 131, + 163, + 195, + 227, + 258, + 0, + 0 + ]; + var lext = [ + /* Length codes 257..285 extra */ + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 17, + 17, + 17, + 17, + 18, + 18, + 18, + 18, + 19, + 19, + 19, + 19, + 20, + 20, + 20, + 20, + 21, + 21, + 21, + 21, + 16, + 72, + 78 + ]; + var dbase = [ + /* Distance codes 0..29 base */ + 1, + 2, + 3, + 4, + 5, + 7, + 9, + 13, + 17, + 25, + 33, + 49, + 65, + 97, + 129, + 193, + 257, + 385, + 513, + 769, + 1025, + 1537, + 2049, + 3073, + 4097, + 6145, + 8193, + 12289, + 16385, + 24577, + 0, + 0 + ]; + var dext = [ + /* Distance codes 0..29 extra */ + 16, + 16, + 16, + 16, + 17, + 17, + 18, + 18, + 19, + 19, + 20, + 20, + 21, + 21, + 22, + 22, + 23, + 23, + 24, + 24, + 25, + 25, + 26, + 26, + 27, + 27, + 28, + 28, + 29, + 29, + 64, + 64 + ]; + module2.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts) { + var bits = opts.bits; + var len = 0; + var sym = 0; + var min = 0, max = 0; + var root = 0; + var curr = 0; + var drop = 0; + var left = 0; + var used = 0; + var huff = 0; + var incr; + var fill; + var low; + var mask; + var next; + var base = null; + var base_index = 0; + var end; + var count = new utils.Buf16(MAXBITS + 1); + var offs = new utils.Buf16(MAXBITS + 1); + var extra = null; + var extra_index = 0; + var here_bits, here_op, here_val; + for (len = 0; len <= MAXBITS; len++) { + count[len] = 0; + } + for (sym = 0; sym < codes; sym++) { + count[lens[lens_index + sym]]++; + } + root = bits; + for (max = MAXBITS; max >= 1; max--) { + if (count[max] !== 0) { + break; + } + } + if (root > max) { + root = max; + } + if (max === 0) { + table[table_index++] = 1 << 24 | 64 << 16 | 0; + table[table_index++] = 1 << 24 | 64 << 16 | 0; + opts.bits = 1; + return 0; + } + for (min = 1; min < max; min++) { + if (count[min] !== 0) { + break; + } + } + if (root < min) { + root = min; + } + left = 1; + for (len = 1; len <= MAXBITS; len++) { + left <<= 1; + left -= count[len]; + if (left < 0) { + return -1; + } + } + if (left > 0 && (type === CODES || max !== 1)) { + return -1; + } + offs[1] = 0; + for (len = 1; len < MAXBITS; len++) { + offs[len + 1] = offs[len] + count[len]; + } + for (sym = 0; sym < codes; sym++) { + if (lens[lens_index + sym] !== 0) { + work[offs[lens[lens_index + sym]]++] = sym; + } + } + if (type === CODES) { + base = extra = work; + end = 19; + } else if (type === LENS) { + base = lbase; + base_index -= 257; + extra = lext; + extra_index -= 257; + end = 256; + } else { + base = dbase; + extra = dext; + end = -1; + } + huff = 0; + sym = 0; + len = min; + next = table_index; + curr = root; + drop = 0; + low = -1; + used = 1 << root; + mask = used - 1; + if (type === LENS && used > ENOUGH_LENS || type === DISTS && used > ENOUGH_DISTS) { + return 1; + } + for (; ; ) { + here_bits = len - drop; + if (work[sym] < end) { + here_op = 0; + here_val = work[sym]; + } else if (work[sym] > end) { + here_op = extra[extra_index + work[sym]]; + here_val = base[base_index + work[sym]]; + } else { + here_op = 32 + 64; + here_val = 0; + } + incr = 1 << len - drop; + fill = 1 << curr; + min = fill; + do { + fill -= incr; + table[next + (huff >> drop) + fill] = here_bits << 24 | here_op << 16 | here_val | 0; + } while (fill !== 0); + incr = 1 << len - 1; + while (huff & incr) { + incr >>= 1; + } + if (incr !== 0) { + huff &= incr - 1; + huff += incr; + } else { + huff = 0; + } + sym++; + if (--count[len] === 0) { + if (len === max) { + break; + } + len = lens[lens_index + work[sym]]; + } + if (len > root && (huff & mask) !== low) { + if (drop === 0) { + drop = root; + } + next += min; + curr = len - drop; + left = 1 << curr; + while (curr + drop < max) { + left -= count[curr + drop]; + if (left <= 0) { + break; + } + curr++; + left <<= 1; + } + used += 1 << curr; + if (type === LENS && used > ENOUGH_LENS || type === DISTS && used > ENOUGH_DISTS) { + return 1; + } + low = huff & mask; + table[low] = root << 24 | curr << 16 | next - table_index | 0; + } + } + if (huff !== 0) { + table[next + huff] = len - drop << 24 | 64 << 16 | 0; + } + opts.bits = root; + return 0; + }; + }, + { "../utils/common": 1 } + ], + 10: [ + function(require2, module2, exports2) { + "use strict"; + module2.exports = { + 2: "need dictionary", + 1: "stream end", + 0: "", + "-1": "file error", + "-2": "stream error", + "-3": "data error", + "-4": "insufficient memory", + "-5": "buffer error", + "-6": "incompatible version" + }; + }, + {} + ], + 11: [ + function(require2, module2, exports2) { + "use strict"; + function ZStream() { + this.input = null; + this.next_in = 0; + this.avail_in = 0; + this.total_in = 0; + this.output = null; + this.next_out = 0; + this.avail_out = 0; + this.total_out = 0; + this.msg = ""; + this.state = null; + this.data_type = 2; + this.adler = 0; + } + module2.exports = ZStream; + }, + {} + ], + "/lib/inflate.js": [ + function(require2, module2, exports2) { + "use strict"; + var zlib_inflate = require2("./zlib/inflate"); + var utils = require2("./utils/common"); + var strings = require2("./utils/strings"); + var c2 = require2("./zlib/constants"); + var msg = require2("./zlib/messages"); + var ZStream = require2("./zlib/zstream"); + var GZheader = require2("./zlib/gzheader"); + var toString = Object.prototype.toString; + function Inflate(options) { + if (!(this instanceof Inflate)) + return new Inflate(options); + this.options = utils.assign( + { + chunkSize: 16384, + windowBits: 0, + to: "" + }, + options || {} + ); + var opt = this.options; + if (opt.raw && opt.windowBits >= 0 && opt.windowBits < 16) { + opt.windowBits = -opt.windowBits; + if (opt.windowBits === 0) { + opt.windowBits = -15; + } + } + if (opt.windowBits >= 0 && opt.windowBits < 16 && !(options && options.windowBits)) { + opt.windowBits += 32; + } + if (opt.windowBits > 15 && opt.windowBits < 48) { + if ((opt.windowBits & 15) === 0) { + opt.windowBits |= 15; + } + } + this.err = 0; + this.msg = ""; + this.ended = false; + this.chunks = []; + this.strm = new ZStream(); + this.strm.avail_out = 0; + var status = zlib_inflate.inflateInit2( + this.strm, + opt.windowBits + ); + if (status !== c2.Z_OK) { + throw new Error(msg[status]); + } + this.header = new GZheader(); + zlib_inflate.inflateGetHeader(this.strm, this.header); + if (opt.dictionary) { + if (typeof opt.dictionary === "string") { + opt.dictionary = strings.string2buf( + opt.dictionary + ); + } else if (toString.call(opt.dictionary) === "[object ArrayBuffer]") { + opt.dictionary = new Uint8Array( + opt.dictionary + ); + } + if (opt.raw) { + status = zlib_inflate.inflateSetDictionary( + this.strm, + opt.dictionary + ); + if (status !== c2.Z_OK) { + throw new Error(msg[status]); + } + } + } + } + Inflate.prototype.push = function(data, mode) { + var strm = this.strm; + var chunkSize = this.options.chunkSize; + var dictionary = this.options.dictionary; + var status, _mode; + var next_out_utf8, tail, utf8str; + var allowBufError = false; + if (this.ended) { + return false; + } + _mode = mode === ~~mode ? mode : mode === true ? c2.Z_FINISH : c2.Z_NO_FLUSH; + if (typeof data === "string") { + strm.input = strings.binstring2buf(data); + } else if (toString.call(data) === "[object ArrayBuffer]") { + strm.input = new Uint8Array(data); + } else { + strm.input = data; + } + strm.next_in = 0; + strm.avail_in = strm.input.length; + do { + if (strm.avail_out === 0) { + strm.output = new utils.Buf8(chunkSize); + strm.next_out = 0; + strm.avail_out = chunkSize; + } + status = zlib_inflate.inflate( + strm, + c2.Z_NO_FLUSH + ); + if (status === c2.Z_NEED_DICT && dictionary) { + status = zlib_inflate.inflateSetDictionary( + this.strm, + dictionary + ); + } + if (status === c2.Z_BUF_ERROR && allowBufError === true) { + status = c2.Z_OK; + allowBufError = false; + } + if (status !== c2.Z_STREAM_END && status !== c2.Z_OK) { + this.onEnd(status); + this.ended = true; + return false; + } + if (strm.next_out) { + if (strm.avail_out === 0 || status === c2.Z_STREAM_END || strm.avail_in === 0 && (_mode === c2.Z_FINISH || _mode === c2.Z_SYNC_FLUSH)) { + if (this.options.to === "string") { + next_out_utf8 = strings.utf8border( + strm.output, + strm.next_out + ); + tail = strm.next_out - next_out_utf8; + utf8str = strings.buf2string( + strm.output, + next_out_utf8 + ); + strm.next_out = tail; + strm.avail_out = chunkSize - tail; + if (tail) { + utils.arraySet( + strm.output, + strm.output, + next_out_utf8, + tail, + 0 + ); + } + this.onData(utf8str); + } else { + this.onData( + utils.shrinkBuf( + strm.output, + strm.next_out + ) + ); + } + } + } + if (strm.avail_in === 0 && strm.avail_out === 0) { + allowBufError = true; + } + } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== c2.Z_STREAM_END); + if (status === c2.Z_STREAM_END) { + _mode = c2.Z_FINISH; + } + if (_mode === c2.Z_FINISH) { + status = zlib_inflate.inflateEnd(this.strm); + this.onEnd(status); + this.ended = true; + return status === c2.Z_OK; + } + if (_mode === c2.Z_SYNC_FLUSH) { + this.onEnd(c2.Z_OK); + strm.avail_out = 0; + return true; + } + return true; + }; + Inflate.prototype.onData = function(chunk) { + this.chunks.push(chunk); + }; + Inflate.prototype.onEnd = function(status) { + if (status === c2.Z_OK) { + if (this.options.to === "string") { + this.result = this.chunks.join(""); + } else { + this.result = utils.flattenChunks( + this.chunks + ); + } + } + this.chunks = []; + this.err = status; + this.msg = this.strm.msg; + }; + function inflate(input, options) { + var inflator = new Inflate(options); + inflator.push(input, true); + if (inflator.err) { + throw inflator.msg || msg[inflator.err]; + } + return inflator.result; + } + function inflateRaw(input, options) { + options = options || {}; + options.raw = true; + return inflate(input, options); + } + exports2.Inflate = Inflate; + exports2.inflate = inflate; + exports2.inflateRaw = inflateRaw; + exports2.ungzip = inflate; + }, + { + "./utils/common": 1, + "./utils/strings": 2, + "./zlib/constants": 4, + "./zlib/gzheader": 6, + "./zlib/inflate": 8, + "./zlib/messages": 10, + "./zlib/zstream": 11 + } + ] + }, + {}, + [] + )("/lib/inflate.js"); +})(); + +// packages/global-styles-ui/build-module/font-library/lib/lib-font.browser.mjs +var fetchFunction = globalThis.fetch; +var Event2 = class { + constructor(type, detail = {}, msg) { + this.type = type; + this.detail = detail; + this.msg = msg; + Object.defineProperty(this, `__mayPropagate`, { + enumerable: false, + writable: true + }); + this.__mayPropagate = true; + } + preventDefault() { + } + stopPropagation() { + this.__mayPropagate = false; + } + valueOf() { + return this; + } + toString() { + return this.msg ? `[${this.type} event]: ${this.msg}` : `[${this.type} event]`; + } +}; +var EventManager = class { + constructor() { + this.listeners = {}; + } + addEventListener(type, listener, useCapture) { + let bin = this.listeners[type] || []; + if (useCapture) bin.unshift(listener); + else bin.push(listener); + this.listeners[type] = bin; + } + removeEventListener(type, listener) { + let bin = this.listeners[type] || []; + let pos = bin.findIndex((e2) => e2 === listener); + if (pos > -1) { + bin.splice(pos, 1); + this.listeners[type] = bin; + } + } + dispatch(event) { + let bin = this.listeners[event.type]; + if (bin) { + for (let l2 = 0, e2 = bin.length; l2 < e2; l2++) { + if (!event.__mayPropagate) break; + bin[l2](event); + } + } + } +}; +var startDate = (/* @__PURE__ */ new Date(`1904-01-01T00:00:00+0000`)).getTime(); +function asText(data) { + return Array.from(data).map((v2) => String.fromCharCode(v2)).join(``); +} +var Parser = class { + constructor(dict, dataview, name2) { + this.name = (name2 || dict.tag || ``).trim(); + this.length = dict.length; + this.start = dict.offset; + this.offset = 0; + this.data = dataview; + [ + `getInt8`, + `getUint8`, + `getInt16`, + `getUint16`, + `getInt32`, + `getUint32`, + `getBigInt64`, + `getBigUint64` + ].forEach((name3) => { + let fn = name3.replace(/get(Big)?/, "").toLowerCase(); + let increment = parseInt(name3.replace(/[^\d]/g, "")) / 8; + Object.defineProperty(this, fn, { + get: () => this.getValue(name3, increment) + }); + }); + } + get currentPosition() { + return this.start + this.offset; + } + set currentPosition(position) { + this.start = position; + this.offset = 0; + } + skip(n2 = 0, bits = 8) { + this.offset += n2 * bits / 8; + } + getValue(type, increment) { + let pos = this.start + this.offset; + this.offset += increment; + try { + return this.data[type](pos); + } catch (e2) { + console.error(`parser`, type, increment, this); + console.error(`parser`, this.start, this.offset); + throw e2; + } + } + flags(n2) { + if (n2 === 8 || n2 === 16 || n2 === 32 || n2 === 64) { + return this[`uint${n2}`].toString(2).padStart(n2, 0).split(``).map((v2) => v2 === "1"); + } + console.error( + `Error parsing flags: flag types can only be 1, 2, 4, or 8 bytes long` + ); + console.trace(); + } + get tag() { + const t3 = this.uint32; + return asText([ + t3 >> 24 & 255, + t3 >> 16 & 255, + t3 >> 8 & 255, + t3 & 255 + ]); + } + get fixed() { + let major = this.int16; + let minor = Math.round(1e3 * this.uint16 / 65356); + return major + minor / 1e3; + } + get legacyFixed() { + let major = this.uint16; + let minor = this.uint16.toString(16).padStart(4, 0); + return parseFloat(`${major}.${minor}`); + } + get uint24() { + return (this.uint8 << 16) + (this.uint8 << 8) + this.uint8; + } + get uint128() { + let value = 0; + for (let i2 = 0; i2 < 5; i2++) { + let byte = this.uint8; + value = value * 128 + (byte & 127); + if (byte < 128) break; + } + return value; + } + get longdatetime() { + return new Date(startDate + 1e3 * parseInt(this.int64.toString())); + } + get fword() { + return this.int16; + } + get ufword() { + return this.uint16; + } + get Offset16() { + return this.uint16; + } + get Offset32() { + return this.uint32; + } + get F2DOT14() { + const bits = p.uint16; + const integer = [0, 1, -2, -1][bits >> 14]; + const fraction = bits & 16383; + return integer + fraction / 16384; + } + verifyLength() { + if (this.offset != this.length) { + console.error( + `unexpected parsed table size (${this.offset}) for "${this.name}" (expected ${this.length})` + ); + } + } + readBytes(n2 = 0, position = 0, bits = 8, signed = false) { + n2 = n2 || this.length; + if (n2 === 0) return []; + if (position) this.currentPosition = position; + const fn = `${signed ? `` : `u`}int${bits}`, slice = []; + while (n2--) slice.push(this[fn]); + return slice; + } +}; +var ParsedData = class { + constructor(parser) { + const pGetter = { enumerable: false, get: () => parser }; + Object.defineProperty(this, `parser`, pGetter); + const start = parser.currentPosition; + const startGetter = { enumerable: false, get: () => start }; + Object.defineProperty(this, `start`, startGetter); + } + load(struct) { + Object.keys(struct).forEach((p22) => { + let props = Object.getOwnPropertyDescriptor(struct, p22); + if (props.get) { + this[p22] = props.get.bind(this); + } else if (props.value !== void 0) { + this[p22] = props.value; + } + }); + if (this.parser.length) { + this.parser.verifyLength(); + } + } +}; +var SimpleTable = class extends ParsedData { + constructor(dict, dataview, name2) { + const { parser, start } = super( + new Parser(dict, dataview, name2) + ); + const pGetter = { enumerable: false, get: () => parser }; + Object.defineProperty(this, `p`, pGetter); + const startGetter = { enumerable: false, get: () => start }; + Object.defineProperty(this, `tableStart`, startGetter); + } +}; +function lazy$1(object, property, getter) { + let val; + Object.defineProperty(object, property, { + get: () => { + if (val) return val; + val = getter(); + return val; + }, + enumerable: true + }); +} +var SFNT = class extends SimpleTable { + constructor(font2, dataview, createTable2) { + const { p: p22 } = super({ offset: 0, length: 12 }, dataview, `sfnt`); + this.version = p22.uint32; + this.numTables = p22.uint16; + this.searchRange = p22.uint16; + this.entrySelector = p22.uint16; + this.rangeShift = p22.uint16; + p22.verifyLength(); + this.directory = [...new Array(this.numTables)].map( + (_) => new TableRecord(p22) + ); + this.tables = {}; + this.directory.forEach((entry) => { + const getter = () => createTable2( + this.tables, + { + tag: entry.tag, + offset: entry.offset, + length: entry.length + }, + dataview + ); + lazy$1(this.tables, entry.tag.trim(), getter); + }); + } +}; +var TableRecord = class { + constructor(p22) { + this.tag = p22.tag; + this.checksum = p22.uint32; + this.offset = p22.uint32; + this.length = p22.uint32; + } +}; +var gzipDecode = inflate_default.inflate || void 0; +var nativeGzipDecode = void 0; +var WOFF$1 = class extends SimpleTable { + constructor(font2, dataview, createTable2) { + const { p: p22 } = super({ offset: 0, length: 44 }, dataview, `woff`); + this.signature = p22.tag; + this.flavor = p22.uint32; + this.length = p22.uint32; + this.numTables = p22.uint16; + p22.uint16; + this.totalSfntSize = p22.uint32; + this.majorVersion = p22.uint16; + this.minorVersion = p22.uint16; + this.metaOffset = p22.uint32; + this.metaLength = p22.uint32; + this.metaOrigLength = p22.uint32; + this.privOffset = p22.uint32; + this.privLength = p22.uint32; + p22.verifyLength(); + this.directory = [...new Array(this.numTables)].map( + (_) => new WoffTableDirectoryEntry(p22) + ); + buildWoffLazyLookups(this, dataview, createTable2); + } +}; +var WoffTableDirectoryEntry = class { + constructor(p22) { + this.tag = p22.tag; + this.offset = p22.uint32; + this.compLength = p22.uint32; + this.origLength = p22.uint32; + this.origChecksum = p22.uint32; + } +}; +function buildWoffLazyLookups(woff, dataview, createTable2) { + woff.tables = {}; + woff.directory.forEach((entry) => { + lazy$1(woff.tables, entry.tag.trim(), () => { + let offset = 0; + let view = dataview; + if (entry.compLength !== entry.origLength) { + const data = dataview.buffer.slice( + entry.offset, + entry.offset + entry.compLength + ); + let unpacked; + if (gzipDecode) { + unpacked = gzipDecode(new Uint8Array(data)); + } else if (nativeGzipDecode) { + unpacked = nativeGzipDecode(new Uint8Array(data)); + } else { + const msg = `no brotli decoder available to decode WOFF2 font`; + if (font.onerror) font.onerror(msg); + throw new Error(msg); + } + view = new DataView(unpacked.buffer); + } else { + offset = entry.offset; + } + return createTable2( + woff.tables, + { tag: entry.tag, offset, length: entry.origLength }, + view + ); + }); + }); +} +var brotliDecode = unbrotli_default; +var nativeBrotliDecode = void 0; +var WOFF2$1 = class extends SimpleTable { + constructor(font2, dataview, createTable2) { + const { p: p22 } = super({ offset: 0, length: 48 }, dataview, `woff2`); + this.signature = p22.tag; + this.flavor = p22.uint32; + this.length = p22.uint32; + this.numTables = p22.uint16; + p22.uint16; + this.totalSfntSize = p22.uint32; + this.totalCompressedSize = p22.uint32; + this.majorVersion = p22.uint16; + this.minorVersion = p22.uint16; + this.metaOffset = p22.uint32; + this.metaLength = p22.uint32; + this.metaOrigLength = p22.uint32; + this.privOffset = p22.uint32; + this.privLength = p22.uint32; + p22.verifyLength(); + this.directory = [...new Array(this.numTables)].map( + (_) => new Woff2TableDirectoryEntry(p22) + ); + let dictOffset = p22.currentPosition; + this.directory[0].offset = 0; + this.directory.forEach((e2, i2) => { + let next = this.directory[i2 + 1]; + if (next) { + next.offset = e2.offset + (e2.transformLength !== void 0 ? e2.transformLength : e2.origLength); + } + }); + let decoded; + let buffer = dataview.buffer.slice(dictOffset); + if (brotliDecode) { + decoded = brotliDecode(new Uint8Array(buffer)); + } else if (nativeBrotliDecode) { + decoded = new Uint8Array(nativeBrotliDecode(buffer)); + } else { + const msg = `no brotli decoder available to decode WOFF2 font`; + if (font2.onerror) font2.onerror(msg); + throw new Error(msg); + } + buildWoff2LazyLookups(this, decoded, createTable2); + } +}; +var Woff2TableDirectoryEntry = class { + constructor(p22) { + this.flags = p22.uint8; + const tagNumber = this.tagNumber = this.flags & 63; + if (tagNumber === 63) { + this.tag = p22.tag; + } else { + this.tag = getWOFF2Tag(tagNumber); + } + const transformVersion = this.transformVersion = (this.flags & 192) >> 6; + let hasTransforms = transformVersion !== 0; + if (this.tag === `glyf` || this.tag === `loca`) { + hasTransforms = this.transformVersion !== 3; + } + this.origLength = p22.uint128; + if (hasTransforms) { + this.transformLength = p22.uint128; + } + } +}; +function buildWoff2LazyLookups(woff2, decoded, createTable2) { + woff2.tables = {}; + woff2.directory.forEach((entry) => { + lazy$1(woff2.tables, entry.tag.trim(), () => { + const start = entry.offset; + const end = start + (entry.transformLength ? entry.transformLength : entry.origLength); + const data = new DataView(decoded.slice(start, end).buffer); + try { + return createTable2( + woff2.tables, + { tag: entry.tag, offset: 0, length: entry.origLength }, + data + ); + } catch (e2) { + console.error(e2); + } + }); + }); +} +function getWOFF2Tag(flag) { + return [ + `cmap`, + `head`, + `hhea`, + `hmtx`, + `maxp`, + `name`, + `OS/2`, + `post`, + `cvt `, + `fpgm`, + `glyf`, + `loca`, + `prep`, + `CFF `, + `VORG`, + `EBDT`, + `EBLC`, + `gasp`, + `hdmx`, + `kern`, + `LTSH`, + `PCLT`, + `VDMX`, + `vhea`, + `vmtx`, + `BASE`, + `GDEF`, + `GPOS`, + `GSUB`, + `EBSC`, + `JSTF`, + `MATH`, + `CBDT`, + `CBLC`, + `COLR`, + `CPAL`, + `SVG `, + `sbix`, + `acnt`, + `avar`, + `bdat`, + `bloc`, + `bsln`, + `cvar`, + `fdsc`, + `feat`, + `fmtx`, + `fvar`, + `gvar`, + `hsty`, + `just`, + `lcar`, + `mort`, + `morx`, + `opbd`, + `prop`, + `trak`, + `Zapf`, + `Silf`, + `Glat`, + `Gloc`, + `Feat`, + `Sill` + ][flag & 63]; +} +var tableClasses = {}; +var tableClassesLoaded = false; +Promise.all([ + Promise.resolve().then(function() { + return cmap$1; + }), + Promise.resolve().then(function() { + return head$1; + }), + Promise.resolve().then(function() { + return hhea$1; + }), + Promise.resolve().then(function() { + return hmtx$1; + }), + Promise.resolve().then(function() { + return maxp$1; + }), + Promise.resolve().then(function() { + return name$1; + }), + Promise.resolve().then(function() { + return OS2$1; + }), + Promise.resolve().then(function() { + return post$1; + }), + Promise.resolve().then(function() { + return BASE$1; + }), + Promise.resolve().then(function() { + return GDEF$1; + }), + Promise.resolve().then(function() { + return GSUB$1; + }), + Promise.resolve().then(function() { + return GPOS$1; + }), + Promise.resolve().then(function() { + return SVG$1; + }), + Promise.resolve().then(function() { + return fvar$1; + }), + Promise.resolve().then(function() { + return cvt$1; + }), + Promise.resolve().then(function() { + return fpgm$1; + }), + Promise.resolve().then(function() { + return gasp$1; + }), + Promise.resolve().then(function() { + return glyf$1; + }), + Promise.resolve().then(function() { + return loca$1; + }), + Promise.resolve().then(function() { + return prep$1; + }), + Promise.resolve().then(function() { + return CFF$1; + }), + Promise.resolve().then(function() { + return CFF2$1; + }), + Promise.resolve().then(function() { + return VORG$1; + }), + Promise.resolve().then(function() { + return EBLC$1; + }), + Promise.resolve().then(function() { + return EBDT$1; + }), + Promise.resolve().then(function() { + return EBSC$1; + }), + Promise.resolve().then(function() { + return CBLC$1; + }), + Promise.resolve().then(function() { + return CBDT$1; + }), + Promise.resolve().then(function() { + return sbix$1; + }), + Promise.resolve().then(function() { + return COLR$1; + }), + Promise.resolve().then(function() { + return CPAL$1; + }), + Promise.resolve().then(function() { + return DSIG$1; + }), + Promise.resolve().then(function() { + return hdmx$1; + }), + Promise.resolve().then(function() { + return kern$1; + }), + Promise.resolve().then(function() { + return LTSH$1; + }), + Promise.resolve().then(function() { + return MERG$1; + }), + Promise.resolve().then(function() { + return meta$1; + }), + Promise.resolve().then(function() { + return PCLT$1; + }), + Promise.resolve().then(function() { + return VDMX$1; + }), + Promise.resolve().then(function() { + return vhea$1; + }), + Promise.resolve().then(function() { + return vmtx$1; + }) +]).then((data) => { + data.forEach((e2) => { + let name2 = Object.keys(e2)[0]; + tableClasses[name2] = e2[name2]; + }); + tableClassesLoaded = true; +}); +function createTable(tables, dict, dataview) { + let name2 = dict.tag.replace(/[^\w\d]/g, ``); + let Type = tableClasses[name2]; + if (Type) return new Type(dict, dataview, tables); + console.warn( + `lib-font has no definition for ${name2}. The table was skipped.` + ); + return {}; +} +function loadTableClasses() { + let count = 0; + function checkLoaded(resolve, reject) { + if (!tableClassesLoaded) { + if (count > 10) { + return reject(new Error(`loading took too long`)); + } + count++; + return setTimeout(() => checkLoaded(resolve), 250); + } + resolve(createTable); + } + return new Promise((resolve, reject) => checkLoaded(resolve)); +} +function getFontCSSFormat(path, errorOnStyle) { + let pos = path.lastIndexOf(`.`); + let ext = (path.substring(pos + 1) || ``).toLowerCase(); + let format = { + ttf: `truetype`, + otf: `opentype`, + woff: `woff`, + woff2: `woff2` + }[ext]; + if (format) return format; + let msg = { + eot: `The .eot format is not supported: it died in January 12, 2016, when Microsoft retired all versions of IE that didn't already support WOFF.`, + svg: `The .svg format is not supported: SVG fonts (not to be confused with OpenType with embedded SVG) were so bad we took the entire fonts chapter out of the SVG specification again.`, + fon: `The .fon format is not supported: this is an ancient Windows bitmap font format.`, + ttc: `Based on the current CSS specification, font collections are not (yet?) supported.` + }[ext]; + if (!msg) msg = `${path} is not a known webfont format.`; + if (errorOnStyle) { + throw new Error(msg); + } else { + console.warn(`Could not load font: ${msg}`); + } +} +async function setupFontFace(name2, url, options = {}) { + if (!globalThis.document) return; + let format = getFontCSSFormat(url, options.errorOnStyle); + if (!format) return; + let style = document.createElement(`style`); + style.className = `injected-by-Font-js`; + let rules = []; + if (options.styleRules) { + rules = Object.entries(options.styleRules).map( + ([key, value]) => `${key}: ${value};` + ); + } + style.textContent = ` +@font-face { + font-family: "${name2}"; + ${rules.join( + ` + ` + )} + src: url("${url}") format("${format}"); +}`; + globalThis.document.head.appendChild(style); + return style; +} +var TTF = [0, 1, 0, 0]; +var OTF = [79, 84, 84, 79]; +var WOFF = [119, 79, 70, 70]; +var WOFF2 = [119, 79, 70, 50]; +function match(ar1, ar2) { + if (ar1.length !== ar2.length) return; + for (let i2 = 0; i2 < ar1.length; i2++) { + if (ar1[i2] !== ar2[i2]) return; + } + return true; +} +function validFontFormat(dataview) { + const LEAD_BYTES = [ + dataview.getUint8(0), + dataview.getUint8(1), + dataview.getUint8(2), + dataview.getUint8(3) + ]; + if (match(LEAD_BYTES, TTF) || match(LEAD_BYTES, OTF)) return `SFNT`; + if (match(LEAD_BYTES, WOFF)) return `WOFF`; + if (match(LEAD_BYTES, WOFF2)) return `WOFF2`; +} +function checkFetchResponseStatus(response) { + if (!response.ok) { + throw new Error( + `HTTP ${response.status} - ${response.statusText}` + ); + } + return response; +} +var Font = class extends EventManager { + constructor(name2, options = {}) { + super(); + this.name = name2; + this.options = options; + this.metrics = false; + } + get src() { + return this.__src; + } + set src(src) { + this.__src = src; + (async () => { + if (globalThis.document && !this.options.skipStyleSheet) { + await setupFontFace(this.name, src, this.options); + } + this.loadFont(src); + })(); + } + async loadFont(url, filename) { + fetch(url).then( + (response) => checkFetchResponseStatus(response) && response.arrayBuffer() + ).then( + (buffer) => this.fromDataBuffer(buffer, filename || url) + ).catch((err) => { + const evt = new Event2( + `error`, + err, + `Failed to load font at ${filename || url}` + ); + this.dispatch(evt); + if (this.onerror) this.onerror(evt); + }); + } + async fromDataBuffer(buffer, filenameOrUrL) { + this.fontData = new DataView(buffer); + let type = validFontFormat(this.fontData); + if (!type) { + throw new Error( + `${filenameOrUrL} is either an unsupported font format, or not a font at all.` + ); + } + await this.parseBasicData(type); + const evt = new Event2("load", { font: this }); + this.dispatch(evt); + if (this.onload) this.onload(evt); + } + async parseBasicData(type) { + return loadTableClasses().then((createTable2) => { + if (type === `SFNT`) { + this.opentype = new SFNT(this, this.fontData, createTable2); + } + if (type === `WOFF`) { + this.opentype = new WOFF$1(this, this.fontData, createTable2); + } + if (type === `WOFF2`) { + this.opentype = new WOFF2$1(this, this.fontData, createTable2); + } + return this.opentype; + }); + } + getGlyphId(char) { + return this.opentype.tables.cmap.getGlyphId(char); + } + reverse(glyphid) { + return this.opentype.tables.cmap.reverse(glyphid); + } + supports(char) { + return this.getGlyphId(char) !== 0; + } + supportsVariation(variation) { + return this.opentype.tables.cmap.supportsVariation(variation) !== false; + } + measureText(text, size = 16) { + if (this.__unloaded) + throw new Error( + "Cannot measure text: font was unloaded. Please reload before calling measureText()" + ); + let d2 = document.createElement("div"); + d2.textContent = text; + d2.style.fontFamily = this.name; + d2.style.fontSize = `${size}px`; + d2.style.color = `transparent`; + d2.style.background = `transparent`; + d2.style.top = `0`; + d2.style.left = `0`; + d2.style.position = `absolute`; + document.body.appendChild(d2); + let bbox = d2.getBoundingClientRect(); + document.body.removeChild(d2); + const OS22 = this.opentype.tables["OS/2"]; + bbox.fontSize = size; + bbox.ascender = OS22.sTypoAscender; + bbox.descender = OS22.sTypoDescender; + return bbox; + } + unload() { + if (this.styleElement.parentNode) { + this.styleElement.parentNode.removeElement(this.styleElement); + const evt = new Event2("unload", { font: this }); + this.dispatch(evt); + if (this.onunload) this.onunload(evt); + } + this._unloaded = true; + } + load() { + if (this.__unloaded) { + delete this.__unloaded; + document.head.appendChild(this.styleElement); + const evt = new Event2("load", { font: this }); + this.dispatch(evt); + if (this.onload) this.onload(evt); + } + } +}; +globalThis.Font = Font; +var Subtable = class extends ParsedData { + constructor(p22, plaformID, encodingID) { + super(p22); + this.plaformID = plaformID; + this.encodingID = encodingID; + } +}; +var Format0 = class extends Subtable { + constructor(p22, platformID, encodingID) { + super(p22, platformID, encodingID); + this.format = 0; + this.length = p22.uint16; + this.language = p22.uint16; + this.glyphIdArray = [...new Array(256)].map((_) => p22.uint8); + } + supports(charCode) { + if (charCode.charCodeAt) { + charCode = -1; + console.warn( + `supports(character) not implemented for cmap subtable format 0. only supports(id) is implemented.` + ); + } + return 0 <= charCode && charCode <= 255; + } + reverse(glyphID) { + console.warn(`reverse not implemented for cmap subtable format 0`); + return {}; + } + getSupportedCharCodes() { + return [{ start: 1, end: 256 }]; + } +}; +var Format2 = class extends Subtable { + constructor(p22, platformID, encodingID) { + super(p22, platformID, encodingID); + this.format = 2; + this.length = p22.uint16; + this.language = p22.uint16; + this.subHeaderKeys = [...new Array(256)].map((_) => p22.uint16); + const subHeaderCount = Math.max(...this.subHeaderKeys); + const subHeaderOffset = p22.currentPosition; + lazy$1(this, `subHeaders`, () => { + p22.currentPosition = subHeaderOffset; + return [...new Array(subHeaderCount)].map( + (_) => new SubHeader(p22) + ); + }); + const glyphIndexOffset = subHeaderOffset + subHeaderCount * 8; + lazy$1(this, `glyphIndexArray`, () => { + p22.currentPosition = glyphIndexOffset; + return [...new Array(subHeaderCount)].map((_) => p22.uint16); + }); + } + supports(charCode) { + if (charCode.charCodeAt) { + charCode = -1; + console.warn( + `supports(character) not implemented for cmap subtable format 2. only supports(id) is implemented.` + ); + } + const low = charCode && 255; + const high = charCode && 65280; + const subHeaderKey = this.subHeaders[high]; + const subheader = this.subHeaders[subHeaderKey]; + const first = subheader.firstCode; + const last = first + subheader.entryCount; + return first <= low && low <= last; + } + reverse(glyphID) { + console.warn(`reverse not implemented for cmap subtable format 2`); + return {}; + } + getSupportedCharCodes(preservePropNames = false) { + if (preservePropNames) { + return this.subHeaders.map((h2) => ({ + firstCode: h2.firstCode, + lastCode: h2.lastCode + })); + } + return this.subHeaders.map((h2) => ({ + start: h2.firstCode, + end: h2.lastCode + })); + } +}; +var SubHeader = class { + constructor(p22) { + this.firstCode = p22.uint16; + this.entryCount = p22.uint16; + this.lastCode = this.first + this.entryCount; + this.idDelta = p22.int16; + this.idRangeOffset = p22.uint16; + } +}; +var Format4 = class extends Subtable { + constructor(p22, platformID, encodingID) { + super(p22, platformID, encodingID); + this.format = 4; + this.length = p22.uint16; + this.language = p22.uint16; + this.segCountX2 = p22.uint16; + this.segCount = this.segCountX2 / 2; + this.searchRange = p22.uint16; + this.entrySelector = p22.uint16; + this.rangeShift = p22.uint16; + const endCodePosition = p22.currentPosition; + lazy$1( + this, + `endCode`, + () => p22.readBytes(this.segCount, endCodePosition, 16) + ); + const startCodePosition = endCodePosition + 2 + this.segCountX2; + lazy$1( + this, + `startCode`, + () => p22.readBytes(this.segCount, startCodePosition, 16) + ); + const idDeltaPosition = startCodePosition + this.segCountX2; + lazy$1( + this, + `idDelta`, + () => p22.readBytes(this.segCount, idDeltaPosition, 16, true) + ); + const idRangePosition = idDeltaPosition + this.segCountX2; + lazy$1( + this, + `idRangeOffset`, + () => p22.readBytes(this.segCount, idRangePosition, 16) + ); + const glyphIdArrayPosition = idRangePosition + this.segCountX2; + const glyphIdArrayLength = this.length - (glyphIdArrayPosition - this.tableStart); + lazy$1( + this, + `glyphIdArray`, + () => p22.readBytes(glyphIdArrayLength, glyphIdArrayPosition, 16) + ); + lazy$1( + this, + `segments`, + () => this.buildSegments(idRangePosition, glyphIdArrayPosition, p22) + ); + } + buildSegments(idRangePosition, glyphIdArrayPosition, p22) { + const build = (_, i2) => { + let startCode = this.startCode[i2], endCode = this.endCode[i2], idDelta = this.idDelta[i2], idRangeOffset = this.idRangeOffset[i2], idRangeOffsetPointer = idRangePosition + 2 * i2, glyphIDs = []; + if (idRangeOffset === 0) { + for (let i22 = startCode + idDelta, e2 = endCode + idDelta; i22 <= e2; i22++) { + glyphIDs.push(i22); + } + } else { + for (let i22 = 0, e2 = endCode - startCode; i22 <= e2; i22++) { + p22.currentPosition = idRangeOffsetPointer + idRangeOffset + i22 * 2; + glyphIDs.push(p22.uint16); + } + } + return { + startCode, + endCode, + idDelta, + idRangeOffset, + glyphIDs + }; + }; + return [...new Array(this.segCount)].map(build); + } + reverse(glyphID) { + let s2 = this.segments.find((v2) => v2.glyphIDs.includes(glyphID)); + if (!s2) return {}; + const code = s2.startCode + s2.glyphIDs.indexOf(glyphID); + return { code, unicode: String.fromCodePoint(code) }; + } + getGlyphId(charCode) { + if (charCode.charCodeAt) charCode = charCode.charCodeAt(0); + if (55296 <= charCode && charCode <= 57343) return 0; + if ((charCode & 65534) === 65534 || (charCode & 65535) === 65535) + return 0; + let segment = this.segments.find( + (s2) => s2.startCode <= charCode && charCode <= s2.endCode + ); + if (!segment) return 0; + return segment.glyphIDs[charCode - segment.startCode]; + } + supports(charCode) { + return this.getGlyphId(charCode) !== 0; + } + getSupportedCharCodes(preservePropNames = false) { + if (preservePropNames) return this.segments; + return this.segments.map((v2) => ({ + start: v2.startCode, + end: v2.endCode + })); + } +}; +var Format6 = class extends Subtable { + constructor(p22, platformID, encodingID) { + super(p22, platformID, encodingID); + this.format = 6; + this.length = p22.uint16; + this.language = p22.uint16; + this.firstCode = p22.uint16; + this.entryCount = p22.uint16; + this.lastCode = this.firstCode + this.entryCount - 1; + const getter = () => [...new Array(this.entryCount)].map((_) => p22.uint16); + lazy$1(this, `glyphIdArray`, getter); + } + supports(charCode) { + if (charCode.charCodeAt) { + charCode = -1; + console.warn( + `supports(character) not implemented for cmap subtable format 6. only supports(id) is implemented.` + ); + } + if (charCode < this.firstCode) return {}; + if (charCode > this.firstCode + this.entryCount) return {}; + const code = charCode - this.firstCode; + return { code, unicode: String.fromCodePoint(code) }; + } + reverse(glyphID) { + let pos = this.glyphIdArray.indexOf(glyphID); + if (pos > -1) return this.firstCode + pos; + } + getSupportedCharCodes(preservePropNames = false) { + if (preservePropNames) { + return [{ firstCode: this.firstCode, lastCode: this.lastCode }]; + } + return [{ start: this.firstCode, end: this.lastCode }]; + } +}; +var Format8 = class extends Subtable { + constructor(p22, platformID, encodingID) { + super(p22, platformID, encodingID); + this.format = 8; + p22.uint16; + this.length = p22.uint32; + this.language = p22.uint32; + this.is32 = [...new Array(8192)].map((_) => p22.uint8); + this.numGroups = p22.uint32; + const getter = () => [...new Array(this.numGroups)].map( + (_) => new SequentialMapGroup$1(p22) + ); + lazy$1(this, `groups`, getter); + } + supports(charCode) { + if (charCode.charCodeAt) { + charCode = -1; + console.warn( + `supports(character) not implemented for cmap subtable format 8. only supports(id) is implemented.` + ); + } + return this.groups.findIndex( + (s2) => s2.startcharCode <= charCode && charCode <= s2.endcharCode + ) !== -1; + } + reverse(glyphID) { + console.warn(`reverse not implemented for cmap subtable format 8`); + return {}; + } + getSupportedCharCodes(preservePropNames = false) { + if (preservePropNames) return this.groups; + return this.groups.map((v2) => ({ + start: v2.startcharCode, + end: v2.endcharCode + })); + } +}; +var SequentialMapGroup$1 = class { + constructor(p22) { + this.startcharCode = p22.uint32; + this.endcharCode = p22.uint32; + this.startGlyphID = p22.uint32; + } +}; +var Format10 = class extends Subtable { + constructor(p22, platformID, encodingID) { + super(p22, platformID, encodingID); + this.format = 10; + p22.uint16; + this.length = p22.uint32; + this.language = p22.uint32; + this.startCharCode = p22.uint32; + this.numChars = p22.uint32; + this.endCharCode = this.startCharCode + this.numChars; + const getter = () => [...new Array(this.numChars)].map((_) => p22.uint16); + lazy$1(this, `glyphs`, getter); + } + supports(charCode) { + if (charCode.charCodeAt) { + charCode = -1; + console.warn( + `supports(character) not implemented for cmap subtable format 10. only supports(id) is implemented.` + ); + } + if (charCode < this.startCharCode) return false; + if (charCode > this.startCharCode + this.numChars) return false; + return charCode - this.startCharCode; + } + reverse(glyphID) { + console.warn(`reverse not implemented for cmap subtable format 10`); + return {}; + } + getSupportedCharCodes(preservePropNames = false) { + if (preservePropNames) { + return [ + { + startCharCode: this.startCharCode, + endCharCode: this.endCharCode + } + ]; + } + return [{ start: this.startCharCode, end: this.endCharCode }]; + } +}; +var Format12 = class extends Subtable { + constructor(p22, platformID, encodingID) { + super(p22, platformID, encodingID); + this.format = 12; + p22.uint16; + this.length = p22.uint32; + this.language = p22.uint32; + this.numGroups = p22.uint32; + const getter = () => [...new Array(this.numGroups)].map( + (_) => new SequentialMapGroup(p22) + ); + lazy$1(this, `groups`, getter); + } + supports(charCode) { + if (charCode.charCodeAt) charCode = charCode.charCodeAt(0); + if (55296 <= charCode && charCode <= 57343) return 0; + if ((charCode & 65534) === 65534 || (charCode & 65535) === 65535) + return 0; + return this.groups.findIndex( + (s2) => s2.startCharCode <= charCode && charCode <= s2.endCharCode + ) !== -1; + } + reverse(glyphID) { + for (let group of this.groups) { + let start = group.startGlyphID; + if (start > glyphID) continue; + if (start === glyphID) return group.startCharCode; + let end = start + (group.endCharCode - group.startCharCode); + if (end < glyphID) continue; + const code = group.startCharCode + (glyphID - start); + return { code, unicode: String.fromCodePoint(code) }; + } + return {}; + } + getSupportedCharCodes(preservePropNames = false) { + if (preservePropNames) return this.groups; + return this.groups.map((v2) => ({ + start: v2.startCharCode, + end: v2.endCharCode + })); + } +}; +var SequentialMapGroup = class { + constructor(p22) { + this.startCharCode = p22.uint32; + this.endCharCode = p22.uint32; + this.startGlyphID = p22.uint32; + } +}; +var Format13 = class extends Subtable { + constructor(p22, platformID, encodingID) { + super(p22, platformID, encodingID); + this.format = 13; + p22.uint16; + this.length = p22.uint32; + this.language = p22.uint32; + this.numGroups = p22.uint32; + const getter = [...new Array(this.numGroups)].map( + (_) => new ConstantMapGroup(p22) + ); + lazy$1(this, `groups`, getter); + } + supports(charCode) { + if (charCode.charCodeAt) charCode = charCode.charCodeAt(0); + return this.groups.findIndex( + (s2) => s2.startCharCode <= charCode && charCode <= s2.endCharCode + ) !== -1; + } + reverse(glyphID) { + console.warn(`reverse not implemented for cmap subtable format 13`); + return {}; + } + getSupportedCharCodes(preservePropNames = false) { + if (preservePropNames) return this.groups; + return this.groups.map((v2) => ({ + start: v2.startCharCode, + end: v2.endCharCode + })); + } +}; +var ConstantMapGroup = class { + constructor(p22) { + this.startCharCode = p22.uint32; + this.endCharCode = p22.uint32; + this.glyphID = p22.uint32; + } +}; +var Format14 = class extends Subtable { + constructor(p22, platformID, encodingID) { + super(p22, platformID, encodingID); + this.subTableStart = p22.currentPosition; + this.format = 14; + this.length = p22.uint32; + this.numVarSelectorRecords = p22.uint32; + lazy$1( + this, + `varSelectors`, + () => [...new Array(this.numVarSelectorRecords)].map( + (_) => new VariationSelector(p22) + ) + ); + } + supports() { + console.warn(`supports not implemented for cmap subtable format 14`); + return 0; + } + getSupportedCharCodes() { + console.warn( + `getSupportedCharCodes not implemented for cmap subtable format 14` + ); + return []; + } + reverse(glyphID) { + console.warn(`reverse not implemented for cmap subtable format 14`); + return {}; + } + supportsVariation(variation) { + let v2 = this.varSelector.find( + (uvs) => uvs.varSelector === variation + ); + return v2 ? v2 : false; + } + getSupportedVariations() { + return this.varSelectors.map((v2) => v2.varSelector); + } +}; +var VariationSelector = class { + constructor(p22) { + this.varSelector = p22.uint24; + this.defaultUVSOffset = p22.Offset32; + this.nonDefaultUVSOffset = p22.Offset32; + } +}; +function createSubTable(parser, platformID, encodingID) { + const format = parser.uint16; + if (format === 0) return new Format0(parser, platformID, encodingID); + if (format === 2) return new Format2(parser, platformID, encodingID); + if (format === 4) return new Format4(parser, platformID, encodingID); + if (format === 6) return new Format6(parser, platformID, encodingID); + if (format === 8) return new Format8(parser, platformID, encodingID); + if (format === 10) return new Format10(parser, platformID, encodingID); + if (format === 12) return new Format12(parser, platformID, encodingID); + if (format === 13) return new Format13(parser, platformID, encodingID); + if (format === 14) return new Format14(parser, platformID, encodingID); + return {}; +} +var cmap = class extends SimpleTable { + constructor(dict, dataview) { + const { p: p22 } = super(dict, dataview); + this.version = p22.uint16; + this.numTables = p22.uint16; + this.encodingRecords = [...new Array(this.numTables)].map( + (_) => new EncodingRecord(p22, this.tableStart) + ); + } + getSubTable(tableID) { + return this.encodingRecords[tableID].table; + } + getSupportedEncodings() { + return this.encodingRecords.map((r3) => ({ + platformID: r3.platformID, + encodingId: r3.encodingID + })); + } + getSupportedCharCodes(platformID, encodingID) { + const recordID = this.encodingRecords.findIndex( + (r3) => r3.platformID === platformID && r3.encodingID === encodingID + ); + if (recordID === -1) return false; + const subtable = this.getSubTable(recordID); + return subtable.getSupportedCharCodes(); + } + reverse(glyphid) { + for (let i2 = 0; i2 < this.numTables; i2++) { + let code = this.getSubTable(i2).reverse(glyphid); + if (code) return code; + } + } + getGlyphId(char) { + let last = 0; + this.encodingRecords.some((_, tableID) => { + let t3 = this.getSubTable(tableID); + if (!t3.getGlyphId) return false; + last = t3.getGlyphId(char); + return last !== 0; + }); + return last; + } + supports(char) { + return this.encodingRecords.some((_, tableID) => { + const t3 = this.getSubTable(tableID); + return t3.supports && t3.supports(char) !== false; + }); + } + supportsVariation(variation) { + return this.encodingRecords.some((_, tableID) => { + const t3 = this.getSubTable(tableID); + return t3.supportsVariation && t3.supportsVariation(variation) !== false; + }); + } +}; +var EncodingRecord = class { + constructor(p22, tableStart) { + const platformID = this.platformID = p22.uint16; + const encodingID = this.encodingID = p22.uint16; + const offset = this.offset = p22.Offset32; + lazy$1(this, `table`, () => { + p22.currentPosition = tableStart + offset; + return createSubTable(p22, platformID, encodingID); + }); + } +}; +var cmap$1 = Object.freeze({ __proto__: null, cmap }); +var head = class extends SimpleTable { + constructor(dict, dataview) { + const { p: p22 } = super(dict, dataview); + this.load({ + majorVersion: p22.uint16, + minorVersion: p22.uint16, + fontRevision: p22.fixed, + checkSumAdjustment: p22.uint32, + magicNumber: p22.uint32, + flags: p22.flags(16), + unitsPerEm: p22.uint16, + created: p22.longdatetime, + modified: p22.longdatetime, + xMin: p22.int16, + yMin: p22.int16, + xMax: p22.int16, + yMax: p22.int16, + macStyle: p22.flags(16), + lowestRecPPEM: p22.uint16, + fontDirectionHint: p22.uint16, + indexToLocFormat: p22.uint16, + glyphDataFormat: p22.uint16 + }); + } +}; +var head$1 = Object.freeze({ __proto__: null, head }); +var hhea = class extends SimpleTable { + constructor(dict, dataview) { + const { p: p22 } = super(dict, dataview); + this.majorVersion = p22.uint16; + this.minorVersion = p22.uint16; + this.ascender = p22.fword; + this.descender = p22.fword; + this.lineGap = p22.fword; + this.advanceWidthMax = p22.ufword; + this.minLeftSideBearing = p22.fword; + this.minRightSideBearing = p22.fword; + this.xMaxExtent = p22.fword; + this.caretSlopeRise = p22.int16; + this.caretSlopeRun = p22.int16; + this.caretOffset = p22.int16; + p22.int16; + p22.int16; + p22.int16; + p22.int16; + this.metricDataFormat = p22.int16; + this.numberOfHMetrics = p22.uint16; + p22.verifyLength(); + } +}; +var hhea$1 = Object.freeze({ __proto__: null, hhea }); +var hmtx = class extends SimpleTable { + constructor(dict, dataview, tables) { + const { p: p22 } = super(dict, dataview); + const numberOfHMetrics = tables.hhea.numberOfHMetrics; + const numGlyphs = tables.maxp.numGlyphs; + const metricsStart = p22.currentPosition; + lazy$1(this, `hMetrics`, () => { + p22.currentPosition = metricsStart; + return [...new Array(numberOfHMetrics)].map( + (_) => new LongHorMetric(p22.uint16, p22.int16) + ); + }); + if (numberOfHMetrics < numGlyphs) { + const lsbStart = metricsStart + numberOfHMetrics * 4; + lazy$1(this, `leftSideBearings`, () => { + p22.currentPosition = lsbStart; + return [...new Array(numGlyphs - numberOfHMetrics)].map( + (_) => p22.int16 + ); + }); + } + } +}; +var LongHorMetric = class { + constructor(w2, b2) { + this.advanceWidth = w2; + this.lsb = b2; + } +}; +var hmtx$1 = Object.freeze({ __proto__: null, hmtx }); +var maxp = class extends SimpleTable { + constructor(dict, dataview) { + const { p: p22 } = super(dict, dataview); + this.version = p22.legacyFixed; + this.numGlyphs = p22.uint16; + if (this.version === 1) { + this.maxPoints = p22.uint16; + this.maxContours = p22.uint16; + this.maxCompositePoints = p22.uint16; + this.maxCompositeContours = p22.uint16; + this.maxZones = p22.uint16; + this.maxTwilightPoints = p22.uint16; + this.maxStorage = p22.uint16; + this.maxFunctionDefs = p22.uint16; + this.maxInstructionDefs = p22.uint16; + this.maxStackElements = p22.uint16; + this.maxSizeOfInstructions = p22.uint16; + this.maxComponentElements = p22.uint16; + this.maxComponentDepth = p22.uint16; + } + p22.verifyLength(); + } +}; +var maxp$1 = Object.freeze({ __proto__: null, maxp }); +var name = class extends SimpleTable { + constructor(dict, dataview) { + const { p: p22 } = super(dict, dataview); + this.format = p22.uint16; + this.count = p22.uint16; + this.stringOffset = p22.Offset16; + this.nameRecords = [...new Array(this.count)].map( + (_) => new NameRecord(p22, this) + ); + if (this.format === 1) { + this.langTagCount = p22.uint16; + this.langTagRecords = [...new Array(this.langTagCount)].map( + (_) => new LangTagRecord(p22.uint16, p22.Offset16) + ); + } + this.stringStart = this.tableStart + this.stringOffset; + } + get(nameID) { + let record = this.nameRecords.find( + (record2) => record2.nameID === nameID + ); + if (record) return record.string; + } +}; +var LangTagRecord = class { + constructor(length, offset) { + this.length = length; + this.offset = offset; + } +}; +var NameRecord = class { + constructor(p22, nameTable) { + this.platformID = p22.uint16; + this.encodingID = p22.uint16; + this.languageID = p22.uint16; + this.nameID = p22.uint16; + this.length = p22.uint16; + this.offset = p22.Offset16; + lazy$1(this, `string`, () => { + p22.currentPosition = nameTable.stringStart + this.offset; + return decodeString(p22, this); + }); + } +}; +function decodeString(p22, record) { + const { platformID, length } = record; + if (length === 0) return ``; + if (platformID === 0 || platformID === 3) { + const str2 = []; + for (let i2 = 0, e2 = length / 2; i2 < e2; i2++) + str2[i2] = String.fromCharCode(p22.uint16); + return str2.join(``); + } + const bytes = p22.readBytes(length); + const str = []; + bytes.forEach(function(b2, i2) { + str[i2] = String.fromCharCode(b2); + }); + return str.join(``); +} +var name$1 = Object.freeze({ __proto__: null, name }); +var OS2 = class extends SimpleTable { + constructor(dict, dataview) { + const { p: p22 } = super(dict, dataview); + this.version = p22.uint16; + this.xAvgCharWidth = p22.int16; + this.usWeightClass = p22.uint16; + this.usWidthClass = p22.uint16; + this.fsType = p22.uint16; + this.ySubscriptXSize = p22.int16; + this.ySubscriptYSize = p22.int16; + this.ySubscriptXOffset = p22.int16; + this.ySubscriptYOffset = p22.int16; + this.ySuperscriptXSize = p22.int16; + this.ySuperscriptYSize = p22.int16; + this.ySuperscriptXOffset = p22.int16; + this.ySuperscriptYOffset = p22.int16; + this.yStrikeoutSize = p22.int16; + this.yStrikeoutPosition = p22.int16; + this.sFamilyClass = p22.int16; + this.panose = [...new Array(10)].map((_) => p22.uint8); + this.ulUnicodeRange1 = p22.flags(32); + this.ulUnicodeRange2 = p22.flags(32); + this.ulUnicodeRange3 = p22.flags(32); + this.ulUnicodeRange4 = p22.flags(32); + this.achVendID = p22.tag; + this.fsSelection = p22.uint16; + this.usFirstCharIndex = p22.uint16; + this.usLastCharIndex = p22.uint16; + this.sTypoAscender = p22.int16; + this.sTypoDescender = p22.int16; + this.sTypoLineGap = p22.int16; + this.usWinAscent = p22.uint16; + this.usWinDescent = p22.uint16; + if (this.version === 0) return p22.verifyLength(); + this.ulCodePageRange1 = p22.flags(32); + this.ulCodePageRange2 = p22.flags(32); + if (this.version === 1) return p22.verifyLength(); + this.sxHeight = p22.int16; + this.sCapHeight = p22.int16; + this.usDefaultChar = p22.uint16; + this.usBreakChar = p22.uint16; + this.usMaxContext = p22.uint16; + if (this.version <= 4) return p22.verifyLength(); + this.usLowerOpticalPointSize = p22.uint16; + this.usUpperOpticalPointSize = p22.uint16; + if (this.version === 5) return p22.verifyLength(); + } +}; +var OS2$1 = Object.freeze({ __proto__: null, OS2 }); +var post = class extends SimpleTable { + constructor(dict, dataview) { + const { p: p22 } = super(dict, dataview); + this.version = p22.legacyFixed; + this.italicAngle = p22.fixed; + this.underlinePosition = p22.fword; + this.underlineThickness = p22.fword; + this.isFixedPitch = p22.uint32; + this.minMemType42 = p22.uint32; + this.maxMemType42 = p22.uint32; + this.minMemType1 = p22.uint32; + this.maxMemType1 = p22.uint32; + if (this.version === 1 || this.version === 3) return p22.verifyLength(); + this.numGlyphs = p22.uint16; + if (this.version === 2) { + this.glyphNameIndex = [...new Array(this.numGlyphs)].map( + (_) => p22.uint16 + ); + this.namesOffset = p22.currentPosition; + this.glyphNameOffsets = [1]; + for (let i2 = 0; i2 < this.numGlyphs; i2++) { + let index = this.glyphNameIndex[i2]; + if (index < macStrings.length) { + this.glyphNameOffsets.push(this.glyphNameOffsets[i2]); + continue; + } + let bytelength = p22.int8; + p22.skip(bytelength); + this.glyphNameOffsets.push( + this.glyphNameOffsets[i2] + bytelength + 1 + ); + } + } + if (this.version === 2.5) { + this.offset = [...new Array(this.numGlyphs)].map( + (_) => p22.int8 + ); + } + } + getGlyphName(glyphid) { + if (this.version !== 2) { + console.warn( + `post table version ${this.version} does not support glyph name lookups` + ); + return ``; + } + let index = this.glyphNameIndex[glyphid]; + if (index < 258) return macStrings[index]; + let offset = this.glyphNameOffsets[glyphid]; + let next = this.glyphNameOffsets[glyphid + 1]; + let len = next - offset - 1; + if (len === 0) return `.notdef.`; + this.parser.currentPosition = this.namesOffset + offset; + const data = this.parser.readBytes( + len, + this.namesOffset + offset, + 8, + true + ); + return data.map((b2) => String.fromCharCode(b2)).join(``); + } +}; +var macStrings = [ + `.notdef`, + `.null`, + `nonmarkingreturn`, + `space`, + `exclam`, + `quotedbl`, + `numbersign`, + `dollar`, + `percent`, + `ampersand`, + `quotesingle`, + `parenleft`, + `parenright`, + `asterisk`, + `plus`, + `comma`, + `hyphen`, + `period`, + `slash`, + `zero`, + `one`, + `two`, + `three`, + `four`, + `five`, + `six`, + `seven`, + `eight`, + `nine`, + `colon`, + `semicolon`, + `less`, + `equal`, + `greater`, + `question`, + `at`, + `A`, + `B`, + `C`, + `D`, + `E`, + `F`, + `G`, + `H`, + `I`, + `J`, + `K`, + `L`, + `M`, + `N`, + `O`, + `P`, + `Q`, + `R`, + `S`, + `T`, + `U`, + `V`, + `W`, + `X`, + `Y`, + `Z`, + `bracketleft`, + `backslash`, + `bracketright`, + `asciicircum`, + `underscore`, + `grave`, + `a`, + `b`, + `c`, + `d`, + `e`, + `f`, + `g`, + `h`, + `i`, + `j`, + `k`, + `l`, + `m`, + `n`, + `o`, + `p`, + `q`, + `r`, + `s`, + `t`, + `u`, + `v`, + `w`, + `x`, + `y`, + `z`, + `braceleft`, + `bar`, + `braceright`, + `asciitilde`, + `Adieresis`, + `Aring`, + `Ccedilla`, + `Eacute`, + `Ntilde`, + `Odieresis`, + `Udieresis`, + `aacute`, + `agrave`, + `acircumflex`, + `adieresis`, + `atilde`, + `aring`, + `ccedilla`, + `eacute`, + `egrave`, + `ecircumflex`, + `edieresis`, + `iacute`, + `igrave`, + `icircumflex`, + `idieresis`, + `ntilde`, + `oacute`, + `ograve`, + `ocircumflex`, + `odieresis`, + `otilde`, + `uacute`, + `ugrave`, + `ucircumflex`, + `udieresis`, + `dagger`, + `degree`, + `cent`, + `sterling`, + `section`, + `bullet`, + `paragraph`, + `germandbls`, + `registered`, + `copyright`, + `trademark`, + `acute`, + `dieresis`, + `notequal`, + `AE`, + `Oslash`, + `infinity`, + `plusminus`, + `lessequal`, + `greaterequal`, + `yen`, + `mu`, + `partialdiff`, + `summation`, + `product`, + `pi`, + `integral`, + `ordfeminine`, + `ordmasculine`, + `Omega`, + `ae`, + `oslash`, + `questiondown`, + `exclamdown`, + `logicalnot`, + `radical`, + `florin`, + `approxequal`, + `Delta`, + `guillemotleft`, + `guillemotright`, + `ellipsis`, + `nonbreakingspace`, + `Agrave`, + `Atilde`, + `Otilde`, + `OE`, + `oe`, + `endash`, + `emdash`, + `quotedblleft`, + `quotedblright`, + `quoteleft`, + `quoteright`, + `divide`, + `lozenge`, + `ydieresis`, + `Ydieresis`, + `fraction`, + `currency`, + `guilsinglleft`, + `guilsinglright`, + `fi`, + `fl`, + `daggerdbl`, + `periodcentered`, + `quotesinglbase`, + `quotedblbase`, + `perthousand`, + `Acircumflex`, + `Ecircumflex`, + `Aacute`, + `Edieresis`, + `Egrave`, + `Iacute`, + `Icircumflex`, + `Idieresis`, + `Igrave`, + `Oacute`, + `Ocircumflex`, + `apple`, + `Ograve`, + `Uacute`, + `Ucircumflex`, + `Ugrave`, + `dotlessi`, + `circumflex`, + `tilde`, + `macron`, + `breve`, + `dotaccent`, + `ring`, + `cedilla`, + `hungarumlaut`, + `ogonek`, + `caron`, + `Lslash`, + `lslash`, + `Scaron`, + `scaron`, + `Zcaron`, + `zcaron`, + `brokenbar`, + `Eth`, + `eth`, + `Yacute`, + `yacute`, + `Thorn`, + `thorn`, + `minus`, + `multiply`, + `onesuperior`, + `twosuperior`, + `threesuperior`, + `onehalf`, + `onequarter`, + `threequarters`, + `franc`, + `Gbreve`, + `gbreve`, + `Idotaccent`, + `Scedilla`, + `scedilla`, + `Cacute`, + `cacute`, + `Ccaron`, + `ccaron`, + `dcroat` +]; +var post$1 = Object.freeze({ __proto__: null, post }); +var BASE = class extends SimpleTable { + constructor(dict, dataview) { + const { p: p22 } = super(dict, dataview); + this.majorVersion = p22.uint16; + this.minorVersion = p22.uint16; + this.horizAxisOffset = p22.Offset16; + this.vertAxisOffset = p22.Offset16; + lazy$1( + this, + `horizAxis`, + () => new AxisTable( + { offset: dict.offset + this.horizAxisOffset }, + dataview + ) + ); + lazy$1( + this, + `vertAxis`, + () => new AxisTable( + { offset: dict.offset + this.vertAxisOffset }, + dataview + ) + ); + if (this.majorVersion === 1 && this.minorVersion === 1) { + this.itemVarStoreOffset = p22.Offset32; + lazy$1( + this, + `itemVarStore`, + () => new AxisTable( + { offset: dict.offset + this.itemVarStoreOffset }, + dataview + ) + ); + } + } +}; +var AxisTable = class extends SimpleTable { + constructor(dict, dataview) { + const { p: p22 } = super(dict, dataview, `AxisTable`); + this.baseTagListOffset = p22.Offset16; + this.baseScriptListOffset = p22.Offset16; + lazy$1( + this, + `baseTagList`, + () => new BaseTagListTable( + { offset: dict.offset + this.baseTagListOffset }, + dataview + ) + ); + lazy$1( + this, + `baseScriptList`, + () => new BaseScriptListTable( + { offset: dict.offset + this.baseScriptListOffset }, + dataview + ) + ); + } +}; +var BaseTagListTable = class extends SimpleTable { + constructor(dict, dataview) { + const { p: p22 } = super(dict, dataview, `BaseTagListTable`); + this.baseTagCount = p22.uint16; + this.baselineTags = [...new Array(this.baseTagCount)].map( + (_) => p22.tag + ); + } +}; +var BaseScriptListTable = class extends SimpleTable { + constructor(dict, dataview) { + const { p: p22 } = super(dict, dataview, `BaseScriptListTable`); + this.baseScriptCount = p22.uint16; + const recordStart = p22.currentPosition; + lazy$1(this, `baseScriptRecords`, () => { + p22.currentPosition = recordStart; + return [...new Array(this.baseScriptCount)].map( + (_) => new BaseScriptRecord(this.start, p22) + ); + }); + } +}; +var BaseScriptRecord = class { + constructor(baseScriptListTableStart, p22) { + this.baseScriptTag = p22.tag; + this.baseScriptOffset = p22.Offset16; + lazy$1(this, `baseScriptTable`, () => { + p22.currentPosition = baseScriptListTableStart + this.baseScriptOffset; + return new BaseScriptTable(p22); + }); + } +}; +var BaseScriptTable = class { + constructor(p22) { + this.start = p22.currentPosition; + this.baseValuesOffset = p22.Offset16; + this.defaultMinMaxOffset = p22.Offset16; + this.baseLangSysCount = p22.uint16; + this.baseLangSysRecords = [...new Array(this.baseLangSysCount)].map( + (_) => new BaseLangSysRecord(this.start, p22) + ); + lazy$1(this, `baseValues`, () => { + p22.currentPosition = this.start + this.baseValuesOffset; + return new BaseValuesTable(p22); + }); + lazy$1(this, `defaultMinMax`, () => { + p22.currentPosition = this.start + this.defaultMinMaxOffset; + return new MinMaxTable(p22); + }); + } +}; +var BaseLangSysRecord = class { + constructor(baseScriptTableStart, p22) { + this.baseLangSysTag = p22.tag; + this.minMaxOffset = p22.Offset16; + lazy$1(this, `minMax`, () => { + p22.currentPosition = baseScriptTableStart + this.minMaxOffset; + return new MinMaxTable(p22); + }); + } +}; +var BaseValuesTable = class { + constructor(p22) { + this.parser = p22; + this.start = p22.currentPosition; + this.defaultBaselineIndex = p22.uint16; + this.baseCoordCount = p22.uint16; + this.baseCoords = [...new Array(this.baseCoordCount)].map( + (_) => p22.Offset16 + ); + } + getTable(id) { + this.parser.currentPosition = this.start + this.baseCoords[id]; + return new BaseCoordTable(this.parser); + } +}; +var MinMaxTable = class { + constructor(p22) { + this.minCoord = p22.Offset16; + this.maxCoord = p22.Offset16; + this.featMinMaxCount = p22.uint16; + const recordStart = p22.currentPosition; + lazy$1(this, `featMinMaxRecords`, () => { + p22.currentPosition = recordStart; + return [...new Array(this.featMinMaxCount)].map( + (_) => new FeatMinMaxRecord(p22) + ); + }); + } +}; +var FeatMinMaxRecord = class { + constructor(p22) { + this.featureTableTag = p22.tag; + this.minCoord = p22.Offset16; + this.maxCoord = p22.Offset16; + } +}; +var BaseCoordTable = class { + constructor(p22) { + this.baseCoordFormat = p22.uint16; + this.coordinate = p22.int16; + if (this.baseCoordFormat === 2) { + this.referenceGlyph = p22.uint16; + this.baseCoordPoint = p22.uint16; + } + if (this.baseCoordFormat === 3) { + this.deviceTable = p22.Offset16; + } + } +}; +var BASE$1 = Object.freeze({ __proto__: null, BASE }); +var ClassDefinition = class { + constructor(p22) { + this.classFormat = p22.uint16; + if (this.classFormat === 1) { + this.startGlyphID = p22.uint16; + this.glyphCount = p22.uint16; + this.classValueArray = [...new Array(this.glyphCount)].map( + (_) => p22.uint16 + ); + } + if (this.classFormat === 2) { + this.classRangeCount = p22.uint16; + this.classRangeRecords = [ + ...new Array(this.classRangeCount) + ].map((_) => new ClassRangeRecord(p22)); + } + } +}; +var ClassRangeRecord = class { + constructor(p22) { + this.startGlyphID = p22.uint16; + this.endGlyphID = p22.uint16; + this.class = p22.uint16; + } +}; +var CoverageTable = class extends ParsedData { + constructor(p22) { + super(p22); + this.coverageFormat = p22.uint16; + if (this.coverageFormat === 1) { + this.glyphCount = p22.uint16; + this.glyphArray = [...new Array(this.glyphCount)].map( + (_) => p22.uint16 + ); + } + if (this.coverageFormat === 2) { + this.rangeCount = p22.uint16; + this.rangeRecords = [...new Array(this.rangeCount)].map( + (_) => new CoverageRangeRecord(p22) + ); + } + } +}; +var CoverageRangeRecord = class { + constructor(p22) { + this.startGlyphID = p22.uint16; + this.endGlyphID = p22.uint16; + this.startCoverageIndex = p22.uint16; + } +}; +var ItemVariationStoreTable = class { + constructor(table, p22) { + this.table = table; + this.parser = p22; + this.start = p22.currentPosition; + this.format = p22.uint16; + this.variationRegionListOffset = p22.Offset32; + this.itemVariationDataCount = p22.uint16; + this.itemVariationDataOffsets = [ + ...new Array(this.itemVariationDataCount) + ].map((_) => p22.Offset32); + } +}; +var GDEF = class extends SimpleTable { + constructor(dict, dataview) { + const { p: p22 } = super(dict, dataview); + this.majorVersion = p22.uint16; + this.minorVersion = p22.uint16; + this.glyphClassDefOffset = p22.Offset16; + lazy$1(this, `glyphClassDefs`, () => { + if (this.glyphClassDefOffset === 0) return void 0; + p22.currentPosition = this.tableStart + this.glyphClassDefOffset; + return new ClassDefinition(p22); + }); + this.attachListOffset = p22.Offset16; + lazy$1(this, `attachList`, () => { + if (this.attachListOffset === 0) return void 0; + p22.currentPosition = this.tableStart + this.attachListOffset; + return new AttachList(p22); + }); + this.ligCaretListOffset = p22.Offset16; + lazy$1(this, `ligCaretList`, () => { + if (this.ligCaretListOffset === 0) return void 0; + p22.currentPosition = this.tableStart + this.ligCaretListOffset; + return new LigCaretList(p22); + }); + this.markAttachClassDefOffset = p22.Offset16; + lazy$1(this, `markAttachClassDef`, () => { + if (this.markAttachClassDefOffset === 0) return void 0; + p22.currentPosition = this.tableStart + this.markAttachClassDefOffset; + return new ClassDefinition(p22); + }); + if (this.minorVersion >= 2) { + this.markGlyphSetsDefOffset = p22.Offset16; + lazy$1(this, `markGlyphSetsDef`, () => { + if (this.markGlyphSetsDefOffset === 0) return void 0; + p22.currentPosition = this.tableStart + this.markGlyphSetsDefOffset; + return new MarkGlyphSetsTable(p22); + }); + } + if (this.minorVersion === 3) { + this.itemVarStoreOffset = p22.Offset32; + lazy$1(this, `itemVarStore`, () => { + if (this.itemVarStoreOffset === 0) return void 0; + p22.currentPosition = this.tableStart + this.itemVarStoreOffset; + return new ItemVariationStoreTable(p22); + }); + } + } +}; +var AttachList = class extends ParsedData { + constructor(p22) { + super(p22); + this.coverageOffset = p22.Offset16; + this.glyphCount = p22.uint16; + this.attachPointOffsets = [...new Array(this.glyphCount)].map( + (_) => p22.Offset16 + ); + } + getPoint(pointID) { + this.parser.currentPosition = this.start + this.attachPointOffsets[pointID]; + return new AttachPoint(this.parser); + } +}; +var AttachPoint = class { + constructor(p22) { + this.pointCount = p22.uint16; + this.pointIndices = [...new Array(this.pointCount)].map( + (_) => p22.uint16 + ); + } +}; +var LigCaretList = class extends ParsedData { + constructor(p22) { + super(p22); + this.coverageOffset = p22.Offset16; + lazy$1(this, `coverage`, () => { + p22.currentPosition = this.start + this.coverageOffset; + return new CoverageTable(p22); + }); + this.ligGlyphCount = p22.uint16; + this.ligGlyphOffsets = [...new Array(this.ligGlyphCount)].map( + (_) => p22.Offset16 + ); + } + getLigGlyph(ligGlyphID) { + this.parser.currentPosition = this.start + this.ligGlyphOffsets[ligGlyphID]; + return new LigGlyph(this.parser); + } +}; +var LigGlyph = class extends ParsedData { + constructor(p22) { + super(p22); + this.caretCount = p22.uint16; + this.caretValueOffsets = [...new Array(this.caretCount)].map( + (_) => p22.Offset16 + ); + } + getCaretValue(caretID) { + this.parser.currentPosition = this.start + this.caretValueOffsets[caretID]; + return new CaretValue(this.parser); + } +}; +var CaretValue = class { + constructor(p22) { + this.caretValueFormat = p22.uint16; + if (this.caretValueFormat === 1) { + this.coordinate = p22.int16; + } + if (this.caretValueFormat === 2) { + this.caretValuePointIndex = p22.uint16; + } + if (this.caretValueFormat === 3) { + this.coordinate = p22.int16; + this.deviceOffset = p22.Offset16; + } + } +}; +var MarkGlyphSetsTable = class extends ParsedData { + constructor(p22) { + super(p22); + this.markGlyphSetTableFormat = p22.uint16; + this.markGlyphSetCount = p22.uint16; + this.coverageOffsets = [...new Array(this.markGlyphSetCount)].map( + (_) => p22.Offset32 + ); + } + getMarkGlyphSet(markGlyphSetID) { + this.parser.currentPosition = this.start + this.coverageOffsets[markGlyphSetID]; + return new CoverageTable(this.parser); + } +}; +var GDEF$1 = Object.freeze({ __proto__: null, GDEF }); +var ScriptList = class extends ParsedData { + static EMPTY = { scriptCount: 0, scriptRecords: [] }; + constructor(p22) { + super(p22); + this.scriptCount = p22.uint16; + this.scriptRecords = [...new Array(this.scriptCount)].map( + (_) => new ScriptRecord(p22) + ); + } +}; +var ScriptRecord = class { + constructor(p22) { + this.scriptTag = p22.tag; + this.scriptOffset = p22.Offset16; + } +}; +var ScriptTable = class extends ParsedData { + constructor(p22) { + super(p22); + this.defaultLangSys = p22.Offset16; + this.langSysCount = p22.uint16; + this.langSysRecords = [...new Array(this.langSysCount)].map( + (_) => new LangSysRecord(p22) + ); + } +}; +var LangSysRecord = class { + constructor(p22) { + this.langSysTag = p22.tag; + this.langSysOffset = p22.Offset16; + } +}; +var LangSysTable = class { + constructor(p22) { + this.lookupOrder = p22.Offset16; + this.requiredFeatureIndex = p22.uint16; + this.featureIndexCount = p22.uint16; + this.featureIndices = [...new Array(this.featureIndexCount)].map( + (_) => p22.uint16 + ); + } +}; +var FeatureList = class extends ParsedData { + static EMPTY = { featureCount: 0, featureRecords: [] }; + constructor(p22) { + super(p22); + this.featureCount = p22.uint16; + this.featureRecords = [...new Array(this.featureCount)].map( + (_) => new FeatureRecord(p22) + ); + } +}; +var FeatureRecord = class { + constructor(p22) { + this.featureTag = p22.tag; + this.featureOffset = p22.Offset16; + } +}; +var FeatureTable = class extends ParsedData { + constructor(p22) { + super(p22); + this.featureParams = p22.Offset16; + this.lookupIndexCount = p22.uint16; + this.lookupListIndices = [...new Array(this.lookupIndexCount)].map( + (_) => p22.uint16 + ); + } + getFeatureParams() { + if (this.featureParams > 0) { + const p22 = this.parser; + p22.currentPosition = this.start + this.featureParams; + const tag = this.featureTag; + if (tag === `size`) return new Size(p22); + if (tag.startsWith(`cc`)) return new CharacterVariant(p22); + if (tag.startsWith(`ss`)) return new StylisticSet(p22); + } + } +}; +var CharacterVariant = class { + constructor(p22) { + this.format = p22.uint16; + this.featUiLabelNameId = p22.uint16; + this.featUiTooltipTextNameId = p22.uint16; + this.sampleTextNameId = p22.uint16; + this.numNamedParameters = p22.uint16; + this.firstParamUiLabelNameId = p22.uint16; + this.charCount = p22.uint16; + this.character = [...new Array(this.charCount)].map( + (_) => p22.uint24 + ); + } +}; +var Size = class { + constructor(p22) { + this.designSize = p22.uint16; + this.subfamilyIdentifier = p22.uint16; + this.subfamilyNameID = p22.uint16; + this.smallEnd = p22.uint16; + this.largeEnd = p22.uint16; + } +}; +var StylisticSet = class { + constructor(p22) { + this.version = p22.uint16; + this.UINameID = p22.uint16; + } +}; +function undoCoverageOffsetParsing(instance) { + instance.parser.currentPosition -= 2; + delete instance.coverageOffset; + delete instance.getCoverageTable; +} +var LookupType$1 = class extends ParsedData { + constructor(p22) { + super(p22); + this.substFormat = p22.uint16; + this.coverageOffset = p22.Offset16; + } + getCoverageTable() { + let p22 = this.parser; + p22.currentPosition = this.start + this.coverageOffset; + return new CoverageTable(p22); + } +}; +var SubstLookupRecord = class { + constructor(p22) { + this.glyphSequenceIndex = p22.uint16; + this.lookupListIndex = p22.uint16; + } +}; +var LookupType1$1 = class extends LookupType$1 { + constructor(p22) { + super(p22); + this.deltaGlyphID = p22.int16; + } +}; +var LookupType2$1 = class extends LookupType$1 { + constructor(p22) { + super(p22); + this.sequenceCount = p22.uint16; + this.sequenceOffsets = [...new Array(this.sequenceCount)].map( + (_) => p22.Offset16 + ); + } + getSequence(index) { + let p22 = this.parser; + p22.currentPosition = this.start + this.sequenceOffsets[index]; + return new SequenceTable(p22); + } +}; +var SequenceTable = class { + constructor(p22) { + this.glyphCount = p22.uint16; + this.substituteGlyphIDs = [...new Array(this.glyphCount)].map( + (_) => p22.uint16 + ); + } +}; +var LookupType3$1 = class extends LookupType$1 { + constructor(p22) { + super(p22); + this.alternateSetCount = p22.uint16; + this.alternateSetOffsets = [ + ...new Array(this.alternateSetCount) + ].map((_) => p22.Offset16); + } + getAlternateSet(index) { + let p22 = this.parser; + p22.currentPosition = this.start + this.alternateSetOffsets[index]; + return new AlternateSetTable(p22); + } +}; +var AlternateSetTable = class { + constructor(p22) { + this.glyphCount = p22.uint16; + this.alternateGlyphIDs = [...new Array(this.glyphCount)].map( + (_) => p22.uint16 + ); + } +}; +var LookupType4$1 = class extends LookupType$1 { + constructor(p22) { + super(p22); + this.ligatureSetCount = p22.uint16; + this.ligatureSetOffsets = [...new Array(this.ligatureSetCount)].map( + (_) => p22.Offset16 + ); + } + getLigatureSet(index) { + let p22 = this.parser; + p22.currentPosition = this.start + this.ligatureSetOffsets[index]; + return new LigatureSetTable(p22); + } +}; +var LigatureSetTable = class extends ParsedData { + constructor(p22) { + super(p22); + this.ligatureCount = p22.uint16; + this.ligatureOffsets = [...new Array(this.ligatureCount)].map( + (_) => p22.Offset16 + ); + } + getLigature(index) { + let p22 = this.parser; + p22.currentPosition = this.start + this.ligatureOffsets[index]; + return new LigatureTable(p22); + } +}; +var LigatureTable = class { + constructor(p22) { + this.ligatureGlyph = p22.uint16; + this.componentCount = p22.uint16; + this.componentGlyphIDs = [ + ...new Array(this.componentCount - 1) + ].map((_) => p22.uint16); + } +}; +var LookupType5$1 = class extends LookupType$1 { + constructor(p22) { + super(p22); + if (this.substFormat === 1) { + this.subRuleSetCount = p22.uint16; + this.subRuleSetOffsets = [ + ...new Array(this.subRuleSetCount) + ].map((_) => p22.Offset16); + } + if (this.substFormat === 2) { + this.classDefOffset = p22.Offset16; + this.subClassSetCount = p22.uint16; + this.subClassSetOffsets = [ + ...new Array(this.subClassSetCount) + ].map((_) => p22.Offset16); + } + if (this.substFormat === 3) { + undoCoverageOffsetParsing(this); + this.glyphCount = p22.uint16; + this.substitutionCount = p22.uint16; + this.coverageOffsets = [...new Array(this.glyphCount)].map( + (_) => p22.Offset16 + ); + this.substLookupRecords = [ + ...new Array(this.substitutionCount) + ].map((_) => new SubstLookupRecord(p22)); + } + } + getSubRuleSet(index) { + if (this.substFormat !== 1) + throw new Error( + `lookup type 5.${this.substFormat} has no subrule sets.` + ); + let p22 = this.parser; + p22.currentPosition = this.start + this.subRuleSetOffsets[index]; + return new SubRuleSetTable(p22); + } + getSubClassSet(index) { + if (this.substFormat !== 2) + throw new Error( + `lookup type 5.${this.substFormat} has no subclass sets.` + ); + let p22 = this.parser; + p22.currentPosition = this.start + this.subClassSetOffsets[index]; + return new SubClassSetTable(p22); + } + getCoverageTable(index) { + if (this.substFormat !== 3 && !index) + return super.getCoverageTable(); + if (!index) + throw new Error( + `lookup type 5.${this.substFormat} requires an coverage table index.` + ); + let p22 = this.parser; + p22.currentPosition = this.start + this.coverageOffsets[index]; + return new CoverageTable(p22); + } +}; +var SubRuleSetTable = class extends ParsedData { + constructor(p22) { + super(p22); + this.subRuleCount = p22.uint16; + this.subRuleOffsets = [...new Array(this.subRuleCount)].map( + (_) => p22.Offset16 + ); + } + getSubRule(index) { + let p22 = this.parser; + p22.currentPosition = this.start + this.subRuleOffsets[index]; + return new SubRuleTable(p22); + } +}; +var SubRuleTable = class { + constructor(p22) { + this.glyphCount = p22.uint16; + this.substitutionCount = p22.uint16; + this.inputSequence = [...new Array(this.glyphCount - 1)].map( + (_) => p22.uint16 + ); + this.substLookupRecords = [ + ...new Array(this.substitutionCount) + ].map((_) => new SubstLookupRecord(p22)); + } +}; +var SubClassSetTable = class extends ParsedData { + constructor(p22) { + super(p22); + this.subClassRuleCount = p22.uint16; + this.subClassRuleOffsets = [ + ...new Array(this.subClassRuleCount) + ].map((_) => p22.Offset16); + } + getSubClass(index) { + let p22 = this.parser; + p22.currentPosition = this.start + this.subClassRuleOffsets[index]; + return new SubClassRuleTable(p22); + } +}; +var SubClassRuleTable = class extends SubRuleTable { + constructor(p22) { + super(p22); + } +}; +var LookupType6$1 = class extends LookupType$1 { + constructor(p22) { + super(p22); + if (this.substFormat === 1) { + this.chainSubRuleSetCount = p22.uint16; + this.chainSubRuleSetOffsets = [ + ...new Array(this.chainSubRuleSetCount) + ].map((_) => p22.Offset16); + } + if (this.substFormat === 2) { + this.backtrackClassDefOffset = p22.Offset16; + this.inputClassDefOffset = p22.Offset16; + this.lookaheadClassDefOffset = p22.Offset16; + this.chainSubClassSetCount = p22.uint16; + this.chainSubClassSetOffsets = [ + ...new Array(this.chainSubClassSetCount) + ].map((_) => p22.Offset16); + } + if (this.substFormat === 3) { + undoCoverageOffsetParsing(this); + this.backtrackGlyphCount = p22.uint16; + this.backtrackCoverageOffsets = [ + ...new Array(this.backtrackGlyphCount) + ].map((_) => p22.Offset16); + this.inputGlyphCount = p22.uint16; + this.inputCoverageOffsets = [ + ...new Array(this.inputGlyphCount) + ].map((_) => p22.Offset16); + this.lookaheadGlyphCount = p22.uint16; + this.lookaheadCoverageOffsets = [ + ...new Array(this.lookaheadGlyphCount) + ].map((_) => p22.Offset16); + this.seqLookupCount = p22.uint16; + this.seqLookupRecords = [ + ...new Array(this.substitutionCount) + ].map((_) => new SequenceLookupRecord(p22)); + } + } + getChainSubRuleSet(index) { + if (this.substFormat !== 1) + throw new Error( + `lookup type 6.${this.substFormat} has no chainsubrule sets.` + ); + let p22 = this.parser; + p22.currentPosition = this.start + this.chainSubRuleSetOffsets[index]; + return new ChainSubRuleSetTable(p22); + } + getChainSubClassSet(index) { + if (this.substFormat !== 2) + throw new Error( + `lookup type 6.${this.substFormat} has no chainsubclass sets.` + ); + let p22 = this.parser; + p22.currentPosition = this.start + this.chainSubClassSetOffsets[index]; + return new ChainSubClassSetTable(p22); + } + getCoverageFromOffset(offset) { + if (this.substFormat !== 3) + throw new Error( + `lookup type 6.${this.substFormat} does not use contextual coverage offsets.` + ); + let p22 = this.parser; + p22.currentPosition = this.start + offset; + return new CoverageTable(p22); + } +}; +var ChainSubRuleSetTable = class extends ParsedData { + constructor(p22) { + super(p22); + this.chainSubRuleCount = p22.uint16; + this.chainSubRuleOffsets = [ + ...new Array(this.chainSubRuleCount) + ].map((_) => p22.Offset16); + } + getSubRule(index) { + let p22 = this.parser; + p22.currentPosition = this.start + this.chainSubRuleOffsets[index]; + return new ChainSubRuleTable(p22); + } +}; +var ChainSubRuleTable = class { + constructor(p22) { + this.backtrackGlyphCount = p22.uint16; + this.backtrackSequence = [ + ...new Array(this.backtrackGlyphCount) + ].map((_) => p22.uint16); + this.inputGlyphCount = p22.uint16; + this.inputSequence = [...new Array(this.inputGlyphCount - 1)].map( + (_) => p22.uint16 + ); + this.lookaheadGlyphCount = p22.uint16; + this.lookAheadSequence = [ + ...new Array(this.lookAheadGlyphCount) + ].map((_) => p22.uint16); + this.substitutionCount = p22.uint16; + this.substLookupRecords = [...new Array(this.SubstCount)].map( + (_) => new SubstLookupRecord(p22) + ); + } +}; +var ChainSubClassSetTable = class extends ParsedData { + constructor(p22) { + super(p22); + this.chainSubClassRuleCount = p22.uint16; + this.chainSubClassRuleOffsets = [ + ...new Array(this.chainSubClassRuleCount) + ].map((_) => p22.Offset16); + } + getSubClass(index) { + let p22 = this.parser; + p22.currentPosition = this.start + this.chainSubRuleOffsets[index]; + return new ChainSubClassRuleTable(p22); + } +}; +var ChainSubClassRuleTable = class { + constructor(p22) { + this.backtrackGlyphCount = p22.uint16; + this.backtrackSequence = [ + ...new Array(this.backtrackGlyphCount) + ].map((_) => p22.uint16); + this.inputGlyphCount = p22.uint16; + this.inputSequence = [...new Array(this.inputGlyphCount - 1)].map( + (_) => p22.uint16 + ); + this.lookaheadGlyphCount = p22.uint16; + this.lookAheadSequence = [ + ...new Array(this.lookAheadGlyphCount) + ].map((_) => p22.uint16); + this.substitutionCount = p22.uint16; + this.substLookupRecords = [ + ...new Array(this.substitutionCount) + ].map((_) => new SequenceLookupRecord(p22)); + } +}; +var SequenceLookupRecord = class extends ParsedData { + constructor(p22) { + super(p22); + this.sequenceIndex = p22.uint16; + this.lookupListIndex = p22.uint16; + } +}; +var LookupType7$1 = class extends ParsedData { + constructor(p22) { + super(p22); + this.substFormat = p22.uint16; + this.extensionLookupType = p22.uint16; + this.extensionOffset = p22.Offset32; + } +}; +var LookupType8$1 = class extends LookupType$1 { + constructor(p22) { + super(p22); + this.backtrackGlyphCount = p22.uint16; + this.backtrackCoverageOffsets = [ + ...new Array(this.backtrackGlyphCount) + ].map((_) => p22.Offset16); + this.lookaheadGlyphCount = p22.uint16; + this.lookaheadCoverageOffsets = [ + new Array(this.lookaheadGlyphCount) + ].map((_) => p22.Offset16); + this.glyphCount = p22.uint16; + this.substituteGlyphIDs = [...new Array(this.glyphCount)].map( + (_) => p22.uint16 + ); + } +}; +var GSUBtables = { + buildSubtable: function(type, p22) { + const subtable = new [ + void 0, + LookupType1$1, + LookupType2$1, + LookupType3$1, + LookupType4$1, + LookupType5$1, + LookupType6$1, + LookupType7$1, + LookupType8$1 + ][type](p22); + subtable.type = type; + return subtable; + } +}; +var LookupType = class extends ParsedData { + constructor(p22) { + super(p22); + } +}; +var LookupType1 = class extends LookupType { + constructor(p22) { + super(p22); + console.log(`lookup type 1`); + } +}; +var LookupType2 = class extends LookupType { + constructor(p22) { + super(p22); + console.log(`lookup type 2`); + } +}; +var LookupType3 = class extends LookupType { + constructor(p22) { + super(p22); + console.log(`lookup type 3`); + } +}; +var LookupType4 = class extends LookupType { + constructor(p22) { + super(p22); + console.log(`lookup type 4`); + } +}; +var LookupType5 = class extends LookupType { + constructor(p22) { + super(p22); + console.log(`lookup type 5`); + } +}; +var LookupType6 = class extends LookupType { + constructor(p22) { + super(p22); + console.log(`lookup type 6`); + } +}; +var LookupType7 = class extends LookupType { + constructor(p22) { + super(p22); + console.log(`lookup type 7`); + } +}; +var LookupType8 = class extends LookupType { + constructor(p22) { + super(p22); + console.log(`lookup type 8`); + } +}; +var LookupType9 = class extends LookupType { + constructor(p22) { + super(p22); + console.log(`lookup type 9`); + } +}; +var GPOStables = { + buildSubtable: function(type, p22) { + const subtable = new [ + void 0, + LookupType1, + LookupType2, + LookupType3, + LookupType4, + LookupType5, + LookupType6, + LookupType7, + LookupType8, + LookupType9 + ][type](p22); + subtable.type = type; + return subtable; + } +}; +var LookupList = class extends ParsedData { + static EMPTY = { lookupCount: 0, lookups: [] }; + constructor(p22) { + super(p22); + this.lookupCount = p22.uint16; + this.lookups = [...new Array(this.lookupCount)].map( + (_) => p22.Offset16 + ); + } +}; +var LookupTable = class extends ParsedData { + constructor(p22, type) { + super(p22); + this.ctType = type; + this.lookupType = p22.uint16; + this.lookupFlag = p22.uint16; + this.subTableCount = p22.uint16; + this.subtableOffsets = [...new Array(this.subTableCount)].map( + (_) => p22.Offset16 + ); + this.markFilteringSet = p22.uint16; + } + get rightToLeft() { + return this.lookupFlag & true; + } + get ignoreBaseGlyphs() { + return this.lookupFlag & true; + } + get ignoreLigatures() { + return this.lookupFlag & true; + } + get ignoreMarks() { + return this.lookupFlag & true; + } + get useMarkFilteringSet() { + return this.lookupFlag & true; + } + get markAttachmentType() { + return this.lookupFlag & true; + } + getSubTable(index) { + const builder = this.ctType === `GSUB` ? GSUBtables : GPOStables; + this.parser.currentPosition = this.start + this.subtableOffsets[index]; + return builder.buildSubtable(this.lookupType, this.parser); + } +}; +var CommonLayoutTable = class extends SimpleTable { + constructor(dict, dataview, name2) { + const { p: p22, tableStart } = super(dict, dataview, name2); + this.majorVersion = p22.uint16; + this.minorVersion = p22.uint16; + this.scriptListOffset = p22.Offset16; + this.featureListOffset = p22.Offset16; + this.lookupListOffset = p22.Offset16; + if (this.majorVersion === 1 && this.minorVersion === 1) { + this.featureVariationsOffset = p22.Offset32; + } + const no_content = !(this.scriptListOffset || this.featureListOffset || this.lookupListOffset); + lazy$1(this, `scriptList`, () => { + if (no_content) return ScriptList.EMPTY; + p22.currentPosition = tableStart + this.scriptListOffset; + return new ScriptList(p22); + }); + lazy$1(this, `featureList`, () => { + if (no_content) return FeatureList.EMPTY; + p22.currentPosition = tableStart + this.featureListOffset; + return new FeatureList(p22); + }); + lazy$1(this, `lookupList`, () => { + if (no_content) return LookupList.EMPTY; + p22.currentPosition = tableStart + this.lookupListOffset; + return new LookupList(p22); + }); + if (this.featureVariationsOffset) { + lazy$1(this, `featureVariations`, () => { + if (no_content) return FeatureVariations.EMPTY; + p22.currentPosition = tableStart + this.featureVariationsOffset; + return new FeatureVariations(p22); + }); + } + } + getSupportedScripts() { + return this.scriptList.scriptRecords.map((r3) => r3.scriptTag); + } + getScriptTable(scriptTag) { + let record = this.scriptList.scriptRecords.find( + (r3) => r3.scriptTag === scriptTag + ); + this.parser.currentPosition = this.scriptList.start + record.scriptOffset; + let table = new ScriptTable(this.parser); + table.scriptTag = scriptTag; + return table; + } + ensureScriptTable(arg) { + if (typeof arg === "string") { + return this.getScriptTable(arg); + } + return arg; + } + getSupportedLangSys(scriptTable) { + scriptTable = this.ensureScriptTable(scriptTable); + const hasDefault = scriptTable.defaultLangSys !== 0; + const supported = scriptTable.langSysRecords.map( + (l2) => l2.langSysTag + ); + if (hasDefault) supported.unshift(`dflt`); + return supported; + } + getDefaultLangSysTable(scriptTable) { + scriptTable = this.ensureScriptTable(scriptTable); + let offset = scriptTable.defaultLangSys; + if (offset !== 0) { + this.parser.currentPosition = scriptTable.start + offset; + let table = new LangSysTable(this.parser); + table.langSysTag = ``; + table.defaultForScript = scriptTable.scriptTag; + return table; + } + } + getLangSysTable(scriptTable, langSysTag = `dflt`) { + if (langSysTag === `dflt`) + return this.getDefaultLangSysTable(scriptTable); + scriptTable = this.ensureScriptTable(scriptTable); + let record = scriptTable.langSysRecords.find( + (l2) => l2.langSysTag === langSysTag + ); + this.parser.currentPosition = scriptTable.start + record.langSysOffset; + let table = new LangSysTable(this.parser); + table.langSysTag = langSysTag; + return table; + } + getFeatures(langSysTable) { + return langSysTable.featureIndices.map( + (index) => this.getFeature(index) + ); + } + getFeature(indexOrTag) { + let record; + if (parseInt(indexOrTag) == indexOrTag) { + record = this.featureList.featureRecords[indexOrTag]; + } else { + record = this.featureList.featureRecords.find( + (f2) => f2.featureTag === indexOrTag + ); + } + if (!record) return; + this.parser.currentPosition = this.featureList.start + record.featureOffset; + let table = new FeatureTable(this.parser); + table.featureTag = record.featureTag; + return table; + } + getLookups(featureTable) { + return featureTable.lookupListIndices.map( + (index) => this.getLookup(index) + ); + } + getLookup(lookupIndex, type) { + let lookupOffset = this.lookupList.lookups[lookupIndex]; + this.parser.currentPosition = this.lookupList.start + lookupOffset; + return new LookupTable(this.parser, type); + } +}; +var GSUB = class extends CommonLayoutTable { + constructor(dict, dataview) { + super(dict, dataview, `GSUB`); + } + getLookup(lookupIndex) { + return super.getLookup(lookupIndex, `GSUB`); + } +}; +var GSUB$1 = Object.freeze({ __proto__: null, GSUB }); +var GPOS = class extends CommonLayoutTable { + constructor(dict, dataview) { + super(dict, dataview, `GPOS`); + } + getLookup(lookupIndex) { + return super.getLookup(lookupIndex, `GPOS`); + } +}; +var GPOS$1 = Object.freeze({ __proto__: null, GPOS }); +var SVG6 = class extends SimpleTable { + constructor(dict, dataview) { + const { p: p22 } = super(dict, dataview); + this.version = p22.uint16; + this.offsetToSVGDocumentList = p22.Offset32; + p22.currentPosition = this.tableStart + this.offsetToSVGDocumentList; + this.documentList = new SVGDocumentList(p22); + } +}; +var SVGDocumentList = class extends ParsedData { + constructor(p22) { + super(p22); + this.numEntries = p22.uint16; + this.documentRecords = [...new Array(this.numEntries)].map( + (_) => new SVGDocumentRecord(p22) + ); + } + getDocument(documentID) { + let record = this.documentRecords[documentID]; + if (!record) return ""; + let offset = this.start + record.svgDocOffset; + this.parser.currentPosition = offset; + return this.parser.readBytes(record.svgDocLength); + } + getDocumentForGlyph(glyphID) { + let id = this.documentRecords.findIndex( + (d2) => d2.startGlyphID <= glyphID && glyphID <= d2.endGlyphID + ); + if (id === -1) return ""; + return this.getDocument(id); + } +}; +var SVGDocumentRecord = class { + constructor(p22) { + this.startGlyphID = p22.uint16; + this.endGlyphID = p22.uint16; + this.svgDocOffset = p22.Offset32; + this.svgDocLength = p22.uint32; + } +}; +var SVG$1 = Object.freeze({ __proto__: null, SVG: SVG6 }); +var fvar = class extends SimpleTable { + constructor(dict, dataview) { + const { p: p22 } = super(dict, dataview); + this.majorVersion = p22.uint16; + this.minorVersion = p22.uint16; + this.axesArrayOffset = p22.Offset16; + p22.uint16; + this.axisCount = p22.uint16; + this.axisSize = p22.uint16; + this.instanceCount = p22.uint16; + this.instanceSize = p22.uint16; + const axisStart = this.tableStart + this.axesArrayOffset; + lazy$1(this, `axes`, () => { + p22.currentPosition = axisStart; + return [...new Array(this.axisCount)].map( + (_) => new VariationAxisRecord(p22) + ); + }); + const instanceStart = axisStart + this.axisCount * this.axisSize; + lazy$1(this, `instances`, () => { + let instances = []; + for (let i2 = 0; i2 < this.instanceCount; i2++) { + p22.currentPosition = instanceStart + i2 * this.instanceSize; + instances.push( + new InstanceRecord(p22, this.axisCount, this.instanceSize) + ); + } + return instances; + }); + } + getSupportedAxes() { + return this.axes.map((a2) => a2.tag); + } + getAxis(name2) { + return this.axes.find((a2) => a2.tag === name2); + } +}; +var VariationAxisRecord = class { + constructor(p22) { + this.tag = p22.tag; + this.minValue = p22.fixed; + this.defaultValue = p22.fixed; + this.maxValue = p22.fixed; + this.flags = p22.flags(16); + this.axisNameID = p22.uint16; + } +}; +var InstanceRecord = class { + constructor(p22, axisCount, size) { + let start = p22.currentPosition; + this.subfamilyNameID = p22.uint16; + p22.uint16; + this.coordinates = [...new Array(axisCount)].map( + (_) => p22.fixed + ); + if (p22.currentPosition - start < size) { + this.postScriptNameID = p22.uint16; + } + } +}; +var fvar$1 = Object.freeze({ __proto__: null, fvar }); +var cvt = class extends SimpleTable { + constructor(dict, dataview) { + const { p: p22 } = super(dict, dataview); + const n2 = dict.length / 2; + lazy$1( + this, + `items`, + () => [...new Array(n2)].map((_) => p22.fword) + ); + } +}; +var cvt$1 = Object.freeze({ __proto__: null, cvt }); +var fpgm = class extends SimpleTable { + constructor(dict, dataview) { + const { p: p22 } = super(dict, dataview); + lazy$1( + this, + `instructions`, + () => [...new Array(dict.length)].map((_) => p22.uint8) + ); + } +}; +var fpgm$1 = Object.freeze({ __proto__: null, fpgm }); +var gasp = class extends SimpleTable { + constructor(dict, dataview) { + const { p: p22 } = super(dict, dataview); + this.version = p22.uint16; + this.numRanges = p22.uint16; + const getter = () => [...new Array(this.numRanges)].map( + (_) => new GASPRange(p22) + ); + lazy$1(this, `gaspRanges`, getter); + } +}; +var GASPRange = class { + constructor(p22) { + this.rangeMaxPPEM = p22.uint16; + this.rangeGaspBehavior = p22.uint16; + } +}; +var gasp$1 = Object.freeze({ __proto__: null, gasp }); +var glyf = class extends SimpleTable { + constructor(dict, dataview) { + super(dict, dataview); + } + getGlyphData(offset, length) { + this.parser.currentPosition = this.tableStart + offset; + return this.parser.readBytes(length); + } +}; +var glyf$1 = Object.freeze({ __proto__: null, glyf }); +var loca = class extends SimpleTable { + constructor(dict, dataview, tables) { + const { p: p22 } = super(dict, dataview); + const n2 = tables.maxp.numGlyphs + 1; + if (tables.head.indexToLocFormat === 0) { + this.x2 = true; + lazy$1( + this, + `offsets`, + () => [...new Array(n2)].map((_) => p22.Offset16) + ); + } else { + lazy$1( + this, + `offsets`, + () => [...new Array(n2)].map((_) => p22.Offset32) + ); + } + } + getGlyphDataOffsetAndLength(glyphID) { + let offset = this.offsets[glyphID] * this.x2 ? 2 : 1; + let nextOffset = this.offsets[glyphID + 1] * this.x2 ? 2 : 1; + return { offset, length: nextOffset - offset }; + } +}; +var loca$1 = Object.freeze({ __proto__: null, loca }); +var prep = class extends SimpleTable { + constructor(dict, dataview) { + const { p: p22 } = super(dict, dataview); + lazy$1( + this, + `instructions`, + () => [...new Array(dict.length)].map((_) => p22.uint8) + ); + } +}; +var prep$1 = Object.freeze({ __proto__: null, prep }); +var CFF = class extends SimpleTable { + constructor(dict, dataview) { + const { p: p22 } = super(dict, dataview); + lazy$1(this, `data`, () => p22.readBytes()); + } +}; +var CFF$1 = Object.freeze({ __proto__: null, CFF }); +var CFF2 = class extends SimpleTable { + constructor(dict, dataview) { + const { p: p22 } = super(dict, dataview); + lazy$1(this, `data`, () => p22.readBytes()); + } +}; +var CFF2$1 = Object.freeze({ __proto__: null, CFF2 }); +var VORG = class extends SimpleTable { + constructor(dict, dataview) { + const { p: p22 } = super(dict, dataview); + this.majorVersion = p22.uint16; + this.minorVersion = p22.uint16; + this.defaultVertOriginY = p22.int16; + this.numVertOriginYMetrics = p22.uint16; + lazy$1( + this, + `vertORiginYMetrics`, + () => [...new Array(this.numVertOriginYMetrics)].map( + (_) => new VertOriginYMetric(p22) + ) + ); + } +}; +var VertOriginYMetric = class { + constructor(p22) { + this.glyphIndex = p22.uint16; + this.vertOriginY = p22.int16; + } +}; +var VORG$1 = Object.freeze({ __proto__: null, VORG }); +var BitmapSize = class { + constructor(p22) { + this.indexSubTableArrayOffset = p22.Offset32; + this.indexTablesSize = p22.uint32; + this.numberofIndexSubTables = p22.uint32; + this.colorRef = p22.uint32; + this.hori = new SbitLineMetrics(p22); + this.vert = new SbitLineMetrics(p22); + this.startGlyphIndex = p22.uint16; + this.endGlyphIndex = p22.uint16; + this.ppemX = p22.uint8; + this.ppemY = p22.uint8; + this.bitDepth = p22.uint8; + this.flags = p22.int8; + } +}; +var BitmapScale = class { + constructor(p22) { + this.hori = new SbitLineMetrics(p22); + this.vert = new SbitLineMetrics(p22); + this.ppemX = p22.uint8; + this.ppemY = p22.uint8; + this.substitutePpemX = p22.uint8; + this.substitutePpemY = p22.uint8; + } +}; +var SbitLineMetrics = class { + constructor(p22) { + this.ascender = p22.int8; + this.descender = p22.int8; + this.widthMax = p22.uint8; + this.caretSlopeNumerator = p22.int8; + this.caretSlopeDenominator = p22.int8; + this.caretOffset = p22.int8; + this.minOriginSB = p22.int8; + this.minAdvanceSB = p22.int8; + this.maxBeforeBL = p22.int8; + this.minAfterBL = p22.int8; + this.pad1 = p22.int8; + this.pad2 = p22.int8; + } +}; +var EBLC = class extends SimpleTable { + constructor(dict, dataview, name2) { + const { p: p22 } = super(dict, dataview, name2); + this.majorVersion = p22.uint16; + this.minorVersion = p22.uint16; + this.numSizes = p22.uint32; + lazy$1( + this, + `bitMapSizes`, + () => [...new Array(this.numSizes)].map( + (_) => new BitmapSize(p22) + ) + ); + } +}; +var EBLC$1 = Object.freeze({ __proto__: null, EBLC }); +var EBDT = class extends SimpleTable { + constructor(dict, dataview, name2) { + const { p: p22 } = super(dict, dataview, name2); + this.majorVersion = p22.uint16; + this.minorVersion = p22.uint16; + } +}; +var EBDT$1 = Object.freeze({ __proto__: null, EBDT }); +var EBSC = class extends SimpleTable { + constructor(dict, dataview) { + const { p: p22 } = super(dict, dataview); + this.majorVersion = p22.uint16; + this.minorVersion = p22.uint16; + this.numSizes = p22.uint32; + lazy$1( + this, + `bitmapScales`, + () => [...new Array(this.numSizes)].map( + (_) => new BitmapScale(p22) + ) + ); + } +}; +var EBSC$1 = Object.freeze({ __proto__: null, EBSC }); +var CBLC = class extends EBLC { + constructor(dict, dataview) { + super(dict, dataview, `CBLC`); + } +}; +var CBLC$1 = Object.freeze({ __proto__: null, CBLC }); +var CBDT = class extends EBDT { + constructor(dict, dataview) { + super(dict, dataview, `CBDT`); + } +}; +var CBDT$1 = Object.freeze({ __proto__: null, CBDT }); +var sbix = class extends SimpleTable { + constructor(dict, dataview) { + const { p: p22 } = super(dict, dataview); + this.version = p22.uint16; + this.flags = p22.flags(16); + this.numStrikes = p22.uint32; + lazy$1( + this, + `strikeOffsets`, + () => [...new Array(this.numStrikes)].map((_) => p22.Offset32) + ); + } +}; +var sbix$1 = Object.freeze({ __proto__: null, sbix }); +var COLR = class extends SimpleTable { + constructor(dict, dataview) { + const { p: p22 } = super(dict, dataview); + this.version = p22.uint16; + this.numBaseGlyphRecords = p22.uint16; + this.baseGlyphRecordsOffset = p22.Offset32; + this.layerRecordsOffset = p22.Offset32; + this.numLayerRecords = p22.uint16; + } + getBaseGlyphRecord(glyphID) { + let start = this.tableStart + this.baseGlyphRecordsOffset; + this.parser.currentPosition = start; + let first = new BaseGlyphRecord(this.parser); + let firstID = first.gID; + let end = this.tableStart + this.layerRecordsOffset - 6; + this.parser.currentPosition = end; + let last = new BaseGlyphRecord(this.parser); + let lastID = last.gID; + if (firstID === glyphID) return first; + if (lastID === glyphID) return last; + while (true) { + if (start === end) break; + let mid = start + (end - start) / 12; + this.parser.currentPosition = mid; + let middle = new BaseGlyphRecord(this.parser); + let midID = middle.gID; + if (midID === glyphID) return middle; + else if (midID > glyphID) { + end = mid; + } else if (midID < glyphID) { + start = mid; + } + } + return false; + } + getLayers(glyphID) { + let record = this.getBaseGlyphRecord(glyphID); + this.parser.currentPosition = this.tableStart + this.layerRecordsOffset + 4 * record.firstLayerIndex; + return [...new Array(record.numLayers)].map( + (_) => new LayerRecord(p) + ); + } +}; +var BaseGlyphRecord = class { + constructor(p22) { + this.gID = p22.uint16; + this.firstLayerIndex = p22.uint16; + this.numLayers = p22.uint16; + } +}; +var LayerRecord = class { + constructor(p22) { + this.gID = p22.uint16; + this.paletteIndex = p22.uint16; + } +}; +var COLR$1 = Object.freeze({ __proto__: null, COLR }); +var CPAL = class extends SimpleTable { + constructor(dict, dataview) { + const { p: p22 } = super(dict, dataview); + this.version = p22.uint16; + this.numPaletteEntries = p22.uint16; + const numPalettes = this.numPalettes = p22.uint16; + this.numColorRecords = p22.uint16; + this.offsetFirstColorRecord = p22.Offset32; + this.colorRecordIndices = [...new Array(this.numPalettes)].map( + (_) => p22.uint16 + ); + lazy$1(this, `colorRecords`, () => { + p22.currentPosition = this.tableStart + this.offsetFirstColorRecord; + return [...new Array(this.numColorRecords)].map( + (_) => new ColorRecord(p22) + ); + }); + if (this.version === 1) { + this.offsetPaletteTypeArray = p22.Offset32; + this.offsetPaletteLabelArray = p22.Offset32; + this.offsetPaletteEntryLabelArray = p22.Offset32; + lazy$1(this, `paletteTypeArray`, () => { + p22.currentPosition = this.tableStart + this.offsetPaletteTypeArray; + return new PaletteTypeArray(p22, numPalettes); + }); + lazy$1(this, `paletteLabelArray`, () => { + p22.currentPosition = this.tableStart + this.offsetPaletteLabelArray; + return new PaletteLabelsArray(p22, numPalettes); + }); + lazy$1(this, `paletteEntryLabelArray`, () => { + p22.currentPosition = this.tableStart + this.offsetPaletteEntryLabelArray; + return new PaletteEntryLabelArray(p22, numPalettes); + }); + } + } +}; +var ColorRecord = class { + constructor(p22) { + this.blue = p22.uint8; + this.green = p22.uint8; + this.red = p22.uint8; + this.alpha = p22.uint8; + } +}; +var PaletteTypeArray = class { + constructor(p22, numPalettes) { + this.paletteTypes = [...new Array(numPalettes)].map( + (_) => p22.uint32 + ); + } +}; +var PaletteLabelsArray = class { + constructor(p22, numPalettes) { + this.paletteLabels = [...new Array(numPalettes)].map( + (_) => p22.uint16 + ); + } +}; +var PaletteEntryLabelArray = class { + constructor(p22, numPalettes) { + this.paletteEntryLabels = [...new Array(numPalettes)].map( + (_) => p22.uint16 + ); + } +}; +var CPAL$1 = Object.freeze({ __proto__: null, CPAL }); +var DSIG = class extends SimpleTable { + constructor(dict, dataview) { + const { p: p22 } = super(dict, dataview); + this.version = p22.uint32; + this.numSignatures = p22.uint16; + this.flags = p22.uint16; + this.signatureRecords = [...new Array(this.numSignatures)].map( + (_) => new SignatureRecord(p22) + ); + } + getData(signatureID) { + const record = this.signatureRecords[signatureID]; + this.parser.currentPosition = this.tableStart + record.offset; + return new SignatureBlockFormat1(this.parser); + } +}; +var SignatureRecord = class { + constructor(p22) { + this.format = p22.uint32; + this.length = p22.uint32; + this.offset = p22.Offset32; + } +}; +var SignatureBlockFormat1 = class { + constructor(p22) { + p22.uint16; + p22.uint16; + this.signatureLength = p22.uint32; + this.signature = p22.readBytes(this.signatureLength); + } +}; +var DSIG$1 = Object.freeze({ __proto__: null, DSIG }); +var hdmx = class extends SimpleTable { + constructor(dict, dataview, tables) { + const { p: p22 } = super(dict, dataview); + const numGlyphs = tables.hmtx.numGlyphs; + this.version = p22.uint16; + this.numRecords = p22.int16; + this.sizeDeviceRecord = p22.int32; + this.records = [...new Array(numRecords)].map( + (_) => new DeviceRecord(p22, numGlyphs) + ); + } +}; +var DeviceRecord = class { + constructor(p22, numGlyphs) { + this.pixelSize = p22.uint8; + this.maxWidth = p22.uint8; + this.widths = p22.readBytes(numGlyphs); + } +}; +var hdmx$1 = Object.freeze({ __proto__: null, hdmx }); +var kern = class extends SimpleTable { + constructor(dict, dataview) { + const { p: p22 } = super(dict, dataview); + this.version = p22.uint16; + this.nTables = p22.uint16; + lazy$1(this, `tables`, () => { + let offset = this.tableStart + 4; + const tables = []; + for (let i2 = 0; i2 < this.nTables; i2++) { + p22.currentPosition = offset; + let subtable = new KernSubTable(p22); + tables.push(subtable); + offset += subtable; + } + return tables; + }); + } +}; +var KernSubTable = class { + constructor(p22) { + this.version = p22.uint16; + this.length = p22.uint16; + this.coverage = p22.flags(8); + this.format = p22.uint8; + if (this.format === 0) { + this.nPairs = p22.uint16; + this.searchRange = p22.uint16; + this.entrySelector = p22.uint16; + this.rangeShift = p22.uint16; + lazy$1( + this, + `pairs`, + () => [...new Array(this.nPairs)].map((_) => new Pair(p22)) + ); + } + if (this.format === 2) { + console.warn( + `Kern subtable format 2 is not supported: this parser currently only parses universal table data.` + ); + } + } + get horizontal() { + return this.coverage[0]; + } + get minimum() { + return this.coverage[1]; + } + get crossstream() { + return this.coverage[2]; + } + get override() { + return this.coverage[3]; + } +}; +var Pair = class { + constructor(p22) { + this.left = p22.uint16; + this.right = p22.uint16; + this.value = p22.fword; + } +}; +var kern$1 = Object.freeze({ __proto__: null, kern }); +var LTSH = class extends SimpleTable { + constructor(dict, dataview) { + const { p: p22 } = super(dict, dataview); + this.version = p22.uint16; + this.numGlyphs = p22.uint16; + this.yPels = p22.readBytes(this.numGlyphs); + } +}; +var LTSH$1 = Object.freeze({ __proto__: null, LTSH }); +var MERG = class extends SimpleTable { + constructor(dict, dataview) { + const { p: p22 } = super(dict, dataview); + this.version = p22.uint16; + this.mergeClassCount = p22.uint16; + this.mergeDataOffset = p22.Offset16; + this.classDefCount = p22.uint16; + this.offsetToClassDefOffsets = p22.Offset16; + lazy$1( + this, + `mergeEntryMatrix`, + () => [...new Array(this.mergeClassCount)].map( + (_) => p22.readBytes(this.mergeClassCount) + ) + ); + console.warn(`Full MERG parsing is currently not supported.`); + console.warn( + `If you need this table parsed, please file an issue, or better yet, a PR.` + ); + } +}; +var MERG$1 = Object.freeze({ __proto__: null, MERG }); +var meta = class extends SimpleTable { + constructor(dict, dataview) { + const { p: p22 } = super(dict, dataview); + this.version = p22.uint32; + this.flags = p22.uint32; + p22.uint32; + this.dataMapsCount = p22.uint32; + this.dataMaps = [...new Array(this.dataMapsCount)].map( + (_) => new DataMap(this.tableStart, p22) + ); + } +}; +var DataMap = class { + constructor(tableStart, p22) { + this.tableStart = tableStart; + this.parser = p22; + this.tag = p22.tag; + this.dataOffset = p22.Offset32; + this.dataLength = p22.uint32; + } + getData() { + this.parser.currentField = this.tableStart + this.dataOffset; + return this.parser.readBytes(this.dataLength); + } +}; +var meta$1 = Object.freeze({ __proto__: null, meta }); +var PCLT = class extends SimpleTable { + constructor(dict, dataview) { + super(dict, dataview); + console.warn( + `This font uses a PCLT table, which is currently not supported by this parser.` + ); + console.warn( + `If you need this table parsed, please file an issue, or better yet, a PR.` + ); + } +}; +var PCLT$1 = Object.freeze({ __proto__: null, PCLT }); +var VDMX = class extends SimpleTable { + constructor(dict, dataview) { + const { p: p22 } = super(dict, dataview); + this.version = p22.uint16; + this.numRecs = p22.uint16; + this.numRatios = p22.uint16; + this.ratRanges = [...new Array(this.numRatios)].map( + (_) => new RatioRange(p22) + ); + this.offsets = [...new Array(this.numRatios)].map( + (_) => p22.Offset16 + ); + this.VDMXGroups = [...new Array(this.numRecs)].map( + (_) => new VDMXGroup(p22) + ); + } +}; +var RatioRange = class { + constructor(p22) { + this.bCharSet = p22.uint8; + this.xRatio = p22.uint8; + this.yStartRatio = p22.uint8; + this.yEndRatio = p22.uint8; + } +}; +var VDMXGroup = class { + constructor(p22) { + this.recs = p22.uint16; + this.startsz = p22.uint8; + this.endsz = p22.uint8; + this.records = [...new Array(this.recs)].map( + (_) => new vTable(p22) + ); + } +}; +var vTable = class { + constructor(p22) { + this.yPelHeight = p22.uint16; + this.yMax = p22.int16; + this.yMin = p22.int16; + } +}; +var VDMX$1 = Object.freeze({ __proto__: null, VDMX }); +var vhea = class extends SimpleTable { + constructor(dict, dataview) { + const { p: p22 } = super(dict, dataview); + this.version = p22.fixed; + this.ascent = this.vertTypoAscender = p22.int16; + this.descent = this.vertTypoDescender = p22.int16; + this.lineGap = this.vertTypoLineGap = p22.int16; + this.advanceHeightMax = p22.int16; + this.minTopSideBearing = p22.int16; + this.minBottomSideBearing = p22.int16; + this.yMaxExtent = p22.int16; + this.caretSlopeRise = p22.int16; + this.caretSlopeRun = p22.int16; + this.caretOffset = p22.int16; + this.reserved = p22.int16; + this.reserved = p22.int16; + this.reserved = p22.int16; + this.reserved = p22.int16; + this.metricDataFormat = p22.int16; + this.numOfLongVerMetrics = p22.uint16; + p22.verifyLength(); + } +}; +var vhea$1 = Object.freeze({ __proto__: null, vhea }); +var vmtx = class extends SimpleTable { + constructor(dict, dataview, tables) { + super(dict, dataview); + const numOfLongVerMetrics = tables.vhea.numOfLongVerMetrics; + const numGlyphs = tables.maxp.numGlyphs; + const metricsStart = p.currentPosition; + lazy(this, `vMetrics`, () => { + p.currentPosition = metricsStart; + return [...new Array(numOfLongVerMetrics)].map( + (_) => new LongVertMetric(p.uint16, p.int16) + ); + }); + if (numOfLongVerMetrics < numGlyphs) { + const tsbStart = metricsStart + numOfLongVerMetrics * 4; + lazy(this, `topSideBearings`, () => { + p.currentPosition = tsbStart; + return [...new Array(numGlyphs - numOfLongVerMetrics)].map( + (_) => p.int16 + ); + }); + } + } +}; +var LongVertMetric = class { + constructor(h2, b2) { + this.advanceHeight = h2; + this.topSideBearing = b2; + } +}; +var vmtx$1 = Object.freeze({ __proto__: null, vmtx }); + +// packages/global-styles-ui/build-module/font-library/utils/make-families-from-faces.mjs +var import_components28 = __toESM(require_components(), 1); +var { kebabCase: kebabCase2 } = unlock(import_components28.privateApis); +function makeFamiliesFromFaces(fontFaces) { + const fontFamiliesObject = fontFaces.reduce( + (acc, item) => { + if (!acc[item.fontFamily]) { + acc[item.fontFamily] = { + name: item.fontFamily, + fontFamily: item.fontFamily, + slug: kebabCase2(item.fontFamily.toLowerCase()), + fontFace: [] + }; + } + acc[item.fontFamily].fontFace.push(item); + return acc; + }, + {} + ); + return Object.values(fontFamiliesObject); +} + +// packages/global-styles-ui/build-module/font-library/upload-fonts.mjs +var import_jsx_runtime37 = __toESM(require_jsx_runtime(), 1); +function UploadFonts() { + const { installFonts } = (0, import_element19.useContext)(FontLibraryContext); + const [isUploading, setIsUploading] = (0, import_element19.useState)(false); + const [notice, setNotice] = (0, import_element19.useState)(null); + const handleDropZone = (files) => { + handleFilesUpload(files); + }; + const onFilesUpload = (event) => { + handleFilesUpload(event.target.files); + }; + const handleFilesUpload = async (files) => { + if (!files) { + return; + } + setNotice(null); + setIsUploading(true); + const uniqueFilenames = /* @__PURE__ */ new Set(); + const selectedFiles = [...files]; + let hasInvalidFiles = false; + const checkFilesPromises = selectedFiles.map(async (file) => { + const isFont = await isFontFile(file); + if (!isFont) { + hasInvalidFiles = true; + return null; + } + if (uniqueFilenames.has(file.name)) { + return null; + } + const fileExtension = (((file.name ?? "").split(".") ?? []).pop() ?? "").toLowerCase(); + if (ALLOWED_FILE_EXTENSIONS.includes(fileExtension)) { + uniqueFilenames.add(file.name); + return file; + } + return null; + }); + const allowedFiles = (await Promise.all(checkFilesPromises)).filter((file) => null !== file); + if (allowedFiles.length > 0) { + loadFiles(allowedFiles); + } else { + const message = hasInvalidFiles ? (0, import_i18n16.__)("Sorry, you are not allowed to upload this file type.") : (0, import_i18n16.__)("No fonts found to install."); + setNotice({ + type: "error", + message + }); + setIsUploading(false); + } + }; + const loadFiles = async (files) => { + const fontFacesLoaded = await Promise.all( + files.map(async (fontFile) => { + const fontFaceData = await getFontFaceMetadata(fontFile); + await loadFontFaceInBrowser( + fontFaceData, + fontFaceData.file, + "all" + ); + return fontFaceData; + }) + ); + handleInstall(fontFacesLoaded); + }; + async function isFontFile(file) { + const font2 = new Font("Uploaded Font"); + try { + const buffer = await readFileAsArrayBuffer(file); + await font2.fromDataBuffer(buffer, "font"); + return true; + } catch (error) { + return false; + } + } + async function readFileAsArrayBuffer(file) { + return new Promise((resolve, reject) => { + const reader = new window.FileReader(); + reader.readAsArrayBuffer(file); + reader.onload = () => resolve(reader.result); + reader.onerror = reject; + }); + } + const getFontFaceMetadata = async (fontFile) => { + const buffer = await readFileAsArrayBuffer(fontFile); + const fontObj = new Font("Uploaded Font"); + fontObj.fromDataBuffer(buffer, fontFile.name); + const onloadEvent = await new Promise( + (resolve) => fontObj.onload = resolve + ); + const font2 = onloadEvent.detail.font; + const { name: name2 } = font2.opentype.tables; + const fontName = name2.get(16) || name2.get(1); + const isItalic = name2.get(2).toLowerCase().includes("italic"); + const fontWeight = font2.opentype.tables["OS/2"].usWeightClass || "normal"; + const isVariable = !!font2.opentype.tables.fvar; + const weightAxis = isVariable && font2.opentype.tables.fvar.axes.find( + ({ tag }) => tag === "wght" + ); + const weightRange = weightAxis ? `${weightAxis.minValue} ${weightAxis.maxValue}` : null; + return { + file: fontFile, + fontFamily: fontName, + fontStyle: isItalic ? "italic" : "normal", + fontWeight: weightRange || fontWeight + }; + }; + const handleInstall = async (fontFaces) => { + const fontFamilies = makeFamiliesFromFaces(fontFaces); + try { + await installFonts(fontFamilies); + setNotice({ + type: "success", + message: (0, import_i18n16.__)("Fonts were installed successfully.") + }); + } catch (error) { + const typedError = error; + setNotice({ + type: "error", + message: typedError.message, + errors: typedError?.installationErrors + }); + } + setIsUploading(false); + }; + return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "font-library__tabpanel-layout", children: [ + /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_components29.DropZone, { onFilesDrop: handleDropZone }), + /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_components29.__experimentalVStack, { className: "font-library__local-fonts", justify: "start", children: [ + notice && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)( + import_components29.Notice, + { + status: notice.type, + __unstableHTML: true, + onRemove: () => setNotice(null), + children: [ + notice.message, + notice.errors && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("ul", { children: notice.errors.map((error, index) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("li", { children: error }, index)) }) + ] + } + ), + isUploading && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_components29.FlexItem, { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "font-library__upload-area", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_components29.ProgressBar, {}) }) }), + !isUploading && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)( + import_components29.FormFileUpload, + { + accept: ALLOWED_FILE_EXTENSIONS.map( + (ext) => `.${ext}` + ).join(","), + multiple: true, + onChange: onFilesUpload, + render: ({ openFileDialog }) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)( + import_components29.Button, + { + __next40pxDefaultSize: true, + className: "font-library__upload-area", + onClick: openFileDialog, + children: (0, import_i18n16.__)("Upload font") + } + ) + } + ), + /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_components29.__experimentalText, { className: "font-library__upload-area__text", children: (0, import_i18n16.__)( + "Uploaded fonts appear in your library and can be used in your theme. Supported formats: .ttf, .otf, .woff, and .woff2." + ) }) + ] }) + ] }); +} +var upload_fonts_default = UploadFonts; + +// packages/global-styles-ui/build-module/font-library/modal.mjs +var import_jsx_runtime38 = __toESM(require_jsx_runtime(), 1); +var { Tabs } = unlock(import_components30.privateApis); +var DEFAULT_TAB = { + id: "installed-fonts", + title: (0, import_i18n17._x)("Library", "Font library") +}; +var UPLOAD_TAB = { + id: "upload-fonts", + title: (0, import_i18n17._x)("Upload", "noun") +}; + +// packages/global-styles-ui/build-module/font-family-item.mjs +var import_i18n18 = __toESM(require_i18n(), 1); +var import_components31 = __toESM(require_components(), 1); +var import_element20 = __toESM(require_element(), 1); +var import_jsx_runtime39 = __toESM(require_jsx_runtime(), 1); + +// packages/global-styles-ui/build-module/font-families.mjs +var import_jsx_runtime40 = __toESM(require_jsx_runtime(), 1); + +// packages/global-styles-ui/build-module/font-sizes/font-sizes-count.mjs +var import_i18n20 = __toESM(require_i18n(), 1); +var import_components33 = __toESM(require_components(), 1); +var import_jsx_runtime41 = __toESM(require_jsx_runtime(), 1); + +// packages/global-styles-ui/build-module/screen-typography.mjs +var import_jsx_runtime42 = __toESM(require_jsx_runtime(), 1); + +// packages/global-styles-ui/build-module/screen-typography-element.mjs +var import_i18n22 = __toESM(require_i18n(), 1); +var import_components35 = __toESM(require_components(), 1); +var import_element23 = __toESM(require_element(), 1); + +// packages/global-styles-ui/build-module/typography-panel.mjs +var import_block_editor5 = __toESM(require_block_editor(), 1); +var import_jsx_runtime43 = __toESM(require_jsx_runtime(), 1); +var { useSettingsForBlockElement: useSettingsForBlockElement4, TypographyPanel: StylesTypographyPanel2 } = unlock(import_block_editor5.privateApis); + +// packages/global-styles-ui/build-module/typography-preview.mjs +var import_jsx_runtime44 = __toESM(require_jsx_runtime(), 1); + +// packages/global-styles-ui/build-module/screen-typography-element.mjs +var import_jsx_runtime45 = __toESM(require_jsx_runtime(), 1); +var elements = { + text: { + description: (0, import_i18n22.__)("Manage the fonts used on the site."), + title: (0, import_i18n22.__)("Text") + }, + link: { + description: (0, import_i18n22.__)("Manage the fonts and typography used on the links."), + title: (0, import_i18n22.__)("Links") + }, + heading: { + description: (0, import_i18n22.__)("Manage the fonts and typography used on headings."), + title: (0, import_i18n22.__)("Headings") + }, + caption: { + description: (0, import_i18n22.__)("Manage the fonts and typography used on captions."), + title: (0, import_i18n22.__)("Captions") + }, + button: { + description: (0, import_i18n22.__)("Manage the fonts and typography used on buttons."), + title: (0, import_i18n22.__)("Buttons") + } +}; + +// packages/global-styles-ui/build-module/screen-colors.mjs +var import_i18n24 = __toESM(require_i18n(), 1); +var import_components38 = __toESM(require_components(), 1); +var import_block_editor6 = __toESM(require_block_editor(), 1); + +// packages/global-styles-ui/build-module/palette.mjs +var import_components37 = __toESM(require_components(), 1); +var import_i18n23 = __toESM(require_i18n(), 1); +var import_element24 = __toESM(require_element(), 1); + +// packages/global-styles-ui/build-module/color-indicator-wrapper.mjs +var import_components36 = __toESM(require_components(), 1); +var import_jsx_runtime46 = __toESM(require_jsx_runtime(), 1); + +// packages/global-styles-ui/build-module/palette.mjs +var import_jsx_runtime47 = __toESM(require_jsx_runtime(), 1); + +// packages/global-styles-ui/build-module/screen-colors.mjs +var import_jsx_runtime48 = __toESM(require_jsx_runtime(), 1); +var { useSettingsForBlockElement: useSettingsForBlockElement5, ColorPanel: StylesColorPanel2 } = unlock( + import_block_editor6.privateApis +); + +// packages/global-styles-ui/build-module/screen-color-palette.mjs +var import_i18n27 = __toESM(require_i18n(), 1); +var import_components43 = __toESM(require_components(), 1); + +// packages/global-styles-ui/build-module/color-palette-panel.mjs +var import_compose4 = __toESM(require_compose(), 1); +var import_components41 = __toESM(require_components(), 1); +var import_i18n25 = __toESM(require_i18n(), 1); + +// packages/global-styles-ui/build-module/variations/variations-color.mjs +var import_components40 = __toESM(require_components(), 1); + +// packages/global-styles-ui/build-module/preview-colors.mjs +var import_components39 = __toESM(require_components(), 1); + +// packages/global-styles-ui/build-module/preset-colors.mjs +var import_jsx_runtime49 = __toESM(require_jsx_runtime(), 1); +function PresetColors() { + const { paletteColors } = useStylesPreviewColors(); + return paletteColors.slice(0, 4).map(({ slug, color }, index) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)( + "div", + { + style: { + flexGrow: 1, + height: "100%", + background: color + } + }, + `${slug}-${index}` + )); +} + +// packages/global-styles-ui/build-module/preview-colors.mjs +var import_jsx_runtime50 = __toESM(require_jsx_runtime(), 1); +var firstFrameVariants2 = { + start: { + scale: 1, + opacity: 1 + }, + hover: { + scale: 0, + opacity: 0 + } +}; +var StylesPreviewColors = ({ + label, + isFocused, + withHoverView +}) => { + return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)( + preview_wrapper_default, + { + label, + isFocused, + withHoverView, + children: ({ key }) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)( + import_components39.__unstableMotion.div, + { + variants: firstFrameVariants2, + style: { + height: "100%", + overflow: "hidden" + }, + children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)( + import_components39.__experimentalHStack, + { + spacing: 0, + justify: "center", + style: { + height: "100%", + overflow: "hidden" + }, + children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(PresetColors, {}) + } + ) + }, + key + ) + } + ); +}; +var preview_colors_default = StylesPreviewColors; + +// packages/global-styles-ui/build-module/variations/variations-color.mjs +var import_jsx_runtime51 = __toESM(require_jsx_runtime(), 1); +var propertiesToFilter2 = ["color"]; +function ColorVariations({ + title, + gap = 2 +}) { + const colorVariations = useCurrentMergeThemeStyleVariationsWithUserConfig(propertiesToFilter2); + if (colorVariations?.length <= 1) { + return null; + } + return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_components40.__experimentalVStack, { spacing: 3, children: [ + title && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Subtitle, { level: 3, children: title }), + /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_components40.__experimentalGrid, { gap, children: colorVariations.map((variation, index) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)( + Variation, + { + variation, + isPill: true, + properties: propertiesToFilter2, + showTooltip: true, + children: () => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(preview_colors_default, {}) + }, + index + )) }) + ] }); +} + +// packages/global-styles-ui/build-module/color-palette-panel.mjs +var import_jsx_runtime52 = __toESM(require_jsx_runtime(), 1); + +// packages/global-styles-ui/build-module/gradients-palette-panel.mjs +var import_compose5 = __toESM(require_compose(), 1); +var import_components42 = __toESM(require_components(), 1); +var import_i18n26 = __toESM(require_i18n(), 1); +var import_jsx_runtime53 = __toESM(require_jsx_runtime(), 1); + +// packages/global-styles-ui/build-module/screen-color-palette.mjs +var import_jsx_runtime54 = __toESM(require_jsx_runtime(), 1); +var { Tabs: Tabs2 } = unlock(import_components43.privateApis); + +// packages/global-styles-ui/build-module/screen-background.mjs +var import_i18n28 = __toESM(require_i18n(), 1); +var import_block_editor8 = __toESM(require_block_editor(), 1); +var import_components44 = __toESM(require_components(), 1); + +// packages/global-styles-ui/build-module/background-panel.mjs +var import_block_editor7 = __toESM(require_block_editor(), 1); +var import_jsx_runtime55 = __toESM(require_jsx_runtime(), 1); +var { BackgroundPanel: StylesBackgroundPanel2 } = unlock( + import_block_editor7.privateApis +); + +// packages/global-styles-ui/build-module/screen-background.mjs +var import_jsx_runtime56 = __toESM(require_jsx_runtime(), 1); +var { useHasBackgroundPanel: useHasBackgroundPanel3 } = unlock(import_block_editor8.privateApis); + +// packages/global-styles-ui/build-module/shadows-panel.mjs +var import_components46 = __toESM(require_components(), 1); +var import_i18n30 = __toESM(require_i18n(), 1); +var import_element25 = __toESM(require_element(), 1); + +// packages/global-styles-ui/build-module/confirm-reset-shadow-dialog.mjs +var import_components45 = __toESM(require_components(), 1); +var import_i18n29 = __toESM(require_i18n(), 1); +var import_jsx_runtime57 = __toESM(require_jsx_runtime(), 1); + +// packages/global-styles-ui/build-module/shadows-panel.mjs +var import_jsx_runtime58 = __toESM(require_jsx_runtime(), 1); +var { Menu } = unlock(import_components46.privateApis); + +// packages/global-styles-ui/build-module/shadows-edit-panel.mjs +var import_components47 = __toESM(require_components(), 1); +var import_i18n31 = __toESM(require_i18n(), 1); +var import_element26 = __toESM(require_element(), 1); +var import_jsx_runtime59 = __toESM(require_jsx_runtime(), 1); +var { Menu: Menu2 } = unlock(import_components47.privateApis); +var customShadowMenuItems = [ + { + label: (0, import_i18n31.__)("Rename"), + action: "rename" + }, + { + label: (0, import_i18n31.__)("Delete"), + action: "delete" + } +]; +var presetShadowMenuItems = [ + { + label: (0, import_i18n31.__)("Reset"), + action: "reset" + } +]; + +// packages/global-styles-ui/build-module/screen-shadows.mjs +var import_jsx_runtime60 = __toESM(require_jsx_runtime(), 1); + +// packages/global-styles-ui/build-module/screen-layout.mjs +var import_i18n32 = __toESM(require_i18n(), 1); +var import_block_editor10 = __toESM(require_block_editor(), 1); + +// packages/global-styles-ui/build-module/dimensions-panel.mjs +var import_block_editor9 = __toESM(require_block_editor(), 1); +var import_element27 = __toESM(require_element(), 1); +var import_jsx_runtime61 = __toESM(require_jsx_runtime(), 1); +var { useSettingsForBlockElement: useSettingsForBlockElement6, DimensionsPanel: StylesDimensionsPanel2 } = unlock(import_block_editor9.privateApis); + +// packages/global-styles-ui/build-module/screen-layout.mjs +var import_jsx_runtime62 = __toESM(require_jsx_runtime(), 1); +var { useHasDimensionsPanel: useHasDimensionsPanel4, useSettingsForBlockElement: useSettingsForBlockElement7 } = unlock( + import_block_editor10.privateApis +); + +// packages/global-styles-ui/build-module/screen-style-variations.mjs +var import_components50 = __toESM(require_components(), 1); +var import_i18n35 = __toESM(require_i18n(), 1); + +// packages/global-styles-ui/build-module/style-variations-content.mjs +var import_i18n34 = __toESM(require_i18n(), 1); +var import_components49 = __toESM(require_components(), 1); + +// packages/global-styles-ui/build-module/style-variations-container.mjs +var import_core_data9 = __toESM(require_core_data(), 1); +var import_data9 = __toESM(require_data(), 1); +var import_element28 = __toESM(require_element(), 1); +var import_components48 = __toESM(require_components(), 1); +var import_i18n33 = __toESM(require_i18n(), 1); +var import_jsx_runtime63 = __toESM(require_jsx_runtime(), 1); +function StyleVariationsContainer({ + gap = 2 +}) { + const { user } = (0, import_element28.useContext)(GlobalStylesContext); + const userStyles = user?.styles; + const variations = (0, import_data9.useSelect)((select) => { + const result = select( + import_core_data9.store + ).__experimentalGetCurrentThemeGlobalStylesVariations(); + return Array.isArray(result) ? result : void 0; + }, []); + const fullStyleVariations = variations?.filter( + (variation) => { + return !isVariationWithProperties(variation, ["color"]) && !isVariationWithProperties(variation, [ + "typography", + "spacing" + ]); + } + ); + const themeVariations = (0, import_element28.useMemo)(() => { + const withEmptyVariation = [ + { + title: (0, import_i18n33.__)("Default"), + settings: {}, + styles: {} + }, + ...fullStyleVariations ?? [] + ]; + return [ + ...withEmptyVariation.map((variation) => { + const blockStyles = variation?.styles?.blocks ? { ...variation.styles.blocks } : {}; + if (userStyles?.blocks) { + Object.keys(userStyles.blocks).forEach((blockName) => { + if (userStyles.blocks?.[blockName]?.css) { + const variationBlockStyles = blockStyles[blockName] || {}; + const customCSS = { + css: `${blockStyles[blockName]?.css || ""} ${userStyles.blocks?.[blockName]?.css?.trim() || ""}` + }; + blockStyles[blockName] = { + ...variationBlockStyles, + ...customCSS + }; + } + }); + } + const css = userStyles?.css || variation.styles?.css ? { + css: `${variation.styles?.css || ""} ${userStyles?.css || ""}` + } : {}; + const blocks = Object.keys(blockStyles).length > 0 ? { blocks: blockStyles } : {}; + const styles = { + ...variation.styles, + ...css, + ...blocks + }; + return { + ...variation, + settings: variation.settings ?? {}, + styles + }; + }) + ]; + }, [fullStyleVariations, userStyles?.blocks, userStyles?.css]); + if (!fullStyleVariations || fullStyleVariations.length < 1) { + return null; + } + return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)( + import_components48.__experimentalGrid, + { + columns: 2, + className: "global-styles-ui-style-variations-container", + gap, + children: themeVariations.map( + (variation, index) => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Variation, { variation, children: (isFocused) => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)( + preview_styles_default, + { + label: variation?.title, + withHoverView: true, + isFocused, + variation + } + ) }, index) + ) + } + ); +} +var style_variations_container_default = StyleVariationsContainer; + +// packages/global-styles-ui/build-module/style-variations-content.mjs +var import_jsx_runtime64 = __toESM(require_jsx_runtime(), 1); + +// packages/global-styles-ui/build-module/screen-style-variations.mjs +var import_jsx_runtime65 = __toESM(require_jsx_runtime(), 1); + +// packages/global-styles-ui/build-module/screen-css.mjs +var import_i18n36 = __toESM(require_i18n(), 1); +var import_components51 = __toESM(require_components(), 1); +var import_block_editor11 = __toESM(require_block_editor(), 1); +var import_jsx_runtime66 = __toESM(require_jsx_runtime(), 1); +var { AdvancedPanel: StylesAdvancedPanel2 } = unlock(import_block_editor11.privateApis); + +// packages/global-styles-ui/build-module/screen-revisions/index.mjs +var import_i18n39 = __toESM(require_i18n(), 1); +var import_components54 = __toESM(require_components(), 1); +var import_element30 = __toESM(require_element(), 1); + +// packages/global-styles-ui/build-module/screen-revisions/use-global-styles-revisions.mjs +var import_data10 = __toESM(require_data(), 1); +var import_core_data10 = __toESM(require_core_data(), 1); +var import_element29 = __toESM(require_element(), 1); + +// packages/global-styles-ui/build-module/screen-revisions/revisions-buttons.mjs +var import_i18n37 = __toESM(require_i18n(), 1); +var import_components52 = __toESM(require_components(), 1); +var import_date = __toESM(require_date(), 1); +var import_core_data11 = __toESM(require_core_data(), 1); +var import_data11 = __toESM(require_data(), 1); +var import_keycodes2 = __toESM(require_keycodes(), 1); +var import_jsx_runtime67 = __toESM(require_jsx_runtime(), 1); +var DAY_IN_MILLISECONDS = 60 * 60 * 1e3 * 24; + +// packages/global-styles-ui/build-module/pagination/index.mjs +var import_components53 = __toESM(require_components(), 1); +var import_i18n38 = __toESM(require_i18n(), 1); +var import_jsx_runtime68 = __toESM(require_jsx_runtime(), 1); + +// packages/global-styles-ui/build-module/screen-revisions/index.mjs +var import_jsx_runtime69 = __toESM(require_jsx_runtime(), 1); + +// packages/global-styles-ui/build-module/font-sizes/font-sizes.mjs +var import_i18n41 = __toESM(require_i18n(), 1); +var import_components56 = __toESM(require_components(), 1); +var import_element31 = __toESM(require_element(), 1); + +// packages/global-styles-ui/build-module/font-sizes/confirm-reset-font-sizes-dialog.mjs +var import_components55 = __toESM(require_components(), 1); +var import_i18n40 = __toESM(require_i18n(), 1); +var import_jsx_runtime70 = __toESM(require_jsx_runtime(), 1); + +// packages/global-styles-ui/build-module/font-sizes/font-sizes.mjs +var import_jsx_runtime71 = __toESM(require_jsx_runtime(), 1); +var { Menu: Menu3 } = unlock(import_components56.privateApis); + +// packages/global-styles-ui/build-module/font-sizes/font-size.mjs +var import_i18n45 = __toESM(require_i18n(), 1); +var import_components60 = __toESM(require_components(), 1); +var import_element33 = __toESM(require_element(), 1); + +// packages/global-styles-ui/build-module/font-sizes/font-size-preview.mjs +var import_block_editor12 = __toESM(require_block_editor(), 1); +var import_i18n42 = __toESM(require_i18n(), 1); +var import_jsx_runtime72 = __toESM(require_jsx_runtime(), 1); + +// packages/global-styles-ui/build-module/font-sizes/confirm-delete-font-size-dialog.mjs +var import_components57 = __toESM(require_components(), 1); +var import_i18n43 = __toESM(require_i18n(), 1); +var import_jsx_runtime73 = __toESM(require_jsx_runtime(), 1); + +// packages/global-styles-ui/build-module/font-sizes/rename-font-size-dialog.mjs +var import_components58 = __toESM(require_components(), 1); +var import_i18n44 = __toESM(require_i18n(), 1); +var import_element32 = __toESM(require_element(), 1); +var import_jsx_runtime74 = __toESM(require_jsx_runtime(), 1); + +// packages/global-styles-ui/build-module/size-control/index.mjs +var import_components59 = __toESM(require_components(), 1); +var import_jsx_runtime75 = __toESM(require_jsx_runtime(), 1); + +// packages/global-styles-ui/build-module/font-sizes/font-size.mjs +var import_jsx_runtime76 = __toESM(require_jsx_runtime(), 1); +var { Menu: Menu4 } = unlock(import_components60.privateApis); + +// packages/global-styles-ui/build-module/global-styles-ui.mjs +var import_jsx_runtime77 = __toESM(require_jsx_runtime(), 1); + +// packages/global-styles-ui/build-module/with-global-styles-provider.mjs +var import_jsx_runtime78 = __toESM(require_jsx_runtime(), 1); +function withGlobalStylesProvider(Component) { + return function WrappedComponent({ + value, + baseValue, + onChange, + ...props + }) { + return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)( + GlobalStylesProvider, + { + value, + baseValue, + onChange, + children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Component, { ...props }) + } + ); + }; +} + +// packages/global-styles-ui/build-module/style-variations.mjs +var StyleVariations = withGlobalStylesProvider(style_variations_container_default); + +// packages/global-styles-ui/build-module/color-variations.mjs +var ColorVariations2 = withGlobalStylesProvider(ColorVariations); + +// packages/global-styles-ui/build-module/typography-variations.mjs +var TypographyVariations2 = withGlobalStylesProvider(TypographyVariations); + +// packages/global-styles-ui/build-module/font-library/font-library.mjs +var import_jsx_runtime79 = __toESM(require_jsx_runtime(), 1); +function FontLibrary({ + value, + baseValue, + onChange, + activeTab = "installed-fonts" +}) { + let content; + switch (activeTab) { + case "upload-fonts": + content = /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(upload_fonts_default, {}); + break; + case "installed-fonts": + content = /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(installed_fonts_default, {}); + break; + default: + content = /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(font_collection_default, { slug: activeTab }); + } + return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)( + GlobalStylesProvider, + { + value, + baseValue, + onChange, + children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(context_default, { children: content }) + } + ); +} + +// routes/font-list/lock-unlock.ts +var import_private_apis2 = __toESM(require_private_apis()); +var { unlock: unlock2 } = (0, import_private_apis2.__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/font-list-route" +); + +// routes/font-list/style.scss +if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='89af99528f']")) { + const style = document.createElement("style"); + style.setAttribute("data-wp-hash", "89af99528f"); + style.appendChild(document.createTextNode('@media (min-width:782px){.font-library-modal.font-library-modal{width:65vw}}.font-library-modal .components-modal__header{border-bottom:none}.font-library-modal .components-modal__content{margin-bottom:90px;padding:0}.font-library-modal .font-library__subtitle{font-size:11px;font-weight:499;text-transform:uppercase}.font-library-modal__tab-panel{height:calc(100% - 50px)}.font-library__tabpanel-layout{display:flex;flex-direction:column;height:100%}.font-library__tabpanel-layout>div{flex-grow:1}.font-library__tabpanel-layout .font-library__loading{align-items:center;box-sizing:border-box;display:flex;height:100%;justify-content:center;left:0;padding-top:124px;position:absolute;top:0;width:100%}.font-library__footer,.font-library__tabpanel-layout .components-navigator-screen{padding:24px;width:100%}.font-library__footer{background-color:#fff;border-top:1px solid #ddd;bottom:0;box-sizing:border-box;flex-grow:0!important;flex-shrink:0;height:90px;position:absolute}.font-library__page-selection{font-size:11px;font-weight:499;text-transform:uppercase}@media (min-width:600px){.font-library__page-selection .font-library__page-selection-trigger{font-size:11px!important;font-weight:499}}.font-library__fonts-title{font-size:11px;font-weight:600;margin-bottom:0;margin-top:0;text-transform:uppercase}.font-library__fonts-list{list-style:none;margin-bottom:0;margin-top:0;padding:0}.font-library__fonts-list-item{margin-bottom:0}.font-library__font-card{border:1px solid #ddd;box-sizing:border-box;height:auto!important;margin-top:-1px;padding:16px;width:100%}.font-library__font-card:hover{background-color:#f0f0f0}.font-library__font-card:focus{position:relative}.font-library__font-card .font-library__font-card__name{font-weight:700}.font-library__font-card .font-library__font-card__count{color:#757575}.font-library__font-card .font-library__font-variant_demo-image{display:block;height:24px;width:auto}.font-library__font-card .font-library__font-variant_demo-text{flex-shrink:0;white-space:nowrap}@media not (prefers-reduced-motion){.font-library__font-card .font-library__font-variant_demo-text{transition:opacity .3s ease-in-out}}.font-library-modal__tablist-container{background:#fff;border-bottom:1px solid #ddd;position:sticky;top:0;z-index:1}.font-library__upload-area{align-items:center;display:flex;height:256px!important;justify-content:center;width:100%}button.font-library__upload-area{background-color:#f0f0f0}.font-library__local-fonts{margin:24px auto;width:80%}.font-library__local-fonts .font-library__upload-area__text{color:#757575}.font-library__google-fonts-confirm{align-items:center;display:flex;justify-content:center;margin-top:64px}.font-library__google-fonts-confirm p{line-height:1.4}.font-library__google-fonts-confirm h2{font-size:1.2rem;font-weight:400}.font-library__google-fonts-confirm .components-card{padding:16px;width:400px}.font-library__google-fonts-confirm .components-button{justify-content:center;width:100%}.font-library__select-all{padding:16px 16px 16px 17px}.font-library__select-all .components-checkbox-control__label{padding-left:16px}.global-styles-ui-pagination .components-button.is-tertiary{height:32px;justify-content:center;width:32px}.global-styles-ui-screen-revisions__revisions-list{flex-grow:1;list-style:none;margin:0 16px 16px}.global-styles-ui-screen-revisions__revisions-list li{margin-bottom:0}.global-styles-ui-screen-revisions__revision-item{cursor:pointer;display:flex;flex-direction:column;position:relative}.global-styles-ui-screen-revisions__revision-item[role=option]:active,.global-styles-ui-screen-revisions__revision-item[role=option]:focus{box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:2px solid #0000}.global-styles-ui-screen-revisions__revision-item:hover{background:rgba(var(--wp-admin-theme-color--rgb),.04)}.global-styles-ui-screen-revisions__revision-item:hover .global-styles-ui-screen-revisions__date{color:var(--wp-admin-theme-color)}.global-styles-ui-screen-revisions__revision-item:after,.global-styles-ui-screen-revisions__revision-item:before{content:"\\a";display:block;position:absolute}.global-styles-ui-screen-revisions__revision-item:before{background:#ddd;border:4px solid #0000;border-radius:50%;height:8px;left:17px;top:18px;transform:translate(-50%,-50%);width:8px;z-index:1}.global-styles-ui-screen-revisions__revision-item[aria-selected=true]{background:rgba(var(--wp-admin-theme-color--rgb),.04);border-radius:2px;color:var(--wp-admin-theme-color);outline:3px solid #0000;outline-offset:-2px}.global-styles-ui-screen-revisions__revision-item[aria-selected=true] .global-styles-ui-screen-revisions__date{color:var(--wp-admin-theme-color)}.global-styles-ui-screen-revisions__revision-item[aria-selected=true]:before{background:var(--wp-admin-theme-color)}.global-styles-ui-screen-revisions__revision-item[aria-selected=true] .global-styles-ui-screen-revisions__applied-text,.global-styles-ui-screen-revisions__revision-item[aria-selected=true] .global-styles-ui-screen-revisions__changes>li,.global-styles-ui-screen-revisions__revision-item[aria-selected=true] .global-styles-ui-screen-revisions__meta{color:#1e1e1e}.global-styles-ui-screen-revisions__revision-item:after{border:.5px solid #ddd;height:100%;left:16px;top:0;width:0}.global-styles-ui-screen-revisions__revision-item:first-child:after{top:18px}.global-styles-ui-screen-revisions__revision-item:last-child:after{height:18px}.global-styles-ui-screen-revisions__revision-item-wrapper{display:block;padding:12px 12px 4px 40px}.global-styles-ui-screen-revisions__applied-text,.global-styles-ui-screen-revisions__apply-button.is-primary{align-self:flex-start;margin:4px 12px 12px 40px}.global-styles-ui-screen-revisions__applied-text,.global-styles-ui-screen-revisions__changes,.global-styles-ui-screen-revisions__meta{color:#757575;font-size:12px}.global-styles-ui-screen-revisions__description{align-items:flex-start;display:flex;flex-direction:column;gap:8px}.global-styles-ui-screen-revisions__description .global-styles-ui-screen-revisions__date{font-size:12px;font-weight:600;text-transform:uppercase}.global-styles-ui-screen-revisions__meta{align-items:flex-start;display:flex;justify-content:start;margin-bottom:4px;text-align:left;width:100%}.global-styles-ui-screen-revisions__meta img{border-radius:100%;height:16px;margin-right:8px;width:16px}.global-styles-ui-screen-revisions__loading{margin:24px auto!important}.global-styles-ui-screen-revisions__changes{line-height:1.4;list-style:disc;margin-left:12px;text-align:left}.global-styles-ui-screen-revisions__changes li{margin-bottom:4px}.global-styles-ui-screen-revisions__pagination.global-styles-ui-screen-revisions__pagination{gap:2px;justify-content:space-between}.global-styles-ui-screen-revisions__pagination.global-styles-ui-screen-revisions__pagination .edit-site-pagination__total{height:1px;left:-1000px;margin:-1px;overflow:hidden;position:absolute}.global-styles-ui-screen-revisions__pagination.global-styles-ui-screen-revisions__pagination .components-text{font-size:12px;will-change:opacity}.global-styles-ui-screen-revisions__pagination.global-styles-ui-screen-revisions__pagination .components-button.is-tertiary{color:#1e1e1e}.global-styles-ui-screen-revisions__pagination.global-styles-ui-screen-revisions__pagination .components-button.is-tertiary:disabled,.global-styles-ui-screen-revisions__pagination.global-styles-ui-screen-revisions__pagination .components-button.is-tertiary[aria-disabled=true]{color:#949494}.global-styles-ui-screen-revisions__footer{background:#fff;border-top:1px solid #ddd;bottom:0;height:56px;min-width:100%;padding:12px;position:sticky;z-index:1}.global-styles-ui-variations_item{box-sizing:border-box;cursor:pointer}.global-styles-ui-variations_item .global-styles-ui-variations_item-preview{border-radius:2px;outline:1px solid #0000001a;outline-offset:-1px;overflow:hidden;position:relative}@media not (prefers-reduced-motion){.global-styles-ui-variations_item .global-styles-ui-variations_item-preview{transition:outline .1s linear}}.global-styles-ui-variations_item .global-styles-ui-variations_item-preview.is-pill{height:32px}.global-styles-ui-variations_item .global-styles-ui-variations_item-preview.is-pill .block-editor-iframe__scale-container{overflow:hidden}.global-styles-ui-variations_item:not(.is-active):hover .global-styles-ui-variations_item-preview{outline-color:#0000004d}.global-styles-ui-variations_item.is-active .global-styles-ui-variations_item-preview,.global-styles-ui-variations_item:focus-visible .global-styles-ui-variations_item-preview{outline-color:#1e1e1e;outline-offset:1px;outline-width:var(--wp-admin-border-width-focus)}.global-styles-ui-variations_item:focus-visible .global-styles-ui-variations_item-preview{outline-color:var(--wp-admin-theme-color)}.global-styles-ui-preview{align-items:center;cursor:pointer;display:flex;justify-content:center;line-height:1}.global-styles-ui-preview__wrapper{display:block;max-width:100%;width:100%}.global-styles-ui-typography-preview{align-items:center;background:#f0f0f0;border-radius:2px;display:flex;justify-content:center;margin-bottom:20px;min-height:100px;overflow:hidden}.global-styles-ui-font-size__item{line-break:anywhere;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.global-styles-ui-font-size__item-value{color:#757575}.global-styles-ui-screen-typography__indicator{align-items:center;border-radius:2px;display:flex!important;font-size:14px;height:24px;justify-content:center;width:24px}.global-styles-ui-block-types-search{margin-bottom:10px;padding:0 16px}.global-styles-ui-screen-typography__font-variants-count{color:#757575}.global-styles-ui-font-families__manage-fonts{justify-content:center}.global-styles-ui-screen .color-block-support-panel{border-top:none;padding-left:0;padding-right:0;padding-top:0;row-gap:12px}.global-styles-ui-header{margin-bottom:0!important}.global-styles-ui-subtitle{font-size:11px!important;font-weight:499!important;margin-bottom:0!important;text-transform:uppercase}.global-styles-ui-section-title{color:#2f2f2f;font-weight:600;line-height:1.2;margin:0;padding:16px 16px 0}.global-styles-ui-icon-with-current-color{fill:currentColor}.global-styles-ui__color-indicator-wrapper{flex-shrink:0;height:24px}.global-styles-ui__shadows-panel__options-container,.global-styles-ui__typography-panel__options-container{height:24px}.global-styles-ui__block-preview-panel{border:1px solid #ddd;border-radius:2px;overflow:hidden;position:relative;width:100%}.global-styles-ui__shadow-preview-panel{background-image:repeating-linear-gradient(45deg,#e0e0e0 25%,#0000 0,#0000 75%,#e0e0e0 0,#e0e0e0),repeating-linear-gradient(45deg,#e0e0e0 25%,#0000 0,#0000 75%,#e0e0e0 0,#e0e0e0);background-position:0 0,8px 8px;background-size:16px 16px;border:1px solid #ddd;border-radius:2px;height:144px;overflow:auto}.global-styles-ui__shadow-preview-panel .global-styles-ui__shadow-preview-block{background-color:#fff;border:1px solid #ddd;border-radius:2px;height:60px;width:60%}.global-styles-ui__shadow-editor__dropdown-content{width:280px}.global-styles-ui__shadow-editor-panel{margin-bottom:4px}.global-styles-ui__shadow-editor__dropdown{position:relative;width:100%}.global-styles-ui__shadow-editor__dropdown-toggle{border-radius:inherit;height:auto;padding-bottom:8px;padding-top:8px;text-align:left;width:100%}.global-styles-ui__shadow-editor__dropdown-toggle.is-open{background:#f0f0f0;color:var(--wp-admin-theme-color)}.global-styles-ui__shadow-editor__remove-button{opacity:0;position:absolute;right:8px;top:8px}.global-styles-ui__shadow-editor__remove-button.global-styles-ui__shadow-editor__remove-button{border:none}.global-styles-ui__shadow-editor__dropdown-toggle:hover+.global-styles-ui__shadow-editor__remove-button,.global-styles-ui__shadow-editor__remove-button:focus,.global-styles-ui__shadow-editor__remove-button:hover{opacity:1}@media (hover:none){.global-styles-ui__shadow-editor__remove-button{opacity:1}}.global-styles-ui-screen-css{display:flex;flex:1 1 auto;flex-direction:column;margin:16px}.global-styles-ui-screen-css .components-v-stack{flex:1 1 auto}.global-styles-ui-screen-css .components-v-stack .block-editor-global-styles-advanced-panel__custom-css-input,.global-styles-ui-screen-css .components-v-stack .block-editor-global-styles-advanced-panel__custom-css-input .components-base-control__field{display:flex;flex:1 1 auto;flex-direction:column}.global-styles-ui-screen-css .components-v-stack .block-editor-global-styles-advanced-panel__custom-css-input .components-base-control__field .components-textarea-control__input{direction:ltr;flex:1 1 auto}.global-styles-ui-screen-css-help-link{display:inline-block;margin-top:8px}.global-styles-ui-screen-variations{border-top:1px solid #ddd;margin-top:16px}.global-styles-ui-screen-variations>*{margin:24px 16px}.global-styles-ui-sidebar__navigator-provider{height:100%}.global-styles-ui-sidebar__navigator-screen{display:flex;flex-direction:column;height:100%}.global-styles-ui-sidebar__navigator-screen .single-column{grid-column:span 1}.global-styles-ui-screen-root.global-styles-ui-screen-root,.global-styles-ui-screen-style-variations.global-styles-ui-screen-style-variations{background:unset;color:inherit}.global-styles-ui-sidebar__panel .block-editor-block-icon svg{fill:currentColor}.global-styles-ui-screen-root__active-style-tile.global-styles-ui-screen-root__active-style-tile,.global-styles-ui-screen-root__active-style-tile.global-styles-ui-screen-root__active-style-tile .global-styles-ui-screen-root__active-style-tile-preview{border-radius:2px}.global-styles-ui-screen-root__active-style-tile-preview{clip-path:border-box}.global-styles-ui-color-palette-panel,.global-styles-ui-gradient-palette-panel{padding:16px}.font-library-page__tablist{border-bottom:1px solid #f0f0f0;padding:0 24px}.font-library-page__tab-panel{flex-grow:1;max-height:calc(100% - 110px);overflow:auto}.admin-ui-page:has(.font-library__footer) .font-library-page__tab-panel{max-height:calc(100% - 198px)}')); + document.head.appendChild(style); +} + +// routes/font-list/stage.tsx +var { Tabs: Tabs3 } = unlock2(import_components62.privateApis); +var { useGlobalStyles } = unlock2(import_editor.privateApis); +function FontLibraryPage() { + const { records: collections = [] } = (0, import_core_data12.useEntityRecords)("root", "fontCollection", { + _fields: "slug,name,description" + }); + const [activeTab, setActiveTab] = (0, import_element35.useState)("installed-fonts"); + const { base, user, setUser, isReady } = useGlobalStyles(); + const canUserCreate = (0, import_data13.useSelect)((select) => { + return select(import_core_data12.store).canUser("create", { + kind: "postType", + name: "wp_font_family" + }); + }, []); + if (!isReady) { + return null; + } + const tabs = [ + { + id: "installed-fonts", + title: (0, import_i18n46.__)("Library") + } + ]; + if (canUserCreate) { + tabs.push({ + id: "upload-fonts", + title: (0, import_i18n46.__)("Upload") + }); + tabs.push( + ...(collections || []).map(({ slug, name: name2 }) => ({ + id: slug, + title: collections && collections.length === 1 && slug === "google-fonts" ? (0, import_i18n46.__)("Install Fonts") : name2 + })) + ); + } + return /* @__PURE__ */ React.createElement(page_default, { title: (0, import_i18n46.__)("Fonts") }, /* @__PURE__ */ React.createElement( + Tabs3, + { + selectedTabId: activeTab, + onSelect: (tabId) => setActiveTab(tabId) + }, + /* @__PURE__ */ React.createElement("div", { className: "font-library-page__tablist" }, /* @__PURE__ */ React.createElement(Tabs3.TabList, null, tabs.map(({ id, title }) => /* @__PURE__ */ React.createElement(Tabs3.Tab, { key: id, tabId: id }, title)))), + tabs.map(({ id }) => /* @__PURE__ */ React.createElement( + Tabs3.TabPanel, + { + key: id, + tabId: id, + focusable: false, + className: "font-library-page__tab-panel" + }, + /* @__PURE__ */ React.createElement( + FontLibrary, + { + value: user, + baseValue: base, + onChange: setUser, + activeTab: id + } + ) + )) + )); +} +function Stage() { + return /* @__PURE__ */ React.createElement(FontLibraryPage, null); +} +var stage = Stage; +export { + stage +}; +/*! Bundled license information: + +is-plain-object/dist/is-plain-object.mjs: + (*! + * is-plain-object + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + *) +*/ diff --git a/src/wp-includes/build/routes/font-list/content.min.asset.php b/src/wp-includes/build/routes/font-list/content.min.asset.php new file mode 100644 index 0000000000000..960493b0a9953 --- /dev/null +++ b/src/wp-includes/build/routes/font-list/content.min.asset.php @@ -0,0 +1 @@ + array('react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-editor', 'wp-element', 'wp-i18n', 'wp-keycodes', 'wp-primitives', 'wp-private-apis', 'wp-style-engine', 'wp-theme'), 'module_dependencies' => array(array('id' => '@wordpress/a11y', 'import' => 'static'), array('id' => '@wordpress/route', 'import' => 'static')), 'version' => 'a3428f105aa265b2e8dc'); \ No newline at end of file diff --git a/src/wp-includes/build/routes/font-list/content.min.js b/src/wp-includes/build/routes/font-list/content.min.js new file mode 100644 index 0000000000000..85179044b73e0 --- /dev/null +++ b/src/wp-includes/build/routes/font-list/content.min.js @@ -0,0 +1,19 @@ +var Xu=Object.create;var ra=Object.defineProperty;var Ku=Object.getOwnPropertyDescriptor;var Ju=Object.getOwnPropertyNames;var Qu=Object.getPrototypeOf,$u=Object.prototype.hasOwnProperty;var ue=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var Ht=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var tf=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Ju(e))!$u.call(t,s)&&s!==r&&ra(t,s,{get:()=>e[s],enumerable:!(o=Ku(e,s))||o.enumerable});return t};var u=(t,e,r)=>(r=t!=null?Xu(Qu(t)):{},tf(e||!t||!t.__esModule?ra(r,"default",{value:t,enumerable:!0}):r,t));var ut=Ht((Jg,oa)=>{oa.exports=window.wp.i18n});var X=Ht((Qg,sa)=>{sa.exports=window.wp.components});var z=Ht(($g,na)=>{na.exports=window.ReactJSXRuntime});var yt=Ht((ey,ia)=>{ia.exports=window.wp.element});var _r=Ht((sy,da)=>{da.exports=window.React});var Pr=Ht((Iy,_a)=>{_a.exports=window.wp.primitives});var Vs=Ht((Xy,Pa)=>{Pa.exports=window.wp.privateApis});var cr=Ht((Ky,Aa)=>{Aa.exports=window.wp.compose});var Na=Ht((dv,Va)=>{Va.exports=window.wp.editor});var be=Ht((mv,za)=>{za.exports=window.wp.coreData});var fe=Ht((pv,Ma)=>{Ma.exports=window.wp.data});var Rr=Ht((hv,Ga)=>{Ga.exports=window.wp.blocks});var ce=Ht((gv,ja)=>{ja.exports=window.wp.blockEditor});var Ha=Ht((xv,Ua)=>{Ua.exports=window.wp.styleEngine});var Xa=Ht((Lv,Za)=>{"use strict";Za.exports=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var o,s,a;if(Array.isArray(e)){if(o=e.length,o!=r.length)return!1;for(s=o;s--!==0;)if(!t(e[s],r[s]))return!1;return!0}if(e instanceof Map&&r instanceof Map){if(e.size!==r.size)return!1;for(s of e.entries())if(!r.has(s[0]))return!1;for(s of e.entries())if(!t(s[1],r.get(s[0])))return!1;return!0}if(e instanceof Set&&r instanceof Set){if(e.size!==r.size)return!1;for(s of e.entries())if(!r.has(s[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(r)){if(o=e.length,o!=r.length)return!1;for(s=o;s--!==0;)if(e[s]!==r[s])return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(a=Object.keys(e),o=a.length,o!==Object.keys(r).length)return!1;for(s=o;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,a[s]))return!1;for(s=o;s--!==0;){var n=a[s];if(!t(e[n],r[n]))return!1}return!0}return e!==e&&r!==r}});var $a=Ht((Dv,Qa)=>{"use strict";var Pf=function(e){return Af(e)&&!Rf(e)};function Af(t){return!!t&&typeof t=="object"}function Rf(t){var e=Object.prototype.toString.call(t);return e==="[object RegExp]"||e==="[object Date]"||Lf(t)}var Ef=typeof Symbol=="function"&&Symbol.for,If=Ef?Symbol.for("react.element"):60103;function Lf(t){return t.$$typeof===If}function Bf(t){return Array.isArray(t)?[]:{}}function so(t,e){return e.clone!==!1&&e.isMergeableObject(t)?Ir(Bf(t),t,e):t}function Df(t,e,r){return t.concat(e).map(function(o){return so(o,r)})}function Vf(t,e){if(!e.customMerge)return Ir;var r=e.customMerge(t);return typeof r=="function"?r:Ir}function Nf(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[]}function Ka(t){return Object.keys(t).concat(Nf(t))}function Ja(t,e){try{return e in t}catch{return!1}}function zf(t,e){return Ja(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))}function Mf(t,e,r){var o={};return r.isMergeableObject(t)&&Ka(t).forEach(function(s){o[s]=so(t[s],r)}),Ka(e).forEach(function(s){zf(t,s)||(Ja(t,s)&&r.isMergeableObject(e[s])?o[s]=Vf(s,r)(t[s],e[s],r):o[s]=so(e[s],r))}),o}function Ir(t,e,r){r=r||{},r.arrayMerge=r.arrayMerge||Df,r.isMergeableObject=r.isMergeableObject||Pf,r.cloneUnlessOtherwiseSpecified=so;var o=Array.isArray(e),s=Array.isArray(t),a=o===s;return a?o?r.arrayMerge(t,e,r):Mf(t,e,r):so(e,r)}Ir.all=function(e,r){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(o,s){return Ir(o,s,r)},{})};var Gf=Ir;Qa.exports=Gf});var dn=Ht((H0,Ki)=>{Ki.exports=window.wp.keycodes});var el=Ht((eb,tl)=>{tl.exports=window.wp.apiFetch});var _u=Ht((FF,Tu)=>{Tu.exports=window.wp.date});function aa(t){var e,r,o="";if(typeof t=="string"||typeof t=="number")o+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e(0,ua.jsx)(o,{ref:a,className:ve("admin-ui-navigable-region",e),"aria-label":r,role:"region",tabIndex:"-1",...s,children:t}));fa.displayName="NavigableRegion";var ca=fa;var pa=u(_r(),1),ma={};function Fs(t,e){let r=pa.useRef(ma);return r.current===ma&&(r.current=t(e)),r}function ks(t,...e){let r=new URL(`https://base-ui.com/production-error/${t}`);return e.forEach(o=>r.searchParams.append("args[]",o)),`Base UI error #${t}; visit ${r} for the full message.`}var Oo=u(_r(),1);function Os(t,e,r,o){let s=Fs(ga).current;return rf(s,t,e,r,o)&&ya(s,[t,e,r,o]),s.callback}function ha(t){let e=Fs(ga).current;return of(e,t)&&ya(e,t),e.callback}function ga(){return{callback:null,cleanup:null,refs:[]}}function rf(t,e,r,o,s){return t.refs[0]!==e||t.refs[1]!==r||t.refs[2]!==o||t.refs[3]!==s}function of(t,e){return t.refs.length!==e.length||t.refs.some((r,o)=>r!==e[o])}function ya(t,e){if(t.refs=e,e.every(r=>r==null)){t.callback=null;return}t.callback=r=>{if(t.cleanup&&(t.cleanup(),t.cleanup=null),r!=null){let o=Array(e.length).fill(null);for(let s=0;s{for(let s=0;s=t}function Ts(t){if(!wa.isValidElement(t))return null;let e=t,r=e.props;return(ba(19)?r?.ref:e.ref)??null}function Jr(t,e){if(t&&!e)return t;if(!t&&e)return e;if(t||e)return{...t,...e}}function Sa(t,e){let r={};for(let o in t){let s=t[o];if(e?.hasOwnProperty(o)){let a=e[o](s);a!=null&&Object.assign(r,a);continue}s===!0?r[`data-${o.toLowerCase()}`]="":s&&(r[`data-${o.toLowerCase()}`]=s.toString())}return r}function xa(t,e){return typeof t=="function"?t(e):t}function Ca(t,e){return typeof t=="function"?t(e):t}var $r={};function ko(t,e,r,o,s){let a={..._s(t,$r)};return e&&(a=Qr(a,e)),r&&(a=Qr(a,r)),o&&(a=Qr(a,o)),s&&(a=Qr(a,s)),a}function Fa(t){if(t.length===0)return $r;if(t.length===1)return _s(t[0],$r);let e={..._s(t[0],$r)};for(let r=1;r=65&&s<=90&&(typeof e=="function"||typeof e>"u")}function ka(t){return typeof t=="function"}function _s(t,e){return ka(t)?t(e):t??$r}function lf(t,e){return e?t?r=>{if(ff(r)){let s=r;uf(s);let a=e(s);return s.baseUIHandlerPrevented||t?.(s),a}let o=e(r);return t?.(r),o}:e:t}function uf(t){return t.preventBaseUIHandler=()=>{t.baseUIHandlerPrevented=!0},t}function Ps(t,e){return e?t?e+" "+t:e:t}function ff(t){return t!=null&&typeof t=="object"&&"nativeEvent"in t}var cf=Object.freeze([]),Ke=Object.freeze({});var As=u(_r(),1);function Oa(t,e,r={}){let o=e.render,s=df(e,r);if(r.enabled===!1)return null;let a=r.state??Ke;return mf(t,o,s,a)}function df(t,e={}){let{className:r,style:o,render:s}=t,{state:a=Ke,ref:n,props:l,stateAttributesMapping:m,enabled:f=!0}=e,c=f?xa(r,a):void 0,d=f?Ca(o,a):void 0,g=f?Sa(a,m):Ke,h=f?Jr(g,Array.isArray(l)?Fa(l):l)??Ke:Ke;return typeof document<"u"&&(f?Array.isArray(n)?h.ref=ha([h.ref,Ts(s),...n]):h.ref=Os(h.ref,Ts(s),n):Os(null,null)),f?(c!==void 0&&(h.className=Ps(h.className,c)),d!==void 0&&(h.style=Jr(h.style,d)),h):Ke}function mf(t,e,r,o){if(e){if(typeof e=="function")return e(r,o);let s=ko(r,e.props);return s.ref=r.ref,Oo.cloneElement(e,s)}if(t&&typeof t=="string")return pf(t,r);throw new Error(ks(8))}function pf(t,e){return t==="button"?(0,As.createElement)("button",{type:"button",...e,key:e.key}):t==="img"?(0,As.createElement)("img",{alt:"",...e,key:e.key}):Oo.createElement(t,e)}function Ta(t){return Oa(t.defaultTagName??"div",t,t)}var To=u(yt(),1),to=(0,To.forwardRef)(({icon:t,size:e=24,...r},o)=>(0,To.cloneElement)(t,{width:e,height:e,...r,ref:o}));var _o=u(Pr(),1),Rs=u(z(),1),ur=(0,Rs.jsx)(_o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Rs.jsx)(_o.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})});var Po=u(Pr(),1),Es=u(z(),1),fr=(0,Es.jsx)(Po.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Es.jsx)(Po.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})});var Ao=u(Pr(),1),Is=u(z(),1),Ls=(0,Is.jsx)(Ao.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Is.jsx)(Ao.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})});var Ro=u(Pr(),1),Bs=u(z(),1),Eo=(0,Bs.jsx)(Ro.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Bs.jsx)(Ro.Path,{d:"M6.6 6L5.4 7l4.5 5-4.5 5 1.1 1 5.5-6-5.4-6zm6 0l-1.1 1 4.5 5-4.5 5 1.1 1 5.5-6-5.5-6z"})});var Io=u(Pr(),1),Ds=u(z(),1),Lo=(0,Ds.jsx)(Io.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Ds.jsx)(Io.Path,{d:"M11.6 7l-1.1-1L5 12l5.5 6 1.1-1L7 12l4.6-5zm6 0l-1.1-1-5.5 6 5.5 6 1.1-1-4.6-5 4.6-5z"})});var Ra=u(yt(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='71d20935c2']")){let t=document.createElement("style");t.setAttribute("data-wp-hash","71d20935c2"),t.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._19ce0419607e1896__stack{display:flex}}")),document.head.appendChild(t)}var hf={stack:"_19ce0419607e1896__stack"},gf={xs:"var(--wpds-dimension-gap-xs, 4px)",sm:"var(--wpds-dimension-gap-sm, 8px)",md:"var(--wpds-dimension-gap-md, 12px)",lg:"var(--wpds-dimension-gap-lg, 16px)",xl:"var(--wpds-dimension-gap-xl, 24px)","2xl":"var(--wpds-dimension-gap-2xl, 32px)","3xl":"var(--wpds-dimension-gap-3xl, 40px)"},Ar=(0,Ra.forwardRef)(function({direction:e,gap:r,align:o,justify:s,wrap:a,render:n,...l},m){let f={gap:r&&gf[r],alignItems:o,justifyContent:s,flexDirection:e,flexWrap:a};return Ta({render:n,ref:m,props:ko(l,{style:f,className:hf.stack})})});var Ea=u(X(),1),{Fill:Ia,Slot:La}=(0,Ea.createSlotFill)("SidebarToggle");var Re=u(z(),1);function Ba({headingLevel:t=2,breadcrumbs:e,badges:r,title:o,subTitle:s,actions:a,showSidebarToggle:n=!0}){let l=`h${t}`;return(0,Re.jsxs)(Ar,{direction:"column",className:"admin-ui-page__header",render:(0,Re.jsx)("header",{}),children:[(0,Re.jsxs)(Ar,{direction:"row",justify:"space-between",gap:"sm",children:[(0,Re.jsxs)(Ar,{direction:"row",gap:"sm",align:"center",justify:"start",children:[n&&(0,Re.jsx)(La,{bubblesVirtually:!0,className:"admin-ui-page__sidebar-toggle-slot"}),o&&(0,Re.jsx)(l,{className:"admin-ui-page__header-title",children:o}),e,r]}),(0,Re.jsx)(Ar,{direction:"row",gap:"sm",style:{width:"auto",flexShrink:0},className:"admin-ui-page__header-actions",align:"center",children:a})]}),s&&(0,Re.jsx)("p",{className:"admin-ui-page__header-subtitle",children:s})]})}var eo=u(z(),1);function Da({headingLevel:t,breadcrumbs:e,badges:r,title:o,subTitle:s,children:a,className:n,actions:l,hasPadding:m=!1,showSidebarToggle:f=!0}){let c=ve("admin-ui-page",n);return(0,eo.jsxs)(ca,{className:c,ariaLabel:o,children:[(o||e||r)&&(0,eo.jsx)(Ba,{headingLevel:t,breadcrumbs:e,badges:r,title:o,subTitle:s,actions:l,showSidebarToggle:f}),m?(0,eo.jsx)("div",{className:"admin-ui-page__content has-padding",children:a}):a]})}Da.SidebarToggleFill=Ia;var Ns=Da;var xo=u(ut()),Uu=u(X()),Hu=u(Na()),ws=u(be()),Wu=u(fe()),Yu=u(yt());var Mu=u(X(),1),Gu=u(Rr(),1),Mg=u(fe(),1),Gg=u(ce(),1),qn=u(yt(),1),jg=u(cr(),1);function Er(t,e,r){e=Array.isArray(e)?[...e]:[e],t=Array.isArray(t)?[...t]:{...t};let o=e.pop(),s=t;for(let a of e){let n=s[a];s=s[a]=Array.isArray(n)?[...n]:{...n}}return s[o]=r,t}var we=(t,e,r)=>{let o=Array.isArray(e)?e:e.split("."),s=t;return o.forEach(a=>{s=s?.[a]}),s??r};var yf=["appearanceTools","useRootPaddingAwareAlignments","background.backgroundImage","background.backgroundRepeat","background.backgroundSize","background.backgroundPosition","border.color","border.radius","border.radiusSizes","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.height","dimensions.minHeight","dimensions.width","dimensions.dimensionSizes","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.textIndent","typography.textTransform","typography.writingMode"];function zs(t,e,r){let o=r?".blocks."+r:"",s=e?"."+e:"",a=`settings${o}${s}`,n=`settings${s}`;if(e)return we(t,a)??we(t,n);let l={};return yf.forEach(m=>{let f=we(t,`settings${o}.${m}`)??we(t,`settings.${m}`);f!==void 0&&(l=Er(l,m.split("."),f))}),l}function Ms(t,e,r,o){let s=o?".blocks."+o:"",a=e?"."+e:"",n=`settings${s}${a}`;return Er(t,n.split("."),r)}var kf=u(Ha(),1);var vf="1600px",bf="320px",wf=1,Sf=.25,xf=.75,Cf="14px";function Wa({minimumFontSize:t,maximumFontSize:e,fontSize:r,minimumViewportWidth:o=bf,maximumViewportWidth:s=vf,scaleFactor:a=wf,minimumFontSizeLimit:n}){if(n=Ee(n)?n:Cf,r){let b=Ee(r);if(!b?.unit||!b?.value)return null;let T=Ee(n,{coerceTo:b.unit});if(T?.value&&!t&&!e&&b?.value<=T?.value)return null;if(e||(e=`${b.value}${b.unit}`),!t){let Y=b.unit==="px"?b.value:b.value*16,I=Math.min(Math.max(1-.075*Math.log2(Y),Sf),xf),V=ro(b.value*I,3);T?.value&&V0}function Ff(t){let e=t?.typography??{},r=t?.layout,o=Ee(r?.wideSize)?r?.wideSize:null;return Gs(e)&&o?{fluid:{maxViewportWidth:o,...typeof e.fluid=="object"?e.fluid:{}}}:{fluid:e?.fluid}}function Ya(t,e){let{size:r}=t;if(!r||r==="0"||t?.fluid===!1||!Gs(e?.typography)&&!Gs(t))return r;let o=Ff(e)?.fluid??{},s=Wa({minimumFontSize:typeof t?.fluid=="boolean"?void 0:t?.fluid?.min,maximumFontSize:typeof t?.fluid=="boolean"?void 0:t?.fluid?.max,fontSize:r,minimumFontSizeLimit:typeof o=="object"?o?.minFontSize:void 0,maximumViewportWidth:typeof o=="object"?o?.maxViewportWidth:void 0,minimumViewportWidth:typeof o=="object"?o?.minViewportWidth:void 0});return s||r}var Of=[{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:t})=>`url( '#wp-duotone-${t}' )`,classes:[]},{path:["shadow","presets"],valueKey:"shadow",cssVarInfix:"shadow",classes:[]},{path:["typography","fontSizes"],valueFunc:(t,e)=>Ya(t,e),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:t})=>t,classes:[]},{path:["border","radiusSizes"],valueKey:"size",cssVarInfix:"border-radius",classes:[]},{path:["dimensions","dimensionSizes"],valueKey:"size",cssVarInfix:"dimension",classes:[]}];function qa(t,e,r=[],o="slug",s){let a=[e?we(t,["blocks",e,...r]):void 0,we(t,r)].filter(Boolean);for(let n of a)if(n){let l=["custom","theme","default"];for(let m of l){let f=n[m];if(f){let c=f.find(d=>d[o]===s);if(c)return o==="slug"||qa(t,e,r,"slug",c.slug)[o]===c[o]?c:void 0}}}}function Tf(t,e,r,[o,s]=[]){let a=Of.find(l=>l.cssVarInfix===o);if(!a||!t.settings)return r;let n=qa(t.settings,e,a.path,"slug",s);if(n){let{valueKey:l}=a,m=n[l];return Bo(t,e,m)}return r}function _f(t,e,r,o=[]){let s=(e?we(t?.settings??{},["blocks",e,"custom",...o]):void 0)??we(t?.settings??{},["custom",...o]);return s?Bo(t,e,s):r}function Bo(t,e,r){if(!r||typeof r!="string")if(typeof r=="object"&&r!==null&&"ref"in r&&typeof r.ref=="string"){let f=we(t,r.ref);if(!f||typeof f=="object"&&"ref"in f)return f;r=f}else return r;let o="var:",s="var(--wp--",a=")",n;if(r.startsWith(o))n=r.slice(o.length).split("|");else if(r.startsWith(s)&&r.endsWith(a))n=r.slice(s.length,-a.length).split("--");else return r;let[l,...m]=n;return l==="preset"?Tf(t,e,r,m):l==="custom"?_f(t,e,r,m):r}function js(t,e,r,o=!0){let s=e?"."+e:"",a=r?`styles.blocks.${r}${s}`:`styles${s}`;if(!t)return;let n=we(t,a);return o?Bo(t,r,n):n}function Us(t,e,r,o){let s=e?"."+e:"",a=o?`styles.blocks.${o}${s}`:`styles${s}`;return Er(t,a.split("."),r)}var Hs=u(Xa(),1);function oo(t,e){return typeof t!="object"||typeof e!="object"?t===e:(0,Hs.default)(t?.styles,e?.styles)&&(0,Hs.default)(t?.settings,e?.settings)}var ri=u($a(),1);function ti(t){return Object.prototype.toString.call(t)==="[object Object]"}function ei(t){var e,r;return ti(t)===!1?!1:(e=t.constructor,e===void 0?!0:(r=e.prototype,!(ti(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}function dr(t,e){return(0,ri.default)(t,e,{isMergeableObject:ei,customMerge:r=>{if(r==="backgroundImage")return(o,s)=>s??o}})}var jf={grad:.9,turn:360,rad:360/(2*Math.PI)},je=function(t){return typeof t=="string"?t.length>0:typeof t=="number"},qt=function(t,e,r){return e===void 0&&(e=0),r===void 0&&(r=Math.pow(10,e)),Math.round(r*t)/r+0},Fe=function(t,e,r){return e===void 0&&(e=0),r===void 0&&(r=1),t>r?r:t>e?t:e},fi=function(t){return(t=isFinite(t)?t%360:0)>0?t:t+360},oi=function(t){return{r:Fe(t.r,0,255),g:Fe(t.g,0,255),b:Fe(t.b,0,255),a:Fe(t.a)}},Ws=function(t){return{r:qt(t.r),g:qt(t.g),b:qt(t.b),a:qt(t.a,3)}},Uf=/^#([0-9a-f]{3,8})$/i,Do=function(t){var e=t.toString(16);return e.length<2?"0"+e:e},ci=function(t){var e=t.r,r=t.g,o=t.b,s=t.a,a=Math.max(e,r,o),n=a-Math.min(e,r,o),l=n?a===e?(r-o)/n:a===r?2+(o-e)/n:4+(e-r)/n:0;return{h:60*(l<0?l+6:l),s:a?n/a*100:0,v:a/255*100,a:s}},di=function(t){var e=t.h,r=t.s,o=t.v,s=t.a;e=e/360*6,r/=100,o/=100;var a=Math.floor(e),n=o*(1-r),l=o*(1-(e-a)*r),m=o*(1-(1-e+a)*r),f=a%6;return{r:255*[o,l,n,n,m,o][f],g:255*[m,o,o,l,n,n][f],b:255*[n,n,m,o,o,l][f],a:s}},si=function(t){return{h:fi(t.h),s:Fe(t.s,0,100),l:Fe(t.l,0,100),a:Fe(t.a)}},ni=function(t){return{h:qt(t.h),s:qt(t.s),l:qt(t.l),a:qt(t.a,3)}},ai=function(t){return di((r=(e=t).s,{h:e.h,s:(r*=((o=e.l)<50?o:100-o)/100)>0?2*r/(o+r)*100:0,v:o+r,a:e.a}));var e,r,o},no=function(t){return{h:(e=ci(t)).h,s:(s=(200-(r=e.s))*(o=e.v)/100)>0&&s<200?r*o/100/(s<=100?s:200-s)*100:0,l:s/2,a:e.a};var e,r,o,s},Hf=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Wf=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Yf=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,qf=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Zs={string:[[function(t){var e=Uf.exec(t);return e?(t=e[1]).length<=4?{r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:t.length===4?qt(parseInt(t[3]+t[3],16)/255,2):1}:t.length===6||t.length===8?{r:parseInt(t.substr(0,2),16),g:parseInt(t.substr(2,2),16),b:parseInt(t.substr(4,2),16),a:t.length===8?qt(parseInt(t.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(t){var e=Yf.exec(t)||qf.exec(t);return e?e[2]!==e[4]||e[4]!==e[6]?null:oi({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:e[7]===void 0?1:Number(e[7])/(e[8]?100:1)}):null},"rgb"],[function(t){var e=Hf.exec(t)||Wf.exec(t);if(!e)return null;var r,o,s=si({h:(r=e[1],o=e[2],o===void 0&&(o="deg"),Number(r)*(jf[o]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return ai(s)},"hsl"]],object:[[function(t){var e=t.r,r=t.g,o=t.b,s=t.a,a=s===void 0?1:s;return je(e)&&je(r)&&je(o)?oi({r:Number(e),g:Number(r),b:Number(o),a:Number(a)}):null},"rgb"],[function(t){var e=t.h,r=t.s,o=t.l,s=t.a,a=s===void 0?1:s;if(!je(e)||!je(r)||!je(o))return null;var n=si({h:Number(e),s:Number(r),l:Number(o),a:Number(a)});return ai(n)},"hsl"],[function(t){var e=t.h,r=t.s,o=t.v,s=t.a,a=s===void 0?1:s;if(!je(e)||!je(r)||!je(o))return null;var n=(function(l){return{h:fi(l.h),s:Fe(l.s,0,100),v:Fe(l.v,0,100),a:Fe(l.a)}})({h:Number(e),s:Number(r),v:Number(o),a:Number(a)});return di(n)},"hsv"]]},ii=function(t,e){for(var r=0;r=.5},t.prototype.toHex=function(){return e=Ws(this.rgba),r=e.r,o=e.g,s=e.b,n=(a=e.a)<1?Do(qt(255*a)):"","#"+Do(r)+Do(o)+Do(s)+n;var e,r,o,s,a,n},t.prototype.toRgb=function(){return Ws(this.rgba)},t.prototype.toRgbString=function(){return e=Ws(this.rgba),r=e.r,o=e.g,s=e.b,(a=e.a)<1?"rgba("+r+", "+o+", "+s+", "+a+")":"rgb("+r+", "+o+", "+s+")";var e,r,o,s,a},t.prototype.toHsl=function(){return ni(no(this.rgba))},t.prototype.toHslString=function(){return e=ni(no(this.rgba)),r=e.h,o=e.s,s=e.l,(a=e.a)<1?"hsla("+r+", "+o+"%, "+s+"%, "+a+")":"hsl("+r+", "+o+"%, "+s+"%)";var e,r,o,s,a},t.prototype.toHsv=function(){return e=ci(this.rgba),{h:qt(e.h),s:qt(e.s),v:qt(e.v),a:qt(e.a,3)};var e},t.prototype.invert=function(){return Ie({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},t.prototype.saturate=function(e){return e===void 0&&(e=.1),Ie(Ys(this.rgba,e))},t.prototype.desaturate=function(e){return e===void 0&&(e=.1),Ie(Ys(this.rgba,-e))},t.prototype.grayscale=function(){return Ie(Ys(this.rgba,-1))},t.prototype.lighten=function(e){return e===void 0&&(e=.1),Ie(li(this.rgba,e))},t.prototype.darken=function(e){return e===void 0&&(e=.1),Ie(li(this.rgba,-e))},t.prototype.rotate=function(e){return e===void 0&&(e=15),this.hue(this.hue()+e)},t.prototype.alpha=function(e){return typeof e=="number"?Ie({r:(r=this.rgba).r,g:r.g,b:r.b,a:e}):qt(this.rgba.a,3);var r},t.prototype.hue=function(e){var r=no(this.rgba);return typeof e=="number"?Ie({h:e,s:r.s,l:r.l,a:r.a}):qt(r.h)},t.prototype.isEqual=function(e){return this.toHex()===Ie(e).toHex()},t})(),Ie=function(t){return t instanceof Xs?t:new Xs(t)},ui=[],mi=function(t){t.forEach(function(e){ui.indexOf(e)<0&&(e(Xs,Zs),ui.push(e))})};var Ks=u(yt(),1);var pi=u(yt(),1),Xt=(0,pi.createContext)({user:{styles:{},settings:{}},base:{styles:{},settings:{}},merged:{styles:{},settings:{}},onChange:()=>{},fontLibraryEnabled:!1});var hi=u(z(),1);function ao({children:t,value:e,baseValue:r,onChange:o,fontLibraryEnabled:s}){let a=(0,Ks.useMemo)(()=>dr(r,e),[r,e]),n=(0,Ks.useMemo)(()=>({user:e,base:r,merged:a,onChange:o,fontLibraryEnabled:s}),[e,r,a,o,s]);return(0,hi.jsx)(Xt.Provider,{value:n,children:t})}var Ue=u(X(),1),Li=u(ut(),1);var lc=u(fe(),1),uc=u(be(),1);var gi=u(z(),1);function Js({className:t,...e}){return(0,gi.jsx)(to,{className:ve(t,"global-styles-ui-icon-with-current-color"),...e})}var Je=u(X(),1);var mr=u(z(),1);function Xf({icon:t,children:e,...r}){return(0,mr.jsxs)(Je.__experimentalItem,{...r,children:[t&&(0,mr.jsxs)(Je.__experimentalHStack,{justify:"flex-start",children:[(0,mr.jsx)(Js,{icon:t,size:24}),(0,mr.jsx)(Je.FlexItem,{children:e})]}),!t&&e]})}function Le(t){return(0,mr.jsx)(Je.Navigator.Button,{as:Xf,...t})}var Qf=u(X(),1);var $f=u(ut(),1),Ci=u(ce(),1);var Qs=function(t){var e=t/255;return e<.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)},$s=function(t){return .2126*Qs(t.r)+.7152*Qs(t.g)+.0722*Qs(t.b)};function yi(t){t.prototype.luminance=function(){return e=$s(this.rgba),(r=2)===void 0&&(r=0),o===void 0&&(o=Math.pow(10,r)),Math.round(o*e)/o+0;var e,r,o},t.prototype.contrast=function(e){e===void 0&&(e="#FFF");var r,o,s,a,n,l,m,f=e instanceof t?e:new t(e);return a=this.rgba,n=f.toRgb(),l=$s(a),m=$s(n),r=l>m?(l+.05)/(m+.05):(m+.05)/(l+.05),(o=2)===void 0&&(o=0),s===void 0&&(s=Math.pow(10,o)),Math.floor(s*r)/s+0},t.prototype.isReadable=function(e,r){return e===void 0&&(e="#FFF"),r===void 0&&(r={}),this.contrast(e)>=(l=(n=(o=r).size)===void 0?"normal":n,(a=(s=o.level)===void 0?"AA":s)==="AAA"&&l==="normal"?7:a==="AA"&&l==="large"?3:4.5);var o,s,a,n,l}}var Pe=u(yt(),1),wi=u(fe(),1),Si=u(be(),1),en=u(ut(),1);function tn(t,e){if(!e?.length||typeof t!="object"||!t||!Object.keys(t).length)return t;for(let r in t)e.includes(r)?delete t[r]:typeof t[r]=="object"&&tn(t[r],e);return t}var Vo=(t,e)=>{if(!t||!e?.length)return{};let r={};return Object.keys(t).forEach(o=>{if(e.includes(o))r[o]=t[o];else if(typeof t[o]=="object"){let s=Vo(t[o],e);Object.keys(s).length&&(r[o]=s)}}),r};function io(t,e){let r=Vo(structuredClone(t),e);return oo(r,t)}function vi(t,e){if(!Array.isArray(t)||!e)return null;let o=e.replace("var(","").replace(")","")?.split("--").slice(-1)[0];return t.find(s=>s.slug===o)}function bi(t){let e=t?.settings?.typography?.fontFamilies?.theme,r=t?.settings?.typography?.fontFamilies?.custom,o=[];e&&r?o=[...e,...r]:e?o=e:r&&(o=r);let s=t?.styles?.typography?.fontFamily,a=vi(o,s),n=t?.styles?.elements?.heading?.typography?.fontFamily,l;return n?l=vi(o,t?.styles?.elements?.heading?.typography?.fontFamily):l=a,[a,l]}mi([yi]);function kt(t,e,r="merged",o=!0){let{user:s,base:a,merged:n,onChange:l}=(0,Pe.useContext)(Xt),m=n;r==="base"?m=a:r==="user"&&(m=s);let f=(0,Pe.useMemo)(()=>js(m,t,e,o),[m,t,e,o]),c=(0,Pe.useCallback)(d=>{let g=Us(s,t,d,e);l(g)},[s,l,t,e]);return[f,c]}function _t(t,e,r="merged"){let{user:o,base:s,merged:a,onChange:n}=(0,Pe.useContext)(Xt),l=a;r==="base"?l=s:r==="user"&&(l=o);let m=(0,Pe.useMemo)(()=>zs(l,t,e),[l,t,e]),f=(0,Pe.useCallback)(c=>{let d=Ms(o,t,c,e);n(d)},[o,n,t,e]);return[m,f]}var Kf=[];function Jf({title:t,settings:e,styles:r}){return t===(0,en.__)("Default")||Object.keys(e||{}).length>0||Object.keys(r||{}).length>0}function No(t=[]){let{variationsFromTheme:e}=(0,wi.useSelect)(o=>({variationsFromTheme:o(Si.store).__experimentalGetCurrentThemeGlobalStylesVariations?.()||Kf}),[]),{user:r}=(0,Pe.useContext)(Xt);return(0,Pe.useMemo)(()=>{let o=structuredClone(r),s=tn(o,t);s.title=(0,en.__)("Default");let a=e.filter(l=>io(l,t)).map(l=>dr(s,l)),n=[s,...a];return n?.length?n.filter(Jf):[]},[t,r,e])}var xi=u(Vs(),1),{lock:d1,unlock:vt}=(0,xi.__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/global-styles-ui");var rn=u(z(),1),{useHasDimensionsPanel:y1,useHasTypographyPanel:v1,useHasColorPanel:b1,useSettingsForBlockElement:w1,useHasBackgroundPanel:S1}=vt(Ci.privateApis);var Be=u(X(),1);function Lr(){let[t="black"]=kt("color.text"),[e="white"]=kt("color.background"),[r=t]=kt("elements.h1.color.text"),[o=r]=kt("elements.link.color.text"),[s=o]=kt("elements.button.color.background"),[a]=_t("color.palette.core")||[],[n]=_t("color.palette.theme")||[],[l]=_t("color.palette.custom")||[],m=(n??[]).concat(l??[]).concat(a??[]),f=m.filter(({color:g})=>g===t),c=m.filter(({color:g})=>g===s),d=f.concat(c).concat(m).filter(({color:g})=>g!==e).slice(0,2);return{paletteColors:m,highlightedColors:d}}var Oi=u(yt(),1),Ti=u(X(),1),sn=u(ut(),1);function tc(t,e){return e.length===0?null:(e.sort((r,o)=>Math.abs(t-r)-Math.abs(t-o)),e[0])}function ec(t){let e=[];return t.forEach(r=>{let o=String(r.fontWeight).split(" ");if(o.length===2){let s=parseInt(o[0]),a=parseInt(o[1]);for(let n=s;n<=a;n+=100)e.push(n)}else o.length===1&&e.push(parseInt(o[0]))}),e}function Fi(t){let e=/^(?!generic\([ a-zA-Z\-]+\)$)(?!^[a-zA-Z\-]+$).+/,r=t.trim(),o=s=>(s=s.trim(),s.match(e)?(s=s.replace(/^["']|["']$/g,""),`"${s}"`):s);return r.includes(",")?r.split(",").map(o).filter(s=>s!=="").join(", "):o(r)}function on(t){if(!t)return"";let e=t.trim();return e.includes(",")&&(e=(e.split(",").find(r=>r.trim()!=="")??"").trim()),e=e.replace(/^["']|["']$/g,""),window.navigator.userAgent.toLowerCase().includes("firefox")&&(e=`"${e}"`),e}function Br(t){let e={fontFamily:Fi(t.fontFamily)};if(!("fontFace"in t)||!Array.isArray(t.fontFace))return e.fontWeight="400",e.fontStyle="normal",e;if(t.fontFace){let r=t.fontFace.filter(o=>o?.fontStyle&&o.fontStyle.toLowerCase()==="normal");if(r.length>0){e.fontStyle="normal";let o=ec(r),s=tc(400,o);e.fontWeight=String(s)||"400"}else e.fontStyle=t.fontFace.length&&t.fontFace[0].fontStyle||"normal",e.fontWeight=t.fontFace.length&&String(t.fontFace[0].fontWeight)||"400"}return e}function ki(t){return{fontFamily:Fi(t.fontFamily),fontStyle:t.fontStyle||"normal",fontWeight:t.fontWeight||"400"}}var lo=u(z(),1);function zo({fontSize:t,variation:e}){let{base:r}=(0,Oi.useContext)(Xt),o=r;e&&(o={...r,...e});let[s]=kt("color.text"),[a,n]=bi(o),l=a?Br(a):{},m=n?Br(n):{};return s&&(l.color=s,m.color=s),t&&(l.fontSize=t,m.fontSize=t),(0,lo.jsxs)(Ti.__unstableMotion.div,{animate:{scale:1,opacity:1},initial:{scale:.1,opacity:0},transition:{delay:.3,type:"tween"},style:{textAlign:"center",lineHeight:1},children:[(0,lo.jsx)("span",{style:m,children:(0,sn._x)("A","Uppercase letter A")}),(0,lo.jsx)("span",{style:l,children:(0,sn._x)("a","Lowercase letter A")})]})}var _i=u(X(),1);var Pi=u(z(),1);function Ai({normalizedColorSwatchSize:t,ratio:e}){let{highlightedColors:r}=Lr(),o=t*e;return r.map(({slug:s,color:a},n)=>(0,Pi.jsx)(_i.__unstableMotion.div,{style:{height:o,width:o,background:a,borderRadius:o/2},animate:{scale:1,opacity:1},initial:{scale:.1,opacity:0},transition:{delay:n===1?.2:.1}},`${s}-${n}`))}var Ii=u(X(),1),Dr=u(cr(),1),pr=u(yt(),1);var Qe=u(z(),1),Ri=248,Ei=152,rc={leading:!0,trailing:!0};function oc({children:t,label:e,isFocused:r,withHoverView:o}){let[s="white"]=kt("color.background"),[a]=kt("color.gradient"),n=(0,Dr.useReducedMotion)(),[l,m]=(0,pr.useState)(!1),[f,{width:c}]=(0,Dr.useResizeObserver)(),[d,g]=(0,pr.useState)(c),[h,v]=(0,pr.useState)(),_=(0,Dr.useThrottle)(g,250,rc);(0,pr.useLayoutEffect)(()=>{c&&_(c)},[c,_]),(0,pr.useLayoutEffect)(()=>{let b=d?d/Ri:1,T=b-(h||0);(Math.abs(T)>.1||!h)&&v(b)},[d,h]);let A=c?c/Ri:1,k=h||A;return(0,Qe.jsxs)(Qe.Fragment,{children:[(0,Qe.jsx)("div",{style:{position:"relative"},children:f}),!!c&&(0,Qe.jsx)("div",{className:"global-styles-ui-preview__wrapper",style:{height:Ei*k},onMouseEnter:()=>m(!0),onMouseLeave:()=>m(!1),tabIndex:-1,children:(0,Qe.jsx)(Ii.__unstableMotion.div,{style:{height:Ei*k,width:"100%",background:a??s,cursor:o?"pointer":void 0},initial:"start",animate:(l||r)&&!n&&e?"hover":"start",children:[].concat(t).map((b,T)=>b({ratio:k,key:T}))})})]})}var Vr=oc;var de=u(z(),1),sc={start:{scale:1,opacity:1},hover:{scale:0,opacity:0}},nc={hover:{opacity:1},start:{opacity:.5}},ac={hover:{scale:1,opacity:1},start:{scale:0,opacity:0}};function ic({label:t,isFocused:e,withHoverView:r,variation:o}){let[s]=kt("typography.fontWeight"),[a="serif"]=kt("typography.fontFamily"),[n=a]=kt("elements.h1.typography.fontFamily"),[l=s]=kt("elements.h1.typography.fontWeight"),[m="black"]=kt("color.text"),[f=m]=kt("elements.h1.color.text"),{paletteColors:c}=Lr();return(0,de.jsxs)(Vr,{label:t,isFocused:e,withHoverView:r,children:[({ratio:d,key:g})=>(0,de.jsx)(Be.__unstableMotion.div,{variants:sc,style:{height:"100%",overflow:"hidden"},children:(0,de.jsxs)(Be.__experimentalHStack,{spacing:10*d,justify:"center",style:{height:"100%",overflow:"hidden"},children:[(0,de.jsx)(zo,{fontSize:65*d,variation:o}),(0,de.jsx)(Be.__experimentalVStack,{spacing:4*d,children:(0,de.jsx)(Ai,{normalizedColorSwatchSize:32,ratio:d})})]})},g),({key:d})=>(0,de.jsx)(Be.__unstableMotion.div,{variants:r?nc:void 0,style:{height:"100%",width:"100%",position:"absolute",top:0,overflow:"hidden",filter:"blur(60px)",opacity:.1},children:(0,de.jsx)(Be.__experimentalHStack,{spacing:0,justify:"flex-start",style:{height:"100%",overflow:"hidden"},children:c.slice(0,4).map(({color:g},h)=>(0,de.jsx)("div",{style:{height:"100%",background:g,flexGrow:1}},h))})},d),({ratio:d,key:g})=>(0,de.jsx)(Be.__unstableMotion.div,{variants:ac,style:{height:"100%",width:"100%",overflow:"hidden",position:"absolute",top:0},children:(0,de.jsx)(Be.__experimentalVStack,{spacing:3*d,justify:"center",style:{height:"100%",overflow:"hidden",padding:10*d,boxSizing:"border-box"},children:t&&(0,de.jsx)("div",{style:{fontSize:40*d,fontFamily:n,color:f,fontWeight:l,lineHeight:"1em",textAlign:"center"},children:t})})},g)]})}var nn=ic;var Bi=u(z(),1);var ln=u(Rr(),1),Nr=u(ut(),1),gr=u(X(),1),un=u(fe(),1),$e=u(yt(),1),Mo=u(ce(),1),Mi=u(cr(),1);import{speak as mc}from"@wordpress/a11y";var Di=u(Rr(),1),Vi=u(fe(),1),fc=u(X(),1);var cc=u(z(),1);function dc(t,e){return t?.filter(r=>r.source==="block"||e.includes(r.name))||[]}function an(t){let e=(0,Vi.useSelect)(s=>{let{getBlockStyles:a}=s(Di.store);return a(t)},[t]),[r]=kt("variations",t),o=Object.keys(r??{});return dc(e,o)}var hr=u(X(),1),Ni=u(ut(),1);var zi=u(z(),1);var De=u(z(),1),{useHasDimensionsPanel:pc,useHasTypographyPanel:hc,useHasBorderPanel:gc,useSettingsForBlockElement:yc,useHasColorPanel:vc}=vt(Mo.privateApis);function bc(){let t=(0,un.useSelect)(s=>s(ln.store).getBlockTypes(),[]),e=(s,a)=>{let{core:n,noncore:l}=s;return(a.name.startsWith("core/")?n:l).push(a),s},{core:r,noncore:o}=t.reduce(e,{core:[],noncore:[]});return[...r,...o]}function wc(t){let[e]=_t("",t),r=yc(e,t),o=hc(r),s=vc(r),a=gc(r),n=pc(r),l=a||n,m=!!an(t)?.length;return o||s||l||m}function Sc({block:t}){return wc(t.name)?(0,De.jsx)(Le,{path:"/blocks/"+encodeURIComponent(t.name),children:(0,De.jsxs)(gr.__experimentalHStack,{justify:"flex-start",children:[(0,De.jsx)(Mo.BlockIcon,{icon:t.icon}),(0,De.jsx)(gr.FlexItem,{children:t.title})]})}):null}function xc({filterValue:t}){let e=bc(),r=(0,Mi.useDebounce)(mc,500),{isMatchingSearchTerm:o}=(0,un.useSelect)(ln.store),s=t?e.filter(n=>o(n,t)):e,a=(0,$e.useRef)(null);return(0,$e.useEffect)(()=>{if(!t)return;let n=a.current?.childElementCount||0,l=(0,Nr.sprintf)((0,Nr._n)("%d result found.","%d results found.",n),n);r(l,"polite")},[t,r]),(0,De.jsx)("div",{ref:a,className:"global-styles-ui-block-types-item-list",role:"list",children:s.length===0?(0,De.jsx)(gr.__experimentalText,{align:"center",as:"p",children:(0,Nr.__)("No blocks found.")}):s.map(n=>(0,De.jsx)(Sc,{block:n},"menu-itemblock-"+n.name))})}var o0=(0,$e.memo)(xc);var Tc=u(Rr(),1),Hi=u(ce(),1),Wi=u(yt(),1),_c=u(fe(),1),Pc=u(be(),1),fn=u(X(),1),Yi=u(ut(),1);var Cc=u(ce(),1),Gi=u(Rr(),1),Fc=u(X(),1),kc=u(yt(),1);var Oc=u(z(),1);var ji=u(X(),1),Ui=u(z(),1);function Se({children:t,level:e=2}){return(0,Ui.jsx)(ji.__experimentalHeading,{className:"global-styles-ui-subtitle",level:e,children:t})}var cn=u(z(),1);var{useHasDimensionsPanel:v0,useHasTypographyPanel:b0,useHasBorderPanel:w0,useSettingsForBlockElement:S0,useHasColorPanel:x0,useHasFiltersPanel:C0,useHasImageSettingsPanel:F0,useHasBackgroundPanel:k0,BackgroundPanel:O0,BorderPanel:T0,ColorPanel:_0,TypographyPanel:P0,DimensionsPanel:A0,FiltersPanel:R0,ImageSettingsPanel:E0,AdvancedPanel:I0}=vt(Hi.privateApis);var jh=u(ut(),1),Uh=u(X(),1),Hh=u(yt(),1);var Ac=u(X(),1);var Rc=u(z(),1);var Ec=u(ut(),1),Go=u(X(),1);var qi=u(z(),1);var Ho=u(X(),1);var Zi=u(X(),1);var jo=u(z(),1),Ic=({variation:t,isFocused:e,withHoverView:r})=>(0,jo.jsx)(Vr,{label:t.title,isFocused:e,withHoverView:r,children:({ratio:o,key:s})=>(0,jo.jsx)(Zi.__experimentalHStack,{spacing:10*o,justify:"center",style:{height:"100%",overflow:"hidden"},children:(0,jo.jsx)(zo,{variation:t,fontSize:85*o})},s)}),Xi=Ic;var Ji=u(X(),1),yr=u(yt(),1),Qi=u(dn(),1),Uo=u(ut(),1);var uo=u(z(),1);function zr({variation:t,children:e,isPill:r=!1,properties:o,showTooltip:s=!1}){let[a,n]=(0,yr.useState)(!1),{base:l,user:m,onChange:f}=(0,yr.useContext)(Xt),c=(0,yr.useMemo)(()=>{let A=dr(l,t);return o&&(A=Vo(A,o)),{user:t,base:l,merged:A,onChange:()=>{}}},[t,l,o]),d=()=>f(t),g=A=>{A.keyCode===Qi.ENTER&&(A.preventDefault(),d())},h=(0,yr.useMemo)(()=>oo(m,t),[m,t]),v=t?.title;t?.description&&(v=(0,Uo.sprintf)((0,Uo._x)("%1$s (%2$s)","variation label"),t?.title,t?.description));let _=(0,uo.jsx)("div",{className:ve("global-styles-ui-variations_item",{"is-active":h}),role:"button",onClick:d,onKeyDown:g,tabIndex:0,"aria-label":v,"aria-current":h,onFocus:()=>n(!0),onBlur:()=>n(!1),children:(0,uo.jsx)("div",{className:ve("global-styles-ui-variations_item-preview",{"is-pill":r}),children:e(a)})});return(0,uo.jsx)(Xt.Provider,{value:c,children:s?(0,uo.jsx)(Ji.Tooltip,{text:t?.title,children:_}):_})}var vr=u(z(),1),$i=["typography"];function Wo({title:t,gap:e=2}){let r=No($i);return r?.length<=1?null:(0,vr.jsxs)(Ho.__experimentalVStack,{spacing:3,children:[t&&(0,vr.jsx)(Se,{level:3,children:t}),(0,vr.jsx)(Ho.__experimentalGrid,{columns:3,gap:e,className:"global-styles-ui-style-variations-container",children:r.map((o,s)=>(0,vr.jsx)(zr,{variation:o,properties:$i,showTooltip:!0,children:()=>(0,vr.jsx)(Xi,{variation:o})},s))})]})}var Mh=u(ut(),1),yo=u(X(),1);var Gh=u(yt(),1);var He=u(yt(),1),or=u(fe(),1),rr=u(be(),1),gn=u(ut(),1);var mn=u(el(),1),rl=u(be(),1),ol="/wp/v2/font-families";function sl(t){let{receiveEntityRecords:e}=t.dispatch(rl.store);e("postType","wp_font_family",[],void 0,!0)}async function nl(t,e){let o=await(0,mn.default)({path:ol,method:"POST",body:t});return sl(e),{id:o.id,...o.font_family_settings,fontFace:[]}}async function al(t,e,r){let o={path:`${ol}/${t}/font-faces`,method:"POST",body:e},s=await(0,mn.default)(o);return sl(r),{id:s.id,...s.font_face_settings}}var ul=u(X(),1);var ke=u(ut(),1),pn=["otf","ttf","woff","woff2"],il={100:(0,ke._x)("Thin","font weight"),200:(0,ke._x)("Extra-light","font weight"),300:(0,ke._x)("Light","font weight"),400:(0,ke._x)("Normal","font weight"),500:(0,ke._x)("Medium","font weight"),600:(0,ke._x)("Semi-bold","font weight"),700:(0,ke._x)("Bold","font weight"),800:(0,ke._x)("Extra-bold","font weight"),900:(0,ke._x)("Black","font weight")},ll={normal:(0,ke._x)("Normal","font style"),italic:(0,ke._x)("Italic","font style")};var{File:fl}=window,{kebabCase:Lc}=vt(ul.privateApis);function tr(t,e={}){return!t.name&&(t.fontFamily||t.slug)&&(t.name=t.fontFamily||t.slug),{...t,...e}}function Bc(t){return typeof t!="string"?!1:t!==decodeURIComponent(t)}function Yo(t){let e=il[t.fontWeight??""]||t.fontWeight,r=t.fontStyle==="normal"?"":ll[t.fontStyle??""]||t.fontStyle;return`${e} ${r}`}function Dc(t=[],e=[]){let r=new Map;for(let o of t)r.set(`${o.fontWeight}${o.fontStyle}`,o);for(let o of e)r.set(`${o.fontWeight}${o.fontStyle}`,o);return Array.from(r.values())}function cl(t=[],e=[]){let r=new Map;for(let o of t)r.set(o.slug,{...o});for(let o of e)if(r.has(o.slug)){let{fontFace:s,...a}=o,n=r.get(o.slug),l=Dc(n.fontFace,s);r.set(o.slug,{...a,fontFace:l})}else r.set(o.slug,{...o});return Array.from(r.values())}async function er(t,e,r="all"){let o;if(typeof e=="string")o=`url(${e})`;else if(e instanceof fl)o=await e.arrayBuffer();else return;let a=await new window.FontFace(on(t.fontFamily),o,{style:t.fontStyle,weight:String(t.fontWeight)}).load();if((r==="document"||r==="all")&&document.fonts.add(a),r==="iframe"||r==="all"){let n=document.querySelector('iframe[name="editor-canvas"]');n?.contentDocument&&n.contentDocument.fonts.add(a)}}function fo(t,e="all"){let r=o=>{o.forEach(s=>{s.family===on(t?.fontFamily)&&s.weight===t?.fontWeight&&s.style===t?.fontStyle&&o.delete(s)})};if((e==="document"||e==="all")&&r(document.fonts),e==="iframe"||e==="all"){let o=document.querySelector('iframe[name="editor-canvas"]');o?.contentDocument&&r(o.contentDocument.fonts)}}function Mr(t){if(!t)return;let e;if(Array.isArray(t)?e=t[0]:e=t,!e.startsWith("file:."))return Bc(e)||(e=encodeURI(e)),e}function dl(t){let e=new FormData,{fontFace:r,category:o,...s}=t,a={...s,slug:Lc(t.slug)};return e.append("font_family_settings",JSON.stringify(a)),e}function ml(t){return(t?.fontFace??[]).map((r,o)=>{let s={...r},a=new FormData;if(s.file){let n=Array.isArray(s.file)?s.file:[s.file],l=[];n.forEach((m,f)=>{let c=`file-${o}-${f}`;a.append(c,m,m.name),l.push(c)}),s.src=l.length===1?l[0]:l,delete s.file,a.append("font_face_settings",JSON.stringify(s))}else a.append("font_face_settings",JSON.stringify(s));return a})}async function pl(t,e,r){let o=[];for(let a of e)try{let n=await al(t,a,r);o.push({status:"fulfilled",value:n})}catch(n){o.push({status:"rejected",reason:n})}let s={errors:[],successes:[]};return o.forEach((a,n)=>{if(a.status==="fulfilled"&&a.value){let l=a.value;s.successes.push(l)}else a.reason&&s.errors.push({data:e[n],message:a.reason.message})}),s}async function hl(t){t=Array.isArray(t)?t:[t];let e=await Promise.all(t.map(async r=>fetch(new Request(r)).then(o=>{if(!o.ok)throw new Error(`Error downloading font face asset from ${r}. Server responded with status: ${o.status}`);return o.blob()}).then(o=>{let s=r.split("/").pop();return new fl([o],s,{type:o.type})})));return e.length===1?e[0]:e}function hn(t,e){return e.findIndex(r=>r.fontWeight===t.fontWeight&&r.fontStyle===t.fontStyle)!==-1}function gl(t,e,r){e=Array.isArray(e)?[...e]:[e],t=Array.isArray(t)?[...t]:{...t};let o=e.pop(),s=t;for(let a of e){let n=s[a];s=s[a]=Array.isArray(n)?[...n]:{...n}}return s[o]=r,t}function qo(t,e,r=[]){let o=m=>m.slug===t.slug,s=m=>m.find(o),a=m=>m?r.filter(f=>!o(f)):[...r,t],n=m=>{let f=d=>d.fontWeight===e.fontWeight&&d.fontStyle===e.fontStyle;if(!m)return[...r,{...t,fontFace:[e]}];let c=m.fontFace||[];return c.find(f)?c=c.filter(d=>!f(d)):c=[...c,e],c.length===0?r.filter(d=>!o(d)):r.map(d=>o(d)?{...d,fontFace:c}:d)},l=s(r);return e?n(l):a(l)}var yl=u(z(),1),ne=(0,He.createContext)({});ne.displayName="FontLibraryContext";function Vc({children:t}){let e=(0,or.useRegistry)(),{saveEntityRecord:r,deleteEntityRecord:o}=(0,or.useDispatch)(rr.store),{globalStylesId:s}=(0,or.useSelect)(S=>{let{__experimentalGetCurrentGlobalStylesId:E}=S(rr.store);return{globalStylesId:E()}},[]),a=(0,rr.useEntityRecord)("root","globalStyles",s),[n,l]=(0,He.useState)(!1),{records:m=[],isResolving:f}=(0,rr.useEntityRecords)("postType","wp_font_family",{_embed:!0}),c=(m||[]).map(S=>({id:S.id,...S.font_family_settings||{},fontFace:S?._embedded?.font_faces?.map(E=>E.font_face_settings)||[]}))||[],[d,g]=_t("typography.fontFamilies"),h=async S=>{if(!a.record)return;let E=a.record,et=gl(E??{},["settings","typography","fontFamilies"],S);await r("root","globalStyles",et)},[v,_]=(0,He.useState)(""),[A,k]=(0,He.useState)(void 0),x=d?.theme?d.theme.map(S=>tr(S,{source:"theme"})).sort((S,E)=>S.name.localeCompare(E.name)):[],b=d?.custom?d.custom.map(S=>tr(S,{source:"custom"})).sort((S,E)=>S.name.localeCompare(E.name)):[],T=c?c.map(S=>tr(S,{source:"custom"})).sort((S,E)=>S.name.localeCompare(E.name)):[];(0,He.useEffect)(()=>{v||k(void 0)},[v]);let Y=S=>{if(!S){k(void 0);return}let et=(S.source==="theme"?x:T).find(ct=>ct.slug===S.slug);k({...et||S,source:S.source})},[I]=(0,He.useState)(new Set),V=S=>S.reduce((et,ct)=>{let at=ct?.fontFace&&ct.fontFace?.length>0?ct?.fontFace.map(Ct=>`${Ct.fontStyle??""}${Ct.fontWeight??""}`):["normal400"];return et[ct.slug]=at,et},{}),H=S=>V(S==="theme"?x:b),$=(S,E,et,ct)=>!E&&!et?!!H(ct)[S]:!!H(ct)[S]?.includes((E??"")+(et??"")),bt=(S,E)=>H(E)[S]||[];async function W(S){l(!0);try{let E=[],et=[];for(let at of S){let Ct=!1,Wt=await(0,or.resolveSelect)(rr.store).getEntityRecords("postType","wp_font_family",{slug:at.slug,per_page:1,_embed:!0}),Ot=Wt&&Wt.length>0?Wt[0]:null,J=Ot?{id:Ot.id,...Ot.font_family_settings,fontFace:(Ot?._embedded?.font_faces??[]).map(zt=>zt.font_face_settings)||[]}:null;J||(Ct=!0,J=await nl(dl(at),e));let St=J.fontFace&&at.fontFace?J.fontFace.filter(zt=>zt&&at.fontFace&&hn(zt,at.fontFace)):[];J.fontFace&&at.fontFace&&(at.fontFace=at.fontFace.filter(zt=>!hn(zt,J.fontFace)));let At=[],xe=[];if(at?.fontFace?.length??!1){let zt=await pl(J.id,ml(at),e);At=zt?.successes,xe=zt?.errors}(At?.length>0||St?.length>0)&&(J.fontFace=[...At],E.push(J)),J&&!at?.fontFace?.length&&E.push(J),Ct&&(at?.fontFace?.length??0)>0&&At?.length===0&&await o("postType","wp_font_family",J.id,{force:!0}),et=et.concat(xe)}let ct=et.reduce((at,Ct)=>at.includes(Ct.message)?at:[...at,Ct.message],[]);if(E.length>0){let at=it(E);await h(at)}if(ct.length>0){let at=new Error((0,gn.__)("There was an error installing fonts."));throw at.installationErrors=ct,at}}finally{l(!1)}}async function y(S){if(!S?.id)throw new Error((0,gn.__)("Font family to uninstall is not defined."));try{await o("postType","wp_font_family",S.id,{force:!0});let E=L(S);return await h(E),{deleted:!0}}catch(E){throw console.error("There was an error uninstalling the font family:",E),E}}let L=S=>{let et=(d?.[S.source??""]??[]).filter(at=>at.slug!==S.slug),ct={...d,[S.source??""]:et};return g(ct),S.fontFace&&S.fontFace.forEach(at=>{fo(at,"all")}),ct},it=S=>{let E=ot(S),et={...d,custom:cl(d?.custom,E)};return g(et),K(E),et},ot=S=>S.map(({id:E,fontFace:et,...ct})=>({...ct,...et&&et.length>0?{fontFace:et.map(({id:at,...Ct})=>Ct)}:{}})),K=S=>{S.forEach(E=>{E.fontFace&&E.fontFace.forEach(et=>{let ct=Mr(et?.src??"");ct&&er(et,ct,"all")})})},gt=(S,E)=>{let et=d?.[S.source??""]??[],ct=qo(S,E,et);g({...d,[S.source??""]:ct});let at=$(S.slug,E?.fontStyle??"",E?.fontWeight??"",S.source??"custom");if(E&&at)fo(E,"all");else{let Ct=Mr(E?.src??"");E&&Ct&&er(E,Ct,"all")}},R=async S=>{if(!S.src)return;let E=Mr(S.src);!E||I.has(E)||(er(S,E,"document"),I.add(E))};return(0,yl.jsx)(ne.Provider,{value:{libraryFontSelected:A,handleSetLibraryFontSelected:Y,fontFamilies:d??{},baseCustomFonts:T,isFontActivated:$,getFontFacesActivated:bt,loadFontFaceAsset:R,installFonts:W,uninstallFontFamily:y,toggleActivateFont:gt,getAvailableFontsOutline:V,modalTabOpen:v,setModalTabOpen:_,saveFontFamilies:h,isResolvingLibrary:f,isInstalling:n},children:t})}var Zo=Vc;var us=u(ut(),1),Sn=u(X(),1),$l=u(be(),1),Nh=u(fe(),1);var ht=u(X(),1),mo=u(be(),1),yn=u(fe(),1),wr=u(yt(),1),Et=u(ut(),1);var jr=u(ut(),1),Oe=u(X(),1);var vl=u(X(),1),Ve=u(yt(),1);var Xo=u(z(),1);function Nc(t){if(t.preview)return t.preview;if(t.src)return Array.isArray(t.src)?t.src[0]:t.src}function zc(t){return"fontStyle"in t&&t.fontStyle||"fontWeight"in t&&t.fontWeight?t:"fontFace"in t&&t.fontFace&&t.fontFace.length?t.fontFace.find(e=>e.fontStyle==="normal"&&e.fontWeight==="400")||t.fontFace[0]:{fontStyle:"normal",fontWeight:"400",fontFamily:t.fontFamily}}function Mc({font:t,text:e}){let r=(0,Ve.useRef)(null),o=zc(t),s=Br(t);e=e||("name"in t?t.name:"");let a=t.preview,[n,l]=(0,Ve.useState)(!1),[m,f]=(0,Ve.useState)(!1),{loadFontFaceAsset:c}=(0,Ve.useContext)(ne),d=a??Nc(o),g=d&&d.match(/\.(png|jpg|jpeg|gif|svg)$/i),h=ki(o),v={fontSize:"18px",lineHeight:1,opacity:m?"1":"0",...s,...h};return(0,Ve.useEffect)(()=>{let _=new window.IntersectionObserver(([A])=>{l(A.isIntersecting)},{});return r.current&&_.observe(r.current),()=>_.disconnect()},[r]),(0,Ve.useEffect)(()=>{(async()=>n&&(!g&&o.src&&await c(o),f(!0)))()},[o,n,c,g]),(0,Xo.jsx)("div",{ref:r,children:g?(0,Xo.jsx)("img",{src:d,loading:"lazy",alt:e,className:"font-library__font-variant_demo-image"}):(0,Xo.jsx)(vl.__experimentalText,{style:v,className:"font-library__font-variant_demo-text",children:e})})}var Gr=Mc;var Ne=u(z(),1);function Gc({font:t,onClick:e,variantsText:r,navigatorPath:o}){let s=t.fontFace?.length||1,a={cursor:e?"pointer":"default"},n=(0,Oe.useNavigator)();return(0,Ne.jsx)(Oe.Button,{__next40pxDefaultSize:!0,onClick:()=>{e(),o&&n.goTo(o)},style:a,className:"font-library__font-card",children:(0,Ne.jsxs)(Oe.Flex,{justify:"space-between",wrap:!1,children:[(0,Ne.jsx)(Gr,{font:t}),(0,Ne.jsxs)(Oe.Flex,{justify:"flex-end",children:[(0,Ne.jsx)(Oe.FlexItem,{children:(0,Ne.jsx)(Oe.__experimentalText,{className:"font-library__font-card__count",children:r||(0,jr.sprintf)((0,jr._n)("%d variant","%d variants",s),s)})}),(0,Ne.jsx)(Oe.FlexItem,{children:(0,Ne.jsx)(to,{icon:(0,jr.isRTL)()?ur:fr})})]})]})})}var co=Gc;var Ko=u(yt(),1),Jo=u(X(),1);var br=u(z(),1);function jc({face:t,font:e}){let{isFontActivated:r,toggleActivateFont:o}=(0,Ko.useContext)(ne),s=(e?.fontFace?.length??0)>0?r(e.slug,t.fontStyle,t.fontWeight,e.source):r(e.slug,void 0,void 0,e.source),a=()=>{if((e?.fontFace?.length??0)>0){o(e,t);return}o(e)},n=e.name+" "+Yo(t),l=(0,Ko.useId)();return(0,br.jsx)("div",{className:"font-library__font-card",children:(0,br.jsxs)(Jo.Flex,{justify:"flex-start",align:"center",gap:"1rem",children:[(0,br.jsx)(Jo.CheckboxControl,{checked:s,onChange:a,id:l}),(0,br.jsx)("label",{htmlFor:l,children:(0,br.jsx)(Gr,{font:t,text:n,onClick:a})})]})})}var bl=jc;function wl(t){switch(t){case"normal":return 400;case"bold":return 700;case"bolder":return 500;case"lighter":return 300;default:return parseInt(t,10)}}function Qo(t){return t.sort((e,r)=>e.fontStyle==="normal"&&r.fontStyle!=="normal"?-1:r.fontStyle==="normal"&&e.fontStyle!=="normal"?1:e.fontStyle===r.fontStyle?wl(e.fontWeight?.toString()??"normal")-wl(r.fontWeight?.toString()??"normal"):!e.fontStyle||!r.fontStyle?e.fontStyle?-1:1:e.fontStyle.localeCompare(r.fontStyle))}var ft=u(z(),1);function Uc(){let{baseCustomFonts:t,libraryFontSelected:e,handleSetLibraryFontSelected:r,uninstallFontFamily:o,isResolvingLibrary:s,isInstalling:a,saveFontFamilies:n,getFontFacesActivated:l}=(0,wr.useContext)(ne),[m,f]=_t("typography.fontFamilies"),[c,d]=(0,wr.useState)(!1),[g,h]=(0,wr.useState)(null),[v]=_t("typography.fontFamilies",void 0,"base"),_=(0,yn.useSelect)(R=>{let{__experimentalGetCurrentGlobalStylesId:S}=R(mo.store);return S()},[]),k=!!(0,mo.useEntityRecord)("root","globalStyles",_)?.edits?.settings?.typography?.fontFamilies,x=m?.theme?m.theme.map(R=>tr(R,{source:"theme"})).sort((R,S)=>R.name.localeCompare(S.name)):[],b=new Set(x.map(R=>R.slug)),T=v?.theme?x.concat(v.theme.filter(R=>!b.has(R.slug)).map(R=>tr(R,{source:"theme"})).sort((R,S)=>R.name.localeCompare(S.name))):[],Y=e?.source==="custom"&&e?.id,I=(0,yn.useSelect)(R=>{let{canUser:S}=R(mo.store);return Y&&S("delete",{kind:"postType",name:"wp_font_family",id:Y})},[Y]),V=!!e&&e?.source!=="theme"&&I,H=()=>{d(!0)},$=async()=>{h(null);try{await n(m),h({type:"success",message:(0,Et.__)("Font family updated successfully.")})}catch(R){h({type:"error",message:(0,Et.sprintf)((0,Et.__)("There was an error updating the font family. %s"),R.message)})}},bt=R=>R?!R.fontFace||!R.fontFace.length?[{fontFamily:R.fontFamily,fontStyle:"normal",fontWeight:"400"}]:Qo(R.fontFace):[],W=R=>{let S=R?.fontFace&&(R?.fontFace?.length??0)>0?R.fontFace.length:1,E=l(R.slug,R.source).length;return(0,Et.sprintf)((0,Et.__)("%1$d/%2$d variants active"),E,S)};(0,wr.useEffect)(()=>{r(e)},[]);let y=e?l(e.slug,e.source).length:0,L=e?.fontFace?.length??(e?.fontFamily?1:0),it=y>0&&y!==L,ot=y===L,K=()=>{if(!e||!e?.source)return;let R=m?.[e.source]?.filter(E=>E.slug!==e.slug)??[],S=ot?R:[...R,e];f({...m,[e.source]:S}),e.fontFace&&e.fontFace.forEach(E=>{if(ot)fo(E,"all");else{let et=Mr(E?.src??"");et&&er(E,et,"all")}})},gt=T.length>0||t.length>0;return(0,ft.jsxs)("div",{className:"font-library__tabpanel-layout",children:[s&&(0,ft.jsx)("div",{className:"font-library__loading",children:(0,ft.jsx)(ht.ProgressBar,{})}),!s&&(0,ft.jsxs)(ft.Fragment,{children:[(0,ft.jsxs)(ht.Navigator,{initialPath:e?"/fontFamily":"/",children:[(0,ft.jsx)(ht.Navigator.Screen,{path:"/",children:(0,ft.jsxs)(ht.__experimentalVStack,{spacing:"8",children:[g&&(0,ft.jsx)(ht.Notice,{status:g.type,onRemove:()=>h(null),children:g.message}),!gt&&(0,ft.jsx)(ht.__experimentalText,{as:"p",children:(0,Et.__)("No fonts installed.")}),T.length>0&&(0,ft.jsxs)(ht.__experimentalVStack,{children:[(0,ft.jsx)("h2",{className:"font-library__fonts-title",children:(0,Et._x)("Theme","font source")}),(0,ft.jsx)("ul",{role:"list",className:"font-library__fonts-list",children:T.map(R=>(0,ft.jsx)("li",{className:"font-library__fonts-list-item",children:(0,ft.jsx)(co,{font:R,navigatorPath:"/fontFamily",variantsText:W(R),onClick:()=>{h(null),r(R)}})},R.slug))})]}),t.length>0&&(0,ft.jsxs)(ht.__experimentalVStack,{children:[(0,ft.jsx)("h2",{className:"font-library__fonts-title",children:(0,Et._x)("Custom","font source")}),(0,ft.jsx)("ul",{role:"list",className:"font-library__fonts-list",children:t.map(R=>(0,ft.jsx)("li",{className:"font-library__fonts-list-item",children:(0,ft.jsx)(co,{font:R,navigatorPath:"/fontFamily",variantsText:W(R),onClick:()=>{h(null),r(R)}})},R.slug))})]})]})}),(0,ft.jsxs)(ht.Navigator.Screen,{path:"/fontFamily",children:[e&&(0,ft.jsx)(Hc,{font:e,isOpen:c,setIsOpen:d,setNotice:h,uninstallFontFamily:o,handleSetLibraryFontSelected:r}),(0,ft.jsxs)(ht.Flex,{justify:"flex-start",children:[(0,ft.jsx)(ht.Navigator.BackButton,{icon:(0,Et.isRTL)()?fr:ur,size:"small",onClick:()=>{r(void 0),h(null)},label:(0,Et.__)("Back")}),(0,ft.jsx)(ht.__experimentalHeading,{level:2,size:13,className:"global-styles-ui-header",children:e?.name})]}),g&&(0,ft.jsxs)(ft.Fragment,{children:[(0,ft.jsx)(ht.__experimentalSpacer,{margin:1}),(0,ft.jsx)(ht.Notice,{status:g.type,onRemove:()=>h(null),children:g.message}),(0,ft.jsx)(ht.__experimentalSpacer,{margin:1})]}),(0,ft.jsx)(ht.__experimentalSpacer,{margin:4}),(0,ft.jsx)(ht.__experimentalText,{children:(0,Et.__)("Choose font variants. Keep in mind that too many variants could make your site slower.")}),(0,ft.jsx)(ht.__experimentalSpacer,{margin:4}),(0,ft.jsxs)(ht.__experimentalVStack,{spacing:0,children:[(0,ft.jsx)(ht.CheckboxControl,{className:"font-library__select-all",label:(0,Et.__)("Select all"),checked:ot,onChange:K,indeterminate:it}),(0,ft.jsx)(ht.__experimentalSpacer,{margin:8}),(0,ft.jsx)("ul",{role:"list",className:"font-library__fonts-list",children:e&&bt(e).map((R,S)=>(0,ft.jsx)("li",{className:"font-library__fonts-list-item",children:(0,ft.jsx)(bl,{font:e,face:R},`face${S}`)},`face${S}`))})]})]})]}),(0,ft.jsxs)(ht.__experimentalHStack,{justify:"flex-end",className:"font-library__footer",children:[a&&(0,ft.jsx)(ht.ProgressBar,{}),V&&(0,ft.jsx)(ht.Button,{__next40pxDefaultSize:!0,isDestructive:!0,variant:"tertiary",onClick:H,children:(0,Et.__)("Delete")}),(0,ft.jsx)(ht.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:$,disabled:!k,accessibleWhenDisabled:!0,children:(0,Et.__)("Update")})]})]})]})}function Hc({font:t,isOpen:e,setIsOpen:r,setNotice:o,uninstallFontFamily:s,handleSetLibraryFontSelected:a}){let n=(0,ht.useNavigator)(),l=async()=>{o(null),r(!1);try{await s(t),n.goBack(),a(void 0),o({type:"success",message:(0,Et.__)("Font family uninstalled successfully.")})}catch(f){o({type:"error",message:(0,Et.__)("There was an error uninstalling the font family.")+f.message})}},m=()=>{r(!1)};return(0,ft.jsx)(ht.__experimentalConfirmDialog,{isOpen:e,cancelButtonText:(0,Et.__)("Cancel"),confirmButtonText:(0,Et.__)("Delete"),onCancel:m,onConfirm:l,size:"medium",children:t&&(0,Et.sprintf)((0,Et.__)('Are you sure you want to delete "%s" font and all its variants and assets?'),t.name)})}var $o=Uc;var Zt=u(yt(),1),nt=u(X(),1),_l=u(cr(),1),Rt=u(ut(),1);var Pl=u(be(),1);function Sl(t,e){let{category:r,search:o}=e,s=t||[];return r&&r!=="all"&&(s=s.filter(a=>a.categories&&a.categories.indexOf(r)!==-1)),o&&(s=s.filter(a=>a.font_family_settings&&a.font_family_settings.name.toLowerCase().includes(o.toLowerCase()))),s}function xl(t){return t.reduce((e,r)=>({...e,[r.slug]:(r?.fontFace||[]).reduce((o,s)=>({...o,[`${s.fontStyle}-${s.fontWeight}`]:!0}),{})}),{})}function Cl(t,e,r){return e?!!r[t]?.[`${e.fontStyle}-${e.fontWeight}`]:!!r[t]}var po=u(ut(),1),ae=u(X(),1),Te=u(z(),1);function Wc(){let t=()=>{window.localStorage.setItem("wp-font-library-google-fonts-permission","true"),window.dispatchEvent(new Event("storage"))};return(0,Te.jsx)("div",{className:"font-library__google-fonts-confirm",children:(0,Te.jsx)(ae.Card,{children:(0,Te.jsxs)(ae.CardBody,{children:[(0,Te.jsx)(ae.__experimentalHeading,{level:2,children:(0,po.__)("Connect to Google Fonts")}),(0,Te.jsx)(ae.__experimentalSpacer,{margin:6}),(0,Te.jsx)(ae.__experimentalText,{as:"p",children:(0,po.__)("To install fonts from Google you must give permission to connect directly to Google servers. The fonts you install will be downloaded from Google and stored on your site. Your site will then use these locally-hosted fonts.")}),(0,Te.jsx)(ae.__experimentalSpacer,{margin:3}),(0,Te.jsx)(ae.__experimentalText,{as:"p",children:(0,po.__)("You can alternatively upload files directly on the Upload tab.")}),(0,Te.jsx)(ae.__experimentalSpacer,{margin:6}),(0,Te.jsx)(ae.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:t,children:(0,po.__)("Allow access to Google Fonts")})]})})})}var Fl=Wc;var kl=u(yt(),1),ts=u(X(),1);var Sr=u(z(),1);function Yc({face:t,font:e,handleToggleVariant:r,selected:o}){let s=()=>{if(e?.fontFace){r(e,t);return}r(e)},a=e.name+" "+Yo(t),n=(0,kl.useId)();return(0,Sr.jsx)("div",{className:"font-library__font-card",children:(0,Sr.jsxs)(ts.Flex,{justify:"flex-start",align:"center",gap:"1rem",children:[(0,Sr.jsx)(ts.CheckboxControl,{checked:o,onChange:s,id:n}),(0,Sr.jsx)("label",{htmlFor:n,children:(0,Sr.jsx)(Gr,{font:t,text:a,onClick:s})})]})})}var Ol=Yc;var tt=u(z(),1),qc={slug:"all",name:(0,Rt._x)("All","font categories")},Tl="wp-font-library-google-fonts-permission",Zc=500;function Xc({slug:t}){let e=t==="google-fonts",r=()=>window.localStorage.getItem(Tl)==="true",[o,s]=(0,Zt.useState)(null),[a,n]=(0,Zt.useState)(null),[l,m]=(0,Zt.useState)([]),[f,c]=(0,Zt.useState)(1),[d,g]=(0,Zt.useState)({}),[h,v]=(0,Zt.useState)(e&&!r()),{installFonts:_,isInstalling:A}=(0,Zt.useContext)(ne),{record:k,isResolving:x}=(0,Pl.useEntityRecord)("root","fontCollection",t);(0,Zt.useEffect)(()=>{let J=()=>{v(e&&!r())};return J(),window.addEventListener("storage",J),()=>window.removeEventListener("storage",J)},[t,e]);let b=()=>{window.localStorage.setItem(Tl,"false"),window.dispatchEvent(new Event("storage"))};(0,Zt.useEffect)(()=>{s(null)},[t]),(0,Zt.useEffect)(()=>{m([])},[o]);let T=(0,Zt.useMemo)(()=>k?.font_families??[],[k]),Y=k?.categories??[],I=[qc,...Y],V=(0,Zt.useMemo)(()=>Sl(T,d),[T,d]),H=Math.max(window.innerHeight,Zc),$=Math.floor((H-417)/61),bt=Math.ceil(V.length/$),W=(f-1)*$,y=f*$,L=V.slice(W,y),it=J=>{g({...d,category:J}),c(1)},K=(0,_l.debounce)(J=>{g({...d,search:J}),c(1)},300),gt=(J,St)=>{let At=qo(J,St,l);m(At)},R=xl(l),S=()=>{m([])},E=l.length>0?l[0]?.fontFace?.length??0:0,et=E>0&&E!==o?.fontFace?.length,ct=E===o?.fontFace?.length,at=()=>{let J=[];!ct&&o&&J.push(o),m(J)},Ct=async()=>{n(null);let J=l[0];try{J?.fontFace&&await Promise.all(J.fontFace.map(async St=>{St.src&&(St.file=await hl(St.src))}))}catch{n({type:"error",message:(0,Rt.__)("Error installing the fonts, could not be downloaded.")});return}try{await _([J]),n({type:"success",message:(0,Rt.__)("Fonts were installed successfully.")})}catch(St){n({type:"error",message:St.message})}S()},Wt=J=>J?!J.fontFace||!J.fontFace.length?[{fontFamily:J.fontFamily,fontStyle:"normal",fontWeight:"400"}]:Qo(J.fontFace):[];if(h)return(0,tt.jsx)(Fl,{});let Ot=()=>t!=="google-fonts"||h||o?null:(0,tt.jsx)(nt.DropdownMenu,{icon:Ls,label:(0,Rt.__)("Actions"),popoverProps:{position:"bottom left"},controls:[{title:(0,Rt.__)("Revoke access to Google Fonts"),onClick:b}]});return(0,tt.jsxs)("div",{className:"font-library__tabpanel-layout",children:[x&&(0,tt.jsx)("div",{className:"font-library__loading",children:(0,tt.jsx)(nt.ProgressBar,{})}),!x&&k&&(0,tt.jsxs)(tt.Fragment,{children:[(0,tt.jsxs)(nt.Navigator,{initialPath:"/",className:"font-library__tabpanel-layout",children:[(0,tt.jsxs)(nt.Navigator.Screen,{path:"/",children:[(0,tt.jsxs)(nt.__experimentalHStack,{justify:"space-between",children:[(0,tt.jsxs)(nt.__experimentalVStack,{children:[(0,tt.jsx)(nt.__experimentalHeading,{level:2,size:13,children:k.name}),(0,tt.jsx)(nt.__experimentalText,{children:k.description})]}),(0,tt.jsx)(Ot,{})]}),(0,tt.jsx)(nt.__experimentalSpacer,{margin:4}),(0,tt.jsxs)(nt.__experimentalHStack,{spacing:4,justify:"space-between",children:[(0,tt.jsx)(nt.SearchControl,{value:d.search,placeholder:(0,Rt.__)("Font name\u2026"),label:(0,Rt.__)("Search"),onChange:K,hideLabelFromVision:!1}),(0,tt.jsx)(nt.SelectControl,{__next40pxDefaultSize:!0,label:(0,Rt.__)("Category"),value:d.category,onChange:it,children:I&&I.map(J=>(0,tt.jsx)("option",{value:J.slug,children:J.name},J.slug))})]}),(0,tt.jsx)(nt.__experimentalSpacer,{margin:4}),!!k?.font_families?.length&&!V.length&&(0,tt.jsx)(nt.__experimentalText,{children:(0,Rt.__)("No fonts found. Try with a different search term.")}),(0,tt.jsx)("div",{className:"font-library__fonts-grid__main",children:(0,tt.jsx)("ul",{role:"list",className:"font-library__fonts-list",children:L.map(J=>(0,tt.jsx)("li",{className:"font-library__fonts-list-item",children:(0,tt.jsx)(co,{font:J.font_family_settings,navigatorPath:"/fontFamily",onClick:()=>{s(J.font_family_settings)}})},J.font_family_settings.slug))})})]}),(0,tt.jsxs)(nt.Navigator.Screen,{path:"/fontFamily",children:[(0,tt.jsxs)(nt.Flex,{justify:"flex-start",children:[(0,tt.jsx)(nt.Navigator.BackButton,{icon:(0,Rt.isRTL)()?fr:ur,size:"small",onClick:()=>{s(null),n(null)},label:(0,Rt.__)("Back")}),(0,tt.jsx)(nt.__experimentalHeading,{level:2,size:13,className:"global-styles-ui-header",children:o?.name})]}),a&&(0,tt.jsxs)(tt.Fragment,{children:[(0,tt.jsx)(nt.__experimentalSpacer,{margin:1}),(0,tt.jsx)(nt.Notice,{status:a.type,onRemove:()=>n(null),children:a.message}),(0,tt.jsx)(nt.__experimentalSpacer,{margin:1})]}),(0,tt.jsx)(nt.__experimentalSpacer,{margin:4}),(0,tt.jsx)(nt.__experimentalText,{children:(0,Rt.__)("Select font variants to install.")}),(0,tt.jsx)(nt.__experimentalSpacer,{margin:4}),(0,tt.jsx)(nt.CheckboxControl,{className:"font-library__select-all",label:(0,Rt.__)("Select all"),checked:ct,onChange:at,indeterminate:et}),(0,tt.jsx)(nt.__experimentalVStack,{spacing:0,children:(0,tt.jsx)("ul",{role:"list",className:"font-library__fonts-list",children:o&&Wt(o).map((J,St)=>(0,tt.jsx)("li",{className:"font-library__fonts-list-item",children:(0,tt.jsx)(Ol,{font:o,face:J,handleToggleVariant:gt,selected:Cl(o.slug,o.fontFace?J:null,R)})},`face${St}`))})}),(0,tt.jsx)(nt.__experimentalSpacer,{margin:16})]})]}),o&&(0,tt.jsx)(nt.Flex,{justify:"flex-end",className:"font-library__footer",children:(0,tt.jsx)(nt.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:Ct,isBusy:A,disabled:l.length===0||A,accessibleWhenDisabled:!0,children:(0,Rt.__)("Install")})}),!o&&(0,tt.jsxs)(nt.__experimentalHStack,{expanded:!1,className:"font-library__footer",justify:"end",spacing:6,children:[(0,tt.jsx)(nt.__experimentalHStack,{justify:"flex-start",expanded:!1,spacing:1,className:"font-library__page-selection",children:(0,Zt.createInterpolateElement)((0,Rt.sprintf)((0,Rt._x)("
      Page
      %1$s
      of %2$d
      ","paging"),"",bt),{div:(0,tt.jsx)("div",{"aria-hidden":!0}),CurrentPage:(0,tt.jsx)(nt.SelectControl,{"aria-label":(0,Rt.__)("Current page"),value:f.toString(),options:[...Array(bt)].map((J,St)=>({label:(St+1).toString(),value:(St+1).toString()})),onChange:J=>c(parseInt(J)),size:"small",variant:"minimal"})})}),(0,tt.jsxs)(nt.__experimentalHStack,{expanded:!1,spacing:1,children:[(0,tt.jsx)(nt.Button,{onClick:()=>c(f-1),disabled:f===1,accessibleWhenDisabled:!0,label:(0,Rt.__)("Previous page"),icon:(0,Rt.isRTL)()?Eo:Lo,showTooltip:!0,size:"compact",tooltipPosition:"top"}),(0,tt.jsx)(nt.Button,{onClick:()=>c(f+1),disabled:f===bt,accessibleWhenDisabled:!0,label:(0,Rt.__)("Next page"),icon:(0,Rt.isRTL)()?Lo:Eo,showTooltip:!0,size:"compact",tooltipPosition:"top"})]})]})]})]})}var es=Xc;var Ur=u(ut(),1),$t=u(X(),1),go=u(yt(),1);var rs=(t=>typeof ue<"u"?ue:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof ue<"u"?ue:e)[r]}):t)(function(t){if(typeof ue<"u")return ue.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')}),Al=(function(){var t,e,r;return(function(){function o(s,a,n){function l(c,d){if(!a[c]){if(!s[c]){var g=typeof rs=="function"&&rs;if(!d&&g)return g(c,!0);if(m)return m(c,!0);var h=new Error("Cannot find module '"+c+"'");throw h.code="MODULE_NOT_FOUND",h}var v=a[c]={exports:{}};s[c][0].call(v.exports,function(_){var A=s[c][1][_];return l(A||_)},v,v.exports,o,s,a,n)}return a[c].exports}for(var m=typeof rs=="function"&&rs,f=0;f0},c.prototype.readMoreInput=function(){if(!(this.bit_end_pos_>256))if(this.eos_){if(this.bit_pos_>this.bit_end_pos_)throw new Error("Unexpected end of input "+this.bit_pos_+" "+this.bit_end_pos_)}else{var d=this.buf_ptr_,g=this.input_.read(this.buf_,d,n);if(g<0)throw new Error("Unexpected end of input");if(g=8;)this.val_>>>=8,this.val_|=this.buf_[this.pos_&m]<<24,++this.pos_,this.bit_pos_=this.bit_pos_-8>>>0,this.bit_end_pos_=this.bit_end_pos_-8>>>0},c.prototype.readBits=function(d){32-this.bit_pos_>>this.bit_pos_&f[d];return this.bit_pos_+=d,g},s.exports=c},{}],2:[function(o,s,a){var n=0,l=1,m=2,f=3;a.lookup=new Uint8Array([0,0,0,0,0,0,0,0,0,4,4,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,12,16,12,12,20,12,16,24,28,12,12,32,12,36,12,44,44,44,44,44,44,44,44,44,44,32,32,24,40,28,12,12,48,52,52,52,48,52,52,52,48,52,52,52,52,52,48,52,52,52,52,52,48,52,52,52,52,52,24,12,28,12,12,12,56,60,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3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,0,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,56,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,22,22,22,22,23,23,23,23,24,24,24,24,25,25,25,25,26,26,26,26,27,27,27,27,28,28,28,28,29,29,29,29,30,30,30,30,31,31,31,31,32,32,32,32,33,33,33,33,34,34,34,34,35,35,35,35,36,36,36,36,37,37,37,37,38,38,38,38,39,39,39,39,40,40,40,40,41,41,41,41,42,42,42,42,43,43,43,43,44,44,44,44,45,45,45,45,46,46,46,46,47,47,47,47,48,48,48,48,49,49,49,49,50,50,50,50,51,51,51,51,52,52,52,52,53,53,53,53,54,54,54,54,55,55,55,55,56,56,56,56,57,57,57,57,58,58,58,58,59,59,59,59,60,60,60,60,61,61,61,61,62,62,62,62,63,63,63,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),a.lookupOffsets=new Uint16Array([1024,1536,1280,1536,0,256,768,512])},{}],3:[function(o,s,a){var n=o("./streams").BrotliInput,l=o("./streams").BrotliOutput,m=o("./bit_reader"),f=o("./dictionary"),c=o("./huffman").HuffmanCode,d=o("./huffman").BrotliBuildHuffmanTable,g=o("./context"),h=o("./prefix"),v=o("./transform"),_=8,A=16,k=256,x=704,b=26,T=6,Y=2,I=8,V=255,H=1080,$=18,bt=new Uint8Array([1,2,3,4,0,5,17,6,16,7,8,9,10,11,12,13,14,15]),W=16,y=new Uint8Array([3,2,1,0,3,3,3,3,3,3,2,2,2,2,2,2]),L=new Int8Array([0,0,0,0,-1,1,-2,2,-3,3,-1,1,-2,2,-3,3]),it=new Uint16Array([256,402,436,468,500,534,566,598,630,662,694,726,758,790,822,854,886,920,952,984,1016,1048,1080]);function ot(N){var O;return N.readBits(1)===0?16:(O=N.readBits(3),O>0?17+O:(O=N.readBits(3),O>0?8+O:17))}function K(N){if(N.readBits(1)){var O=N.readBits(3);return O===0?1:N.readBits(O)+(1<1&&dt===0)throw new Error("Invalid size byte");O.meta_block_length|=dt<4&&rt===0)throw new Error("Invalid size nibble");O.meta_block_length|=rt<>>B.bit_pos_&V,D=N[O].bits-I,D>0&&(B.bit_pos_+=I,O+=N[O].value,O+=B.val_>>>B.bit_pos_&(1<0;){var Ft=0,Kt;if(P.readMoreInput(),P.fillBitWindow(),Ft+=P.val_>>>P.bit_pos_&31,P.bit_pos_+=lt[Ft].bits,Kt=lt[Ft].value&255,Kt>Kt);else{var he=Kt-14,te,Jt,Dt=0;if(Kt===A&&(Dt=dt),st!==Dt&&(rt=0,st=Dt),te=rt,rt>0&&(rt-=2,rt<<=he),rt+=P.readBits(he)+3,Jt=rt-te,D+Jt>O)throw new Error("[ReadHuffmanCodeLengths] symbol + repeat_delta > num_symbols");for(var Qt=0;Qt0;++st){var Dt=bt[st],Qt=0,ee;P.fillBitWindow(),Qt+=P.val_>>>P.bit_pos_&15,P.bit_pos_+=Jt[Qt].bits,ee=Jt[Qt].value,Kt[Dt]=ee,ee!==0&&(he-=32>>ee,++te)}if(!(te===1||he===0))throw new Error("[ReadHuffmanCode] invalid num_codes or space");E(Kt,N,rt,P)}if(D=d(O,B,I,rt,N),D===0)throw new Error("[ReadHuffmanCode] BuildHuffmanTable failed: ");return D}function ct(N,O,B){var P,D;return P=S(N,O,B),D=h.kBlockLengthPrefixCode[P].nbits,h.kBlockLengthPrefixCode[P].offset+B.readBits(D)}function at(N,O,B){var P;return N>>5]),this.htrees=new Uint32Array(O)}Ot.prototype.decode=function(N){var O,B,P=0;for(O=0;O=N)throw new Error("[DecodeContextMap] i >= context_map_size");wt[rt]=0,++rt}else wt[rt]=lt-D,++rt}return O.readBits(1)&&Wt(wt,N),B}function St(N,O,B,P,D,dt,rt){var st=B*2,wt=B,lt=S(O,B*H,rt),q;lt===0?q=D[st+(dt[wt]&1)]:lt===1?q=D[st+(dt[wt]-1&1)]+1:q=lt-2,q>=N&&(q-=N),P[B]=q,D[st+(dt[wt]&1)]=q,++dt[wt]}function At(N,O,B,P,D,dt){var rt=D+1,st=B&D,wt=dt.pos_&m.IBUF_MASK,lt;if(O<8||dt.bit_pos_+(O<<3)0;)dt.readMoreInput(),P[st++]=dt.readBits(8),st===rt&&(N.write(P,rt),st=0);return}if(dt.bit_end_pos_<32)throw new Error("[CopyUncompressedBlockToOutput] br.bit_end_pos_ < 32");for(;dt.bit_pos_<32;)P[st]=dt.val_>>>dt.bit_pos_,dt.bit_pos_+=8,++st,--O;if(lt=dt.bit_end_pos_-dt.bit_pos_>>3,wt+lt>m.IBUF_MASK){for(var q=m.IBUF_MASK+1-wt,Ft=0;Ft=rt){N.write(P,rt),st-=rt;for(var Ft=0;Ft=rt;){if(lt=rt-st,dt.input_.read(P,st,lt)O.buffer.length){var lr=new Uint8Array(P+Mt);lr.set(O.buffer),O.buffer=lr}if(D=Me.input_end,Co=Me.is_uncompressed,Me.is_metadata){for(xe(pt);Mt>0;--Mt)pt.readMoreInput(),pt.readBits(8);continue}if(Mt!==0){if(Co){pt.bit_pos_=pt.bit_pos_+7&-8,At(O,Mt,P,q,lt,pt),P+=Mt;continue}for(B=0;B<3;++B)ge[B]=K(pt)+1,ge[B]>=2&&(et(ge[B]+2,Qt,B*H,pt),et(b,ee,B*H,pt),Ce[B]=ct(ee,B*H,pt),M[B]=1);for(pt.readMoreInput(),i=pt.readBits(2),U=W+(pt.readBits(4)<0;){var Nt,se,ie,Or,Ss,le,ye,Ge,Zr,Tr,Xr;for(pt.readMoreInput(),Ce[1]===0&&(St(ge[1],Qt,1,Ae,w,M,pt),Ce[1]=ct(ee,H,pt),Yt=Dt[1].htrees[Ae[1]]),--Ce[1],Nt=S(Dt[1].codes,Yt,pt),se=Nt>>6,se>=2?(se-=2,ye=-1):ye=0,ie=h.kInsertRangeLut[se]+(Nt>>3&7),Or=h.kCopyRangeLut[se]+(Nt&7),Ss=h.kInsertLengthPrefixCode[ie].offset+pt.readBits(h.kInsertLengthPrefixCode[ie].nbits),le=h.kCopyLengthPrefixCode[Or].offset+pt.readBits(h.kCopyLengthPrefixCode[Or].nbits),te=q[P-1<],Jt=q[P-2<],Tr=0;Tr4?3:le-2)&255,It=F[ir+Zr],ye=S(Dt[2].codes,Dt[2].htrees[It],pt),ye>=U){var xs,Qn,Kr;ye-=U,Qn=ye&Pt,ye>>=i,xs=(ye>>1)+1,Kr=(2+(ye&1)<st)if(le>=f.minDictionaryWordLength&&le<=f.maxDictionaryWordLength){var Kr=f.offsetsByLength[le],$n=Ge-st-1,ta=f.sizeBitsByLength[le],qu=(1<>ta;if(Kr+=Zu*le,ea=Ft){O.write(q,wt);for(var Fo=0;Fo0&&(Kt[he&3]=Ge,++he),le>Mt)throw new Error("Invalid backward reference. pos: "+P+" distance: "+Ge+" len: "+le+" bytes left: "+Mt);for(Tr=0;Tr>=1;return(d&h-1)+h}function f(d,g,h,v,_){do v-=h,d[g+v]=new n(_.bits,_.value);while(v>0)}function c(d,g,h){for(var v=1<0;--y[x])k=new n(x&255,W[b++]&65535),f(d,g+T,Y,$,k),T=m(T,x);for(V=bt-1,I=-1,x=h+1,Y=2;x<=l;++x,Y<<=1)for(;y[x]>0;--y[x])(T&V)!==I&&(g+=$,H=c(y,x,h),$=1<>h),Y,$,k),T=m(T,x);return bt}},{}],8:[function(o,s,a){"use strict";a.byteLength=h,a.toByteArray=_,a.fromByteArray=x;for(var n=[],l=[],m=typeof Uint8Array<"u"?Uint8Array:Array,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=0,d=f.length;c0)throw new Error("Invalid string. Length must be a multiple of 4");var Y=b.indexOf("=");Y===-1&&(Y=T);var I=Y===T?0:4-Y%4;return[Y,I]}function h(b){var T=g(b),Y=T[0],I=T[1];return(Y+I)*3/4-I}function v(b,T,Y){return(T+Y)*3/4-Y}function _(b){for(var T,Y=g(b),I=Y[0],V=Y[1],H=new m(v(b,I,V)),$=0,bt=V>0?I-4:I,W=0;W>16&255,H[$++]=T>>8&255,H[$++]=T&255;return V===2&&(T=l[b.charCodeAt(W)]<<2|l[b.charCodeAt(W+1)]>>4,H[$++]=T&255),V===1&&(T=l[b.charCodeAt(W)]<<10|l[b.charCodeAt(W+1)]<<4|l[b.charCodeAt(W+2)]>>2,H[$++]=T>>8&255,H[$++]=T&255),H}function A(b){return n[b>>18&63]+n[b>>12&63]+n[b>>6&63]+n[b&63]}function k(b,T,Y){for(var I,V=[],H=T;Hbt?bt:$+H));return I===1?(T=b[Y-1],V.push(n[T>>2]+n[T<<4&63]+"==")):I===2&&(T=(b[Y-2]<<8)+b[Y-1],V.push(n[T>>10]+n[T>>4&63]+n[T<<2&63]+"=")),V.join("")}},{}],9:[function(o,s,a){function n(l,m){this.offset=l,this.nbits=m}a.kBlockLengthPrefixCode=[new n(1,2),new n(5,2),new n(9,2),new n(13,2),new n(17,3),new n(25,3),new n(33,3),new n(41,3),new n(49,4),new n(65,4),new n(81,4),new n(97,4),new n(113,5),new n(145,5),new n(177,5),new n(209,5),new n(241,6),new n(305,6),new n(369,7),new n(497,8),new n(753,9),new n(1265,10),new n(2289,11),new n(4337,12),new n(8433,13),new n(16625,24)],a.kInsertLengthPrefixCode=[new n(0,0),new n(1,0),new n(2,0),new n(3,0),new n(4,0),new n(5,0),new n(6,1),new n(8,1),new n(10,2),new n(14,2),new n(18,3),new n(26,3),new n(34,4),new n(50,4),new n(66,5),new n(98,5),new n(130,6),new n(194,7),new n(322,8),new n(578,9),new n(1090,10),new n(2114,12),new n(6210,14),new n(22594,24)],a.kCopyLengthPrefixCode=[new n(2,0),new n(3,0),new n(4,0),new n(5,0),new n(6,0),new n(7,0),new n(8,0),new n(9,0),new n(10,1),new n(12,1),new n(14,2),new n(18,2),new n(22,3),new n(30,3),new n(38,4),new n(54,4),new n(70,5),new n(102,5),new n(134,6),new n(198,7),new n(326,8),new n(582,9),new n(1094,10),new n(2118,24)],a.kInsertRangeLut=[0,0,8,8,0,16,8,16,16],a.kCopyRangeLut=[0,8,0,8,16,0,16,8,16]},{}],10:[function(o,s,a){function n(m){this.buffer=m,this.pos=0}n.prototype.read=function(m,f,c){this.pos+c>this.buffer.length&&(c=this.buffer.length-this.pos);for(var d=0;dthis.buffer.length)throw new Error("Output buffer is not large enough");return this.buffer.set(m.subarray(0,f),this.pos),this.pos+=f,f},a.BrotliOutput=l},{}],11:[function(o,s,a){var n=o("./dictionary"),l=0,m=1,f=2,c=3,d=4,g=5,h=6,v=7,_=8,A=9,k=10,x=11,b=12,T=13,Y=14,I=15,V=16,H=17,$=18,bt=19,W=20;function y(ot,K,gt){this.prefix=new Uint8Array(ot.length),this.transform=K,this.suffix=new Uint8Array(gt.length);for(var R=0;R'),new y("",l,` +`),new y("",c,""),new y("",l,"]"),new y("",l," for "),new y("",Y,""),new y("",f,""),new y("",l," a "),new y("",l," that "),new y(" ",k,""),new y("",l,". "),new y(".",l,""),new y(" ",l,", "),new y("",I,""),new y("",l," with "),new y("",l,"'"),new y("",l," from "),new y("",l," by "),new y("",V,""),new y("",H,""),new y(" the ",l,""),new y("",d,""),new y("",l,". The "),new y("",x,""),new y("",l," on "),new y("",l," as "),new y("",l," is "),new y("",v,""),new y("",m,"ing "),new y("",l,` + `),new y("",l,":"),new y(" ",l,". "),new y("",l,"ed "),new y("",W,""),new y("",$,""),new y("",h,""),new y("",l,"("),new y("",k,", "),new y("",_,""),new y("",l," at "),new y("",l,"ly "),new y(" the ",l," of "),new y("",g,""),new y("",A,""),new y(" ",k,", "),new y("",k,'"'),new y(".",l,"("),new y("",x," "),new y("",k,'">'),new y("",l,'="'),new y(" ",l,"."),new y(".com/",l,""),new y(" the ",l," of the "),new y("",k,"'"),new y("",l,". This "),new y("",l,","),new y(".",l," "),new y("",k,"("),new y("",k,"."),new y("",l," not "),new y(" ",l,'="'),new y("",l,"er "),new y(" ",x," "),new y("",l,"al "),new y(" ",x,""),new y("",l,"='"),new y("",x,'"'),new y("",k,". "),new y(" ",l,"("),new y("",l,"ful "),new y(" ",k,". "),new y("",l,"ive "),new y("",l,"less "),new y("",x,"'"),new y("",l,"est "),new y(" ",k,"."),new y("",x,'">'),new y(" ",l,"='"),new y("",k,","),new y("",l,"ize "),new y("",x,"."),new y("\xC2\xA0",l,""),new y(" ",l,","),new y("",k,'="'),new y("",x,'="'),new y("",l,"ous "),new y("",x,", "),new y("",k,"='"),new y(" ",k,","),new y(" ",x,'="'),new y(" ",x,", "),new y("",x,","),new y("",x,"("),new y("",x,". "),new y(" ",x,"."),new y("",x,"='"),new y(" ",x,". "),new y(" ",k,'="'),new y(" ",x,"='"),new y(" ",k,"='")];a.kTransforms=L,a.kNumTransforms=L.length;function it(ot,K){return ot[K]<192?(ot[K]>=97&&ot[K]<=122&&(ot[K]^=32),1):ot[K]<224?(ot[K+1]^=32,2):(ot[K+2]^=5,3)}a.transformDictionaryWord=function(ot,K,gt,R,S){var E=L[S].prefix,et=L[S].suffix,ct=L[S].transform,at=ctR&&(at=R);for(var J=0;J0;){var St=it(ot,Ot);Ot+=St,R-=St}for(var At=0;Attypeof ue<"u"?ue:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof ue<"u"?ue:e)[r]}):t)(function(t){if(typeof ue<"u")return ue.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')}),Rl=(function(){var t,e,r;return(function(){function o(s,a,n){function l(c,d){if(!a[c]){if(!s[c]){var g=typeof os=="function"&&os;if(!d&&g)return g(c,!0);if(m)return m(c,!0);var h=new Error("Cannot find module '"+c+"'");throw h.code="MODULE_NOT_FOUND",h}var v=a[c]={exports:{}};s[c][0].call(v.exports,function(_){var A=s[c][1][_];return l(A||_)},v,v.exports,o,s,a,n)}return a[c].exports}for(var m=typeof os=="function"&&os,f=0;f=252?6:c>=248?5:c>=240?4:c>=224?3:c>=192?2:1;f[254]=f[254]=1,a.string2buf=function(g){var h,v,_,A,k,x=g.length,b=0;for(A=0;A>>6,h[k++]=128|v&63):v<65536?(h[k++]=224|v>>>12,h[k++]=128|v>>>6&63,h[k++]=128|v&63):(h[k++]=240|v>>>18,h[k++]=128|v>>>12&63,h[k++]=128|v>>>6&63,h[k++]=128|v&63);return h};function d(g,h){if(h<65534&&(g.subarray&&m||!g.subarray&&l))return String.fromCharCode.apply(null,n.shrinkBuf(g,h));for(var v="",_=0;_4){b[_++]=65533,v+=k-1;continue}for(A&=k===2?31:k===3?15:7;k>1&&v1){b[_++]=65533;continue}A<65536?b[_++]=A:(A-=65536,b[_++]=55296|A>>10&1023,b[_++]=56320|A&1023)}return d(b,_)},a.utf8border=function(g,h){var v;for(h=h||g.length,h>g.length&&(h=g.length),v=h-1;v>=0&&(g[v]&192)===128;)v--;return v<0||v===0?h:v+f[g[v]]>h?v:h}},{"./common":1}],3:[function(o,s,a){"use strict";function n(l,m,f,c){for(var d=l&65535|0,g=l>>>16&65535|0,h=0;f!==0;){h=f>2e3?2e3:f,f-=h;do d=d+m[c++]|0,g=g+d|0;while(--h);d%=65521,g%=65521}return d|g<<16|0}s.exports=n},{}],4:[function(o,s,a){"use strict";s.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],5:[function(o,s,a){"use strict";function n(){for(var f,c=[],d=0;d<256;d++){f=d;for(var g=0;g<8;g++)f=f&1?3988292384^f>>>1:f>>>1;c[d]=f}return c}var l=n();function m(f,c,d,g){var h=l,v=g+d;f^=-1;for(var _=g;_>>8^h[(f^c[_])&255];return f^-1}s.exports=m},{}],6:[function(o,s,a){"use strict";function n(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}s.exports=n},{}],7:[function(o,s,a){"use strict";var n=30,l=12;s.exports=function(f,c){var d,g,h,v,_,A,k,x,b,T,Y,I,V,H,$,bt,W,y,L,it,ot,K,gt,R,S;d=f.state,g=f.next_in,R=f.input,h=g+(f.avail_in-5),v=f.next_out,S=f.output,_=v-(c-f.avail_out),A=v+(f.avail_out-257),k=d.dmax,x=d.wsize,b=d.whave,T=d.wnext,Y=d.window,I=d.hold,V=d.bits,H=d.lencode,$=d.distcode,bt=(1<>>24,I>>>=L,V-=L,L=y>>>16&255,L===0)S[v++]=y&65535;else if(L&16){it=y&65535,L&=15,L&&(V>>=L,V-=L),V<15&&(I+=R[g++]<>>24,I>>>=L,V-=L,L=y>>>16&255,L&16){if(ot=y&65535,L&=15,Vk){f.msg="invalid distance too far back",d.mode=n;break t}if(I>>>=L,V-=L,L=v-_,ot>L){if(L=ot-L,L>b&&d.sane){f.msg="invalid distance too far back",d.mode=n;break t}if(K=0,gt=Y,T===0){if(K+=x-L,L2;)S[v++]=gt[K++],S[v++]=gt[K++],S[v++]=gt[K++],it-=3;it&&(S[v++]=gt[K++],it>1&&(S[v++]=gt[K++]))}else{K=v-ot;do S[v++]=S[K++],S[v++]=S[K++],S[v++]=S[K++],it-=3;while(it>2);it&&(S[v++]=S[K++],it>1&&(S[v++]=S[K++]))}}else if((L&64)===0){y=$[(y&65535)+(I&(1<>3,g-=it,V-=it<<3,I&=(1<>>24&255)+(w>>>8&65280)+((w&65280)<<8)+((w&255)<<24)}function Kt(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function he(w){var M;return!w||!w.state?T:(M=w.state,w.total_in=w.total_out=M.total=0,w.msg="",M.wrap&&(w.adler=M.wrap&1),M.mode=$,M.last=0,M.havedict=0,M.dmax=32768,M.head=null,M.hold=0,M.bits=0,M.lencode=M.lendyn=new n.Buf32(st),M.distcode=M.distdyn=new n.Buf32(wt),M.sane=1,M.back=-1,k)}function te(w){var M;return!w||!w.state?T:(M=w.state,M.wsize=0,M.whave=0,M.wnext=0,he(w))}function Jt(w,M){var i,U;return!w||!w.state||(U=w.state,M<0?(i=0,M=-M):(i=(M>>4)+1,M<48&&(M&=15)),M&&(M<8||M>15))?T:(U.window!==null&&U.wbits!==M&&(U.window=null),U.wrap=i,U.wbits=M,te(w))}function Dt(w,M){var i,U;return w?(U=new Kt,w.state=U,U.window=null,i=Jt(w,M),i!==k&&(w.state=null),i):T}function Qt(w){return Dt(w,q)}var ee=!0,pt,qr;function kr(w){if(ee){var M;for(pt=new n.Buf32(512),qr=new n.Buf32(32),M=0;M<144;)w.lens[M++]=8;for(;M<256;)w.lens[M++]=9;for(;M<280;)w.lens[M++]=7;for(;M<288;)w.lens[M++]=8;for(c(g,w.lens,0,288,pt,0,w.work,{bits:9}),M=0;M<32;)w.lens[M++]=5;c(h,w.lens,0,32,qr,0,w.work,{bits:5}),ee=!1}w.lencode=pt,w.lenbits=9,w.distcode=qr,w.distbits=5}function Mt(w,M,i,U){var Pt,G=w.state;return G.window===null&&(G.wsize=1<=G.wsize?(n.arraySet(G.window,M,i-G.wsize,G.wsize,0),G.wnext=0,G.whave=G.wsize):(Pt=G.wsize-G.wnext,Pt>U&&(Pt=U),n.arraySet(G.window,M,i-U,Pt,G.wnext),U-=Pt,U?(n.arraySet(G.window,M,i-U,U,0),G.wnext=U,G.whave=G.wsize):(G.wnext+=Pt,G.wnext===G.wsize&&(G.wnext=0),G.whave>>8&255,i.check=m(i.check,Nt,2,0),F=0,C=0,i.mode=bt;break}if(i.flags=0,i.head&&(i.head.done=!1),!(i.wrap&1)||(((F&255)<<8)+(F>>8))%31){w.msg="incorrect header check",i.mode=D;break}if((F&15)!==H){w.msg="unknown compression method",i.mode=D;break}if(F>>>=4,C-=4,Lt=(F&15)+8,i.wbits===0)i.wbits=Lt;else if(Lt>i.wbits){w.msg="invalid window size",i.mode=D;break}i.dmax=1<>8&1),i.flags&512&&(Nt[0]=F&255,Nt[1]=F>>>8&255,i.check=m(i.check,Nt,2,0)),F=0,C=0,i.mode=W;case W:for(;C<32;){if(j===0)break t;j--,F+=U[G++]<>>8&255,Nt[2]=F>>>16&255,Nt[3]=F>>>24&255,i.check=m(i.check,Nt,4,0)),F=0,C=0,i.mode=y;case y:for(;C<16;){if(j===0)break t;j--,F+=U[G++]<>8),i.flags&512&&(Nt[0]=F&255,Nt[1]=F>>>8&255,i.check=m(i.check,Nt,2,0)),F=0,C=0,i.mode=L;case L:if(i.flags&1024){for(;C<16;){if(j===0)break t;j--,F+=U[G++]<>>8&255,i.check=m(i.check,Nt,2,0)),F=0,C=0}else i.head&&(i.head.extra=null);i.mode=it;case it:if(i.flags&1024&&(Q=i.length,Q>j&&(Q=j),Q&&(i.head&&(Lt=i.head.extra_len-i.length,i.head.extra||(i.head.extra=new Array(i.head.extra_len)),n.arraySet(i.head.extra,U,G,Q,Lt)),i.flags&512&&(i.check=m(i.check,U,Q,G)),j-=Q,G+=Q,i.length-=Q),i.length))break t;i.length=0,i.mode=ot;case ot:if(i.flags&2048){if(j===0)break t;Q=0;do Lt=U[G+Q++],i.head&&Lt&&i.length<65536&&(i.head.name+=String.fromCharCode(Lt));while(Lt&&Q>9&1,i.head.done=!0),w.adler=i.check=0,i.mode=E;break;case R:for(;C<32;){if(j===0)break t;j--,F+=U[G++]<>>=C&7,C-=C&7,i.mode=O;break}for(;C<3;){if(j===0)break t;j--,F+=U[G++]<>>=1,C-=1,F&3){case 0:i.mode=ct;break;case 1:if(kr(i),i.mode=St,M===A){F>>>=2,C-=2;break t}break;case 2:i.mode=Wt;break;case 3:w.msg="invalid block type",i.mode=D}F>>>=2,C-=2;break;case ct:for(F>>>=C&7,C-=C&7;C<32;){if(j===0)break t;j--,F+=U[G++]<>>16^65535)){w.msg="invalid stored block lengths",i.mode=D;break}if(i.length=F&65535,F=0,C=0,i.mode=at,M===A)break t;case at:i.mode=Ct;case Ct:if(Q=i.length,Q){if(Q>j&&(Q=j),Q>Vt&&(Q=Vt),Q===0)break t;n.arraySet(Pt,U,G,Q,re),j-=Q,G+=Q,Vt-=Q,re+=Q,i.length-=Q;break}i.mode=E;break;case Wt:for(;C<14;){if(j===0)break t;j--,F+=U[G++]<>>=5,C-=5,i.ndist=(F&31)+1,F>>>=5,C-=5,i.ncode=(F&15)+4,F>>>=4,C-=4,i.nlen>286||i.ndist>30){w.msg="too many length or distance symbols",i.mode=D;break}i.have=0,i.mode=Ot;case Ot:for(;i.have>>=3,C-=3}for(;i.have<19;)i.lens[Or[i.have++]]=0;if(i.lencode=i.lendyn,i.lenbits=7,se={bits:i.lenbits},oe=c(d,i.lens,0,19,i.lencode,0,i.work,se),i.lenbits=se.bits,oe){w.msg="invalid code lengths set",i.mode=D;break}i.have=0,i.mode=J;case J:for(;i.have>>24,Gt=It>>>16&255,jt=It&65535,!(xt<=C);){if(j===0)break t;j--,F+=U[G++]<>>=xt,C-=xt,i.lens[i.have++]=jt;else{if(jt===16){for(ie=xt+2;C>>=xt,C-=xt,i.have===0){w.msg="invalid bit length repeat",i.mode=D;break}Lt=i.lens[i.have-1],Q=3+(F&3),F>>>=2,C-=2}else if(jt===17){for(ie=xt+3;C>>=xt,C-=xt,Lt=0,Q=3+(F&7),F>>>=3,C-=3}else{for(ie=xt+7;C>>=xt,C-=xt,Lt=0,Q=11+(F&127),F>>>=7,C-=7}if(i.have+Q>i.nlen+i.ndist){w.msg="invalid bit length repeat",i.mode=D;break}for(;Q--;)i.lens[i.have++]=Lt}}if(i.mode===D)break;if(i.lens[256]===0){w.msg="invalid code -- missing end-of-block",i.mode=D;break}if(i.lenbits=9,se={bits:i.lenbits},oe=c(g,i.lens,0,i.nlen,i.lencode,0,i.work,se),i.lenbits=se.bits,oe){w.msg="invalid literal/lengths set",i.mode=D;break}if(i.distbits=6,i.distcode=i.distdyn,se={bits:i.distbits},oe=c(h,i.lens,i.nlen,i.ndist,i.distcode,0,i.work,se),i.distbits=se.bits,oe){w.msg="invalid distances set",i.mode=D;break}if(i.mode=St,M===A)break t;case St:i.mode=At;case At:if(j>=6&&Vt>=258){w.next_out=re,w.avail_out=Vt,w.next_in=G,w.avail_in=j,i.hold=F,i.bits=C,f(w,Tt),re=w.next_out,Pt=w.output,Vt=w.avail_out,G=w.next_in,U=w.input,j=w.avail_in,F=i.hold,C=i.bits,i.mode===E&&(i.back=-1);break}for(i.back=0;It=i.lencode[F&(1<>>24,Gt=It>>>16&255,jt=It&65535,!(xt<=C);){if(j===0)break t;j--,F+=U[G++]<>Yt)],xt=It>>>24,Gt=It>>>16&255,jt=It&65535,!(Yt+xt<=C);){if(j===0)break t;j--,F+=U[G++]<>>=Yt,C-=Yt,i.back+=Yt}if(F>>>=xt,C-=xt,i.back+=xt,i.length=jt,Gt===0){i.mode=N;break}if(Gt&32){i.back=-1,i.mode=E;break}if(Gt&64){w.msg="invalid literal/length code",i.mode=D;break}i.extra=Gt&15,i.mode=xe;case xe:if(i.extra){for(ie=i.extra;C>>=i.extra,C-=i.extra,i.back+=i.extra}i.was=i.length,i.mode=zt;case zt:for(;It=i.distcode[F&(1<>>24,Gt=It>>>16&255,jt=It&65535,!(xt<=C);){if(j===0)break t;j--,F+=U[G++]<>Yt)],xt=It>>>24,Gt=It>>>16&255,jt=It&65535,!(Yt+xt<=C);){if(j===0)break t;j--,F+=U[G++]<>>=Yt,C-=Yt,i.back+=Yt}if(F>>>=xt,C-=xt,i.back+=xt,Gt&64){w.msg="invalid distance code",i.mode=D;break}i.offset=jt,i.extra=Gt&15,i.mode=sr;case sr:if(i.extra){for(ie=i.extra;C>>=i.extra,C-=i.extra,i.back+=i.extra}if(i.offset>i.dmax){w.msg="invalid distance too far back",i.mode=D;break}i.mode=Xe;case Xe:if(Vt===0)break t;if(Q=Tt-Vt,i.offset>Q){if(Q=i.offset-Q,Q>i.whave&&i.sane){w.msg="invalid distance too far back",i.mode=D;break}Q>i.wnext?(Q-=i.wnext,ar=i.wsize-Q):ar=i.wnext-Q,Q>i.length&&(Q=i.length),ir=i.window}else ir=Pt,ar=re-i.offset,Q=i.length;Q>Vt&&(Q=Vt),Vt-=Q,i.length-=Q;do Pt[re++]=ir[ar++];while(--Q);i.length===0&&(i.mode=At);break;case N:if(Vt===0)break t;Pt[re++]=i.length,Vt--,i.mode=At;break;case O:if(i.wrap){for(;C<32;){if(j===0)break t;j--,F|=U[G++]<=1&&At[it]===0;it--);if(ot>it&&(ot=it),it===0)return I[V++]=1<<24|64<<16|0,I[V++]=1<<24|64<<16|0,$.bits=1,0;for(L=1;L0&&(x===c||it!==1))return-1;for(xe[1]=0,W=1;Wm||x===g&&S>f)return 1;for(;;){Xe=W-gt,H[y]St?(N=zt[sr+H[y]],O=Ot[J+H[y]]):(N=96,O=0),et=1<>gt)+ct]=Xe<<24|N<<16|O|0;while(ct!==0);for(et=1<>=1;if(et!==0?(E&=et-1,E+=et):E=0,y++,--At[W]===0){if(W===it)break;W=b[T+H[y]]}if(W>ot&&(E&Ct)!==at){for(gt===0&&(gt=ot),Wt+=L,K=W-gt,R=1<m||x===g&&S>f)return 1;at=E&Ct,I[at]=ot<<24|K<<16|Wt-V|0}}return E!==0&&(I[Wt+E]=W-gt<<24|64<<16|0),$.bits=ot,0}},{"../utils/common":1}],10:[function(o,s,a){"use strict";s.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],11:[function(o,s,a){"use strict";function n(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}s.exports=n},{}],"/lib/inflate.js":[function(o,s,a){"use strict";var n=o("./zlib/inflate"),l=o("./utils/common"),m=o("./utils/strings"),f=o("./zlib/constants"),c=o("./zlib/messages"),d=o("./zlib/zstream"),g=o("./zlib/gzheader"),h=Object.prototype.toString;function v(k){if(!(this instanceof v))return new v(k);this.options=l.assign({chunkSize:16384,windowBits:0,to:""},k||{});var x=this.options;x.raw&&x.windowBits>=0&&x.windowBits<16&&(x.windowBits=-x.windowBits,x.windowBits===0&&(x.windowBits=-15)),x.windowBits>=0&&x.windowBits<16&&!(k&&k.windowBits)&&(x.windowBits+=32),x.windowBits>15&&x.windowBits<48&&(x.windowBits&15)===0&&(x.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new d,this.strm.avail_out=0;var b=n.inflateInit2(this.strm,x.windowBits);if(b!==f.Z_OK)throw new Error(c[b]);if(this.header=new g,n.inflateGetHeader(this.strm,this.header),x.dictionary&&(typeof x.dictionary=="string"?x.dictionary=m.string2buf(x.dictionary):h.call(x.dictionary)==="[object ArrayBuffer]"&&(x.dictionary=new Uint8Array(x.dictionary)),x.raw&&(b=n.inflateSetDictionary(this.strm,x.dictionary),b!==f.Z_OK)))throw new Error(c[b])}v.prototype.push=function(k,x){var b=this.strm,T=this.options.chunkSize,Y=this.options.dictionary,I,V,H,$,bt,W=!1;if(this.ended)return!1;V=x===~~x?x:x===!0?f.Z_FINISH:f.Z_NO_FLUSH,typeof k=="string"?b.input=m.binstring2buf(k):h.call(k)==="[object ArrayBuffer]"?b.input=new Uint8Array(k):b.input=k,b.next_in=0,b.avail_in=b.input.length;do{if(b.avail_out===0&&(b.output=new l.Buf8(T),b.next_out=0,b.avail_out=T),I=n.inflate(b,f.Z_NO_FLUSH),I===f.Z_NEED_DICT&&Y&&(I=n.inflateSetDictionary(this.strm,Y)),I===f.Z_BUF_ERROR&&W===!0&&(I=f.Z_OK,W=!1),I!==f.Z_STREAM_END&&I!==f.Z_OK)return this.onEnd(I),this.ended=!0,!1;b.next_out&&(b.avail_out===0||I===f.Z_STREAM_END||b.avail_in===0&&(V===f.Z_FINISH||V===f.Z_SYNC_FLUSH))&&(this.options.to==="string"?(H=m.utf8border(b.output,b.next_out),$=b.next_out-H,bt=m.buf2string(b.output,H),b.next_out=$,b.avail_out=T-$,$&&l.arraySet(b.output,b.output,H,$,0),this.onData(bt)):this.onData(l.shrinkBuf(b.output,b.next_out))),b.avail_in===0&&b.avail_out===0&&(W=!0)}while((b.avail_in>0||b.avail_out===0)&&I!==f.Z_STREAM_END);return I===f.Z_STREAM_END&&(V=f.Z_FINISH),V===f.Z_FINISH?(I=n.inflateEnd(this.strm),this.onEnd(I),this.ended=!0,I===f.Z_OK):(V===f.Z_SYNC_FLUSH&&(this.onEnd(f.Z_OK),b.avail_out=0),!0)},v.prototype.onData=function(k){this.chunks.push(k)},v.prototype.onEnd=function(k){k===f.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=l.flattenChunks(this.chunks)),this.chunks=[],this.err=k,this.msg=this.strm.msg};function _(k,x){var b=new v(x);if(b.push(k,!0),b.err)throw b.msg||c[b.err];return b.result}function A(k,x){return x=x||{},x.raw=!0,_(k,x)}a.Inflate=v,a.inflate=_,a.inflateRaw=A,a.ungzip=_},{"./utils/common":1,"./utils/strings":2,"./zlib/constants":4,"./zlib/gzheader":6,"./zlib/inflate":8,"./zlib/messages":10,"./zlib/zstream":11}]},{},[])("/lib/inflate.js")})();var nw=globalThis.fetch,ss=class{constructor(t,e={},r){this.type=t,this.detail=e,this.msg=r,Object.defineProperty(this,"__mayPropagate",{enumerable:!1,writable:!0}),this.__mayPropagate=!0}preventDefault(){}stopPropagation(){this.__mayPropagate=!1}valueOf(){return this}toString(){return this.msg?`[${this.type} event]: ${this.msg}`:`[${this.type} event]`}},Kc=class{constructor(){this.listeners={}}addEventListener(t,e,r){let o=this.listeners[t]||[];r?o.unshift(e):o.push(e),this.listeners[t]=o}removeEventListener(t,e){let r=this.listeners[t]||[],o=r.findIndex(s=>s===e);o>-1&&(r.splice(o,1),this.listeners[t]=r)}dispatch(t){let e=this.listeners[t.type];if(e)for(let r=0,o=e.length;rString.fromCharCode(e)).join("")}var $c=class{constructor(t,e,r){this.name=(r||t.tag||"").trim(),this.length=t.length,this.start=t.offset,this.offset=0,this.data=e,["getInt8","getUint8","getInt16","getUint16","getInt32","getUint32","getBigInt64","getBigUint64"].forEach(o=>{let s=o.replace(/get(Big)?/,"").toLowerCase(),a=parseInt(o.replace(/[^\d]/g,""))/8;Object.defineProperty(this,s,{get:()=>this.getValue(o,a)})})}get currentPosition(){return this.start+this.offset}set currentPosition(t){this.start=t,this.offset=0}skip(t=0,e=8){this.offset+=t*e/8}getValue(t,e){let r=this.start+this.offset;this.offset+=e;try{return this.data[t](r)}catch(o){throw console.error("parser",t,e,this),console.error("parser",this.start,this.offset),o}}flags(t){if(t===8||t===16||t===32||t===64)return this[`uint${t}`].toString(2).padStart(t,0).split("").map(e=>e==="1");console.error("Error parsing flags: flag types can only be 1, 2, 4, or 8 bytes long"),console.trace()}get tag(){let t=this.uint32;return Qc([t>>24&255,t>>16&255,t>>8&255,t&255])}get fixed(){let t=this.int16,e=Math.round(1e3*this.uint16/65356);return t+e/1e3}get legacyFixed(){let t=this.uint16,e=this.uint16.toString(16).padStart(4,0);return parseFloat(`${t}.${e}`)}get uint24(){return(this.uint8<<16)+(this.uint8<<8)+this.uint8}get uint128(){let t=0;for(let e=0;e<5;e++){let r=this.uint8;if(t=t*128+(r&127),r<128)break}return t}get longdatetime(){return new Date(Jc+1e3*parseInt(this.int64.toString()))}get fword(){return this.int16}get ufword(){return this.uint16}get Offset16(){return this.uint16}get Offset32(){return this.uint32}get F2DOT14(){let t=p.uint16,e=[0,1,-2,-1][t>>14],r=t&16383;return e+r/16384}verifyLength(){this.offset!=this.length&&console.error(`unexpected parsed table size (${this.offset}) for "${this.name}" (expected ${this.length})`)}readBytes(t=0,e=0,r=8,o=!1){if(t=t||this.length,t===0)return[];e&&(this.currentPosition=e);let s=`${o?"":"u"}int${r}`,a=[];for(;t--;)a.push(this[s]);return a}},Bt=class{constructor(t){Object.defineProperty(this,"parser",{enumerable:!1,get:()=>t});let r=t.currentPosition;Object.defineProperty(this,"start",{enumerable:!1,get:()=>r})}load(t){Object.keys(t).forEach(e=>{let r=Object.getOwnPropertyDescriptor(t,e);r.get?this[e]=r.get.bind(this):r.value!==void 0&&(this[e]=r.value)}),this.parser.length&&this.parser.verifyLength()}},mt=class extends Bt{constructor(t,e,r){let{parser:o,start:s}=super(new $c(t,e,r));Object.defineProperty(this,"p",{enumerable:!1,get:()=>o}),Object.defineProperty(this,"tableStart",{enumerable:!1,get:()=>s})}};function Z(t,e,r){let o;Object.defineProperty(t,e,{get:()=>o||(o=r(),o),enumerable:!0})}var td=class extends mt{constructor(t,e,r){let{p:o}=super({offset:0,length:12},e,"sfnt");this.version=o.uint32,this.numTables=o.uint16,this.searchRange=o.uint16,this.entrySelector=o.uint16,this.rangeShift=o.uint16,o.verifyLength(),this.directory=[...new Array(this.numTables)].map(s=>new ed(o)),this.tables={},this.directory.forEach(s=>{let a=()=>r(this.tables,{tag:s.tag,offset:s.offset,length:s.length},e);Z(this.tables,s.tag.trim(),a)})}},ed=class{constructor(t){this.tag=t.tag,this.checksum=t.uint32,this.offset=t.uint32,this.length=t.uint32}},El=Rl.inflate||void 0,Il=void 0,rd=class extends mt{constructor(t,e,r){let{p:o}=super({offset:0,length:44},e,"woff");this.signature=o.tag,this.flavor=o.uint32,this.length=o.uint32,this.numTables=o.uint16,o.uint16,this.totalSfntSize=o.uint32,this.majorVersion=o.uint16,this.minorVersion=o.uint16,this.metaOffset=o.uint32,this.metaLength=o.uint32,this.metaOrigLength=o.uint32,this.privOffset=o.uint32,this.privLength=o.uint32,o.verifyLength(),this.directory=[...new Array(this.numTables)].map(s=>new od(o)),sd(this,e,r)}},od=class{constructor(t){this.tag=t.tag,this.offset=t.uint32,this.compLength=t.uint32,this.origLength=t.uint32,this.origChecksum=t.uint32}};function sd(t,e,r){t.tables={},t.directory.forEach(o=>{Z(t.tables,o.tag.trim(),()=>{let s=0,a=e;if(o.compLength!==o.origLength){let n=e.buffer.slice(o.offset,o.offset+o.compLength),l;if(El)l=El(new Uint8Array(n));else if(Il)l=Il(new Uint8Array(n));else{let m="no brotli decoder available to decode WOFF2 font";throw font.onerror&&font.onerror(m),new Error(m)}a=new DataView(l.buffer)}else s=o.offset;return r(t.tables,{tag:o.tag,offset:s,length:o.origLength},a)})})}var Ll=Al,Bl=void 0,nd=class extends mt{constructor(t,e,r){let{p:o}=super({offset:0,length:48},e,"woff2");this.signature=o.tag,this.flavor=o.uint32,this.length=o.uint32,this.numTables=o.uint16,o.uint16,this.totalSfntSize=o.uint32,this.totalCompressedSize=o.uint32,this.majorVersion=o.uint16,this.minorVersion=o.uint16,this.metaOffset=o.uint32,this.metaLength=o.uint32,this.metaOrigLength=o.uint32,this.privOffset=o.uint32,this.privLength=o.uint32,o.verifyLength(),this.directory=[...new Array(this.numTables)].map(l=>new ad(o));let s=o.currentPosition;this.directory[0].offset=0,this.directory.forEach((l,m)=>{let f=this.directory[m+1];f&&(f.offset=l.offset+(l.transformLength!==void 0?l.transformLength:l.origLength))});let a,n=e.buffer.slice(s);if(Ll)a=Ll(new Uint8Array(n));else if(Bl)a=new Uint8Array(Bl(n));else{let l="no brotli decoder available to decode WOFF2 font";throw t.onerror&&t.onerror(l),new Error(l)}id(this,a,r)}},ad=class{constructor(t){this.flags=t.uint8;let e=this.tagNumber=this.flags&63;e===63?this.tag=t.tag:this.tag=ld(e);let o=(this.transformVersion=(this.flags&192)>>6)!==0;(this.tag==="glyf"||this.tag==="loca")&&(o=this.transformVersion!==3),this.origLength=t.uint128,o&&(this.transformLength=t.uint128)}};function id(t,e,r){t.tables={},t.directory.forEach(o=>{Z(t.tables,o.tag.trim(),()=>{let s=o.offset,a=s+(o.transformLength?o.transformLength:o.origLength),n=new DataView(e.slice(s,a).buffer);try{return r(t.tables,{tag:o.tag,offset:0,length:o.origLength},n)}catch(l){console.error(l)}})})}function ld(t){return["cmap","head","hhea","hmtx","maxp","name","OS/2","post","cvt ","fpgm","glyf","loca","prep","CFF ","VORG","EBDT","EBLC","gasp","hdmx","kern","LTSH","PCLT","VDMX","vhea","vmtx","BASE","GDEF","GPOS","GSUB","EBSC","JSTF","MATH","CBDT","CBLC","COLR","CPAL","SVG ","sbix","acnt","avar","bdat","bloc","bsln","cvar","fdsc","feat","fmtx","fvar","gvar","hsty","just","lcar","mort","morx","opbd","prop","trak","Zapf","Silf","Glat","Gloc","Feat","Sill"][t&63]}var jl={},Ul=!1;Promise.all([Promise.resolve().then(function(){return Dd}),Promise.resolve().then(function(){return Nd}),Promise.resolve().then(function(){return Md}),Promise.resolve().then(function(){return Ud}),Promise.resolve().then(function(){return Wd}),Promise.resolve().then(function(){return Kd}),Promise.resolve().then(function(){return Qd}),Promise.resolve().then(function(){return tm}),Promise.resolve().then(function(){return fm}),Promise.resolve().then(function(){return Sm}),Promise.resolve().then(function(){return lp}),Promise.resolve().then(function(){return fp}),Promise.resolve().then(function(){return pp}),Promise.resolve().then(function(){return vp}),Promise.resolve().then(function(){return wp}),Promise.resolve().then(function(){return xp}),Promise.resolve().then(function(){return kp}),Promise.resolve().then(function(){return Tp}),Promise.resolve().then(function(){return Pp}),Promise.resolve().then(function(){return Rp}),Promise.resolve().then(function(){return Ip}),Promise.resolve().then(function(){return Bp}),Promise.resolve().then(function(){return Np}),Promise.resolve().then(function(){return Gp}),Promise.resolve().then(function(){return jp}),Promise.resolve().then(function(){return Hp}),Promise.resolve().then(function(){return Yp}),Promise.resolve().then(function(){return Zp}),Promise.resolve().then(function(){return Kp}),Promise.resolve().then(function(){return $p}),Promise.resolve().then(function(){return nh}),Promise.resolve().then(function(){return uh}),Promise.resolve().then(function(){return dh}),Promise.resolve().then(function(){return gh}),Promise.resolve().then(function(){return vh}),Promise.resolve().then(function(){return wh}),Promise.resolve().then(function(){return Ch}),Promise.resolve().then(function(){return kh}),Promise.resolve().then(function(){return Ah}),Promise.resolve().then(function(){return Eh}),Promise.resolve().then(function(){return Bh})]).then(t=>{t.forEach(e=>{let r=Object.keys(e)[0];jl[r]=e[r]}),Ul=!0});function ud(t,e,r){let o=e.tag.replace(/[^\w\d]/g,""),s=jl[o];return s?new s(e,r,t):(console.warn(`lib-font has no definition for ${o}. The table was skipped.`),{})}function fd(){let t=0;function e(r,o){if(!Ul)return t>10?o(new Error("loading took too long")):(t++,setTimeout(()=>e(r),250));r(ud)}return new Promise((r,o)=>e(r))}function cd(t,e){let r=t.lastIndexOf("."),o=(t.substring(r+1)||"").toLowerCase(),s={ttf:"truetype",otf:"opentype",woff:"woff",woff2:"woff2"}[o];if(s)return s;let a={eot:"The .eot format is not supported: it died in January 12, 2016, when Microsoft retired all versions of IE that didn't already support WOFF.",svg:"The .svg format is not supported: SVG fonts (not to be confused with OpenType with embedded SVG) were so bad we took the entire fonts chapter out of the SVG specification again.",fon:"The .fon format is not supported: this is an ancient Windows bitmap font format.",ttc:"Based on the current CSS specification, font collections are not (yet?) supported."}[o];if(a||(a=`${t} is not a known webfont format.`),e)throw new Error(a);console.warn(`Could not load font: ${a}`)}async function dd(t,e,r={}){if(!globalThis.document)return;let o=cd(e,r.errorOnStyle);if(!o)return;let s=document.createElement("style");s.className="injected-by-Font-js";let a=[];return r.styleRules&&(a=Object.entries(r.styleRules).map(([n,l])=>`${n}: ${l};`)),s.textContent=` +@font-face { + font-family: "${t}"; + ${a.join(` + `)} + src: url("${e}") format("${o}"); +}`,globalThis.document.head.appendChild(s),s}var md=[0,1,0,0],pd=[79,84,84,79],hd=[119,79,70,70],gd=[119,79,70,50];function ns(t,e){if(t.length===e.length){for(let r=0;r(globalThis.document&&!this.options.skipStyleSheet&&await dd(this.name,t,this.options),this.loadFont(t)))()}async loadFont(t,e){fetch(t).then(r=>vd(r)&&r.arrayBuffer()).then(r=>this.fromDataBuffer(r,e||t)).catch(r=>{let o=new ss("error",r,`Failed to load font at ${e||t}`);this.dispatch(o),this.onerror&&this.onerror(o)})}async fromDataBuffer(t,e){this.fontData=new DataView(t);let r=yd(this.fontData);if(!r)throw new Error(`${e} is either an unsupported font format, or not a font at all.`);await this.parseBasicData(r);let o=new ss("load",{font:this});this.dispatch(o),this.onload&&this.onload(o)}async parseBasicData(t){return fd().then(e=>(t==="SFNT"&&(this.opentype=new td(this,this.fontData,e)),t==="WOFF"&&(this.opentype=new rd(this,this.fontData,e)),t==="WOFF2"&&(this.opentype=new nd(this,this.fontData,e)),this.opentype))}getGlyphId(t){return this.opentype.tables.cmap.getGlyphId(t)}reverse(t){return this.opentype.tables.cmap.reverse(t)}supports(t){return this.getGlyphId(t)!==0}supportsVariation(t){return this.opentype.tables.cmap.supportsVariation(t)!==!1}measureText(t,e=16){if(this.__unloaded)throw new Error("Cannot measure text: font was unloaded. Please reload before calling measureText()");let r=document.createElement("div");r.textContent=t,r.style.fontFamily=this.name,r.style.fontSize=`${e}px`,r.style.color="transparent",r.style.background="transparent",r.style.top="0",r.style.left="0",r.style.position="absolute",document.body.appendChild(r);let o=r.getBoundingClientRect();document.body.removeChild(r);let s=this.opentype.tables["OS/2"];return o.fontSize=e,o.ascender=s.sTypoAscender,o.descender=s.sTypoDescender,o}unload(){if(this.styleElement.parentNode){this.styleElement.parentNode.removeElement(this.styleElement);let t=new ss("unload",{font:this});this.dispatch(t),this.onunload&&this.onunload(t)}this._unloaded=!0}load(){if(this.__unloaded){delete this.__unloaded,document.head.appendChild(this.styleElement);let t=new ss("load",{font:this});this.dispatch(t),this.onload&&this.onload(t)}}};globalThis.Font=is;var We=class extends Bt{constructor(t,e,r){super(t),this.plaformID=e,this.encodingID=r}},bd=class extends We{constructor(t,e,r){super(t,e,r),this.format=0,this.length=t.uint16,this.language=t.uint16,this.glyphIdArray=[...new Array(256)].map(o=>t.uint8)}supports(t){return t.charCodeAt&&(t=-1,console.warn("supports(character) not implemented for cmap subtable format 0. only supports(id) is implemented.")),0<=t&&t<=255}reverse(t){return console.warn("reverse not implemented for cmap subtable format 0"),{}}getSupportedCharCodes(){return[{start:1,end:256}]}},wd=class extends We{constructor(t,e,r){super(t,e,r),this.format=2,this.length=t.uint16,this.language=t.uint16,this.subHeaderKeys=[...new Array(256)].map(n=>t.uint16);let o=Math.max(...this.subHeaderKeys),s=t.currentPosition;Z(this,"subHeaders",()=>(t.currentPosition=s,[...new Array(o)].map(n=>new Sd(t))));let a=s+o*8;Z(this,"glyphIndexArray",()=>(t.currentPosition=a,[...new Array(o)].map(n=>t.uint16)))}supports(t){t.charCodeAt&&(t=-1,console.warn("supports(character) not implemented for cmap subtable format 2. only supports(id) is implemented."));let e=t&&255,r=t&&65280,o=this.subHeaders[r],s=this.subHeaders[o],a=s.firstCode,n=a+s.entryCount;return a<=e&&e<=n}reverse(t){return console.warn("reverse not implemented for cmap subtable format 2"),{}}getSupportedCharCodes(t=!1){return t?this.subHeaders.map(e=>({firstCode:e.firstCode,lastCode:e.lastCode})):this.subHeaders.map(e=>({start:e.firstCode,end:e.lastCode}))}},Sd=class{constructor(t){this.firstCode=t.uint16,this.entryCount=t.uint16,this.lastCode=this.first+this.entryCount,this.idDelta=t.int16,this.idRangeOffset=t.uint16}},xd=class extends We{constructor(t,e,r){super(t,e,r),this.format=4,this.length=t.uint16,this.language=t.uint16,this.segCountX2=t.uint16,this.segCount=this.segCountX2/2,this.searchRange=t.uint16,this.entrySelector=t.uint16,this.rangeShift=t.uint16;let o=t.currentPosition;Z(this,"endCode",()=>t.readBytes(this.segCount,o,16));let s=o+2+this.segCountX2;Z(this,"startCode",()=>t.readBytes(this.segCount,s,16));let a=s+this.segCountX2;Z(this,"idDelta",()=>t.readBytes(this.segCount,a,16,!0));let n=a+this.segCountX2;Z(this,"idRangeOffset",()=>t.readBytes(this.segCount,n,16));let l=n+this.segCountX2,m=this.length-(l-this.tableStart);Z(this,"glyphIdArray",()=>t.readBytes(m,l,16)),Z(this,"segments",()=>this.buildSegments(n,l,t))}buildSegments(t,e,r){let o=(s,a)=>{let n=this.startCode[a],l=this.endCode[a],m=this.idDelta[a],f=this.idRangeOffset[a],c=t+2*a,d=[];if(f===0)for(let g=n+m,h=l+m;g<=h;g++)d.push(g);else for(let g=0,h=l-n;g<=h;g++)r.currentPosition=c+f+g*2,d.push(r.uint16);return{startCode:n,endCode:l,idDelta:m,idRangeOffset:f,glyphIDs:d}};return[...new Array(this.segCount)].map(o)}reverse(t){let e=this.segments.find(o=>o.glyphIDs.includes(t));if(!e)return{};let r=e.startCode+e.glyphIDs.indexOf(t);return{code:r,unicode:String.fromCodePoint(r)}}getGlyphId(t){if(t.charCodeAt&&(t=t.charCodeAt(0)),55296<=t&&t<=57343||(t&65534)===65534||(t&65535)===65535)return 0;let e=this.segments.find(r=>r.startCode<=t&&t<=r.endCode);return e?e.glyphIDs[t-e.startCode]:0}supports(t){return this.getGlyphId(t)!==0}getSupportedCharCodes(t=!1){return t?this.segments:this.segments.map(e=>({start:e.startCode,end:e.endCode}))}},Cd=class extends We{constructor(t,e,r){super(t,e,r),this.format=6,this.length=t.uint16,this.language=t.uint16,this.firstCode=t.uint16,this.entryCount=t.uint16,this.lastCode=this.firstCode+this.entryCount-1,Z(this,"glyphIdArray",()=>[...new Array(this.entryCount)].map(s=>t.uint16))}supports(t){if(t.charCodeAt&&(t=-1,console.warn("supports(character) not implemented for cmap subtable format 6. only supports(id) is implemented.")),tthis.firstCode+this.entryCount)return{};let e=t-this.firstCode;return{code:e,unicode:String.fromCodePoint(e)}}reverse(t){let e=this.glyphIdArray.indexOf(t);if(e>-1)return this.firstCode+e}getSupportedCharCodes(t=!1){return t?[{firstCode:this.firstCode,lastCode:this.lastCode}]:[{start:this.firstCode,end:this.lastCode}]}},Fd=class extends We{constructor(t,e,r){super(t,e,r),this.format=8,t.uint16,this.length=t.uint32,this.language=t.uint32,this.is32=[...new Array(8192)].map(s=>t.uint8),this.numGroups=t.uint32,Z(this,"groups",()=>[...new Array(this.numGroups)].map(s=>new kd(t)))}supports(t){return t.charCodeAt&&(t=-1,console.warn("supports(character) not implemented for cmap subtable format 8. only supports(id) is implemented.")),this.groups.findIndex(e=>e.startcharCode<=t&&t<=e.endcharCode)!==-1}reverse(t){return console.warn("reverse not implemented for cmap subtable format 8"),{}}getSupportedCharCodes(t=!1){return t?this.groups:this.groups.map(e=>({start:e.startcharCode,end:e.endcharCode}))}},kd=class{constructor(t){this.startcharCode=t.uint32,this.endcharCode=t.uint32,this.startGlyphID=t.uint32}},Od=class extends We{constructor(t,e,r){super(t,e,r),this.format=10,t.uint16,this.length=t.uint32,this.language=t.uint32,this.startCharCode=t.uint32,this.numChars=t.uint32,this.endCharCode=this.startCharCode+this.numChars,Z(this,"glyphs",()=>[...new Array(this.numChars)].map(s=>t.uint16))}supports(t){return t.charCodeAt&&(t=-1,console.warn("supports(character) not implemented for cmap subtable format 10. only supports(id) is implemented.")),tthis.startCharCode+this.numChars?!1:t-this.startCharCode}reverse(t){return console.warn("reverse not implemented for cmap subtable format 10"),{}}getSupportedCharCodes(t=!1){return t?[{startCharCode:this.startCharCode,endCharCode:this.endCharCode}]:[{start:this.startCharCode,end:this.endCharCode}]}},Td=class extends We{constructor(t,e,r){super(t,e,r),this.format=12,t.uint16,this.length=t.uint32,this.language=t.uint32,this.numGroups=t.uint32,Z(this,"groups",()=>[...new Array(this.numGroups)].map(s=>new _d(t)))}supports(t){return t.charCodeAt&&(t=t.charCodeAt(0)),55296<=t&&t<=57343||(t&65534)===65534||(t&65535)===65535?0:this.groups.findIndex(e=>e.startCharCode<=t&&t<=e.endCharCode)!==-1}reverse(t){for(let e of this.groups){let r=e.startGlyphID;if(r>t)continue;if(r===t)return e.startCharCode;if(r+(e.endCharCode-e.startCharCode)({start:e.startCharCode,end:e.endCharCode}))}},_d=class{constructor(t){this.startCharCode=t.uint32,this.endCharCode=t.uint32,this.startGlyphID=t.uint32}},Pd=class extends We{constructor(t,e,r){super(t,e,r),this.format=13,t.uint16,this.length=t.uint32,this.language=t.uint32,this.numGroups=t.uint32;let o=[...new Array(this.numGroups)].map(s=>new Ad(t));Z(this,"groups",o)}supports(t){return t.charCodeAt&&(t=t.charCodeAt(0)),this.groups.findIndex(e=>e.startCharCode<=t&&t<=e.endCharCode)!==-1}reverse(t){return console.warn("reverse not implemented for cmap subtable format 13"),{}}getSupportedCharCodes(t=!1){return t?this.groups:this.groups.map(e=>({start:e.startCharCode,end:e.endCharCode}))}},Ad=class{constructor(t){this.startCharCode=t.uint32,this.endCharCode=t.uint32,this.glyphID=t.uint32}},Rd=class extends We{constructor(t,e,r){super(t,e,r),this.subTableStart=t.currentPosition,this.format=14,this.length=t.uint32,this.numVarSelectorRecords=t.uint32,Z(this,"varSelectors",()=>[...new Array(this.numVarSelectorRecords)].map(o=>new Ed(t)))}supports(){return console.warn("supports not implemented for cmap subtable format 14"),0}getSupportedCharCodes(){return console.warn("getSupportedCharCodes not implemented for cmap subtable format 14"),[]}reverse(t){return console.warn("reverse not implemented for cmap subtable format 14"),{}}supportsVariation(t){let e=this.varSelector.find(r=>r.varSelector===t);return e||!1}getSupportedVariations(){return this.varSelectors.map(t=>t.varSelector)}},Ed=class{constructor(t){this.varSelector=t.uint24,this.defaultUVSOffset=t.Offset32,this.nonDefaultUVSOffset=t.Offset32}};function Id(t,e,r){let o=t.uint16;return o===0?new bd(t,e,r):o===2?new wd(t,e,r):o===4?new xd(t,e,r):o===6?new Cd(t,e,r):o===8?new Fd(t,e,r):o===10?new Od(t,e,r):o===12?new Td(t,e,r):o===13?new Pd(t,e,r):o===14?new Rd(t,e,r):{}}var Ld=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.version=r.uint16,this.numTables=r.uint16,this.encodingRecords=[...new Array(this.numTables)].map(o=>new Bd(r,this.tableStart))}getSubTable(t){return this.encodingRecords[t].table}getSupportedEncodings(){return this.encodingRecords.map(t=>({platformID:t.platformID,encodingId:t.encodingID}))}getSupportedCharCodes(t,e){let r=this.encodingRecords.findIndex(s=>s.platformID===t&&s.encodingID===e);return r===-1?!1:this.getSubTable(r).getSupportedCharCodes()}reverse(t){for(let e=0;e{let s=this.getSubTable(o);return s.getGlyphId?(e=s.getGlyphId(t),e!==0):!1}),e}supports(t){return this.encodingRecords.some((e,r)=>{let o=this.getSubTable(r);return o.supports&&o.supports(t)!==!1})}supportsVariation(t){return this.encodingRecords.some((e,r)=>{let o=this.getSubTable(r);return o.supportsVariation&&o.supportsVariation(t)!==!1})}},Bd=class{constructor(t,e){let r=this.platformID=t.uint16,o=this.encodingID=t.uint16,s=this.offset=t.Offset32;Z(this,"table",()=>(t.currentPosition=e+s,Id(t,r,o)))}},Dd=Object.freeze({__proto__:null,cmap:Ld}),Vd=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.load({majorVersion:r.uint16,minorVersion:r.uint16,fontRevision:r.fixed,checkSumAdjustment:r.uint32,magicNumber:r.uint32,flags:r.flags(16),unitsPerEm:r.uint16,created:r.longdatetime,modified:r.longdatetime,xMin:r.int16,yMin:r.int16,xMax:r.int16,yMax:r.int16,macStyle:r.flags(16),lowestRecPPEM:r.uint16,fontDirectionHint:r.uint16,indexToLocFormat:r.uint16,glyphDataFormat:r.uint16})}},Nd=Object.freeze({__proto__:null,head:Vd}),zd=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.ascender=r.fword,this.descender=r.fword,this.lineGap=r.fword,this.advanceWidthMax=r.ufword,this.minLeftSideBearing=r.fword,this.minRightSideBearing=r.fword,this.xMaxExtent=r.fword,this.caretSlopeRise=r.int16,this.caretSlopeRun=r.int16,this.caretOffset=r.int16,r.int16,r.int16,r.int16,r.int16,this.metricDataFormat=r.int16,this.numberOfHMetrics=r.uint16,r.verifyLength()}},Md=Object.freeze({__proto__:null,hhea:zd}),Gd=class extends mt{constructor(t,e,r){let{p:o}=super(t,e),s=r.hhea.numberOfHMetrics,a=r.maxp.numGlyphs,n=o.currentPosition;if(Z(this,"hMetrics",()=>(o.currentPosition=n,[...new Array(s)].map(l=>new jd(o.uint16,o.int16)))),s(o.currentPosition=l,[...new Array(a-s)].map(m=>o.int16)))}}},jd=class{constructor(t,e){this.advanceWidth=t,this.lsb=e}},Ud=Object.freeze({__proto__:null,hmtx:Gd}),Hd=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.version=r.legacyFixed,this.numGlyphs=r.uint16,this.version===1&&(this.maxPoints=r.uint16,this.maxContours=r.uint16,this.maxCompositePoints=r.uint16,this.maxCompositeContours=r.uint16,this.maxZones=r.uint16,this.maxTwilightPoints=r.uint16,this.maxStorage=r.uint16,this.maxFunctionDefs=r.uint16,this.maxInstructionDefs=r.uint16,this.maxStackElements=r.uint16,this.maxSizeOfInstructions=r.uint16,this.maxComponentElements=r.uint16,this.maxComponentDepth=r.uint16),r.verifyLength()}},Wd=Object.freeze({__proto__:null,maxp:Hd}),Yd=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.format=r.uint16,this.count=r.uint16,this.stringOffset=r.Offset16,this.nameRecords=[...new Array(this.count)].map(o=>new Zd(r,this)),this.format===1&&(this.langTagCount=r.uint16,this.langTagRecords=[...new Array(this.langTagCount)].map(o=>new qd(r.uint16,r.Offset16))),this.stringStart=this.tableStart+this.stringOffset}get(t){let e=this.nameRecords.find(r=>r.nameID===t);if(e)return e.string}},qd=class{constructor(t,e){this.length=t,this.offset=e}},Zd=class{constructor(t,e){this.platformID=t.uint16,this.encodingID=t.uint16,this.languageID=t.uint16,this.nameID=t.uint16,this.length=t.uint16,this.offset=t.Offset16,Z(this,"string",()=>(t.currentPosition=e.stringStart+this.offset,Xd(t,this)))}};function Xd(t,e){let{platformID:r,length:o}=e;if(o===0)return"";if(r===0||r===3){let n=[];for(let l=0,m=o/2;lr.uint8),this.ulUnicodeRange1=r.flags(32),this.ulUnicodeRange2=r.flags(32),this.ulUnicodeRange3=r.flags(32),this.ulUnicodeRange4=r.flags(32),this.achVendID=r.tag,this.fsSelection=r.uint16,this.usFirstCharIndex=r.uint16,this.usLastCharIndex=r.uint16,this.sTypoAscender=r.int16,this.sTypoDescender=r.int16,this.sTypoLineGap=r.int16,this.usWinAscent=r.uint16,this.usWinDescent=r.uint16,this.version===0||(this.ulCodePageRange1=r.flags(32),this.ulCodePageRange2=r.flags(32),this.version===1)||(this.sxHeight=r.int16,this.sCapHeight=r.int16,this.usDefaultChar=r.uint16,this.usBreakChar=r.uint16,this.usMaxContext=r.uint16,this.version<=4)||(this.usLowerOpticalPointSize=r.uint16,this.usUpperOpticalPointSize=r.uint16,this.version===5))return r.verifyLength()}},Qd=Object.freeze({__proto__:null,OS2:Jd}),$d=class extends mt{constructor(t,e){let{p:r}=super(t,e);if(this.version=r.legacyFixed,this.italicAngle=r.fixed,this.underlinePosition=r.fword,this.underlineThickness=r.fword,this.isFixedPitch=r.uint32,this.minMemType42=r.uint32,this.maxMemType42=r.uint32,this.minMemType1=r.uint32,this.maxMemType1=r.uint32,this.version===1||this.version===3)return r.verifyLength();if(this.numGlyphs=r.uint16,this.version===2){this.glyphNameIndex=[...new Array(this.numGlyphs)].map(o=>r.uint16),this.namesOffset=r.currentPosition,this.glyphNameOffsets=[1];for(let o=0;or.int8))}getGlyphName(t){if(this.version!==2)return console.warn(`post table version ${this.version} does not support glyph name lookups`),"";let e=this.glyphNameIndex[t];if(e<258)return Dl[e];let r=this.glyphNameOffsets[t],s=this.glyphNameOffsets[t+1]-r-1;return s===0?".notdef.":(this.parser.currentPosition=this.namesOffset+r,this.parser.readBytes(s,this.namesOffset+r,8,!0).map(n=>String.fromCharCode(n)).join(""))}},Dl=[".notdef",".null","nonmarkingreturn","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","Adieresis","Aring","Ccedilla","Eacute","Ntilde","Odieresis","Udieresis","aacute","agrave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ograve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","sterling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","greaterequal","yen","mu","partialdiff","summation","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslash","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemotleft","guillemotright","ellipsis","nonbreakingspace","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quotedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcentered","quotesinglbase","quotedblbase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex","Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut","ogonek","caron","Lslash","lslash","Scaron","scaron","Zcaron","zcaron","brokenbar","Eth","eth","Yacute","yacute","Thorn","thorn","minus","multiply","onesuperior","twosuperior","threesuperior","onehalf","onequarter","threequarters","franc","Gbreve","gbreve","Idotaccent","Scedilla","scedilla","Cacute","cacute","Ccaron","ccaron","dcroat"],tm=Object.freeze({__proto__:null,post:$d}),em=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.horizAxisOffset=r.Offset16,this.vertAxisOffset=r.Offset16,Z(this,"horizAxis",()=>new vn({offset:t.offset+this.horizAxisOffset},e)),Z(this,"vertAxis",()=>new vn({offset:t.offset+this.vertAxisOffset},e)),this.majorVersion===1&&this.minorVersion===1&&(this.itemVarStoreOffset=r.Offset32,Z(this,"itemVarStore",()=>new vn({offset:t.offset+this.itemVarStoreOffset},e)))}},vn=class extends mt{constructor(t,e){let{p:r}=super(t,e,"AxisTable");this.baseTagListOffset=r.Offset16,this.baseScriptListOffset=r.Offset16,Z(this,"baseTagList",()=>new rm({offset:t.offset+this.baseTagListOffset},e)),Z(this,"baseScriptList",()=>new om({offset:t.offset+this.baseScriptListOffset},e))}},rm=class extends mt{constructor(t,e){let{p:r}=super(t,e,"BaseTagListTable");this.baseTagCount=r.uint16,this.baselineTags=[...new Array(this.baseTagCount)].map(o=>r.tag)}},om=class extends mt{constructor(t,e){let{p:r}=super(t,e,"BaseScriptListTable");this.baseScriptCount=r.uint16;let o=r.currentPosition;Z(this,"baseScriptRecords",()=>(r.currentPosition=o,[...new Array(this.baseScriptCount)].map(s=>new sm(this.start,r))))}},sm=class{constructor(t,e){this.baseScriptTag=e.tag,this.baseScriptOffset=e.Offset16,Z(this,"baseScriptTable",()=>(e.currentPosition=t+this.baseScriptOffset,new nm(e)))}},nm=class{constructor(t){this.start=t.currentPosition,this.baseValuesOffset=t.Offset16,this.defaultMinMaxOffset=t.Offset16,this.baseLangSysCount=t.uint16,this.baseLangSysRecords=[...new Array(this.baseLangSysCount)].map(e=>new am(this.start,t)),Z(this,"baseValues",()=>(t.currentPosition=this.start+this.baseValuesOffset,new im(t))),Z(this,"defaultMinMax",()=>(t.currentPosition=this.start+this.defaultMinMaxOffset,new Hl(t)))}},am=class{constructor(t,e){this.baseLangSysTag=e.tag,this.minMaxOffset=e.Offset16,Z(this,"minMax",()=>(e.currentPosition=t+this.minMaxOffset,new Hl(e)))}},im=class{constructor(t){this.parser=t,this.start=t.currentPosition,this.defaultBaselineIndex=t.uint16,this.baseCoordCount=t.uint16,this.baseCoords=[...new Array(this.baseCoordCount)].map(e=>t.Offset16)}getTable(t){return this.parser.currentPosition=this.start+this.baseCoords[t],new um(this.parser)}},Hl=class{constructor(t){this.minCoord=t.Offset16,this.maxCoord=t.Offset16,this.featMinMaxCount=t.uint16;let e=t.currentPosition;Z(this,"featMinMaxRecords",()=>(t.currentPosition=e,[...new Array(this.featMinMaxCount)].map(r=>new lm(t))))}},lm=class{constructor(t){this.featureTableTag=t.tag,this.minCoord=t.Offset16,this.maxCoord=t.Offset16}},um=class{constructor(t){this.baseCoordFormat=t.uint16,this.coordinate=t.int16,this.baseCoordFormat===2&&(this.referenceGlyph=t.uint16,this.baseCoordPoint=t.uint16),this.baseCoordFormat===3&&(this.deviceTable=t.Offset16)}},fm=Object.freeze({__proto__:null,BASE:em}),Vl=class{constructor(t){this.classFormat=t.uint16,this.classFormat===1&&(this.startGlyphID=t.uint16,this.glyphCount=t.uint16,this.classValueArray=[...new Array(this.glyphCount)].map(e=>t.uint16)),this.classFormat===2&&(this.classRangeCount=t.uint16,this.classRangeRecords=[...new Array(this.classRangeCount)].map(e=>new cm(t)))}},cm=class{constructor(t){this.startGlyphID=t.uint16,this.endGlyphID=t.uint16,this.class=t.uint16}},ho=class extends Bt{constructor(t){super(t),this.coverageFormat=t.uint16,this.coverageFormat===1&&(this.glyphCount=t.uint16,this.glyphArray=[...new Array(this.glyphCount)].map(e=>t.uint16)),this.coverageFormat===2&&(this.rangeCount=t.uint16,this.rangeRecords=[...new Array(this.rangeCount)].map(e=>new dm(t)))}},dm=class{constructor(t){this.startGlyphID=t.uint16,this.endGlyphID=t.uint16,this.startCoverageIndex=t.uint16}},mm=class{constructor(t,e){this.table=t,this.parser=e,this.start=e.currentPosition,this.format=e.uint16,this.variationRegionListOffset=e.Offset32,this.itemVariationDataCount=e.uint16,this.itemVariationDataOffsets=[...new Array(this.itemVariationDataCount)].map(r=>e.Offset32)}},pm=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.glyphClassDefOffset=r.Offset16,Z(this,"glyphClassDefs",()=>{if(this.glyphClassDefOffset!==0)return r.currentPosition=this.tableStart+this.glyphClassDefOffset,new Vl(r)}),this.attachListOffset=r.Offset16,Z(this,"attachList",()=>{if(this.attachListOffset!==0)return r.currentPosition=this.tableStart+this.attachListOffset,new hm(r)}),this.ligCaretListOffset=r.Offset16,Z(this,"ligCaretList",()=>{if(this.ligCaretListOffset!==0)return r.currentPosition=this.tableStart+this.ligCaretListOffset,new ym(r)}),this.markAttachClassDefOffset=r.Offset16,Z(this,"markAttachClassDef",()=>{if(this.markAttachClassDefOffset!==0)return r.currentPosition=this.tableStart+this.markAttachClassDefOffset,new Vl(r)}),this.minorVersion>=2&&(this.markGlyphSetsDefOffset=r.Offset16,Z(this,"markGlyphSetsDef",()=>{if(this.markGlyphSetsDefOffset!==0)return r.currentPosition=this.tableStart+this.markGlyphSetsDefOffset,new wm(r)})),this.minorVersion===3&&(this.itemVarStoreOffset=r.Offset32,Z(this,"itemVarStore",()=>{if(this.itemVarStoreOffset!==0)return r.currentPosition=this.tableStart+this.itemVarStoreOffset,new mm(r)}))}},hm=class extends Bt{constructor(t){super(t),this.coverageOffset=t.Offset16,this.glyphCount=t.uint16,this.attachPointOffsets=[...new Array(this.glyphCount)].map(e=>t.Offset16)}getPoint(t){return this.parser.currentPosition=this.start+this.attachPointOffsets[t],new gm(this.parser)}},gm=class{constructor(t){this.pointCount=t.uint16,this.pointIndices=[...new Array(this.pointCount)].map(e=>t.uint16)}},ym=class extends Bt{constructor(t){super(t),this.coverageOffset=t.Offset16,Z(this,"coverage",()=>(t.currentPosition=this.start+this.coverageOffset,new ho(t))),this.ligGlyphCount=t.uint16,this.ligGlyphOffsets=[...new Array(this.ligGlyphCount)].map(e=>t.Offset16)}getLigGlyph(t){return this.parser.currentPosition=this.start+this.ligGlyphOffsets[t],new vm(this.parser)}},vm=class extends Bt{constructor(t){super(t),this.caretCount=t.uint16,this.caretValueOffsets=[...new Array(this.caretCount)].map(e=>t.Offset16)}getCaretValue(t){return this.parser.currentPosition=this.start+this.caretValueOffsets[t],new bm(this.parser)}},bm=class{constructor(t){this.caretValueFormat=t.uint16,this.caretValueFormat===1&&(this.coordinate=t.int16),this.caretValueFormat===2&&(this.caretValuePointIndex=t.uint16),this.caretValueFormat===3&&(this.coordinate=t.int16,this.deviceOffset=t.Offset16)}},wm=class extends Bt{constructor(t){super(t),this.markGlyphSetTableFormat=t.uint16,this.markGlyphSetCount=t.uint16,this.coverageOffsets=[...new Array(this.markGlyphSetCount)].map(e=>t.Offset32)}getMarkGlyphSet(t){return this.parser.currentPosition=this.start+this.coverageOffsets[t],new ho(this.parser)}},Sm=Object.freeze({__proto__:null,GDEF:pm}),Nl=class extends Bt{static EMPTY={scriptCount:0,scriptRecords:[]};constructor(t){super(t),this.scriptCount=t.uint16,this.scriptRecords=[...new Array(this.scriptCount)].map(e=>new xm(t))}},xm=class{constructor(t){this.scriptTag=t.tag,this.scriptOffset=t.Offset16}},Cm=class extends Bt{constructor(t){super(t),this.defaultLangSys=t.Offset16,this.langSysCount=t.uint16,this.langSysRecords=[...new Array(this.langSysCount)].map(e=>new Fm(t))}},Fm=class{constructor(t){this.langSysTag=t.tag,this.langSysOffset=t.Offset16}},zl=class{constructor(t){this.lookupOrder=t.Offset16,this.requiredFeatureIndex=t.uint16,this.featureIndexCount=t.uint16,this.featureIndices=[...new Array(this.featureIndexCount)].map(e=>t.uint16)}},Ml=class extends Bt{static EMPTY={featureCount:0,featureRecords:[]};constructor(t){super(t),this.featureCount=t.uint16,this.featureRecords=[...new Array(this.featureCount)].map(e=>new km(t))}},km=class{constructor(t){this.featureTag=t.tag,this.featureOffset=t.Offset16}},Om=class extends Bt{constructor(t){super(t),this.featureParams=t.Offset16,this.lookupIndexCount=t.uint16,this.lookupListIndices=[...new Array(this.lookupIndexCount)].map(e=>t.uint16)}getFeatureParams(){if(this.featureParams>0){let t=this.parser;t.currentPosition=this.start+this.featureParams;let e=this.featureTag;if(e==="size")return new _m(t);if(e.startsWith("cc"))return new Tm(t);if(e.startsWith("ss"))return new Pm(t)}}},Tm=class{constructor(t){this.format=t.uint16,this.featUiLabelNameId=t.uint16,this.featUiTooltipTextNameId=t.uint16,this.sampleTextNameId=t.uint16,this.numNamedParameters=t.uint16,this.firstParamUiLabelNameId=t.uint16,this.charCount=t.uint16,this.character=[...new Array(this.charCount)].map(e=>t.uint24)}},_m=class{constructor(t){this.designSize=t.uint16,this.subfamilyIdentifier=t.uint16,this.subfamilyNameID=t.uint16,this.smallEnd=t.uint16,this.largeEnd=t.uint16}},Pm=class{constructor(t){this.version=t.uint16,this.UINameID=t.uint16}};function Wl(t){t.parser.currentPosition-=2,delete t.coverageOffset,delete t.getCoverageTable}var xr=class extends Bt{constructor(t){super(t),this.substFormat=t.uint16,this.coverageOffset=t.Offset16}getCoverageTable(){let t=this.parser;return t.currentPosition=this.start+this.coverageOffset,new ho(t)}},wn=class{constructor(t){this.glyphSequenceIndex=t.uint16,this.lookupListIndex=t.uint16}},Am=class extends xr{constructor(t){super(t),this.deltaGlyphID=t.int16}},Rm=class extends xr{constructor(t){super(t),this.sequenceCount=t.uint16,this.sequenceOffsets=[...new Array(this.sequenceCount)].map(e=>t.Offset16)}getSequence(t){let e=this.parser;return e.currentPosition=this.start+this.sequenceOffsets[t],new Em(e)}},Em=class{constructor(t){this.glyphCount=t.uint16,this.substituteGlyphIDs=[...new Array(this.glyphCount)].map(e=>t.uint16)}},Im=class extends xr{constructor(t){super(t),this.alternateSetCount=t.uint16,this.alternateSetOffsets=[...new Array(this.alternateSetCount)].map(e=>t.Offset16)}getAlternateSet(t){let e=this.parser;return e.currentPosition=this.start+this.alternateSetOffsets[t],new Lm(e)}},Lm=class{constructor(t){this.glyphCount=t.uint16,this.alternateGlyphIDs=[...new Array(this.glyphCount)].map(e=>t.uint16)}},Bm=class extends xr{constructor(t){super(t),this.ligatureSetCount=t.uint16,this.ligatureSetOffsets=[...new Array(this.ligatureSetCount)].map(e=>t.Offset16)}getLigatureSet(t){let e=this.parser;return e.currentPosition=this.start+this.ligatureSetOffsets[t],new Dm(e)}},Dm=class extends Bt{constructor(t){super(t),this.ligatureCount=t.uint16,this.ligatureOffsets=[...new Array(this.ligatureCount)].map(e=>t.Offset16)}getLigature(t){let e=this.parser;return e.currentPosition=this.start+this.ligatureOffsets[t],new Vm(e)}},Vm=class{constructor(t){this.ligatureGlyph=t.uint16,this.componentCount=t.uint16,this.componentGlyphIDs=[...new Array(this.componentCount-1)].map(e=>t.uint16)}},Nm=class extends xr{constructor(t){super(t),this.substFormat===1&&(this.subRuleSetCount=t.uint16,this.subRuleSetOffsets=[...new Array(this.subRuleSetCount)].map(e=>t.Offset16)),this.substFormat===2&&(this.classDefOffset=t.Offset16,this.subClassSetCount=t.uint16,this.subClassSetOffsets=[...new Array(this.subClassSetCount)].map(e=>t.Offset16)),this.substFormat===3&&(Wl(this),this.glyphCount=t.uint16,this.substitutionCount=t.uint16,this.coverageOffsets=[...new Array(this.glyphCount)].map(e=>t.Offset16),this.substLookupRecords=[...new Array(this.substitutionCount)].map(e=>new wn(t)))}getSubRuleSet(t){if(this.substFormat!==1)throw new Error(`lookup type 5.${this.substFormat} has no subrule sets.`);let e=this.parser;return e.currentPosition=this.start+this.subRuleSetOffsets[t],new zm(e)}getSubClassSet(t){if(this.substFormat!==2)throw new Error(`lookup type 5.${this.substFormat} has no subclass sets.`);let e=this.parser;return e.currentPosition=this.start+this.subClassSetOffsets[t],new Mm(e)}getCoverageTable(t){if(this.substFormat!==3&&!t)return super.getCoverageTable();if(!t)throw new Error(`lookup type 5.${this.substFormat} requires an coverage table index.`);let e=this.parser;return e.currentPosition=this.start+this.coverageOffsets[t],new ho(e)}},zm=class extends Bt{constructor(t){super(t),this.subRuleCount=t.uint16,this.subRuleOffsets=[...new Array(this.subRuleCount)].map(e=>t.Offset16)}getSubRule(t){let e=this.parser;return e.currentPosition=this.start+this.subRuleOffsets[t],new Yl(e)}},Yl=class{constructor(t){this.glyphCount=t.uint16,this.substitutionCount=t.uint16,this.inputSequence=[...new Array(this.glyphCount-1)].map(e=>t.uint16),this.substLookupRecords=[...new Array(this.substitutionCount)].map(e=>new wn(t))}},Mm=class extends Bt{constructor(t){super(t),this.subClassRuleCount=t.uint16,this.subClassRuleOffsets=[...new Array(this.subClassRuleCount)].map(e=>t.Offset16)}getSubClass(t){let e=this.parser;return e.currentPosition=this.start+this.subClassRuleOffsets[t],new Gm(e)}},Gm=class extends Yl{constructor(t){super(t)}},jm=class extends xr{constructor(t){super(t),this.substFormat===1&&(this.chainSubRuleSetCount=t.uint16,this.chainSubRuleSetOffsets=[...new Array(this.chainSubRuleSetCount)].map(e=>t.Offset16)),this.substFormat===2&&(this.backtrackClassDefOffset=t.Offset16,this.inputClassDefOffset=t.Offset16,this.lookaheadClassDefOffset=t.Offset16,this.chainSubClassSetCount=t.uint16,this.chainSubClassSetOffsets=[...new Array(this.chainSubClassSetCount)].map(e=>t.Offset16)),this.substFormat===3&&(Wl(this),this.backtrackGlyphCount=t.uint16,this.backtrackCoverageOffsets=[...new Array(this.backtrackGlyphCount)].map(e=>t.Offset16),this.inputGlyphCount=t.uint16,this.inputCoverageOffsets=[...new Array(this.inputGlyphCount)].map(e=>t.Offset16),this.lookaheadGlyphCount=t.uint16,this.lookaheadCoverageOffsets=[...new Array(this.lookaheadGlyphCount)].map(e=>t.Offset16),this.seqLookupCount=t.uint16,this.seqLookupRecords=[...new Array(this.substitutionCount)].map(e=>new ql(t)))}getChainSubRuleSet(t){if(this.substFormat!==1)throw new Error(`lookup type 6.${this.substFormat} has no chainsubrule sets.`);let e=this.parser;return e.currentPosition=this.start+this.chainSubRuleSetOffsets[t],new Um(e)}getChainSubClassSet(t){if(this.substFormat!==2)throw new Error(`lookup type 6.${this.substFormat} has no chainsubclass sets.`);let e=this.parser;return e.currentPosition=this.start+this.chainSubClassSetOffsets[t],new Wm(e)}getCoverageFromOffset(t){if(this.substFormat!==3)throw new Error(`lookup type 6.${this.substFormat} does not use contextual coverage offsets.`);let e=this.parser;return e.currentPosition=this.start+t,new ho(e)}},Um=class extends Bt{constructor(t){super(t),this.chainSubRuleCount=t.uint16,this.chainSubRuleOffsets=[...new Array(this.chainSubRuleCount)].map(e=>t.Offset16)}getSubRule(t){let e=this.parser;return e.currentPosition=this.start+this.chainSubRuleOffsets[t],new Hm(e)}},Hm=class{constructor(t){this.backtrackGlyphCount=t.uint16,this.backtrackSequence=[...new Array(this.backtrackGlyphCount)].map(e=>t.uint16),this.inputGlyphCount=t.uint16,this.inputSequence=[...new Array(this.inputGlyphCount-1)].map(e=>t.uint16),this.lookaheadGlyphCount=t.uint16,this.lookAheadSequence=[...new Array(this.lookAheadGlyphCount)].map(e=>t.uint16),this.substitutionCount=t.uint16,this.substLookupRecords=[...new Array(this.SubstCount)].map(e=>new wn(t))}},Wm=class extends Bt{constructor(t){super(t),this.chainSubClassRuleCount=t.uint16,this.chainSubClassRuleOffsets=[...new Array(this.chainSubClassRuleCount)].map(e=>t.Offset16)}getSubClass(t){let e=this.parser;return e.currentPosition=this.start+this.chainSubRuleOffsets[t],new Ym(e)}},Ym=class{constructor(t){this.backtrackGlyphCount=t.uint16,this.backtrackSequence=[...new Array(this.backtrackGlyphCount)].map(e=>t.uint16),this.inputGlyphCount=t.uint16,this.inputSequence=[...new Array(this.inputGlyphCount-1)].map(e=>t.uint16),this.lookaheadGlyphCount=t.uint16,this.lookAheadSequence=[...new Array(this.lookAheadGlyphCount)].map(e=>t.uint16),this.substitutionCount=t.uint16,this.substLookupRecords=[...new Array(this.substitutionCount)].map(e=>new ql(t))}},ql=class extends Bt{constructor(t){super(t),this.sequenceIndex=t.uint16,this.lookupListIndex=t.uint16}},qm=class extends Bt{constructor(t){super(t),this.substFormat=t.uint16,this.extensionLookupType=t.uint16,this.extensionOffset=t.Offset32}},Zm=class extends xr{constructor(t){super(t),this.backtrackGlyphCount=t.uint16,this.backtrackCoverageOffsets=[...new Array(this.backtrackGlyphCount)].map(e=>t.Offset16),this.lookaheadGlyphCount=t.uint16,this.lookaheadCoverageOffsets=[new Array(this.lookaheadGlyphCount)].map(e=>t.Offset16),this.glyphCount=t.uint16,this.substituteGlyphIDs=[...new Array(this.glyphCount)].map(e=>t.uint16)}},Xm={buildSubtable:function(t,e){let r=new[void 0,Am,Rm,Im,Bm,Nm,jm,qm,Zm][t](e);return r.type=t,r}},Ye=class extends Bt{constructor(t){super(t)}},Km=class extends Ye{constructor(t){super(t),console.log("lookup type 1")}},Jm=class extends Ye{constructor(t){super(t),console.log("lookup type 2")}},Qm=class extends Ye{constructor(t){super(t),console.log("lookup type 3")}},$m=class extends Ye{constructor(t){super(t),console.log("lookup type 4")}},tp=class extends Ye{constructor(t){super(t),console.log("lookup type 5")}},ep=class extends Ye{constructor(t){super(t),console.log("lookup type 6")}},rp=class extends Ye{constructor(t){super(t),console.log("lookup type 7")}},op=class extends Ye{constructor(t){super(t),console.log("lookup type 8")}},sp=class extends Ye{constructor(t){super(t),console.log("lookup type 9")}},np={buildSubtable:function(t,e){let r=new[void 0,Km,Jm,Qm,$m,tp,ep,rp,op,sp][t](e);return r.type=t,r}},Gl=class extends Bt{static EMPTY={lookupCount:0,lookups:[]};constructor(t){super(t),this.lookupCount=t.uint16,this.lookups=[...new Array(this.lookupCount)].map(e=>t.Offset16)}},ap=class extends Bt{constructor(t,e){super(t),this.ctType=e,this.lookupType=t.uint16,this.lookupFlag=t.uint16,this.subTableCount=t.uint16,this.subtableOffsets=[...new Array(this.subTableCount)].map(r=>t.Offset16),this.markFilteringSet=t.uint16}get rightToLeft(){return this.lookupFlag&!0}get ignoreBaseGlyphs(){return this.lookupFlag&!0}get ignoreLigatures(){return this.lookupFlag&!0}get ignoreMarks(){return this.lookupFlag&!0}get useMarkFilteringSet(){return this.lookupFlag&!0}get markAttachmentType(){return this.lookupFlag&!0}getSubTable(t){let e=this.ctType==="GSUB"?Xm:np;return this.parser.currentPosition=this.start+this.subtableOffsets[t],e.buildSubtable(this.lookupType,this.parser)}},Zl=class extends mt{constructor(t,e,r){let{p:o,tableStart:s}=super(t,e,r);this.majorVersion=o.uint16,this.minorVersion=o.uint16,this.scriptListOffset=o.Offset16,this.featureListOffset=o.Offset16,this.lookupListOffset=o.Offset16,this.majorVersion===1&&this.minorVersion===1&&(this.featureVariationsOffset=o.Offset32);let a=!(this.scriptListOffset||this.featureListOffset||this.lookupListOffset);Z(this,"scriptList",()=>a?Nl.EMPTY:(o.currentPosition=s+this.scriptListOffset,new Nl(o))),Z(this,"featureList",()=>a?Ml.EMPTY:(o.currentPosition=s+this.featureListOffset,new Ml(o))),Z(this,"lookupList",()=>a?Gl.EMPTY:(o.currentPosition=s+this.lookupListOffset,new Gl(o))),this.featureVariationsOffset&&Z(this,"featureVariations",()=>a?FeatureVariations.EMPTY:(o.currentPosition=s+this.featureVariationsOffset,new FeatureVariations(o)))}getSupportedScripts(){return this.scriptList.scriptRecords.map(t=>t.scriptTag)}getScriptTable(t){let e=this.scriptList.scriptRecords.find(o=>o.scriptTag===t);this.parser.currentPosition=this.scriptList.start+e.scriptOffset;let r=new Cm(this.parser);return r.scriptTag=t,r}ensureScriptTable(t){return typeof t=="string"?this.getScriptTable(t):t}getSupportedLangSys(t){t=this.ensureScriptTable(t);let e=t.defaultLangSys!==0,r=t.langSysRecords.map(o=>o.langSysTag);return e&&r.unshift("dflt"),r}getDefaultLangSysTable(t){t=this.ensureScriptTable(t);let e=t.defaultLangSys;if(e!==0){this.parser.currentPosition=t.start+e;let r=new zl(this.parser);return r.langSysTag="",r.defaultForScript=t.scriptTag,r}}getLangSysTable(t,e="dflt"){if(e==="dflt")return this.getDefaultLangSysTable(t);t=this.ensureScriptTable(t);let r=t.langSysRecords.find(s=>s.langSysTag===e);this.parser.currentPosition=t.start+r.langSysOffset;let o=new zl(this.parser);return o.langSysTag=e,o}getFeatures(t){return t.featureIndices.map(e=>this.getFeature(e))}getFeature(t){let e;if(parseInt(t)==t?e=this.featureList.featureRecords[t]:e=this.featureList.featureRecords.find(o=>o.featureTag===t),!e)return;this.parser.currentPosition=this.featureList.start+e.featureOffset;let r=new Om(this.parser);return r.featureTag=e.featureTag,r}getLookups(t){return t.lookupListIndices.map(e=>this.getLookup(e))}getLookup(t,e){let r=this.lookupList.lookups[t];return this.parser.currentPosition=this.lookupList.start+r,new ap(this.parser,e)}},ip=class extends Zl{constructor(t,e){super(t,e,"GSUB")}getLookup(t){return super.getLookup(t,"GSUB")}},lp=Object.freeze({__proto__:null,GSUB:ip}),up=class extends Zl{constructor(t,e){super(t,e,"GPOS")}getLookup(t){return super.getLookup(t,"GPOS")}},fp=Object.freeze({__proto__:null,GPOS:up}),cp=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.version=r.uint16,this.offsetToSVGDocumentList=r.Offset32,r.currentPosition=this.tableStart+this.offsetToSVGDocumentList,this.documentList=new dp(r)}},dp=class extends Bt{constructor(t){super(t),this.numEntries=t.uint16,this.documentRecords=[...new Array(this.numEntries)].map(e=>new mp(t))}getDocument(t){let e=this.documentRecords[t];if(!e)return"";let r=this.start+e.svgDocOffset;return this.parser.currentPosition=r,this.parser.readBytes(e.svgDocLength)}getDocumentForGlyph(t){let e=this.documentRecords.findIndex(r=>r.startGlyphID<=t&&t<=r.endGlyphID);return e===-1?"":this.getDocument(e)}},mp=class{constructor(t){this.startGlyphID=t.uint16,this.endGlyphID=t.uint16,this.svgDocOffset=t.Offset32,this.svgDocLength=t.uint32}},pp=Object.freeze({__proto__:null,SVG:cp}),hp=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.axesArrayOffset=r.Offset16,r.uint16,this.axisCount=r.uint16,this.axisSize=r.uint16,this.instanceCount=r.uint16,this.instanceSize=r.uint16;let o=this.tableStart+this.axesArrayOffset;Z(this,"axes",()=>(r.currentPosition=o,[...new Array(this.axisCount)].map(a=>new gp(r))));let s=o+this.axisCount*this.axisSize;Z(this,"instances",()=>{let a=[];for(let n=0;nt.tag)}getAxis(t){return this.axes.find(e=>e.tag===t)}},gp=class{constructor(t){this.tag=t.tag,this.minValue=t.fixed,this.defaultValue=t.fixed,this.maxValue=t.fixed,this.flags=t.flags(16),this.axisNameID=t.uint16}},yp=class{constructor(t,e,r){let o=t.currentPosition;this.subfamilyNameID=t.uint16,t.uint16,this.coordinates=[...new Array(e)].map(s=>t.fixed),t.currentPosition-o[...new Array(o)].map(s=>r.fword))}},wp=Object.freeze({__proto__:null,cvt:bp}),Sp=class extends mt{constructor(t,e){let{p:r}=super(t,e);Z(this,"instructions",()=>[...new Array(t.length)].map(o=>r.uint8))}},xp=Object.freeze({__proto__:null,fpgm:Sp}),Cp=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.version=r.uint16,this.numRanges=r.uint16,Z(this,"gaspRanges",()=>[...new Array(this.numRanges)].map(s=>new Fp(r)))}},Fp=class{constructor(t){this.rangeMaxPPEM=t.uint16,this.rangeGaspBehavior=t.uint16}},kp=Object.freeze({__proto__:null,gasp:Cp}),Op=class extends mt{constructor(t,e){super(t,e)}getGlyphData(t,e){return this.parser.currentPosition=this.tableStart+t,this.parser.readBytes(e)}},Tp=Object.freeze({__proto__:null,glyf:Op}),_p=class extends mt{constructor(t,e,r){let{p:o}=super(t,e),s=r.maxp.numGlyphs+1;r.head.indexToLocFormat===0?(this.x2=!0,Z(this,"offsets",()=>[...new Array(s)].map(a=>o.Offset16))):Z(this,"offsets",()=>[...new Array(s)].map(a=>o.Offset32))}getGlyphDataOffsetAndLength(t){let e=this.offsets[t]*this.x2?2:1,r=this.offsets[t+1]*this.x2?2:1;return{offset:e,length:r-e}}},Pp=Object.freeze({__proto__:null,loca:_p}),Ap=class extends mt{constructor(t,e){let{p:r}=super(t,e);Z(this,"instructions",()=>[...new Array(t.length)].map(o=>r.uint8))}},Rp=Object.freeze({__proto__:null,prep:Ap}),Ep=class extends mt{constructor(t,e){let{p:r}=super(t,e);Z(this,"data",()=>r.readBytes())}},Ip=Object.freeze({__proto__:null,CFF:Ep}),Lp=class extends mt{constructor(t,e){let{p:r}=super(t,e);Z(this,"data",()=>r.readBytes())}},Bp=Object.freeze({__proto__:null,CFF2:Lp}),Dp=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.defaultVertOriginY=r.int16,this.numVertOriginYMetrics=r.uint16,Z(this,"vertORiginYMetrics",()=>[...new Array(this.numVertOriginYMetrics)].map(o=>new Vp(r)))}},Vp=class{constructor(t){this.glyphIndex=t.uint16,this.vertOriginY=t.int16}},Np=Object.freeze({__proto__:null,VORG:Dp}),zp=class{constructor(t){this.indexSubTableArrayOffset=t.Offset32,this.indexTablesSize=t.uint32,this.numberofIndexSubTables=t.uint32,this.colorRef=t.uint32,this.hori=new as(t),this.vert=new as(t),this.startGlyphIndex=t.uint16,this.endGlyphIndex=t.uint16,this.ppemX=t.uint8,this.ppemY=t.uint8,this.bitDepth=t.uint8,this.flags=t.int8}},Mp=class{constructor(t){this.hori=new as(t),this.vert=new as(t),this.ppemX=t.uint8,this.ppemY=t.uint8,this.substitutePpemX=t.uint8,this.substitutePpemY=t.uint8}},as=class{constructor(t){this.ascender=t.int8,this.descender=t.int8,this.widthMax=t.uint8,this.caretSlopeNumerator=t.int8,this.caretSlopeDenominator=t.int8,this.caretOffset=t.int8,this.minOriginSB=t.int8,this.minAdvanceSB=t.int8,this.maxBeforeBL=t.int8,this.minAfterBL=t.int8,this.pad1=t.int8,this.pad2=t.int8}},Xl=class extends mt{constructor(t,e,r){let{p:o}=super(t,e,r);this.majorVersion=o.uint16,this.minorVersion=o.uint16,this.numSizes=o.uint32,Z(this,"bitMapSizes",()=>[...new Array(this.numSizes)].map(s=>new zp(o)))}},Gp=Object.freeze({__proto__:null,EBLC:Xl}),Kl=class extends mt{constructor(t,e,r){let{p:o}=super(t,e,r);this.majorVersion=o.uint16,this.minorVersion=o.uint16}},jp=Object.freeze({__proto__:null,EBDT:Kl}),Up=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.numSizes=r.uint32,Z(this,"bitmapScales",()=>[...new Array(this.numSizes)].map(o=>new Mp(r)))}},Hp=Object.freeze({__proto__:null,EBSC:Up}),Wp=class extends Xl{constructor(t,e){super(t,e,"CBLC")}},Yp=Object.freeze({__proto__:null,CBLC:Wp}),qp=class extends Kl{constructor(t,e){super(t,e,"CBDT")}},Zp=Object.freeze({__proto__:null,CBDT:qp}),Xp=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.version=r.uint16,this.flags=r.flags(16),this.numStrikes=r.uint32,Z(this,"strikeOffsets",()=>[...new Array(this.numStrikes)].map(o=>r.Offset32))}},Kp=Object.freeze({__proto__:null,sbix:Xp}),Jp=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.version=r.uint16,this.numBaseGlyphRecords=r.uint16,this.baseGlyphRecordsOffset=r.Offset32,this.layerRecordsOffset=r.Offset32,this.numLayerRecords=r.uint16}getBaseGlyphRecord(t){let e=this.tableStart+this.baseGlyphRecordsOffset;this.parser.currentPosition=e;let r=new bn(this.parser),o=r.gID,s=this.tableStart+this.layerRecordsOffset-6;this.parser.currentPosition=s;let a=new bn(this.parser),n=a.gID;if(o===t)return r;if(n===t)return a;for(;e!==s;){let l=e+(s-e)/12;this.parser.currentPosition=l;let m=new bn(this.parser),f=m.gID;if(f===t)return m;f>t?s=l:fnew Qp(p))}},bn=class{constructor(t){this.gID=t.uint16,this.firstLayerIndex=t.uint16,this.numLayers=t.uint16}},Qp=class{constructor(t){this.gID=t.uint16,this.paletteIndex=t.uint16}},$p=Object.freeze({__proto__:null,COLR:Jp}),th=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.version=r.uint16,this.numPaletteEntries=r.uint16;let o=this.numPalettes=r.uint16;this.numColorRecords=r.uint16,this.offsetFirstColorRecord=r.Offset32,this.colorRecordIndices=[...new Array(this.numPalettes)].map(s=>r.uint16),Z(this,"colorRecords",()=>(r.currentPosition=this.tableStart+this.offsetFirstColorRecord,[...new Array(this.numColorRecords)].map(s=>new eh(r)))),this.version===1&&(this.offsetPaletteTypeArray=r.Offset32,this.offsetPaletteLabelArray=r.Offset32,this.offsetPaletteEntryLabelArray=r.Offset32,Z(this,"paletteTypeArray",()=>(r.currentPosition=this.tableStart+this.offsetPaletteTypeArray,new rh(r,o))),Z(this,"paletteLabelArray",()=>(r.currentPosition=this.tableStart+this.offsetPaletteLabelArray,new oh(r,o))),Z(this,"paletteEntryLabelArray",()=>(r.currentPosition=this.tableStart+this.offsetPaletteEntryLabelArray,new sh(r,o))))}},eh=class{constructor(t){this.blue=t.uint8,this.green=t.uint8,this.red=t.uint8,this.alpha=t.uint8}},rh=class{constructor(t,e){this.paletteTypes=[...new Array(e)].map(r=>t.uint32)}},oh=class{constructor(t,e){this.paletteLabels=[...new Array(e)].map(r=>t.uint16)}},sh=class{constructor(t,e){this.paletteEntryLabels=[...new Array(e)].map(r=>t.uint16)}},nh=Object.freeze({__proto__:null,CPAL:th}),ah=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.version=r.uint32,this.numSignatures=r.uint16,this.flags=r.uint16,this.signatureRecords=[...new Array(this.numSignatures)].map(o=>new ih(r))}getData(t){let e=this.signatureRecords[t];return this.parser.currentPosition=this.tableStart+e.offset,new lh(this.parser)}},ih=class{constructor(t){this.format=t.uint32,this.length=t.uint32,this.offset=t.Offset32}},lh=class{constructor(t){t.uint16,t.uint16,this.signatureLength=t.uint32,this.signature=t.readBytes(this.signatureLength)}},uh=Object.freeze({__proto__:null,DSIG:ah}),fh=class extends mt{constructor(t,e,r){let{p:o}=super(t,e),s=r.hmtx.numGlyphs;this.version=o.uint16,this.numRecords=o.int16,this.sizeDeviceRecord=o.int32,this.records=[...new Array(numRecords)].map(a=>new ch(o,s))}},ch=class{constructor(t,e){this.pixelSize=t.uint8,this.maxWidth=t.uint8,this.widths=t.readBytes(e)}},dh=Object.freeze({__proto__:null,hdmx:fh}),mh=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.version=r.uint16,this.nTables=r.uint16,Z(this,"tables",()=>{let o=this.tableStart+4,s=[];for(let a=0;a[...new Array(this.nPairs)].map(e=>new hh(t)))),this.format===2&&console.warn("Kern subtable format 2 is not supported: this parser currently only parses universal table data.")}get horizontal(){return this.coverage[0]}get minimum(){return this.coverage[1]}get crossstream(){return this.coverage[2]}get override(){return this.coverage[3]}},hh=class{constructor(t){this.left=t.uint16,this.right=t.uint16,this.value=t.fword}},gh=Object.freeze({__proto__:null,kern:mh}),yh=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.version=r.uint16,this.numGlyphs=r.uint16,this.yPels=r.readBytes(this.numGlyphs)}},vh=Object.freeze({__proto__:null,LTSH:yh}),bh=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.version=r.uint16,this.mergeClassCount=r.uint16,this.mergeDataOffset=r.Offset16,this.classDefCount=r.uint16,this.offsetToClassDefOffsets=r.Offset16,Z(this,"mergeEntryMatrix",()=>[...new Array(this.mergeClassCount)].map(o=>r.readBytes(this.mergeClassCount))),console.warn("Full MERG parsing is currently not supported."),console.warn("If you need this table parsed, please file an issue, or better yet, a PR.")}},wh=Object.freeze({__proto__:null,MERG:bh}),Sh=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.version=r.uint32,this.flags=r.uint32,r.uint32,this.dataMapsCount=r.uint32,this.dataMaps=[...new Array(this.dataMapsCount)].map(o=>new xh(this.tableStart,r))}},xh=class{constructor(t,e){this.tableStart=t,this.parser=e,this.tag=e.tag,this.dataOffset=e.Offset32,this.dataLength=e.uint32}getData(){return this.parser.currentField=this.tableStart+this.dataOffset,this.parser.readBytes(this.dataLength)}},Ch=Object.freeze({__proto__:null,meta:Sh}),Fh=class extends mt{constructor(t,e){super(t,e),console.warn("This font uses a PCLT table, which is currently not supported by this parser."),console.warn("If you need this table parsed, please file an issue, or better yet, a PR.")}},kh=Object.freeze({__proto__:null,PCLT:Fh}),Oh=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.version=r.uint16,this.numRecs=r.uint16,this.numRatios=r.uint16,this.ratRanges=[...new Array(this.numRatios)].map(o=>new Th(r)),this.offsets=[...new Array(this.numRatios)].map(o=>r.Offset16),this.VDMXGroups=[...new Array(this.numRecs)].map(o=>new _h(r))}},Th=class{constructor(t){this.bCharSet=t.uint8,this.xRatio=t.uint8,this.yStartRatio=t.uint8,this.yEndRatio=t.uint8}},_h=class{constructor(t){this.recs=t.uint16,this.startsz=t.uint8,this.endsz=t.uint8,this.records=[...new Array(this.recs)].map(e=>new Ph(t))}},Ph=class{constructor(t){this.yPelHeight=t.uint16,this.yMax=t.int16,this.yMin=t.int16}},Ah=Object.freeze({__proto__:null,VDMX:Oh}),Rh=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.version=r.fixed,this.ascent=this.vertTypoAscender=r.int16,this.descent=this.vertTypoDescender=r.int16,this.lineGap=this.vertTypoLineGap=r.int16,this.advanceHeightMax=r.int16,this.minTopSideBearing=r.int16,this.minBottomSideBearing=r.int16,this.yMaxExtent=r.int16,this.caretSlopeRise=r.int16,this.caretSlopeRun=r.int16,this.caretOffset=r.int16,this.reserved=r.int16,this.reserved=r.int16,this.reserved=r.int16,this.reserved=r.int16,this.metricDataFormat=r.int16,this.numOfLongVerMetrics=r.uint16,r.verifyLength()}},Eh=Object.freeze({__proto__:null,vhea:Rh}),Ih=class extends mt{constructor(t,e,r){super(t,e);let o=r.vhea.numOfLongVerMetrics,s=r.maxp.numGlyphs,a=p.currentPosition;if(lazy(this,"vMetrics",()=>(p.currentPosition=a,[...new Array(o)].map(n=>new Lh(p.uint16,p.int16)))),o(p.currentPosition=n,[...new Array(s-o)].map(l=>p.int16)))}}},Lh=class{constructor(t,e){this.advanceHeight=t,this.topSideBearing=e}},Bh=Object.freeze({__proto__:null,vmtx:Ih});var Jl=u(X(),1);var{kebabCase:Dh}=vt(Jl.privateApis);function Ql(t){let e=t.reduce((r,o)=>(r[o.fontFamily]||(r[o.fontFamily]={name:o.fontFamily,fontFamily:o.fontFamily,slug:Dh(o.fontFamily.toLowerCase()),fontFace:[]}),r[o.fontFamily].fontFace.push(o),r),{});return Object.values(e)}var pe=u(z(),1);function Vh(){let{installFonts:t}=(0,go.useContext)(ne),[e,r]=(0,go.useState)(!1),[o,s]=(0,go.useState)(null),a=h=>{l(h)},n=h=>{l(h.target.files)},l=async h=>{if(!h)return;s(null),r(!0);let v=new Set,_=[...h],A=!1,k=_.map(async b=>{if(!await f(b))return A=!0,null;if(v.has(b.name))return null;let Y=(((b.name??"").split(".")??[]).pop()??"").toLowerCase();return pn.includes(Y)?(v.add(b.name),b):null}),x=(await Promise.all(k)).filter(b=>b!==null);if(x.length>0)m(x);else{let b=A?(0,Ur.__)("Sorry, you are not allowed to upload this file type."):(0,Ur.__)("No fonts found to install.");s({type:"error",message:b}),r(!1)}},m=async h=>{let v=await Promise.all(h.map(async _=>{let A=await d(_);return await er(A,A.file,"all"),A}));g(v)};async function f(h){let v=new is("Uploaded Font");try{let _=await c(h);return await v.fromDataBuffer(_,"font"),!0}catch{return!1}}async function c(h){return new Promise((v,_)=>{let A=new window.FileReader;A.readAsArrayBuffer(h),A.onload=()=>v(A.result),A.onerror=_})}let d=async h=>{let v=await c(h),_=new is("Uploaded Font");_.fromDataBuffer(v,h.name);let k=(await new Promise($=>_.onload=$)).detail.font,{name:x}=k.opentype.tables,b=x.get(16)||x.get(1),T=x.get(2).toLowerCase().includes("italic"),Y=k.opentype.tables["OS/2"].usWeightClass||"normal",V=!!k.opentype.tables.fvar&&k.opentype.tables.fvar.axes.find(({tag:$})=>$==="wght"),H=V?`${V.minValue} ${V.maxValue}`:null;return{file:h,fontFamily:b,fontStyle:T?"italic":"normal",fontWeight:H||Y}},g=async h=>{let v=Ql(h);try{await t(v),s({type:"success",message:(0,Ur.__)("Fonts were installed successfully.")})}catch(_){let A=_;s({type:"error",message:A.message,errors:A?.installationErrors})}r(!1)};return(0,pe.jsxs)("div",{className:"font-library__tabpanel-layout",children:[(0,pe.jsx)($t.DropZone,{onFilesDrop:a}),(0,pe.jsxs)($t.__experimentalVStack,{className:"font-library__local-fonts",justify:"start",children:[o&&(0,pe.jsxs)($t.Notice,{status:o.type,__unstableHTML:!0,onRemove:()=>s(null),children:[o.message,o.errors&&(0,pe.jsx)("ul",{children:o.errors.map((h,v)=>(0,pe.jsx)("li",{children:h},v))})]}),e&&(0,pe.jsx)($t.FlexItem,{children:(0,pe.jsx)("div",{className:"font-library__upload-area",children:(0,pe.jsx)($t.ProgressBar,{})})}),!e&&(0,pe.jsx)($t.FormFileUpload,{accept:pn.map(h=>`.${h}`).join(","),multiple:!0,onChange:n,render:({openFileDialog:h})=>(0,pe.jsx)($t.Button,{__next40pxDefaultSize:!0,className:"font-library__upload-area",onClick:h,children:(0,Ur.__)("Upload font")})}),(0,pe.jsx)($t.__experimentalText,{className:"font-library__upload-area__text",children:(0,Ur.__)("Uploaded fonts appear in your library and can be used in your theme. Supported formats: .ttf, .otf, .woff, and .woff2.")})]})]})}var ls=Vh;var tu=u(z(),1),{Tabs:x2}=vt(Sn.privateApis),C2={id:"installed-fonts",title:(0,us._x)("Library","Font library")},F2={id:"upload-fonts",title:(0,us._x)("Upload","noun")};var eu=u(ut(),1),xn=u(X(),1),zh=u(yt(),1);var ru=u(z(),1);var Cn=u(z(),1);var ou=u(ut(),1),fs=u(X(),1);var su=u(z(),1);var kn=u(z(),1);var _e=u(ut(),1),On=u(X(),1),qh=u(yt(),1);var nu=u(ce(),1);var Wh=u(z(),1),{useSettingsForBlockElement:t6,TypographyPanel:e6}=vt(nu.privateApis);var Yh=u(z(),1);var Tn=u(z(),1),f6={text:{description:(0,_e.__)("Manage the fonts used on the site."),title:(0,_e.__)("Text")},link:{description:(0,_e.__)("Manage the fonts and typography used on the links."),title:(0,_e.__)("Links")},heading:{description:(0,_e.__)("Manage the fonts and typography used on headings."),title:(0,_e.__)("Headings")},caption:{description:(0,_e.__)("Manage the fonts and typography used on captions."),title:(0,_e.__)("Captions")},button:{description:(0,_e.__)("Manage the fonts and typography used on buttons."),title:(0,_e.__)("Buttons")}};var Jh=u(ut(),1),Qh=u(X(),1),iu=u(ce(),1);var Hr=u(X(),1),au=u(ut(),1);var Kh=u(yt(),1);var Zh=u(X(),1),Xh=u(z(),1);var _n=u(z(),1);var Pn=u(z(),1),{useSettingsForBlockElement:O6,ColorPanel:T6}=vt(iu.privateApis);var ng=u(ut(),1),pu=u(X(),1);var eg=u(cr(),1),An=u(X(),1),rg=u(ut(),1);var ds=u(X(),1);var cs=u(X(),1);var lu=u(z(),1);function uu(){let{paletteColors:t}=Lr();return t.slice(0,4).map(({slug:e,color:r},o)=>(0,lu.jsx)("div",{style:{flexGrow:1,height:"100%",background:r}},`${e}-${o}`))}var vo=u(z(),1),$h={start:{scale:1,opacity:1},hover:{scale:0,opacity:0}},tg=({label:t,isFocused:e,withHoverView:r})=>(0,vo.jsx)(Vr,{label:t,isFocused:e,withHoverView:r,children:({key:o})=>(0,vo.jsx)(cs.__unstableMotion.div,{variants:$h,style:{height:"100%",overflow:"hidden"},children:(0,vo.jsx)(cs.__experimentalHStack,{spacing:0,justify:"center",style:{height:"100%",overflow:"hidden"},children:(0,vo.jsx)(uu,{})})},o)}),fu=tg;var Cr=u(z(),1),cu=["color"];function ms({title:t,gap:e=2}){let r=No(cu);return r?.length<=1?null:(0,Cr.jsxs)(ds.__experimentalVStack,{spacing:3,children:[t&&(0,Cr.jsx)(Se,{level:3,children:t}),(0,Cr.jsx)(ds.__experimentalGrid,{gap:e,children:r.map((o,s)=>(0,Cr.jsx)(zr,{variation:o,isPill:!0,properties:cu,showTooltip:!0,children:()=>(0,Cr.jsx)(fu,{})},s))})]})}var du=u(z(),1);var og=u(cr(),1),ps=u(X(),1),sg=u(ut(),1);var mu=u(z(),1);var Rn=u(z(),1),{Tabs:Q6}=vt(pu.privateApis);var ig=u(ut(),1),gu=u(ce(),1),lg=u(X(),1);var hu=u(ce(),1);var ag=u(z(),1);var{BackgroundPanel:rC}=vt(hu.privateApis);var En=u(z(),1),{useHasBackgroundPanel:uC}=vt(gu.privateApis);var Fr=u(X(),1),In=u(ut(),1);var mg=u(yt(),1);var ug=u(X(),1),fg=u(ut(),1),cg=u(z(),1);var Ln=u(z(),1),{Menu:SC}=vt(Fr.privateApis);var Ut=u(X(),1),bo=u(ut(),1);var hs=u(yt(),1);var Bn=u(z(),1),{Menu:DC}=vt(Ut.privateApis),VC=[{label:(0,bo.__)("Rename"),action:"rename"},{label:(0,bo.__)("Delete"),action:"delete"}],NC=[{label:(0,bo.__)("Reset"),action:"reset"}];var pg=u(z(),1);var yg=u(ut(),1),vu=u(ce(),1);var yu=u(ce(),1),hg=u(yt(),1);var gg=u(z(),1),{useSettingsForBlockElement:qC,DimensionsPanel:ZC}=vt(yu.privateApis);var Dn=u(z(),1),{useHasDimensionsPanel:eF,useSettingsForBlockElement:rF}=vt(vu.privateApis);var Fu=u(X(),1),Sg=u(ut(),1);var bg=u(ut(),1),wg=u(X(),1);var bu=u(be(),1),wu=u(fe(),1),ys=u(yt(),1),Su=u(X(),1),xu=u(ut(),1);var gs=u(z(),1);function vg({gap:t=2}){let{user:e}=(0,ys.useContext)(Xt),r=e?.styles,s=(0,wu.useSelect)(n=>{let l=n(bu.store).__experimentalGetCurrentThemeGlobalStylesVariations();return Array.isArray(l)?l:void 0},[])?.filter(n=>!io(n,["color"])&&!io(n,["typography","spacing"])),a=(0,ys.useMemo)(()=>[...[{title:(0,xu.__)("Default"),settings:{},styles:{}},...s??[]].map(l=>{let m=l?.styles?.blocks?{...l.styles.blocks}:{};r?.blocks&&Object.keys(r.blocks).forEach(g=>{if(r.blocks?.[g]?.css){let h=m[g]||{},v={css:`${m[g]?.css||""} ${r.blocks?.[g]?.css?.trim()||""}`};m[g]={...h,...v}}});let f=r?.css||l.styles?.css?{css:`${l.styles?.css||""} ${r?.css||""}`}:{},c=Object.keys(m).length>0?{blocks:m}:{},d={...l.styles,...f,...c};return{...l,settings:l.settings??{},styles:d}})],[s,r?.blocks,r?.css]);return!s||s.length<1?null:(0,gs.jsx)(Su.__experimentalGrid,{columns:2,className:"global-styles-ui-style-variations-container",gap:t,children:a.map((n,l)=>(0,gs.jsx)(zr,{variation:n,children:m=>(0,gs.jsx)(nn,{label:n?.title,withHoverView:!0,isFocused:m,variation:n})},l))})}var Vn=vg;var Cu=u(z(),1);var Nn=u(z(),1);var xg=u(ut(),1),Cg=u(X(),1),ku=u(ce(),1);var zn=u(z(),1),{AdvancedPanel:wF}=vt(ku.privateApis);var Lu=u(ut(),1),Gn=u(X(),1),jn=u(yt(),1);var Fg=u(fe(),1),kg=u(be(),1),Ou=u(yt(),1);var Pu=u(ut(),1),Au=u(X(),1),vs=u(_u(),1),Og=u(be(),1),Tg=u(fe(),1);var Ru=u(dn(),1),Eu=u(z(),1),kF=3600*1e3*24;var Mn=u(X(),1),wo=u(ut(),1);var Iu=u(z(),1);var Un=u(z(),1);var Hn=u(ut(),1),qe=u(X(),1);var Eg=u(yt(),1);var Pg=u(X(),1),Ag=u(ut(),1),Rg=u(z(),1);var Wn=u(z(),1),{Menu:YF}=vt(qe.privateApis);var Nu=u(ut(),1),ze=u(X(),1);var zu=u(yt(),1);var Ig=u(ce(),1),Lg=u(ut(),1);var Bg=u(z(),1);var Dg=u(X(),1),Bu=u(ut(),1),Vg=u(z(),1);var So=u(X(),1),Ng=u(ut(),1),zg=u(yt(),1),Du=u(z(),1);var Ze=u(X(),1),Vu=u(z(),1);var Yn=u(z(),1),{Menu:f3}=vt(ze.privateApis);var Zn=u(z(),1);var Xn=u(z(),1);function Wr(t){return function({value:r,baseValue:o,onChange:s,...a}){return(0,Xn.jsx)(ao,{value:r,baseValue:o,onChange:s,children:(0,Xn.jsx)(t,{...a})})}}var Ug=Wr(Vn);var Hg=Wr(ms);var Wg=Wr(Wo);var Yr=u(z(),1);function Kn({value:t,baseValue:e,onChange:r,activeTab:o="installed-fonts"}){let s;switch(o){case"upload-fonts":s=(0,Yr.jsx)(ls,{});break;case"installed-fonts":s=(0,Yr.jsx)($o,{});break;default:s=(0,Yr.jsx)(es,{slug:o})}return(0,Yr.jsx)(ao,{value:t,baseValue:e,onChange:r,children:(0,Yr.jsx)(Zo,{children:s})})}var ju=u(Vs()),{unlock:Jn}=(0,ju.__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/font-list-route");if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='89af99528f']")){let t=document.createElement("style");t.setAttribute("data-wp-hash","89af99528f"),t.appendChild(document.createTextNode('@media (min-width:782px){.font-library-modal.font-library-modal{width:65vw}}.font-library-modal .components-modal__header{border-bottom:none}.font-library-modal .components-modal__content{margin-bottom:90px;padding:0}.font-library-modal .font-library__subtitle{font-size:11px;font-weight:499;text-transform:uppercase}.font-library-modal__tab-panel{height:calc(100% - 50px)}.font-library__tabpanel-layout{display:flex;flex-direction:column;height:100%}.font-library__tabpanel-layout>div{flex-grow:1}.font-library__tabpanel-layout .font-library__loading{align-items:center;box-sizing:border-box;display:flex;height:100%;justify-content:center;left:0;padding-top:124px;position:absolute;top:0;width:100%}.font-library__footer,.font-library__tabpanel-layout .components-navigator-screen{padding:24px;width:100%}.font-library__footer{background-color:#fff;border-top:1px solid #ddd;bottom:0;box-sizing:border-box;flex-grow:0!important;flex-shrink:0;height:90px;position:absolute}.font-library__page-selection{font-size:11px;font-weight:499;text-transform:uppercase}@media (min-width:600px){.font-library__page-selection .font-library__page-selection-trigger{font-size:11px!important;font-weight:499}}.font-library__fonts-title{font-size:11px;font-weight:600;margin-bottom:0;margin-top:0;text-transform:uppercase}.font-library__fonts-list{list-style:none;margin-bottom:0;margin-top:0;padding:0}.font-library__fonts-list-item{margin-bottom:0}.font-library__font-card{border:1px solid #ddd;box-sizing:border-box;height:auto!important;margin-top:-1px;padding:16px;width:100%}.font-library__font-card:hover{background-color:#f0f0f0}.font-library__font-card:focus{position:relative}.font-library__font-card .font-library__font-card__name{font-weight:700}.font-library__font-card .font-library__font-card__count{color:#757575}.font-library__font-card .font-library__font-variant_demo-image{display:block;height:24px;width:auto}.font-library__font-card .font-library__font-variant_demo-text{flex-shrink:0;white-space:nowrap}@media not (prefers-reduced-motion){.font-library__font-card .font-library__font-variant_demo-text{transition:opacity .3s ease-in-out}}.font-library-modal__tablist-container{background:#fff;border-bottom:1px solid #ddd;position:sticky;top:0;z-index:1}.font-library__upload-area{align-items:center;display:flex;height:256px!important;justify-content:center;width:100%}button.font-library__upload-area{background-color:#f0f0f0}.font-library__local-fonts{margin:24px auto;width:80%}.font-library__local-fonts .font-library__upload-area__text{color:#757575}.font-library__google-fonts-confirm{align-items:center;display:flex;justify-content:center;margin-top:64px}.font-library__google-fonts-confirm p{line-height:1.4}.font-library__google-fonts-confirm h2{font-size:1.2rem;font-weight:400}.font-library__google-fonts-confirm .components-card{padding:16px;width:400px}.font-library__google-fonts-confirm .components-button{justify-content:center;width:100%}.font-library__select-all{padding:16px 16px 16px 17px}.font-library__select-all .components-checkbox-control__label{padding-left:16px}.global-styles-ui-pagination .components-button.is-tertiary{height:32px;justify-content:center;width:32px}.global-styles-ui-screen-revisions__revisions-list{flex-grow:1;list-style:none;margin:0 16px 16px}.global-styles-ui-screen-revisions__revisions-list li{margin-bottom:0}.global-styles-ui-screen-revisions__revision-item{cursor:pointer;display:flex;flex-direction:column;position:relative}.global-styles-ui-screen-revisions__revision-item[role=option]:active,.global-styles-ui-screen-revisions__revision-item[role=option]:focus{box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:2px solid #0000}.global-styles-ui-screen-revisions__revision-item:hover{background:rgba(var(--wp-admin-theme-color--rgb),.04)}.global-styles-ui-screen-revisions__revision-item:hover .global-styles-ui-screen-revisions__date{color:var(--wp-admin-theme-color)}.global-styles-ui-screen-revisions__revision-item:after,.global-styles-ui-screen-revisions__revision-item:before{content:"\\a";display:block;position:absolute}.global-styles-ui-screen-revisions__revision-item:before{background:#ddd;border:4px solid #0000;border-radius:50%;height:8px;left:17px;top:18px;transform:translate(-50%,-50%);width:8px;z-index:1}.global-styles-ui-screen-revisions__revision-item[aria-selected=true]{background:rgba(var(--wp-admin-theme-color--rgb),.04);border-radius:2px;color:var(--wp-admin-theme-color);outline:3px solid #0000;outline-offset:-2px}.global-styles-ui-screen-revisions__revision-item[aria-selected=true] .global-styles-ui-screen-revisions__date{color:var(--wp-admin-theme-color)}.global-styles-ui-screen-revisions__revision-item[aria-selected=true]:before{background:var(--wp-admin-theme-color)}.global-styles-ui-screen-revisions__revision-item[aria-selected=true] .global-styles-ui-screen-revisions__applied-text,.global-styles-ui-screen-revisions__revision-item[aria-selected=true] .global-styles-ui-screen-revisions__changes>li,.global-styles-ui-screen-revisions__revision-item[aria-selected=true] .global-styles-ui-screen-revisions__meta{color:#1e1e1e}.global-styles-ui-screen-revisions__revision-item:after{border:.5px solid #ddd;height:100%;left:16px;top:0;width:0}.global-styles-ui-screen-revisions__revision-item:first-child:after{top:18px}.global-styles-ui-screen-revisions__revision-item:last-child:after{height:18px}.global-styles-ui-screen-revisions__revision-item-wrapper{display:block;padding:12px 12px 4px 40px}.global-styles-ui-screen-revisions__applied-text,.global-styles-ui-screen-revisions__apply-button.is-primary{align-self:flex-start;margin:4px 12px 12px 40px}.global-styles-ui-screen-revisions__applied-text,.global-styles-ui-screen-revisions__changes,.global-styles-ui-screen-revisions__meta{color:#757575;font-size:12px}.global-styles-ui-screen-revisions__description{align-items:flex-start;display:flex;flex-direction:column;gap:8px}.global-styles-ui-screen-revisions__description .global-styles-ui-screen-revisions__date{font-size:12px;font-weight:600;text-transform:uppercase}.global-styles-ui-screen-revisions__meta{align-items:flex-start;display:flex;justify-content:start;margin-bottom:4px;text-align:left;width:100%}.global-styles-ui-screen-revisions__meta img{border-radius:100%;height:16px;margin-right:8px;width:16px}.global-styles-ui-screen-revisions__loading{margin:24px auto!important}.global-styles-ui-screen-revisions__changes{line-height:1.4;list-style:disc;margin-left:12px;text-align:left}.global-styles-ui-screen-revisions__changes li{margin-bottom:4px}.global-styles-ui-screen-revisions__pagination.global-styles-ui-screen-revisions__pagination{gap:2px;justify-content:space-between}.global-styles-ui-screen-revisions__pagination.global-styles-ui-screen-revisions__pagination .edit-site-pagination__total{height:1px;left:-1000px;margin:-1px;overflow:hidden;position:absolute}.global-styles-ui-screen-revisions__pagination.global-styles-ui-screen-revisions__pagination .components-text{font-size:12px;will-change:opacity}.global-styles-ui-screen-revisions__pagination.global-styles-ui-screen-revisions__pagination .components-button.is-tertiary{color:#1e1e1e}.global-styles-ui-screen-revisions__pagination.global-styles-ui-screen-revisions__pagination .components-button.is-tertiary:disabled,.global-styles-ui-screen-revisions__pagination.global-styles-ui-screen-revisions__pagination .components-button.is-tertiary[aria-disabled=true]{color:#949494}.global-styles-ui-screen-revisions__footer{background:#fff;border-top:1px solid #ddd;bottom:0;height:56px;min-width:100%;padding:12px;position:sticky;z-index:1}.global-styles-ui-variations_item{box-sizing:border-box;cursor:pointer}.global-styles-ui-variations_item .global-styles-ui-variations_item-preview{border-radius:2px;outline:1px solid #0000001a;outline-offset:-1px;overflow:hidden;position:relative}@media not (prefers-reduced-motion){.global-styles-ui-variations_item .global-styles-ui-variations_item-preview{transition:outline .1s linear}}.global-styles-ui-variations_item .global-styles-ui-variations_item-preview.is-pill{height:32px}.global-styles-ui-variations_item .global-styles-ui-variations_item-preview.is-pill .block-editor-iframe__scale-container{overflow:hidden}.global-styles-ui-variations_item:not(.is-active):hover .global-styles-ui-variations_item-preview{outline-color:#0000004d}.global-styles-ui-variations_item.is-active .global-styles-ui-variations_item-preview,.global-styles-ui-variations_item:focus-visible .global-styles-ui-variations_item-preview{outline-color:#1e1e1e;outline-offset:1px;outline-width:var(--wp-admin-border-width-focus)}.global-styles-ui-variations_item:focus-visible .global-styles-ui-variations_item-preview{outline-color:var(--wp-admin-theme-color)}.global-styles-ui-preview{align-items:center;cursor:pointer;display:flex;justify-content:center;line-height:1}.global-styles-ui-preview__wrapper{display:block;max-width:100%;width:100%}.global-styles-ui-typography-preview{align-items:center;background:#f0f0f0;border-radius:2px;display:flex;justify-content:center;margin-bottom:20px;min-height:100px;overflow:hidden}.global-styles-ui-font-size__item{line-break:anywhere;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.global-styles-ui-font-size__item-value{color:#757575}.global-styles-ui-screen-typography__indicator{align-items:center;border-radius:2px;display:flex!important;font-size:14px;height:24px;justify-content:center;width:24px}.global-styles-ui-block-types-search{margin-bottom:10px;padding:0 16px}.global-styles-ui-screen-typography__font-variants-count{color:#757575}.global-styles-ui-font-families__manage-fonts{justify-content:center}.global-styles-ui-screen .color-block-support-panel{border-top:none;padding-left:0;padding-right:0;padding-top:0;row-gap:12px}.global-styles-ui-header{margin-bottom:0!important}.global-styles-ui-subtitle{font-size:11px!important;font-weight:499!important;margin-bottom:0!important;text-transform:uppercase}.global-styles-ui-section-title{color:#2f2f2f;font-weight:600;line-height:1.2;margin:0;padding:16px 16px 0}.global-styles-ui-icon-with-current-color{fill:currentColor}.global-styles-ui__color-indicator-wrapper{flex-shrink:0;height:24px}.global-styles-ui__shadows-panel__options-container,.global-styles-ui__typography-panel__options-container{height:24px}.global-styles-ui__block-preview-panel{border:1px solid #ddd;border-radius:2px;overflow:hidden;position:relative;width:100%}.global-styles-ui__shadow-preview-panel{background-image:repeating-linear-gradient(45deg,#e0e0e0 25%,#0000 0,#0000 75%,#e0e0e0 0,#e0e0e0),repeating-linear-gradient(45deg,#e0e0e0 25%,#0000 0,#0000 75%,#e0e0e0 0,#e0e0e0);background-position:0 0,8px 8px;background-size:16px 16px;border:1px solid #ddd;border-radius:2px;height:144px;overflow:auto}.global-styles-ui__shadow-preview-panel .global-styles-ui__shadow-preview-block{background-color:#fff;border:1px solid #ddd;border-radius:2px;height:60px;width:60%}.global-styles-ui__shadow-editor__dropdown-content{width:280px}.global-styles-ui__shadow-editor-panel{margin-bottom:4px}.global-styles-ui__shadow-editor__dropdown{position:relative;width:100%}.global-styles-ui__shadow-editor__dropdown-toggle{border-radius:inherit;height:auto;padding-bottom:8px;padding-top:8px;text-align:left;width:100%}.global-styles-ui__shadow-editor__dropdown-toggle.is-open{background:#f0f0f0;color:var(--wp-admin-theme-color)}.global-styles-ui__shadow-editor__remove-button{opacity:0;position:absolute;right:8px;top:8px}.global-styles-ui__shadow-editor__remove-button.global-styles-ui__shadow-editor__remove-button{border:none}.global-styles-ui__shadow-editor__dropdown-toggle:hover+.global-styles-ui__shadow-editor__remove-button,.global-styles-ui__shadow-editor__remove-button:focus,.global-styles-ui__shadow-editor__remove-button:hover{opacity:1}@media (hover:none){.global-styles-ui__shadow-editor__remove-button{opacity:1}}.global-styles-ui-screen-css{display:flex;flex:1 1 auto;flex-direction:column;margin:16px}.global-styles-ui-screen-css .components-v-stack{flex:1 1 auto}.global-styles-ui-screen-css .components-v-stack .block-editor-global-styles-advanced-panel__custom-css-input,.global-styles-ui-screen-css .components-v-stack .block-editor-global-styles-advanced-panel__custom-css-input .components-base-control__field{display:flex;flex:1 1 auto;flex-direction:column}.global-styles-ui-screen-css .components-v-stack .block-editor-global-styles-advanced-panel__custom-css-input .components-base-control__field .components-textarea-control__input{direction:ltr;flex:1 1 auto}.global-styles-ui-screen-css-help-link{display:inline-block;margin-top:8px}.global-styles-ui-screen-variations{border-top:1px solid #ddd;margin-top:16px}.global-styles-ui-screen-variations>*{margin:24px 16px}.global-styles-ui-sidebar__navigator-provider{height:100%}.global-styles-ui-sidebar__navigator-screen{display:flex;flex-direction:column;height:100%}.global-styles-ui-sidebar__navigator-screen .single-column{grid-column:span 1}.global-styles-ui-screen-root.global-styles-ui-screen-root,.global-styles-ui-screen-style-variations.global-styles-ui-screen-style-variations{background:unset;color:inherit}.global-styles-ui-sidebar__panel .block-editor-block-icon svg{fill:currentColor}.global-styles-ui-screen-root__active-style-tile.global-styles-ui-screen-root__active-style-tile,.global-styles-ui-screen-root__active-style-tile.global-styles-ui-screen-root__active-style-tile .global-styles-ui-screen-root__active-style-tile-preview{border-radius:2px}.global-styles-ui-screen-root__active-style-tile-preview{clip-path:border-box}.global-styles-ui-color-palette-panel,.global-styles-ui-gradient-palette-panel{padding:16px}.font-library-page__tablist{border-bottom:1px solid #f0f0f0;padding:0 24px}.font-library-page__tab-panel{flex-grow:1;max-height:calc(100% - 110px);overflow:auto}.admin-ui-page:has(.font-library__footer) .font-library-page__tab-panel{max-height:calc(100% - 198px)}')),document.head.appendChild(t)}var{Tabs:bs}=Jn(Uu.privateApis),{useGlobalStyles:Yg}=Jn(Hu.privateApis);function qg(){let{records:t=[]}=(0,ws.useEntityRecords)("root","fontCollection",{_fields:"slug,name,description"}),[e,r]=(0,Yu.useState)("installed-fonts"),{base:o,user:s,setUser:a,isReady:n}=Yg(),l=(0,Wu.useSelect)(f=>f(ws.store).canUser("create",{kind:"postType",name:"wp_font_family"}),[]);if(!n)return null;let m=[{id:"installed-fonts",title:(0,xo.__)("Library")}];return l&&(m.push({id:"upload-fonts",title:(0,xo.__)("Upload")}),m.push(...(t||[]).map(({slug:f,name:c})=>({id:f,title:t&&t.length===1&&f==="google-fonts"?(0,xo.__)("Install Fonts"):c})))),React.createElement(Ns,{title:(0,xo.__)("Fonts")},React.createElement(bs,{selectedTabId:e,onSelect:f=>r(f)},React.createElement("div",{className:"font-library-page__tablist"},React.createElement(bs.TabList,null,m.map(({id:f,title:c})=>React.createElement(bs.Tab,{key:f,tabId:f},c)))),m.map(({id:f})=>React.createElement(bs.TabPanel,{key:f,tabId:f,focusable:!1,className:"font-library-page__tab-panel"},React.createElement(Kn,{value:s,baseValue:o,onChange:a,activeTab:f})))))}function Zg(){return React.createElement(qg,null)}var Xg=Zg;export{Xg as stage}; +/*! Bundled license information: + +is-plain-object/dist/is-plain-object.mjs: + (*! + * is-plain-object + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + *) +*/ diff --git a/src/wp-includes/build/routes/font-list/route.js b/src/wp-includes/build/routes/font-list/route.js new file mode 100644 index 0000000000000..44a1c1946012c --- /dev/null +++ b/src/wp-includes/build/routes/font-list/route.js @@ -0,0 +1,41 @@ +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __commonJS = (cb, mod) => function __require() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); + +// package-external:@wordpress/i18n +var require_i18n = __commonJS({ + "package-external:@wordpress/i18n"(exports, module) { + module.exports = window.wp.i18n; + } +}); + +// routes/font-list/route.ts +var import_i18n = __toESM(require_i18n()); +var route = { + title: () => (0, import_i18n.__)("Fonts") +}; +export { + route +}; diff --git a/src/wp-includes/build/routes/font-list/route.min.asset.php b/src/wp-includes/build/routes/font-list/route.min.asset.php new file mode 100644 index 0000000000000..90737f4676d1b --- /dev/null +++ b/src/wp-includes/build/routes/font-list/route.min.asset.php @@ -0,0 +1 @@ + array('wp-i18n'), 'version' => '5bf837c01b0b1bb1bc6f'); \ No newline at end of file diff --git a/src/wp-includes/build/routes/font-list/route.min.js b/src/wp-includes/build/routes/font-list/route.min.js new file mode 100644 index 0000000000000..c26f5df956ebc --- /dev/null +++ b/src/wp-includes/build/routes/font-list/route.min.js @@ -0,0 +1 @@ +var m=Object.create;var n=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var _=Object.getOwnPropertyNames;var c=Object.getPrototypeOf,d=Object.prototype.hasOwnProperty;var f=(t,o)=>()=>(o||t((o={exports:{}}).exports,o),o.exports);var l=(t,o,r,i)=>{if(o&&typeof o=="object"||typeof o=="function")for(let e of _(o))!d.call(t,e)&&e!==r&&n(t,e,{get:()=>o[e],enumerable:!(i=x(o,e))||i.enumerable});return t};var u=(t,o,r)=>(r=t!=null?m(c(t)):{},l(o||!t||!t.__esModule?n(r,"default",{value:t,enumerable:!0}):r,t));var s=f((a,p)=>{p.exports=window.wp.i18n});var w=u(s()),b={title:()=>(0,w.__)("Fonts")};export{b as route}; diff --git a/src/wp-includes/build/routes/fonts-home/route.js b/src/wp-includes/build/routes/fonts-home/route.js new file mode 100644 index 0000000000000..a696547f4b193 --- /dev/null +++ b/src/wp-includes/build/routes/fonts-home/route.js @@ -0,0 +1,13 @@ +// routes/fonts-home/route.ts +import { redirect } from "@wordpress/route"; +var route = { + beforeLoad: () => { + throw redirect({ + throw: true, + to: "/font-list" + }); + } +}; +export { + route +}; diff --git a/src/wp-includes/build/routes/fonts-home/route.min.asset.php b/src/wp-includes/build/routes/fonts-home/route.min.asset.php new file mode 100644 index 0000000000000..66e99f5b93765 --- /dev/null +++ b/src/wp-includes/build/routes/fonts-home/route.min.asset.php @@ -0,0 +1 @@ + array(), 'module_dependencies' => array(array('id' => '@wordpress/route', 'import' => 'static')), 'version' => '63fba8ad1ac5f2b9aba8'); \ No newline at end of file diff --git a/src/wp-includes/build/routes/fonts-home/route.min.js b/src/wp-includes/build/routes/fonts-home/route.min.js new file mode 100644 index 0000000000000..74b899a2807f6 --- /dev/null +++ b/src/wp-includes/build/routes/fonts-home/route.min.js @@ -0,0 +1 @@ +import{redirect as o}from"@wordpress/route";var r={beforeLoad:()=>{throw o({throw:!0,to:"/font-list"})}};export{r as route}; diff --git a/src/wp-includes/build/routes/registry.php b/src/wp-includes/build/routes/registry.php new file mode 100644 index 0000000000000..e43f726820548 --- /dev/null +++ b/src/wp-includes/build/routes/registry.php @@ -0,0 +1,31 @@ + 'connectors-home', + 'path' => '/', + 'page' => 'options-connectors', + 'has_route' => true, + 'has_content' => true, + ), + array( + 'name' => 'font-list', + 'path' => '/font-list', + 'page' => 'font-library', + 'has_route' => true, + 'has_content' => true, + ), + array( + 'name' => 'fonts-home', + 'path' => '/', + 'page' => 'font-library', + 'has_route' => true, + 'has_content' => false, + ) +); diff --git a/src/wp-includes/images/icon-library/accordion-heading.svg b/src/wp-includes/images/icon-library/accordion-heading.svg new file mode 100644 index 0000000000000..490a55584a8f6 --- /dev/null +++ b/src/wp-includes/images/icon-library/accordion-heading.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/wp-includes/images/icon-library/accordion-item.svg b/src/wp-includes/images/icon-library/accordion-item.svg new file mode 100644 index 0000000000000..7bb8649f9b15b --- /dev/null +++ b/src/wp-includes/images/icon-library/accordion-item.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/wp-includes/images/icon-library/accordion.svg b/src/wp-includes/images/icon-library/accordion.svg new file mode 100644 index 0000000000000..909d9150cfa79 --- /dev/null +++ b/src/wp-includes/images/icon-library/accordion.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/wp-includes/images/icon-library/add-card.svg b/src/wp-includes/images/icon-library/add-card.svg new file mode 100644 index 0000000000000..91a4565df6934 --- /dev/null +++ b/src/wp-includes/images/icon-library/add-card.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/add-submenu.svg b/src/wp-includes/images/icon-library/add-submenu.svg new file mode 100644 index 0000000000000..19f9b28f6366d --- /dev/null +++ b/src/wp-includes/images/icon-library/add-submenu.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/add-template.svg b/src/wp-includes/images/icon-library/add-template.svg new file mode 100644 index 0000000000000..31b6107afcb62 --- /dev/null +++ b/src/wp-includes/images/icon-library/add-template.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/align-center.svg b/src/wp-includes/images/icon-library/align-center.svg new file mode 100644 index 0000000000000..4a859d45cc2a0 --- /dev/null +++ b/src/wp-includes/images/icon-library/align-center.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/align-justify.svg b/src/wp-includes/images/icon-library/align-justify.svg new file mode 100644 index 0000000000000..52c22e430d43a --- /dev/null +++ b/src/wp-includes/images/icon-library/align-justify.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/align-left.svg b/src/wp-includes/images/icon-library/align-left.svg new file mode 100644 index 0000000000000..5b26154484352 --- /dev/null +++ b/src/wp-includes/images/icon-library/align-left.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/align-none.svg b/src/wp-includes/images/icon-library/align-none.svg new file mode 100644 index 0000000000000..30942087145e5 --- /dev/null +++ b/src/wp-includes/images/icon-library/align-none.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/align-right.svg b/src/wp-includes/images/icon-library/align-right.svg new file mode 100644 index 0000000000000..6ad90bdb89678 --- /dev/null +++ b/src/wp-includes/images/icon-library/align-right.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/archive.svg b/src/wp-includes/images/icon-library/archive.svg new file mode 100644 index 0000000000000..661a9782231ef --- /dev/null +++ b/src/wp-includes/images/icon-library/archive.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/arrow-down-left.svg b/src/wp-includes/images/icon-library/arrow-down-left.svg new file mode 100644 index 0000000000000..7ae619122cb18 --- /dev/null +++ b/src/wp-includes/images/icon-library/arrow-down-left.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/arrow-down-right.svg b/src/wp-includes/images/icon-library/arrow-down-right.svg new file mode 100644 index 0000000000000..96f3eaaa341f3 --- /dev/null +++ b/src/wp-includes/images/icon-library/arrow-down-right.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/arrow-down.svg b/src/wp-includes/images/icon-library/arrow-down.svg new file mode 100644 index 0000000000000..eec68fd0379db --- /dev/null +++ b/src/wp-includes/images/icon-library/arrow-down.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/arrow-left.svg b/src/wp-includes/images/icon-library/arrow-left.svg new file mode 100644 index 0000000000000..f0ad62990499b --- /dev/null +++ b/src/wp-includes/images/icon-library/arrow-left.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/arrow-right.svg b/src/wp-includes/images/icon-library/arrow-right.svg new file mode 100644 index 0000000000000..b1d35eb42725a --- /dev/null +++ b/src/wp-includes/images/icon-library/arrow-right.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/arrow-up-left.svg b/src/wp-includes/images/icon-library/arrow-up-left.svg new file mode 100644 index 0000000000000..ace24ff41421c --- /dev/null +++ b/src/wp-includes/images/icon-library/arrow-up-left.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/arrow-up-right.svg b/src/wp-includes/images/icon-library/arrow-up-right.svg new file mode 100644 index 0000000000000..ff9807df94919 --- /dev/null +++ b/src/wp-includes/images/icon-library/arrow-up-right.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/arrow-up.svg b/src/wp-includes/images/icon-library/arrow-up.svg new file mode 100644 index 0000000000000..bc68d5bee25ba --- /dev/null +++ b/src/wp-includes/images/icon-library/arrow-up.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/aspect-ratio.svg b/src/wp-includes/images/icon-library/aspect-ratio.svg new file mode 100644 index 0000000000000..8d83f7635ebd7 --- /dev/null +++ b/src/wp-includes/images/icon-library/aspect-ratio.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/at-symbol.svg b/src/wp-includes/images/icon-library/at-symbol.svg new file mode 100644 index 0000000000000..d7280813c6a9c --- /dev/null +++ b/src/wp-includes/images/icon-library/at-symbol.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/audio.svg b/src/wp-includes/images/icon-library/audio.svg new file mode 100644 index 0000000000000..3cdbe1181dc10 --- /dev/null +++ b/src/wp-includes/images/icon-library/audio.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/background.svg b/src/wp-includes/images/icon-library/background.svg new file mode 100644 index 0000000000000..166c1db70dd50 --- /dev/null +++ b/src/wp-includes/images/icon-library/background.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/backup.svg b/src/wp-includes/images/icon-library/backup.svg new file mode 100644 index 0000000000000..4abf701d41fed --- /dev/null +++ b/src/wp-includes/images/icon-library/backup.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/bell-unread.svg b/src/wp-includes/images/icon-library/bell-unread.svg new file mode 100644 index 0000000000000..efdedbf25d4b3 --- /dev/null +++ b/src/wp-includes/images/icon-library/bell-unread.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/wp-includes/images/icon-library/bell.svg b/src/wp-includes/images/icon-library/bell.svg new file mode 100644 index 0000000000000..c1bccda2275e7 --- /dev/null +++ b/src/wp-includes/images/icon-library/bell.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/block-default.svg b/src/wp-includes/images/icon-library/block-default.svg new file mode 100644 index 0000000000000..5c8e11103d994 --- /dev/null +++ b/src/wp-includes/images/icon-library/block-default.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/block-meta.svg b/src/wp-includes/images/icon-library/block-meta.svg new file mode 100644 index 0000000000000..81dfc1d3684d4 --- /dev/null +++ b/src/wp-includes/images/icon-library/block-meta.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/block-table.svg b/src/wp-includes/images/icon-library/block-table.svg new file mode 100644 index 0000000000000..44d91172e4c10 --- /dev/null +++ b/src/wp-includes/images/icon-library/block-table.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/border.svg b/src/wp-includes/images/icon-library/border.svg new file mode 100644 index 0000000000000..344181dccd79a --- /dev/null +++ b/src/wp-includes/images/icon-library/border.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/box.svg b/src/wp-includes/images/icon-library/box.svg new file mode 100644 index 0000000000000..396c4471cf40b --- /dev/null +++ b/src/wp-includes/images/icon-library/box.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/breadcrumbs.svg b/src/wp-includes/images/icon-library/breadcrumbs.svg new file mode 100644 index 0000000000000..96919bd87fe6c --- /dev/null +++ b/src/wp-includes/images/icon-library/breadcrumbs.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/brush.svg b/src/wp-includes/images/icon-library/brush.svg new file mode 100644 index 0000000000000..18dffa96f6993 --- /dev/null +++ b/src/wp-includes/images/icon-library/brush.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/bug.svg b/src/wp-includes/images/icon-library/bug.svg new file mode 100644 index 0000000000000..92ca3b18be2d8 --- /dev/null +++ b/src/wp-includes/images/icon-library/bug.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/button.svg b/src/wp-includes/images/icon-library/button.svg new file mode 100644 index 0000000000000..cbc2b05e75dcb --- /dev/null +++ b/src/wp-includes/images/icon-library/button.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/buttons.svg b/src/wp-includes/images/icon-library/buttons.svg new file mode 100644 index 0000000000000..fdc79c2b1b71d --- /dev/null +++ b/src/wp-includes/images/icon-library/buttons.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/calendar.svg b/src/wp-includes/images/icon-library/calendar.svg new file mode 100644 index 0000000000000..982890efb37a8 --- /dev/null +++ b/src/wp-includes/images/icon-library/calendar.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/cancel-circle-filled.svg b/src/wp-includes/images/icon-library/cancel-circle-filled.svg new file mode 100644 index 0000000000000..63dce97f38000 --- /dev/null +++ b/src/wp-includes/images/icon-library/cancel-circle-filled.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/caption.svg b/src/wp-includes/images/icon-library/caption.svg new file mode 100644 index 0000000000000..0fff644fb6176 --- /dev/null +++ b/src/wp-includes/images/icon-library/caption.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/capture-photo.svg b/src/wp-includes/images/icon-library/capture-photo.svg new file mode 100644 index 0000000000000..9322db371f060 --- /dev/null +++ b/src/wp-includes/images/icon-library/capture-photo.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/capture-video.svg b/src/wp-includes/images/icon-library/capture-video.svg new file mode 100644 index 0000000000000..5fde23efb3d04 --- /dev/null +++ b/src/wp-includes/images/icon-library/capture-video.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/cart.svg b/src/wp-includes/images/icon-library/cart.svg new file mode 100644 index 0000000000000..5bf6f6d45f559 --- /dev/null +++ b/src/wp-includes/images/icon-library/cart.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/category.svg b/src/wp-includes/images/icon-library/category.svg new file mode 100644 index 0000000000000..3b36e4f2fc00c --- /dev/null +++ b/src/wp-includes/images/icon-library/category.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/caution-filled.svg b/src/wp-includes/images/icon-library/caution-filled.svg new file mode 100644 index 0000000000000..6b35a8ea4d022 --- /dev/null +++ b/src/wp-includes/images/icon-library/caution-filled.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/caution.svg b/src/wp-includes/images/icon-library/caution.svg new file mode 100644 index 0000000000000..3e6c70c263b9a --- /dev/null +++ b/src/wp-includes/images/icon-library/caution.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/chart-bar.svg b/src/wp-includes/images/icon-library/chart-bar.svg new file mode 100644 index 0000000000000..c2bcf26f58a35 --- /dev/null +++ b/src/wp-includes/images/icon-library/chart-bar.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/check.svg b/src/wp-includes/images/icon-library/check.svg new file mode 100644 index 0000000000000..af0a393450169 --- /dev/null +++ b/src/wp-includes/images/icon-library/check.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/chevron-down-small.svg b/src/wp-includes/images/icon-library/chevron-down-small.svg new file mode 100644 index 0000000000000..c8fb1bfffa2f0 --- /dev/null +++ b/src/wp-includes/images/icon-library/chevron-down-small.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/chevron-down.svg b/src/wp-includes/images/icon-library/chevron-down.svg new file mode 100644 index 0000000000000..bd3f8fb059df5 --- /dev/null +++ b/src/wp-includes/images/icon-library/chevron-down.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/chevron-left-small.svg b/src/wp-includes/images/icon-library/chevron-left-small.svg new file mode 100644 index 0000000000000..b2ca179d1a59e --- /dev/null +++ b/src/wp-includes/images/icon-library/chevron-left-small.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/chevron-left.svg b/src/wp-includes/images/icon-library/chevron-left.svg new file mode 100644 index 0000000000000..6276e30f924a8 --- /dev/null +++ b/src/wp-includes/images/icon-library/chevron-left.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/chevron-right-small.svg b/src/wp-includes/images/icon-library/chevron-right-small.svg new file mode 100644 index 0000000000000..956ca53c66147 --- /dev/null +++ b/src/wp-includes/images/icon-library/chevron-right-small.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/chevron-right.svg b/src/wp-includes/images/icon-library/chevron-right.svg new file mode 100644 index 0000000000000..d4b7d6dac2b96 --- /dev/null +++ b/src/wp-includes/images/icon-library/chevron-right.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/chevron-up-down.svg b/src/wp-includes/images/icon-library/chevron-up-down.svg new file mode 100644 index 0000000000000..7cdd5d61d0497 --- /dev/null +++ b/src/wp-includes/images/icon-library/chevron-up-down.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/chevron-up-small.svg b/src/wp-includes/images/icon-library/chevron-up-small.svg new file mode 100644 index 0000000000000..e6be7bd3b841e --- /dev/null +++ b/src/wp-includes/images/icon-library/chevron-up-small.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/chevron-up.svg b/src/wp-includes/images/icon-library/chevron-up.svg new file mode 100644 index 0000000000000..59db09c28b612 --- /dev/null +++ b/src/wp-includes/images/icon-library/chevron-up.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/classic.svg b/src/wp-includes/images/icon-library/classic.svg new file mode 100644 index 0000000000000..d27703521a3cf --- /dev/null +++ b/src/wp-includes/images/icon-library/classic.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/close-small.svg b/src/wp-includes/images/icon-library/close-small.svg new file mode 100644 index 0000000000000..5ba16b5c710f7 --- /dev/null +++ b/src/wp-includes/images/icon-library/close-small.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/close.svg b/src/wp-includes/images/icon-library/close.svg new file mode 100644 index 0000000000000..75be939490410 --- /dev/null +++ b/src/wp-includes/images/icon-library/close.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/cloud-download.svg b/src/wp-includes/images/icon-library/cloud-download.svg new file mode 100644 index 0000000000000..6d2125241572b --- /dev/null +++ b/src/wp-includes/images/icon-library/cloud-download.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/cloud-upload.svg b/src/wp-includes/images/icon-library/cloud-upload.svg new file mode 100644 index 0000000000000..513159068a773 --- /dev/null +++ b/src/wp-includes/images/icon-library/cloud-upload.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/cloud.svg b/src/wp-includes/images/icon-library/cloud.svg new file mode 100644 index 0000000000000..9fb89b1aac649 --- /dev/null +++ b/src/wp-includes/images/icon-library/cloud.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/code.svg b/src/wp-includes/images/icon-library/code.svg new file mode 100644 index 0000000000000..24d4bdccbd5a2 --- /dev/null +++ b/src/wp-includes/images/icon-library/code.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/cog.svg b/src/wp-includes/images/icon-library/cog.svg new file mode 100644 index 0000000000000..d8b4b82c02c2d --- /dev/null +++ b/src/wp-includes/images/icon-library/cog.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/color.svg b/src/wp-includes/images/icon-library/color.svg new file mode 100644 index 0000000000000..07e1a13011a10 --- /dev/null +++ b/src/wp-includes/images/icon-library/color.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/column.svg b/src/wp-includes/images/icon-library/column.svg new file mode 100644 index 0000000000000..bd7e1e71e696a --- /dev/null +++ b/src/wp-includes/images/icon-library/column.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/columns.svg b/src/wp-includes/images/icon-library/columns.svg new file mode 100644 index 0000000000000..dc376abf5013d --- /dev/null +++ b/src/wp-includes/images/icon-library/columns.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/comment-author-avatar.svg b/src/wp-includes/images/icon-library/comment-author-avatar.svg new file mode 100644 index 0000000000000..d26ae18218da4 --- /dev/null +++ b/src/wp-includes/images/icon-library/comment-author-avatar.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/comment-author-name.svg b/src/wp-includes/images/icon-library/comment-author-name.svg new file mode 100644 index 0000000000000..260be0a635ba0 --- /dev/null +++ b/src/wp-includes/images/icon-library/comment-author-name.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/wp-includes/images/icon-library/comment-content.svg b/src/wp-includes/images/icon-library/comment-content.svg new file mode 100644 index 0000000000000..7094932f8e9cb --- /dev/null +++ b/src/wp-includes/images/icon-library/comment-content.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/comment-edit-link.svg b/src/wp-includes/images/icon-library/comment-edit-link.svg new file mode 100644 index 0000000000000..db400e2e871d9 --- /dev/null +++ b/src/wp-includes/images/icon-library/comment-edit-link.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/comment-reply-link.svg b/src/wp-includes/images/icon-library/comment-reply-link.svg new file mode 100644 index 0000000000000..49c79270c08a1 --- /dev/null +++ b/src/wp-includes/images/icon-library/comment-reply-link.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/comment.svg b/src/wp-includes/images/icon-library/comment.svg new file mode 100644 index 0000000000000..c95cfe7421875 --- /dev/null +++ b/src/wp-includes/images/icon-library/comment.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/connection.svg b/src/wp-includes/images/icon-library/connection.svg new file mode 100644 index 0000000000000..2193bd27a5f2c --- /dev/null +++ b/src/wp-includes/images/icon-library/connection.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/contents.svg b/src/wp-includes/images/icon-library/contents.svg new file mode 100644 index 0000000000000..c0e26159bef0f --- /dev/null +++ b/src/wp-includes/images/icon-library/contents.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/copy-small.svg b/src/wp-includes/images/icon-library/copy-small.svg new file mode 100644 index 0000000000000..40439846218e6 --- /dev/null +++ b/src/wp-includes/images/icon-library/copy-small.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/copy.svg b/src/wp-includes/images/icon-library/copy.svg new file mode 100644 index 0000000000000..8acb3bf068658 --- /dev/null +++ b/src/wp-includes/images/icon-library/copy.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/corner-all.svg b/src/wp-includes/images/icon-library/corner-all.svg new file mode 100644 index 0000000000000..455870f0f0127 --- /dev/null +++ b/src/wp-includes/images/icon-library/corner-all.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/corner-bottom-left.svg b/src/wp-includes/images/icon-library/corner-bottom-left.svg new file mode 100644 index 0000000000000..73ae5297c8fca --- /dev/null +++ b/src/wp-includes/images/icon-library/corner-bottom-left.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/wp-includes/images/icon-library/corner-bottom-right.svg b/src/wp-includes/images/icon-library/corner-bottom-right.svg new file mode 100644 index 0000000000000..9d8416abc5c8a --- /dev/null +++ b/src/wp-includes/images/icon-library/corner-bottom-right.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/wp-includes/images/icon-library/corner-top-left.svg b/src/wp-includes/images/icon-library/corner-top-left.svg new file mode 100644 index 0000000000000..d1c72c1b9d6c3 --- /dev/null +++ b/src/wp-includes/images/icon-library/corner-top-left.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/wp-includes/images/icon-library/corner-top-right.svg b/src/wp-includes/images/icon-library/corner-top-right.svg new file mode 100644 index 0000000000000..bf806bb899a3c --- /dev/null +++ b/src/wp-includes/images/icon-library/corner-top-right.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/wp-includes/images/icon-library/cover.svg b/src/wp-includes/images/icon-library/cover.svg new file mode 100644 index 0000000000000..d625a018cda7f --- /dev/null +++ b/src/wp-includes/images/icon-library/cover.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/create.svg b/src/wp-includes/images/icon-library/create.svg new file mode 100644 index 0000000000000..3e96b8596ee47 --- /dev/null +++ b/src/wp-includes/images/icon-library/create.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/crop.svg b/src/wp-includes/images/icon-library/crop.svg new file mode 100644 index 0000000000000..b56abed30292b --- /dev/null +++ b/src/wp-includes/images/icon-library/crop.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/currency-dollar.svg b/src/wp-includes/images/icon-library/currency-dollar.svg new file mode 100644 index 0000000000000..80089d8d68c35 --- /dev/null +++ b/src/wp-includes/images/icon-library/currency-dollar.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/currency-euro.svg b/src/wp-includes/images/icon-library/currency-euro.svg new file mode 100644 index 0000000000000..2e57f3726ec9e --- /dev/null +++ b/src/wp-includes/images/icon-library/currency-euro.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/currency-pound.svg b/src/wp-includes/images/icon-library/currency-pound.svg new file mode 100644 index 0000000000000..5a86fa25075e9 --- /dev/null +++ b/src/wp-includes/images/icon-library/currency-pound.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/custom-link.svg b/src/wp-includes/images/icon-library/custom-link.svg new file mode 100644 index 0000000000000..6294804a2acc9 --- /dev/null +++ b/src/wp-includes/images/icon-library/custom-link.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/custom-post-type.svg b/src/wp-includes/images/icon-library/custom-post-type.svg new file mode 100644 index 0000000000000..7c91be9bf21b2 --- /dev/null +++ b/src/wp-includes/images/icon-library/custom-post-type.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/dashboard.svg b/src/wp-includes/images/icon-library/dashboard.svg new file mode 100644 index 0000000000000..374d5ba916f7b --- /dev/null +++ b/src/wp-includes/images/icon-library/dashboard.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/desktop.svg b/src/wp-includes/images/icon-library/desktop.svg new file mode 100644 index 0000000000000..9d8a699f91834 --- /dev/null +++ b/src/wp-includes/images/icon-library/desktop.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/details.svg b/src/wp-includes/images/icon-library/details.svg new file mode 100644 index 0000000000000..cdc6d8cbdf2b3 --- /dev/null +++ b/src/wp-includes/images/icon-library/details.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/wp-includes/images/icon-library/download.svg b/src/wp-includes/images/icon-library/download.svg new file mode 100644 index 0000000000000..9d3fbe682d25b --- /dev/null +++ b/src/wp-includes/images/icon-library/download.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/drafts.svg b/src/wp-includes/images/icon-library/drafts.svg new file mode 100644 index 0000000000000..4cd55eee757b5 --- /dev/null +++ b/src/wp-includes/images/icon-library/drafts.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/drag-handle.svg b/src/wp-includes/images/icon-library/drag-handle.svg new file mode 100644 index 0000000000000..e8012fd7721f9 --- /dev/null +++ b/src/wp-includes/images/icon-library/drag-handle.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/drawer-left.svg b/src/wp-includes/images/icon-library/drawer-left.svg new file mode 100644 index 0000000000000..c0fd465b61f40 --- /dev/null +++ b/src/wp-includes/images/icon-library/drawer-left.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/drawer-right.svg b/src/wp-includes/images/icon-library/drawer-right.svg new file mode 100644 index 0000000000000..7b22105ae5a5d --- /dev/null +++ b/src/wp-includes/images/icon-library/drawer-right.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/envelope.svg b/src/wp-includes/images/icon-library/envelope.svg new file mode 100644 index 0000000000000..f41c0a915ba60 --- /dev/null +++ b/src/wp-includes/images/icon-library/envelope.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/error.svg b/src/wp-includes/images/icon-library/error.svg new file mode 100644 index 0000000000000..006d6aec28ca2 --- /dev/null +++ b/src/wp-includes/images/icon-library/error.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/external.svg b/src/wp-includes/images/icon-library/external.svg new file mode 100644 index 0000000000000..aa3348828b006 --- /dev/null +++ b/src/wp-includes/images/icon-library/external.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/file.svg b/src/wp-includes/images/icon-library/file.svg new file mode 100644 index 0000000000000..0144266c4425e --- /dev/null +++ b/src/wp-includes/images/icon-library/file.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/filter.svg b/src/wp-includes/images/icon-library/filter.svg new file mode 100644 index 0000000000000..6e83e036d0856 --- /dev/null +++ b/src/wp-includes/images/icon-library/filter.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/flip-horizontal.svg b/src/wp-includes/images/icon-library/flip-horizontal.svg new file mode 100644 index 0000000000000..62464773c0a76 --- /dev/null +++ b/src/wp-includes/images/icon-library/flip-horizontal.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/flip-vertical.svg b/src/wp-includes/images/icon-library/flip-vertical.svg new file mode 100644 index 0000000000000..a9ca7edc29bd7 --- /dev/null +++ b/src/wp-includes/images/icon-library/flip-vertical.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/footer.svg b/src/wp-includes/images/icon-library/footer.svg new file mode 100644 index 0000000000000..e888b893caf61 --- /dev/null +++ b/src/wp-includes/images/icon-library/footer.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/format-bold.svg b/src/wp-includes/images/icon-library/format-bold.svg new file mode 100644 index 0000000000000..89b84e8810fb2 --- /dev/null +++ b/src/wp-includes/images/icon-library/format-bold.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/format-capitalize.svg b/src/wp-includes/images/icon-library/format-capitalize.svg new file mode 100644 index 0000000000000..9dda39c17d68e --- /dev/null +++ b/src/wp-includes/images/icon-library/format-capitalize.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/format-indent-rtl.svg b/src/wp-includes/images/icon-library/format-indent-rtl.svg new file mode 100644 index 0000000000000..c85346d08b5fc --- /dev/null +++ b/src/wp-includes/images/icon-library/format-indent-rtl.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/format-indent.svg b/src/wp-includes/images/icon-library/format-indent.svg new file mode 100644 index 0000000000000..a89e7d313d386 --- /dev/null +++ b/src/wp-includes/images/icon-library/format-indent.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/format-italic.svg b/src/wp-includes/images/icon-library/format-italic.svg new file mode 100644 index 0000000000000..fc2c5380a8d3e --- /dev/null +++ b/src/wp-includes/images/icon-library/format-italic.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/format-list-bullets-rtl.svg b/src/wp-includes/images/icon-library/format-list-bullets-rtl.svg new file mode 100644 index 0000000000000..ecbcd95ee849b --- /dev/null +++ b/src/wp-includes/images/icon-library/format-list-bullets-rtl.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/format-list-bullets.svg b/src/wp-includes/images/icon-library/format-list-bullets.svg new file mode 100644 index 0000000000000..7c855d82938ce --- /dev/null +++ b/src/wp-includes/images/icon-library/format-list-bullets.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/format-list-numbered-rtl.svg b/src/wp-includes/images/icon-library/format-list-numbered-rtl.svg new file mode 100644 index 0000000000000..e976b85248f19 --- /dev/null +++ b/src/wp-includes/images/icon-library/format-list-numbered-rtl.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/format-list-numbered.svg b/src/wp-includes/images/icon-library/format-list-numbered.svg new file mode 100644 index 0000000000000..4febed3ea87a0 --- /dev/null +++ b/src/wp-includes/images/icon-library/format-list-numbered.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/format-lowercase.svg b/src/wp-includes/images/icon-library/format-lowercase.svg new file mode 100644 index 0000000000000..ccb9e2f07a7a4 --- /dev/null +++ b/src/wp-includes/images/icon-library/format-lowercase.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/format-ltr.svg b/src/wp-includes/images/icon-library/format-ltr.svg new file mode 100644 index 0000000000000..efc114919be8d --- /dev/null +++ b/src/wp-includes/images/icon-library/format-ltr.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/format-outdent-rtl.svg b/src/wp-includes/images/icon-library/format-outdent-rtl.svg new file mode 100644 index 0000000000000..c09ce6e45b511 --- /dev/null +++ b/src/wp-includes/images/icon-library/format-outdent-rtl.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/format-outdent.svg b/src/wp-includes/images/icon-library/format-outdent.svg new file mode 100644 index 0000000000000..87a656789531a --- /dev/null +++ b/src/wp-includes/images/icon-library/format-outdent.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/format-rtl.svg b/src/wp-includes/images/icon-library/format-rtl.svg new file mode 100644 index 0000000000000..e2438fb7ca237 --- /dev/null +++ b/src/wp-includes/images/icon-library/format-rtl.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/format-strikethrough.svg b/src/wp-includes/images/icon-library/format-strikethrough.svg new file mode 100644 index 0000000000000..e4b87f5dbe1fe --- /dev/null +++ b/src/wp-includes/images/icon-library/format-strikethrough.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/format-underline.svg b/src/wp-includes/images/icon-library/format-underline.svg new file mode 100644 index 0000000000000..be2f1b5cb4f87 --- /dev/null +++ b/src/wp-includes/images/icon-library/format-underline.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/format-uppercase.svg b/src/wp-includes/images/icon-library/format-uppercase.svg new file mode 100644 index 0000000000000..6521cb22e029a --- /dev/null +++ b/src/wp-includes/images/icon-library/format-uppercase.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/full-height.svg b/src/wp-includes/images/icon-library/full-height.svg new file mode 100644 index 0000000000000..cbe69cfb604a3 --- /dev/null +++ b/src/wp-includes/images/icon-library/full-height.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/fullscreen.svg b/src/wp-includes/images/icon-library/fullscreen.svg new file mode 100644 index 0000000000000..18dde7bea3e75 --- /dev/null +++ b/src/wp-includes/images/icon-library/fullscreen.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/funnel.svg b/src/wp-includes/images/icon-library/funnel.svg new file mode 100644 index 0000000000000..903a7ec4ab215 --- /dev/null +++ b/src/wp-includes/images/icon-library/funnel.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/gallery.svg b/src/wp-includes/images/icon-library/gallery.svg new file mode 100644 index 0000000000000..389a918817fcb --- /dev/null +++ b/src/wp-includes/images/icon-library/gallery.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/gift.svg b/src/wp-includes/images/icon-library/gift.svg new file mode 100644 index 0000000000000..39727cb9fa491 --- /dev/null +++ b/src/wp-includes/images/icon-library/gift.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/globe.svg b/src/wp-includes/images/icon-library/globe.svg new file mode 100644 index 0000000000000..5c1274db85467 --- /dev/null +++ b/src/wp-includes/images/icon-library/globe.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/grid.svg b/src/wp-includes/images/icon-library/grid.svg new file mode 100644 index 0000000000000..62617fcb82680 --- /dev/null +++ b/src/wp-includes/images/icon-library/grid.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/group.svg b/src/wp-includes/images/icon-library/group.svg new file mode 100644 index 0000000000000..8f00bd1d043d2 --- /dev/null +++ b/src/wp-includes/images/icon-library/group.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/handle.svg b/src/wp-includes/images/icon-library/handle.svg new file mode 100644 index 0000000000000..3dd7cb09a490b --- /dev/null +++ b/src/wp-includes/images/icon-library/handle.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/header.svg b/src/wp-includes/images/icon-library/header.svg new file mode 100644 index 0000000000000..5d051294f2802 --- /dev/null +++ b/src/wp-includes/images/icon-library/header.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/heading-level-1.svg b/src/wp-includes/images/icon-library/heading-level-1.svg new file mode 100644 index 0000000000000..8cfb64f53f8f8 --- /dev/null +++ b/src/wp-includes/images/icon-library/heading-level-1.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/heading-level-2.svg b/src/wp-includes/images/icon-library/heading-level-2.svg new file mode 100644 index 0000000000000..cf38f4d17adef --- /dev/null +++ b/src/wp-includes/images/icon-library/heading-level-2.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/heading-level-3.svg b/src/wp-includes/images/icon-library/heading-level-3.svg new file mode 100644 index 0000000000000..03d52fee98d61 --- /dev/null +++ b/src/wp-includes/images/icon-library/heading-level-3.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/heading-level-4.svg b/src/wp-includes/images/icon-library/heading-level-4.svg new file mode 100644 index 0000000000000..556d57faa256c --- /dev/null +++ b/src/wp-includes/images/icon-library/heading-level-4.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/heading-level-5.svg b/src/wp-includes/images/icon-library/heading-level-5.svg new file mode 100644 index 0000000000000..6f4858ef0bc5f --- /dev/null +++ b/src/wp-includes/images/icon-library/heading-level-5.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/heading-level-6.svg b/src/wp-includes/images/icon-library/heading-level-6.svg new file mode 100644 index 0000000000000..511099d84a27a --- /dev/null +++ b/src/wp-includes/images/icon-library/heading-level-6.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/heading.svg b/src/wp-includes/images/icon-library/heading.svg new file mode 100644 index 0000000000000..51f90adaa39c2 --- /dev/null +++ b/src/wp-includes/images/icon-library/heading.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/help-filled.svg b/src/wp-includes/images/icon-library/help-filled.svg new file mode 100644 index 0000000000000..9c8cf7e6b5c07 --- /dev/null +++ b/src/wp-includes/images/icon-library/help-filled.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/help.svg b/src/wp-includes/images/icon-library/help.svg new file mode 100644 index 0000000000000..ae2167edb7ce5 --- /dev/null +++ b/src/wp-includes/images/icon-library/help.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/home-button.svg b/src/wp-includes/images/icon-library/home-button.svg new file mode 100644 index 0000000000000..c9798175aa921 --- /dev/null +++ b/src/wp-includes/images/icon-library/home-button.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/home.svg b/src/wp-includes/images/icon-library/home.svg new file mode 100644 index 0000000000000..bedfb6e00f593 --- /dev/null +++ b/src/wp-includes/images/icon-library/home.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/html.svg b/src/wp-includes/images/icon-library/html.svg new file mode 100644 index 0000000000000..da3eafd242cf3 --- /dev/null +++ b/src/wp-includes/images/icon-library/html.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/image.svg b/src/wp-includes/images/icon-library/image.svg new file mode 100644 index 0000000000000..e14678e2cf4ab --- /dev/null +++ b/src/wp-includes/images/icon-library/image.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/inbox.svg b/src/wp-includes/images/icon-library/inbox.svg new file mode 100644 index 0000000000000..af82f9eb05e2a --- /dev/null +++ b/src/wp-includes/images/icon-library/inbox.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/info.svg b/src/wp-includes/images/icon-library/info.svg new file mode 100644 index 0000000000000..9d7afc85fae83 --- /dev/null +++ b/src/wp-includes/images/icon-library/info.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/insert-after.svg b/src/wp-includes/images/icon-library/insert-after.svg new file mode 100644 index 0000000000000..6743fe8043803 --- /dev/null +++ b/src/wp-includes/images/icon-library/insert-after.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/insert-before.svg b/src/wp-includes/images/icon-library/insert-before.svg new file mode 100644 index 0000000000000..90ceb9c31fb7a --- /dev/null +++ b/src/wp-includes/images/icon-library/insert-before.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/institution.svg b/src/wp-includes/images/icon-library/institution.svg new file mode 100644 index 0000000000000..fa5e94b06cf04 --- /dev/null +++ b/src/wp-includes/images/icon-library/institution.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/justify-bottom.svg b/src/wp-includes/images/icon-library/justify-bottom.svg new file mode 100644 index 0000000000000..983f354b08d9d --- /dev/null +++ b/src/wp-includes/images/icon-library/justify-bottom.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/justify-center-vertical.svg b/src/wp-includes/images/icon-library/justify-center-vertical.svg new file mode 100644 index 0000000000000..09fa620daedc5 --- /dev/null +++ b/src/wp-includes/images/icon-library/justify-center-vertical.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/justify-center.svg b/src/wp-includes/images/icon-library/justify-center.svg new file mode 100644 index 0000000000000..17eb01f512295 --- /dev/null +++ b/src/wp-includes/images/icon-library/justify-center.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/justify-left.svg b/src/wp-includes/images/icon-library/justify-left.svg new file mode 100644 index 0000000000000..f3913733ecf92 --- /dev/null +++ b/src/wp-includes/images/icon-library/justify-left.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/justify-right.svg b/src/wp-includes/images/icon-library/justify-right.svg new file mode 100644 index 0000000000000..6238f51099b5f --- /dev/null +++ b/src/wp-includes/images/icon-library/justify-right.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/justify-space-between-vertical.svg b/src/wp-includes/images/icon-library/justify-space-between-vertical.svg new file mode 100644 index 0000000000000..1fb2a4145c22f --- /dev/null +++ b/src/wp-includes/images/icon-library/justify-space-between-vertical.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/justify-space-between.svg b/src/wp-includes/images/icon-library/justify-space-between.svg new file mode 100644 index 0000000000000..f562659d010a0 --- /dev/null +++ b/src/wp-includes/images/icon-library/justify-space-between.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/justify-stretch-vertical.svg b/src/wp-includes/images/icon-library/justify-stretch-vertical.svg new file mode 100644 index 0000000000000..cff13e239deac --- /dev/null +++ b/src/wp-includes/images/icon-library/justify-stretch-vertical.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/justify-stretch.svg b/src/wp-includes/images/icon-library/justify-stretch.svg new file mode 100644 index 0000000000000..5e7d892b5b717 --- /dev/null +++ b/src/wp-includes/images/icon-library/justify-stretch.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/justify-top.svg b/src/wp-includes/images/icon-library/justify-top.svg new file mode 100644 index 0000000000000..2e0bfacd43dd9 --- /dev/null +++ b/src/wp-includes/images/icon-library/justify-top.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/key.svg b/src/wp-includes/images/icon-library/key.svg new file mode 100644 index 0000000000000..b04dde57aa7fa --- /dev/null +++ b/src/wp-includes/images/icon-library/key.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/keyboard-close.svg b/src/wp-includes/images/icon-library/keyboard-close.svg new file mode 100644 index 0000000000000..db193d038e347 --- /dev/null +++ b/src/wp-includes/images/icon-library/keyboard-close.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/keyboard-return.svg b/src/wp-includes/images/icon-library/keyboard-return.svg new file mode 100644 index 0000000000000..db53403b3db6a --- /dev/null +++ b/src/wp-includes/images/icon-library/keyboard-return.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/keyboard.svg b/src/wp-includes/images/icon-library/keyboard.svg new file mode 100644 index 0000000000000..34fcf1a2e5fa4 --- /dev/null +++ b/src/wp-includes/images/icon-library/keyboard.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/wp-includes/images/icon-library/language.svg b/src/wp-includes/images/icon-library/language.svg new file mode 100644 index 0000000000000..42b3b549824f2 --- /dev/null +++ b/src/wp-includes/images/icon-library/language.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/layout.svg b/src/wp-includes/images/icon-library/layout.svg new file mode 100644 index 0000000000000..9179ce8e9b1db --- /dev/null +++ b/src/wp-includes/images/icon-library/layout.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/level-up.svg b/src/wp-includes/images/icon-library/level-up.svg new file mode 100644 index 0000000000000..fbd9a5d69c483 --- /dev/null +++ b/src/wp-includes/images/icon-library/level-up.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/lifesaver.svg b/src/wp-includes/images/icon-library/lifesaver.svg new file mode 100644 index 0000000000000..766784ed531bd --- /dev/null +++ b/src/wp-includes/images/icon-library/lifesaver.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/line-dashed.svg b/src/wp-includes/images/icon-library/line-dashed.svg new file mode 100644 index 0000000000000..0fff9b3f2bfe5 --- /dev/null +++ b/src/wp-includes/images/icon-library/line-dashed.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/line-dotted.svg b/src/wp-includes/images/icon-library/line-dotted.svg new file mode 100644 index 0000000000000..ba9ff4a2b299e --- /dev/null +++ b/src/wp-includes/images/icon-library/line-dotted.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/line-solid.svg b/src/wp-includes/images/icon-library/line-solid.svg new file mode 100644 index 0000000000000..95aa7137b5bdb --- /dev/null +++ b/src/wp-includes/images/icon-library/line-solid.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/link-off.svg b/src/wp-includes/images/icon-library/link-off.svg new file mode 100644 index 0000000000000..bb22938f6522a --- /dev/null +++ b/src/wp-includes/images/icon-library/link-off.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/link.svg b/src/wp-includes/images/icon-library/link.svg new file mode 100644 index 0000000000000..5be28f494efe5 --- /dev/null +++ b/src/wp-includes/images/icon-library/link.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/list-item.svg b/src/wp-includes/images/icon-library/list-item.svg new file mode 100644 index 0000000000000..96f60ae5cf213 --- /dev/null +++ b/src/wp-includes/images/icon-library/list-item.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/list-view.svg b/src/wp-includes/images/icon-library/list-view.svg new file mode 100644 index 0000000000000..3df1c41cbffeb --- /dev/null +++ b/src/wp-includes/images/icon-library/list-view.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/list.svg b/src/wp-includes/images/icon-library/list.svg new file mode 100644 index 0000000000000..1178564a6b81d --- /dev/null +++ b/src/wp-includes/images/icon-library/list.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/lock-outline.svg b/src/wp-includes/images/icon-library/lock-outline.svg new file mode 100644 index 0000000000000..aae2b8e0d25dd --- /dev/null +++ b/src/wp-includes/images/icon-library/lock-outline.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/lock-small.svg b/src/wp-includes/images/icon-library/lock-small.svg new file mode 100644 index 0000000000000..68c43b0e94e45 --- /dev/null +++ b/src/wp-includes/images/icon-library/lock-small.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/lock.svg b/src/wp-includes/images/icon-library/lock.svg new file mode 100644 index 0000000000000..4c51bf5efc8a4 --- /dev/null +++ b/src/wp-includes/images/icon-library/lock.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/login.svg b/src/wp-includes/images/icon-library/login.svg new file mode 100644 index 0000000000000..220c8635b92cc --- /dev/null +++ b/src/wp-includes/images/icon-library/login.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/loop.svg b/src/wp-includes/images/icon-library/loop.svg new file mode 100644 index 0000000000000..eaf69f00a6d41 --- /dev/null +++ b/src/wp-includes/images/icon-library/loop.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/map-marker.svg b/src/wp-includes/images/icon-library/map-marker.svg new file mode 100644 index 0000000000000..09102ac0ce2bc --- /dev/null +++ b/src/wp-includes/images/icon-library/map-marker.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/math.svg b/src/wp-includes/images/icon-library/math.svg new file mode 100644 index 0000000000000..eeda5f831717e --- /dev/null +++ b/src/wp-includes/images/icon-library/math.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/media-and-text.svg b/src/wp-includes/images/icon-library/media-and-text.svg new file mode 100644 index 0000000000000..d63b328cb4abe --- /dev/null +++ b/src/wp-includes/images/icon-library/media-and-text.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/media.svg b/src/wp-includes/images/icon-library/media.svg new file mode 100644 index 0000000000000..c529ab8413db1 --- /dev/null +++ b/src/wp-includes/images/icon-library/media.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/wp-includes/images/icon-library/megaphone.svg b/src/wp-includes/images/icon-library/megaphone.svg new file mode 100644 index 0000000000000..0a76cbd05a5c7 --- /dev/null +++ b/src/wp-includes/images/icon-library/megaphone.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/menu.svg b/src/wp-includes/images/icon-library/menu.svg new file mode 100644 index 0000000000000..58c9c4d2701c9 --- /dev/null +++ b/src/wp-includes/images/icon-library/menu.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/mobile.svg b/src/wp-includes/images/icon-library/mobile.svg new file mode 100644 index 0000000000000..90410b38463b2 --- /dev/null +++ b/src/wp-includes/images/icon-library/mobile.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/more-horizontal.svg b/src/wp-includes/images/icon-library/more-horizontal.svg new file mode 100644 index 0000000000000..9abb19ec73607 --- /dev/null +++ b/src/wp-includes/images/icon-library/more-horizontal.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/more-vertical.svg b/src/wp-includes/images/icon-library/more-vertical.svg new file mode 100644 index 0000000000000..469a873d1f01f --- /dev/null +++ b/src/wp-includes/images/icon-library/more-vertical.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/more.svg b/src/wp-includes/images/icon-library/more.svg new file mode 100644 index 0000000000000..f1264ebba4fc2 --- /dev/null +++ b/src/wp-includes/images/icon-library/more.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/move-to.svg b/src/wp-includes/images/icon-library/move-to.svg new file mode 100644 index 0000000000000..26cf713a06c36 --- /dev/null +++ b/src/wp-includes/images/icon-library/move-to.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/navigation-overlay.svg b/src/wp-includes/images/icon-library/navigation-overlay.svg new file mode 100644 index 0000000000000..83425951477b7 --- /dev/null +++ b/src/wp-includes/images/icon-library/navigation-overlay.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/navigation.svg b/src/wp-includes/images/icon-library/navigation.svg new file mode 100644 index 0000000000000..9897b55a11927 --- /dev/null +++ b/src/wp-includes/images/icon-library/navigation.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/next.svg b/src/wp-includes/images/icon-library/next.svg new file mode 100644 index 0000000000000..c4a9b1b454b38 --- /dev/null +++ b/src/wp-includes/images/icon-library/next.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/not-allowed.svg b/src/wp-includes/images/icon-library/not-allowed.svg new file mode 100644 index 0000000000000..4550385ac2e3a --- /dev/null +++ b/src/wp-includes/images/icon-library/not-allowed.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/not-found.svg b/src/wp-includes/images/icon-library/not-found.svg new file mode 100644 index 0000000000000..a436d883f5ac7 --- /dev/null +++ b/src/wp-includes/images/icon-library/not-found.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/offline.svg b/src/wp-includes/images/icon-library/offline.svg new file mode 100644 index 0000000000000..ddd432987997f --- /dev/null +++ b/src/wp-includes/images/icon-library/offline.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/overlay-text.svg b/src/wp-includes/images/icon-library/overlay-text.svg new file mode 100644 index 0000000000000..0b15b071b67a6 --- /dev/null +++ b/src/wp-includes/images/icon-library/overlay-text.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/page-break.svg b/src/wp-includes/images/icon-library/page-break.svg new file mode 100644 index 0000000000000..0f9dd1f1b7a2f --- /dev/null +++ b/src/wp-includes/images/icon-library/page-break.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/page.svg b/src/wp-includes/images/icon-library/page.svg new file mode 100644 index 0000000000000..ce1918e963dd6 --- /dev/null +++ b/src/wp-includes/images/icon-library/page.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/wp-includes/images/icon-library/pages.svg b/src/wp-includes/images/icon-library/pages.svg new file mode 100644 index 0000000000000..4cfedd8e91f01 --- /dev/null +++ b/src/wp-includes/images/icon-library/pages.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/wp-includes/images/icon-library/paragraph.svg b/src/wp-includes/images/icon-library/paragraph.svg new file mode 100644 index 0000000000000..a5945a65500e6 --- /dev/null +++ b/src/wp-includes/images/icon-library/paragraph.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/payment.svg b/src/wp-includes/images/icon-library/payment.svg new file mode 100644 index 0000000000000..305e1e2495e9c --- /dev/null +++ b/src/wp-includes/images/icon-library/payment.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/pencil.svg b/src/wp-includes/images/icon-library/pencil.svg new file mode 100644 index 0000000000000..6a6fccc85deed --- /dev/null +++ b/src/wp-includes/images/icon-library/pencil.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/pending.svg b/src/wp-includes/images/icon-library/pending.svg new file mode 100644 index 0000000000000..ef3b154b2240f --- /dev/null +++ b/src/wp-includes/images/icon-library/pending.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/people.svg b/src/wp-includes/images/icon-library/people.svg new file mode 100644 index 0000000000000..352a6410e30bc --- /dev/null +++ b/src/wp-includes/images/icon-library/people.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/percent.svg b/src/wp-includes/images/icon-library/percent.svg new file mode 100644 index 0000000000000..bb1bf2a134d49 --- /dev/null +++ b/src/wp-includes/images/icon-library/percent.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/pin-small.svg b/src/wp-includes/images/icon-library/pin-small.svg new file mode 100644 index 0000000000000..25a36f5e6a801 --- /dev/null +++ b/src/wp-includes/images/icon-library/pin-small.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/pin.svg b/src/wp-includes/images/icon-library/pin.svg new file mode 100644 index 0000000000000..a61c2cafad05e --- /dev/null +++ b/src/wp-includes/images/icon-library/pin.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/plugins.svg b/src/wp-includes/images/icon-library/plugins.svg new file mode 100644 index 0000000000000..a74ce8910aac1 --- /dev/null +++ b/src/wp-includes/images/icon-library/plugins.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/plus-circle-filled.svg b/src/wp-includes/images/icon-library/plus-circle-filled.svg new file mode 100644 index 0000000000000..e46a7e178e589 --- /dev/null +++ b/src/wp-includes/images/icon-library/plus-circle-filled.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/plus-circle.svg b/src/wp-includes/images/icon-library/plus-circle.svg new file mode 100644 index 0000000000000..9ab6d1bbd7fee --- /dev/null +++ b/src/wp-includes/images/icon-library/plus-circle.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/plus.svg b/src/wp-includes/images/icon-library/plus.svg new file mode 100644 index 0000000000000..09776c79ee92a --- /dev/null +++ b/src/wp-includes/images/icon-library/plus.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/position-center.svg b/src/wp-includes/images/icon-library/position-center.svg new file mode 100644 index 0000000000000..ab9a1990373c3 --- /dev/null +++ b/src/wp-includes/images/icon-library/position-center.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/position-left.svg b/src/wp-includes/images/icon-library/position-left.svg new file mode 100644 index 0000000000000..a1b96ae2f92f3 --- /dev/null +++ b/src/wp-includes/images/icon-library/position-left.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/position-right.svg b/src/wp-includes/images/icon-library/position-right.svg new file mode 100644 index 0000000000000..1abb237622be8 --- /dev/null +++ b/src/wp-includes/images/icon-library/position-right.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/post-author.svg b/src/wp-includes/images/icon-library/post-author.svg new file mode 100644 index 0000000000000..acbf5f1383c1c --- /dev/null +++ b/src/wp-includes/images/icon-library/post-author.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/post-categories.svg b/src/wp-includes/images/icon-library/post-categories.svg new file mode 100644 index 0000000000000..22471982de366 --- /dev/null +++ b/src/wp-includes/images/icon-library/post-categories.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/post-comments-count.svg b/src/wp-includes/images/icon-library/post-comments-count.svg new file mode 100644 index 0000000000000..55caa3b60a080 --- /dev/null +++ b/src/wp-includes/images/icon-library/post-comments-count.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/post-comments-form.svg b/src/wp-includes/images/icon-library/post-comments-form.svg new file mode 100644 index 0000000000000..ecbdd4766e127 --- /dev/null +++ b/src/wp-includes/images/icon-library/post-comments-form.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/post-comments.svg b/src/wp-includes/images/icon-library/post-comments.svg new file mode 100644 index 0000000000000..b05d4bf1a167a --- /dev/null +++ b/src/wp-includes/images/icon-library/post-comments.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/post-content.svg b/src/wp-includes/images/icon-library/post-content.svg new file mode 100644 index 0000000000000..82a7c427a11a9 --- /dev/null +++ b/src/wp-includes/images/icon-library/post-content.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/post-date.svg b/src/wp-includes/images/icon-library/post-date.svg new file mode 100644 index 0000000000000..84bc05d2549fa --- /dev/null +++ b/src/wp-includes/images/icon-library/post-date.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/wp-includes/images/icon-library/post-excerpt.svg b/src/wp-includes/images/icon-library/post-excerpt.svg new file mode 100644 index 0000000000000..8dca8a3ab16f7 --- /dev/null +++ b/src/wp-includes/images/icon-library/post-excerpt.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/post-featured-image.svg b/src/wp-includes/images/icon-library/post-featured-image.svg new file mode 100644 index 0000000000000..d5c88159e5843 --- /dev/null +++ b/src/wp-includes/images/icon-library/post-featured-image.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/post-list.svg b/src/wp-includes/images/icon-library/post-list.svg new file mode 100644 index 0000000000000..008b1dc86a66e --- /dev/null +++ b/src/wp-includes/images/icon-library/post-list.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/post-terms.svg b/src/wp-includes/images/icon-library/post-terms.svg new file mode 100644 index 0000000000000..1df12e6e31d53 --- /dev/null +++ b/src/wp-includes/images/icon-library/post-terms.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/post.svg b/src/wp-includes/images/icon-library/post.svg new file mode 100644 index 0000000000000..be934e242a1cd --- /dev/null +++ b/src/wp-includes/images/icon-library/post.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/preformatted.svg b/src/wp-includes/images/icon-library/preformatted.svg new file mode 100644 index 0000000000000..231d6e77a5fcd --- /dev/null +++ b/src/wp-includes/images/icon-library/preformatted.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/previous.svg b/src/wp-includes/images/icon-library/previous.svg new file mode 100644 index 0000000000000..ea03926c3aa11 --- /dev/null +++ b/src/wp-includes/images/icon-library/previous.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/published.svg b/src/wp-includes/images/icon-library/published.svg new file mode 100644 index 0000000000000..13dfc4bb18164 --- /dev/null +++ b/src/wp-includes/images/icon-library/published.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/pull-left.svg b/src/wp-includes/images/icon-library/pull-left.svg new file mode 100644 index 0000000000000..016da89b0afc1 --- /dev/null +++ b/src/wp-includes/images/icon-library/pull-left.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/pull-right.svg b/src/wp-includes/images/icon-library/pull-right.svg new file mode 100644 index 0000000000000..688280c37fbc7 --- /dev/null +++ b/src/wp-includes/images/icon-library/pull-right.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/pullquote.svg b/src/wp-includes/images/icon-library/pullquote.svg new file mode 100644 index 0000000000000..6fe0e1447936b --- /dev/null +++ b/src/wp-includes/images/icon-library/pullquote.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/query-pagination-next.svg b/src/wp-includes/images/icon-library/query-pagination-next.svg new file mode 100644 index 0000000000000..8925c33bfd4fb --- /dev/null +++ b/src/wp-includes/images/icon-library/query-pagination-next.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/query-pagination-numbers.svg b/src/wp-includes/images/icon-library/query-pagination-numbers.svg new file mode 100644 index 0000000000000..7fdff964d8a86 --- /dev/null +++ b/src/wp-includes/images/icon-library/query-pagination-numbers.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/query-pagination-previous.svg b/src/wp-includes/images/icon-library/query-pagination-previous.svg new file mode 100644 index 0000000000000..c8bc7eb8e032d --- /dev/null +++ b/src/wp-includes/images/icon-library/query-pagination-previous.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/query-pagination.svg b/src/wp-includes/images/icon-library/query-pagination.svg new file mode 100644 index 0000000000000..6c6cb0cfed672 --- /dev/null +++ b/src/wp-includes/images/icon-library/query-pagination.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/quote.svg b/src/wp-includes/images/icon-library/quote.svg new file mode 100644 index 0000000000000..655bd131dfe3f --- /dev/null +++ b/src/wp-includes/images/icon-library/quote.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/receipt.svg b/src/wp-includes/images/icon-library/receipt.svg new file mode 100644 index 0000000000000..def9c8118f0fc --- /dev/null +++ b/src/wp-includes/images/icon-library/receipt.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/redo.svg b/src/wp-includes/images/icon-library/redo.svg new file mode 100644 index 0000000000000..8adb40ee5d946 --- /dev/null +++ b/src/wp-includes/images/icon-library/redo.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/remove-bug.svg b/src/wp-includes/images/icon-library/remove-bug.svg new file mode 100644 index 0000000000000..07fc6c0b05a76 --- /dev/null +++ b/src/wp-includes/images/icon-library/remove-bug.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/remove-submenu.svg b/src/wp-includes/images/icon-library/remove-submenu.svg new file mode 100644 index 0000000000000..e57bd6f94bed2 --- /dev/null +++ b/src/wp-includes/images/icon-library/remove-submenu.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/replace.svg b/src/wp-includes/images/icon-library/replace.svg new file mode 100644 index 0000000000000..c4629ecaf869d --- /dev/null +++ b/src/wp-includes/images/icon-library/replace.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/reset.svg b/src/wp-includes/images/icon-library/reset.svg new file mode 100644 index 0000000000000..660c39b49123c --- /dev/null +++ b/src/wp-includes/images/icon-library/reset.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/resize-corner-ne.svg b/src/wp-includes/images/icon-library/resize-corner-ne.svg new file mode 100644 index 0000000000000..764fec3b29bde --- /dev/null +++ b/src/wp-includes/images/icon-library/resize-corner-ne.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/reusable-block.svg b/src/wp-includes/images/icon-library/reusable-block.svg new file mode 100644 index 0000000000000..e6879cc660bc4 --- /dev/null +++ b/src/wp-includes/images/icon-library/reusable-block.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/rotate-left.svg b/src/wp-includes/images/icon-library/rotate-left.svg new file mode 100644 index 0000000000000..262ab29a96648 --- /dev/null +++ b/src/wp-includes/images/icon-library/rotate-left.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/rotate-right.svg b/src/wp-includes/images/icon-library/rotate-right.svg new file mode 100644 index 0000000000000..deb8cc272a1b3 --- /dev/null +++ b/src/wp-includes/images/icon-library/rotate-right.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/row.svg b/src/wp-includes/images/icon-library/row.svg new file mode 100644 index 0000000000000..1ce7a6a417ac7 --- /dev/null +++ b/src/wp-includes/images/icon-library/row.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/rss.svg b/src/wp-includes/images/icon-library/rss.svg new file mode 100644 index 0000000000000..47af92eca26a6 --- /dev/null +++ b/src/wp-includes/images/icon-library/rss.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/scheduled.svg b/src/wp-includes/images/icon-library/scheduled.svg new file mode 100644 index 0000000000000..1a1e769092211 --- /dev/null +++ b/src/wp-includes/images/icon-library/scheduled.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/search.svg b/src/wp-includes/images/icon-library/search.svg new file mode 100644 index 0000000000000..fe24af8e80dec --- /dev/null +++ b/src/wp-includes/images/icon-library/search.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/seen.svg b/src/wp-includes/images/icon-library/seen.svg new file mode 100644 index 0000000000000..b8bf2575dc8a4 --- /dev/null +++ b/src/wp-includes/images/icon-library/seen.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/send.svg b/src/wp-includes/images/icon-library/send.svg new file mode 100644 index 0000000000000..31444a297e420 --- /dev/null +++ b/src/wp-includes/images/icon-library/send.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/separator.svg b/src/wp-includes/images/icon-library/separator.svg new file mode 100644 index 0000000000000..f2ec17aea2a29 --- /dev/null +++ b/src/wp-includes/images/icon-library/separator.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/settings.svg b/src/wp-includes/images/icon-library/settings.svg new file mode 100644 index 0000000000000..a6b1d86540ad9 --- /dev/null +++ b/src/wp-includes/images/icon-library/settings.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/wp-includes/images/icon-library/shadow.svg b/src/wp-includes/images/icon-library/shadow.svg new file mode 100644 index 0000000000000..41a5c2cac7f09 --- /dev/null +++ b/src/wp-includes/images/icon-library/shadow.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/share.svg b/src/wp-includes/images/icon-library/share.svg new file mode 100644 index 0000000000000..2ed89feccf56b --- /dev/null +++ b/src/wp-includes/images/icon-library/share.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/shield.svg b/src/wp-includes/images/icon-library/shield.svg new file mode 100644 index 0000000000000..33e45e6228de5 --- /dev/null +++ b/src/wp-includes/images/icon-library/shield.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/shipping.svg b/src/wp-includes/images/icon-library/shipping.svg new file mode 100644 index 0000000000000..f987d40c9725f --- /dev/null +++ b/src/wp-includes/images/icon-library/shipping.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/shortcode.svg b/src/wp-includes/images/icon-library/shortcode.svg new file mode 100644 index 0000000000000..f0e3b412d73f8 --- /dev/null +++ b/src/wp-includes/images/icon-library/shortcode.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/shuffle.svg b/src/wp-includes/images/icon-library/shuffle.svg new file mode 100644 index 0000000000000..2683ef13fb50a --- /dev/null +++ b/src/wp-includes/images/icon-library/shuffle.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/sidebar.svg b/src/wp-includes/images/icon-library/sidebar.svg new file mode 100644 index 0000000000000..15d5880d3fe93 --- /dev/null +++ b/src/wp-includes/images/icon-library/sidebar.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/sides-all.svg b/src/wp-includes/images/icon-library/sides-all.svg new file mode 100644 index 0000000000000..afbf1775bb9b8 --- /dev/null +++ b/src/wp-includes/images/icon-library/sides-all.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/sides-axial.svg b/src/wp-includes/images/icon-library/sides-axial.svg new file mode 100644 index 0000000000000..08f202cfa6d16 --- /dev/null +++ b/src/wp-includes/images/icon-library/sides-axial.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/sides-bottom.svg b/src/wp-includes/images/icon-library/sides-bottom.svg new file mode 100644 index 0000000000000..7e477e5d6d7af --- /dev/null +++ b/src/wp-includes/images/icon-library/sides-bottom.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/wp-includes/images/icon-library/sides-horizontal.svg b/src/wp-includes/images/icon-library/sides-horizontal.svg new file mode 100644 index 0000000000000..df651421e339e --- /dev/null +++ b/src/wp-includes/images/icon-library/sides-horizontal.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/wp-includes/images/icon-library/sides-left.svg b/src/wp-includes/images/icon-library/sides-left.svg new file mode 100644 index 0000000000000..c546c042fba39 --- /dev/null +++ b/src/wp-includes/images/icon-library/sides-left.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/wp-includes/images/icon-library/sides-right.svg b/src/wp-includes/images/icon-library/sides-right.svg new file mode 100644 index 0000000000000..689698d85d0dc --- /dev/null +++ b/src/wp-includes/images/icon-library/sides-right.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/wp-includes/images/icon-library/sides-top.svg b/src/wp-includes/images/icon-library/sides-top.svg new file mode 100644 index 0000000000000..a413488ac3fca --- /dev/null +++ b/src/wp-includes/images/icon-library/sides-top.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/wp-includes/images/icon-library/sides-vertical.svg b/src/wp-includes/images/icon-library/sides-vertical.svg new file mode 100644 index 0000000000000..1e64f408855fb --- /dev/null +++ b/src/wp-includes/images/icon-library/sides-vertical.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/wp-includes/images/icon-library/site-logo.svg b/src/wp-includes/images/icon-library/site-logo.svg new file mode 100644 index 0000000000000..26b6cfb4ce689 --- /dev/null +++ b/src/wp-includes/images/icon-library/site-logo.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/square.svg b/src/wp-includes/images/icon-library/square.svg new file mode 100644 index 0000000000000..3b66d51854cb1 --- /dev/null +++ b/src/wp-includes/images/icon-library/square.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/stack.svg b/src/wp-includes/images/icon-library/stack.svg new file mode 100644 index 0000000000000..c4d9aef31e5c0 --- /dev/null +++ b/src/wp-includes/images/icon-library/stack.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/star-empty.svg b/src/wp-includes/images/icon-library/star-empty.svg new file mode 100644 index 0000000000000..75cd0e122d458 --- /dev/null +++ b/src/wp-includes/images/icon-library/star-empty.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/star-filled.svg b/src/wp-includes/images/icon-library/star-filled.svg new file mode 100644 index 0000000000000..2b32a6424776a --- /dev/null +++ b/src/wp-includes/images/icon-library/star-filled.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/star-half.svg b/src/wp-includes/images/icon-library/star-half.svg new file mode 100644 index 0000000000000..fe0f1b5ca0b16 --- /dev/null +++ b/src/wp-includes/images/icon-library/star-half.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/store.svg b/src/wp-includes/images/icon-library/store.svg new file mode 100644 index 0000000000000..af15718d7f908 --- /dev/null +++ b/src/wp-includes/images/icon-library/store.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/stretch-full-width.svg b/src/wp-includes/images/icon-library/stretch-full-width.svg new file mode 100644 index 0000000000000..02a5f5c0cb644 --- /dev/null +++ b/src/wp-includes/images/icon-library/stretch-full-width.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/stretch-wide.svg b/src/wp-includes/images/icon-library/stretch-wide.svg new file mode 100644 index 0000000000000..ff3031ef9bd74 --- /dev/null +++ b/src/wp-includes/images/icon-library/stretch-wide.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/styles.svg b/src/wp-includes/images/icon-library/styles.svg new file mode 100644 index 0000000000000..377fa2e6bb458 --- /dev/null +++ b/src/wp-includes/images/icon-library/styles.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/subscript.svg b/src/wp-includes/images/icon-library/subscript.svg new file mode 100644 index 0000000000000..632317fe7536c --- /dev/null +++ b/src/wp-includes/images/icon-library/subscript.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/superscript.svg b/src/wp-includes/images/icon-library/superscript.svg new file mode 100644 index 0000000000000..ca60e0e1133f2 --- /dev/null +++ b/src/wp-includes/images/icon-library/superscript.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/swatch.svg b/src/wp-includes/images/icon-library/swatch.svg new file mode 100644 index 0000000000000..af21de80a183b --- /dev/null +++ b/src/wp-includes/images/icon-library/swatch.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/symbol-filled.svg b/src/wp-includes/images/icon-library/symbol-filled.svg new file mode 100644 index 0000000000000..608a9e8ee96b2 --- /dev/null +++ b/src/wp-includes/images/icon-library/symbol-filled.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/symbol.svg b/src/wp-includes/images/icon-library/symbol.svg new file mode 100644 index 0000000000000..58f92a5cc93c6 --- /dev/null +++ b/src/wp-includes/images/icon-library/symbol.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/tab.svg b/src/wp-includes/images/icon-library/tab.svg new file mode 100644 index 0000000000000..a6444a9739efd --- /dev/null +++ b/src/wp-includes/images/icon-library/tab.svg @@ -0,0 +1 @@ + diff --git a/src/wp-includes/images/icon-library/table-column-after.svg b/src/wp-includes/images/icon-library/table-column-after.svg new file mode 100644 index 0000000000000..bfbf79eefb306 --- /dev/null +++ b/src/wp-includes/images/icon-library/table-column-after.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/table-column-before.svg b/src/wp-includes/images/icon-library/table-column-before.svg new file mode 100644 index 0000000000000..6966550159ef2 --- /dev/null +++ b/src/wp-includes/images/icon-library/table-column-before.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/table-column-delete.svg b/src/wp-includes/images/icon-library/table-column-delete.svg new file mode 100644 index 0000000000000..a23314d76e897 --- /dev/null +++ b/src/wp-includes/images/icon-library/table-column-delete.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/table-of-contents.svg b/src/wp-includes/images/icon-library/table-of-contents.svg new file mode 100644 index 0000000000000..09a6e26ec72b1 --- /dev/null +++ b/src/wp-includes/images/icon-library/table-of-contents.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/wp-includes/images/icon-library/table-row-after.svg b/src/wp-includes/images/icon-library/table-row-after.svg new file mode 100644 index 0000000000000..f20db5ac4c884 --- /dev/null +++ b/src/wp-includes/images/icon-library/table-row-after.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/table-row-before.svg b/src/wp-includes/images/icon-library/table-row-before.svg new file mode 100644 index 0000000000000..ab0c02e9dce58 --- /dev/null +++ b/src/wp-includes/images/icon-library/table-row-before.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/table-row-delete.svg b/src/wp-includes/images/icon-library/table-row-delete.svg new file mode 100644 index 0000000000000..110a6a9fb80e8 --- /dev/null +++ b/src/wp-includes/images/icon-library/table-row-delete.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/table.svg b/src/wp-includes/images/icon-library/table.svg new file mode 100644 index 0000000000000..64e387e683d62 --- /dev/null +++ b/src/wp-includes/images/icon-library/table.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/tablet.svg b/src/wp-includes/images/icon-library/tablet.svg new file mode 100644 index 0000000000000..fa36e90de69cd --- /dev/null +++ b/src/wp-includes/images/icon-library/tablet.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/tabs-menu-item.svg b/src/wp-includes/images/icon-library/tabs-menu-item.svg new file mode 100644 index 0000000000000..2e8102d5d7f9b --- /dev/null +++ b/src/wp-includes/images/icon-library/tabs-menu-item.svg @@ -0,0 +1 @@ + diff --git a/src/wp-includes/images/icon-library/tabs-menu.svg b/src/wp-includes/images/icon-library/tabs-menu.svg new file mode 100644 index 0000000000000..d42453416b532 --- /dev/null +++ b/src/wp-includes/images/icon-library/tabs-menu.svg @@ -0,0 +1 @@ + diff --git a/src/wp-includes/images/icon-library/tabs.svg b/src/wp-includes/images/icon-library/tabs.svg new file mode 100644 index 0000000000000..9740dca50ff48 --- /dev/null +++ b/src/wp-includes/images/icon-library/tabs.svg @@ -0,0 +1 @@ + diff --git a/src/wp-includes/images/icon-library/tag.svg b/src/wp-includes/images/icon-library/tag.svg new file mode 100644 index 0000000000000..a2a52b7541ed8 --- /dev/null +++ b/src/wp-includes/images/icon-library/tag.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/term-count.svg b/src/wp-includes/images/icon-library/term-count.svg new file mode 100644 index 0000000000000..8b333407a02ef --- /dev/null +++ b/src/wp-includes/images/icon-library/term-count.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/wp-includes/images/icon-library/term-description.svg b/src/wp-includes/images/icon-library/term-description.svg new file mode 100644 index 0000000000000..5a00b07073134 --- /dev/null +++ b/src/wp-includes/images/icon-library/term-description.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/term-name.svg b/src/wp-includes/images/icon-library/term-name.svg new file mode 100644 index 0000000000000..c4135c2511de2 --- /dev/null +++ b/src/wp-includes/images/icon-library/term-name.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/wp-includes/images/icon-library/text-color.svg b/src/wp-includes/images/icon-library/text-color.svg new file mode 100644 index 0000000000000..a6096517801ad --- /dev/null +++ b/src/wp-includes/images/icon-library/text-color.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/text-horizontal.svg b/src/wp-includes/images/icon-library/text-horizontal.svg new file mode 100644 index 0000000000000..faf6150751bba --- /dev/null +++ b/src/wp-includes/images/icon-library/text-horizontal.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/text-vertical.svg b/src/wp-includes/images/icon-library/text-vertical.svg new file mode 100644 index 0000000000000..64ec893f7f0f2 --- /dev/null +++ b/src/wp-includes/images/icon-library/text-vertical.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/thumbs-down.svg b/src/wp-includes/images/icon-library/thumbs-down.svg new file mode 100644 index 0000000000000..72c96f5b5693e --- /dev/null +++ b/src/wp-includes/images/icon-library/thumbs-down.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/thumbs-up.svg b/src/wp-includes/images/icon-library/thumbs-up.svg new file mode 100644 index 0000000000000..79fb58752a32a --- /dev/null +++ b/src/wp-includes/images/icon-library/thumbs-up.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/time-to-read.svg b/src/wp-includes/images/icon-library/time-to-read.svg new file mode 100644 index 0000000000000..fd368c5e4fc80 --- /dev/null +++ b/src/wp-includes/images/icon-library/time-to-read.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/tip.svg b/src/wp-includes/images/icon-library/tip.svg new file mode 100644 index 0000000000000..212885ca47e50 --- /dev/null +++ b/src/wp-includes/images/icon-library/tip.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/title.svg b/src/wp-includes/images/icon-library/title.svg new file mode 100644 index 0000000000000..28e8fa6921378 --- /dev/null +++ b/src/wp-includes/images/icon-library/title.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/tool.svg b/src/wp-includes/images/icon-library/tool.svg new file mode 100644 index 0000000000000..1c9cc50018fcf --- /dev/null +++ b/src/wp-includes/images/icon-library/tool.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/trash.svg b/src/wp-includes/images/icon-library/trash.svg new file mode 100644 index 0000000000000..fddfcfeb44883 --- /dev/null +++ b/src/wp-includes/images/icon-library/trash.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/trending-down.svg b/src/wp-includes/images/icon-library/trending-down.svg new file mode 100644 index 0000000000000..66f297ade96fc --- /dev/null +++ b/src/wp-includes/images/icon-library/trending-down.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/trending-up.svg b/src/wp-includes/images/icon-library/trending-up.svg new file mode 100644 index 0000000000000..b7644d8f2b52f --- /dev/null +++ b/src/wp-includes/images/icon-library/trending-up.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/typography.svg b/src/wp-includes/images/icon-library/typography.svg new file mode 100644 index 0000000000000..c81ee1fad6551 --- /dev/null +++ b/src/wp-includes/images/icon-library/typography.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/undo.svg b/src/wp-includes/images/icon-library/undo.svg new file mode 100644 index 0000000000000..2a66cab0267f1 --- /dev/null +++ b/src/wp-includes/images/icon-library/undo.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/ungroup.svg b/src/wp-includes/images/icon-library/ungroup.svg new file mode 100644 index 0000000000000..9e8339598f228 --- /dev/null +++ b/src/wp-includes/images/icon-library/ungroup.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/unlock.svg b/src/wp-includes/images/icon-library/unlock.svg new file mode 100644 index 0000000000000..59785ed29f86d --- /dev/null +++ b/src/wp-includes/images/icon-library/unlock.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/unseen.svg b/src/wp-includes/images/icon-library/unseen.svg new file mode 100644 index 0000000000000..661725a3048de --- /dev/null +++ b/src/wp-includes/images/icon-library/unseen.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/update.svg b/src/wp-includes/images/icon-library/update.svg new file mode 100644 index 0000000000000..e69e11c4e2a1f --- /dev/null +++ b/src/wp-includes/images/icon-library/update.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/upload.svg b/src/wp-includes/images/icon-library/upload.svg new file mode 100644 index 0000000000000..27578edddddc3 --- /dev/null +++ b/src/wp-includes/images/icon-library/upload.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/verse.svg b/src/wp-includes/images/icon-library/verse.svg new file mode 100644 index 0000000000000..3ad231a950a52 --- /dev/null +++ b/src/wp-includes/images/icon-library/verse.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/video.svg b/src/wp-includes/images/icon-library/video.svg new file mode 100644 index 0000000000000..4b80f689b0efb --- /dev/null +++ b/src/wp-includes/images/icon-library/video.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/widget.svg b/src/wp-includes/images/icon-library/widget.svg new file mode 100644 index 0000000000000..987e201641fef --- /dev/null +++ b/src/wp-includes/images/icon-library/widget.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/word-count.svg b/src/wp-includes/images/icon-library/word-count.svg new file mode 100644 index 0000000000000..0d1dfd33f82c8 --- /dev/null +++ b/src/wp-includes/images/icon-library/word-count.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/images/icon-library/wordpress.svg b/src/wp-includes/images/icon-library/wordpress.svg new file mode 100644 index 0000000000000..56be7255c7482 --- /dev/null +++ b/src/wp-includes/images/icon-library/wordpress.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/wp-includes/theme.json b/src/wp-includes/theme.json new file mode 100644 index 0000000000000..fb26d36518841 --- /dev/null +++ b/src/wp-includes/theme.json @@ -0,0 +1,420 @@ +{ + "$schema": "https://schemas.wp.org/trunk/theme.json", + "version": 3, + "settings": { + "appearanceTools": false, + "useRootPaddingAwareAlignments": false, + "border": { + "color": false, + "radius": false, + "style": false, + "width": false + }, + "color": { + "background": true, + "button": true, + "caption": true, + "custom": true, + "customDuotone": true, + "customGradient": true, + "defaultDuotone": true, + "defaultGradients": true, + "defaultPalette": true, + "duotone": [ + { + "name": "Dark grayscale", + "colors": [ "#000000", "#7f7f7f" ], + "slug": "dark-grayscale" + }, + { + "name": "Grayscale", + "colors": [ "#000000", "#ffffff" ], + "slug": "grayscale" + }, + { + "name": "Purple and yellow", + "colors": [ "#8c00b7", "#fcff41" ], + "slug": "purple-yellow" + }, + { + "name": "Blue and red", + "colors": [ "#000097", "#ff4747" ], + "slug": "blue-red" + }, + { + "name": "Midnight", + "colors": [ "#000000", "#00a5ff" ], + "slug": "midnight" + }, + { + "name": "Magenta and yellow", + "colors": [ "#c7005a", "#fff278" ], + "slug": "magenta-yellow" + }, + { + "name": "Purple and green", + "colors": [ "#a60072", "#67ff66" ], + "slug": "purple-green" + }, + { + "name": "Blue and orange", + "colors": [ "#1900d8", "#ffa96b" ], + "slug": "blue-orange" + } + ], + "gradients": [ + { + "name": "Vivid cyan blue to vivid purple", + "gradient": "linear-gradient(135deg,rgb(6,147,227) 0%,rgb(155,81,224) 100%)", + "slug": "vivid-cyan-blue-to-vivid-purple" + }, + { + "name": "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": "Luminous vivid amber to luminous vivid orange", + "gradient": "linear-gradient(135deg,rgb(252,185,0) 0%,rgb(255,105,0) 100%)", + "slug": "luminous-vivid-amber-to-luminous-vivid-orange" + }, + { + "name": "Luminous vivid orange to vivid red", + "gradient": "linear-gradient(135deg,rgb(255,105,0) 0%,rgb(207,46,46) 100%)", + "slug": "luminous-vivid-orange-to-vivid-red" + }, + { + "name": "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": "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": "Blush light purple", + "gradient": "linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)", + "slug": "blush-light-purple" + }, + { + "name": "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": "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": "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": "Electric grass", + "gradient": "linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)", + "slug": "electric-grass" + }, + { + "name": "Midnight", + "gradient": "linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)", + "slug": "midnight" + } + ], + "heading": true, + "link": false, + "palette": [ + { + "name": "Black", + "slug": "black", + "color": "#000000" + }, + { + "name": "Cyan bluish gray", + "slug": "cyan-bluish-gray", + "color": "#abb8c3" + }, + { + "name": "White", + "slug": "white", + "color": "#ffffff" + }, + { + "name": "Pale pink", + "slug": "pale-pink", + "color": "#f78da7" + }, + { + "name": "Vivid red", + "slug": "vivid-red", + "color": "#cf2e2e" + }, + { + "name": "Luminous vivid orange", + "slug": "luminous-vivid-orange", + "color": "#ff6900" + }, + { + "name": "Luminous vivid amber", + "slug": "luminous-vivid-amber", + "color": "#fcb900" + }, + { + "name": "Light green cyan", + "slug": "light-green-cyan", + "color": "#7bdcb5" + }, + { + "name": "Vivid green cyan", + "slug": "vivid-green-cyan", + "color": "#00d084" + }, + { + "name": "Pale cyan blue", + "slug": "pale-cyan-blue", + "color": "#8ed1fc" + }, + { + "name": "Vivid cyan blue", + "slug": "vivid-cyan-blue", + "color": "#0693e3" + }, + { + "name": "Vivid purple", + "slug": "vivid-purple", + "color": "#9b51e0" + } + ], + "text": true + }, + "dimensions": { + "defaultAspectRatios": true, + "aspectRatios": [ + { + "name": "Square - 1:1", + "slug": "square", + "ratio": "1" + }, + { + "name": "Standard - 4:3", + "slug": "4-3", + "ratio": "4/3" + }, + { + "name": "Portrait - 3:4", + "slug": "3-4", + "ratio": "3/4" + }, + { + "name": "Classic - 3:2", + "slug": "3-2", + "ratio": "3/2" + }, + { + "name": "Classic Portrait - 2:3", + "slug": "2-3", + "ratio": "2/3" + }, + { + "name": "Wide - 16:9", + "slug": "16-9", + "ratio": "16/9" + }, + { + "name": "Tall - 9:16", + "slug": "9-16", + "ratio": "9/16" + } + ] + }, + "shadow": { + "defaultPresets": true, + "presets": [ + { + "name": "Natural", + "slug": "natural", + "shadow": "6px 6px 9px rgba(0, 0, 0, 0.2)" + }, + { + "name": "Deep", + "slug": "deep", + "shadow": "12px 12px 50px rgba(0, 0, 0, 0.4)" + }, + { + "name": "Sharp", + "slug": "sharp", + "shadow": "6px 6px 0px rgba(0, 0, 0, 0.2)" + }, + { + "name": "Outlined", + "slug": "outlined", + "shadow": "6px 6px 0px -3px rgb(255, 255, 255), 6px 6px rgb(0, 0, 0)" + }, + { + "name": "Crisp", + "slug": "crisp", + "shadow": "6px 6px 0px rgb(0, 0, 0)" + } + ] + }, + "spacing": { + "blockGap": null, + "margin": false, + "padding": false, + "customSpacingSize": true, + "defaultSpacingSizes": true, + "units": [ "px", "em", "rem", "vh", "vw", "%" ], + "spacingScale": { + "operator": "*", + "increment": 1.5, + "steps": 7, + "mediumStep": 1.5, + "unit": "rem" + } + }, + "typography": { + "customFontSize": true, + "defaultFontSizes": true, + "dropCap": true, + "fontSizes": [ + { + "name": "Small", + "slug": "small", + "size": "13px" + }, + { + "name": "Medium", + "slug": "medium", + "size": "20px" + }, + { + "name": "Large", + "slug": "large", + "size": "36px" + }, + { + "name": "Extra Large", + "slug": "x-large", + "size": "42px" + } + ], + "fontStyle": true, + "fontWeight": true, + "letterSpacing": true, + "lineHeight": false, + "textAlign": true, + "textColumns": false, + "textDecoration": true, + "textIndent": "subsequent", + "textTransform": true, + "writingMode": false + }, + "blocks": { + "core/button": { + "border": { + "radius": true + } + }, + "core/image": { + "lightbox": { + "allowEditing": true + } + }, + "core/icon": { + "dimensions": { + "width": true + } + }, + "core/pullquote": { + "border": { + "color": true, + "radius": true, + "style": true, + "width": true + } + } + } + }, + "styles": { + "blocks": { + "core/button": { + "variations": { + "outline": { + "border": { + "width": "2px", + "style": "solid", + "color": "currentColor" + }, + "color": { + "text": "currentColor", + "gradient": "transparent none" + }, + "spacing": { + "padding": { + "top": "0.667em", + "right": "1.33em", + "bottom": "0.667em", + "left": "1.33em" + } + } + } + } + }, + "core/icon": { + "dimensions": { + "width": "24px" + } + }, + "core/site-logo": { + "variations": { + "rounded": { + "border": { + "radius": "9999px" + } + } + } + } + }, + "elements": { + "button": { + "color": { + "text": "#fff", + "background": "#32373c" + }, + "spacing": { + "padding": { + "top": "calc(0.667em + 2px)", + "right": "calc(1.333em + 2px)", + "bottom": "calc(0.667em + 2px)", + "left": "calc(1.333em + 2px)" + } + }, + "typography": { + "fontSize": "inherit", + "fontFamily": "inherit", + "fontStyle": "inherit", + "fontWeight": "inherit", + "letterSpacing": "inherit", + "textTransform": "inherit", + "lineHeight": "inherit", + "textDecoration": "none" + }, + "border": { + "width": "0" + } + } + }, + "spacing": { + "blockGap": "24px", + "padding": { + "top": "0px", + "right": "0px", + "bottom": "0px", + "left": "0px" + } + } + } +}